.checkout-page { background: var(--paper); }
.checkout-page [hidden] { display: none !important; }
.checkout-shell { width: min(1060px, calc(100% - 48px)); margin-inline: auto; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: 32px; align-items: start; }
.checkout-form-column { min-width: 0; }
.checkout-photos { display: grid; gap: 16px; min-width: 0; }
.checkout-photos > img { display: block; width: 100%; height: auto; border-radius: 18px; }
.checkout-quote { grid-column: 1 / -1; margin: 0; padding: 24px; border: 0; border-radius: 18px; background: #edf5f0; }
.checkout-quote blockquote { margin: 0; font-size: 1.5rem; line-height: 1.3; }
.checkout-quote figcaption { margin-top: 12px; font-size: .875rem; }
.checkout-header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.checkout-header .brand img { width: 155px; }
.back-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .875rem; }
.checkout-page h1 { margin: 10px 0 12px; font-size: 2rem; font-weight: 650; letter-spacing: -.04em; }
.availability-notice { margin: 0 0 20px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.checkout-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.product-row { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; }
.product-row > img { width: 76px; height: 76px; object-fit: cover; border-radius: 12px; flex: none; }
.product-details { flex: 1; min-width: 0; }
.product-details h2 { margin: 0 0 8px; font-size: 1.0625rem; font-weight: 650; letter-spacing: -.02em; }
.quantity-label { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .875rem; }
.quantity-label select { min-height: 44px; min-width: 64px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; font: inherit; font-size: 1rem; }
.kit-price { margin: 0; font-size: 1.375rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.checkout-section { min-width: 0; padding: 0; margin: 0 0 16px; border: 0; }
.checkout-section legend { width: 100%; padding: 14px 0 10px; border-top: 1px solid var(--line); color: var(--pine); font-size: 1rem; font-weight: 650; }
.checkout-section legend span { float: right; margin-left: 8px; color: var(--muted); font-size: .875rem; font-weight: 400; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field-wide { grid-column: 1 / -1; }
.address-row { display: grid; grid-template-columns: 1.3fr 1fr .8fr; gap: 12px; }
.field { display: block; min-width: 0; font-size: .875rem; line-height: 1.4; }
.field input { display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: 5px; padding: 10px; border: 1px solid #cbd3cd; border-radius: 7px; background: white; color: var(--ink); font: inherit; font-size: 1rem; }
.field input:disabled { background: #f5f6f3; color: var(--muted); -webkit-text-fill-color: var(--muted); opacity: 1; cursor: not-allowed; }
.card-interaction { position: relative; }
.card-fields { display: grid; grid-template-columns: 2fr 1fr .7fr; gap: 10px; }
.card-attempt-button { position: absolute; inset: 0; width: 100%; border: 0; border-radius: 7px; background: transparent; cursor: not-allowed; }
.card-attempt-button:focus-visible { outline-offset: 4px; }
.payment-help { margin: 10px 0 0; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.payment-help a, .availability-result a { color: var(--pine); text-decoration: underline; text-underline-offset: 2px; }
.checkout-total { border-top: 1px solid var(--line); padding-top: 16px; }
.subscription { margin: 0 0 16px; font-size: .875rem; line-height: 1.5; color: var(--muted); }
.subscription strong { color: var(--pine); font-weight: 600; }
.subtotal { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.125rem; }
.subtotal small { color: var(--muted); font-size: .875rem; }
.subtotal strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.charges-note { margin: 4px 0 16px; color: var(--muted); font-size: .875rem; }
.checkout-buy { width: 100%; min-height: 48px; display: flex; justify-content: center; border: 0; font: inherit; font-weight: 650; cursor: pointer; }
.checkout-buy:disabled { opacity: .55; cursor: not-allowed; }
.checkout-page .offer-terms { margin-top: 12px; font-size: .875rem; }
.checkout-page .offer-terms summary { min-height: 44px; padding-block: 12px; }
.checkout-page .offer-terms p { font-size: .875rem; line-height: 1.5; }
.checkout-page :is(a, button, input, select, summary):focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.availability-result { padding: 40px 20px; text-align: center; }
.availability-result h2 { font-size: 1.75rem; letter-spacing: -.03em; }
.availability-result p { color: var(--muted); font-size: 1rem; line-height: 1.5; margin: 0 0 12px; }
.availability-result p:last-of-type { margin-bottom: 24px; }
.availability-result button { border: 0; font: inherit; cursor: pointer; }
.checkout-footer { display: flex; flex-wrap: wrap; gap: 20px; padding-block: 24px; color: var(--muted); font-size: .875rem; }
.checkout-footer > span { margin-right: auto; }
@media (max-width: 960px) {
  .checkout-shell { width: min(600px, calc(100% - 32px)); }
  .checkout-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .checkout-photos { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .checkout-card { padding: 18px; }
  .product-row { gap: 12px; }
  .product-row > img { width: 58px; height: 58px; }
  .kit-price { font-size: 1.125rem; }
  .card-fields { grid-template-columns: 1fr 1fr; }
  .card-fields > :first-child { grid-column: 1 / -1; }
  .address-row { grid-template-columns: 1fr 1fr; }
  .address-row > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 360px) {
  .field-grid { grid-template-columns: 1fr; }
  .product-row { flex-wrap: wrap; }
  .checkout-section legend span { float: none; display: block; margin: 4px 0 0; }
}
