/* ═══════════════════════════════════
   NEURODIVERGENT SCREENER
   Design tokens inherited from Refract 23.
   Screener-specific components below the base layer.
═══════════════════════════════════ */

:root {
  --white: #ffffff;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1c1917;
  --text-2: #292524;
  --text-3: #44403c;
  --text-muted: #57534e;
  --border: #e7e5e4;
  --fill-light: #f5f4f1;
  --fill-hover: #eae8e4;

  /* ── 8 Dimension colours ── */
  /* Autism         teal   */
  --autism:         #2a9490; --autism-deep:  #1d6b68;
  --autism-soft:    #d6f0ef; --autism-card:  #7ed4d0;

  /* ADHD-I         blue   */
  --adhd-i:         #3a8fb0; --adhd-i-deep:  #256480;
  --adhd-i-soft:    #d8edf6; --adhd-i-card:  #7ccce8;

  /* ADHD-H         orange */
  --adhd-h:         #c86830; --adhd-h-deep:  #8c4420;
  --adhd-h-soft:    #fae5d6; --adhd-h-card:  #f0a878;

  /* Dyslexia       purple */
  --dyslexia:       #7b54a0; --dyslexia-deep: #5a3878;
  --dyslexia-soft:  #ede4f7; --dyslexia-card: #c8a0e0;

  /* Dyspraxia      green  */
  --dyspraxia:      #2a9668; --dyspraxia-deep: #1d6e4a;
  --dyspraxia-soft: #ddf4eb; --dyspraxia-card: #7ed4ac;

  /* Dyscalculia    amber  */
  --dyscalculia:       #c49020; --dyscalculia-deep: #7a5c10;
  --dyscalculia-soft:  #fdf3d4; --dyscalculia-card: #f5cc3c;

  /* Sensory        rose   */
  --sensory:        #b04870; --sensory-deep:  #7a2e50;
  --sensory-soft:   #f7dde8; --sensory-card:  #e090b4;

  /* OCD            slate  */
  --ocd:            #4a6480; --ocd-deep:      #304458;
  --ocd-soft:       #d8e4f0; --ocd-card:      #8ab0cc;

  /* Layout */
  --max-w: 660px;
  --max-w-wide: 960px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-full: 100px;
  --shadow-sm: 0 1px 4px rgba(28,25,23,.05);
  --shadow-md: 0 6px 20px rgba(28,25,23,.08);
  --shadow-lg: 0 16px 48px rgba(28,25,23,.13);
  --font: 'Fira Sans', -apple-system, sans-serif;
}

/* RESET */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); font-weight: 400; font-size: 1.05rem;
  line-height: 1.6; color: var(--text); background: var(--bg); min-height: 100vh; }

/* ═══ NAVBAR ═══ */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,246,243,.9); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px; height: 60px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; cursor: pointer;
  background: none; border: none; font-family: inherit; padding: 0;
  transition: opacity .15s;
}
.navbar-brand:hover { opacity: .7; }
.brand-name { font-weight: 700; font-size: 1.1rem; color: var(--text); letter-spacing: -.02em; }
.brand-tagline { font-size: .82rem; color: var(--text-muted); font-weight: 400; }

/* ═══ BUTTONS ═══ */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text); border: none; border-radius: var(--radius-full);
  color: var(--white); font-family: var(--font); font-weight: 600;
  font-size: 1.05rem; padding: 16px 36px; cursor: pointer;
  transition: background .15s, transform .1s, box-shadow .2s;
  text-decoration: none;
}
.btn-primary:hover { background: var(--text-2); box-shadow: 0 6px 20px rgba(28,25,23,.18); }
.btn-primary:active { transform: scale(.97); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 1.5px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-2);
  font-family: var(--font); font-weight: 600; font-size: 1rem;
  padding: 14px 32px; cursor: pointer;
  transition: border-color .15s, color .15s; text-decoration: none;
}
.btn-secondary:hover { border-color: var(--text); color: var(--text); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; color: var(--text-muted);
  font-family: var(--font); font-size: .9rem; font-weight: 500;
  cursor: pointer; padding: 8px 0; transition: color .13s;
}
.btn-ghost:hover { color: var(--text); }

