/* Tabs Rx survey, on tokens.css: every color, face, radius and space step reads a token.
   Each product opens on a dark stage, then the questions sit on white. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: var(--t-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  --stage-a: rgb(9 9 21); --stage-b: oklch(24% 0.12 278); --stage-ink: oklch(99% 0.003 280);
  --stage-muted: oklch(80% 0.03 280); --stage-accent: oklch(80% 0.1 278); --stage-line: oklch(99% 0.003 280 / 0.16);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
sup { font-size: 0.6em; line-height: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--ink); color: var(--paper); padding: var(--s-sm) var(--s-md); }
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── Chrome ─────────────────────────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.head-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-md);
  max-width: 720px; margin-inline: auto; padding: 12px var(--gutter);
}
.lockup { display: flex; align-items: center; gap: 6px; text-decoration: none; }
.lockup img { width: 62px; height: auto; }
.lockup-rx { font-family: var(--display); font-weight: 700; font-size: 20px; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.step-count { font-size: var(--t-micro); color: var(--muted); font-variant-numeric: tabular-nums; margin: 0; }
.progress { height: 3px; background: var(--line); }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width var(--t-slow) var(--ease-out); }

.wrap { max-width: 720px; margin-inline: auto; padding-inline: var(--gutter); }
main { padding-block: 0 var(--s-3xl); min-height: 70dvh; }
.screen > .eyebrow:first-child, .screen > .banner:first-child { margin-top: var(--s-lg); }

/* ── Type ───────────────────────────────────────────────────────────────── */
.eyebrow { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 0 0 var(--s-sm); }
.h2 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -0.025em; margin: 0; text-wrap: balance;
  font-size: clamp(2rem, 1.5rem + 2.2vw, 2.75rem); }
.h2:focus { outline: none; }
.lead-p { font-size: var(--t-lead); line-height: 1.45; color: var(--muted); max-width: 52ch; margin: var(--s-md) 0 0; text-wrap: pretty; }
.micro { font-size: var(--t-micro); line-height: 1.5; color: var(--muted); }

/* ── Screens ────────────────────────────────────────────────────────────── */
.screen { animation: rise var(--t-slow) var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen { animation: none; } .progress-bar { transition: none; } }

.q { border: 0; padding: 0; margin: var(--s-xl) 0 0; min-width: 0; }
.q legend, .q-label { display: block; padding: 0; font-weight: 600; font-size: 1.0625rem; line-height: 1.35; margin-bottom: var(--s-sm); }
.q .hint { display: block; font-weight: 400; font-size: var(--t-small); color: var(--muted); margin-top: 3px; }

/* Chips: one wrapping row of pills; real radios and checkboxes underneath. */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-xs); }
.chip-opt { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px;
  border-radius: var(--r-pill); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-firm); font-weight: 500; line-height: 1.2;
  cursor: pointer; transition: box-shadow var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
@media (hover: hover) { .chip-opt:hover { box-shadow: inset 0 0 0 1.5px var(--ink); } }
.chip-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-opt:has(input:checked) { background: var(--accent); color: var(--paper); box-shadow: none; font-weight: 600; }
.chip-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-opt > span { display: grid; gap: 1px; }
.chip-opt small { font-size: 0.75rem; font-weight: 400; color: var(--muted); line-height: 1.2; }
.chip-opt:has(input:checked) small { color: color-mix(in oklab, var(--paper) 82%, transparent); }
.chip-opt:has(small) { min-height: 56px; padding-block: 8px; }
/* The "Other" text field under a chip row, shown only while Other is ticked. */
.other-wrap { margin-top: var(--s-xs); }
.other-wrap[hidden] { display: none; }
.chips-2 { display: grid; grid-template-columns: 1fr 1fr; }
.chips-2 .chip-opt { padding-inline: 10px; text-align: center; }
.chips-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.chips-5 .chip-opt { padding: 8px 4px; min-height: 56px; font-size: 0.8125rem; line-height: 1.15; text-align: center; }
/* On a phone the five segments join into one bar: one shared border on the
   container, 1px dividers, every label on one line. */
