:root {
  --paper: #f2f5f5;
  --surface: #ffffff;
  --ink: #13222b;
  --muted: #586973;
  --line: #d3dcdd;
  --accent: #0d5a78;
  --accent-soft: #e0edf2;
  --date: #9a5413;
  --s-open: #1c7a49;
  --s-rolling: #0d5a78;
  --s-upcoming: #a46600;
  --s-closed: #6a757b;
  --s-pending: #6b4b98;
  --s-varies: #47707f;
  --font-display: "IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e161b; --surface: #152129; --ink: #e2eaec; --muted: #93a4ab; --line: #26353d;
    --accent: #62b5d6; --accent-soft: #17323f; --date: #e39a55;
    --s-open: #4cc283; --s-rolling: #62b5d6; --s-upcoming: #e2a83c; --s-closed: #8b979d; --s-pending: #ab8ee0; --s-varies: #7fb0c0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e161b; --surface: #152129; --ink: #e2eaec; --muted: #93a4ab; --line: #26353d;
  --accent: #62b5d6; --accent-soft: #17323f; --date: #e39a55;
  --s-open: #4cc283; --s-rolling: #62b5d6; --s-upcoming: #e2a83c; --s-closed: #8b979d; --s-pending: #ab8ee0; --s-varies: #7fb0c0;
  color-scheme: dark;
}
[data-status="open"] { --c: var(--s-open); }
[data-status="rolling"] { --c: var(--s-rolling); }
[data-status="upcoming"] { --c: var(--s-upcoming); }
[data-status="closed"] { --c: var(--s-closed); }
[data-status="pending"] { --c: var(--s-pending); }
[data-status="varies"] { --c: var(--s-varies); }

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.55; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }
.muted { color: var(--muted); }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-in { max-width: 1120px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; }
header.site nav { display: flex; flex-wrap: wrap; gap: 16px; }
header.site nav a { text-decoration: none; font-weight: 500; }
header.site nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 32px 20px 48px; display: grid; gap: 36px; }
.page-head { display: grid; gap: 10px; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; }
h2 { font-size: 24px; font-weight: 600; }
h3 { font-size: 19px; font-weight: 600; }
h3 a { color: inherit; text-decoration: none; }
h3 a:hover { text-decoration: underline; }
.small-h { font-size: 19px; }
.lede { max-width: 68ch; color: var(--muted); margin: 0; font-size: 16px; }
.lede strong { color: var(--ink); font-weight: 600; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; display: grid; gap: 2px; border-top: 4px solid var(--accent); }
.tile b { font-family: var(--font-display); font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { color: var(--muted); font-size: 13px; }

.state-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.state-card { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 8px; padding: 18px 20px; display: grid; gap: 4px; text-decoration: none; color: var(--ink); }
.state-card:hover { border-color: var(--accent); }
.state-card h2 { color: var(--accent); }

.cliff { background: var(--accent-soft); border-radius: 8px; padding: 18px 20px; display: grid; gap: 10px; }
.cliff ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; max-width: 90ch; }
.refs { font-size: 12.5px; color: var(--muted); margin: 0; }

.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }

/* Breakdown grid */
.bd-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.bd { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bd th, .bd td { text-align: left; vertical-align: top; padding: 12px 14px; border-top: 1px solid var(--line); }
.bd thead th { border-top: 0; font-family: var(--font-display); font-size: 17px; background: var(--paper); }
.bd thead th:first-child { width: 17%; }
.bd thead th a, .bd tbody th a { color: var(--ink); }
.bd tbody th { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.bd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.bd-list a { text-decoration: none; display: inline; }
.bd-list a:hover { text-decoration: underline; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c); margin-right: 7px; vertical-align: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tl-row { display: grid; grid-template-columns: 140px 96px 1fr; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line); align-items: start; }
.tl-row:first-child { border-top: 0; }
.tl-row.past { opacity: .55; }
.tl-date { font-family: var(--font-mono); font-size: 13.5px; color: var(--date); font-weight: 500; font-variant-numeric: tabular-nums; }
.tl-row.expected .tl-date { color: var(--muted); }
.tl-kind { font-size: 11.5px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; justify-self: start; white-space: nowrap; border: 1px solid currentColor; }
.k-deadline { color: var(--date); }
.k-expected { color: var(--muted); border-style: dashed; }
.k-watch { color: var(--s-pending); }
.tl-body { display: grid; gap: 2px; }
.tl-body strong { font-weight: 600; }
.tl-body span, .tl-body a { font-size: 13.5px; }
.tl-body span { color: var(--muted); }
.countdown { font-family: var(--font-mono); font-size: 12px; color: var(--muted); display: block; margin-top: 2px; }

/* Filters */
.filters { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; position: sticky; top: 0; z-index: 2; margin-bottom: 20px; }
.frow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.frow > .lbl { font-size: 12px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); width: 72px; }
.chip { font: inherit; font-size: 13.5px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.search { font: inherit; font-size: 14px; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); flex: 1 1 220px; min-width: 0; }
.count { font-size: 13px; color: var(--muted); }