/* ═══════════════════════════════════
   LANDING PAGE
═══════════════════════════════════ */
.landing-hero {
  max-width: var(--max-w); margin: 0 auto;
  padding: 72px 24px 48px; text-align: center;
}
.landing-hero h1 {
  font-weight: 900; font-size: 3rem; line-height: 1.08;
  letter-spacing: -.04em; color: var(--text); margin-bottom: 16px;
}
.landing-hero p {
  font-size: 1.15rem; color: var(--text-3); line-height: 1.65;
  max-width: 480px; margin: 0 auto 36px;
}
.disclaimer-inline {
  font-size: .82rem; color: var(--text-muted); margin-top: 18px;
  line-height: 1.5; max-width: 400px; margin-left: auto; margin-right: auto;
}

/* Door cards */
.doors-wrap {
  max-width: var(--max-w-wide); margin: 0 auto;
  padding: 0 20px 64px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media(max-width: 660px) { .doors-wrap { grid-template-columns: 1fr; } }

.door-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px 32px;
  cursor: pointer; transition: box-shadow .2s, transform .2s;
  text-align: left; position: relative; overflow: hidden;
}
.door-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.door-card.door-recommended { border-color: var(--text); }

.door-badge {
  display: inline-block; font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--text); color: var(--white);
  border-radius: var(--radius-full); padding: 4px 12px;
  margin-bottom: 16px;
}
.door-card:not(.door-recommended) .door-badge {
  background: var(--fill-light); color: var(--text-muted);
}
.door-number {
  font-weight: 900; font-size: 3.5rem; line-height: 1;
  letter-spacing: -.05em; color: var(--border);
  position: absolute; top: 24px; right: 28px;
}
.door-card h2 {
  font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em;
  color: var(--text); margin-bottom: 10px;
}
.door-card p {
  font-size: .95rem; color: var(--text-3); line-height: 1.6; margin-bottom: 24px;
}
.door-meta {
  font-size: .78rem; font-weight: 500; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.door-meta-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border); }

/* Dimension picker (Door 1) */
.dim-picker-wrap {
  max-width: var(--max-w-wide); margin: 0 auto;
  padding: 0 20px 64px;
}
.dim-picker-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 8px;
}
.dim-picker-header h2 {
  font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em;
}
.dim-picker-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin-bottom: 28px;
}
@media(max-width: 580px) { .dim-picker-grid { grid-template-columns: 1fr; } }

.dim-pick-card {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius-md); padding: 18px 18px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
  text-align: left;
}
.dim-pick-card:hover { box-shadow: var(--shadow-sm); }
.dim-pick-card.selected { border-color: var(--dim-color, var(--text)); background: var(--dim-soft, var(--fill-light)); }

.dim-pick-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--dim-color, var(--text-muted));
  flex-shrink: 0; margin-top: 4px;
}
.dim-pick-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--dim-color, var(--border));
  flex-shrink: 0; margin-top: 2px; display: flex;
  align-items: center; justify-content: center;
  transition: background .12s, border-color .12s;
}
.dim-pick-card.selected .dim-pick-check {
  background: var(--dim-color, var(--text)); border-color: var(--dim-color, var(--text));
}
.dim-pick-check svg { opacity: 0; transition: opacity .1s; }
.dim-pick-card.selected .dim-pick-check svg { opacity: 1; }

