/* Inter 4.1 (SIL Open Font License 1.1, site/fonts/LICENSE.txt), served locally from /site/fonts/. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url("/site/fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url("/site/fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url("/site/fonts/Inter-SemiBold.woff2") format("woff2"); }
/* The GovForge dashboard. One stylesheet, no external assets.
   Tokens: docs/DESIGN_SPEC.md (measured from the reference site) and the three dashboard references in docs/design-inspo.
   Warm near-black ink on white, a warm off-white sidebar, 1px warm hairlines, no accent colour: primary buttons are ink.
   Colour appears only as status dots (green, amber, red) and the soft green response pill.
   One grotesk for UI (Inter, else the system face), monospace for fields, ids, endpoints, types and JSON.
   Sizes are the reference images' at half scale (they are 2x captures of a 1000px-wide window). */
:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --surface: #F6F5F2;
  --surface-2: #EEEDE9;
  --surface-3: #E5E3DE;
  --ink: #2C2A25;
  --ink-2: #5F5B53;
  --ink-3: #6B665C;
  --rule: #E7E3DC;
  --rule-2: #D3CEC4;
  --accent: #2C2A25;
  --accent-ink: #FFFFFF;
  --accent-soft: #2C2A2510;
  --btn: #1F1D1A;
  --warn: #A8480F;
  --warn-soft: #E8762C1A;
  --green: #2FA561; --amber: #E9A23B; --red: #E5534B;
  --ok-bg: #CBEBD3; --ok-line: #7CC592; --ok-ink: #17472A;
  --mark: #FBE7A1;
  --focus: #2C2A25;

  --sans: Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--sans);
  --cond: var(--sans);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --t-xs: 0.75rem;     /* 12 */
  --t-sm: 0.8125rem;   /* 13 */
  --t-base: 0.90625rem; /* 14.5 */
  --t-md: 1rem;        /* 16 */
  --t-lg: 1.125rem;    /* 18 */
  --t-xl: 1.5rem;      /* 24 */
  --t-2xl: 1.875rem;   /* 30 */

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --r1: 6px; --r2: 10px; --r3: 12px;
  --side: clamp(205px, 16vw, 236px);
  --bar: 65px;
  --gut: 20px;
  --shadow: 0 1px 2px rgb(44 42 37 / .06), 0 12px 32px rgb(44 42 37 / .12);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1240px;
  /* names the API reference (/docs) and the sign-in page (/login) read; they follow the theme through these */
  --paper: var(--bg); --muted: var(--ink-2); --ok: var(--ink); --part: var(--ink-2); --need: var(--warn);
  --served: var(--ink); --needs: var(--warn);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #171614; --surface: #1D1C19; --surface-2: #262521; --surface-3: #32302B;
    --ink: #ECE9E2; --ink-2: #B3AEA3; --ink-3: #8F8A7F;
    --rule: #2E2C27; --rule-2: #45423B;
    --accent: #ECE9E2; --accent-ink: #171614; --accent-soft: #ECE9E214; --btn: #ECE9E2; --focus: #ECE9E2;
    --warn: #F0A064; --warn-soft: #E8762C24; --mark: #6B531A;
    --ok-bg: #1F3D2A; --ok-line: #2F6B45; --ok-ink: #BFE8CB;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px rgb(0 0 0 / .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171614; --surface: #1D1C19; --surface-2: #262521; --surface-3: #32302B;
  --ink: #ECE9E2; --ink-2: #B3AEA3; --ink-3: #8F8A7F;
  --rule: #2E2C27; --rule-2: #45423B;
  --accent: #ECE9E2; --accent-ink: #171614; --accent-soft: #ECE9E214; --btn: #ECE9E2; --focus: #ECE9E2;
  --warn: #F0A064; --warn-soft: #E8762C24; --mark: #6B531A;
  --ok-bg: #1F3D2A; --ok-line: #2F6B45; --ok-ink: #BFE8CB;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px rgb(0 0 0 / .5);
}

/* ---------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--rule-2) transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--t-base)/1.5 var(--sans); font-variant-numeric: tabular-nums lining-nums; -webkit-font-smoothing: antialiased; }
::selection { background: var(--surface-3); color: var(--ink); }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule-2); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: text-decoration-color 150ms var(--ease); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1:focus, main:focus { outline: none; }
code, .mono { font-family: var(--mono); font-size: .9em; }
mark { background: var(--mark); color: inherit; padding: 0 1px; border-radius: 2px; }
p { margin: 0 0 var(--s3); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--s2); top: -60px; z-index: 40; background: var(--btn); color: var(--accent-ink); padding: var(--s2) var(--s3); border-radius: var(--r1); }
.skip:focus { top: var(--s2); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- shell: fixed sidebar, top bar, content */
body:has(> .side) { padding-left: var(--side); min-height: 100vh; display: flex; flex-direction: column; }
#main { flex: 1; }

