/* ============================================================
   NeuroScan — Shared design system
   Used by every page in /webapp/.
============================================================ */

:root {
  /* Colour palette */
  --bg:           #030712;
  --surface:      #080e1a;
  --surface-2:    #0f172a;
  --surface-3:    #1e293b;
  --border:       rgba(255, 255, 255, 0.08);
  --border-strong:rgba(255, 255, 255, 0.16);

  --text:         #f3f4f6;
  --text-soft:    #94a3b8;
  --text-mute:    #64748b;

  --brand:        #3b82f6;
  --brand-dark:   #1d4ed8;
  --brand-soft:   rgba(59, 130, 246, 0.12);

  --teal:         #0ea5e9;
  --green:        #10b981;
  --green-soft:   rgba(16, 185, 129, 0.12);
  --orange:       #f59e0b;
  --orange-soft:  rgba(245, 158, 11, 0.12);
  --red:          #ef4444;
  --red-soft:     rgba(239, 68, 68, 0.12);
  --purple:       #8b5cf6;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 6px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .12);
  --shadow-xl: 0 30px 80px rgba(15, 23, 42, .18);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1240px;
  --container-wide: 1480px;

  /* Spacing scale */
  --space-section:       80px;
  --space-section-tight: 50px;
  --space-section-sm:    56px;
  --space-card:          32px;
  --space-card-sm:       22px;

  /* Focus ring */
  --focus-ring: 0 0 0 3px rgba(31, 111, 235, .45);
}

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

/* Accessible focus states — visible only for keyboard users */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible,
.nav-trigger:focus-visible,
.nav-cta:focus-visible,
.mobile-toggle:focus-visible,
.highlight-link:focus-visible,
.dataset-link:focus-visible,
.ref-card a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

/* Screen-reader-only utility */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 12px;
  z-index: 100;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  background-image: 
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.02) 0%, transparent 50%);
  background-attachment: fixed;
  position: relative;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-size: 36px 36px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  z-index: -1;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 32px; }

/* ============================================================
   NAVBAR (injected by nav.js on every page)
============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 14, 28, 0.8);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand);
  flex-shrink: 0;
}
.brand svg { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.brand-tag { font-size: 11px; color: var(--text-mute); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link, .nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  cursor: pointer;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-link:hover, .nav-trigger:hover { color: var(--brand); background: var(--brand-soft); }
.nav-link.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.nav-trigger svg { width: 14px; height: 14px; }

.nav-dropdown { position: relative; }
.nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-dropdown:hover .nav-menu,
.nav-dropdown.open .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  transition: background .15s, color .15s;
}
.nav-menu a:hover { background: var(--brand-soft); color: var(--brand); }
.nav-menu svg { width: 18px; height: 18px; color: var(--brand); flex-shrink: 0; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s, transform .15s, box-shadow .2s;
  box-shadow: 0 3px 10px rgba(31, 111, 235, .3);
}
.nav-cta:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 5px 14px rgba(31, 111, 235, .4); }
.nav-cta svg { width: 14px; height: 14px; }

.mobile-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--text);
  transition: background .15s;
}
.mobile-toggle:hover { background: var(--brand-soft); }
.mobile-toggle svg { width: 24px; height: 24px; }

.mobile-menu {
  display: block;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  padding: 0 24px;
  border-top: 1px solid transparent;
  background: rgba(8, 14, 28, 0.95);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.3s ease, 
              padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease,
              visibility 0.4s;
}
.mobile-menu.open {
  max-height: 440px;
  opacity: 1;
  visibility: visible;
  padding: 16px 24px;
  border-top-color: var(--border);
}
.mobile-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, background 0.15s, color 0.15s;
}
.mobile-menu.open a {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu a:hover, .mobile-menu a.active { background: var(--brand-soft); color: var(--brand); }
.mobile-menu a.mobile-cta {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  margin-top: 8px;
}
.mobile-menu a.mobile-cta:hover { background: var(--brand-dark); color: #fff; }
.mobile-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-mute);
  font-weight: 600;
  padding: 14px 14px 6px;
  transform: translateY(10px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
.mobile-menu.open .mobile-section-label {
  transform: translateY(0);
  opacity: 1;
}

/* Stagger transition delays for child links */
.mobile-menu.open a:nth-child(1) { transition-delay: 0.04s; }
.mobile-menu.open a:nth-child(2) { transition-delay: 0.08s; }
.mobile-menu.open a:nth-child(3) { transition-delay: 0.12s; }
.mobile-menu.open a:nth-child(4) { transition-delay: 0.16s; }
.mobile-menu.open .mobile-section-label { transition-delay: 0.20s; }
.mobile-menu.open a.mobile-cta { transition-delay: 0.24s; }