.dim-pick-text {}
.dim-pick-name {
  font-weight: 700; font-size: 1rem; color: var(--text);
  margin-bottom: 3px; letter-spacing: -.01em;
}
.dim-pick-desc { font-size: .86rem; color: var(--text-3); line-height: 1.5; }
.dim-pick-expand {
  font-size: .78rem; font-weight: 500; color: var(--text-muted);
  background: none; border: none; cursor: pointer; font-family: inherit;
  padding: 4px 0 0; text-decoration: underline; text-underline-offset: 2px;
}
.dim-pick-expand-body {
  font-size: .88rem; color: var(--text-3); line-height: 1.65;
  padding: 12px 0 4px; max-height: 0; overflow: hidden;
  transition: max-height .3s ease, padding .2s;
}
.dim-pick-expand-body.open { max-height: 400px; padding: 12px 0 4px; }

.door1-start-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.selected-count {
  font-size: .88rem; color: var(--text-muted); font-weight: 500;
}

/* ═══════════════════════════════════
   SCREENER / QUIZ ENGINE
═══════════════════════════════════ */

/* Screen container — only active screen shown */
.screen { display: none; }
.screen.active { display: block; }

/* ── Progress bar ── */
.progress-section {
  max-width: var(--max-w); margin: 0 auto; padding: 32px 24px 20px;
}
.progress-top-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.progress-dim-tag {
  font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 6px;
}
.progress-dim-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dim-color, var(--text-muted)); flex-shrink: 0;
}
.progress-counts {
  font-size: .78rem; font-weight: 500; color: var(--text-muted);
  display: flex; gap: 12px;
}
.progress-track-wrap { position: relative; height: 5px; margin-bottom: 8px; }
.progress-track {
  height: 5px; background: var(--border);
  border-radius: var(--radius-full); overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--text);
  border-radius: var(--radius-full);
  transition: width .35s ease; width: 0%;
}
.progress-fill.dim-colored { background: var(--dim-color, var(--text)); }

/* Timeframe tag */
.timeframe-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 500; color: var(--text-muted);
  background: var(--fill-light); border-radius: var(--radius-full);
  padding: 4px 12px; margin-top: 2px;
}
.timeframe-tag svg { flex-shrink: 0; }

/* ── Question card ── */
.question-wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.question-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 40px 44px 36px; box-shadow: var(--shadow-md);
}
@media(max-width: 520px) { .question-card { padding: 28px 20px 24px; } }

.question-dim-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .7rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; padding: 5px 12px;
  border-radius: var(--radius-full); margin-bottom: 22px;
  background: var(--dim-soft, var(--fill-light));
  color: var(--dim-deep, var(--text-3));
}
.question-text-wrap {
  min-height: 88px; display: flex; align-items: center;
  justify-content: center; margin-bottom: 32px;
}
.question-text {
  font-weight: 600; font-size: 1.45rem; line-height: 1.38;
  color: var(--text); letter-spacing: -.02em; text-align: center;
  transition: opacity .15s ease, transform .15s ease;
}
@media(max-width: 520px) { .question-text { font-size: 1.2rem; } }
.question-text.fading { opacity: 0; transform: translateY(6px); }

/* ── Frequency scale ── */
.scale-labels {
  display: flex; justify-content: space-between;
  margin-bottom: 12px; padding: 0 2px;
}
.scale-labels span {
  font-size: .74rem; font-weight: 600; color: var(--text-muted);
  letter-spacing: .01em;
}
.scale-label-left { color: var(--text-muted) !important; }
.scale-label-right { color: var(--text-muted) !important; }

.scale-options { display: flex; gap: 5px; }
.scale-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; gap: 6px;
  background: var(--fill-light); border: none;
  border-radius: var(--radius-sm); padding: 14px 4px 10px;
  cursor: pointer; transition: background .12s, transform .1s;
  min-height: 60px;
}
.scale-btn:hover { background: var(--fill-hover); transform: translateY(-2px); }
.scale-btn:active { transform: scale(.97); transition-duration: .06s; }

