/* =========================================================
   Headache Quiz — Health First Chiropractic
   Visual system extends hf-a1-video (Clinical Precision)
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ol, ul, fieldset, legend { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; cursor: pointer; }

:root {
  --bg-midnight: #0B1220;
  --bg-elevated: #131B2E;
  --bg-elevated-2: #1A2238;
  --precision-blue: #2D6BFF;
  --precision-blue-hover: #4A82FF;
  --scan-cyan: #4FD1E0;
  --credential-gold: #C9A961;
  --warn-amber: #E5A05A;
  --emergency-red: #E0495C;
  --ink: #0F172A;
  --muted: #64748B;
  --light: #F5F6F8;
  --white: #ffffff;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --container: 880px;
  --radius: 10px;
  --radius-lg: 18px;

  --shadow-lg: 0 30px 60px -20px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-card: 0 16px 40px -16px rgba(0,0,0,0.55);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg-midnight);
  color: var(--light);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Subtle background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(45,107,255,0.10), transparent 70%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(79,209,224,0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Type */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--white);
}
h1 { font-size: clamp(2rem, 4.8vw, 3.6rem); font-weight: 350; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 400; }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); font-weight: 450; }
h4 { font-size: 1.1rem; font-weight: 500; font-family: var(--font-body); letter-spacing: -0.01em; }
p { color: rgba(245,246,248,0.78); max-width: 64ch; }
.lead { font-size: 1.15rem; color: rgba(245,246,248,0.88); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--scan-cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: var(--scan-cyan);
  display: inline-block;
}

.mono { font-family: var(--font-mono); }
::selection { background: var(--precision-blue); color: #fff; }
:focus-visible { outline: 2px solid var(--scan-cyan); outline-offset: 3px; border-radius: 4px; }

/* =========================================================
   Layout
   ========================================================= */

.shell {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 6rem;
}

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.brandbar__logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--light);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 450;
  letter-spacing: -0.005em;
}
.brandbar__logo .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--scan-cyan);
  box-shadow: 0 0 12px var(--scan-cyan);
}
.brandbar__phone {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: rgba(245,246,248,0.7);
  letter-spacing: 0.02em;
}
.brandbar__phone:hover { color: var(--scan-cyan); }
@media (max-width: 540px) {
  .brandbar { margin-bottom: 2rem; padding-bottom: 1.5rem; }
  .brandbar__phone { font-size: 0.78rem; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.05rem 1.7rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.97rem;
  letter-spacing: -0.005em;
  transition: transform 0.25s cubic-bezier(.2,.7,.2,1), background 0.25s, box-shadow 0.25s, border-color 0.25s, color 0.25s, opacity 0.2s;
  white-space: nowrap;
  cursor: pointer;
  line-height: 1;
  text-align: center;
}
.btn--primary {
  background: var(--precision-blue);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(45,107,255,0.7), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn--primary:hover { background: var(--precision-blue-hover); transform: translateY(-2px); box-shadow: 0 20px 40px -10px rgba(45,107,255,0.8); }
.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border-strong);
}
.btn--ghost:hover { border-color: var(--scan-cyan); color: var(--scan-cyan); }
.btn--emergency {
  background: var(--emergency-red);
  color: #fff;
  box-shadow: 0 10px 30px -10px rgba(224,73,92,0.7), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn--emergency:hover { background: #EF6072; transform: translateY(-2px); }
.btn[disabled] { opacity: 0.42; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 16px; height: 16px; }
.btn--full { width: 100%; }
.btn--sm { padding: 0.7rem 1.2rem; font-size: 0.85rem; }

/* =========================================================
   Stage system — each "screen" is a stage
   ========================================================= */
.stage {
  display: none;
  animation: stageIn 0.4s cubic-bezier(.2,.7,.2,1) both;
}
.stage.is-active { display: block; }
@keyframes stageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   Intro stage
   ========================================================= */
.intro {
  text-align: center;
  padding: 1rem 0 3rem;
}
.intro__eyebrow {
  margin-bottom: 1.5rem;
  justify-content: center;
}
.intro h1 {
  max-width: 18ch;
  margin: 0 auto 1.5rem;
}
.intro h1 em {
  font-style: italic;
  color: var(--scan-cyan);
}
.intro__sub {
  font-size: 1.1rem;
  color: rgba(245,246,248,0.85);
  max-width: 56ch;
  margin: 0 auto 2.5rem;
}
.intro__cta {
  margin: 0 auto 3rem;
}
.intro__meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.intro__meta-row {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.intro__meta-row::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--scan-cyan);
  box-shadow: 0 0 8px var(--scan-cyan);
}

.intro__disclaimer {
  margin-top: 3rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
  font-size: 0.85rem;
  color: rgba(245,246,248,0.6);
  text-align: left;
  line-height: 1.55;
}
.intro__disclaimer strong { color: rgba(245,246,248,0.85); font-weight: 500; }

/* =========================================================
   Progress
   ========================================================= */
.progress {
  margin-bottom: 2.5rem;
}
.progress__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.progress__meta strong { color: var(--scan-cyan); font-weight: 500; }
.progress__bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
}
.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--precision-blue), var(--scan-cyan));
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 12px rgba(79,209,224,0.4);
}