/* ============================================================
   FOOTER
============================================================ */
.footer {
  background: #0e1a2b;
  color: #94a3b8;
  padding: 50px 0 24px;
  margin-top: 80px;
}
.footer .container { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: #fff; }
.footer-brand svg { width: 32px; height: 32px; color: var(--brand); }
.footer-brand strong { font-size: 16px; color: #fff; }
.footer-about { font-size: 13.5px; line-height: 1.6; color: #94a3b8; max-width: 320px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #fff; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 8px; }
.footer ul a {
  font-size: 13.5px;
  color: #94a3b8;
  transition: color .15s;
}
.footer ul a:hover { color: var(--brand); }
.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 40px;
  padding-top: 22px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}
.footer-bottom strong { color: #94a3b8; }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .15s, box-shadow .2s, background .15s, color .15s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 14px rgba(31, 111, 235, .35);
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(31, 111, 235, .45); }
.btn-light {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
  backdrop-filter: blur(8px);
}
.btn-light:hover { background: rgba(255, 255, 255, .22); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { padding: 9px 16px; font-size: 13px; }
.btn-big   { padding: 18px 32px; font-size: 16px; }

/* ============================================================
   HERO — Home page (full, with photo background)
============================================================ */
.hero-full {
  position: relative;
  min-height: 720px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(95deg, rgba(14, 26, 43, .96) 0%, rgba(14, 26, 43, .78) 45%, rgba(31, 111, 235, .42) 100%),
    radial-gradient(800px circle at 85% 50%, rgba(31, 111, 235, .35), transparent 70%);
  z-index: 1;
}
.hero-full .container {
  position: relative;
  z-index: 2;
  padding-top: 60px;
  padding-bottom: 60px;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-text { max-width: 620px; }

/* ----- Hero right-side face-scan visual (1:1) ----- */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(147, 197, 253, .15);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  background: #0b1929;
}
.hero-face-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-visual-scanline {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(147,197,253,.65) 30%, rgba(147,197,253,.65) 70%, transparent);
  box-shadow: 0 0 16px 3px rgba(147, 197, 253, .35);
  z-index: 3;
  animation: heroScan 3.2s ease-in-out infinite;
}
@keyframes heroScan {
  0%   { top: 6%;  opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 94%; opacity: 0; }
}
.hero-visual-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 11px;
  color: #fff;
  letter-spacing: .06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.hero-visual-badge .live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .25);
  animation: heroLive 1.6s ease-in-out infinite;
}
@keyframes heroLive {
  0%, 100% { box-shadow: 0 0 0 4px rgba(16, 185, 129, .25); }
  50%      { box-shadow: 0 0 0 8px rgba(16, 185, 129, .1); }
}
.hero-visual-statsbar {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  z-index: 4;
  display: flex;
  align-items: stretch;
  background: rgba(8, 18, 32, .9);
  border-top: 1px solid rgba(147, 197, 253, .18);
  backdrop-filter: blur(8px);
}
.hero-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  gap: 3px;
}
.hero-stat-label {
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(147, 197, 253, .55);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.hero-stat-value {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: #e2edff;
  letter-spacing: -.02em;
}
.hero-stat-sep {
  width: 1px;
  background: rgba(147, 197, 253, .15);
  align-self: stretch;
  margin: 8px 0;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  backdrop-filter: blur(8px);
  margin-bottom: 24px;
}
.hero-pill svg { width: 14px; height: 14px; }
.hero-full h1 {
  font-size: 60px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.025em;
  max-width: 820px;
  margin-bottom: 22px;
}
.hero-full h1 .accent { color: #93c5fd; }
.hero-full .lead {
  font-size: 19px;
  color: rgba(255, 255, 255, .85);
  max-width: 620px;
  margin-bottom: 40px;
  line-height: 1.55;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-trust {
  display: flex;
  gap: 44px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  max-width: 720px;
  flex-wrap: wrap;
}
.hero-trust > div { display: flex; flex-direction: column; }
.hero-trust strong { font-size: 26px; font-weight: 700; color: #fff; }
.hero-trust span { font-size: 11px; color: rgba(255, 255, 255, .7); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }

/* ============================================================
   INFO TICKER (scrolling bar below hero — ICADHI-style)
============================================================ */
.info-ticker {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
.info-ticker::before, .info-ticker::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}
.info-ticker::before { left: 0;  background: linear-gradient(90deg, var(--surface), transparent); }
.info-ticker::after  { right: 0; background: linear-gradient(270deg, var(--surface), transparent); }
.ticker-track {
  display: flex;
  animation: tickerMove 35s linear infinite;
  width: max-content;
}
.ticker-track:hover { animation-play-state: paused; }
@keyframes tickerMove {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-item-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ticker-item-icon svg { width: 16px; height: 16px; }
.ticker-item-text { display: flex; flex-direction: column; line-height: 1.3; }
.ticker-item-label {
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}
.ticker-item-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.ticker-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  align-self: center;
}

/* ============================================================
   HERO — Page strip (content pages, small)
============================================================ */
.page-hero {
  position: relative;
  padding: 100px 0 70px;
  overflow: hidden;
  background: #0e1a2b;
  color: #fff;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: .35;
  z-index: 0;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 26, 43, .92) 0%, rgba(14, 26, 43, .65) 70%, rgba(31, 111, 235, .5) 100%);
  z-index: 1;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, .65);
  margin-bottom: 14px;
  font-family: var(--mono);
}
.page-hero-breadcrumb a { color: rgba(255, 255, 255, .75); }
.page-hero-breadcrumb a:hover { color: #fff; }
.page-hero-breadcrumb .crumb-sep { color: rgba(255, 255, 255, .35); }
.page-hero h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -.02em;
  max-width: 820px;
  margin-bottom: 16px;
  line-height: 1.1;
}
.page-hero .lead {
  font-size: 17px;
  color: rgba(255, 255, 255, .82);
  max-width: 720px;
  line-height: 1.6;
}

/* ============================================================
   SECTION SHELL
============================================================ */
section.section { padding: var(--space-section) 0; }
section.section-tight { padding: var(--space-section-tight) 0; }
section.section-surface { background: var(--surface); }
.section-head-center { text-align: center; margin: 0 auto 50px; }
.section-head-center .section-lead { margin-left: auto; margin-right: auto; }
.section-head-tight { margin-bottom: 30px; }
.spaced-top { margin-top: 26px; }

.section-head { max-width: 820px; margin-bottom: 44px; }
.section-kicker {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.section-head h2 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.section-head h2 .accent { color: var(--brand); }
.section-lead {
  font-size: 17px;
  color: var(--text-soft);
  margin-top: 14px;
  line-height: 1.65;
}
.section-lead strong { color: var(--text); }

/* ============================================================
   HIGHLIGHT CARDS (home page)
============================================================ */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.highlight-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.highlight-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
}
.highlight-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.highlight-bar.bar-blue   { background: var(--brand); }
.highlight-bar.bar-green  { background: var(--green); }
.highlight-bar.bar-orange { background: var(--orange); }
.highlight-bar.bar-purple { background: var(--purple); }
.highlight-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.highlight-icon svg { width: 28px; height: 28px; color: #fff; }
.highlight-icon.icon-blue   { background: var(--brand); }
.highlight-icon.icon-green  { background: var(--green); }
.highlight-icon.icon-orange { background: var(--orange); }
.highlight-icon.icon-purple { background: var(--purple); }
.highlight-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.highlight-card h3 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 12px;
}
.highlight-card p {
  font-size: 14.5px;
  color: var(--text-soft);
  margin-bottom: 20px;
  line-height: 1.6;
}
.highlight-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}
.highlight-link:hover { gap: 10px; }
.highlight-link svg { width: 16px; height: 16px; transition: transform .2s; }

