:root {
  --deep: #082820;
  --ink: #143a32;
  --paper: #f3f8f6;
  --white: #ffffff;
  --mint: #cceee4;
  --bright: #35d09a;
  --blue: #dceaf1;
  --coral: #ce4030;
  --line: rgba(20, 58, 50, 0.18);
  --display: "Barlow Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --body: "Be Vietnam Pro", "Avenir Next", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button, input, select, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: -5rem;
  left: 1rem;
  padding: 0.8rem 1rem;
  color: var(--white);
  background: var(--deep);
}

.skip-link:focus { top: 1rem; }

.preview-banner {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0.45rem 1rem;
  color: #b9d9d0;
  background: var(--deep);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-align: center;
  text-transform: uppercase;
}

.checkout-header {
  min-height: 74px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 4vw;
  border-bottom: 1px solid var(--line);
  background: rgba(243, 248, 246, 0.96);
}

.wordmark {
  width: max-content;
  color: var(--deep);
  text-decoration: none;
  letter-spacing: -0.04em;
}

.wordmark span { font-size: 1.45rem; }
.wordmark b { color: var(--coral); font-family: var(--display); font-size: 1.8rem; }

.secure-label, .back-link {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secure-label::before { margin-right: 0.4rem; color: #0c9d6b; content: "●"; }
.back-link { justify-self: end; color: var(--ink); text-underline-offset: 4px; }

.checkout-shell { width: min(1180px, 92vw); margin: 0 auto; padding: 2.25rem 0 5rem; }

.checkout-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.checkout-progress li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0;
  border-top: 2px solid #b9c8c4;
  color: #718b84;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.checkout-progress li.is-active { border-color: var(--coral); color: var(--deep); }
.checkout-progress b { color: var(--coral); font-size: 0.6rem; }

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.14fr) minmax(340px, 0.86fr); gap: 1rem; align-items: start; }
.checkout-card, .order-summary { border: 1px solid var(--line); background: var(--white); }
.checkout-card { padding: clamp(1.5rem, 4vw, 3.5rem); }