/* Dot sizing: Never (big) → Sometimes (small) → Very often (big) */
.dot {
  border-radius: 50%; background: var(--border);
  transition: background .12s, transform .15s; flex-shrink: 0;
}
.scale-btn:nth-child(1) .dot { width: 26px; height: 26px; }  /* Never */
.scale-btn:nth-child(2) .dot { width: 20px; height: 20px; }  /* Rarely */
.scale-btn:nth-child(3) .dot { width: 14px; height: 14px; }  /* Sometimes */
.scale-btn:nth-child(4) .dot { width: 20px; height: 20px; }  /* Often */
.scale-btn:nth-child(5) .dot { width: 26px; height: 26px; }  /* Very often */

.scale-btn:hover .dot { transform: scale(1.12); }

.scale-btn-label {
  font-size: .68rem; font-weight: 500; color: var(--text-muted);
  line-height: 1.2; text-align: center;
}

/* Selected state */
.scale-btn.selected {
  background: var(--dim-soft, var(--fill-light));
}
.scale-btn.selected .dot {
  background: var(--dim-color, var(--text));
  transform: scale(1.18);
  box-shadow: 0 3px 12px rgba(0,0,0,.18);
}
.scale-btn.selected .scale-btn-label { color: var(--dim-deep, var(--text)); font-weight: 600; }

/* ── Card navigation ── */
.card-nav {
  max-width: var(--max-w); margin: 16px auto 0;
  padding: 0 24px; display: flex; justify-content: space-between;
}
.btn-nav {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface); border: none; border-radius: var(--radius-full);
  color: var(--text-3); font-family: var(--font); font-weight: 500;
  font-size: .88rem; padding: 10px 20px; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: all .13s;
}
.btn-nav:hover { color: var(--text); box-shadow: var(--shadow-md); }
.btn-nav:disabled { opacity: .3; cursor: not-allowed; pointer-events: none; }

/* ── Interstitial card ── */
.interstitial-wrap {
  max-width: var(--max-w); margin: 0 auto; padding: 40px 24px;
}
.interstitial-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 48px 44px 40px; box-shadow: var(--shadow-md);
  text-align: center;
}
@media(max-width: 520px) { .interstitial-card { padding: 32px 20px 28px; } }

.interstitial-dim-dot {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--dim-color, var(--text-muted));
  margin: 0 auto 20px; display: flex; align-items: center;
  justify-content: center;
}
.interstitial-label {
  font-size: .72rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.interstitial-card h2 {
  font-weight: 800; font-size: 2rem; letter-spacing: -.03em;
  color: var(--text); margin-bottom: 12px;
}
.interstitial-card p {
  font-size: 1rem; color: var(--text-3); line-height: 1.65;
  max-width: 400px; margin: 0 auto 12px;
}
.interstitial-timeframe {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 500; color: var(--text-muted);
  background: var(--fill-light); border-radius: var(--radius-full);
  padding: 6px 16px; margin: 12px auto 28px;
}
.interstitial-q-count {
  font-size: .82rem; color: var(--text-muted); margin-bottom: 28px;
}

/* ── Triage confirm screen ── */
.triage-confirm-wrap {
  max-width: var(--max-w-wide); margin: 0 auto; padding: 40px 24px 64px;
}
.triage-confirm-wrap h2 {
  font-weight: 800; font-size: 1.8rem; letter-spacing: -.03em; margin-bottom: 8px;
}
.triage-confirm-wrap > p {
  font-size: 1rem; color: var(--text-3); margin-bottom: 28px; max-width: 480px;
}
.triage-results-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 28px;
}
@media(max-width: 560px) { .triage-results-grid { grid-template-columns: 1fr; } }