/* =========================================================
   Question stage
   ========================================================= */
.q {
  padding: 0.5rem 0 2rem;
}
.q__head {
  margin-bottom: 2rem;
}
.q__stem {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  font-weight: 400;
  line-height: 1.18;
  color: var(--white);
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}
.q__help {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

/* Choices */
.choices {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 2rem;
}
.choice {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
  text-align: left;
  width: 100%;
  color: var(--light);
  font-size: 1rem;
  line-height: 1.45;
}
.choice:hover {
  border-color: rgba(79,209,224,0.4);
  background: var(--bg-elevated-2);
  transform: translateX(2px);
}
.choice__indicator {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s;
}
.choice--multi .choice__indicator {
  border-radius: 6px;
}
.choice__indicator::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: var(--scan-cyan);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 0 10px var(--scan-cyan);
}
.choice--multi .choice__indicator::after {
  inset: 0;
  background: var(--scan-cyan);
  border-radius: 6px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230B1220' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='3,8.5 6.5,12 13,4.5'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
}
.choice.is-selected {
  border-color: var(--scan-cyan);
  background: linear-gradient(180deg, rgba(79,209,224,0.10), rgba(79,209,224,0.04));
}
.choice.is-selected .choice__indicator {
  border-color: var(--scan-cyan);
}
.choice.is-selected .choice__indicator::after {
  transform: scale(1);
}
.choice__label {
  flex: 1;
  font-weight: 400;
}
.choice__hotkey {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
}
.choice.is-selected .choice__hotkey {
  color: var(--scan-cyan);
  border-color: rgba(79,209,224,0.4);
}

@media (max-width: 540px) {
  .choice { padding: 0.95rem 1.05rem; gap: 0.8rem; font-size: 0.96rem; }
  .choice__hotkey { display: none; }
}

/* Multi-select hint */
.multi-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.multi-hint__count strong { color: var(--scan-cyan); }

/* Question nav */
.q__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
}
.q__nav .btn { min-width: 120px; }
.q__back {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  cursor: pointer;
  padding: 0.6rem 0;
  transition: color 0.2s;
}
.q__back:hover { color: var(--scan-cyan); }
.q__back:disabled { opacity: 0.3; cursor: not-allowed; }

/* =========================================================
   Result stage
   ========================================================= */
.result {
  padding: 0.5rem 0;
}
.result__hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 2.5rem 2.25rem;
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(45,107,255,0.20), transparent 60%),
    var(--bg-elevated);
}
.result__hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79,209,224,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,209,224,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 100% 0%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, black 30%, transparent 80%);
}
.result__hero > * { position: relative; z-index: 1; }
.result__tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid;
  margin-bottom: 1.25rem;
}
.result__tier-badge .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  position: relative;
}
.result__tier-badge .pulse::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.6); opacity: 0; }
}

