/* ==========================================================================
   NeuroBoostZR Staging Demo — Design System
   Tokens per neuro-verd-demo-prd.md §1.5. No build step, no framework.
   ========================================================================== */

:root {
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --emerald-500: #10b981;
  --mint-50: #f0fdf4;
  --amber-500: #f59e0b;
  --surface: #f8fafc;
  --white: #ffffff;
  --ring: 0 0 0 3px rgba(13, 148, 136, 0.35);
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.16);
  --ease-drawer: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--slate-900);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5rem; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--teal-700); }
img, svg { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--teal-600);
  outline-offset: 2px;
  box-shadow: var(--ring);
  border-radius: 6px;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--tint { background: var(--mint-50); }
.section-head { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.section-head p { color: var(--slate-700); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
}
.site-header .container {
  display: flex; align-items: center; gap: 20px;
  min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.2rem; color: var(--slate-900);
  text-decoration: none; letter-spacing: -0.01em;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--teal-600), var(--emerald-500));
  display: grid; place-items: center; color: #fff; flex: none;
}
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  text-decoration: none; color: var(--slate-700); font-weight: 600; font-size: 0.95rem;
  padding: 8px 12px; border-radius: 8px; transition: all 300ms ease-in-out;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: var(--teal-700); background: var(--mint-50);
}
.header-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 0.95rem;
  padding: 11px 20px; border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  transition: all 300ms ease-in-out;
}
.btn svg { flex: none; }
.btn--primary { background: var(--teal-600); color: #fff; }
.btn--primary:hover { background: var(--teal-700); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--outline { background: transparent; color: var(--teal-700); border-color: var(--teal-600); }
.btn--outline:hover { background: var(--mint-50); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--slate-700); }
.btn--ghost:hover { background: var(--slate-200); }
.btn--light { background: #fff; color: var(--teal-700); }
.btn--light:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--lg { padding: 14px 26px; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(16, 185, 129, 0.16), transparent 60%),
    radial-gradient(900px 420px at -10% 10%, rgba(13, 148, 136, 0.14), transparent 55%),
    linear-gradient(180deg, #10243c 0%, var(--slate-900) 100%);
  color: #fff; padding: 72px 0 64px;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16, 185, 129, 0.15); color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.85rem; font-weight: 700; padding: 6px 14px; border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 { color: #fff; max-width: 21ch; }
.hero .sub { color: #cbd5e1; font-size: 1.1rem; max-width: 62ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 8px; }
.hero-note { color: #94a3b8; font-size: 0.9rem; }

/* ---------- Audience gateway cards ---------- */
.gateway { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.gateway-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg); padding: 26px;
  transition: all 300ms ease-in-out;
}
.gateway-card:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.09); }
.gateway-card .tag {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #6ee7b7; margin-bottom: 8px;
}
.gateway-card h3 { color: #fff; font-size: 1.25rem; }
.gateway-card p { color: #cbd5e1; font-size: 0.95rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--white); border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm);
  transition: all 300ms ease-in-out;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(13, 148, 136, 0.35); }
.card h3 { color: var(--slate-900); }
.card p { color: var(--slate-700); font-size: 0.95rem; }

.card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--mint-50); color: var(--teal-700);
  display: grid; place-items: center; margin-bottom: 14px;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--mint-50); color: var(--teal-700);
  border: 1px solid rgba(13, 148, 136, 0.3);
}
.badge--emerald { background: #ecfdf5; color: #047857; border-color: rgba(16, 185, 129, 0.4); }
.badge--amber { background: #fffbeb; color: #b45309; border-color: rgba(245, 158, 11, 0.4); }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- Founders ---------- */
.founder { display: flex; gap: 18px; align-items: flex-start; }
.founder-avatar {
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.4rem;
  background: linear-gradient(135deg, var(--teal-600), var(--teal-700));
}
.founder .role { color: var(--teal-700); font-weight: 600; font-size: 0.9rem; }
.founder p { font-size: 0.92rem; }

/* ---------- ROI callout ---------- */
.roi-callout {
  background: linear-gradient(135deg, #ecfdf5, var(--mint-50));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg); padding: 28px;
}
.roi-callout .big {
  font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; color: #047857;
  letter-spacing: -0.02em;
}
.roi-callout p { color: #065f46; margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--slate-900); color: #94a3b8; padding: 40px 0; margin-top: 40px; }
.site-footer .container { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.site-footer a { color: #cbd5e1; }
.site-footer .fine { font-size: 0.85rem; max-width: 60ch; }

/* ==========================================================================
   Layer B — Guided Tour & Technical Insight overlay
   ========================================================================== */
.tour-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--slate-900); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px; padding: 13px 20px;
  font-family: inherit; font-size: 0.92rem; font-weight: 700;
  cursor: pointer; box-shadow: var(--shadow-lg);
  transition: all 300ms ease-in-out;
}
.tour-fab:hover { transform: translateY(-2px); background: #1e293b; }
.tour-fab .dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--amber-500); flex: none;
  animation: nb-pulse 1.8s ease-in-out infinite;
}
@keyframes nb-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.tour-backdrop {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 300ms ease-in-out;
}
.tour-backdrop.is-open { opacity: 1; pointer-events: auto; }

.tour-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
  width: min(430px, 94vw);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-left: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: -24px 0 60px rgba(15, 23, 42, 0.25);
  transform: translateX(105%);
  transition: transform 420ms var(--ease-drawer);
  display: flex; flex-direction: column;
}
.tour-drawer.is-open { transform: translateX(0); }

.tour-drawer__head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 22px 22px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.tour-drawer__head h2 { font-size: 1.05rem; margin: 0; }
.tour-drawer__head .crumb { color: var(--slate-500); font-size: 0.82rem; font-weight: 600; }
.tour-close {
  margin-left: auto; flex: none;
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--slate-200);
  background: #fff; color: var(--slate-700); cursor: pointer;
  display: grid; place-items: center;
  transition: all 300ms ease-in-out;
}
.tour-close:hover { background: var(--slate-200); }
.tour-drawer__body { overflow-y: auto; padding: 18px 22px 30px; flex: 1; }

.tour-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.tour-card h3 {
  display: flex; align-items: center; gap: 9px;
  font-size: 0.95rem; margin: 0 0 8px; color: var(--slate-900);
}
.tour-card h3 .ico { color: var(--teal-700); display: grid; place-items: center; }
.tour-card p { margin: 0; color: var(--slate-700); font-size: 0.92rem; }
.tour-card--impact p strong { color: #047857; }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.field .hint { color: var(--slate-500); font-size: 0.82rem; margin-top: 5px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="date"], .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 0.95rem; color: var(--slate-900);
  background: #fff; border: 1.5px solid var(--slate-200); border-radius: 10px;
  padding: 11px 14px; transition: border-color 300ms ease-in-out, box-shadow 300ms ease-in-out;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--teal-600); outline: none; box-shadow: var(--ring);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.checkbox {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.93rem; color: var(--slate-700); padding: 10px 0;
}
.checkbox input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--teal-600); flex: none; }