.eyebrow {
  margin: 0 0 1rem;
  color: #5d7972;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; color: var(--deep); font-family: var(--display); letter-spacing: -0.028em; }
h1 { font-size: clamp(3.4rem, 6vw, 6rem); line-height: 0.9; }
h1 em { color: var(--coral); font-family: Georgia, serif; font-weight: 400; }
.step-intro { max-width: 34rem; margin: 1.25rem 0 2rem; color: #536f68; line-height: 1.6; }

.choice-section {
  min-width: 0;
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}

.choice-section legend {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  margin: 0 0 0.8rem;
  color: var(--deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.choice-section legend span {
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--coral);
  font-size: 0.62rem;
}

.bundle-options,
.shipping-options { display: grid; gap: 0.65rem; }

.shipping-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.bundle-option,
.shipping-option {
  position: relative;
  min-height: 72px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid #adc0ba;
  color: var(--deep);
  background: var(--white);
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.bundle-option:hover,
.shipping-option:hover { border-color: var(--deep); transform: translateY(-1px); }

.bundle-option:has(input:checked),
.shipping-option:has(input:checked) {
  border: 2px solid var(--deep);
  padding: calc(0.85rem - 1px) calc(0.95rem - 1px);
  background: #e5f6f0;
}

.bundle-option input,
.shipping-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.radio-mark {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border: 1px solid #8aa39c;
  border-radius: 50%;
  background: var(--white);
}

input:checked + .radio-mark { border: 4px solid var(--deep); }
input:focus-visible + .radio-mark { outline: 3px solid var(--coral); outline-offset: 3px; }

.option-copy { display: flex; min-width: 0; flex-direction: column; gap: 0.22rem; }
.option-copy b { font-size: 0.84rem; }
.option-copy small { color: #617c75; font-size: 0.64rem; line-height: 1.35; }
.bundle-option > strong,
.shipping-option > strong { font-family: var(--display); font-size: 1.45rem; }

.option-badge {
  position: absolute;
  top: -0.48rem;
  right: 0.7rem;
  padding: 0.2rem 0.5rem;
  color: var(--deep);
  background: var(--bright);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bundle-option.is-routine:has(input:checked) { color: var(--white); background: var(--deep); }
.bundle-option.is-routine:has(input:checked) .option-copy small { color: #b9d9d0; }
.bundle-option.is-routine:has(input:checked) .radio-mark { background: var(--white); }
.shipping-option.is-express:has(input:checked) { background: #fff1ed; }

.policy-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0 0 1rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  color: #536f68;
  background: #f6faf8;
  font-size: 0.69rem;
  line-height: 1.55;
}

.policy-consent.has-error { border-color: var(--coral); background: #fff2ef; }
.policy-consent input { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; margin: 0.1rem 0 0; accent-color: var(--deep); }
.policy-consent a { color: var(--deep); font-weight: 800; text-underline-offset: 2px; }
.policy-error { margin: -0.45rem 0 1rem; color: #8d2017; font-size: 0.67rem; line-height: 1.45; }

#shipping-form { display: grid; gap: 1rem; }
.field-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
.city-fields { grid-template-columns: 1.2fr 1fr 0.8fr; }
.field { display: flex; flex-direction: column; gap: 0.38rem; }
.field span { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }

.field input, .field select {
  width: 100%;
  min-height: 52px;
  padding: 0 0.85rem;
  border: 1px solid #adc0ba;
  border-radius: 0;
  color: var(--deep);
  background: var(--white);
}

.field input::placeholder { color: #92a49f; }
.updates-check { display: flex; align-items: flex-start; gap: 0.6rem; margin: 0.3rem 0; font-size: 0.72rem; line-height: 1.5; }
.updates-check input { margin-top: 0.2rem; accent-color: var(--deep); }

.checkout-action {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 1.15rem;
  border: 1px solid var(--deep);
  color: var(--white);
  background: var(--deep);
  cursor: pointer;
  font-weight: 800;
}

.checkout-action:hover { color: var(--deep); background: var(--bright); }
.checkout-action:disabled { cursor: wait; opacity: 0.72; }
.form-note, .payment-note { margin: 0; color: #66817a; font-size: 0.63rem; line-height: 1.5; }

.checkout-benefits {
  display: grid;
  margin: 1.35rem 0 0;
  padding: 0;
  border-top: 1px solid var(--deep);
  list-style: none;
}

.checkout-benefits li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
}

.checkout-benefits b { color: var(--deep); }
.checkout-benefits span { color: #607a73; text-align: right; }
.stripe-handoff .checkout-action { gap: 0.8rem; }
.stripe-handoff .checkout-action [data-payment-price] { margin-left: auto; color: var(--bright); }
.stripe-handoff .checkout-action:hover [data-payment-price] { color: var(--deep); }
.stripe-handoff .payment-note { margin-top: 0.75rem; }

.checkout-notice,
.payment-error {
  margin: 0 0 1rem;
  padding: 0.8rem 0.9rem;
  font-size: 0.72rem;
  line-height: 1.5;
}

.checkout-notice { color: #704a00; background: #fff0c7; }
.payment-error { color: #8d2017; background: #fee0dc; }

.mobile-pay-bar { display: none; }

.order-summary { position: sticky; top: 1rem; overflow: hidden; }
.summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.25rem; border-bottom: 1px solid var(--line); }
.summary-head small { color: #657f78; font-size: 0.61rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.summary-head h2 { margin-top: 0.2rem; font-size: 1.65rem; }
.summary-head > strong { font-family: var(--display); font-size: 2.1rem; }

.summary-product { display: grid; grid-template-columns: 9rem 1fr; align-items: center; gap: 1rem; padding: 1.25rem; }
.summary-product p { color: #526f67; font-size: 0.72rem; line-height: 1.55; }
.summary-art { position: relative; height: 8rem; background: #e6efec; }
.summary-art img { position: absolute; bottom: 0; width: 53%; height: 94%; object-fit: contain; mix-blend-mode: multiply; }
.summary-art img:nth-child(1) { left: -4%; }
.summary-art img:nth-child(2) { left: 25%; }
.summary-art img:nth-child(3) { right: -4%; }
.summary-art.is-cleanser img { display: none; }
.summary-art.is-cleanser img:first-child { left: 25%; display: block; }

.routine-strip { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 1.25rem; color: var(--white); background: var(--deep); }
.routine-strip span { padding: 0.75rem 0.35rem; border-right: 1px solid rgba(255,255,255,0.16); font-size: 0.58rem; text-align: center; text-transform: uppercase; }
.routine-strip span:last-child { border-right: 0; }
.routine-strip b { color: var(--bright); }

.summary-ledger { margin: 0; padding: 1.25rem; }
.summary-ledger div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; font-size: 0.72rem; }
.summary-ledger dt, .summary-ledger dd { margin: 0; }
.summary-total { margin-top: 0.45rem; padding-top: 1rem !important; border-top: 1px solid var(--deep); color: var(--deep); font-weight: 800; }
.summary-total dd { font-family: var(--display); font-size: 1.6rem; }
.summary-saving { margin: 0; padding: 0.9rem 1.25rem; color: #075e43; background: var(--mint); font-size: 0.7rem; }
.summary-trust { margin: 0; padding: 1rem 1.25rem; color: #6c837d; font-size: 0.6rem; line-height: 1.5; }

.review-block { padding: 1rem 0; border-top: 1px solid var(--line); }
.review-block > div { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.review-block span { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.review-block button { padding: 0; border: 0; color: var(--ink); background: transparent; cursor: pointer; font-size: 0.67rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.review-block strong { color: var(--deep); }
.review-block p { margin: 0.3rem 0 0; color: #607a73; font-size: 0.75rem; line-height: 1.55; }
#review-step .checkout-action { margin-top: 1.25rem; }
#review-step .payment-note { margin-top: 0.75rem; }

@media (max-width: 760px) {
  .preview-banner { font-size: 0.55rem; }
  .checkout-header { min-height: 62px; grid-template-columns: 1fr auto; padding: 0 1rem; }
  .secure-label { display: none; }
  .checkout-shell { width: 100%; padding: 0.85rem 0 6rem; }
  .checkout-progress { margin: 0 1rem 0.8rem; }
  .checkout-progress li { padding: 0.65rem 0; font-size: 0.58rem; }
  .checkout-layout { display: flex; flex-direction: column; gap: 0; }
  .order-summary { position: static; order: -1; width: calc(100% - 2rem); margin: 0 1rem 0.75rem; }
  .summary-head { padding: 0.85rem; }
  .summary-head h2 { font-size: 1.25rem; }
  .summary-head > strong { font-size: 1.65rem; }
  .summary-product { grid-template-columns: 5.5rem 1fr; padding: 0.75rem 0.85rem; }
  .summary-art { height: 5rem; }
  .routine-strip { margin: 0 0.85rem; }
  .summary-ledger div:not(.summary-total), .summary-saving, .summary-trust { display: none; }
  .summary-ledger { padding: 0.55rem 0.85rem; }
  .summary-total { margin: 0; padding-top: 0.55rem !important; border-top-color: var(--line); }
  .checkout-card { width: 100%; padding: 1.4rem 1rem 2rem; border-right: 0; border-left: 0; }
  h1 { font-size: clamp(2.9rem, 12vw, 3.6rem); }
  .step-intro { margin: 0.9rem 0 1.25rem; font-size: 0.82rem; }
  .field-pair, .city-fields { grid-template-columns: 1fr 1fr; }
  .city-fields .field:first-child { grid-column: 1 / -1; }
  .field input, .field select { min-height: 50px; font-size: 1rem; }
  .checkout-action { position: static; box-shadow: none; }
  .desktop-checkout-action { display: none; }
  .bundle-options { gap: 0.55rem; }
  .bundle-option, .shipping-option { min-height: 68px; padding: 0.75rem; }
  .bundle-option:has(input:checked), .shipping-option:has(input:checked) { padding: calc(0.75rem - 1px); }
  .shipping-options { gap: 0.55rem; }
  .shipping-option { grid-template-columns: auto minmax(0, 1fr); align-content: center; }
  .shipping-option > strong { grid-column: 2; font-size: 1.2rem; }
  .choice-section { margin-bottom: 1.55rem; }
  .policy-consent { margin-bottom: 0.75rem; }
  .checkout-benefits li { font-size: 0.7rem; }
  .back-link { font-size: 0.6rem; }

  .mobile-pay-bar {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.7rem max(1rem, env(safe-area-inset-right)) calc(0.7rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
    border-top: 1px solid rgba(255,255,255,0.15);
    color: var(--white);
    background: var(--deep);
    box-shadow: 0 -12px 36px rgba(8, 40, 32, 0.2);
  }

  .mobile-pay-bar > span { display: flex; flex-direction: column; min-width: 4.5rem; }
  .mobile-pay-bar small { color: #b9d9d0; font-size: 0.52rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
  .mobile-pay-bar strong { font-family: var(--display); font-size: 1.45rem; }
  .mobile-pay-bar button {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.9rem;
    border: 0;
    color: var(--deep);
    background: var(--bright);
    font-size: 0.75rem;
    font-weight: 800;
  }

  .mobile-pay-bar button:disabled { cursor: wait; opacity: 0.65; }
}

@media (max-width: 390px) {
  .field-pair { grid-template-columns: 1fr; }
  .city-fields .field:first-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
