/* ============================================================
   CCMRI — refined marketing design system (2026)
   Dark-first. WCAG 2.2 AA. No framework, no build step.
   Used by: index.html, platform-*.html, pricing.html, trust.html
   Legacy doc pages (privacy/terms/accessibility/sole-source)
   still load style.css until they are migrated.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand — mirrors style.css so the two systems can coexist */
  --navy:        #0a0e27;
  --navy-2:      #0d1235;
  --navy-3:      #131842;
  --indigo:      #4f46e5;
  --indigo-lt:   #818cf8;
  --amber:       #f59e0b;
  --amber-lt:    #fbbf24;
  --blue:        #3b82f6;
  --cyan:        #06b6d4;
  --green:       #10b981;

  /* Text on dark — all ≥ 4.5:1 on --navy */
  --ink:         #ffffff;
  --ink-2:       #c7d0e0;   /* body copy      ~11.6:1 */
  --ink-3:       #94a3b8;   /* secondary      ~7.1:1  */
  --ink-4:       #7c8aa0;   /* captions       ~5.1:1  */

  --line:        rgba(255,255,255,.09);
  --line-2:      rgba(255,255,255,.16);
  --surface:     rgba(255,255,255,.035);
  --surface-2:   rgba(255,255,255,.06);

  --radius:      14px;
  --radius-lg:   22px;
  --radius-pill: 999px;

  --maxw:        1180px;
  --maxw-prose:  68ch;

  /* Fluid type scale */
  --fs-display: clamp(2.4rem, 1.4rem + 3.6vw, 4rem);
  --fs-h1:      clamp(2.1rem, 1.4rem + 2.6vw, 3.1rem);
  --fs-h2:      clamp(1.7rem, 1.25rem + 1.7vw, 2.4rem);
  --fs-h3:      clamp(1.12rem, 1.02rem + .4vw, 1.3rem);
  --fs-body:    clamp(1rem, .97rem + .16vw, 1.08rem);
  --fs-lead:    clamp(1.08rem, 1rem + .45vw, 1.26rem);
  --fs-sm:      .92rem;
  --fs-xs:      .8rem;

  --space-section: clamp(64px, 8vw, 108px);

  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--ink-2);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -.021em;
  margin: 0 0 .5em;
  font-weight: 800;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -.012em; }
h4 { font-size: 1rem; font-weight: 700; }

p  { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--indigo-lt); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

strong, b { color: var(--ink); font-weight: 700; }
small { font-size: var(--fs-xs); }

/* WCAG 2.2 — 2.4.11 Focus Not Obscured + visible focus everywhere */
:focus-visible {
  outline: 3px solid var(--amber-lt);
  outline-offset: 3px;
  border-radius: 4px;
  scroll-margin-top: 96px;
}
/* Anchor targets clear the sticky header */
:target, [id] { scroll-margin-top: 92px; }