.result__hero h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 400;
  margin-bottom: 1rem;
  max-width: 22ch;
  line-height: 1.18;
}
.result__hero h1 em { font-style: italic; }
.result__hero .lead {
  max-width: 56ch;
}

/* Tier variants */
.result__hero[data-tier="emergency"] {
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(224,73,92,0.30), transparent 60%),
    var(--bg-elevated);
}
.result__hero[data-tier="emergency"] .result__tier-badge {
  color: var(--emergency-red);
  border-color: rgba(224,73,92,0.5);
  background: rgba(224,73,92,0.08);
}
.result__hero[data-tier="emergency"] .result__tier-badge .pulse {
  background: var(--emergency-red);
  box-shadow: 0 0 10px var(--emergency-red);
}
.result__hero[data-tier="emergency"] h1 em { color: var(--emergency-red); }

.result__hero[data-tier="see_doctor_first"] {
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(229,160,90,0.20), transparent 60%),
    var(--bg-elevated);
}
.result__hero[data-tier="see_doctor_first"] .result__tier-badge {
  color: var(--warn-amber);
  border-color: rgba(229,160,90,0.45);
  background: rgba(229,160,90,0.08);
}
.result__hero[data-tier="see_doctor_first"] .result__tier-badge .pulse {
  background: var(--warn-amber);
  box-shadow: 0 0 10px var(--warn-amber);
}
.result__hero[data-tier="see_doctor_first"] h1 em { color: var(--warn-amber); }

.result__hero[data-tier="strong_fit"] .result__tier-badge {
  color: var(--scan-cyan);
  border-color: rgba(79,209,224,0.45);
  background: rgba(79,209,224,0.08);
}
.result__hero[data-tier="strong_fit"] .result__tier-badge .pulse {
  background: var(--scan-cyan);
  box-shadow: 0 0 10px var(--scan-cyan);
}
.result__hero[data-tier="strong_fit"] h1 em { color: var(--scan-cyan); }

.result__hero[data-tier="possible_fit"] .result__tier-badge {
  color: var(--precision-blue);
  border-color: rgba(45,107,255,0.45);
  background: rgba(45,107,255,0.08);
}
.result__hero[data-tier="possible_fit"] .result__tier-badge .pulse {
  background: var(--precision-blue);
  box-shadow: 0 0 10px var(--precision-blue);
}
.result__hero[data-tier="possible_fit"] h1 em { color: var(--precision-blue); }

/* Result CTA row */
.result__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
@media (max-width: 540px) {
  .result__ctas { flex-direction: column; }
  .result__ctas .btn { width: 100%; }
}

/* Indicator card (your symptoms most resemble X) */
.indicator {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.5rem;
  margin-bottom: 1.5rem;
}
/* When indicator leads (top of result page), make it more prominent */
.indicator--lead {
  padding: 2.5rem 2.5rem 2rem;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(79,209,224,0.10), transparent 60%),
    var(--bg-elevated);
  position: relative;
  overflow: hidden;
}
.indicator--lead::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79,209,224,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,209,224,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at 100% 0%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 100% 0%, black 30%, transparent 80%);
}
.indicator--lead > * { position: relative; z-index: 1; }
.indicator__type--lead {
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 350;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
@media (max-width: 540px) {
  .indicator--lead { padding: 1.75rem 1.5rem 1.5rem; }
}
.indicator__eyebrow {
  margin-bottom: 0.75rem;
}
.indicator__type {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.indicator__secondary {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.indicator__secondary strong { color: rgba(245,246,248,0.85); font-weight: 500; }
.indicator__summary {
  color: rgba(245,246,248,0.85);
  margin-bottom: 1rem;
  max-width: none;
}
.indicator__what-to-know {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
  font-size: 0.95rem;
}
.indicator__what-to-know strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--scan-cyan);
  margin-bottom: 0.7rem;
  font-weight: 500;
}

/* Modifier flags (med overuse, chronic, etc.) */
.flags {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}
.flag {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  background: rgba(229,160,90,0.06);
  border: 1px solid rgba(229,160,90,0.25);
  border-radius: var(--radius);
}
.flag__icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(229,160,90,0.15);
  border: 1px solid rgba(229,160,90,0.4);
  color: var(--warn-amber);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 1px;
}
.flag__content { flex: 1; font-size: 0.95rem; line-height: 1.55; }
.flag__content strong { color: var(--white); font-weight: 500; display: block; margin-bottom: 0.2rem; }