/* ---------- controls */
input, select, button, textarea { font: inherit; color: inherit; }
input[type="search"], input[type="text"], input[type="password"], input[type="date"], select {
  background: var(--bg); border: 1px solid var(--rule-2); border-radius: var(--r1);
  padding: 0 var(--s3); height: 32px; font-size: var(--t-base); min-width: 0; max-width: 100%;
  transition: border-color 150ms var(--ease);
}
input::placeholder { color: var(--ink-3); opacity: 1; }
input:hover, select:hover { border-color: var(--ink-3); }
input:focus-visible, select:focus-visible { outline: 2px solid var(--focus); outline-offset: -1px; border-color: var(--focus); }
input[readonly] { background: var(--surface); color: var(--ink-2); }
input[type="checkbox"] { accent-color: var(--ink); }
.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  border-radius: var(--r1); border: 1px solid var(--rule-2); background: var(--bg); color: var(--ink);
  font: 500 var(--t-base)/1 var(--sans); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease), opacity 150ms var(--ease);
}
.btn:hover, button:hover:not(:disabled) { border-color: var(--ink-3); }
.btn:active, button:active:not(:disabled) { transform: translateY(1px); }
.btn.primary, button.primary { background: var(--btn); border-color: var(--btn); color: var(--accent-ink); }
.btn.primary:hover, button.primary:hover:not(:disabled) { opacity: .88; border-color: var(--btn); }
.btn.quiet, button.quiet { border-color: transparent; background: transparent; color: var(--ink-2); padding: 0 var(--s2); }
.btn.quiet:hover, button.quiet:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); border-color: transparent; }
.btn.sm, button.sm { height: 28px; padding: 0 10px; font-size: var(--t-sm); }
button.danger { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
button.danger:hover:not(:disabled) { background: var(--warn-soft); border-color: var(--warn); }
button:disabled { opacity: .45; cursor: not-allowed; }
label.field { display: grid; gap: var(--s1); font: 500 var(--t-sm)/1.3 var(--sans); color: var(--ink-2); }
label.field input, label.field select { font-family: var(--sans); font-weight: 400; color: var(--ink); }

/* ---------- sidebar */
body > .side { position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 30; background: var(--surface); border-right: 1px solid var(--rule); }
.side-in { height: 100%; display: flex; flex-direction: column; padding: 16px 10px 12px; overflow-y: auto; scrollbar-width: thin; }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 10px; text-decoration: none; font: 700 20px/1.3 var(--sans); letter-spacing: -.02em; }
.logo { width: 27px; height: 27px; flex: none; fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linejoin: miter; }
.seg[role="group"] { display: inline-flex; padding: 2px; gap: 0; border: 1px solid var(--rule-2); border-radius: var(--r1); background: var(--bg); }
.seg[role="group"] button { height: 25px; padding: 0 11px; border: 0; border-radius: 4px; background: none; font: 400 var(--t-base)/1 var(--sans); color: var(--ink); }
.seg[role="group"] button:hover:not(:disabled) { background: var(--surface); }
.seg[role="group"] button[aria-pressed="true"] { background: var(--surface-2); }
.seg[role="group"].env { display: flex; margin: 19px 4px 0; padding: 3px; border: 0; border-radius: 999px; background: var(--surface-3); }
.seg[role="group"].env button { flex: 1; height: 25px; border-radius: 999px; color: var(--ink-2); }
.seg[role="group"].env button:hover:not(:disabled) { background: none; color: var(--ink); }
.seg[role="group"].env button[aria-pressed="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgb(44 42 37 / .18); }
.nav { display: flex; flex-direction: column; flex: 1; padding-top: 2px; }
.nav-h { font: 500 11.5px/1 var(--sans); letter-spacing: .02em; text-transform: uppercase; color: var(--ink); margin: 0; padding: 17px 10px 8px; }
.nav a { display: flex; align-items: center; gap: 9px; height: 30px; padding: 0 10px; border-radius: 8px; font: 400 13.5px/1 var(--sans); letter-spacing: -.01em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.nav a svg.i { width: 17px; height: 17px; stroke-width: 1.5; }
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current] { background: var(--surface-3); }
.side-foot { display: grid; gap: var(--s2); padding: var(--s3) 10px 0; margin-top: var(--s4); border-top: 1px solid var(--rule); font-size: var(--t-sm); }
.side-links { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); color: var(--ink-2); }
.acct { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); font-size: var(--t-xs); color: var(--ink-3); min-width: 0; overflow-wrap: anywhere; }
.acct .who.need { color: var(--warn); }

/* ---------- top bar: breadcrumb, search, jurisdiction, one primary action */
.topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 8px; height: var(--bar); padding: 0 var(--gut); background: var(--bg); border-bottom: 1px solid var(--rule); }
.menu { display: none; }
.crumb { display: flex; align-items: baseline; gap: 7px; margin-right: auto; min-width: 0; font: 400 15.5px/1.2 var(--sans); white-space: nowrap; }
.crumb .g, .crumb .sl { color: var(--ink-3); }
.crumb .p { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
#gsearch { position: relative; display: flex; align-items: center; flex: 0 1 190px; min-width: 120px; }
#gsearch svg { position: absolute; left: 10px; color: var(--ink-3); pointer-events: none; }
#gsearch input { width: 100%; height: 30px; padding: 0 10px 0 31px; }
.juris { position: relative; display: flex; align-items: center; height: 30px; border: 1px solid var(--rule-2); border-radius: var(--r1); padding-left: 10px; font-size: var(--t-base); white-space: nowrap; }
.juris:hover { border-color: var(--ink-3); }
.juris select { appearance: none; border: 0; background: none; height: 28px; padding: 0 28px 0 5px; font-size: var(--t-base); field-sizing: content; text-overflow: ellipsis; cursor: pointer; }
.juris select:focus-visible { outline-offset: 2px; }
.juris svg { position: absolute; right: 8px; pointer-events: none; }
body:is([data-view="jurisdictions"], [data-view="logs"], [data-view="keys"], [data-view="webhooks"]) .juris { display: none; }
#action { display: contents; }
#action .primary { height: 30px; padding: 0 11px 0 9px; font-weight: 400; font-size: 14px; }
#action svg.i { width: 15px; height: 15px; stroke-width: 1.8; }
.scrim { position: fixed; inset: 0; z-index: 25; background: rgb(44 42 37 / .35); }
.banner { background: var(--warn-soft); border-bottom: 1px solid var(--rule); font-size: var(--t-sm); }
.banner .wrap { max-width: none; padding-top: var(--s2); padding-bottom: var(--s2); display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }

/* ---------- page */
.crumbs { font: var(--t-sm)/1.4 var(--sans); color: var(--ink-3); margin: 0 0 var(--s2); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); overflow-wrap: anywhere; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-hidden] { color: var(--ink-3); }
h1 { font: 600 var(--t-2xl)/1.1 var(--serif); letter-spacing: -.015em; margin: 0; overflow-wrap: anywhere; text-wrap: balance; }
h2 { font: 600 var(--t-lg)/1.25 var(--serif); letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h3 { font: 600 var(--t-md)/1.35 var(--sans); margin: 0; }
.head { display: grid; gap: var(--s3); margin-bottom: var(--s6); }
.head .meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); color: var(--ink-2); font-size: var(--t-sm); }
.head .meta b { color: var(--ink); }
.desc { max-width: 72ch; margin: 0; color: var(--ink-2); text-wrap: pretty; }
.desc.clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.more { font-size: var(--t-sm); padding: 0; height: auto; border: 0; background: none; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
.more:hover:not(:disabled) { background: none; color: var(--accent); }
.muted { color: var(--ink-3); }
.sub { color: var(--ink-2); font-size: var(--t-sm); }
section.block { margin-top: var(--s7); }
section.block > header, .rulehead { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s4); flex-wrap: wrap; margin-bottom: var(--s3); padding-bottom: var(--s2); border-bottom: 1px solid var(--rule); }
section.block > header p { margin: 0; }
.rulehead .aside, section.block > header > a { font-size: var(--t-sm); color: var(--ink-2); }
.panel { border: 1px solid var(--rule); border-radius: var(--r2); }
.panel:not(.pad) { border: 0; }
.panel + .panel { margin-top: var(--s3); }
.pad { padding: var(--s4); }
.tag { display: inline-flex; align-items: center; font: 500 var(--t-xs)/1.6 var(--mono); color: var(--ink-2); background: var(--surface); border: 1px solid var(--rule); padding: 0 6px; border-radius: 4px; white-space: nowrap; vertical-align: 1px; }
.tag.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }
.tag.ok { color: var(--ink); background: var(--surface-2); border-color: var(--rule-2); }
.empty { padding: var(--s6) var(--s5); color: var(--ink-2); border: 1px dashed var(--rule-2); border-radius: var(--r2); background: var(--surface); }
.empty strong { font: 600 var(--t-lg) var(--serif); color: var(--ink); display: block; }
.empty p { margin: var(--s1) 0 0; font-size: var(--t-sm); }
.note { padding: var(--s2) var(--s3); border: 1px solid var(--rule); border-radius: var(--r1); background: var(--surface); color: var(--ink-2); font-size: var(--t-sm); margin: var(--s3) 0; max-width: 90ch; }
.err { padding: var(--s3) var(--s4); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: var(--r1); background: var(--warn-soft); margin: var(--s3) 0; font-size: var(--t-sm); }
.err strong { color: var(--warn); }
.err p { margin: var(--s1) 0 0; overflow-wrap: anywhere; }
.acts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; }

