/* Utah Schools FYI — "Follow the Money" design system */

:root {
  --navy: #082F49;
  --slate: #172033;
  --yellow: #FACC15;
  --white: #FFFFFF;
  --gray-200: #E5E7EB;
  --gray-50: #F8FAFC;
  --ink: #0F172A;
  --ink-2: #334155;
  --ink-3: #64748B;

  --positive: #15803D;
  --investigate: #D97706;
  --negative: #DC2626;
  --info: #2563EB;

  --d-tooele: #FACC15;
  --d-iron: #2563EB;
  --d-cache: #0D9488;
  --d-boxelder: #7C3AED;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --max: 1200px;
  --font: "Inter", "IBM Plex Sans", "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--gray-50);
  font-feature-settings: "cv11", "ss01";
}
@media (max-width: 640px) { body { font-size: 16px; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--info); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
.on-light :focus-visible, main :focus-visible { outline-color: var(--info); }

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; color: var(--navy); }
h1 { font-size: clamp(36px, 6vw, 68px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.num, .tabular { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--yellow); color: var(--navy); padding: 8px 14px; border-radius: 6px; font-weight: 700; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; min-height: 72px; max-width: 1640px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; gap: 0; margin-left: auto; align-items: center; }
.nav a { color: #CBD5E1; text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 9px; border-radius: 6px; white-space: nowrap; }
.nav a:hover { color: var(--white); background: rgba(255,255,255,.06); }
.nav a[aria-current="page"] { color: var(--white); box-shadow: inset 0 -3px 0 var(--yellow); border-radius: 0; }
.header-tools { display: flex; gap: 8px; align-items: center; }
.search-btn { background: transparent; border: 1px solid rgba(255,255,255,.2); color: var(--white); border-radius: 6px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.search-btn:hover { border-color: rgba(255,255,255,.45); }
.menu-btn { display: none; }

@media (max-width: 1560px) { .header-tools .btn-updates { display: none; } }
@media (max-width: 1420px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--slate); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 0; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid rgba(255,255,255,.06); border-radius: 0; font-size: 17px; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--yellow); padding-left: 16px; }
  .header-tools { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  .header-tools .btn-updates { display: none; }
}
@media (max-width: 600px) { .brand img { height: 22px; } .search-btn .label { display: none; } .site-header .wrap { gap: 12px; } }
@media (max-width: 360px) { .brand img { height: 18px; } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; font-size: 16px; padding: 13px 22px; border-radius: 8px; text-decoration: none; cursor: pointer; border: 2px solid transparent; line-height: 1.2; }
.btn-primary { background: var(--yellow); color: var(--navy); }
.btn-primary:hover { background: #FDE047; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,.06); }
.btn-outline { background: var(--white); color: var(--navy); border-color: var(--gray-200); }
.btn-outline:hover { border-color: var(--navy); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.link-arrow { font-weight: 700; font-size: 15px; color: var(--info); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }
.dark .link-arrow { color: var(--yellow); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy); color: var(--white); overflow: hidden; isolation: isolate; }
.hero::before { /* place a Tooele Valley photograph at assets/hero.jpg to enable */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--hero-img, none) center 60% / cover no-repeat; opacity: .35;
}
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,47,73,.55) 0%, rgba(8,47,73,.9) 70%, var(--navy) 100%); }
.hero .ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46%; z-index: -1; opacity: .9; }
.hero .wrap { padding-top: 104px; padding-bottom: 120px; }
.hero h1 { color: var(--white); max-width: 14ch; }
.hero h1 .hl { color: var(--yellow); }
.hero .sub { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; color: var(--white); max-width: 34ch; line-height: 1.35; margin-bottom: 16px; }
.hero .support { color: #CBD5E1; max-width: 52ch; margin-bottom: 32px; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); margin-bottom: 16px; }
.on-light .eyebrow, main .light .eyebrow { color: var(--investigate); }

.page-hero { background: var(--slate); color: var(--white); }
.page-hero .wrap { padding-top: 64px; padding-bottom: 56px; }
.page-hero h1 { color: var(--white); font-size: clamp(34px, 5vw, 56px); }
.page-hero p { color: #CBD5E1; max-width: 62ch; font-size: 19px; }
.crumbs { font-size: 14px; color: #94A3B8; margin-bottom: 12px; }
.crumbs a { color: #CBD5E1; }

/* ---------- KPI strip ---------- */
.kpi-strip { background: var(--slate); color: var(--white); border-top: 1px solid rgba(255,255,255,.08); }
.kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); }
.kpi { padding: 28px 20px; border-left: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 4px; }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi .label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #94A3B8; }
.kpi .value { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--white); line-height: 1.15; }
.kpi .value.pending { font-size: 18px; font-weight: 700; color: #94A3B8; display: flex; align-items: center; gap: 8px; min-height: 39px; }
.kpi .note { font-size: 14px; color: #CBD5E1; }
.kpi a { font-size: 14px; color: var(--yellow); font-weight: 700; text-decoration: none; margin-top: 6px; }
.kpi a:hover { text-decoration: underline; }
@media (max-width: 1080px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); } .kpi:nth-child(4) { border-left: 0; padding-left: 0; } .kpi:nth-child(n+4) { border-top: 1px solid rgba(255,255,255,.08); } }
@media (max-width: 600px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } .kpi { padding: 20px 12px; } .kpi:nth-child(odd) { border-left: 0; padding-left: 0; } .kpi:nth-child(4) { border-left: 1px solid rgba(255,255,255,.08); padding-left: 12px; } .kpi:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.08); } .kpi .value { font-size: 26px; } }