/* =========================================================
   Recommended next steps card
   ========================================================= */
.recs {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.recs__head {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.recs__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 400;
  color: var(--white);
  margin: 0.6rem 0 0.6rem;
  letter-spacing: -0.01em;
}
.recs__intro {
  font-size: 0.97rem;
  line-height: 1.6;
  color: rgba(245,246,248,0.78);
  max-width: none;
}
.recs__list {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

/* Each option (medical or chiro) */
.rec-option {
  background: rgba(255,255,255,0.018);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  position: relative;
  transition: border-color 0.25s, background 0.25s;
}
.rec-option--primary {
  border-color: rgba(79,209,224,0.35);
  background:
    radial-gradient(ellipse 80% 100% at 0% 0%, rgba(79,209,224,0.08), transparent 60%),
    var(--bg-elevated);
}
.rec-option--secondary {
  background: rgba(255,255,255,0.012);
}
.rec-option--secondary:hover { border-color: var(--border-strong); }

.rec-option__head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}
.rec-option__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: rgba(245,246,248,0.72);
}
.rec-option--primary .rec-option__icon {
  background: rgba(79,209,224,0.15);
  border-color: rgba(79,209,224,0.4);
  color: var(--scan-cyan);
}
.rec-option__head-text { flex: 1; min-width: 0; }
.rec-option__role {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
.rec-option--primary .rec-option__role {
  color: var(--scan-cyan);
}
.rec-option__label {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  font-weight: 450;
  color: var(--white);
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.rec-option__reason {
  color: rgba(245,246,248,0.8);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  max-width: none;
}
.rec-option__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.rec-option__ctas .btn--inline {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
}
@media (max-width: 540px) {
  .rec-option { padding: 1.25rem 1.25rem; }
  .rec-option__ctas { flex-direction: column; align-items: stretch; }
  .rec-option__ctas .btn { width: 100%; }
}

/* =========================================================
   Email gate (on result page)
   ========================================================= */
.gate {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}
.gate::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--scan-cyan), transparent);
  opacity: 0.5;
}
.gate__eyebrow {
  margin-bottom: 0.85rem;
}
.gate__title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 400;
  margin-bottom: 0.6rem;
  color: var(--white);
  letter-spacing: -0.01em;
}
.gate__sub {
  margin-bottom: 1.5rem;
  font-size: 0.97rem;
}
.gate__perks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 540px) { .gate__perks { grid-template-columns: 1fr; } }
.gate__perk {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: rgba(245,246,248,0.85);
  background: rgba(255,255,255,0.015);
}
.gate__perk::before {
  content: "✓";
  color: var(--scan-cyan);
  font-weight: 600;
  flex-shrink: 0;
  text-shadow: 0 0 8px rgba(79,209,224,0.5);
}

/* Form */
.form {
  display: grid;
  gap: 1rem;
}
.form__row {
  display: grid;
  gap: 0.4rem;
}
.form__row--double {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 540px) { .form__row--double { grid-template-columns: 1fr; gap: 1rem; } }
.form label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.form input, .form select {
  width: 100%;
  background: var(--bg-midnight);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--white);
  font-size: 0.97rem;
  transition: border-color 0.2s, background 0.2s;
}
.form input:hover, .form select:hover { border-color: var(--border-strong); }
.form input:focus, .form select:focus {
  outline: none;
  border-color: var(--scan-cyan);
  background: var(--bg-elevated-2);
}
.form input::placeholder { color: rgba(245,246,248,0.32); }
.form__error {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--emergency-red);
  margin-top: 0.4rem;
  display: none;
}
.form__error.is-visible { display: block; }
.form__submit {
  margin-top: 0.5rem;
}
.form__legal {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.4rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.form__check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(245,246,248,0.7);
  cursor: pointer;
}
.form__check input {
  width: 18px;
  height: 18px;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--precision-blue);
  cursor: pointer;
}