/* skeletons */
.sk { display: block; background: var(--surface-2); height: 12px; margin: 8px 0; border-radius: 4px; }
.sk.w60 { width: 60%; } .sk.w40 { width: 40%; } .sk.w80 { width: 80%; }
@media (prefers-reduced-motion: no-preference) { .sk { animation: pulse 1.2s ease-in-out infinite; } }
@keyframes pulse { 50% { opacity: .4; } }
.loading { color: var(--ink-3); font-size: var(--t-sm); margin: var(--s2) 0; }

/* ---------- status pills: a filled dot is served, half is partial, an amber ring needs someone asked,
   a dash is not published, an open ring comes from the regional layer */
.state { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 7px; border: 1px solid var(--rule); border-radius: 999px; background: var(--bg); font: 500 var(--t-xs)/1 var(--sans); white-space: nowrap; color: var(--ink-2); }
.state::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; border: 1.5px solid var(--ink-2); background: var(--ink-2); }
.s-partial::before { background: linear-gradient(90deg, var(--ink-2) 50%, transparent 50%); }
.s-needs_access, .s-unknown, .s-incomplete { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }
.s-needs_access::before, .s-unknown::before, .s-incomplete::before { background: transparent; border-color: var(--warn); }
.s-not_offered { color: var(--ink-3); }
.s-not_offered::before { height: 0; width: 8px; border-radius: 0; border-width: 1.5px 0 0; border-color: var(--ink-3); background: none; }
.s-regional::before { background: transparent; }
/* a bare mark (no label, inside a row) drops the pill */
.tile .state, .asks li .state { height: auto; padding: 0; border: 0; background: none; }

/* ---------- today (home) */
.dateline { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s1) var(--s5); margin-bottom: var(--s5); }
.dateline h1 { font-size: var(--t-xl); }
.fresh { font-size: var(--t-sm); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 0 var(--s4); margin: 0; }
.fresh b { color: var(--ink); font-weight: 600; }
.tries { font-size: var(--t-sm); color: var(--ink-3); margin: 0 0 var(--s5); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.tries a { color: var(--ink-2); }
.front { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); border: 1px solid var(--rule); border-radius: var(--r2); }
.front > * { padding: var(--s5); min-width: 0; }
.front > :first-child { border-right: 1px solid var(--rule); }
.wire { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--r2); margin-top: var(--s5); }
.wire > * { padding: var(--s5); min-width: 0; border-right: 1px solid var(--rule); }
.wire > :last-child { border-right: 0; }
.story h2 { font-size: var(--t-xl); line-height: 1.15; letter-spacing: -.015em; }
.story.lead h2 { font-size: 2.25rem; line-height: 1.06; letter-spacing: -.02em; }
.story h2 a { text-decoration: none; }
.story h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
.wire .story h2 { font-size: var(--t-lg); }
.story .by { font-size: var(--t-sm); color: var(--ink-2); margin: var(--s2) 0 var(--s3); }
.story .by b { color: var(--ink); font-weight: 600; }
.story .more-links { margin-top: var(--s3); font-size: var(--t-sm); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.story .more-links a:first-child { font-weight: 600; }
.bills { list-style: none; margin: 0 0 var(--s4); padding: 0; }
.bills li { font: var(--t-md)/1.4 var(--serif); padding: var(--s2) 0; text-wrap: pretty; }
.bills a { text-decoration: none; }
.bills a:hover { text-decoration: underline; }
.bills li + li { border-top: 1px solid var(--rule); }
.bills .no { font: 500 var(--t-xs) var(--mono); color: var(--ink-2); background: var(--surface-2); border-radius: 4px; padding: 1px 5px; margin-right: var(--s2); vertical-align: 2px; white-space: nowrap; }
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: var(--k, 5.2em) minmax(0, 1fr); gap: var(--s3); padding: 8px 0; border-top: 1px solid var(--rule); }
.log li:first-child { border-top: 0; }
.log .k { font: var(--t-xs)/1.7 var(--mono); color: var(--ink-3); white-space: nowrap; }
.log .x { font: var(--t-base)/1.45 var(--serif); overflow-wrap: anywhere; text-wrap: pretty; }
.log .x a { text-decoration: none; }
.log .x a:hover { text-decoration: underline; }
.log .x small { display: block; font: var(--t-xs)/1.5 var(--sans); color: var(--ink-3); }
.log .x .res { font-style: italic; color: var(--ink-2); }
.log.cal { --k: 4.2em; }
.log.cal .k { font: 600 var(--t-sm)/1.25 var(--sans); color: var(--ink); }
.log.cal .k small { display: block; font-weight: 400; color: var(--ink-3); }
.log .n { font: 500 var(--t-xs) var(--mono); color: var(--ink-2); }

/* the sections as a dense table */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s6); }
.grid.one { grid-template-columns: 1fr; }
.tile, .grid-head { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 5em 4.5em 4.5em; gap: var(--s3); align-items: baseline; padding: 8px var(--s2); border-bottom: 1px solid var(--rule); font-size: var(--t-sm); }
.grid-head { font: 500 var(--t-xs)/1.4 var(--sans); color: var(--ink-3); background: var(--surface); }
.grid-head span:nth-child(n+3), .tile .num { text-align: right; }
.tile { text-decoration: none; color: var(--ink); transition: background-color 120ms var(--ease); }
.tile:hover { background: var(--surface); color: var(--ink); }
.tile:hover .nm { color: var(--accent); }
.tile:focus-visible { outline-offset: -2px; }
.tile[hidden] { display: none; }
.tile .state { gap: 0; align-self: center; }
.tile .nm { font: 500 var(--t-sm)/1.35 var(--sans); overflow-wrap: anywhere; }
.tile .why { font: var(--t-xs)/1.3 var(--sans); color: var(--ink-3); white-space: nowrap; }
.tile[data-state="needs_access"] .why { color: var(--warn); }
.tile .num { color: var(--ink-2); font-family: var(--mono); font-size: var(--t-xs); }
.tile .num b { color: var(--ink); font-weight: 600; }
.tile .zero { color: var(--rule-2); }
.legend { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--rule); border-radius: var(--r2); padding: 3px; width: max-content; max-width: 100%; }
.legend button { height: 28px; padding: 0 var(--s3); gap: var(--s2); border: 0; background: none; font-weight: 500; color: var(--ink-2); }
.legend button:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.legend button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.legend button b { font-weight: 600; font-family: var(--mono); font-size: var(--t-xs); }