/* Selection cards (wizard step 1) */
.select-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.select-card {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 2px solid var(--slate-200); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; transition: all 300ms ease-in-out;
}
.select-card:hover { border-color: rgba(13, 148, 136, 0.5); transform: translateY(-2px); }
.select-card input { position: absolute; opacity: 0; pointer-events: none; }
.select-card .box {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--slate-200);
  flex: none; margin-top: 2px; display: grid; place-items: center;
  color: transparent; transition: all 300ms ease-in-out;
}
.select-card input:checked ~ .box { background: var(--teal-600); border-color: var(--teal-600); color: #fff; }
.select-card input:checked ~ .sc-body h4 { color: var(--teal-700); }
.select-card:has(input:checked) { border-color: var(--teal-600); background: var(--mint-50); box-shadow: var(--ring); }
.select-card input:focus-visible ~ .box { outline: 2px solid var(--teal-600); outline-offset: 2px; }
.select-card h4 { margin: 0 0 2px; font-size: 0.95rem; }
.select-card p { margin: 0; font-size: 0.82rem; color: var(--slate-500); }

/* Toggle (wizard step 3) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch .track {
  width: 52px; height: 30px; border-radius: 999px; background: var(--slate-200);
  position: relative; transition: background 300ms ease-in-out; flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm);
  transition: transform 300ms var(--ease-drawer);
}
.switch input:checked + .track { background: #dc2626; }
.switch input:checked + .track::after { transform: translateX(22px); }
.switch input:focus-visible + .track { outline: 2px solid var(--teal-600); outline-offset: 2px; }
.switch .label-text { font-weight: 600; }

/* ==========================================================================
   Wizard (screener)
   ========================================================================== */
.wizard {
  background: #fff; border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  max-width: 760px; margin: 0 auto; overflow: hidden;
}
.wizard-progress { background: var(--surface); padding: 18px 26px 0; }
.wizard-progress .meta {
  display: flex; justify-content: space-between; font-size: 0.85rem;
  font-weight: 700; color: var(--slate-700); margin-bottom: 8px;
}
.wizard-progress .bar { height: 8px; background: var(--slate-200); border-radius: 999px; overflow: hidden; }
.wizard-progress .fill {
  height: 100%; width: 25%; border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-600), var(--emerald-500));
  transition: width 420ms var(--ease-drawer);
}
.wizard-steps { padding: 26px; }
.wizard-step[hidden] { display: none; }
.wizard-step h2 { font-size: 1.3rem; margin-bottom: 6px; }
.wizard-step > p { color: var(--slate-500); font-size: 0.92rem; }
.wizard-nav {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 0 26px 26px;
}
.safety-flag {
  display: none; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius);
  background: #fef2f2; border: 1px solid rgba(220, 38, 38, 0.35); color: #991b1b;
  font-size: 0.92rem; font-weight: 600;
}
.safety-flag.is-visible { display: block; }