.triage-result-card {
  background: var(--surface); border: 2px solid var(--border);
  border-radius: var(--radius-md); padding: 20px 20px;
  display: flex; align-items: flex-start; gap: 14px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.triage-result-card.flagged { border-color: var(--dim-color, var(--text)); }
.triage-result-card.flagged.selected { background: var(--dim-soft, var(--fill-light)); }
.triage-result-card.not-flagged { opacity: .55; cursor: pointer; }
.triage-result-card.not-flagged:hover { opacity: .75; }
.triage-result-card.not-flagged.selected {
  opacity: 1;
  border-color: var(--dim-color, var(--text));
  background: var(--dim-soft, var(--fill-light));
}

.triage-flag-badge {
  font-size: .66rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 2px 8px;
  border-radius: var(--radius-full);
}
.triage-flag-badge.flag-elevated {
  background: var(--dim-soft, var(--fill-light));
  color: var(--dim-deep, var(--text-3));
}
.triage-flag-badge.flag-low {
  background: var(--fill-light); color: var(--text-muted);
}
.triage-result-name {
  font-weight: 700; font-size: .98rem; margin-bottom: 4px;
}
.triage-result-score {
  font-size: .82rem; color: var(--text-muted);
}
.triage-none-flagged {
  background: var(--fill-light); border-radius: var(--radius-md);
  padding: 28px 24px; text-align: center;
  font-size: .95rem; color: var(--text-3); line-height: 1.65;
}

/* ── Response quality warning ── */
.quality-warning {
  max-width: var(--max-w); margin: 16px auto 0;
  padding: 0 24px;
}
.quality-warning-inner {
  background: var(--dyscalculia-soft); border-radius: var(--radius-md);
  padding: 14px 18px; font-size: .85rem;
  color: var(--dyscalculia-deep); line-height: 1.5;
  display: none;
}
.quality-warning-inner.visible { display: block; }

/* ─══════════════════════════════════
   RESULTS PAGE
═══════════════════════════════════ */
.results-wrap {
  max-width: var(--max-w); margin: 0 auto; padding: 40px 24px 100px;
}
.results-hero {
  text-align: center; padding: 48px 0 40px;
}
.results-hero h1 {
  font-weight: 900; font-size: 2.4rem; letter-spacing: -.04em;
  margin-bottom: 10px;
}
.results-hero p {
  font-size: 1rem; color: var(--text-3); line-height: 1.65;
  max-width: 440px; margin: 0 auto;
}

/* Score cards */
.scores-section { margin-bottom: 40px; }
.scores-section-title {
  font-weight: 700; font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px;
}

.score-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px 28px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.score-card:hover { box-shadow: var(--shadow-md); }

.score-card-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; flex-wrap: wrap; gap: 8px;
}
.score-card-name-row {
  display: flex; align-items: center; gap: 10px;
}
.score-dim-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--dim-color, var(--text-muted)); flex-shrink: 0;
}
.score-card-name {
  font-weight: 700; font-size: 1.05rem; color: var(--text);
  letter-spacing: -.01em;
}
.score-band-badge {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 4px 11px;
  border-radius: var(--radius-full);
}
.band-elevated {
  background: var(--dim-soft, var(--fill-light));
  color: var(--dim-deep, var(--text-3));
}
.band-moderate { background: var(--fill-light); color: var(--text-3); }
.band-low { background: var(--fill-light); color: var(--text-muted); }

.score-bar-track {
  height: 8px; background: var(--border); border-radius: var(--radius-full);
  overflow: hidden; margin-bottom: 10px;
}
.score-bar-fill {
  height: 100%; border-radius: var(--radius-full);
  background: var(--dim-color, var(--text));
  transition: width 1.2s cubic-bezier(.16,1,.3,1); width: 0%;
}
.score-bar-fill.band-moderate-fill { opacity: .6; }
.score-bar-fill.band-low-fill { opacity: .3; }