/* Lead-gate variant (gate shown in place of the locked result) */
.gate--lead { padding: 2.25rem; }
@media (max-width: 540px) { .gate--lead { padding: 1.5rem; } }
.gate__title--lead {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  font-weight: 350;
  line-height: 1.1;
}

/* =========================================================
   Prep sheet (post-unlock)
   ========================================================= */
.prep {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  animation: stageIn 0.5s cubic-bezier(.2,.7,.2,1) both;
}
.prep__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 540px) {
  .prep__head { flex-direction: column; }
}
.prep__title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.85rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}
.prep__sub {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.prep__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.prep__action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.prep__action:hover { border-color: var(--scan-cyan); color: var(--scan-cyan); }

.prep__group {
  margin-bottom: 1.75rem;
}
.prep__group:last-child { margin-bottom: 0; }
.prep__group-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--scan-cyan);
  margin-bottom: 0.85rem;
  font-weight: 500;
}
.prep__list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.prep__bullet {
  position: relative;
  padding-left: 1.75rem;
  color: rgba(245,246,248,0.88);
  font-size: 0.97rem;
  line-height: 1.55;
  max-width: none;
}
.prep__bullet::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55rem;
  width: 1rem; height: 1px;
  background: var(--scan-cyan);
  opacity: 0.7;
}
.prep__bullet strong {
  color: var(--white);
  font-weight: 500;
}

/* Tracker callout (separate card after prep sheet) */
.tracker-card {
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-elevated-2));
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
@media (max-width: 540px) {
  .tracker-card { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
}
.tracker-card__icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: rgba(79,209,224,0.1);
  border: 1px solid rgba(79,209,224,0.3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.tracker-card__icon svg { width: 28px; height: 28px; color: var(--scan-cyan); }
.tracker-card__content { flex: 1; }
.tracker-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 0.3rem;
  letter-spacing: -0.005em;
}
.tracker-card__sub {
  font-size: 0.92rem;
  color: rgba(245,246,248,0.72);
  margin-bottom: 0;
}

/* Final booking CTA on result */
.book-cta {
  background:
    radial-gradient(ellipse at center, rgba(45,107,255,0.30), transparent 65%),
    var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.book-cta h3 {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  margin-bottom: 0.85rem;
  max-width: 22ch;
  margin-left: auto; margin-right: auto;
}
.book-cta p { margin: 0 auto 1.75rem; }
.book-cta__credentials {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.book-cta__credentials span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.book-cta__credentials span::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--credential-gold);
  box-shadow: 0 0 8px var(--credential-gold);
}

/* =========================================================
   Soft-nav (after emergency tier — option to continue or restart)
   ========================================================= */
.soft-nav {
  margin: 1rem 0 1.5rem;
}
.soft-nav__divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.soft-nav__divider::before,
.soft-nav__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.soft-nav__divider span {
  padding: 0 1rem;
}
.soft-nav__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
@media (max-width: 540px) {
  .soft-nav__actions { flex-direction: column; }
  .soft-nav__actions .btn { width: 100%; }
}

/* =========================================================
   Disclaimer footer
   ========================================================= */
.disclaimer-footer {
  margin-top: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.015);
  font-size: 0.84rem;
  color: rgba(245,246,248,0.55);
  line-height: 1.55;
  text-align: left;
}
.disclaimer-footer strong { color: rgba(245,246,248,0.78); font-weight: 500; }
.disclaimer-footer a { color: var(--scan-cyan); text-decoration: underline; text-underline-offset: 2px; }

/* =========================================================
   Loading / submit state
   ========================================================= */
.is-loading {
  pointer-events: none;
  opacity: 0.7;
}
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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