/* TRAX Beta public styles. Ported from the approved prototype
   (questionnaire_proto/src/styles.css); selection state is driven
   by real radio/checkbox inputs via :has(), and fonts are
   self-hosted (no external requests pass the CSP). */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("/static/fonts/ibm-plex-sans-300.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/ibm-plex-sans-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/ibm-plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/ibm-plex-mono-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/ibm-plex-mono-600.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  --navy-950: #050c1e;
  --navy-900: #08122b;
  --navy-850: #0b1631;
  --navy-800: #0f1c3f;
  --navy-700: #14254d;
  --navy-600: #1b2e5c;
  --orange: #fa7a35;
  --orange-hover: #ff8b4a;
  --orange-dark: #1a0e04;
  --orange-soft: rgba(250, 122, 53, 0.13);
  --orange-line: rgba(250, 122, 53, 0.42);
  --blue: #4a6bff;
  --cyan: #5bc8ff;
  --good: #2dd4a4;
  --warn: #ffb347;
  --bad: #ff6b6b;
  --ink: #fff;
  --ink-80: rgba(255, 255, 255, 0.78);
  --ink-60: rgba(255, 255, 255, 0.55);
  --ink-40: rgba(255, 255, 255, 0.44);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.13);
  --page-max: 1480px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--navy-950); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--navy-900); color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
::selection { background: var(--orange); color: var(--orange-dark); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 8px; }

.hero {
  position: relative;
  min-height: min(760px, 88vh);
  max-width: var(--page-max);
  margin: 0 auto;
  overflow: hidden;
  background: #e7e4de;
}
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 53%; }
.hero__wash { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,18,43,.88) 0, rgba(8,18,43,.34) 15%, transparent 36%, transparent 66%, rgba(8,18,43,.18) 78%, #08122b 100%); pointer-events: none; }
.site-header { position: relative; z-index: 5; height: 104px; max-width: 1320px; margin: 0 auto; padding: 18px 40px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.04); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand img { width: 76px; height: 68px; object-fit: contain; }
.brand span { margin-top: 4px; padding: 3px 7px; border: 1px solid var(--orange-line); border-radius: 5px; background: rgba(26,14,4,.75); color: #ff9a64; font: 600 10px/1 "IBM Plex Mono", monospace; letter-spacing: .08em; }
.desktop-nav { display: flex; align-items: center; gap: 34px; padding-top: 21px; }
.desktop-nav a { color: rgba(255,255,255,.86); text-decoration: none; font-size: 14px; font-weight: 500; }
.desktop-nav a:hover { color: white; }
.nav-apply { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 9px 17px; background: rgba(8,18,43,.38); color: white; cursor: pointer; }
.nav-apply:hover { border-color: var(--orange); }
.menu-button, .mobile-nav { display: none; }
.hero__copy { position: relative; z-index: 3; max-width: 1320px; margin: 0 auto; padding: clamp(54px, 7vh, 82px) 40px 126px; color: white; }
.hero__panel { width: min(620px, 56%); padding: 28px 30px 27px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: linear-gradient(135deg, rgba(8,18,43,.84), rgba(8,18,43,.67)); box-shadow: 0 24px 70px rgba(2,8,22,.28); backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%); }
.eyebrow { display: flex; align-items: center; gap: 16px; margin-bottom: 23px; font: 600 13px/1 "IBM Plex Mono", monospace; letter-spacing: .12em; }
.eyebrow span { color: #ff8b4a; }
.eyebrow i { width: 1px; height: 19px; background: rgba(255,255,255,.34); }
.eyebrow code { color: var(--ink-60); font: inherit; letter-spacing: .06em; }
.hero h1 { margin: 0; max-width: 560px; color: white; font-size: clamp(52px, 5.5vw, 78px); line-height: .94; letter-spacing: -.055em; font-weight: 600; }
.hero__lead { margin: 22px 0 0; color: white; font-size: 20px; font-weight: 600; }
.hero__panel > p:not(.hero__lead):not(.hero__note) { max-width: 500px; margin: 8px 0 0; color: var(--ink-80); font-size: 16px; line-height: 1.5; }
.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .62; cursor: wait; transform: none; }
.button--primary { background: var(--orange); color: var(--orange-dark); }
.button--primary:hover { background: var(--orange-hover); }
.button--ghost { border-color: var(--line-strong); background: rgba(255,255,255,.025); color: var(--ink-80); }
.button--ghost:hover { border-color: rgba(255,255,255,.28); color: white; }
.hero__cta { margin-top: 24px; }
.hero__note { margin: 12px 0 0; color: var(--ink-60); font-size: 13px; }