.tiers { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); font-size: var(--t-sm); color: var(--ink-2); margin: 0 0 var(--s3); }
.tiers b { color: var(--ink); }
.tiers a:last-child { margin-left: auto; font-weight: 500; color: var(--accent); }
.trail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: step; border: 1px solid var(--rule); border-radius: var(--r2); }
.trail li { counter-increment: step; padding: var(--s4) var(--s5); border-left: 1px solid var(--rule); min-width: 0; }
.trail li:first-child { border-left: 0; }
.trail li::before { content: counter(step); font: 500 var(--t-xs) var(--mono); color: var(--accent); }
.trail h3 { font: 600 var(--t-md)/1.25 var(--serif); margin: 2px 0 var(--s1); }
.trail h3 a { text-decoration: none; }
.trail h3 a:hover { text-decoration: underline; }
.trail p { font-size: var(--t-sm); color: var(--ink-2); margin: 0 0 var(--s2); text-wrap: pretty; }
.trail code { display: block; font-size: 11px; color: var(--ink-3); overflow-wrap: anywhere; }
details.small { border-bottom: 1px solid var(--rule); }
details.small > summary { cursor: pointer; padding: var(--s2) 0; font-size: var(--t-sm); color: var(--ink-2); }
details.small > summary:hover { color: var(--accent); }
details.small .colls { margin: 0 0 0 var(--s4); }
details.small .colls > li:last-child { border-bottom: 0; }
table.catalog td.lead { font-size: var(--t-sm); min-width: 24ch; }
table.catalog td.lead small { display: block; font: 11px var(--mono); color: var(--ink-3); }
label.check { font-size: var(--t-sm); display: inline-flex; align-items: center; gap: 6px; height: 36px; white-space: nowrap; }

/* data health */
.health { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s7); }
.health > * { min-width: 0; }
.health table { font-size: var(--t-sm); }
.health .bar { display: flex; height: 6px; min-width: 120px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.health .bar i { display: block; height: 100%; }
.health .bar .a { background: var(--ink-2); }
.health .bar .d { background: var(--warn); }
.health .bar .n { background: var(--rule-2); }
.keyline { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); font-size: var(--t-xs); color: var(--ink-2); margin: var(--s2) 0 0; }
.keyline span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; background: var(--c); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 var(--s4); margin: 0; font-size: var(--t-sm); }
.facts dt { color: var(--ink-2); padding: 7px 0; border-bottom: 1px solid var(--rule); }
.facts dd { margin: 0; padding: 7px 0; border-bottom: 1px solid var(--rule); font: 500 var(--t-sm) var(--mono); text-align: right; overflow-wrap: anywhere; }
.asks { list-style: none; margin: var(--s4) 0 0; padding: 0; font-size: var(--t-sm); }
.asks li { padding: 7px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--s3); }
.asks li .state { gap: 0; padding-top: 5px; align-self: start; }
.asks small { display: block; color: var(--ink-2); font-size: var(--t-xs); }