/* Cards */
.groups { display: grid; gap: 28px; }
.group { display: grid; gap: 14px; }
.group-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.group-title small { color: var(--muted); font-size: 13px; font-family: var(--font-body); font-weight: 400; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 8px; padding: 16px 18px; display: grid; gap: 10px; align-content: start; scroll-margin-top: 16px; }
.card:target { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.agency { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; color: var(--c); border: 1px solid var(--c); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { font-size: 11.5px; font-family: var(--font-mono); padding: 1px 7px; border-radius: 4px; background: var(--paper); color: var(--muted); border: 1px solid var(--line); }
.tag-fund { color: var(--ink); border-color: var(--muted); }
dl { margin: 0; display: grid; grid-template-columns: 92px 1fr; gap: 6px 12px; font-size: 14px; }
dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
dd { margin: 0; }
dd.next { font-family: var(--font-mono); font-size: 13px; color: var(--date); }
.tip, .state-note { font-size: 14px; margin: 0; padding: 10px 12px; border-radius: 6px; background: var(--paper); }
.state-note { background: var(--accent-soft); }
.neer { font-size: 13.5px; margin: 0; color: var(--muted); }
.neer b { color: var(--accent); font-weight: 600; }
.card-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; font-size: 13.5px; }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: 8px; }

/* Program page */
.crumbs { font-size: 14px; margin-bottom: -20px; }
.detail { display: grid; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 8px; padding: 24px; }
.detail-dl { grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 15px; max-width: 80ch; }
.detail-dl dt { font-size: 13.5px; }
.button { display: inline-block; background: var(--accent); color: var(--surface); padding: 8px 14px; border-radius: 6px; text-decoration: none; font-weight: 600; margin-right: 10px; }

.sources { margin: 8px 0 0; padding-left: 22px; display: grid; gap: 3px; columns: 2; column-gap: 32px; font-size: 13px; color: var(--muted); }
.sources li { break-inside: avoid; }
.site-foot { color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); padding-top: 18px; }
.site-foot p { margin: 0; max-width: 90ch; }

@media (max-width: 760px) {
  .bd, .bd thead, .bd tbody, .bd tr, .bd th, .bd td { display: block; width: 100% !important; }
  .bd thead { display: none; }
  .bd tbody tr { border-top: 1px solid var(--line); padding: 4px 0; }
  .bd tbody th { border-top: 0; background: var(--paper); }
  .bd td { border-top: 0; padding-top: 4px; }
  .bd td::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 4px; }
}
@media (max-width: 640px) {
  .wrap { padding: 24px 16px 40px; }
  .site-in { padding: 12px 16px; }
  .tl-row { grid-template-columns: 1fr; gap: 4px; }
  dl, .detail-dl { grid-template-columns: 1fr; gap: 2px; }
  dt { margin-top: 6px; }
  .frow > .lbl { width: 100%; }
  .sources { columns: 1; }
  .filters { position: static; }
  .detail { padding: 18px 16px; }
}
@media (prefers-reduced-motion: no-preference) {
  .chip { transition: background .15s, border-color .15s; }
}

