/* Data 4 MT: the data website (dataset pages, county profiles, API docs).
   Generated pages live in webapp/data/ and webapp/county/; built by src/site_pages/.
   Palette = the map app's tokens (style.css). One family: Public Sans. */
:root {
  --paper: #F7F6F1;
  --surface: #FFFFFF;
  --ink: #1A1912;
  --ink-2: #3F3D33;
  --muted: #6E6C5C;
  --rule: #DDDAD0;
  --rule-2: #EBE8DF;
  --forest: #1D4520;
  --forest-2: #2E5E32;
  --forest-lite: #EEF4EE;
  --sage: #5E8C6A;
  --slate: #5B7F95;
  --clay: #B07A55;
  --sand: #D9D3C3;
  --warn: #8A5A12;
  --font: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 var(--font);
  font-feature-settings: "tnum" 1, "lnum" 1; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--forest-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* top bar: the same forest band as the map app */
.top { background: var(--forest); color: #F7F5EF; }
.top-in { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; height: 52px; display: flex; align-items: center; gap: 20px; }
@media (min-width: 720px) { .top-in { padding: 0 28px; } }
.brand { color: #F7F5EF; text-decoration: none; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.brand:hover { color: #fff; }
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav a { color: rgba(247,245,239,.82); text-decoration: none; font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: 4px; white-space: nowrap; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 #F7F5EF; border-radius: 0; }

/* page head */
.head { padding: 36px 0 26px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.head h1 { font-size: clamp(30px, 5.2vw, 46px); font-weight: 800; letter-spacing: -0.025em; max-width: 22ch; }
.lede { font-size: 19px; line-height: 1.5; color: var(--ink-2); margin-top: 14px; max-width: 62ch; }
.head-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .head-grid { grid-template-columns: 1fr 300px; align-items: start; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 4px; font: 600 14px var(--font);
  text-decoration: none; border: 1px solid var(--forest); background: var(--forest); color: #fff; cursor: pointer; }
.btn:hover { background: var(--forest-2); color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--forest); }
.btn.ghost:hover { background: var(--forest-lite); color: var(--forest); }

section.block { padding: 34px 0; border-bottom: 1px solid var(--rule); }
section.block:last-of-type { border-bottom: 0; }
.block h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.block .sub { color: var(--muted); font-size: 15px; max-width: 70ch; margin-bottom: 18px; }
.prose p + p { margin-top: 10px; }
.prose { max-width: 70ch; }

/* facts: a definition list, label left, value right */
.facts { display: grid; grid-template-columns: 1fr; border-top: 2px solid var(--forest); }
.facts > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule-2); }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 900px) { .facts.two { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
@media (max-width: 520px) { .facts > div { grid-template-columns: 1fr; gap: 2px; } }

/* figures ledger (county headline numbers) */
.figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--forest); }
@media (min-width: 720px) { .figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fig { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule-2); min-width: 0; }
.fig .n { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.fig .l { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.fig .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.fig .n.none { color: var(--muted); font-weight: 500; font-size: 20px; }
.fig a { color: inherit; text-decoration: none; }
.fig a:hover .l { text-decoration: underline; }

/* catalog ledger */
.groups-nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-size: 15px; }
.groups-nav a { text-decoration: none; color: var(--ink-2); border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.groups-nav a:hover { color: var(--forest); border-color: var(--forest); }
.groups-nav span { color: var(--muted); font-size: 13px; margin-left: 4px; }
.cat-group { padding: 30px 0 8px; }
.cat-group h2 { font-size: 26px; font-weight: 800; }
.cat-group > p { color: var(--muted); margin: 4px 0 14px; }
.ledger { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.ledger li { display: grid; grid-template-columns: 1fr; gap: 4px 24px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 820px) { .ledger li { grid-template-columns: minmax(0, 1fr) 220px 110px 110px; align-items: baseline; } }
.ledger .t { font-weight: 700; font-size: 17px; text-decoration: none; color: var(--ink); }
.ledger .t:hover { color: var(--forest); text-decoration: underline; }
.ledger .d { color: var(--ink-2); font-size: 15px; margin-top: 2px; max-width: 64ch; }
.ledger .who { font-size: 14px; color: var(--muted); }
.ledger .num { font-size: 15px; font-weight: 600; text-align: left; }
.ledger .when { font-size: 14px; color: var(--muted); }
@media (min-width: 820px) { .ledger .num, .ledger .when { text-align: right; } }
.ledger .live { font-weight: 500; color: var(--muted); }
.ledger-head { display: none; }
@media (min-width: 820px) {
  .ledger-head { display: grid; grid-template-columns: minmax(0, 1fr) 220px 110px 110px; gap: 24px; font-size: 13px; color: var(--muted); padding: 0 0 6px; }
  .ledger-head span:nth-child(3), .ledger-head span:nth-child(4) { text-align: right; }
}
.search { margin-top: 22px; max-width: 520px; }
.search input { width: 100%; height: 44px; font: 400 16px var(--font); padding: 0 14px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); color: var(--ink); }
.search input:focus { outline: 2px solid var(--forest); border-color: var(--forest); }

/* tables */
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; max-height: 560px; overflow-y: auto; }
.tbl-wrap.short { max-height: none; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--rule-2); vertical-align: top; }
.tbl th { position: sticky; top: 0; background: #FBFAF6; font-weight: 600; font-size: 13px; color: var(--ink-2); white-space: nowrap; z-index: 1; box-shadow: inset 0 -1px 0 var(--rule); }
.tbl th button { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tbl th button:focus-visible { outline: 2px solid var(--forest); outline-offset: 2px; }
.tbl th .ar { color: var(--muted); font-size: 10px; width: 8px; }
.tbl th[aria-sort="ascending"] .ar::before { content: "▲"; color: var(--forest); }
.tbl th[aria-sort="descending"] .ar::before { content: "▼"; color: var(--forest); }
.tbl td.n, .tbl th.n { text-align: right; white-space: nowrap; }
.tbl td.w { min-width: 220px; max-width: 420px; }
.tbl tbody tr:hover td { background: #FAFAF4; }
.tbl td .cut { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tbl-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: baseline; margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.tbl-filter { height: 36px; font: 400 15px var(--font); padding: 0 12px; border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); min-width: 0; width: 260px; max-width: 100%; }

/* fields table */
.fields td:first-child { font-weight: 600; white-space: nowrap; }
.fields code { font-size: 13px; color: var(--muted); }

/* downloads */
.dl { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dl li { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; }
.dl a { font-weight: 600; }
.dl .meta { color: var(--muted); font-size: 14px; }

.note { background: var(--forest-lite); border-left: 3px solid var(--forest); padding: 14px 16px; font-size: 15px; color: var(--ink-2); max-width: 78ch; }
.gap-note { border-left-color: var(--clay); background: #F8F1EA; }

/* coverage map */
.cov { display: block; width: 100%; height: auto; }
.cov path { stroke: #fff; stroke-width: .8; vector-effect: non-scaling-stroke; }
.cov a path { cursor: pointer; }
.cov a:hover path, .cov a:focus path { stroke: var(--ink); stroke-width: 1.6; }
.cov .hl { stroke: var(--ink); stroke-width: 2; }
.cov-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-top: 8px; align-items: center; }
.cov-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; }
.ramp { display: inline-flex; height: 10px; border-radius: 2px; overflow: hidden; }
.ramp i { width: 22px; height: 10px; border-radius: 0; margin: 0; }

/* charts */
.charts { display: grid; gap: 28px; }
@media (min-width: 900px) { .charts.two { grid-template-columns: 1fr 1fr; } }
figure.chart { margin: 0; min-width: 0; }
figure.chart figcaption { font-weight: 600; font-size: 16px; margin-bottom: 2px; }
figure.chart .cap2 { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
figure.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { font: 400 11px var(--font); fill: var(--muted); }
.chart .grid { stroke: var(--rule-2); stroke-width: 1; }
.chart .base { stroke: var(--rule); stroke-width: 1; }
.chart .bar { fill: var(--forest); }
.chart .bar.alt { fill: var(--sage); }
.chart .bar.future { fill: var(--sand); }
.chart .hit { fill: transparent; }
.chart .hit:hover + .bar, .chart g.col:hover .bar { fill: var(--forest-2); }
.chart .line { fill: none; stroke: var(--forest); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--forest); stroke: var(--surface); stroke-width: 2; }
.chart .lbl { fill: var(--ink-2); font-weight: 600; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 64px; gap: 10px; align-items: center; font-size: 14px; }
.hbar .track { height: 14px; background: transparent; position: relative; }
.hbar .fill { height: 14px; border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar .v { text-align: right; font-weight: 600; }
.hbar .k { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.hbar .k i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.stack { display: flex; height: 22px; gap: 2px; margin: 6px 0 10px; }
.stack span { display: block; height: 100%; min-width: 2px; }
.stack span:first-child { border-radius: 4px 0 0 4px; }
.stack span:last-child { border-radius: 0 4px 4px 0; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); }
.stack-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.stack-legend b { font-weight: 600; }

/* tooltip */
.tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: #fff; font: 500 13px/1.35 var(--font);
  padding: 7px 10px; border-radius: 4px; max-width: 260px; box-shadow: 0 4px 14px rgba(26,25,18,.25); opacity: 0; transition: opacity .08s; }
.tip.on { opacity: 1; }
.tip b { font-weight: 700; }

/* event lists (latest changes / projects) */
.events { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.events li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rule-2); font-size: 15px; }
.events time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.events .what { font-weight: 600; }
.events .who { color: var(--ink-2); }
.events .where { color: var(--muted); font-size: 14px; }
.events .links { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 2px; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 3px; border: 1px solid var(--rule); color: var(--ink-2); background: var(--surface); white-space: nowrap; vertical-align: 1px; }
.badge.c-sale { border-color: #E3C3B3; color: #8C3F1F; }
.badge.c-llc { border-color: #D3C4E0; color: #573274; }
.badge.c-oos { border-color: #B8D2DC; color: #185A72; }
.badge.c-pub { border-color: #C2D8BB; color: #2E5E22; }
.badge.c-split { border-color: #E6D3A6; color: #7A5A0E; }
.cols2 { display: grid; gap: 32px; }
@media (min-width: 960px) { .cols2 { grid-template-columns: 1fr 1fr; } }
.cols2 h3 { font-size: 18px; margin-bottom: 10px; }

.gaps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 78ch; }
.gaps li { padding-left: 18px; position: relative; }
.gaps li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 2px; background: var(--clay); }

/* county index */
.cmap-wrap { background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 16px; }
.metric-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.metric-pick button { font: 500 14px var(--font); padding: 6px 12px; border-radius: 4px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.metric-pick button[aria-pressed="true"] { background: var(--forest); color: #fff; border-color: var(--forest); }
.locator { max-width: 300px; }
.locator .cap { font-size: 13px; color: var(--muted); margin-top: 6px; }

.api-list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.api-list li { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.api-list code { font-size: 14px; background: var(--surface); border: 1px solid var(--rule-2); padding: 2px 6px; border-radius: 3px; overflow-wrap: anywhere; }
pre.code { background: var(--ink); color: #EDEBE3; padding: 14px 16px; border-radius: 4px; overflow-x: auto; font-size: 13px; line-height: 1.5; }

.foot { background: var(--surface); border-top: 1px solid var(--rule); margin-top: 20px; padding: 28px 0 40px; font-size: 14px; color: var(--muted); }
.foot-in p { max-width: 78ch; }
.foot-in p + p { margin-top: 10px; }
.foot-by a { margin-right: 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { .top, .foot, .actions, .metric-pick { display: none; } body { background: #fff; } }