/* ---------- API drawer: the calls behind the view, out of the way until asked for */
.drawer { position: fixed; right: var(--s4); bottom: var(--s4); z-index: 20; width: min(560px, calc(100vw - 2 * var(--s4))); pointer-events: none; }
.drawer > * { pointer-events: auto; }
.drawer summary { list-style: none; cursor: pointer; margin-left: auto; width: max-content; display: flex; align-items: center; gap: var(--s2); background: var(--bg); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r2); box-shadow: var(--shadow); font: 500 var(--t-xs)/1 var(--mono); padding: 10px var(--s3); }
.drawer summary::-webkit-details-marker { display: none; }
.drawer summary::before { content: "{ }"; color: var(--accent); }
.drawer summary:hover { border-color: var(--ink-3); }
.drawer[open] summary { width: 100%; justify-content: flex-start; border-radius: var(--r2) var(--r2) 0 0; box-shadow: none; }
.drawer[open] summary::after { content: "Close"; margin-left: auto; color: var(--ink-3); }
.drawer-body { background: var(--bg); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--r2) var(--r2); box-shadow: var(--shadow); max-height: min(70vh, 640px); overflow: auto; padding: var(--s3) var(--s4) var(--s4); overscroll-behavior: contain; }
.drawer-note { font-size: var(--t-xs); color: var(--ink-2); margin: 0 0 var(--s2); }
.call { border-top: 1px solid var(--rule); padding: var(--s2) 0 var(--s3); font-size: var(--t-sm); }
.call-top { display: flex; align-items: baseline; gap: var(--s1) var(--s2); flex-wrap: wrap; }
.verb { font: 600 var(--t-xs) var(--mono); letter-spacing: .04em; color: var(--accent); }
.verb.post, .verb.delete { color: var(--warn); }
.call .path { font: var(--t-xs)/1.5 var(--mono); flex: 1 1 28ch; min-width: 0; overflow-wrap: anywhere; }
.call .st { color: var(--ink-3); white-space: nowrap; font: var(--t-xs) var(--mono); }
.call .st.bad { color: var(--warn); font-weight: 600; }
.call .tools { display: flex; gap: var(--s1); flex-basis: 100%; margin-top: var(--s1); }
.call dl { display: flex; flex-wrap: wrap; gap: 0 var(--s4); margin: var(--s2) 0 0; font-size: var(--t-xs); color: var(--ink-2); }
.call dl div { display: flex; gap: 5px; }
.call dt::after { content: ":"; }
.call dd { margin: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.call pre.curl { margin: var(--s2) 0 0; padding: var(--s2) var(--s3); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r1); font: var(--t-xs)/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.calls { list-style: none; margin: var(--s3) 0 0; padding: 0; font: 11px/1.6 var(--mono); border-top: 1px solid var(--rule); }
.calls li { display: grid; grid-template-columns: 3.4em 2.6em minmax(0, 1fr) 5em; gap: var(--s2); padding: 3px 0; border-bottom: 1px solid var(--rule); color: var(--ink-2); }
.calls li span:nth-child(3) { overflow-wrap: anywhere; color: var(--ink); }
.calls li span:last-child { text-align: right; }
.calls li .bad { color: var(--warn); }

/* ---------- section page */
.gapbox { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s2) var(--s5); padding: var(--s4) var(--s5); margin: 0 0 var(--s5); border: 1px solid var(--rule); border-radius: var(--r2); background: var(--surface); height: auto; }
.gapbox.s-needs_access, .gapbox.s-incomplete { border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); }
.gapbox, .gapbox.s-needs_access, .gapbox.s-not_offered { color: var(--ink); }
.gapbox::before { content: none; }
.gapbox dt { font: 500 var(--t-xs)/1.9 var(--sans); color: var(--ink-2); }
.gapbox dd { margin: 0; max-width: 80ch; font: var(--t-base)/1.5 var(--serif); }
.statline { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); font-size: var(--t-sm); color: var(--ink-2); }
.statline b { color: var(--ink); font-weight: 600; }
.group { margin-top: var(--s6); }
.group > header { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; padding-bottom: var(--s2); border-bottom: 1px solid var(--rule); }
.group > header p { margin: 0; color: var(--ink-3); font-size: var(--t-sm); }
.colls { list-style: none; margin: 0; padding: 0; }
.colls > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--s5); padding: var(--s3) var(--s2); border-bottom: 1px solid var(--rule); }
.colls > li:hover { background: var(--surface); }
.colls .t { font: 600 var(--t-base)/1.35 var(--sans); text-decoration: none; }
.colls .t:hover { color: var(--accent); }
.colls .id { font: var(--t-xs) var(--mono); color: var(--ink-3); margin-left: var(--s2); }
.colls .n { text-align: right; font-size: var(--t-xs); color: var(--ink-3); white-space: nowrap; }
.colls .n b { color: var(--ink); font: 600 var(--t-sm) var(--mono); margin-right: 4px; }
.colls .ds { grid-column: 1 / -1; margin: 0; font-size: var(--t-sm); color: var(--ink-2); max-width: 100ch; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.colls .pair { grid-column: 1 / -1; font-size: var(--t-sm); margin: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: center; }
.colls li.zero .n b, .colls li.zero .t { color: var(--ink-3); }

/* ---------- collection page */
.filters { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; padding: var(--s4); border: 1px solid var(--rule); border-radius: var(--r2); background: var(--surface); margin-bottom: var(--s3); }
.filters .grow { flex: 1 1 260px; }
.filters .grow input { width: 100%; }
.filters .act { display: flex; gap: var(--s2); }
.facets { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: 0 0 var(--s4); font-size: var(--t-sm); }
.facet { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.facet > span { font: 500 var(--t-xs) var(--sans); color: var(--ink-3); margin-right: var(--s1); }
.chip { height: 26px; padding: 0 10px; font-size: var(--t-xs); font-weight: 500; border-color: var(--rule); border-radius: 999px; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.chip small { opacity: .65; margin-left: 2px; font-family: var(--mono); }
.resbar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2); margin: var(--s4) 0 var(--s2); font-size: var(--t-sm); color: var(--ink-2); }
.resbar b { color: var(--ink); }
.tablewrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r2); position: relative; }
table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); }
th { text-align: left; font: 500 var(--t-xs)/1.4 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); padding: 0; background: var(--surface); border-bottom: 1px solid var(--rule); white-space: nowrap; }
th > span, th > button { display: flex; align-items: center; gap: 4px; padding: 8px var(--s3); }
th > button { width: 100%; height: auto; border: 0; border-radius: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; justify-content: flex-start; }
th > button:hover:not(:disabled) { background: none; color: var(--ink); }
th.num > button, th.num > span { justify-content: flex-end; }
th .arr { opacity: .35; width: 12px; }
th[aria-sort] { color: var(--accent); }
th[aria-sort] .arr { opacity: 1; color: var(--accent); }
td { padding: 9px var(--s3); border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface); }
td.num { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: var(--t-xs); }
td.nowrap { white-space: nowrap; }
td.lead { min-width: 28ch; max-width: 70ch; font: 500 var(--t-sm)/1.45 var(--sans); }
td.lead a { text-decoration: none; }
td.lead a:hover { color: var(--accent); text-decoration: underline; }
td.lead .clip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
td.open { white-space: nowrap; text-align: right; font-size: var(--t-xs); }
td .null { color: var(--rule-2); }
.docs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: var(--r2); }
.docs > li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) auto; gap: var(--s1) var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); align-items: baseline; }
.docs > li:last-child { border-bottom: 0; }
.docs > li.nd { grid-template-columns: minmax(0, 1fr) auto; }
.docs .d { font: 500 var(--t-xs)/1.6 var(--mono); color: var(--ink-2); }
.docs .d small { display: block; color: var(--ink-3); }
.docs .t { font: 600 var(--t-md)/1.3 var(--serif); overflow-wrap: anywhere; text-decoration: none; }
.docs .t:hover { color: var(--accent); }
.docs .m { font-size: var(--t-xs); color: var(--ink-3); margin: 2px 0 0; }
.docs .snip { margin: var(--s1) 0 0; font: var(--t-base)/1.5 var(--serif); color: var(--ink-2); overflow-wrap: anywhere; max-width: 90ch; }
.docs details { grid-column: 1 / -1; }
.docs details summary { cursor: pointer; font-size: var(--t-xs); color: var(--ink-2); }
.docs details ul { list-style: none; margin: var(--s1) 0 0; padding: 0 0 0 var(--s4); font-size: var(--t-sm); columns: 2 320px; }
.docs details li { padding: 2px 0; break-inside: avoid; overflow-wrap: anywhere; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s3); font-size: var(--t-sm); color: var(--ink-2); }
.pager .acts a { min-width: 92px; }