@media (max-width: 480px) {
  .chips-5 { gap: 0; border: 1.5px solid var(--line-firm); border-radius: var(--r-pill); box-shadow: none; overflow: hidden; }
  .chips-5 .chip-opt { min-height: 48px; padding: 6px 4px; border-radius: 0; box-shadow: none; background: transparent; font-size: 0.8125rem; white-space: nowrap; }
  .chips-5 .chip-opt + .chip-opt { border-left: 1px solid var(--line-firm); }
  .chips-5 .chip-opt:has(input:checked) { box-shadow: none; }
  .chips-5 .chip-opt:has(input:checked) + .chip-opt { border-left-color: var(--accent); }
}

select, textarea {
  width: 100%; min-height: 52px; padding: 12px var(--s-md); border: 0; border-radius: var(--r-control);
  background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-firm);
}
select { appearance: none; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
select:focus-visible, textarea:focus-visible, input[type=text]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type=text] { width: 100%; min-height: 52px; padding: 12px var(--s-md); border: 0; border-radius: var(--r-control); background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-firm); }
input[type=text]::placeholder { color: var(--faint); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.nav { display: flex; align-items: center; gap: var(--s-sm); margin-top: var(--s-2xl); padding-top: var(--s-lg); border-top: 1px solid var(--line); }
.nav .btn-p { margin-left: auto; }
.btn-p, .btn-s { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border: 0;
  border-radius: var(--r-pill); font-size: 1.0625rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast) var(--ease-out), box-shadow var(--t-fast) var(--ease-out), transform 80ms var(--ease-out), opacity var(--t-fast); }
.btn-p { background: var(--accent); color: var(--paper); }
.btn-p:hover { background: var(--accent-deep); }
.btn-p:active { transform: translateY(1px); }
.btn-p[disabled] { opacity: 0.32; pointer-events: none; }
.btn-s { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-firm); }
@media (hover: hover) { .btn-s:hover { box-shadow: inset 0 0 0 1.5px var(--ink); } }

.intro-body { padding: var(--s-lg) 0 var(--s-md); }
.signoff { margin: var(--s-sm) 0 0; font-weight: 600; color: var(--ink); }
.subhead { margin: var(--s-sm) 0 0; font-family: var(--display); font-weight: 600; font-size: 1.375rem; letter-spacing: -0.015em; line-height: 1.15; }
.inlist { list-style: none; margin: var(--s-xs) 0 0; padding: 0; }
.inlist li { position: relative; padding: 6px 0 6px 18px; font-size: 0.9375rem; line-height: 1.4; color: var(--stage-muted); }
.inlist li::before { content: ''; position: absolute; left: 0; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--stage-accent); }
.inlist b { font-weight: 600; color: var(--stage-ink); }
.facts-reward { margin-top: 6px; }
.stage-inline { margin: var(--s-md) 0 0; aspect-ratio: 16 / 10; border-radius: var(--r-control); overflow: hidden; background: var(--stage-a); }
.stage-inline img { width: 100%; height: 100%; object-fit: cover; }
.pick-none-row { margin-top: var(--s-xs); }
.rung[hidden] { display: none; }
.rung + .rung .q { margin-top: var(--s-lg); }
.rule { border: 0; border-top: 1px solid var(--line); margin: var(--s-2xl) 0 var(--s-lg); }
.chips.shake { animation: shake 150ms var(--ease-out); }
.q legend b { font-weight: 800; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: var(--s-md) 0 0; font-size: var(--t-small); font-weight: 600; color: var(--ink); }
.facts span { display: inline-flex; align-items: center; gap: 8px; }
.facts span + span::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }

/* ── The product stage: dark field, the image at the top, then the pitch ──
   Full bleed on a phone, a rounded panel from 640px. Everything on it is
   white on the hero's indigo; the questions follow on the paper below. */
.stage { position: relative; margin: 0 calc(-1 * var(--gutter)) var(--s-md); color: var(--stage-ink);
  background: var(--stage-a); overflow: hidden; isolation: isolate; }