/* Header tools */
.brand { display: inline-flex; align-items: center; gap: 8px; }
.logo { width: 20px; height: 20px; fill: var(--accent); }
.site-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.state-pick select, .select { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); max-width: 100%; }
.site-search input { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); width: 200px; max-width: 100%; }
select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Caution banner */
.caution { background: #fff4dc; color: #4a3500; border-bottom: 1px solid #ecd28f; font-size: 13.5px; }
.caution a { color: inherit; }
.caution-in { max-width: 1120px; margin: 0 auto; padding: 8px 20px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .caution { background: #2e2510; color: #f1dca4; border-color: #4d3d14; } }
:root[data-theme="dark"] .caution { background: #2e2510; color: #f1dca4; border-color: #4d3d14; }
.notice { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--accent-soft); font-size: 14.5px; max-width: 80ch; }
.notice.warn { background: #fff4dc; color: #4a3500; border: 1px solid #ecd28f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notice.warn { background: #2e2510; color: #f1dca4; border-color: #4d3d14; } }
:root[data-theme="dark"] .notice.warn { background: #2e2510; color: #f1dca4; border-color: #4d3d14; }

/* Hero */
.hero { position: relative; overflow: hidden; border-radius: 14px; background: linear-gradient(135deg, #0b3f56 0%, #0d5a78 55%, #1b7f8f 100%); color: #f3fafc; }
.hero-in { position: relative; padding: 44px 40px 52px; display: grid; gap: 16px; max-width: 820px; }
.hero .eyebrow { color: #b9dbe6; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); color: #ffffff; }
.hero-lede { margin: 0; font-size: 17px; color: #d6ebf2; max-width: 62ch; }
.hero-waves { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 45%; }
.hero-waves path:first-child { fill: rgba(255, 255, 255, .06); }
.hero-waves path:last-child { fill: rgba(255, 255, 255, .08); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hero-actions select, .hero-search input { font: inherit; font-size: 16px; padding: 10px 12px; border-radius: 8px; border: 0; background: #ffffff; color: #13222b; }
.hero-search { display: flex; flex: 1 1 280px; gap: 8px; min-width: 0; }
.hero-search input { flex: 1; min-width: 0; }
.hero-search button { font: inherit; font-weight: 600; font-size: 15px; padding: 10px 16px; border-radius: 8px; border: 0; background: #f2b84b; color: #2b1d00; cursor: pointer; }
.hero-search button:focus-visible, .hero-actions select:focus-visible, .hero-search input:focus-visible { outline: 3px solid #f2b84b; outline-offset: 2px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 10px 0 0; }
.hero-stats div { display: grid; }
.hero-stats dt { color: #b9dbe6; font-size: 12.5px; padding: 0; }
.hero-stats dd { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: #ffffff; }
.state-links { list-style: none; margin: 0; padding: 0; columns: 4 160px; column-gap: 24px; font-size: 14.5px; }
.state-links li { padding: 2px 0; break-inside: avoid; }

/* Search and about */
.search-form { display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; }
.results { list-style: none; margin: -20px 0 0; padding: 0; display: grid; gap: 12px; }
.result { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 8px; padding: 14px 16px; display: grid; gap: 8px; }
.result-h { font-size: 18px; }
.result-h a { color: inherit; }
.result-next { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--date); }
.prose { display: grid; gap: 12px; max-width: 80ch; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 20px; display: grid; gap: 6px; }

@media (max-width: 640px) {
  .hero-in { padding: 32px 20px 40px; }
  .site-search input { width: 100%; }
  .site-tools, .site-search, .state-pick { width: 100%; }
  .state-pick select { width: 100%; }
}

/* NEER logo */
.brand-row { display: flex; align-items: center; gap: 12px; }
.neer-logo { display: inline-flex; padding-right: 12px; border-right: 1px solid var(--line); }
.neer-logo img, .foot-logo img { display: block; height: 24px; width: auto; }
.foot-logo img { height: 32px; }
.site-foot { display: grid; gap: 12px; }

/* State map */
:root { --map-land: #d7e3e6; --map-covered: #0d5a78; --map-hover: #f2b84b; --map-line: #ffffff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --map-land: #24363f; --map-covered: #3f9dc2; --map-line: #0e161b; } }
:root[data-theme="dark"] { --map-land: #24363f; --map-covered: #3f9dc2; --map-line: #0e161b; }
.map-box { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 16px 10px; }
.us-map { display: block; width: 100%; max-width: 960px; margin: 0 auto; height: auto; }
.us-map a.st path { fill: var(--map-land); stroke: var(--map-line); stroke-width: 1; stroke-linejoin: round; transition: fill .12s; }
.us-map a.st.covered path { fill: var(--map-covered); }
.us-map a.st:hover path, .us-map a.st:focus-visible path { fill: var(--map-hover); }
.us-map a.st.selected path { fill: var(--map-hover); }
.us-map a.st:focus { outline: none; }
.us-map a.st:focus-visible path { stroke: var(--ink); stroke-width: 2.5; }
.st-label { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); text-anchor: middle; dominant-baseline: middle; pointer-events: none; }
.st-label.covered { fill: #ffffff; font-weight: 500; }
.map-tip { position: absolute; transform: translate(-50%, calc(-100% - 14px)); background: var(--ink); color: var(--paper); border-radius: 6px; padding: 7px 10px; font-size: 13px; display: grid; gap: 1px; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 14px rgb(0 0 0 / .2); }
.map-tip .muted { color: var(--line); font-size: 12px; }
.map-legend { margin: 8px 0 0; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--map-land); margin-right: 6px; vertical-align: -1px; }
.sw.covered { background: var(--map-covered); }
.map-details { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.map-details summary { cursor: pointer; font-weight: 600; }
.map-details[open] summary { margin-bottom: 10px; }
.map-details .map-box { border: 0; padding: 0; }
@media (max-width: 640px) { .st-label { font-size: 14px; } .map-box { padding: 8px; } }