.beta-intro { max-width: var(--page-max); margin: 0 auto; padding: 104px max(48px, calc((100% - 1260px)/2)) 84px; display: grid; grid-template-columns: .86fr 1.14fr; gap: 80px; background: var(--navy-900); position: relative; }
.beta-intro::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.section-kicker { display: block; color: var(--orange); font: 600 11px/1 "IBM Plex Mono", monospace; letter-spacing: .18em; }
.beta-intro h2 { margin: 20px 0 18px; font-size: clamp(35px, 4vw, 54px); line-height: 1.04; letter-spacing: -.04em; font-weight: 500; }
.beta-intro__statement > p { max-width: 550px; margin: 0 0 14px; color: var(--ink-80); font-size: 17px; line-height: 1.6; }
.beta-intro__statement .muted { color: var(--ink-60); }
.beta-intro__steps { border-top: 1px solid var(--line-strong); }
.beta-intro__steps article { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.beta-intro__steps code { color: var(--orange); font: 500 12px/1 "IBM Plex Mono", monospace; }
.beta-intro__steps h3 { margin: 0 0 6px; font-size: 18px; }
.beta-intro__steps p { margin: 0; color: var(--ink-60); font-size: 14px; line-height: 1.55; }
.beta-intro__benefits { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.beta-intro__benefits article { min-height: 174px; padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(145deg, rgba(255,255,255,.032), rgba(255,255,255,.012)); }
.beta-intro__benefits span { color: var(--orange); font: 500 10px/1 "IBM Plex Mono", monospace; }
.beta-intro__benefits h3 { margin: 26px 0 8px; font-size: 18px; }
.beta-intro__benefits p { margin: 0; color: var(--ink-60); font-size: 13px; line-height: 1.55; }
.beta-intro__facts { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px 34px; padding: 19px 22px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); color: var(--ink-60); font-size: 13px; }
.beta-intro__facts span { display: flex; align-items: center; gap: 8px; }
.beta-intro__facts strong { color: var(--ink-80); font-family: "IBM Plex Mono", monospace; font-size: 11px; }

.application { position: relative; max-width: var(--page-max); min-height: 900px; margin: 0 auto; padding: 76px max(48px, calc((100% - 1260px)/2)) 110px; display: grid; grid-template-columns: 230px minmax(0, 780px); justify-content: center; gap: 68px; background: var(--navy-900); border-top: 1px solid var(--line); }
.application__ambient { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(800px 540px at 82% 18%, rgba(35,35,180,.12), transparent 62%), radial-gradient(600px 420px at 10% 92%, rgba(250,122,53,.035), transparent 72%); }
.application > *:not(.application__ambient) { position: relative; z-index: 1; }
.progress-rail { position: sticky; top: 30px; align-self: start; padding: 18px 0; }
.progress-rail__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; color: var(--ink-60); font: 600 10px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; }
.progress-rail__top code { color: var(--ink-80); font: inherit; letter-spacing: .05em; }
.progress-rail ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.progress-rail li { position: relative; }
.progress-rail li::before { content: ""; position: absolute; left: 16px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.progress-rail li:first-child::before { top: 50%; }
.progress-rail li:last-child::before { bottom: 50%; }
.progress-rail a, .progress-rail .rail-step { width: 100%; min-height: 50px; display: flex; align-items: center; gap: 12px; padding: 7px 8px; border: 0; background: none; color: var(--ink-40); text-align: left; font-size: 13px; cursor: default; }
.progress-rail a { cursor: pointer; }
.progress-rail a span, .progress-rail .rail-step span { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--navy-900); font: 500 9px/1 "IBM Plex Mono", monospace; }
.progress-rail li.is-current .rail-step { color: white; font-weight: 600; }
.progress-rail li.is-current .rail-step span { border-color: var(--orange); background: var(--orange); color: var(--orange-dark); }
.progress-rail li.is-complete a { color: var(--ink-60); }
.progress-rail li.is-complete a span { border-color: var(--orange-line); color: var(--orange); background: var(--orange-soft); }
.progress-rail > p { margin: 18px 8px 0; color: var(--ink-40); font-size: 11px; line-height: 1.5; }
.application__main { min-width: 0; }
.mobile-progress, .step-focus-anchor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.step-heading { margin-bottom: 42px; }
.step-heading h2 { margin: 15px 0 8px; font-size: clamp(32px, 4vw, 48px); line-height: 1.08; letter-spacing: -.035em; font-weight: 500; }
.step-heading p { margin: 0; color: var(--ink-60); font-size: 16px; line-height: 1.55; }
.step-body { display: flex; flex-direction: column; gap: 34px; }
.question-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.question-group legend, .field > span { display: block; margin-bottom: 11px; color: var(--ink-80); font-size: 14px; font-weight: 500; line-height: 1.45; }
em { font-style: normal; }
.question-group legend em, .field > span em { margin-left: 5px; color: var(--ink-60); font-size: 12px; font-weight: 400; }
.field > span small { display: inline; margin: 0 0 0 5px; color: var(--ink-60); font-size: 12px; font-weight: 400; }
.field > small, .question-group > small { display: block; margin-top: 8px; color: var(--ink-60); font-size: 12px; line-height: 1.5; }
.field-grid { display: grid; gap: 22px; }
.field-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { min-width: 0; display: block; }
input, select, textarea { width: 100%; min-height: 51px; padding: 0 15px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; background: rgba(255,255,255,.025); color: white; transition: border-color .15s ease, background .15s ease; }
input::placeholder, textarea::placeholder { color: var(--ink-40); }
input:hover, select:hover, textarea:hover { border-color: rgba(255,255,255,.22); }
input:focus, select:focus, textarea:focus { border-color: var(--orange); background: rgba(255,255,255,.04); box-shadow: 0 0 0 3px rgba(250,122,53,.11); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
input:disabled { opacity: .45; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-60) 50%), linear-gradient(135deg, var(--ink-60) 50%, transparent 50%); background-position: calc(100% - 19px) 22px, calc(100% - 14px) 22px; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { min-height: 176px; padding: 14px 15px; resize: vertical; line-height: 1.55; }
textarea.short { min-height: 112px; }
.input-wrap { position: relative; }
.input-wrap > svg, .input-wrap > .icon, .input-wrap > strong { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-40); }
.input-wrap input { padding-left: 45px; }
.input-wrap.prefix strong { font-size: 15px; }
.compound-input { display: grid; grid-template-columns: 1fr 90px; }
.compound-input input { border-radius: 9px 0 0 9px; }
.compound-input select, .compound-input .unit-label { min-height: 51px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 9px 9px 0; background-color: rgba(255,255,255,.04); color: var(--ink-80); }
.weight-field { max-width: 380px; }
.revealed { max-width: 480px; margin-top: 16px; padding-left: 16px; border-left: 2px solid var(--orange-line); animation: reveal .18s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.field-error { display: flex; align-items: center; gap: 7px; margin: 8px 0 0; color: #ff9c9c; font-size: 12px; line-height: 1.4; }

.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stacked-options, .numbered-options { display: flex; flex-direction: column; gap: 9px; }
.option-card { width: 100%; min-height: 72px; display: grid; grid-template-columns: minmax(0,1fr) 26px; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); text-align: left; cursor: pointer; }
.option-card.has-icon { grid-template-columns: auto minmax(0,1fr) 26px; }
.option-card:hover { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.032); }
.option-card:has(input:checked) { border-color: var(--orange); background: linear-gradient(90deg, rgba(250,122,53,.13), rgba(250,122,53,.04)); }
.option-card__copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.option-card__copy strong { color: var(--ink-80); font-size: 14px; font-weight: 600; }
.option-card__copy span { color: var(--ink-60); font-size: 13px; line-height: 1.45; }
.option-card__mark { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; justify-self: end; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--orange-dark); }
.option-card:has(input:checked) .option-card__mark { border-color: var(--orange); background: var(--orange); }
.option-card__icon { color: var(--orange); }
.option-card__icon code { color: var(--ink-40); font: 500 11px/1 "IBM Plex Mono", monospace; }
.option-card.is-compact { min-height: 58px; }
.role-grid .option-card { grid-template-columns: 1fr 22px; min-height: 64px; }
.role-grid .option-card__copy strong { font-size: 16px; color: white; }
.role-grid .option-card__copy span { font-size: 12px; }
.choice-pills { display: flex; flex-wrap: wrap; gap: 9px; }
.choice-pills label { min-height: 44px; padding: 8px 15px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255,255,255,.02); color: var(--ink-60); font-size: 13px; cursor: pointer; }
.choice-pills label:hover { color: white; border-color: rgba(255,255,255,.23); }
.choice-pills label:has(input:checked) { border-color: var(--orange); background: var(--orange-soft); color: #ffb48a; }
.choice-pills--boards { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); }
.choice-pills--boards label { width: 100%; padding-inline: 8px; text-align: center; }
.choice-pills--frequency { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.choice-pills--frequency label { width: 100%; min-height: 54px; padding: 9px 12px; text-align: center; line-height: 1.3; }
.board-fields { align-items: start; }
.board-fields .field > span { min-height: 21px; }
.multi-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.multi-grid--three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.multi-grid label { min-height: 50px; display: flex; align-items: center; gap: 11px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.018); color: var(--ink-60); text-align: left; cursor: pointer; }
.multi-grid label:hover { color: var(--ink-80); border-color: rgba(255,255,255,.18); }
.multi-grid label:has(input:checked) { color: white; border-color: var(--orange-line); background: var(--orange-soft); }
.multi-check { width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 5px; }
.multi-grid label:has(input:checked) .multi-check { border-color: var(--orange); background: var(--orange); color: var(--orange-dark); }
.checkbox-row { display: flex; align-items: flex-start; gap: 11px; color: var(--ink-80); font-size: 13px; line-height: 1.5; cursor: pointer; }
.checkbox-row input { appearance: none; width: 20px; min-height: 20px; height: 20px; padding: 0; flex: 0 0 auto; border-radius: 5px; margin: 1px 0 0; }
.checkbox-row input:checked { border-color: var(--orange); background: var(--orange); box-shadow: inset 0 0 0 4px var(--orange), inset 0 0 0 6px var(--orange-dark); }
.checkbox-row.compact { margin-top: 8px; color: var(--ink-60); }
.checkbox-row span small { display: block; color: var(--ink-40); }
.question-copy { margin: -3px 0 17px; color: var(--ink-60); font-size: 13px; line-height: 1.5; }
.info-panel { display: flex; gap: 15px; padding: 20px; border: 1px solid rgba(74,107,255,.26); border-radius: 11px; background: rgba(74,107,255,.07); color: #b7c4ff; }
.info-panel > svg, .info-panel > .icon { flex: 0 0 auto; margin-top: 2px; }
.info-panel strong { color: white; font-size: 14px; }
.info-panel p { margin: 5px 0 0; color: var(--ink-60); font-size: 13px; line-height: 1.55; }
.segmented { width: fit-content; display: flex; margin-bottom: 16px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.02); }
.segmented label { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--ink-60); cursor: pointer; }
.segmented label:has(input:checked) { background: var(--orange); color: var(--orange-dark); font-weight: 600; }
.upload-zone { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 24px; border: 1px dashed rgba(255,255,255,.2); border-radius: 11px; background: rgba(255,255,255,.014); text-align: center; color: var(--ink-60); }
.upload-zone.is-dragging { border-color: var(--orange); background: var(--orange-soft); }
.upload-zone > svg, .upload-zone > .icon { color: var(--orange); }
.upload-zone strong { color: white; font-size: 14px; }
.upload-zone span { font: 400 11px/1.5 "IBM Plex Mono", monospace; }
.upload-zone .button { margin-top: 4px; }
.upload-state { min-height: 100px; display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.upload-state__icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 10px; background: var(--orange-soft); color: var(--orange); }
.upload-state__copy { min-width: 0; display: flex; flex-direction: column; flex: 1; gap: 4px; }
.upload-state__copy strong { overflow: hidden; color: var(--ink-80); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.upload-state__copy span { color: var(--ink-40); font-size: 12px; }
.upload-state > button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--ink-60); cursor: pointer; }
.upload-state.is-success { border-color: rgba(45,212,164,.25); }
.upload-state.is-success .upload-state__icon { color: var(--good); background: rgba(45,212,164,.09); }
.upload-state.is-error { border-color: rgba(255,107,107,.28); }
.upload-state.is-error .upload-state__icon { color: var(--bad); background: rgba(255,107,107,.09); }
.upload-progress { height: 4px; margin-top: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.upload-progress i { display: block; height: 100%; border-radius: inherit; background: var(--orange); transition: width .16s ease; }
.upload-state code { color: var(--orange); font: 500 10px/1 "IBM Plex Mono", monospace; }
.textarea-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.textarea-meta small { max-width: 620px; color: var(--ink-60); font-size: 12px; line-height: 1.5; }
.textarea-meta code { margin-top: 8px; color: var(--ink-40); font: 400 10px/1 "IBM Plex Mono", monospace; white-space: nowrap; }

.review-body { gap: 18px; }
.review-body .step-heading { margin-bottom: 22px; }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; align-items: start; }
.review-column { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.review-section { border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.review-section header { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); }
.review-section h3 { margin: 0; font-size: 14px; }
.review-section header a { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: #ffb48a; font-size: 12px; cursor: pointer; }
.review-section dl { margin: 0; padding: 7px 18px; }
.review-section dl > div { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.review-grid .review-section dl > div { grid-template-columns: 112px minmax(0,1fr); gap: 12px; }
.review-section dl > div:last-child { border-bottom: 0; }
.review-section dt { color: var(--ink-40); font-size: 12px; }
.review-section dd { margin: 0; color: var(--ink-80); font-size: 13px; line-height: 1.55; }
.consent-panel { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; padding: 21px; border: 1px solid var(--line-strong); border-radius: 11px; background: rgba(255,255,255,.025); }
.consent-panel a { color: #b7c4ff; }
.submission-error { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid rgba(255,107,107,.3); border-radius: 11px; background: rgba(255,107,107,.075); color: var(--bad); }
.submission-error > div { flex: 1; }
.submission-error strong { color: white; font-size: 14px; }
.submission-error p { margin: 4px 0 0; color: var(--ink-60); font-size: 12px; }

.form-actions { position: sticky; bottom: 0; z-index: 4; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px; margin-top: 48px; padding: 18px 0; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(8,18,43,0), #08122b 24%, #08122b); }
.save-exit { justify-self: center; border: 0; background: none; color: var(--ink-40); font-size: 13px; cursor: pointer; }
.save-exit:hover { color: var(--ink-80); }

footer { max-width: var(--page-max); min-height: 150px; margin: 0 auto; padding: 34px max(48px, calc((100% - 1260px)/2)); display: flex; align-items: center; gap: 24px; border-top: 1px solid var(--line); background: var(--navy-950); color: var(--ink-40); font-size: 12px; }
footer img { width: 54px; height: 48px; object-fit: contain; opacity: .75; }
footer p { flex: 1; }
footer a { text-decoration: none; }

.confirmation { min-height: 100vh; position: relative; overflow: hidden; background: var(--navy-900); }
.confirmation::before { content: ""; position: absolute; inset: 0; background: radial-gradient(800px 520px at 78% 10%, rgba(35,35,180,.14), transparent 65%); pointer-events: none; }
.confirmation__photo { position: absolute; inset: 0 0 auto 48%; height: 100%; overflow: hidden; }
.confirmation__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.confirmation__photo div { position: absolute; inset: 0; background: linear-gradient(90deg, #08122b 0, rgba(8,18,43,.75) 18%, rgba(8,18,43,.12) 64%), linear-gradient(180deg, rgba(8,18,43,.4), transparent 30%, #08122b 100%); }
.confirmation__brand { position: relative; z-index: 2; height: 108px; max-width: 1240px; margin: 0 auto; padding: 18px 34px; display: flex; align-items: flex-start; gap: 8px; }
.confirmation__brand img { width: 74px; height: 66px; object-fit: contain; }
.confirmation__brand span { margin-top: 22px; padding: 3px 7px; border: 1px solid var(--orange-line); border-radius: 5px; color: #ff9a64; font: 600 9px/1 "IBM Plex Mono", monospace; }
.confirmation__content { position: relative; z-index: 2; width: min(620px, 48%); max-width: 1240px; margin: 9vh auto 0; padding: 0 34px 70px; }
.confirmation__check { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; margin-bottom: 28px; border-radius: 999px; background: var(--orange); color: var(--orange-dark); }
.confirmation h1 { margin: 18px 0 23px; font-size: clamp(46px, 5vw, 72px); line-height: .98; letter-spacing: -.05em; font-weight: 500; }
.confirmation__content > p { max-width: 560px; margin: 0 0 14px; color: var(--ink-60); font-size: 16px; line-height: 1.65; }
.confirmation__content p strong { color: var(--ink-80); font-family: "IBM Plex Mono", monospace; font-size: 13px; }
.confirmation__line { margin: 32px 0; color: var(--ink-80); font-size: 18px; }
.confirmation__line em { color: var(--orange); }
.share-panel { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(8,18,43,.7); backdrop-filter: blur(10px); }
.share-panel > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.share-panel strong { font-size: 13px; }
.share-panel span { color: var(--ink-40); font-size: 12px; }
.share-panel > div:last-child { display: flex; gap: 8px; }
.share-panel .button { min-height: 42px; padding: 0 14px; }

@media (max-width: 1023px) {
  .hero { min-height: 700px; }
  .hero__image { object-position: 58% 55%; }
  .hero__panel { width: min(650px, 72%); }
  .beta-intro { grid-template-columns: 1fr; gap: 44px; padding-inline: 40px; }
  .application { grid-template-columns: 190px minmax(0,1fr); gap: 38px; padding-inline: 40px; }
  .role-grid { grid-template-columns: 1fr; }
  .role-grid .option-card { min-height: 70px; }
  .choice-pills--boards { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .multi-grid--three { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .confirmation__content { width: 58%; }
  .confirmation__photo { left: 55%; }
}

@media (max-width: 767px) {
  body { background: var(--navy-900); }
  .hero { min-height: max(820px, 100svh); width: 100%; }
  .hero__image { height: 53%; top: 94px; object-position: 59% 60%; }
  .hero__wash { background: linear-gradient(180deg, #08122b 0 94px, transparent 23%, rgba(8,18,43,.12) 43%, #08122b 62%, #08122b 100%); }
  .site-header { height: 94px; padding: 12px 20px; align-items: flex-start; background: var(--navy-900); }
  .brand img { width: 72px; height: 62px; }
  .brand span { margin-top: 17px; font-size: 8px; }
  .desktop-nav { display: none; }
  .menu-button { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin-top: 8px; border: 0; background: transparent; color: white; cursor: pointer; }
  .mobile-nav { position: absolute; z-index: 20; top: 82px; right: 14px; width: min(280px, calc(100vw - 28px)); display: none; flex-direction: column; gap: 2px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 12px; background: #0b1631; box-shadow: 0 18px 60px rgba(0,0,0,.35); }
  .mobile-nav a, .mobile-nav button { min-height: 48px; display: flex; align-items: center; padding: 0 14px; border: 0; border-radius: 8px; background: none; color: var(--ink-80); text-decoration: none; text-align: left; }
  .mobile-nav button { background: var(--orange); color: var(--orange-dark); font-weight: 600; }
  .hero__copy { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 20px 28px; color: white; }
  .hero__panel { width: 100%; padding: 20px 20px 19px; border-color: rgba(255,255,255,.13); border-radius: 12px; background: rgba(8,18,43,.76); box-shadow: 0 18px 54px rgba(2,8,22,.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .eyebrow { gap: 10px; margin-bottom: 15px; color: var(--ink-80); font-size: 10px; }
  .eyebrow i { background: rgba(255,255,255,.4); }
  .eyebrow code { color: var(--ink-60); }
  .hero h1 { color: white; font-size: clamp(42px, 12.5vw, 56px); line-height: .96; }
  .hero__lead { margin-top: 14px; color: white; font-size: 16px; }
  .hero__panel > p:not(.hero__lead):not(.hero__note) { max-width: 360px; color: var(--ink-80); font-size: 14px; line-height: 1.45; }
  .hero__cta { width: 100%; margin-top: 18px; }
  .hero__note { color: var(--ink-60); text-align: center; }
  .beta-intro { padding: 66px 20px 55px; gap: 38px; }
  .beta-intro h2 { font-size: 38px; }
  .beta-intro__statement > p { font-size: 15px; }
  .beta-intro__steps article { grid-template-columns: 42px 1fr; }
  .beta-intro__benefits { grid-template-columns: 1fr; }
  .beta-intro__benefits article { min-height: 0; }
  .beta-intro__facts { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; }
  .application { min-height: 760px; display: block; padding: 0 20px calc(116px + env(safe-area-inset-bottom)); border-top-color: var(--line); }
  .progress-rail { display: none; }
  .mobile-progress { position: sticky; top: 0; z-index: 5; width: auto; height: auto; overflow: visible; clip: auto; margin: 0 -20px 34px; padding: 17px 20px 13px; border-bottom: 1px solid var(--line); background: rgba(8,18,43,.94); backdrop-filter: blur(12px); }
  .mobile-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
  .mobile-progress code { color: var(--orange); font: 600 11px/1 "IBM Plex Mono", monospace; }
  .mobile-progress span { color: var(--ink-60); font: 500 10px/1 "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; }
  .mobile-progress__bar { height: 2px; overflow: hidden; background: rgba(255,255,255,.12); }
  .mobile-progress__bar i { display: block; height: 100%; background: var(--orange); transition: width .25s ease; }
  .step-heading { margin-bottom: 32px; }
  .step-heading h2 { font-size: 33px; }
  .step-heading p { font-size: 14px; }
  .step-body { gap: 29px; }
  .field-grid--two { grid-template-columns: 1fr; }
  .field-grid { gap: 20px; }
  .field input:not([type="checkbox"]), .field select { min-height: 54px; }
  .weight-field { max-width: none; }
  .role-grid { grid-template-columns: 1fr; }
  .role-grid .option-card { min-height: 68px; }
  .option-card { min-height: 76px; padding: 14px; }
  .option-card.is-compact { min-height: 60px; }
  .option-card__copy span { font-size: 12px; }
  .choice-pills { display: grid; grid-template-columns: 1fr; }
  .choice-pills label { min-height: 50px; border-radius: 9px; text-align: left; }
  .choice-pills--boards { grid-template-columns: 1fr; }
  .choice-pills--boards label { min-height: 50px; text-align: left; }
  .choice-pills--frequency { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .choice-pills--frequency label { min-height: 66px; text-align: center; }
  .multi-grid { grid-template-columns: 1fr; }
  .multi-grid label { min-height: 52px; }
  .segmented { width: 100%; }
  .segmented label { flex: 1; justify-content: center; padding-inline: 9px; font-size: 12px; }
  .upload-state { align-items: flex-start; flex-wrap: wrap; }
  .upload-state > button { margin-left: 55px; }
  .review-grid { grid-template-columns: 1fr; }
  .review-section dl > div, .review-grid .review-section dl > div { grid-template-columns: 1fr; gap: 4px; }
  .consent-panel { padding: 17px; }
  .submission-error { align-items: flex-start; flex-wrap: wrap; }
  .submission-error .button { width: 100%; }
  .form-actions { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; grid-template-columns: .8fr 1.2fr; gap: 10px; margin: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-strong); background: rgba(8,18,43,.97); backdrop-filter: blur(14px); }
  .application:not(.is-started) .form-actions { display: none; }
  .form-actions .button { min-height: 50px; padding-inline: 16px; }
  .save-exit { display: none; }
  footer { min-height: 130px; padding: 28px 20px; }
  footer p { font-size: 10px; }
  .confirmation { display: flex; flex-direction: column; min-height: 100dvh; }
  .confirmation__photo { position: relative; inset: auto; order: 1; height: 31vh; min-height: 240px; }
  .confirmation__photo img { object-position: 58% 55%; }
  .confirmation__photo div { background: linear-gradient(180deg, transparent 45%, #08122b 100%); }
  .confirmation__brand { position: absolute; top: 0; left: 0; right: 0; z-index: 3; height: 96px; padding: 12px 20px; background: linear-gradient(180deg, rgba(8,18,43,.96), rgba(8,18,43,.5) 68%, transparent); }
  .confirmation__brand img { width: 58px; height: 55px; }
  .confirmation__brand span { margin-top: 18px; }
  .confirmation__content { order: 2; width: 100%; margin: -34px 0 0; padding: 0 20px 52px; }
  .confirmation__check { width: 52px; height: 52px; margin-bottom: 24px; }
  .confirmation h1 { font-size: 44px; }
  .confirmation__content > p { font-size: 14px; }
  .share-panel { align-items: stretch; flex-direction: column; }
  .share-panel > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .share-panel .button { width: 100%; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 42px; }
  .hero__copy { padding-inline: 17px; }
  .application { padding-inline: 17px; }
  .mobile-progress { margin-inline: -17px; padding-inline: 17px; }
  .form-actions .button { padding-inline: 12px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* ---- Server-rendered adaptation layer ---- */

/* Real inputs drive selection state; keep them present for forms and
   assistive tech but visually absorbed by their styled label. */
.choice-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.option-card, .choice-pills label, .multi-grid label, .segmented label { position: relative; }
.option-card:has(input:focus-visible),
.choice-pills label:has(input:focus-visible),
.multi-grid label:has(input:focus-visible),
.segmented label:has(input:focus-visible) { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 10px; }

/* Option cards are labels now; keep the button-era box model. */
.option-card { cursor: pointer; }

/* No-JS conditional reveals: the revealed field renders in the HTML
   and shows only while its trigger option is checked. */
.reveal-on-check { display: none; }
.question-group:has(input[data-reveals]:checked) .reveal-on-check,
.field:has(input[data-reveals]:checked) .reveal-on-check { display: block; }

/* Volume entry visually yields while "I don't know" is ticked (the
   server treats a ticked box as authoritative regardless). */
.field:has(input[name="volume_unknown"]:checked) input[name="board_volume"] { opacity: .35; }

/* Segmented video-method switch: radios toggle which panel shows. */
.video-method-panel { display: none; }
.video-question:has(input[value="link"]:checked) .video-method-panel--link { display: block; }
.video-question:has(input[value="upload"]:checked) .video-method-panel--upload { display: block; }

/* Native file input inside the upload zone (enhanced to hidden by JS). */
.upload-zone input[type="file"] { color: var(--ink-60); font-size: 13px; max-width: 100%; }

/* Mobile menu without JS: hidden checkbox drives the drawer. */
.menu-toggle-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 767px) {
  .site-header:has(.menu-toggle-input:checked) .mobile-nav { display: flex; }
  .menu-button .icon-close, .site-header:has(.menu-toggle-input:checked) .menu-button .icon-open { display: none; }
  .site-header:has(.menu-toggle-input:checked) .menu-button .icon-close { display: inline-flex; }
}

/* Inline SVG icon sizing (ported phosphor glyphs). */
.icon { display: inline-flex; flex: 0 0 auto; }
.icon svg { display: block; }

/* Hero picture element fills like the old img. */
.hero__image picture, .hero__image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 53%; }

/* Step error summary shown after a failed POST (server re-render). */
.step-alert { display: flex; gap: 12px; margin-bottom: 22px; padding: 14px 16px; border: 1px solid rgba(255,107,107,.4); border-radius: 10px; background: rgba(255,107,107,.08); color: var(--ink-80); font-size: 13px; }
.step-alert svg, .step-alert .icon { color: var(--bad); flex: 0 0 auto; margin-top: 1px; }

/* Character counter (enhanced live by JS; server renders the count). */
.textarea-meta code { font-family: "IBM Plex Mono", monospace; }

/* Legal / placeholder pages. */
.legal-page { max-width: 720px; margin: 0 auto; padding: 48px 24px 96px; }
.legal-page h1 { margin: 10px 0 6px; font-size: 30px; letter-spacing: -0.01em; }
.legal-page h2 { margin: 30px 0 8px; font-size: 17px; }
.legal-page p { color: var(--ink-80); font-size: 14px; line-height: 1.65; }
.legal-page .muted { color: var(--ink-60); }

/* Share panel URL fallback (buttons are revealed by JS). */
.share-panel__url { color: var(--ink-80); font-family: "IBM Plex Mono", monospace; font-size: 12px; }

/* Mobile nav apply link keeps the prototype's button styling. */
.mobile-nav .mobile-nav__apply { background: var(--orange); color: var(--orange-dark); font-weight: 600; }

/* Birth field: the compound pairing reversed — select (month) on the
   left, year input on the right — joined as one control. */
.compound-input--birth { grid-template-columns: 1fr 108px; }
.compound-input--birth select { display: block; padding: 0 15px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 9px 0 0 9px; background-color: rgba(255,255,255,.025); color: white; }
.compound-input--birth select:hover { border-color: rgba(255,255,255,.22); }
.compound-input--birth select:has(option[value=""]:checked) { color: var(--ink-40); }
.compound-input--birth input { border-radius: 0 9px 9px 0; }


/* Five-up variant of the role card grid (gender): same option-card
   language, tighter columns, stacking with the same breakpoints. */
.role-grid--five { grid-template-columns: repeat(5, 1fr); }
.role-grid--five .option-card { grid-template-columns: 1fr 22px; min-height: 64px; padding-inline: 14px; }
.role-grid--five .option-card__copy strong { font-size: 14px; }
@media (max-width: 1023px) {
  .role-grid--five { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .role-grid--five { grid-template-columns: 1fr; }
}

/* Selection marks only appear when selected — the prototype rendered
   the glyph conditionally; server markup keeps it in the DOM. */
.option-card__mark .icon, .multi-check .icon { visibility: hidden; }
.option-card:has(input:checked) .option-card__mark .icon,
.multi-grid label:has(input:checked) .multi-check .icon { visibility: visible; }