.score-pct {
  font-size: .85rem; font-weight: 600; color: var(--text);
}
.score-card-narrative {
  font-size: .9rem; color: var(--text-3); line-height: 1.65; margin-top: 10px;
}
.subdomain-highlights {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px;
}
.subdomain-highlights-label {
  font-size: .78rem; font-weight: 600; color: var(--text-3); text-transform: uppercase;
  letter-spacing: .04em; margin-right: 2px;
}
.subdomain-tag {
  font-size: .78rem; font-weight: 500; padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--dim-soft, var(--fill-light));
  color: var(--dim-deep, var(--text-3));
  border: 1px solid color-mix(in srgb, var(--dim-color, var(--border)) 30%, transparent);
}

/* Impairment follow-up (inline with score card) */
.impairment-row {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border);
}
.impairment-label {
  font-size: .78rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.impairment-options {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.impairment-btn {
  font-family: var(--font); font-size: .8rem; font-weight: 500;
  padding: 6px 14px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--fill-light);
  color: var(--text-3); cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.impairment-btn:hover { border-color: var(--text-muted); color: var(--text); }
.impairment-btn.selected {
  border-color: var(--dim-color, var(--text));
  background: var(--dim-soft, var(--fill-light));
  color: var(--dim-deep, var(--text));
  font-weight: 600;
}

/* Co-occurrence suggestion */
.cooccur-suggestion {
  margin-top: 14px; padding: 12px 16px;
  background: var(--fill-light); border-radius: var(--radius-md);
  font-size: .88rem; color: var(--text-3); line-height: 1.55;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.cooccur-add-btn {
  font-family: var(--font); font-size: .82rem; font-weight: 600;
  padding: 7px 16px; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-3); cursor: pointer; white-space: nowrap;
  transition: all .12s;
}
.cooccur-add-btn:hover { border-color: var(--text); color: var(--text); }

/* Next steps per dimension */
.next-steps-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px 28px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.next-steps-dim {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.next-steps-dim-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--dim-color, var(--text-muted));
}
.next-steps-dim-name {
  font-weight: 700; font-size: .9rem; color: var(--text);
}
.next-steps-title {
  font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px;
}
.next-steps-list {
  list-style: none; display: flex; flex-direction: column; gap: 6px;
}
.next-steps-list li {
  font-size: .9rem; color: var(--text-3); line-height: 1.55;
  display: flex; align-items: baseline; gap: 8px;
}
.next-steps-list li::before {
  content: '→'; color: var(--dim-color, var(--text-muted));
  font-size: .85rem; flex-shrink: 0;
}

/* Pathway card */
.pathway-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 28px 28px; margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.pathway-card h3 {
  font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em;
  margin-bottom: 16px;
}
.pathway-steps { display: flex; flex-direction: column; gap: 0; }
.pathway-step {
  display: flex; gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.pathway-step:last-child { border-bottom: none; }
.pathway-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--fill-light); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; color: var(--text-muted);
  flex-shrink: 0; margin-top: 2px;
}
.pathway-step-num.active-step {
  background: var(--text); color: var(--white); border-color: var(--text);
}
.pathway-step-text {}
.pathway-step-label {
  font-weight: 700; font-size: .9rem; color: var(--text); margin-bottom: 2px;
}
.pathway-step-desc {
  font-size: .85rem; color: var(--text-3); line-height: 1.55;
}

/* Differentials card */
.differentials-card {
  background: var(--fill-light); border-radius: var(--radius-lg);
  padding: 24px 28px; margin-bottom: 16px;
}
.differentials-card h3 {
  font-weight: 700; font-size: 1rem; margin-bottom: 8px;
}
.differentials-card p {
  font-size: .9rem; color: var(--text-3); line-height: 1.65;
  margin-bottom: 12px;
}
.differentials-list {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.diff-chip {
  font-size: .8rem; font-weight: 500; padding: 5px 13px;
  border-radius: var(--radius-full); background: var(--surface);
  color: var(--text-3); border: 1px solid var(--border);
}

/* Childhood retrospective note */
.childhood-note {
  background: var(--adhd-i-soft); border-radius: var(--radius-md);
  padding: 16px 20px; margin-top: 12px;
  font-size: .88rem; color: var(--adhd-i-deep); line-height: 1.6;
}

/* Edge case banners */
.edge-banner {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px 28px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
  border-left: none;
}
.edge-banner p { font-size: .95rem; color: var(--text-3); line-height: 1.65; }

/* Results actions */
.results-actions {
  display: flex; justify-content: center; gap: 12px;
  margin-top: 36px; flex-wrap: wrap;
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.16,1,.3,1), transform .55s cubic-bezier(.16,1,.3,1);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .1s; }
.reveal.d2 { transition-delay: .2s; }
.reveal.d3 { transition-delay: .3s; }
.reveal.d4 { transition-delay: .4s; }
.reveal.d5 { transition-delay: .5s; }