.dot-pending { width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; display: inline-block; flex-shrink: 0; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.tight { padding: 56px 0; }
.section.white { background: var(--white); }
.section.dark { background: var(--navy); color: var(--white); }
.section.dark h2, .section.dark h3 { color: var(--white); }
.section.dark p { color: #CBD5E1; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { font-size: 19px; color: var(--ink-2); }
.section.dark .section-head p { color: #CBD5E1; }
@media (max-width: 640px) { .section { padding: 56px 0; } }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 16px; }
.card.link-card { text-decoration: none; color: inherit; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.card.link-card:hover { border-color: var(--navy); transform: translateY(-2px); }
.card.link-card .link-arrow { margin-top: auto; }
.dark .card { background: var(--slate); border-color: rgba(255,255,255,.08); box-shadow: none; }
.dark .card p { color: #CBD5E1; }

/* ---------- Status tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; line-height: 1.4; }
.tag.investigate { color: #B45309; background: #FFFBEB; }
.tag.info { color: var(--info); background: #EFF6FF; }
.tag.positive { color: var(--positive); background: #F0FDF4; }
.tag.neutral { color: var(--ink-2); background: var(--gray-50); }
.dark .tag.neutral { color: #CBD5E1; background: transparent; }
.tag svg { width: 12px; height: 12px; }

/* ---------- Featured investigation ---------- */
.feature { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.feature .body { padding: 48px; }
.feature .body h2 { font-size: clamp(28px, 3.2vw, 38px); }
.feature .body p { font-size: 18px; color: var(--ink-2); }
.feature .visual { background: var(--navy); padding: 40px; display: flex; flex-direction: column; justify-content: center; color: var(--white); }
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; margin: 24px 0 28px; padding: 16px 0; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
.meta-list dt { color: var(--ink-3); font-weight: 600; }
.meta-list dd { margin: 0; color: var(--ink); font-weight: 600; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; } .feature .body { padding: 28px; } .feature .visual { padding: 28px; } }

/* ---------- Question Worth Asking ---------- */
.qwa { background: #FFFBEB; border: 1px solid #FDE68A; border-left: 6px solid var(--yellow); border-radius: var(--radius); padding: 24px 26px; position: relative; }
.qwa .qwa-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #92400E; margin-bottom: 10px; }
.qwa .qwa-label svg { width: 18px; height: 18px; }
.qwa p { margin: 0; color: var(--ink); font-size: 17px; font-weight: 500; }
.qwa .qwa-meta { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.dark .qwa { background: var(--slate); border-color: rgba(250,204,21,.35); border-left-color: var(--yellow); }
.dark .qwa .qwa-label { color: var(--yellow); }
.dark .qwa p { color: var(--white); }
.dark .qwa .qwa-meta { color: #94A3B8; }

/* ---------- Charts ---------- */
.chart-box { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.chart-box .chart-title { font-size: 18px; font-weight: 700; color: var(--navy); margin: 0 0 4px; }
.chart-box .chart-sub { font-size: 14px; color: var(--ink-3); margin: 0 0 16px; }
.chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.chart-scroll svg { min-width: 560px; width: 100%; height: auto; display: block; }
.source-line { font-size: 13px; color: var(--ink-3); margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--gray-200); line-height: 1.5; }
.source-line a { color: var(--ink-2); }
.source-line strong { color: var(--ink-2); }
.dark .source-line { color: #94A3B8; border-color: rgba(255,255,255,.1); }
.dark .source-line a, .dark .source-line strong { color: #CBD5E1; }

.empty-state { border: 2px dashed #CBD5E1; border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--ink-2); background: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(148,163,184,.06) 12px 24px); }
.empty-state strong { display: block; font-size: 18px; color: var(--navy); margin-bottom: 6px; }
.empty-state p { font-size: 15px; max-width: 56ch; margin: 0 auto; }
.dark .empty-state { border-color: rgba(255,255,255,.2); color: #CBD5E1; }
.dark .empty-state strong { color: var(--white); }

/* White chart cards keep light-mode text inside dark sections */
.dark .chart-box p, .dark .chart-box .empty-state { color: var(--ink-2); }
.dark .chart-box .chart-title, .dark .chart-box .empty-state strong { color: var(--navy); }
.dark .chart-box .chart-sub, .dark .chart-box .source-line { color: var(--ink-3); border-color: var(--gray-200); }
.dark .chart-box .source-line a, .dark .chart-box .source-line strong { color: var(--ink-2); }
.dark .chart-box .empty-state { border-color: #CBD5E1; }
.dark .chart-box summary, .dark .chart-box table { color: var(--ink); }

/* $100 bar */
.hundred { display: flex; height: 72px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--gray-200); }
.hundred a { display: flex; align-items: flex-end; padding: 8px; color: var(--navy); font-weight: 800; font-size: 14px; text-decoration: none; min-width: 0; }
.hundred a:hover, .hundred a:focus-visible { filter: brightness(1.08); outline-offset: -3px; }
.cat-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.cat-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; text-decoration: none; color: inherit; }
.cat-item:hover { border-color: var(--navy); }
.cat-item .sw { width: 14px; height: 14px; border-radius: 3px; margin-top: 4px; flex-shrink: 0; }
.cat-item .nm { font-weight: 700; font-size: 15px; color: var(--navy); }
.cat-item .amt { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.cat-item .amt.pending { font-size: 14px; font-weight: 600; color: var(--ink-3); }
@media (max-width: 900px) { .cat-list { grid-template-columns: repeat(2, 1fr); } }

/* ---------- District cards ---------- */
.district-card { background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 22px; border-top: 6px solid var(--c); box-shadow: var(--shadow); }
.district-card .dname { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.district-card .dname h3 { margin: 0; font-size: 20px; }
.district-card .role { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.district-card .dval { font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 12px 0 2px; color: var(--ink); }
.district-card .dval.pending { font-size: 17px; color: var(--ink-3); font-weight: 700; display: flex; gap: 8px; align-items: center; min-height: 37px; }
.district-card .dchg { font-size: 14px; color: var(--ink-2); }
.dark .district-card { background: var(--slate); border-color: rgba(255,255,255,.08); border-top-color: var(--c); box-shadow: none; }
.dark .district-card h3, .dark .district-card .dval { color: var(--white); }
.dark .district-card .dchg { color: #CBD5E1; }
.dark .district-card .role, .dark .district-card .dval.pending { color: #94A3B8; }

/* ---------- Controls ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .flabel { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.dark .field label { color: #CBD5E1; }
select, input[type="number"], input[type="text"], input[type="search"] { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #94A3B8; border-radius: 8px; background: var(--white); color: var(--ink); min-height: 44px; }
select { padding-right: 32px; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 15px; min-height: 44px; }
.chk input { width: 18px; height: 18px; }
.seg { display: inline-flex; border: 1px solid #94A3B8; border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 14px; font-weight: 600; padding: 10px 14px; border: 0; background: var(--white); color: var(--ink-2); cursor: pointer; min-height: 44px; }
.seg button + button { border-left: 1px solid #94A3B8; }
.seg button[aria-pressed="true"] { background: var(--navy); color: var(--white); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--gray-200); border-radius: var(--radius); background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--gray-200); vertical-align: top; }
thead th { background: var(--gray-50); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 800; position: sticky; top: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td .muted, .muted { color: var(--ink-3); }
caption { text-align: left; padding: 14px; font-weight: 700; color: var(--navy); }

/* ---------- Prose / article ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; font-size: 30px; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.two-col { display: grid; grid-template-columns: 240px 1fr; gap: 56px; align-items: start; }
.two-col > *, .grid > * { min-width: 0; }
.toc { position: sticky; top: 96px; font-size: 15px; }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--gray-200); }
.toc a { display: block; padding: 6px 0 6px 14px; color: var(--ink-2); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--navy); border-left-color: var(--navy); }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; } }

.callout { border-radius: var(--radius); padding: 20px 22px; border: 1px solid var(--gray-200); background: var(--white); margin: 24px 0; }
.callout.method { border-left: 6px solid var(--info); }
.callout.method .ct { color: var(--info); }
.callout .ct { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.callout p:last-child { margin-bottom: 0; }

/* Evidence labels (FACT / CALCULATION / ...) */
.ev { display: grid; grid-template-columns: 150px 1fr; gap: 0; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.ev > div { padding: 14px 16px; border-bottom: 1px solid var(--gray-200); }
.ev > div:nth-last-child(-n+2) { border-bottom: 0; }
.ev .k { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; background: var(--gray-50); display: flex; align-items: center; gap: 8px; }
.ev .k::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--kc, var(--ink-3)); flex-shrink: 0; }
@media (max-width: 560px) { .ev { grid-template-columns: 1fr; } .ev .k { border-bottom: 0 !important; padding-bottom: 4px; } .ev > div:nth-last-child(2) { border-bottom: 0; } }

.steps { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps li { counter-increment: s; background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px; padding: 14px 16px 14px 52px; position: relative; font-weight: 600; font-size: 15px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 13px; display: grid; place-items: center; font-weight: 800; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

.chain { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.chain span { background: var(--white); border: 1px solid var(--gray-200); padding: 10px 16px; border-radius: 8px; font-weight: 700; color: var(--navy); font-size: 15px; }
.chain span:first-child { background: var(--yellow); border-color: var(--yellow); }
.chain i { display: block; width: 2px; height: 18px; background: #94A3B8; margin-left: 24px; }

/* Timeline */
.timeline { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding-bottom: 8px; }
.timeline .tstep { flex: 1; min-width: 150px; position: relative; padding: 36px 16px 0 0; }
.timeline .tstep::before { content: ""; position: absolute; top: 12px; left: 0; right: 0; height: 3px; background: var(--gray-200); }
.timeline .tstep::after { content: ""; position: absolute; top: 4px; left: 0; width: 19px; height: 19px; border-radius: 50%; background: var(--white); border: 3px solid var(--navy); }
.timeline .tstep:first-child::after { background: var(--yellow); border-color: var(--yellow); }
.timeline .tstep strong { display: block; color: var(--navy); font-size: 16px; }
.timeline .tstep span { font-size: 14px; color: var(--ink-2); }

/* Calculator */
.calc { display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; background: var(--white); border: 1px solid var(--gray-200); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.calc .inputs { padding: 32px; display: flex; flex-direction: column; gap: 18px; border-right: 1px solid var(--gray-200); }
.calc .outputs { padding: 32px; background: var(--gray-50); }
.calc .big { font-size: 48px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1.1; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } .calc .inputs { border-right: 0; border-bottom: 1px solid var(--gray-200); } }

/* Search dialog */
dialog.search { border: 0; border-radius: 14px; padding: 0; width: min(640px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
dialog.search::backdrop { background: rgba(8,17,31,.6); }
dialog.search .sbox { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--gray-200); }
dialog.search input { flex: 1; border: 0; font-size: 18px; min-height: 40px; }
dialog.search input:focus { outline: none; }
dialog.search ul { list-style: none; margin: 0; padding: 8px; max-height: 60vh; overflow: auto; }
dialog.search li a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
dialog.search li a:hover, dialog.search li a:focus { background: var(--gray-50); outline: none; }
dialog.search li small { display: block; color: var(--ink-3); font-size: 13px; }
dialog.search .close { background: none; border: 0; font: inherit; font-size: 14px; color: var(--ink-3); cursor: pointer; padding: 6px 8px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #CBD5E1; padding: 64px 0 40px; }
.site-footer .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer img { height: 56px; width: auto; max-width: 100%; object-fit: contain; object-position: left; margin-bottom: 16px; }
.site-footer .fname { font-weight: 800; color: var(--white); font-size: 18px; }
.site-footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: #94A3B8; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { color: var(--white); text-decoration: none; line-height: 2.1; font-size: 15px; }
.site-footer li a:hover { color: var(--yellow); }
.site-footer .disclaimer { font-size: 14px; color: #94A3B8; padding-top: 24px; max-width: 80ch; }
@media (max-width: 760px) { .site-footer .top { grid-template-columns: 1fr 1fr; } .site-footer .top > :first-child { grid-column: 1 / -1; } }

/* Dark dashboard (data explorer) */
body.dashboard { background: #08111F; color: #F8FAFC; }
body.dashboard main h2, body.dashboard main h3 { color: #F8FAFC; }
body.dashboard .table-wrap { background: #111827; border-color: #1F2937; }
body.dashboard th, body.dashboard td { border-color: #1F2937; }
body.dashboard thead th { background: #0B1424; color: #CBD5E1; }
body.dashboard .muted, body.dashboard td .muted { color: #94A3B8; }
body.dashboard .field label { color: #CBD5E1; }
body.dashboard select, body.dashboard input { background: #111827; color: #F8FAFC; border-color: #334155; }
body.dashboard .chart-box { background: #111827; border-color: #1F2937; box-shadow: none; }
body.dashboard .chart-box .chart-title { color: #F8FAFC; }
body.dashboard .chart-box .chart-sub, body.dashboard .source-line { color: #94A3B8; border-color: #1F2937; }
body.dashboard .source-line a, body.dashboard .source-line strong { color: #CBD5E1; }
body.dashboard .seg, body.dashboard .seg button + button { border-color: #334155; }
body.dashboard .seg button { background: #111827; color: #CBD5E1; }
body.dashboard .seg button[aria-pressed="true"] { background: var(--yellow); color: #08111F; }
body.dashboard .btn-outline { background: #111827; color: #F8FAFC; border-color: #334155; }
body.dashboard .btn-outline:hover { border-color: #F8FAFC; }
body.dashboard .empty-state { border-color: #334155; color: #CBD5E1; }
body.dashboard .empty-state strong { color: #F8FAFC; }
body.dashboard :focus-visible { outline-color: var(--yellow); }
body.dashboard .callout { background: #111827; border-color: #1F2937; color: #CBD5E1; }
body.dashboard .callout.method { border-left-color: #60A5FA; }
body.dashboard .callout.method .ct { color: #60A5FA; }
body.dashboard a { color: #93C5FD; }
body.dashboard .stat-row { color: #CBD5E1; }

.updated { font-size: 14px; color: var(--ink-3); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 12px; } .mt-2 { margin-top: 24px; } .mt-3 { margin-top: 40px; }
.center { text-align: center; }
.row-between { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* Four-up KPI strip (statewide and district pages) */
.kpi-grid.four { grid-template-columns: repeat(4, 1fr); }
.kpi-grid.four .kpi { border-top: 0; }
@media (max-width: 900px) {
  .kpi-grid.four { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid.four .kpi:nth-child(odd) { border-left: 0; padding-left: 0; }
  .kpi-grid.four .kpi:nth-child(even) { border-left: 1px solid rgba(255,255,255,.08); padding-left: 12px; }
  .kpi-grid.four .kpi:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.08); }
}

/* Narrow phones */
.field { min-width: 0; max-width: 100%; }
select { max-width: 100%; }
@media (max-width: 420px) { .cat-list { grid-template-columns: 1fr; } }