/* Result badge */
.result-badge {
  display: flex; gap: 14px; align-items: center;
  background: linear-gradient(135deg, #ecfdf5, var(--mint-50));
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px;
}
.result-badge .score {
  width: 58px; height: 58px; border-radius: 14px; flex: none;
  background: var(--emerald-500); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1.5rem;
}
.result-badge h3 { color: #065f46; margin: 0 0 2px; }
.result-badge p { margin: 0; color: #047857; font-size: 0.88rem; }

/* ==========================================================================
   Insurance verification
   ========================================================================== */
.cpt-card .code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-weight: 700; color: var(--teal-700); font-size: 1.05rem;
}
.cpt-card .rate { color: #047857; font-weight: 700; font-size: 0.9rem; }

.verify-panel {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 28px; max-width: 760px; margin: 0 auto;
}
.spinner {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 3px solid rgba(13, 148, 136, 0.25); border-top-color: var(--teal-600);
  animation: nb-spin 0.8s linear infinite; display: none;
}
.spinner.is-visible { display: inline-block; }
@keyframes nb-spin { to { transform: rotate(360deg); } }

.verify-status { margin-top: 22px; }
.verify-status[hidden] { display: none; }
.status-confirmed {
  display: flex; gap: 14px; align-items: flex-start;
  background: #ecfdf5; border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius); padding: 18px 20px;
}
.status-confirmed .ico { color: var(--emerald-500); flex: none; margin-top: 2px; }
.status-confirmed h3 { color: #065f46; }
.status-confirmed p { color: #047857; font-size: 0.92rem; }
.preauth-list { list-style: none; padding: 0; margin: 14px 0 0; }
.preauth-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.9rem; color: var(--slate-700); padding: 6px 0;
}
.preauth-list li svg { color: var(--emerald-500); flex: none; margin-top: 3px; }

/* ==========================================================================
   EHR sync pipeline
   ========================================================================== */
.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; margin: 26px 0; }
.pipe-node {
  background: #fff; border: 1.5px solid var(--slate-200); border-radius: var(--radius);
  padding: 18px 16px; text-align: center; transition: all 300ms ease-in-out;
}
.pipe-node h4 { margin: 8px 0 4px; font-size: 0.92rem; }
.pipe-node p { margin: 0; font-size: 0.8rem; color: var(--slate-500); }
.pipe-node .pico { color: var(--teal-700); display: grid; place-items: center; }
.pipe-node.is-active { border-color: var(--teal-600); background: var(--mint-50); box-shadow: var(--ring); transform: translateY(-2px); }
.pipe-node.is-done { border-color: rgba(16, 185, 129, 0.5); background: #ecfdf5; }
.pipe-arrow { display: grid; place-items: center; color: var(--slate-500); }
.pipe-arrow.done { color: var(--emerald-500); }

.osmind-chart {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden; max-width: 760px; margin: 0 auto;
}
.osmind-chart[hidden] { display: none; }
.osmind-chart .bar {
  background: var(--slate-900); color: #fff; padding: 12px 20px;
  display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.92rem;
}
.osmind-chart .bar .chip {
  margin-left: auto; background: rgba(16, 185, 129, 0.2); color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45); border-radius: 999px;
  font-size: 0.75rem; padding: 3px 10px;
}
.osmind-chart dl {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0;
  margin: 0; padding: 10px 0;
}
.osmind-chart dl > div { padding: 12px 20px; border-bottom: 1px solid var(--slate-200); }
.osmind-chart dt { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-500); }
.osmind-chart dd { margin: 3px 0 0; font-weight: 600; font-size: 0.95rem; }
.score-chip {
  display: inline-block; border-radius: 999px; padding: 2px 10px;
  background: #fef2f2; color: #991b1b; border: 1px solid rgba(220, 38, 38, 0.35);
  font-size: 0.85rem;
}

/* ==========================================================================
   B2B referral portal
   ========================================================================== */
.portal-banner {
  background: linear-gradient(135deg, #10243c, var(--slate-900));
  color: #fff; border-radius: var(--radius-lg); padding: 26px 28px;
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
}
.portal-banner .host {
  font-family: ui-monospace, Consolas, monospace; font-size: 1.1rem; font-weight: 700;
}
.portal-banner p { margin: 4px 0 0; color: #cbd5e1; font-size: 0.92rem; }
.security-badge {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7; font-size: 0.82rem; font-weight: 700;
  padding: 8px 14px; border-radius: 999px;
}

.dropzone {
  border: 2px dashed var(--slate-200); border-radius: var(--radius);
  padding: 30px 20px; text-align: center; color: var(--slate-500);
  cursor: pointer; transition: all 300ms ease-in-out; background: #fff;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--teal-600); background: var(--mint-50); color: var(--teal-700); }
.dropzone .dico { display: grid; place-items: center; margin-bottom: 8px; color: var(--teal-600); }
.dropzone strong { color: var(--slate-700); }
.dropzone .file-ok { color: #047857; font-weight: 700; display: none; }
.dropzone.has-file .file-ok { display: block; }
.dropzone.has-file .file-hint { display: none; }

.tracker {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.tracker .thead {
  background: var(--surface); padding: 14px 20px; font-weight: 800;
  border-bottom: 1px solid var(--slate-200); display: flex; align-items: center; gap: 10px;
}
.tracker-row { padding: 16px 20px; border-bottom: 1px solid var(--slate-200); }
.tracker-row:last-child { border-bottom: 0; }
.tracker-row .t-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.tracker-row .t-top strong { font-size: 0.95rem; }
.tracker-row .t-meta { color: var(--slate-500); font-size: 0.85rem; }
.tracker-row .t-bar { height: 7px; border-radius: 999px; background: var(--slate-200); overflow: hidden; margin: 8px 0 6px; }
.tracker-row .t-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-600), var(--emerald-500)); border-radius: 999px; }
.phq-delta { font-size: 0.85rem; font-weight: 700; color: #047857; }

/* ==========================================================================
   JSON-LD schema viewer
   ========================================================================== */
.code-window {
  background: var(--slate-900); color: #e2e8f0; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg); text-align: left;
}
.code-window .bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: #1e293b; color: #94a3b8; font-size: 0.8rem; font-weight: 600;
}
.code-window .bar .dots { display: flex; gap: 6px; }
.code-window .bar .dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-500); }
.code-window pre {
  margin: 0; padding: 18px 20px; overflow: auto;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem; line-height: 1.55; max-height: 420px;
}
.code-window pre .k { color: #6ee7b7; }
.code-window pre .s { color: #fbbf24; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 70; background: rgba(15, 23, 42, 0.55);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg); max-width: 720px; width: 100%;
  max-height: 86vh; overflow: auto; box-shadow: var(--shadow-lg);
}
.modal .modal-head {
  display: flex; align-items: center; gap: 12px; padding: 18px 22px;
  border-bottom: 1px solid var(--slate-200);
}
.modal .modal-head h3 { margin: 0; }
.modal .modal-body { padding: 22px; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.stack-sm > * + * { margin-top: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr; }
  .pipe-arrow { transform: rotate(90deg); padding: 2px 0; }
}
@media (max-width: 680px) {
  .gateway, .grid--2, .grid--3, .grid--4, .select-cards, .field-row { grid-template-columns: 1fr; }
  .osmind-chart dl { grid-template-columns: 1fr; }
  .header-actions { margin-left: 0; width: 100%; }
  .tour-fab { right: 14px; bottom: 14px; padding: 11px 16px; font-size: 0.85rem; }
}