/* ── Loading screen ── */
.loading-screen {
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 120px 24px; text-align: center; gap: 24px;
}
.loading-screen.active { display: flex; }
.spinner-wrap { position: relative; width: 44px; height: 44px; }
.spinner-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent;
}
.spinner-ring:nth-child(1) { border-top-color: var(--text); animation: spin 1s linear infinite; }
.spinner-ring:nth-child(2) { border-right-color: var(--text-3); animation: spin 1.6s linear infinite reverse; inset: 6px; }
.spinner-ring:nth-child(3) { border-bottom-color: var(--text-muted); animation: spin 2.2s linear infinite; inset: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: .95rem; color: var(--text-3); }

/* ── Footer ── */
.site-footer {
  text-align: center; padding: 40px 24px 48px;
  border-top: 1px solid var(--border);
}
.site-footer p { font-size: .82rem; color: var(--text-muted); line-height: 1.7; }
.site-footer strong { color: var(--text-3); }

/* ═══════════════════════════════════
   DARK MODE
═══════════════════════════════════ */
[data-theme="dark"] {
  --white: #ffffff;
  --bg: #111110;
  --surface: #1c1b19;
  --text: #f5f4f2;
  --text-2: #e8e6e3;
  --text-3: #c6c2bc;
  --text-muted: #7c786f;
  --border: #2c2a27;
  --fill-light: #252320;
  --fill-hover: #2e2c28;

  --autism:        #3abcb8; --autism-deep:    #7edcd9;
  --autism-soft:   #0e2624; --autism-card:    #1a4a48;

  --adhd-i:        #4aaece; --adhd-i-deep:    #82d0ea;
  --adhd-i-soft:   #0f2530; --adhd-i-card:    #0e2e40;

  --adhd-h:        #e07840; --adhd-h-deep:    #f0aa80;
  --adhd-h-soft:   #2a1508; --adhd-h-card:    #4a2010;

  --dyslexia:      #a87dd4; --dyslexia-deep:  #c9a3ef;
  --dyslexia-soft: #2a1f3a; --dyslexia-card:  #3d2860;

  --dyspraxia:     #3ab87e; --dyspraxia-deep: #72d4a8;
  --dyspraxia-soft:#132b20; --dyspraxia-card: #0f3626;

  --dyscalculia:      #e8b830; --dyscalculia-deep: #f5d470;
  --dyscalculia-soft: #2a2008; --dyscalculia-card: #2e2200;

  --sensory:       #d06090; --sensory-deep:   #f090b8;
  --sensory-soft:  #2a1020; --sensory-card:   #4a1830;

  --ocd:           #6a88a8; --ocd-deep:       #9ab8d0;
  --ocd-soft:      #141e28; --ocd-card:       #1e3040;

  --shadow-sm: 0 1px 4px rgba(0,0,0,.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,.45);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.6);
}
[data-theme="dark"] .navbar {
  background: rgba(17,17,16,.9);
}
[data-theme="dark"] .btn-primary { background: var(--text); color: #111110; }
[data-theme="dark"] .btn-primary:hover { background: var(--text-2); }
[data-theme="dark"] .progress-fill { background: var(--text); }

/* Theme toggle */
.theme-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--surface);
  border: 1.5px solid var(--text-3);
  border-radius: var(--radius-full);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  color: var(--text);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.theme-toggle-btn:hover {
  background: var(--fill-hover);
  border-color: var(--text);
  color: var(--text);
}
.theme-toggle-btn svg { width: 16px; height: 16px; }
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle-btn {
  border-color: var(--text-3);
  color: var(--text);
  background: var(--fill-light);
}