/* ============================================================
   QUOTE BANNER
============================================================ */
.quote-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: center;
  color: #fff;
}
.quote-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.quote-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(14, 26, 43, .9) 0%, rgba(14, 26, 43, .65) 60%, rgba(31, 111, 235, .55) 100%);
  z-index: 1;
}
.quote-banner-content {
  position: relative;
  z-index: 2;
  padding: 56px;
  max-width: 720px;
}
.quote-icon {
  font-size: 64px;
  line-height: 1;
  font-family: Georgia, serif;
  color: rgba(255, 255, 255, .25);
  margin-bottom: -8px;
}
.quote-text {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 22px;
  letter-spacing: -.01em;
}
.quote-attr {
  font-size: 14px;
  color: rgba(255, 255, 255, .8);
}
.quote-attr strong { color: #fff; font-weight: 600; }

/* ============================================================
   IMAGE + TEXT BLOCK (used across content pages)
============================================================ */
.split-block {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-block.reverse { grid-template-columns: 1fr 1.05fr; }
.split-block.reverse .split-img { order: -1; }

.split-text h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.015em;
  margin-bottom: 16px;
  line-height: 1.2;
}
.split-text h3 em { font-style: italic; color: var(--brand); }
.split-text p {
  font-size: 15.5px;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 14px;
}
.split-text p:last-child { margin-bottom: 0; }
.split-text strong { color: var(--text); }

.split-img {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4 / 3;
}
.split-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split-img-badge {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 8px;
}
.split-img-badge svg { width: 16px; height: 16px; color: var(--brand); }

/* ============================================================
   FLOW DIAGRAM (4 / 5 step horizontal)
============================================================ */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.flow-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.flow-step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.flow-step-num {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-family: var(--mono);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 18px;
}
.flow-step h4 { font-size: 18px; font-weight: 700; margin-bottom: 8px; letter-spacing: -.01em; }
.flow-step p { font-size: 14px; color: var(--text-soft); line-height: 1.55; }
.flow-step .flow-img {
  width: 100%;
  height: 140px;
  border-radius: 10px;
  margin-bottom: 18px;
  object-fit: cover;
}

/* ============================================================
   COMPARISON BARS (movement asymmetry visualization)
============================================================ */
.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
}
.compare-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 20px; letter-spacing: -.01em; }
.compare-row { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.compare-row:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.compare-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-soft);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.compare-label .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.compare-label .dot.dot-green { background: var(--green); }
.compare-label .dot.dot-red   { background: var(--red); }
.compare-label .dot.dot-blue  { background: var(--brand); }
.compare-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.compare-bar-row {
  display: grid;
  grid-template-columns: 60px 1fr 80px;
  align-items: center;
  gap: 12px;
}
.compare-bar-row .side { font-size: 12.5px; color: var(--text-mute); font-weight: 600; }
.compare-bar-bg {
  background: var(--surface-2);
  border-radius: 6px;
  height: 22px;
  overflow: hidden;
}
.compare-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  transition: width 1s ease-out;
}
.compare-bar-fill.fill-blue { background: var(--brand); }
.compare-bar-fill.fill-gray { background: #64748b; }
.compare-bar-fill.fill-red  { background: var(--red); }
.compare-bar-row .val { font-family: var(--mono); font-size: 12px; color: var(--text); text-align: right; }
.compare-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
}
.compare-verdict.verdict-ok  { background: var(--green-soft); color: #065f46; }
.compare-verdict.verdict-bad { background: var(--red-soft); color: #991b1b; }

/* ============================================================
   TABLE (protocol, landmarks, etc.)
============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}
.data-table th, .data-table td {
  padding: 16px 20px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.data-table thead th {
  background: var(--surface-2);
  color: var(--text-soft);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .06em;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table code,
.data-table .phase-tag,
.data-table .var-tag {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
}

/* ============================================================
   PHASE CARDS (protocol page)
============================================================ */
.phase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.phase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.phase-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.phase-img {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}
.phase-img img { width: 100%; height: 100%; object-fit: cover; }
.phase-img-num {
  position: absolute;
  top: 14px; left: 14px;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(14, 26, 43, .85);
  backdrop-filter: blur(8px);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.phase-card-body { padding: 22px; }
.phase-card-body h4 { font-size: 17px; font-weight: 700; letter-spacing: .01em; margin-bottom: 6px; text-transform: uppercase; }
.phase-duration {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.phase-card-body p { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; margin-bottom: 10px; }
.phase-card-body p:last-child { margin-bottom: 0; }
.phase-clinical {
  background: var(--surface-2);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12.5px !important;
  border-left: 3px solid var(--brand);
}
.phase-card-body strong { color: var(--text); }
.phase-card-body em { color: var(--brand); font-style: italic; }

/* ============================================================
   FORMULA + THRESHOLDS (scoring page)
============================================================ */
.formula-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 36px;
  margin-bottom: 40px;
}
.formula {
  background: #0e1a2b;
  color: #d6e3f5;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 28px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  overflow-x: auto;
}
.formula .comment { color: #7e9bbd; }
.formula .var     { color: #93c5fd; }
.formula .num     { color: #fcd34d; }

.threshold-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.threshold-card {
  border-radius: var(--radius-md);
  padding: 24px;
  border: 1px solid;
}
.threshold-card.t-green  { background: var(--green-soft); border-color: #a7f3d0; }
.threshold-card.t-orange { background: var(--orange-soft); border-color: #fed7aa; }
.threshold-card.t-red    { background: var(--red-soft); border-color: #fecaca; }
.threshold-card .range {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}
.threshold-card.t-green  .range { color: #065f46; }
.threshold-card.t-orange .range { color: #9a3412; }
.threshold-card.t-red    .range { color: #991b1b; }
.threshold-card .verdict {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 12px;
}
.threshold-card.t-green  .verdict { color: var(--green); }
.threshold-card.t-orange .verdict { color: var(--orange); }
.threshold-card.t-red    .verdict { color: var(--red); }
.threshold-card p { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; }

/* ============================================================
   DATASET / REFERENCE CARDS
============================================================ */
.dataset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.dataset-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.dataset-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand); }
.dataset-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: #fff;
  background: var(--brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.dataset-card h3 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin-bottom: 16px; line-height: 1.3; }
.dataset-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
  background: var(--surface-2);
  border-radius: 10px;
  margin-bottom: 16px;
}
.dataset-stats > div { text-align: center; }
.dataset-stats strong { font-size: 20px; color: var(--brand); font-weight: 800; display: block; }
.dataset-stats span { font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .04em; }
.dataset-card p { font-size: 13.5px; color: var(--text-soft); line-height: 1.6; margin-bottom: 18px; }
.dataset-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
}
.dataset-link:hover { gap: 10px; }
.dataset-link svg { width: 16px; height: 16px; }

.ref-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.ref-grid-spaced { margin-bottom: 50px; }

/* ----- References v2 — TOC ----- */
.ref-toc {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ref-toc-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.ref-toc-item:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.ref-toc-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 4px;
}
.ref-toc-tag.t-clinical { background: var(--red-soft);   color: #991b1b; }
.ref-toc-tag.t-tech     { background: var(--brand-soft); color: var(--brand-dark); }
.ref-toc-tag.t-data     { background: var(--green-soft); color: #065f46; }
.ref-toc-tag.t-os       { background: #fef3c7;           color: #92400e; }
.ref-toc-count {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.ref-toc-label {
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.45;
}

/* ----- References v2 — ordered card list ----- */
.ref-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  counter-reset: ref;
}
.ref-card-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 30px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  scroll-margin-top: 90px;
}
.ref-card-v2:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand);
}
.ref-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ref-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: .04em;
}
.ref-card-v2 .ref-tag {
  margin-bottom: 0;
}
.ref-year {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mute);
  letter-spacing: .04em;
}
.ref-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 8px;
}
.ref-authors {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 4px;
  line-height: 1.5;
}
.ref-pub-v2 {
  font-size: 13.5px;
  color: var(--text-mute);
  margin-bottom: 14px;
  line-height: 1.5;
}
.ref-pub-v2 em { color: var(--text); font-style: italic; font-weight: 500; }
.ref-uses {
  background: var(--surface-2);
  border-left: 3px solid var(--brand);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-bottom: 14px;
}
.ref-uses strong { color: var(--text); font-weight: 600; }
.ref-doi {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 500;
  transition: background .15s, border-color .15s;
  word-break: break-all;
  max-width: 100%;
}
.ref-doi:hover { background: var(--brand-soft); border-color: var(--brand); }
.ref-doi-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--brand);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
}
.ref-doi-url { flex: 1; min-width: 0; }
.ref-doi svg { width: 14px; height: 14px; flex-shrink: 0; }

.ref-section-gap { margin-top: 60px; }

/* ----- References v2 — library cards ----- */
.ref-lib-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.ref-lib-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ref-lib-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--brand);
}
.ref-lib-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}
.ref-lib-card h4 {
  font-size: 15.5px;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.ref-lib-card p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: 12px;
}
.ref-lib-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  word-break: break-all;
}
.ref-lib-link:hover { text-decoration: underline; }
.ref-lib-link svg { width: 14px; height: 14px; flex-shrink: 0; }
.ref-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ref-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--brand); }
.ref-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.ref-tag.t-clinical { background: var(--red-soft); color: #991b1b; }
.ref-tag.t-tech     { background: var(--brand-soft); color: var(--brand-dark); }
.ref-tag.t-data     { background: var(--green-soft); color: #065f46; }
.ref-tag.t-os       { background: #fef3c7; color: #92400e; }
.ref-card h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; line-height: 1.35; }
.ref-card p { font-size: 13.5px; color: var(--text-soft); margin-bottom: 6px; line-height: 1.5; }
.ref-card em { color: var(--text); font-style: italic; }
.ref-pub { font-size: 12.5px !important; color: var(--text-mute) !important; }
.ref-card a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 500;
  word-break: break-all;
}
.ref-card a:hover { text-decoration: underline; }
.ref-card a svg { width: 14px; height: 14px; }

/* ============================================================
   REFERENCES — Evidence map + compact paper rows
============================================================ */
.evid-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
}
.evid-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .18s;
}
.evid-card:hover { box-shadow: var(--shadow-md); }
.evid-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0;
  flex: 1;
}
.evid-card.ec-protocol { border-left-color: var(--brand); }
.evid-card.ec-scoring  { border-left-color: var(--orange); }
.evid-card.ec-urgency  { border-left-color: var(--red); }
.evid-card.ec-model    { border-left-color: var(--purple); }
.evid-card.ec-data     { border-left-color: var(--green); }
.evid-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}
.evid-tag.t-protocol { background: var(--brand-soft); color: var(--brand-dark); }
.evid-tag.t-scoring  { background: var(--orange-soft); color: #92400e; }
.evid-tag.t-urgency  { background: var(--red-soft); color: #991b1b; }
.evid-tag.t-model    { background: rgba(139,92,246,.1); color: var(--purple); }
.evid-tag.t-data     { background: var(--green-soft); color: #065f46; }
.evid-src {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand);
  padding: 4px 10px;
  background: var(--brand-soft);
  border-radius: 999px;
  text-decoration: none;
  width: fit-content;
  transition: background .15s, color .15s;
}
.evid-src:hover { background: var(--brand); color: #fff; }

/* Compact paper rows */
.ref-row-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
}
.ref-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  transition: border-color .18s;
}
.ref-row:hover { border-color: var(--brand); }
.ref-row-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mute);
  min-width: 24px;
}
.ref-row-body { flex: 1; min-width: 0; }
.ref-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.ref-row-meta {
  font-size: 11.5px;
  color: var(--text-mute);
  margin-top: 2px;
}
.ref-row-year {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-mute);
  padding: 2px 8px;
  background: var(--surface-2);
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ref-row-doi {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--brand);
  padding: 4px 10px;
  background: var(--brand-soft);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.ref-row-doi:hover { background: var(--brand); color: #fff; }
.ref-row-doi svg { width: 11px; height: 11px; }

/* ============================================================
   TIMELINE (vertical, alternating — ICADHI-style)
============================================================ */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 0;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-strong);
  transform: translateX(-50%);
}
.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-bottom: 40px;
  min-height: 180px;
}
.timeline-row:last-child { margin-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: 50%;
  top: 38px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--brand);
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 0 6px var(--bg);
}
.timeline-marker.tm-navy   { border-color: #0e1a2b; }
.timeline-marker.tm-blue   { border-color: var(--brand); }
.timeline-marker.tm-green  { border-color: var(--green); }
.timeline-marker.tm-orange { border-color: var(--orange); }
.timeline-marker.tm-purple { border-color: var(--purple); }
.timeline-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-md);
  align-self: start;
}
.timeline-row.left  .timeline-card { grid-column: 1; }
.timeline-row.right .timeline-card { grid-column: 2; }
.timeline-card-icon {
  position: absolute;
  top: 22px; right: 22px;
  opacity: .35;
}
.timeline-card-icon svg { width: 26px; height: 26px; }
.timeline-tag {
  display: inline-block;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.timeline-card h4 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin-bottom: 10px;
  color: #fff;
}
.timeline-card p {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .92);
  margin-bottom: 10px;
}
.timeline-card p:last-child { margin-bottom: 0; }
.timeline-card .timeline-note {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 12.5px;
  color: rgba(255, 255, 255, .8);
}
.timeline-card .timeline-note strong { color: #fff; }
.tc-blue   { background: var(--brand); color: #fff; }
.tc-navy   { background: #0e1a2b; color: #fff; }
.tc-green  { background: var(--green); color: #fff; }
.tc-orange { background: var(--orange); color: #fff; }
.tc-purple { background: var(--purple); color: #fff; }

/* Mobile: stack vertically with line on left */
@media (max-width: 880px) {
  .timeline { padding: 20px 0; }
  .timeline::before { left: 22px; }
  .timeline-row {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 56px;
    margin-bottom: 28px;
    min-height: 0;
  }
  .timeline-marker { left: 22px; top: 28px; }
  .timeline-row.left .timeline-card,
  .timeline-row.right .timeline-card { grid-column: 1; }
}

/* ============================================================
   PROTOCOL — Horizontal journey map
============================================================ */
.proto-journey {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 48px;
}
.proto-step {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.proto-track-row {
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
}
.proto-line {
  flex: 1;
  height: 2px;
  background: var(--border-strong);
}
.proto-line.invis { background: transparent; }
.proto-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.pn-1 { background: #0e1a2b; }
.pn-2 { background: var(--brand); }
.pn-3 { background: var(--purple); }
.pn-4 { background: var(--green); }
.pn-5 { background: var(--orange); }
.proto-time {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-mute);
  letter-spacing: .05em;
  margin-top: 10px;
  white-space: nowrap;
}
.proto-card {
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  width: calc(100% - 20px);
  text-align: center;
  transition: box-shadow .18s;
}
.proto-card:hover { box-shadow: var(--shadow-md); }
.proto-card.pc-1 { border-top: 3px solid #0e1a2b; }
.proto-card.pc-2 { border-top: 3px solid var(--brand); }
.proto-card.pc-3 { border-top: 3px solid var(--purple); }
.proto-card.pc-4 { border-top: 3px solid var(--green); }
.proto-card.pc-5 { border-top: 3px solid var(--orange); }
.proto-badge {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--text-mute);
  padding: 2px 8px;
  background: var(--surface-2);
  border-radius: 4px;
  display: inline-block;
  letter-spacing: .04em;
}
.proto-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0 7px;
  letter-spacing: .01em;
}
.proto-desc {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
}
.proto-note {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.5;
}
/* Mobile: vertical line + cards */
@media (max-width: 880px) {
  .proto-journey {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 32px;
  }
  .proto-step {
    flex-direction: row;
    align-items: stretch;
    gap: 18px;
  }
  .proto-track-row {
    flex-direction: column;
    width: 44px;
    flex-shrink: 0;
    height: auto;
  }
  .proto-line {
    flex: 1;
    width: 2px;
    height: auto;
  }
  .proto-time { display: none; }
  .proto-card {
    width: 100%;
    text-align: left;
    margin-top: 0;
    margin-bottom: 12px;
    padding: 16px 18px;
  }
}

/* ============================================================
   PIPELINE (datasets page)
============================================================ */
.pipeline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
}
.pipeline-flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr) auto;
  align-items: stretch;
  gap: 12px;
}
.pipe-step {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pipe-step strong { color: var(--brand); font-family: var(--mono); font-size: 13px; display: block; margin-bottom: 4px; }
.pipe-step small { color: var(--text-mute); font-size: 11.5px; }

/* ============================================================
   CHECK LIST (reasons / features)
============================================================ */
.check-list { list-style: none; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14.5px;
  color: var(--text-soft);
  line-height: 1.55;
}
.check-list li:last-child { border-bottom: none; }
.check-list .check-mark {
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.check-list .check-mark svg { width: 14px; height: 14px; }
.check-list strong { color: var(--text); display: block; margin-bottom: 2px; }

/* ============================================================
   STACK DIAGRAM (technology page)
============================================================ */
.stack-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stack-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-soft);
}
.stack-tag {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brand);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--brand-soft);
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
}

/* ============================================================
   CALLOUT / DISCLAIMER
============================================================ */
.callout {
  padding: 22px 26px;
  background: var(--orange-soft);
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-md);
  font-size: 14.5px;
  color: #9a3412;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.callout svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--orange); margin-top: 1px; }
.callout strong { color: #7c2d12; }
.callout.callout-blue {
  background: var(--brand-soft);
  border-color: #93c5fd;
  border-left-color: var(--brand);
  color: var(--brand-dark);
}
.callout.callout-blue svg { color: var(--brand); }
.callout.callout-blue strong { color: var(--brand-dark); }
.callout.callout-sm { font-size: 13px; padding: 16px 18px; gap: 12px; }
.callout.callout-sm svg { width: 18px; height: 18px; }

/* ============================================================
   "NEXT PAGE" LINK (bottom of every content page)
============================================================ */
.next-page {
  background: linear-gradient(135deg, #0e1a2b 0%, #1f6feb 100%);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  transition: transform .25s;
}
.next-page:hover { transform: translateY(-3px); }
.next-page-meta {
  font-size: 12px;
  font-family: var(--mono);
  color: rgba(255, 255, 255, .65);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.next-page h3 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.next-page-arrow {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 24px;
  transition: background .2s, transform .2s;
}
.next-page-arrow svg { width: 24px; height: 24px; color: #fff; }
.next-page:hover .next-page-arrow { background: rgba(255, 255, 255, .25); transform: translateX(4px); }

/* ============================================================
   TEST PAGE — compact hero
============================================================ */
.page-hero-compact {
  padding: 56px 0 28px;
  background: linear-gradient(135deg, #0e1a2b 0%, #1f6feb 100%);
}
.page-hero-compact .page-hero-overlay { display: none; }
.page-hero-compact .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.page-hero-compact h1 {
  font-size: 32px;
  margin-bottom: 6px;
  line-height: 1.15;
}
.page-hero-compact .lead {
  font-size: 14.5px;
  margin-bottom: 0;
}
.btn-cancel {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  backdrop-filter: blur(8px);
}
.btn-cancel:hover { background: rgba(255, 255, 255, .22); }

/* Helper anchor style — for in-text links on light backgrounds */
.link-brand { color: var(--brand); font-weight: 600; }
.link-brand:hover { text-decoration: underline; }

/* CTA strip on home / references (gradient green→blue) */
.cta-gradient {
  background: linear-gradient(135deg, #0e1a2b 0%, #1a3a6b 45%, #1f6feb 100%);
  box-shadow: 0 8px 32px rgba(31, 111, 235, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.cta-action {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  backdrop-filter: blur(8px);
  transition: background .15s, transform .15s, border-color .15s, color .15s;
}
.cta-action:hover { background: rgba(255, 255, 255, .28); transform: translateY(-1px); }
.cta-action.cta-btn-white {
  background: #ffffff;
  color: var(--brand);
  border-color: #ffffff;
}
.cta-action.cta-btn-white:hover {
  background: rgba(255, 255, 255, 0.9);
}
.cta-action.cta-btn-outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}
.cta-action.cta-btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}
.cta-action svg { width: 18px; height: 18px; }

/* ============================================================
   TEST PAGE — camera stage + results
============================================================ */
.test-wrap {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 32px;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 40px 32px 60px;
}
.video-stage {
  position: relative;
  background: #0e1a2b;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-lg);
  min-height: 560px;
}
#webcam, #overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
#overlay { pointer-events: none; }

.phase-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  z-index: 5;
}
.action-prompt {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 32px;
  text-align: center;
  min-width: 320px;
  box-shadow: var(--shadow-lg);
  z-index: 5;
}
.prompt-icon {
  width: 44px; height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.prompt-icon svg { width: 22px; height: 22px; }
.prompt-text { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.prompt-sub { font-size: 13px; color: var(--text-mute); margin-top: 4px; }
.action-prompt.waiting .prompt-icon {
  background: var(--orange-soft);
  color: var(--orange);
  animation: blink 1.2s infinite;
}
.action-prompt.acting .prompt-icon {
  background: var(--green-soft);
  color: var(--green);
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

.progress-ring {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 76px;
  height: 76px;
  z-index: 5;
  opacity: 0;
  transition: opacity .25s;
}
.progress-ring.visible { opacity: 1; }
.progress-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg, .ring-fg { fill: none; stroke-width: 6; }
.ring-bg { stroke: rgba(255, 255, 255, .2); }
.ring-fg {
  stroke: #fff;
  stroke-linecap: round;
  stroke-dasharray: 276.46;
  stroke-dashoffset: 276.46;
  transition: stroke-dashoffset .1s linear;
}
.ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 22px;
}

.test-right { display: flex; flex-direction: column; gap: 20px; }
.step-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 10px;
  transition: background .2s, color .2s;
}
.step.active { background: var(--brand-soft); }
.step.done { color: var(--text-mute); }
.step.done .step-num { background: var(--green); color: #fff; }
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  transition: background .2s, color .2s;
}
.step.active .step-num { background: var(--brand); color: #fff; }
.step-title { font-weight: 600; font-size: 14px; }
.step-desc  { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

.live-metrics {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.metric-label { font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .05em; }
.metric-value { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--text); margin-top: 2px; }

/* ----- Results panel (in-flow on test.html) ----- */
.results-panel {
  max-width: var(--container);
  margin: 30px auto 0;
  padding: 0 32px;
  opacity: 0;
  transition: opacity .5s;
}
.results-panel.shown { opacity: 1; }
.report {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.report-header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  padding: 38px 44px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
}
.report-kicker {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.report-header h2 { font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.report-meta { font-size: 13px; color: var(--text-mute); margin-top: 6px; font-family: var(--mono); }
.verdict {
  text-align: right;
  padding: 20px 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  min-width: 230px;
}
.verdict.normal   { border-left: 6px solid var(--green); }
.verdict.moderate { border-left: 6px solid var(--orange); }
.verdict.high     { border-left: 6px solid var(--red); }
.verdict-label { font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: .05em; }
.verdict-value { font-size: 22px; font-weight: 800; margin-top: 4px; }
.verdict.normal   .verdict-value { color: var(--green); }
.verdict.moderate .verdict-value { color: var(--orange); }
.verdict.high     .verdict-value { color: var(--red); }
.verdict-score { font-family: var(--mono); font-size: 38px; font-weight: 700; margin-top: 6px; line-height: 1; }
.verdict-score small { font-size: 14px; color: var(--text-mute); font-weight: 500; }

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 32px 44px;
}
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
}
.chart-card.chart-wide { grid-column: 1 / -1; }
.chart-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.chart-sub { font-size: 13px; color: var(--text-mute); margin-bottom: 16px; }
.chart-card canvas { max-height: 280px; }

/* ML Model validation card */
.ml-card {
  margin: 0 44px 24px;
  padding: 18px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ml-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
}
.ml-card-header svg { width: 16px; height: 16px; color: var(--brand); flex-shrink: 0; }
.ml-badge {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .04em;
  background: var(--surface-2);
  color: var(--text-mute);
}
.ml-badge.ml-badge-high   { background: var(--red-soft);   color: var(--red); }
.ml-badge.ml-badge-normal { background: var(--green-soft);  color: var(--green); }
.ml-badge.ml-badge-off    { background: var(--surface-2);   color: var(--text-mute); }
.ml-card-body { display: flex; flex-direction: column; gap: 3px; }
.ml-stat { font-size: 14px; font-weight: 600; color: var(--text); }
.ml-sub  { font-size: 12px; color: var(--text-mute); }

.recommendations {
  margin: 0 44px 32px;
  padding: 22px 26px;
  background: var(--brand-soft);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--brand);
}
.recommendations h3 { font-size: 15px; font-weight: 700; color: var(--brand); margin-bottom: 6px; }
.recommendations p { font-size: 14px; color: var(--text); line-height: 1.6; }

.report-footer-note {
  padding: 18px 44px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-mute);
  text-align: center;
}

.action-row {
  max-width: var(--container);
  margin: 24px auto 0;
  padding: 0 32px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 1100px) {
  .highlight-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .phase-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline-flow { grid-template-columns: repeat(2, 1fr); }
  .footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1024px) {
  .hero-full .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
  .hero-full h1 { font-size: 52px; }
  .hero-full .lead { font-size: 18px; }
}

/* Tablet breakpoint */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-cta   { display: none; }
  .mobile-toggle { display: flex; }

  .hero-full { min-height: auto; }
  .hero-full .container { padding-top: 50px; padding-bottom: 50px; }
  .hero-full h1 { font-size: 40px; }
  .hero-full .lead { font-size: 16px; }
  .hero-trust { flex-wrap: wrap; gap: 28px; }
  .ticker-item { padding: 14px 18px; }
  .ticker-item-value { font-size: 13px; }

  .page-hero { padding: 70px 0 50px; }
  .page-hero h1 { font-size: 34px; }
  .page-hero .lead { font-size: 15px; }
  .page-hero-compact { padding: 36px 0 24px; }
  .page-hero-compact h1 { font-size: 24px; }
  .page-hero-compact .btn-cancel { padding: 8px 14px; font-size: 12.5px; }

  section.section { padding: var(--space-section-sm) 0; }
  .section-head h2 { font-size: 28px; }
  .section-lead { font-size: 15px; }

  .highlight-grid, .flow, .phase-grid, .dataset-grid, .ref-grid, .threshold-grid {
    grid-template-columns: 1fr;
  }
  .ref-toc { grid-template-columns: 1fr 1fr; }
  .ref-lib-grid { grid-template-columns: 1fr; }
  .ref-card-v2 { padding: 22px 22px; }
  .ref-title { font-size: 16px; }
  .ref-year { margin-left: 0; }
  .ref-section-gap { margin-top: 44px; }
  .split-block, .split-block.reverse { grid-template-columns: 1fr; gap: 28px; }
  .split-block.reverse .split-img { order: 0; }
  .quote-banner-content { padding: 36px 28px; }
  .quote-text { font-size: 18px; }

  .pipeline-flow { grid-template-columns: 1fr; }
  .footer .container { grid-template-columns: 1fr; gap: 28px; }

  /* Test page: keep video larger; let sidebar follow naturally */
  .test-wrap { grid-template-columns: 1fr; padding: 24px 16px; gap: 20px; }
  .video-stage { min-height: 0; aspect-ratio: 4 / 3; }
  .test-right { order: 2; }
  .step-list { padding: 10px; }
  .step { padding: 10px; gap: 12px; }
  .step-title { font-size: 13px; }
  .step-desc  { font-size: 11.5px; }

  .report-header { grid-template-columns: 1fr; padding: 26px; }
  .verdict { text-align: left; }
  .report-grid { grid-template-columns: 1fr; padding: 22px; }
  .recommendations, .report-footer-note { margin: 0 22px 22px; padding: 18px 22px; }
  .chart-card canvas { max-height: 240px; }

  .next-page { padding: 28px; flex-direction: column; align-items: flex-start; gap: 18px; }
  .next-page-arrow { margin-left: 0; }
}

/* Small phone */
@media (max-width: 540px) {
  .ref-toc { grid-template-columns: 1fr; }
  .evid-grid { grid-template-columns: 1fr; }
}

/* Small tablet / large phone landscape */
@media (max-width: 768px) {
  section.section { padding: 48px 0; }
  section.section-tight { padding: 36px 0; }
  .container, .container-wide { padding: 0 22px; }
  .highlight-card { padding: 26px; }
  .quote-banner-content { padding: 30px 24px; }
  .quote-text { font-size: 17px; }
  .pipeline { padding: 22px; }
  .formula-block { padding: 26px; }
  .compare-bar-row { grid-template-columns: 50px 1fr 56px; gap: 8px; }
  .compare-bar-row .val { font-size: 11px; }
  .evid-grid { grid-template-columns: 1fr 1fr; }
  .ref-row { flex-wrap: wrap; gap: 8px; }
  .ref-row-year { display: none; }
}

@media (max-width: 540px) {
  .container, .container-wide { padding: 0 16px; }
  .nav-inner { padding: 12px 16px; }
  .brand-tag { display: none; }

  .hero-full h1 { font-size: 30px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Hide trust stats and face-scan visual on small phones */
  .hero-trust { display: none !important; }
  .hero-visual { display: none !important; }

  .page-hero { padding: 56px 0 40px; }
  .page-hero h1 { font-size: 26px; }

  .section-head h2 { font-size: 22px; }
  .highlight-card { padding: 24px; }
  .highlight-card h3 { font-size: 19px; }

  .formula-block { padding: 22px; }
  .formula { font-size: 11.5px; padding: 16px 18px; }
  .data-table { font-size: 12.5px; }
  .data-table th, .data-table td { padding: 12px 12px; }

  .test-wrap { padding: 16px 12px; }
  .phase-badge { top: 12px; left: 12px; padding: 6px 12px; font-size: 11px; }
  .progress-ring { top: 12px; right: 12px; width: 60px; height: 60px; }
  .ring-text { font-size: 18px; }
  .action-prompt { min-width: 0; width: calc(100% - 24px); padding: 14px 18px; bottom: 16px; }
  .prompt-text { font-size: 16px; }

  .next-page h3 { font-size: 20px; }

  /* Compact CTA strip on small phones */
  .next-page {
    padding: 16px 18px;
    gap: 12px;
    border-radius: 14px;
  }
  .next-page-meta { font-size: 10px; }
  .next-page h3 { font-size: 16px !important; margin-top: 2px; }
  .cta-action {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 9px;
  }
  div[style*="display:flex"][style*="flex-wrap:wrap"] {
    gap: 8px;
    margin-top: 6px !important;
  }
}