/* ---------- record page */
.rec { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s6); align-items: start; }
.fields { display: grid; grid-template-columns: minmax(10ch, max-content) minmax(0, 1fr); margin: 0; font-size: var(--t-sm); border: 1px solid var(--rule); border-radius: var(--r2); overflow: hidden; }
.fields dt { color: var(--ink-3); background: var(--surface); padding: 9px var(--s4); border-bottom: 1px solid var(--rule); font: var(--t-xs)/1.7 var(--mono); overflow-wrap: anywhere; }
.fields dd { margin: 0; padding: 8px var(--s4); border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; white-space: pre-wrap; min-width: 0; }
.fields dt:nth-last-of-type(1), .fields dd:last-child { border-bottom: 0; }
.fields table { width: auto; font-size: var(--t-xs); }
.fields table td, .fields table th { padding: 2px var(--s3) 2px 0; border: 0; background: none; }
.prov { display: grid; gap: var(--s3); font-size: var(--t-sm); position: sticky; top: 76px; padding: var(--s4); border: 1px solid var(--rule); border-radius: var(--r2); background: var(--surface); }
.prov h2 { font-size: var(--t-md); }
.prov dl { display: grid; gap: 2px; margin: 0; }
.prov dt { font: 500 var(--t-xs) var(--sans); color: var(--ink-3); margin-top: var(--s2); }
.prov dd { margin: 0; overflow-wrap: anywhere; }
.prov .btn { width: 100%; }
.text-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2); }
.pages { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 var(--s2); }
.pages a { min-width: 30px; height: 26px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; font: 500 var(--t-xs) var(--mono); text-decoration: none; color: var(--ink-2); border-radius: 4px; }
.pages a:hover { background: var(--surface-2); color: var(--ink); }
.pages a[aria-current] { background: var(--accent); color: var(--accent-ink); }
pre.text { margin: 0; padding: var(--s4) var(--s5); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r2); white-space: pre-wrap; overflow-wrap: anywhere; font: var(--t-sm)/1.6 var(--mono); max-height: 72vh; overflow: auto; }

/* ---------- search */
.sgroup { margin-top: var(--s6); }
.sgroup > header { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s2); }
.sgroup > header .c { color: var(--ink-3); font: var(--t-xs) var(--mono); }

/* ---------- keys */
.newkey { padding: var(--s4); border: 1px solid var(--accent); border-radius: var(--r2); background: var(--accent-soft); margin: 0 0 var(--s5); }
.newkey code { display: block; font-size: var(--t-sm); padding: var(--s3); margin: var(--s2) 0; background: var(--bg); border: 1px solid var(--rule); border-radius: var(--r1); overflow-wrap: anywhere; user-select: all; }
form.stack { display: grid; gap: var(--s4); justify-items: start; }
form.stack > label.field { width: 100%; }
form.stack input[type="text"], form.stack input[type="password"] { width: 100%; max-width: 560px; }