::selection { background: var(--indigo); color: #fff; }

/* ---------- 3. Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(18px, 4vw, 32px); }
.prose { max-width: var(--maxw-prose); }

section { padding-block: var(--space-section); position: relative; }
.section--tint  { background: var(--navy-2); }
.section--edge  { border-top: 1px solid var(--line); }

.stack > * + * { margin-top: 18px; }
.center { text-align: center; }
.center .prose { margin-inline: auto; }

.section-head { max-width: 60ch; margin-bottom: clamp(34px, 4.5vw, 54px); }
.section-head.center { margin-inline: auto; }

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--amber-lt); color: #1a1300;
  padding: 12px 20px; border-radius: 0 0 10px 10px;
  font-weight: 700; text-decoration: none;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 0; color: #1a1300; }

/* ---------- 5. Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber-lt);
  margin: 0 0 16px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--amber), transparent);
}
.eyebrow--plain::before { display: none; }

.grad {
  background: linear-gradient(100deg, #fbbf24 0%, #fcd34d 28%, #a5b4fc 70%, #818cf8 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.grad--green { background: linear-gradient(120deg, #34d399, var(--cyan)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.lead { font-size: var(--fs-lead); color: var(--ink-2); line-height: 1.6; }
.muted { color: var(--ink-3); }
.tiny  { font-size: var(--fs-xs); color: var(--ink-4); line-height: 1.6; }

/* ---------- 6. Buttons — WCAG 2.5.8 target ≥ 24px (we use ≥ 44px) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 12px 24px;
  border-radius: var(--radius-pill); border: 1px solid transparent;
  font: inherit; font-size: var(--fs-sm); font-weight: 650;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--indigo), #6366f1);
  color: #fff; box-shadow: 0 6px 20px -6px rgba(79,70,229,.75);
}
.btn--primary:hover { background: linear-gradient(135deg, #5b52ea, #7375f5); color: #fff; box-shadow: 0 10px 28px -8px rgba(79,70,229,.9); }

.btn--ghost { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.3); color: var(--ink); }

.btn--amber { background: linear-gradient(135deg, var(--amber), #ea9006); color: #17130a; box-shadow: 0 6px 20px -6px rgba(245,158,11,.6); }
.btn--amber:hover { color: #17130a; }

.btn--sm { min-height: 40px; padding: 9px 18px; font-size: .86rem; }
.btn--block { display: flex; width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-row.center { justify-content: center; }

/* ---------- 7. Header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,39,.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.hdr__inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 72px;
}
/* Brand lockup — must match style.css exactly so the logo is identical
   on every page: amber CC + blue MRI, 1.65rem, 38px mark. */
.brand {
  display: inline-flex; align-items: center; gap: 0;
  text-decoration: none; color: var(--white); font-weight: 800;
  font-size: 1.65rem; letter-spacing: -.02em; line-height: 1;
  margin-right: auto;
}
.brand:hover { color: var(--white); }
.brand svg { width: 38px; height: 38px; flex: none; margin-right: 12px; }
.brand > span { display: inline-flex; align-items: baseline; line-height: 1; }
.brand .cc  {
  color: var(--amber);
  text-shadow: 0 0 18px rgba(245,158,11,.15), 0 0 40px rgba(245,158,11,.06);
}
.brand .mri {
  color: var(--blue); position: relative; overflow: hidden; display: inline-block;
  text-shadow: 0 0 18px rgba(59,130,246,.18), 0 0 40px rgba(59,130,246,.07);
}
.brand .mri::after {
  content: ''; position: absolute; top: 0; left: -30%; width: 30%; height: 100%;
  z-index: 2; pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0) 10%,
    rgba(255,255,255,.12) 40%, rgba(255,255,255,.20) 50%,
    rgba(255,255,255,.12) 60%, rgba(255,255,255,0) 90%, transparent 100%);
  animation: mriScanLR 3s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .brand .mri::after { animation: none; } }
@keyframes mriScanLR { 0% { left: -30%; } 55%, 100% { left: 110%; } }
.brand sup  { font-size: .5em; opacity: .55; margin-left: 2px; }
@media (max-width: 480px) { .brand { font-size: 1.35rem; } .brand svg { width: 32px; height: 32px; margin-right: 9px; } }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a.nav__link {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 8px 13px; border-radius: 9px;
  color: var(--ink-2); text-decoration: none;
  font-size: .93rem; font-weight: 550;
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.nav a.nav__link:hover { color: var(--ink); background: var(--surface-2); }
.nav a.nav__link[aria-current="page"] { color: var(--ink); background: var(--surface-2); }
.nav__cta { margin-left: 10px; }

/* Mobile nav */
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  background: var(--surface-2); border: 1px solid var(--line-2);
  border-radius: 10px; color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px clamp(18px, 4vw, 32px) 26px;
    background: var(--navy-2); border-bottom: 1px solid var(--line);
    max-height: calc(100dvh - 72px); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .18s var(--ease), transform .18s var(--ease);
  }
  .nav[data-open="true"] { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a.nav__link { min-height: 48px; font-size: 1rem; }
  .nav__cta { margin: 8px 0 0; }
}