.stage-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.stage-vial { background: rgb(9 9 21); }
.stage-vial img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 0; }
.stage-vial::after { content: ''; position: absolute; inset: auto 0 0 0; height: 120px; z-index: 1; background: linear-gradient(to top, var(--stage-a) 0%, color-mix(in oklab, var(--stage-a) 60%, transparent) 50%, transparent 100%); }
.stage-still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage-still::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, var(--stage-a) 0%, var(--stage-a) 4%, color-mix(in oklab, var(--stage-a) 55%, transparent) 30%, transparent 60%); }
.stage-img .chip { position: absolute; left: var(--gutter); top: var(--gutter); z-index: 1; }
.chip { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill);
  background: color-mix(in oklab, var(--paper) 14%, transparent); color: var(--paper); font-size: var(--t-micro); font-weight: 600;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--paper) 24%, transparent); backdrop-filter: blur(8px); }
.stage-cap { position: absolute; right: var(--gutter); bottom: 10px; margin: 0; font-size: 0.6875rem; color: var(--stage-muted); opacity: 0.75; z-index: 2; }
/* The gradient lives on the body only: it starts at the same black the image
   ends on, so the image-to-body join is a zero-step seam. */
.stage-body { padding: var(--s-xs) var(--gutter) var(--s-xl); background: linear-gradient(180deg, var(--stage-a) 0%, var(--stage-b) 100%); }
.stage .eyebrow { color: var(--stage-accent); }
.stage .h2 { color: var(--stage-ink); }
.stage .h2 small { font-family: var(--body); font-weight: 500; font-size: 0.5em; letter-spacing: 0; opacity: 0.8; }
.stage .lead-p { color: var(--stage-muted); }

/* Three benefit rows, same language, no icons. */
.rows { list-style: none; margin: var(--s-lg) 0 0; padding: 0; }
.rows li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--stage-line); }
.rows .emoji { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1.125rem; background: color-mix(in oklab, var(--paper) 10%, transparent); }
.rows-lead { margin: var(--s-md) 0 0; font-weight: 600; }
.rows h3 { margin: 0 0 1px; font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
.rows p { margin: 0; font-size: 0.9375rem; line-height: 1.4; color: var(--stage-muted); max-width: 44ch; }
.foot-note { margin: var(--s-sm) 0 0; font-size: 0.6875rem; color: var(--stage-muted); opacity: 0.8; }

/* ── Ordering: a short timeline, then the payoff band ───────────────────── */
.tl { list-style: none; margin: var(--s-lg) 0 0; padding: 0; counter-reset: t; position: relative; }
.tl::before { content: ''; position: absolute; left: 15px; top: 16px; bottom: 16px; width: 1px; background: var(--accent); opacity: 0.35; }
.tl li { position: relative; padding: 0 0 var(--s-lg) 48px; }
.tl li:last-child { padding-bottom: 0; }
.tl li::before { counter-increment: t; content: counter(t); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent);
  font-family: var(--display); font-weight: 700; font-size: 0.9375rem; }
.tl h3 { margin: 4px 0 2px; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; text-wrap: balance; }
.tl p { margin: 0; color: var(--muted); font-size: var(--t-small); line-height: 1.45; text-wrap: pretty; }
.payoff { margin: var(--s-lg) 0 0; padding: var(--s-lg) var(--s-lg) var(--s-lg); border-radius: var(--r-panel); color: var(--stage-ink);
  background: linear-gradient(135deg, var(--stage-a) 0%, var(--stage-b) 100%); }
.payoff-h { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.375rem; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }

/* ── What's next: six image cards, tap to pick in order ─────────────────── */
.picks { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-xs); margin-top: var(--s-lg); }
.pick { position: relative; display: block; padding: 0; border: 0; border-radius: var(--r-control); overflow: hidden; aspect-ratio: 4 / 5;
  background: var(--stage-a); color: var(--stage-ink); text-align: left; cursor: pointer; isolation: isolate; }
.pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-out); }
.pick::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgb(8 8 28 / 0.92) 0%, rgb(8 8 28 / 0.72) 30%, rgb(8 8 28 / 0.3) 50%, transparent 65%); }
.pick-words { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; display: grid; gap: 3px; }
.pick-words b { font-family: var(--display); font-weight: 700; font-size: 1.0625rem; line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
.pick-words small { font-size: 0.75rem; line-height: 1.3; color: var(--stage-muted); }
.pick-n { position: absolute; right: 10px; top: 10px; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--paper); font-family: var(--display); font-weight: 700; font-size: 0.9375rem; opacity: 0; transform: scale(0.6); transition: opacity var(--t-fast), transform var(--t-mid) var(--ease-out); }
.pick[aria-pressed=true] { box-shadow: inset 0 0 0 3px var(--accent), 0 0 0 2px var(--paper), 0 0 0 4px var(--accent); }
.pick[aria-pressed=true] .pick-n { opacity: 1; transform: none; }
.pick[aria-pressed=true] img { transform: scale(1.04); }
.pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pick.shake { animation: shake 150ms var(--ease-out); }
@keyframes shake { 0% { transform: translateX(0); } 30% { transform: translateX(-5px); } 60% { transform: translateX(5px); } 100% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .pick.shake { animation: none; } }
.rank-out { margin: var(--s-sm) 0 0; font-size: var(--t-small); color: var(--muted); min-height: 1.5em; }
.rank-out:empty { display: none; }
.banner { margin: 0 0 var(--s-lg); padding: var(--s-md) var(--s-md); border-radius: var(--r-control); background: var(--accent-soft); font-size: var(--t-small); }
.banner p { margin: 0; }
.banner b { font-weight: 700; }
.banner .state-line { margin-top: 4px; }

/* ── Consent + thanks ───────────────────────────────────────────────────── */
.consent { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-sm); align-items: start; padding: var(--s-md); margin-top: var(--s-lg);
  border-radius: var(--r-control); box-shadow: inset 0 0 0 1.5px var(--line-firm); cursor: pointer; font-size: var(--t-small); line-height: 1.5; }
.consent input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); }
.consent:has(input:checked) { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.err { color: var(--no); font-size: var(--t-small); font-weight: 600; margin: var(--s-sm) 0 0; }
.err:empty { display: none; }
.thanks-panel { margin-top: var(--s-xl); padding: clamp(24px, 6vw, 40px); border-radius: var(--r-panel); color: var(--stage-ink);
  background: linear-gradient(135deg, var(--stage-a) 0%, var(--stage-b) 100%); }
.thanks-panel .eyebrow { color: var(--stage-accent); }
.thanks-lead { margin: 0; font-size: var(--t-lead); }
.code { display: flex; align-items: stretch; gap: var(--s-xs); margin-top: var(--s-md); }
.code output { flex: 1 1 auto; min-width: 0; display: grid; align-items: center; font-family: var(--display); font-weight: 700; font-size: clamp(1.375rem, 1rem + 2vw, 1.75rem); letter-spacing: 0.02em; padding: 0 16px; min-height: 48px; border-radius: var(--r-control); background: var(--paper); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code .btn-s { flex: 0 0 auto; min-height: 48px; padding: 0 20px; color: var(--stage-ink); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--paper) 50%, transparent); }
.code .btn-s:hover { box-shadow: inset 0 0 0 1.5px var(--paper); }
.code[hidden], #code-lead[hidden] { display: none; }
.thanks-vial { margin: var(--s-2xl) auto 0; width: 50%; max-width: 260px; text-align: center; }
.thanks-vial img { width: 100%; height: auto; border-radius: var(--r-panel); }
.thanks-vial figcaption { margin: var(--s-md) 0 0; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-foot { padding-block: var(--s-lg) var(--s-2xl); border-top: 1px solid var(--line); }
.site-foot p { font-size: var(--t-micro); line-height: 1.5; color: var(--faint); max-width: 60ch; margin: 0 0 6px; }

/* The quiet state line under the ordering heading. */
.state-line { margin: var(--s-sm) 0 0; font-size: var(--t-small); color: var(--muted); }
.state-line p { margin: 0; }
.linkbtn { border: 0; background: none; padding: 4px 2px; margin: -4px 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.state-pick { margin-top: var(--s-sm); max-width: 340px; }
.state-pick label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.state-pick[hidden] { display: none; }

@media (min-width: 640px) {
  .stage-inline { max-width: 420px; }
  .stage { margin-inline: 0; margin-top: var(--s-lg); border-radius: var(--r-panel); }
  .stage-img { aspect-ratio: 16 / 10; }
  .stage-body { padding-inline: 32px; }
  .stage-img .chip { left: 32px; }
  .stage-cap { right: 32px; }
  .picks { grid-template-columns: repeat(3, 1fr); }
  .pick-words small { min-height: calc(3 * 1.3 * 0.75rem); }
  .pick-words b { min-height: 2lh; display: flex; align-items: flex-end; }
}