/* ---------- responsive */
@media (max-width: 1180px) {
  .trail { grid-template-columns: 1fr 1fr; }
  .trail li:nth-child(3) { border-left: 0; }
  .trail li:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .grid { grid-template-columns: 1fr; }
  .wire { grid-template-columns: 1fr 1fr; }
  .wire > :nth-child(2) { border-right: 0; }
  .wire > :nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--rule); }
  .health { grid-template-columns: 1fr; gap: var(--s5); }
}
@media (max-width: 1040px) {
  .rec { grid-template-columns: 1fr; gap: var(--s5); }
  .prov { position: static; }
}
@media (max-width: 760px) {
  h1 { font-size: var(--t-xl); }
  .front, .wire { grid-template-columns: 1fr; }
  .front > :first-child { border-right: 0; border-bottom: 1px solid var(--rule); }
  .front > *, .wire > * { padding: var(--s4); }
  .wire > * { border-right: 0; }
  .wire > * + * { border-top: 1px solid var(--rule); }
  .trail { grid-template-columns: 1fr; }
  .trail li { border-left: 0; border-top: 1px solid var(--rule); }
  .trail li:first-child { border-top: 0; }
  .tiers a:last-child { margin-left: 0; }
  .story.lead h2 { font-size: var(--t-2xl); }
  .bills li { font-size: var(--t-base); }
  .tile, .grid-head { grid-template-columns: 16px minmax(0, 1fr) 5em 4.5em; }
  .tile > :nth-child(3), .grid-head > :nth-child(3), .tile > :nth-child(5), .grid-head > :nth-child(5) { display: none; }
  .docs > li { grid-template-columns: 1fr; }
  .docs .d small { display: inline; margin-left: var(--s2); }
  .fields { grid-template-columns: 1fr; }
  .fields dt { padding: var(--s2) var(--s3) 2px; border-bottom: 0; }
  .fields dd { padding: 2px var(--s3) var(--s2); }
  .gapbox { grid-template-columns: 1fr; gap: 0; padding: var(--s3) var(--s4); }
  .gapbox dd { margin-bottom: var(--s2); }
  .calls li { grid-template-columns: 3.4em 2.6em minmax(0, 1fr); }
  .calls li span:last-child { display: none; }
  .drawer { right: 0; bottom: 0; width: 100vw; }
  .drawer summary { margin-right: var(--s4); margin-bottom: var(--s4); }
  .drawer[open] summary { margin: 0; }
  .health .bar { min-width: 60px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* the unified layer: timeline, entities */
a.ent { text-decoration: underline dotted; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a.ent:hover { text-decoration-style: solid; }
.dayhead { font: 600 var(--t-sm)/1.3 var(--sans); margin: var(--s5) 0 0; padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
.days .log li:first-child { border-top: 0; }
.days .log .k { font: 500 var(--t-xs)/1.9 var(--sans); color: var(--ink-2); }
.log .x small b { color: var(--ink); }
.log.week .x p { margin: 0 0 3px; font-size: var(--t-sm); line-height: 1.4; }
.log.week .ty { font: 500 var(--t-xs)/1.5 var(--sans); color: var(--ink-3); }
.story .legend { margin: 0 0 var(--s3); }
.ents { list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); }
.ents li { padding: 7px 0; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.ents small { display: block; color: var(--ink-3); font-size: var(--t-xs); }
.named h2 { margin-bottom: var(--s2); }

/* meetings: motions list and the audio chart (plain SVG) */
.motions { list-style: none; margin: 0; padding: 0; }
.motions li { border-top: 1px solid var(--rule); padding: var(--s3) 0; }
.motions p { margin: 0 0 var(--s1); }
.chartbox { margin: 0; padding: var(--s4); border: 1px solid var(--rule); border-radius: var(--r2); }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--ink-2); font: 11px var(--mono); }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .bar { fill: var(--rule-2); }
.chart .bar.raised { fill: var(--accent); }
.chart .ev { fill: var(--ink); }
.chart .mk { stroke: var(--ink-2); stroke-dasharray: 3 3; stroke-width: 1.5; }
.chart .mkn { fill: var(--ink); font-weight: 600; }
.chartbox figcaption { font-size: var(--t-sm); color: var(--ink-2); margin-top: var(--s2); max-width: 70ch; }


/* ================================================================ dashboard pages (the reference images) */
#main { padding: 23px var(--gut) var(--s8); min-height: 60vh; width: 100%; }
.view:not(.bare) { max-width: var(--wrap); }
.view.bare > .head { display: contents; }
h1 { font: 500 var(--t-2xl)/1.15 var(--sans); letter-spacing: -.02em; }
h2 { font: 500 var(--t-lg)/1.25 var(--sans); letter-spacing: -.01em; }
h3 { font: 500 var(--t-md)/1.35 var(--sans); }
th { text-transform: none; letter-spacing: 0; font: 500 var(--t-sm)/1.4 var(--sans); color: var(--ink-2); background: none; }
.tablewrap { border-radius: var(--r2); }
.empty strong { font: 500 var(--t-lg) var(--sans); }
.story h2, .story.lead h2 { font-weight: 500; letter-spacing: -.02em; }
.story.lead h2 { font-size: var(--t-2xl); }
.bills li, .log .x, .docs .snip, .gapbox dd { font-family: var(--sans); font-size: var(--t-base); }
.docs .t, .trail h3 { font: 500 var(--t-md)/1.3 var(--sans); }
.chip[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); border-color: var(--rule-2); }
.pages a[aria-current] { background: var(--btn); color: var(--accent-ink); }
.verb, th[aria-sort], th[aria-sort] .arr, .trail li::before, .drawer summary::before, .tiers a:last-child { color: var(--ink); }
.tile:hover .nm, .colls .t:hover, td.lead a:hover, .docs .t:hover, .crumbs a:hover, details.small > summary:hover { color: inherit; text-decoration: underline; }
.newkey { border-color: var(--ok-line); background: var(--ok-bg); color: var(--ok-ink); }
.chart .bar.raised { fill: #E8762C; }
.foot { margin: 0; border-top: 1px solid var(--rule); padding: var(--s3) var(--gut) var(--s5); font-size: var(--t-xs); color: var(--ink-3); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); justify-content: space-between; }

/* stat card: four numbers separated by vertical rules */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule-2); border-radius: var(--r2); padding: 10px 0; margin-bottom: 23px; }
.stats > div { display: grid; gap: 0; padding: 5px 20px; border-left: 1px solid var(--rule-2); min-width: 0; }
.stats > div:first-child { border-left: 0; }
.stats span { font-size: var(--t-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats b { font: 700 23px/1.25 var(--sans); letter-spacing: -.01em; white-space: nowrap; }

/* toolbar: segmented filter and a filter input */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-bottom: 15px; }
.filter { position: relative; display: flex; align-items: center; flex: 0 1 209px; }
.filter svg { position: absolute; left: 10px; color: var(--ink-3); pointer-events: none; }
.filter input { width: 100%; height: 30px; padding: 0 10px 0 31px; }

/* hairline rows (jurisdictions, logs, mappings): no outer box, a rule under each row */
.tablewrap.bare { border: 0; border-radius: 0; }
table.rows { font-size: var(--t-base); }
table.rows th { border-bottom: 1px solid var(--rule-2); color: var(--ink); font: 400 var(--t-base)/1.3 var(--sans); vertical-align: bottom; }
table.rows th > span { padding: 12px 8px; }
table.rows td { padding: 0 8px; height: 50px; vertical-align: middle; border-bottom: 1px solid var(--rule-2); }
table.rows tbody tr:last-child td { border-bottom: 1px solid var(--rule-2); }
table.rows tbody tr:hover td { background: none; }
table.rows th.n > span, table.rows td.n { text-align: right; justify-content: flex-end; white-space: nowrap; }
table.rows td.bad { color: var(--red); font-weight: 500; }
table.rows td.nm a { text-decoration: none; }
table.rows td.nm a:hover { text-decoration: underline; }
table.rows code { font-size: 13px; }
table.juris-t { border-top: 1px solid var(--rule-2); }
table.juris-t td.nm { white-space: nowrap; }
table.juris-t td code, table.rows td.nw { white-space: nowrap; }
body.bare .drawer { display: none; }
table.juris-t td.pills { white-space: nowrap; }
table.juris-t td.ago { width: 6.5em; }
.rowsnote { margin: var(--s4) 8px 0; }
.pillo { display: inline-block; font: 500 11px/1 var(--sans); letter-spacing: .01em; text-transform: uppercase; border: 1px solid var(--ink); border-radius: 4px; padding: 3px 5px; margin-right: 5px; white-space: nowrap; }
.dot { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.ok::before { background: var(--green); } .dot.warn::before { background: var(--amber); } .dot.bad::before { background: var(--red); }

/* tabs with an ink underline; the switch */
.tabsbar { display: flex; align-items: flex-end; gap: var(--s4); border-bottom: 1px solid var(--rule-2); margin: -23px 0 4px; }
.view > .tabs { margin-top: -23px; }
.tabsbar .tabs { border-bottom: 0; flex: 1; min-width: 0; mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--rule-2); overflow-x: auto; scrollbar-width: none; }
.tabs > * { flex: none; height: 56px; padding: 0 12px; display: inline-flex; align-items: center; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; font: 400 15px/1 var(--sans); color: var(--ink-2); text-decoration: none; margin-bottom: -1px; white-space: nowrap; }
.tabs > *:hover:not(:disabled) { color: var(--ink); }
.tabs > [aria-selected="true"] { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.swlabel { display: flex; align-items: center; gap: 9px; height: 56px; white-space: nowrap; font-size: var(--t-base); flex: none; }
.switch { appearance: none; width: 39px; height: 21px; flex: none; margin: 0; border-radius: 999px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--rule-2); position: relative; cursor: pointer; transition: background-color 150ms var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1px var(--rule-2); transition: transform 150ms var(--ease); }
.switch:checked { background: var(--btn); box-shadow: none; }
.switch:checked::after { transform: translateX(18px); box-shadow: none; }
.switch:disabled { cursor: default; opacity: 1; }
table.map-t code.fld { font-size: 15.5px; }
table.map-t th.sw > span, table.map-t td.sw { text-align: right; justify-content: flex-end; }
table.map-t td.sw { width: 64px; }
table.map-t tr.pt code { color: var(--ink-2); }
code.kind { display: inline-block; font: 400 12.5px/1 var(--mono); background: var(--surface-2); border: 1px solid var(--rule-2); border-radius: 4px; padding: 3px 5px; }
.sub.lead { margin: var(--s4) 8px var(--s2); }

/* chips that are selects; logs split; response pane */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.chipsel { position: relative; display: inline-flex; align-items: center; height: 30px; padding-left: 12px; border: 1px solid var(--rule-2); border-radius: var(--r1); font-size: var(--t-base); white-space: nowrap; }
.chipsel:hover { border-color: var(--ink-3); }
.chipsel select { appearance: none; border: 0; background: none; height: 28px; padding: 0 12px 0 5px; font-size: var(--t-base); cursor: pointer; field-sizing: content; max-width: 24ch; }
.chipsel.nolabel { padding-left: 7px; }
.view.split { display: grid; grid-template-columns: minmax(0, 1fr) 313px; margin: -23px calc(-1 * var(--gut)) calc(-1 * var(--s8)); min-height: calc(100vh - var(--bar)); }
.split-main { padding: 20px 0 var(--s7) var(--gut); min-width: 0; }
.pane { border-left: 1px solid var(--rule-2); padding: 22px var(--gut) var(--s6); min-width: 0; position: sticky; top: var(--bar); align-self: start; max-height: calc(100vh - var(--bar)); overflow: auto; }
.pane-t { font: 500 19px/1.25 var(--sans); letter-spacing: -.01em; margin: 0 0 4px; overflow-wrap: anywhere; }
.pane-q { margin: 0 0 6px; color: var(--ink-2); overflow-wrap: anywhere; font-size: var(--t-sm); }
.pill-st { display: inline-flex; align-items: center; height: 25px; padding: 0 11px; margin: 4px 0 6px; border-radius: 999px; border: 1px solid var(--rule-2); background: var(--surface-2); font-size: var(--t-base); white-space: nowrap; }
.pill-st.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok-ink); }
.pill-st.bad { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--warn); }
.pane .tabs { margin: 0 calc(-1 * var(--gut)) 20px; padding: 0 var(--gut); gap: 22px; }
.pane .tabs > * { height: 46px; padding: 0; }
pre.code { margin: 0; padding: 12px; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--r1); font: 12.5px/1.52 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 62vh; overflow: auto; }
.pane .sub { margin-top: var(--s3); }
table.logs-t th { border-bottom: 0; }
table.logs-t th > span { padding-bottom: 8px; }
table.logs-t td { height: auto; padding: 14px 8px; }
table.logs-t tbody tr { cursor: pointer; }
table.logs-t tbody tr:hover td { background: var(--surface); }
table.logs-t tbody tr[aria-selected="true"] td { background: var(--surface-3); border-bottom-color: transparent; }
table.logs-t tbody tr[aria-selected="true"] td:first-child { border-radius: 6px 0 0 6px; }
table.logs-t td.ep { font-size: 15px; overflow-wrap: anywhere; min-width: 16ch; }
table.logs-t td.nw { white-space: nowrap; }
.tester { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); max-width: 620px; padding-right: var(--gut); }
.tester > .field:nth-child(-n+2), .tester > p { grid-column: 1 / -1; }
.tester select, .tester input { width: 100%; }
.reqline { display: flex; gap: 10px; align-items: baseline; margin: var(--s5) var(--gut) 0 0; padding-top: var(--s4); border-top: 1px solid var(--rule-2); overflow-wrap: anywhere; }
.reqline .verb { font: 600 var(--t-sm) var(--mono); }

