/* J Golf Fitness checkout. Palette: optionsV2 option B, "Bright Gold" (analysis/2026-11-09-checkout/palette).
   Gold is only ever a solid fill with dark green text on it, or text on dark green. Never gold text on white. */
:root {
  --page: #0a2e1a;           /* pageBg */
  --header: #033202;         /* headerGreen */
  --card: #ffffff;           /* cardSurface */
  --tint: #eef4ea;           /* tintSurface */
  --text: #101914;           /* textPrimary */
  --muted: #56615a;          /* textMuted */
  --on-dark: #ffffff;        /* textOnDark */
  --muted-on-dark: #d5ddd6;  /* textMutedOnDark */
  --border: #dde3dd;         /* border */
  --control: #7e8a82;        /* borderControl */
  --gold: #f4c430;           /* gold */
  --gold-hover: #f3c021;     /* goldHover */
  --gold-pressed: #f2bc13;   /* goldPressed */
  --edge: #0a2e1a;           /* goldEdge */
  --on-gold: #0a2e1a;        /* textOnGold */
  --success: #006900;        /* success */
  --on-success: #ffffff;     /* onSuccess */
  --focus: #006900;          /* focusRing */
  --focus-on-dark: #ffffff;  /* focusRingOnDark */
  --error: #b42318;          /* error */
  --radius-card: 14px;
  --radius-control: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
body > :focus-visible, .co > :focus-visible { outline-color: var(--focus-on-dark); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ----------
   DOM order is the phone order: header, plans, form (details, payment, summary), timeline + included.
   Desktop puts the form in the right column, spanning every row; the last row is 1fr so a taller
   right column never opens gaps between the left cards. */
.co {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 32px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  column-gap: 24px;
  align-items: start;
}
.hd    { grid-column: 1; grid-row: 1; margin-bottom: 18px; }
/* desktop: plans and timeline/included read as one card, as in the design */
.card.plans { grid-column: 1; grid-row: 2; border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 4px; }
.card.more  { grid-column: 1; grid-row: 3; border-top-left-radius: 0; border-top-right-radius: 0; padding-top: 22px; }
.co-form { grid-column: 2; grid-row: 1 / span 4; display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.card { background: var(--card); border-radius: var(--radius-card); padding: 22px 24px; min-width: 0; }
.h-xl { font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.h-lg { font-size: 18px; font-weight: 700; line-height: 1.25; margin-bottom: 14px; }

/* ---------- Header card ---------- */
.hd {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "logo top" "logo sub";
  column-gap: 20px;
  align-items: center;
}
.hd-logo { grid-area: logo; height: 48px; width: auto; display: block; }
.hd-top { grid-area: top; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; align-self: end; }
.hd-sub { grid-area: sub; color: var(--muted); font-size: 14px; margin-top: 8px; align-self: start; max-width: 52ch; }
/* static label: solid gold, no edge */
.chip { display: inline-block; background: var(--gold); color: var(--on-gold); border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; }

/* ---------- Plan cards (native radios, visually hidden) ---------- */
.plan-list { display: flex; flex-direction: column; gap: 12px; }
.plan-wrap { position: relative; }
.plan-wrap:first-child { margin-top: 10px; }
.badge { position: absolute; top: -11px; left: 16px; z-index: 1; background: var(--gold); color: var(--on-gold); border-radius: 999px; padding: 1px 12px; font-size: 12px; font-weight: 700; line-height: 20px; pointer-events: none; }
.plan {
  position: relative;
  display: block;
  border: 1.5px solid var(--control);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.plan:hover { border-color: var(--text); }
/* selected: 2px gold border with a 1px dark green edge outside it (box-shadow, so no layout shift) */
.plan.is-sel { border-color: var(--gold); box-shadow: 0 0 0 .5px var(--gold), 0 0 0 1.5px var(--edge); }
.plan:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; }
.plan-top { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--control); background: var(--card); flex: none; display: grid; place-items: center; color: transparent; }
.radio svg { width: 13px; height: 13px; }
.plan.is-sel .radio { background: var(--gold); border-color: var(--edge); color: var(--on-gold); }
.plan-main { display: flex; flex-direction: column; min-width: 0; }
.plan-name { font-size: 16px; font-weight: 600; line-height: 1.25; }
.plan-sub { color: var(--muted); font-size: 13.5px; }
.plan-free { margin-left: auto; text-align: right; color: var(--success); display: flex; flex-direction: column; flex: none; }
.zero { font-size: 17px; font-weight: 700; line-height: 1.2; }
.for { font-size: 13px; font-weight: 500; }
.strip {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px;
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  background: var(--tint); color: var(--text);
  transition: background-color .15s ease;
}
.plan.is-sel .strip { background: var(--gold); color: var(--on-gold); }

/* ---------- Form fields ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.h-lg + label { margin-top: 0; }
input[type="email"], input[type="text"], input[type="tel"] {
  display: block; width: 100%; height: 44px;
  border: 1.5px solid var(--control); border-radius: var(--radius-control);
  padding: 0 12px; font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  color: var(--text); background: var(--card);
  -webkit-appearance: none; appearance: none;
}
input::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
input[aria-invalid="true"] { border-color: var(--error); border-width: 2px; padding: 0 11.5px; }
.field-err { color: var(--error); font-size: 13px; font-weight: 500; margin-top: 6px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.notice { display: flex; gap: 8px; align-items: flex-start; background: var(--tint); border-radius: var(--radius-control); padding: 9px 12px; font-size: 13px; color: var(--text); margin: 0 0 8px; }
.notice svg { width: 16px; height: 16px; flex: none; color: var(--success); margin-top: 1px; }

/* ---------- Payment ---------- */
.pay-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.secure { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; padding-top: 3px; }
.secure svg { width: 14px; height: 14px; color: var(--success); }
.pe { min-height: 186px; }
.pay-help { color: var(--muted); font-size: 13px; margin-top: 12px; }

/* neutral placeholder until Stripe mounts */
.pe-placeholder { display: flex; flex-direction: column; }
.sk { display: block; background: #eef1ee; border-radius: var(--radius-control); }
.sk--tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: none; }
.sk--tabs i, .sk--two i { display: block; height: 40px; border-radius: 999px; background: #eef1ee; }
.sk--label { width: 96px; height: 12px; margin: 22px 0 9px; border-radius: 4px; }
.sk--input { height: 44px; }
.sk--two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; background: none; }
.sk--two i { height: 44px; border-radius: var(--radius-control); }
.sk, .sk i { animation: pulse 1.4s ease-in-out infinite; }
.sk--tabs, .sk--two { animation: none; }
@keyframes pulse { 50% { opacity: .55; } }

/* design mock of the Payment Element (?preview=1) */
.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.tab { height: 40px; border-radius: 999px; border: 1.5px solid var(--control); background: var(--card); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 0 6px; }
.tab:hover { border-color: var(--text); }
.tab--on, .tab--on:hover { border-color: var(--edge); background: var(--gold); color: var(--on-gold); }

/* ---------- Order summary ---------- */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.row dd { text-align: right; }
.row--total { color: var(--text); font-weight: 700; font-size: 15px; align-items: baseline; }
.zero-w { font-size: 17px; font-weight: 700; color: var(--success); }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }

/* text that changes with the plan: both versions share one grid cell, so the box keeps the
   height of the longer one and switching plans never moves anything below it */
.swap { display: grid; }
.swap > * { grid-area: 1 / 1; }
.row dd.swap { justify-items: end; }
body[data-plan="annual"] [data-for="monthly"],
body[data-plan="monthly"] [data-for="annual"] { visibility: hidden; }

/* ---------- Consent ---------- */
.consent { margin-top: 18px; font-size: 13px; font-weight: 500; }
.consent--box { display: none; gap: 10px; align-items: flex-start; }
body[data-consent="checkbox"] .consent--line { display: none; }
body[data-consent="checkbox"] .consent--box { display: flex; }
.consent--box label { margin: 0; font-size: 13px; font-weight: 500; cursor: pointer; }
.cbox {
  -webkit-appearance: none; appearance: none; margin: 0; flex: none; margin-top: 1px;
  width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--control); background: var(--card); cursor: pointer;
}
.cbox:checked {
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%230a2e1a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
  border-color: var(--edge);
}
.cbox[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.link { color: var(--success); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.link:hover { text-decoration-thickness: 2px; }

/* ---------- Errors ---------- */
.form-err { margin-top: 16px; border: 1.5px solid var(--error); border-radius: var(--radius-control); background: #fff; color: var(--error); padding: 10px 12px; font-size: 13.5px; font-weight: 500; }

/* ---------- Button ---------- */
.cta {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 52px; margin-top: 16px;
  border: 1.5px solid var(--edge); border-radius: var(--radius-control);
  background: var(--gold); color: var(--on-gold);
  font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background-color .15s ease, transform .05s ease;
}
.cta:hover { background: var(--gold-hover); }
.cta:active { background: var(--gold-pressed); transform: translateY(1px); }
.cta:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cta:disabled { cursor: not-allowed; opacity: .5; transform: none; }
.cta:disabled:hover { background: var(--gold); }
.cta.is-loading, .cta.is-loading:disabled { opacity: 1; cursor: progress; background: var(--gold-pressed); }
.cta-spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
.cta.is-loading .cta-spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.after { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }
.after--cancel { margin-top: 8px; }
.welcome { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; background: var(--tint); border-radius: var(--radius-control); font-size: 13px; color: var(--text); }
.welcome svg { width: 18px; height: 18px; flex: none; color: var(--success); margin-top: 1px; }

/* ---------- Timeline ---------- */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.dot { width: 30px; height: 30px; border-radius: 50%; background: var(--header); color: var(--on-dark); display: grid; place-items: center; font-weight: 700; font-size: 14px; box-shadow: 0 0 0 4px var(--tint); flex: none; }
.line { flex: 1; height: 2px; background: var(--border); }
.step-t { font-weight: 700; font-size: 15px; line-height: 1.35; }
.step-d { color: var(--muted); font-size: 13.5px; margin-top: 2px; }

/* ---------- What's included ---------- */
.more hr { margin: 22px 0 20px; }
.intro { color: var(--text); font-size: 14px; margin: -4px 0 16px; max-width: 70ch; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--tint); border-radius: 12px; padding: 16px; }
.tile-t { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; line-height: 1.3; }
.ok { width: 22px; height: 22px; border-radius: 50%; background: var(--success); color: var(--on-success); display: grid; place-items: center; flex: none; }
.ok svg { width: 12px; height: 12px; }
.tile-lead { font-size: 13.5px; font-weight: 500; margin-top: 10px; }
.tile ul { list-style: none; margin: 6px 0 0; padding: 0; }
.tile li { position: relative; padding-left: 16px; margin-top: 5px; font-size: 13.5px; }
.tile li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* ---------- Tablet and phone: one column, in DOM order ---------- */
@media (max-width: 959px) {
  .co { display: flex; flex-direction: column; gap: 14px; max-width: 560px; padding: 16px 12px 40px; }
  .hd { margin-bottom: 0; }
  .card.plans, .card.more { border-radius: var(--radius-card); }
  .card.plans { padding-bottom: 18px; }
  .co-form { gap: 14px; }
  .card { padding: 18px 16px; }
}
@media (max-width: 599px) {
  .hd { grid-template-areas: "logo top" "sub sub"; column-gap: 14px; }
  .hd-logo { height: 38px; }
  .hd-top { align-self: center; gap: 6px; }
  .h-xl { font-size: 19px; }
  .hd-sub { margin-top: 12px; font-size: 13.5px; }
  .strip { font-size: 12px; }
  .tab { font-size: 12.5px; }
  .tiles { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .step { display: grid; grid-template-columns: 42px minmax(0, 1fr); column-gap: 4px; }
  .step-top { margin: 0; align-items: flex-start; padding-top: 2px; }
  .line { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .cta:active { transform: none; }
  .cta.is-loading .cta-spin { border-right-color: currentColor; opacity: .6; }
}