/* ---------- 8. Hero ---------- */
.hero { padding-block: clamp(56px, 8vw, 104px) clamp(52px, 7vw, 92px); overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(58% 46% at 16% 4%, rgba(79,70,229,.20), transparent 62%),
    radial-gradient(46% 40% at 92% 12%, rgba(245,158,11,.13), transparent 62%);
}
.hero h1 { font-size: var(--fs-display); margin-bottom: 20px; }
.hero .lead { max-width: 60ch; }

/* ---------- 9. Cards & bento ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 28px);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.card--hover:hover { border-color: var(--line-2); background: var(--surface-2); transform: translateY(-2px); }
.card--flush { padding: 0; overflow: hidden; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.card__icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center; margin-bottom: 15px;
  background: rgba(79,70,229,.16); border: 1px solid rgba(129,140,248,.28);
  font-size: 1.15rem;
}
.card__icon--amber { background: rgba(245,158,11,.14); border-color: rgba(251,191,36,.3); }
.card__icon--green { background: rgba(16,185,129,.14); border-color: rgba(52,211,153,.3); }

.grid { display: grid; gap: clamp(14px, 1.8vw, 22px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* Bento: 3-up where the first tile spans wide on large screens */
.bento { display: grid; gap: clamp(14px, 1.8vw, 22px); grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
@media (min-width: 900px) {
  .bento--lead > :first-child { grid-column: span 2; }
}

/* ---------- 10. Stats ---------- */
.stat { }
.stat__num {
  display: block;
  font-size: clamp(1.9rem, 1.2rem + 2.3vw, 2.9rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -.03em;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.stat__num--amber { color: var(--amber-lt); }
.stat__num--green { color: #34d399; }
.stat__label { display: block; margin-top: 7px; font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.45; }

/* ---------- 11. Pills / badges ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 9px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 32px; padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600;
  white-space: nowrap; max-width: 100%;
}
/* Long status pills must wrap rather than push the page wide */
@media (max-width: 640px) { .pill { white-space: normal; } }
.pill--ok    { background: rgba(16,185,129,.12); border-color: rgba(52,211,153,.32); color: #6ee7b7; }
.pill--prog  { background: rgba(245,158,11,.12); border-color: rgba(251,191,36,.32); color: var(--amber-lt); }

/* ---------- 12. Tables — GEO-friendly, mobile-safe ---------- */
.table-scroll {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius);
  container-type: inline-size;   /* lets narrow tables drop their min-width */
}
.table-scroll:focus-visible { outline: 3px solid var(--amber-lt); }
table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; }
table.tbl caption { text-align: left; padding: 14px 16px 0; color: var(--ink-3); font-size: var(--fs-xs); }
.tbl th, .tbl td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th {
  color: var(--ink); font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  background: rgba(255,255,255,.04);
  position: sticky; top: 0;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: rgba(255,255,255,.025); }
.tbl td strong { color: var(--ink); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 13. Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.step__n {
  counter-increment: step; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; color: var(--ink);
  background: rgba(79,70,229,.2); border: 1px solid rgba(129,140,248,.35);
  font-variant-numeric: tabular-nums;
}
.step__n::before { content: counter(step); }
.step h3 { margin-bottom: 4px; }

/* ---------- 14. FAQ (GEO payload) ---------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.faq details[open] { border-color: var(--line-2); background: var(--surface-2); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 17px 52px 17px 20px; position: relative;
  color: var(--ink); font-weight: 650; font-size: 1.02rem; line-height: 1.4;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%); font-size: 1.4rem; font-weight: 400;
  color: var(--amber-lt); line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { background: rgba(255,255,255,.03); }
.faq .faq__a { padding: 0 20px 19px; }
.faq .faq__a > :first-child { margin-top: 0; }

/* ---------- 15. Callout / note ---------- */
.note {
  border-left: 3px solid var(--amber);
  background: rgba(245,158,11,.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; font-size: var(--fs-sm); color: var(--ink-2);
}
.note--indigo { border-left-color: var(--indigo-lt); background: rgba(79,70,229,.09); }
.note strong { color: var(--ink); }

/* ---------- 16. CTA band ---------- */
.cta-band {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(70% 130% at 12% 0%, rgba(79,70,229,.26), transparent 60%),
    radial-gradient(60% 120% at 95% 100%, rgba(245,158,11,.15), transparent 60%),
    var(--navy-3);
  padding: clamp(30px, 5vw, 56px);
}
.cta-band h2 { margin-bottom: 12px; }

/* ---------- 17. Footer ---------- */
.ftr { border-top: 1px solid var(--line); background: var(--navy-2); padding-block: clamp(44px, 5vw, 66px) 30px; }
.ftr__grid { display: grid; gap: clamp(24px, 4vw, 44px); grid-template-columns: 1fr; }
@media (min-width: 560px) { .ftr__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .ftr__grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } }
.ftr h3, .ftr h4 { color: var(--ink); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 13px; }
.ftr__col { display: flex; flex-direction: column; }
/* WCAG 2.5.8 — footer links get real height, not a dense stack */
.ftr__col a {
  display: block; padding: 7px 0; min-height: 24px;
  color: var(--ink-3); text-decoration: none; font-size: var(--fs-sm);
}
.ftr__col a:hover { color: var(--ink); text-decoration: underline; }
.ftr__bottom {
  margin-top: clamp(28px, 4vw, 44px); padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--ink-4);
}

/* ---------- 18. Reveal (motion-safe) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- 19. Utilities ---------- */
.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;
}
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-l { margin-top: clamp(28px, 4vw, 44px); }
.hr { height: 1px; background: var(--line); border: 0; margin-block: clamp(30px, 4vw, 48px); }

/* ---------- 20. Print ---------- */
@media print {
  .hdr, .nav, .skip-link, .cta-band, .btn { display: none !important; }
  body { background: #fff; color: #111; }
  h1, h2, h3, strong { color: #000; }
  .card { border-color: #ccc; }
}

/* ---------- 21. Lead form ---------- */
.lead-form { margin-top: clamp(24px, 3vw, 32px); text-align: left; }
.lead-form__grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .lead-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lead-form label.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.lead-form input {
  width: 100%; min-height: 48px; padding: 12px 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--ink); font: inherit; font-size: var(--fs-sm);
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.lead-form input::placeholder { color: var(--ink-4); }
.lead-form input:hover { background: rgba(255,255,255,.09); }
.lead-form input:focus {
  outline: 3px solid var(--amber-lt); outline-offset: 2px;
  border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.1);
}
.lead-form input[aria-invalid="true"] { border-color: #f87171; }
.lead-form__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 14px; }
.lead-form__note { margin-top: 12px; }
.form-status { margin-top: 14px; font-size: var(--fs-sm); }
.form-status[data-state="error"] { color: #fca5a5; }
.form-success {
  border: 1px solid rgba(52,211,153,.4);
  background: rgba(16,185,129,.12);
  border-radius: var(--radius);
  padding: 20px 22px; color: #a7f3d0; font-size: var(--fs-body);
}
.form-success strong { color: #d1fae5; }

/* ---------- 22. Stacked table (wide prose tables on mobile) ---------- */
@media (max-width: 760px) {
  /* `table.tbl` has higher specificity than `.tbl--stack`, so qualify it */
  table.tbl--stack { min-width: 0; }
  .tbl--stack caption { display: block; width: 100%; padding: 14px 16px 4px; }
  .tbl--stack thead { display: none; }
  .tbl--stack, .tbl--stack tbody, .tbl--stack tr, .tbl--stack th, .tbl--stack td { display: block; width: 100%; }
  .tbl--stack tr { border-bottom: 1px solid var(--line-2); padding: 10px 0 16px; }
  .tbl--stack tr:last-child { border-bottom: 0; }
  .tbl--stack th[scope="row"] { border: 0; padding: 12px 16px 4px; font-size: 1.02rem; }
  .tbl--stack td { border: 0; padding: 6px 16px; }
  .tbl--stack td::before {
    content: attr(data-label);
    display: block; margin-bottom: 3px;
    font-size: var(--fs-xs); font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--ink-4);
  }
  .tbl--stack td.num { white-space: normal; }
}

/* ---------- 23. Framework toggle demo (legacy ↔ 2031) ---------- */
.seg {
  display: inline-flex; padding: 4px; gap: 4px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line-2); border-radius: var(--radius-pill);
}
.seg__btn {
  min-height: 40px; padding: 9px 20px;
  border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--ink-3);
  font: inherit; font-size: var(--fs-sm); font-weight: 650;
  cursor: pointer; white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.seg__btn:hover { color: var(--ink); }
.seg__btn[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--indigo), #6366f1);
  color: #fff; box-shadow: 0 4px 14px -4px rgba(79,70,229,.7);
}

.fw__bar {
  display: flex; flex-wrap: wrap; gap: 20px 32px;
  align-items: center; justify-content: space-between;
  padding: 20px 22px; margin-bottom: 18px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.fw__rate { display: flex; align-items: baseline; gap: 12px; margin: 0; }
.fw__num {
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.6rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums;
  color: var(--ink); transition: color .25s var(--ease);
}
.fw[data-framework="y2031"] .fw__num { color: var(--amber-lt); }
.fw__cap { font-size: var(--fs-xs); color: var(--ink-3); max-width: 26ch; line-height: 1.45; }

/* the active lens column lifts; the other recedes */
.fw .tbl [data-col="legacy"], .fw .tbl [data-col="y2031"] { transition: opacity .25s var(--ease); }
.fw[data-framework="legacy"] .tbl [data-col="y2031"] { opacity: .38; }
.fw[data-framework="y2031"] .tbl [data-col="legacy"] { opacity: .38; }
.fw .tbl [data-col="next"] { color: var(--ink); }
.fw__note { margin-top: 16px; }
.fw .tbl th[scope="row"] { white-space: nowrap; }
@media (max-width: 760px) { .fw .tbl th[scope="row"] { white-space: normal; } }
@media (max-width: 640px) {
  .fw__bar { padding: 16px; }
  .seg { width: 100%; }
  .seg__btn { flex: 1; padding: 9px 12px; }
}

/* ---------- 24. Platform dropdown menu ---------- */
.nav__item { position: relative; display: flex; }
.nav__disclosure {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 0; cursor: pointer;
  /* a <button> does NOT inherit colour — it falls back to buttontext (black) */
  color: var(--ink-2);
  font: inherit; font-size: .93rem; font-weight: 550;
  padding: 8px 13px; border-radius: 9px; min-height: 40px;
  transition: color .16s var(--ease), background-color .16s var(--ease);
}
.nav__disclosure:hover { color: var(--ink); background: var(--surface-2); }
.nav__chev { width: 13px; height: 13px; flex: none; transition: transform .18s var(--ease); }
.nav__disclosure[aria-expanded="true"] { color: var(--ink); background: var(--surface-2); }
.nav__disclosure[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }

.nav__menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 120;
  min-width: 340px; padding: 8px;
  background: var(--navy-3);
  border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 20px 44px -14px rgba(0,0,0,.75);
}
.nav__menu[hidden] { display: none; }
.nav__menu a {
  display: block; padding: 11px 14px; border-radius: 10px;
  text-decoration: none; color: var(--ink);
}
.nav__menu a:hover, .nav__menu a:focus-visible { background: var(--surface-2); color: var(--ink); }
.nav__menu strong { display: block; font-size: .95rem; font-weight: 650; }
.nav__menu span { display: block; margin-top: 2px; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.45; }
.nav__menu-foot {
  margin-top: 4px; padding: 10px 14px; border-top: 1px solid var(--line);
  font-size: var(--fs-xs); color: var(--ink-3);
}
.nav__menu-foot a { display: inline; padding: 0; color: var(--indigo-lt); }

@media (max-width: 900px) {
  .nav__item { position: static; display: block; }
  .nav__disclosure { width: 100%; justify-content: space-between; min-height: 48px; padding: 8px 13px; font-size: 1rem; }
  .nav__menu { position: static; min-width: 0; margin: 2px 0 6px; box-shadow: none; background: rgba(255,255,255,.04); }
}

/* ---------- 25. Narrow-container tables (must come after table.tbl) ---------- */
/* A table sitting in a narrow card must fit it, not bleed out and clip. */
@container (max-width: 560px) {
  table.tbl { min-width: 0; }
  table.tbl th, table.tbl td { padding: 11px 12px; }
  table.tbl .num { white-space: normal; }
}

/* ---------- 26. Restored legacy↔2031 animated widget (from the previous site) ---------- */
/* Aliases so the widget's inline styles + JS colour names resolve here too */
:root { --indigo-light: var(--indigo-lt); --gray-400: var(--ink-3); --white: #ffffff; }

.interactive-widget {
  background: #0f172a; border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.linear-chart {
  width: 100%; height: 24px; border-radius: 100px;
  background: rgba(255,255,255,0.03); display: flex; overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.05); margin-bottom: 16px;
}
.linear-segment {
  height: 100%;
  transition: width .8s cubic-bezier(.4,0,.2,1), background-color .8s ease;
  box-shadow: inset 0 1px 1px rgba(255,255,255,.2);
}
@media (prefers-reduced-motion: reduce) { .linear-segment { transition: none; } }
.legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; color: var(--ink-3);
  transition: opacity .5s ease;
}
.legend-item.hidden, .hidden { display: none !important; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend-val { color: #fff; font-weight: 800; }

.dash-table-wrapper {
  position: relative; min-height: 160px; overflow-x: auto; padding: 0;
  transition: filter .5s ease;
}
.ccmr-table {
  position: absolute; top: 0; left: 0; width: 100%;
  opacity: 0; visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease; z-index: 1;
}
.ccmr-table.active { opacity: 1; visibility: visible; z-index: 2; position: relative; }
.toggle-btn { font: inherit; cursor: pointer; }

/* widget layout rules that belong with the restored component */
.dash-header { padding: 12px 16px !important; }
.dash-visuals {
  display: flex; flex-direction: column; gap: 16px;
  padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.linear-container {
  flex: 1.5; display: flex; flex-direction: column;
  justify-content: center; align-items: center; width: 100%;
}
.linear-legend {
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: center; width: 100%;
}

/* ---------- 27. District lookup hook (under the hero) ---------- */
.hook { display: grid; gap: clamp(22px, 3vw, 40px); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hook { grid-template-columns: 1.35fr 1fr; } }
.hook__form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hook__form input {
  flex: 1 1 260px; min-height: 50px; padding: 12px 18px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line-2);
  border-radius: var(--radius-pill); color: var(--ink); font: inherit;
}
.hook__form input::placeholder { color: var(--ink-4); }
.hook__form input:focus { outline: 3px solid var(--amber-lt); outline-offset: 2px; background: rgba(255,255,255,.1); }
.hook__stats { display: grid; gap: 14px; }
.hook__stat { display: flex; align-items: baseline; gap: 18px; }
.hook__stat b {
  font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem); font-weight: 800;
  color: var(--amber-lt); font-variant-numeric: tabular-nums; line-height: 1;
  min-width: 6ch; text-align: right; white-space: nowrap; flex: none;
}
.hook__stat span { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.45; }