/* ═══ RESPONSIVE ═══ */
@media(max-width: 720px) {
  .landing-hero { padding: 48px 20px 36px; }
  .landing-hero h1 { font-size: 2.3rem; }
}
@media(max-width: 480px) {
  .landing-hero h1 { font-size: 2rem; }
  .door-card { padding: 24px 20px; }
  .score-card { padding: 18px 18px; }
  .pathway-card { padding: 20px 18px; }
}

/* ═══════════════════════════════════
   QUESTION SCREEN — IMMERSIVE LAYOUT
   Full viewport, card fills the space.
═══════════════════════════════════ */

/* Override default block display so the screen fills the viewport */
#questionScreen.active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px);
  overflow: hidden;
}

/* Compact progress bar — fixed height at top */
#questionScreen .progress-section {
  padding: 16px 28px 14px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  max-width: 100%;
}
#questionScreen .progress-top-row,
#questionScreen .progress-track-wrap {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}
#questionScreen .timeframe-tag {
  display: flex;
  width: fit-content;
  margin: 6px auto 0;
}

/* Question wrap stretches to fill remaining height */
#questionScreen .question-wrap {
  flex: 1;
  display: flex;
  align-items: stretch;
  padding: 20px 24px 24px;
  min-height: 0;
}

/* Card is now a tall flex column */
#questionScreen .question-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 36px 52px 32px;
  min-height: 0;
}
@media(max-width: 520px) {
  #questionScreen .question-card { padding: 24px 22px 20px; }
}

/* Question focus group — centered vertically in the card */
#questionScreen .question-focus {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

/* Question text area */
#questionScreen .question-text-wrap {
  margin-bottom: 28px;
}

/* Bigger question text */
#questionScreen .question-text {
  font-size: 1.8rem;
  line-height: 1.32;
}
@media(max-width: 520px) {
  #questionScreen .question-text { font-size: 1.35rem; }
}

/* Taller scale buttons */
#questionScreen .scale-options {
  gap: 8px;
}
#questionScreen .scale-btn {
  min-height: 88px;
  padding: 18px 4px 14px;
}

/* Bigger dots — scaled up from original sizes */
#questionScreen .scale-btn:nth-child(1) .dot { width: 32px; height: 32px; }
#questionScreen .scale-btn:nth-child(2) .dot { width: 24px; height: 24px; }
#questionScreen .scale-btn:nth-child(3) .dot { width: 16px; height: 16px; }
#questionScreen .scale-btn:nth-child(4) .dot { width: 24px; height: 24px; }
#questionScreen .scale-btn:nth-child(5) .dot { width: 32px; height: 32px; }

/* Slightly larger scale labels */
#questionScreen .scale-btn-label {
  font-size: .74rem;
}

/* Quality warning — remove outer spacing (now inside card) */
#questionScreen .quality-warning {
  max-width: none;
  margin: 16px 0 0;
  padding: 0;
}

/* Card nav — inside card, no outer positioning */
#questionScreen .card-nav {
  max-width: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Continue ghost button — hidden by default, shown by JS when reviewing */
.btn-continue-ghost {
  display: none;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
  transition: color .13s;
}
.btn-continue-ghost:hover { color: var(--text); }

/* Childhood screen — vertically centered */
#childhoodScreen.active {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 60px);
}
#childhoodScreen .interstitial-wrap {
  width: 100%;
}