/* overview */
.view .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gut); align-items: start; }
.card { border: 1px solid var(--rule-2); border-radius: var(--r2); padding: 18px 20px; min-width: 0; }
.card > header, .sect > h2 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.card > header a { font-size: var(--t-sm); color: var(--ink-2); }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.feed, ol.votes { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 3.6em max-content minmax(0, 1fr); gap: 4px; align-items: center; min-height: 40px; padding: 6px 0; border-top: 1px solid var(--rule); }
.feed .when { color: var(--ink-2); font-size: var(--t-sm); white-space: nowrap; }
.feed a { text-decoration: none; overflow-wrap: anywhere; }
.feed a:hover { text-decoration: underline; }
ol.votes li { padding: 10px 0; border-top: 1px solid var(--rule); }
ol.votes p { margin: 0 0 2px; text-wrap: pretty; }
.morelinks { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin: var(--s5) 0 0; font-size: var(--t-sm); color: var(--ink-2); }
.sect { margin-bottom: var(--s7); }
.sect > .sub { margin: -6px 0 var(--s3); max-width: 80ch; }

/* ---------- responsive: under 900px the sidebar is a drawer */
@media (max-width: 900px) {
  body:has(> .side) { padding-left: 0; }
  body > .side { width: 264px; transform: translateX(-100%); transition: transform 200ms var(--ease); box-shadow: none; }
  body > .side.open { transform: none; box-shadow: var(--shadow); }
  .menu { display: inline-flex; padding: 0 6px; margin-left: -6px; }
  .menu svg.i { width: 20px; height: 20px; }
  :root { --gut: 16px; --bar: 56px; }
  .crumb { font-size: 15px; }
  .crumb .g, .crumb .sl { display: none; }
  #gsearch { display: none; }
  .view.split { grid-template-columns: 1fr; }
  .split-main { padding-right: var(--gut); }
  .pane { position: static; max-height: none; border-left: 0; border-top: 1px solid var(--rule-2); }
  .view .two { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .juris > span { display: none; }
  .juris { padding-left: 4px; }
  .juris select { max-width: 11ch; }
  #action .primary span { display: none; }
  #action .primary { padding: 0 8px; }
  .stats { grid-template-columns: 1fr 1fr; padding: 0; }
  .stats > div { padding: 12px 14px; }
  .stats > div:nth-child(odd) { border-left: 0; }
  .stats > div:nth-child(n+3) { border-top: 1px solid var(--rule-2); }
  .stats b { font-size: 20px; }
  .toolbar .filter { flex: 1 1 100%; }
  table.rows td, table.rows th > span { padding-left: 4px; padding-right: 4px; }
  table.juris-t, table.juris-t tbody { display: block; }
  table.juris-t tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 4px; border-bottom: 1px solid var(--rule-2); }
  table.juris-t td { display: block; height: auto; padding: 0; border: 0 !important; width: auto !important; }
  table.juris-t td.pills { grid-column: 1 / -1; white-space: normal; line-height: 2; }
  table.juris-t td.n { text-align: left; }
  table.juris-t td.ago { text-align: right; grid-column: 2; }
  table.juris-t td:nth-child(5) { justify-self: end; }
  table.juris-t td:nth-child(2) { justify-self: end; }
  .tabsbar { flex-direction: column; align-items: stretch; gap: 0; }
  .tabsbar .tabs { border-bottom: 1px solid var(--rule-2); }
  .tabs > * { height: 46px; }
  .swlabel { height: 46px; justify-content: space-between; }
  table.map-t code.fld { font-size: 13.5px; }
  .tester { grid-template-columns: 1fr; }
  table.logs-t th:nth-child(2), table.logs-t td:nth-child(2) { display: none; }  /* phone: the method column gives way to the endpoint */
  table.logs-t td.ep { min-width: 0; font-size: 14px; }
  .feed li { grid-template-columns: 3.4em minmax(0, 1fr); }
  .feed li .pillo { justify-self: start; }
  .feed li > :last-child { grid-column: 1 / -1; }
}
