/* Gelasio: the same shapes and spacing as Georgia, but with lining figures, so numbers like $345M sit on one line
   (Georgia's figures rise and drop). Self-hosted; SIL Open Font License. */
@font-face { font-family: Gelasio; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/gelasio-latin-400-normal.a3b48b7ff287.woff2") format("woff2"); }
@font-face { font-family: Gelasio; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/gelasio-latin-400-italic.ac56bdee97f7.woff2") format("woff2"); }
/* Tally LA: a civic publication. Paper, ink, editorial type, and clear data.
   Every number can open into a plain-language explanation. */
:root {
  --ground: #f5f2ea;
  --paper: #fffdf8;
  --ink: #242b26;
  --muted: #596259;
  --faint: #5f675d;
  --rule: #d7d7cb;
  --accent: #b34c2c;
  --accent-ink: #963b20;
  --accent-soft: #f1e6d9;
  --sign: #0e6b4e;
  --sign-soft: #e3f3ec;
  --warn: #8a5300;
  --warn-soft: #fdf1dc;
  --crit: #b3261e;
  --crit-soft: #fbe6e4;
  --hover: rgba(27, 26, 46, .045);
  --bar-muted: #c8cdbf;

  /* Categorical slots, validated for color-vision deficiency in this order. */
  --s-state: #2a78d6; --s-county: #eb6834; --s-city: #1baf7a; --s-metro: #eda100;
  --s-schools: #e87ba4; --s-measure_a: #008300; --s-federal: #6250d6; --s-other: #e34948;
  --r1: #30483a; --r2: #52694e; --r3: #819077; --r4: #abb79c;

  --f-editorial: Gelasio, Georgia, "Times New Roman", serif;
  --f-display: "Overpass", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Overpass Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --step--1: .8125rem; --step-0: 1rem; --step-1: 1.25rem; --step-2: 1.625rem; --step-3: 2.25rem;
  --step-4: clamp(2.75rem, 8vw, 5rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-tally-theme="light"]) {
    --ground: #161d19; --paper: #202922; --ink: #f0eee5; --muted: #bac1b5; --faint: #9da996; --rule: #3b473d;
    --accent: #e8694a; --accent-ink: #ef7d5f; --accent-soft: #3a241d;
    --sign: #45c597; --sign-soft: #15302a; --warn: #f0b44a; --warn-soft: #36290f; --crit: #f07a70; --crit-soft: #3a1c1c;
    --hover: rgba(255, 255, 255, .055); --bar-muted: #495546;
    --s-state: #3987e5; --s-county: #d95926; --s-city: #199e70; --s-metro: #c98500;
    --s-schools: #d55181; --s-measure_a: #008300; --s-federal: #9085e9; --s-other: #e66767;
    --r1: #d0ddc2; --r2: #e8694a; --r3: #819077; --r4: #637c59;
    color-scheme: dark;
  }
}
:root[data-theme="dark"]:not([data-tally-theme="light"]), :root[data-tally-theme="dark"] {
  --ground: #161d19; --paper: #202922; --ink: #f0eee5; --muted: #bac1b5; --faint: #9da996; --rule: #3b473d;
  --accent: #e8694a; --accent-ink: #ef7d5f; --accent-soft: #3a241d;
  --sign: #45c597; --sign-soft: #15302a; --warn: #f0b44a; --warn-soft: #36290f; --crit: #f07a70; --crit-soft: #3a1c1c;
  --hover: rgba(255, 255, 255, .055); --bar-muted: #495546;
  --s-state: #3987e5; --s-county: #d95926; --s-city: #199e70; --s-metro: #c98500;
  --s-schools: #d55181; --s-measure_a: #008300; --s-federal: #9085e9; --s-other: #e66767;
  --r1: #d0ddc2; --r2: #e8694a; --r3: #819077; --r4: #637c59;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--f-body); font-size: var(--step-0); line-height: 1.55; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.1; }
h1 { font-size: var(--step-3); font-weight: 900; letter-spacing: -.015em; }
h2 { font-size: var(--step-2); font-weight: 900; letter-spacing: -.01em; }
h3 { font-size: var(--step-1); font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; }
.num, td.n, .stat .v { font-variant-numeric: lining-nums tabular-nums; }
.eyebrow { font-family: var(--f-display); font-weight: 800; font-size: var(--step--1); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.lede { color: var(--muted); max-width: 66ch; font-size: 1.0625rem; }
.small { font-size: var(--step--1); color: var(--muted); }
.src { font-size: var(--step--1); color: var(--faint); }
.src a { color: var(--muted); }
.stack-v { display: grid; gap: 14px; }

/* ---------- header ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--paper); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; gap: 18px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand b { font-family: var(--f-display); font-weight: 900; font-size: 1.375rem; letter-spacing: -.01em; }
.brand svg { width: 30px; height: 26px; }
/* ---------- main menu: grouped dropdowns on wide screens, a drawer on phones ---------- */
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--paper); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 12px; }
.top .topbar { justify-content: space-between; }
.mainnav { position: relative; }
.burger { display: none; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); font: 700 .9375rem var(--f-display); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.burger-icon { display: grid; gap: 4px; width: 18px; }
.burger-icon i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.mainnav.is-open .burger-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mainnav.is-open .burger-icon i:nth-child(2) { opacity: 0; }
.mainnav.is-open .burger-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.group { position: relative; }
.gbtn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; font: 700 .9375rem var(--f-display); color: var(--muted); padding: 8px 12px; border-radius: 8px; }
.gbtn svg { width: 12px; height: 12px; transition: transform .2s; }
.gbtn:hover, .group.is-open > .gbtn { background: var(--hover); color: var(--ink); }
.group.is-current > .gbtn { color: var(--accent-ink); }
.group.is-current > .gbtn::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -11px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.group.is-open > .gbtn svg { transform: rotate(180deg); }
.gpanel { display: none; position: absolute; right: 0; top: calc(100% + 12px); width: min(460px, 92vw); background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 14px 40px rgba(20, 16, 50, .16); padding: 14px; z-index: 20; }
.group:first-child .gpanel, .group:nth-child(2) .gpanel { right: auto; left: 0; }
.group.is-open > .gpanel { display: block; }
.gblurb { font-family: var(--f-display); font-weight: 800; font-size: var(--step--1); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 2px 10px 8px; }
.gpanel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gpanel a { display: grid; gap: 1px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.gpanel a:hover { background: var(--hover); }
.gpanel a b { font-family: var(--f-display); font-weight: 800; font-size: 1rem; }
.gpanel a span { font-size: var(--step--1); color: var(--muted); }
.gpanel a[aria-current="page"] { background: var(--accent-soft); }
.gpanel a[aria-current="page"] b { color: var(--accent-ink); }
@media (max-width: 900px) {
  .burger { display: inline-flex; }
  .menu { display: none; position: fixed; left: 0; right: 0; top: var(--menu-top, 60px); bottom: 0; overflow-y: auto; flex-direction: column; gap: 0; background: var(--paper); border-top: 1px solid var(--rule); padding: 8px max(16px, env(safe-area-inset-left, 0px)) 40px; z-index: 20; }
  .mainnav.is-open .menu { display: flex; }
  .group { border-bottom: 1px solid var(--rule); }
  .gbtn { width: 100%; justify-content: space-between; font-size: 1.125rem; padding: 16px 4px; color: var(--ink); }
  .group.is-current > .gbtn::after { display: none; }
  .gpanel { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 12px; }
  .gblurb { display: none; }
  body.menu-open { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .burger-icon i, .gbtn svg { transition: none; } }

/* ---------- page scaffolding ---------- */
.page-head { background: var(--paper); border-bottom: 1px solid var(--rule); padding-block: 36px 32px; }
.page-head .wrap { display: grid; gap: 12px; }
.crumbs { font-size: var(--step--1); color: var(--muted); }
.crumbs a { color: var(--muted); }
main section { padding-block: 40px; border-bottom: 1px solid var(--rule); }
main section:last-child { border-bottom: 0; }
main section > .wrap { display: grid; gap: 22px; }
.head { display: grid; gap: 8px; }
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 10px; padding: 22px; min-width: 0; }
/* Fixed column counts by width, so a row never ends with one card on its own. */
.grid-2, .grid-3, .grid-4 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-4 { gap: 14px; align-items: stretch; }
@media (min-width: 560px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 820px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 880px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stack-rows { display: grid; gap: 18px; }

/* ---------- stat ---------- */
.stat { display: grid; gap: 4px; align-content: start; }
.stat .v { font-family: var(--f-display); font-weight: 900; font-size: var(--step-3); line-height: 1; letter-spacing: -.01em; }
.stat .l { font-size: .9375rem; }
.stat .c { font-size: var(--step--1); color: var(--muted); }

/* ---------- explain box ---------- */
details.explain { border-top: 1px dashed var(--rule); padding-top: 8px; }
details.explain > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9375rem; color: var(--accent-ink); padding: 4px 0; }
details.explain > summary::-webkit-details-marker { display: none; }
details.explain > summary .q { width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font: 800 .75rem var(--f-display); flex: none; }
/* The "?" is drawn as a shape, so it sits in the exact center of the circle whatever font loads. */
.q { font-size: 0 !important; }
.q::before { content: ""; width: 7px; height: 10px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M2.2 4.4a2.8 2.8 0 1 1 4.3 2.4c-.9.6-1.5 1.1-1.5 2.3v.5' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'/%3E%3Ccircle cx='5' cy='12.4' r='1.15'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M2.2 4.4a2.8 2.8 0 1 1 4.3 2.4c-.9.6-1.5 1.1-1.5 2.3v.5' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'/%3E%3Ccircle cx='5' cy='12.4' r='1.15'/%3E%3C/svg%3E") center / contain no-repeat; }
details.explain > summary::after { content: "Show"; font-weight: 500; color: var(--faint); font-size: var(--step--1); }
details.explain[open] > summary::after { content: "Hide"; }
.explain-body { display: grid; gap: 10px; padding: 12px 14px; margin-top: 6px; background: var(--accent-soft); border-radius: 8px; font-size: .9375rem; max-width: 76ch; }
.explain-body .laws ul { padding-left: 18px; display: grid; gap: 6px; margin-top: 6px; }
.explain-body .tag { font-size: var(--step--1); color: var(--muted); }
.explain-body .pool b, .explain-body .laws > b { font-family: var(--f-display); }

/* ---------- ledger rows (expandable) ---------- */
.ledger { display: grid; border-top: 1px solid var(--rule); }
details.row { border-bottom: 1px solid var(--rule); }
details.row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 6.5rem 18px; gap: 14px; align-items: center; padding: 12px 6px; border-radius: 6px; }
details.row > summary::-webkit-details-marker { display: none; }
details.row > summary:hover { background: var(--hover); }
details.row .rl { display: grid; gap: 2px; min-width: 0; }
details.row .rl b { font-weight: 600; }
details.row .rl span { font-size: var(--step--1); color: var(--muted); }
details.row .rn { font-family: var(--f-mono); font-weight: 600; text-align: right; font-size: .9375rem; }
details.row .chev { width: 18px; height: 18px; display: grid; place-items: center; color: var(--faint); transition: transform .2s; }
details.row[open] .chev { transform: rotate(90deg); }
details.row .rb { padding: 4px 6px 18px; display: grid; gap: 12px; }
details.row .rb .explain-inline { display: grid; gap: 8px; max-width: 76ch; font-size: .9375rem; }
@media (max-width: 620px) {
  details.row > summary { grid-template-columns: minmax(0, 1fr) 5.5rem 16px; }
  details.row > summary .bars { grid-column: 1 / -1; grid-row: 2; }
}
.bars { display: grid; gap: 4px; }
.bar { height: 10px; background: var(--ground); border-radius: 0 4px 4px 0; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; background: var(--bar-muted); }
.bar.accent > i { background: var(--accent); }
.bar.social > i { background: var(--accent); }
.bar-key { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--step--1); color: var(--muted); }
.bar-key span { display: inline-flex; align-items: center; gap: 6px; }
.bar-key i { width: 18px; height: 8px; border-radius: 2px; display: inline-block; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.good { background: var(--sign-soft); color: var(--sign); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.crit { background: var(--crit-soft); color: var(--crit); }
.pill.none { background: var(--ground); color: var(--muted); }
.pill.open { background: var(--ground); color: var(--ink); border: 1px solid var(--rule); }
.note { font-size: .9375rem; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); }
.note b { color: var(--warn); }

/* ---------- stacked bars ---------- */
.stack { display: flex; gap: 2px; height: 40px; border-radius: 5px; overflow: hidden; }
.stack > span { display: block; min-width: 3px; }
.stack > span:hover { filter: brightness(1.12) saturate(1.1); }
.stack.tall { height: 52px; }
.legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px 22px; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: baseline; font-size: .9375rem; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; transform: translateY(1px); flex: none; }
.legend .v { font-family: var(--f-mono); font-size: .875rem; color: var(--muted); }

/* ---------- home ---------- */
.hero { background: var(--paper); padding-block: 40px 44px; border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 40px; align-items: end; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: 24px; } }
.hero h1 { font-size: var(--step-2); font-weight: 800; max-width: 24ch; }
.rate { font-family: var(--f-display); font-weight: 900; font-size: var(--step-4); line-height: .9; letter-spacing: -.03em; }
.rate small { font-size: .35em; font-weight: 800; letter-spacing: 0; color: var(--muted); margin-left: .2em; }
.now { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 196px), 1fr)); gap: 14px; }
.now .panel { display: grid; gap: 6px; align-content: start; }
.go { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 196px), 1fr)); gap: 14px; }
.go a { display: grid; gap: 6px; padding: 18px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); text-decoration: none; color: var(--ink); }
.go a:hover { border-color: var(--accent); }
.go a b { font-family: var(--f-display); font-size: var(--step-1); font-weight: 800; }
.go a span { color: var(--muted); font-size: .9375rem; }
.go a em { font-style: normal; color: var(--accent-ink); font-weight: 600; font-size: .9375rem; }
.statusline { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: var(--step--1); color: var(--muted); }
.statusline b { color: var(--ink); font-weight: 600; }

/* ---------- receipt ---------- */
.receipt-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .receipt-grid { grid-template-columns: 1fr; } }
form.inputs { display: grid; gap: 22px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
fieldset legend { font-family: var(--f-display); font-weight: 800; font-size: 1.0625rem; padding: 0; margin-bottom: 4px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.field { display: grid; gap: 5px; align-content: start; }
.field label { font-weight: 600; font-size: .875rem; }
.field .hint { font-size: var(--step--1); color: var(--muted); }
.money { display: flex; align-items: center; border: 1px solid var(--rule); border-radius: 8px; background: var(--ground); }
.money span { padding: 0 0 0 10px; color: var(--muted); font-family: var(--f-mono); font-size: .9375rem; }
.money span.after { padding: 0 10px 0 0; }
.money input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: 600 1rem var(--f-mono); padding: 9px 10px 9px 6px; }
.money input:focus { outline: none; }
.money:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.use-avg { justify-self: start; border: 1px solid var(--rule); background: var(--paper); color: var(--accent-ink); font: 600 .8125rem var(--f-body); padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.use-avg:hover { border-color: var(--accent); }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; padding: 3px; background: var(--ground); gap: 3px; justify-self: start; }
.seg label { cursor: pointer; padding: 6px 14px; border-radius: 6px; font-weight: 600; font-size: .9375rem; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); }
.example-note { font-size: var(--step--1); color: var(--warn); background: var(--warn-soft); padding: 8px 12px; border-radius: 6px; }

.receipt { font-family: var(--f-mono); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 22px 20px 26px; position: relative; font-size: .875rem; }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px; background: linear-gradient(-45deg, transparent 6px, var(--paper) 0) 0 0/12px 8px, linear-gradient(45deg, transparent 6px, var(--paper) 0) 0 0/12px 8px; }
.receipt .rhead { text-align: center; display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px dashed var(--rule); }
.receipt .rhead b { font-family: var(--f-display); font-weight: 900; font-size: 1.25rem; letter-spacing: .02em; }
.receipt details { border-bottom: 1px dashed var(--rule); }
.receipt details > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; font-weight: 600; }
.receipt details > summary::-webkit-details-marker { display: none; }
.receipt details > summary span:first-child { display: flex; align-items: center; gap: 8px; min-width: 0; }
.receipt details > summary .sw { width: 10px; height: 10px; border-radius: 2px; }
.receipt .rlines { padding: 0 0 12px 18px; display: grid; gap: 4px; }
.receipt .rline { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); }
.receipt .rline.fee { font-style: italic; }
.receipt .rline.ctx { color: var(--faint); }
.receipt .rwhy { font-family: var(--f-body); font-size: .875rem; color: var(--ink); margin-top: 6px; }
.receipt .rwhy > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-weight: 600; font-size: .8125rem; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; }
.receipt .rwhy > summary::-webkit-details-marker { display: none; }
.receipt .rwhy > summary::after { content: "+"; font-weight: 700; }
.receipt .rwhy[open] > summary::after { content: "−"; }
.receipt .rwhy-body { display: grid; gap: 6px; background: var(--accent-soft); border-radius: 6px; padding: 8px 10px; margin-top: 6px; }
.receipt .rtotal { display: flex; justify-content: space-between; font-weight: 600; font-size: 1.0625rem; padding-top: 14px; }
.receipt .rsub { display: flex; justify-content: space-between; color: var(--muted); padding-top: 6px; }
.receipt .rsocial { margin-top: 14px; padding: 10px 12px; background: var(--accent-soft); border-radius: 6px; color: var(--ink); font-family: var(--f-body); font-size: .9375rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--f-display); font-weight: 800; font-size: .8125rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--ground); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.n { font-family: var(--f-mono); font-size: .875rem; white-space: nowrap; }

/* ---------- traces, promises, decisions ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { border: 1px solid var(--rule); border-radius: 8px; padding: 14px; display: grid; gap: 8px; align-content: start; background: var(--paper); }
.step .st { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.step .st b { font-family: var(--f-display); font-weight: 800; }
.step p { font-size: .9375rem; color: var(--muted); }
.step.gap { border-style: dashed; border-color: var(--crit); }
.prow { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 10px; align-items: center; }
.prow .lbl { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.ptrack { position: relative; height: 26px; }
.pbar { height: 100%; border-radius: 0 4px 4px 0; display: flex; align-items: center; padding-left: 8px; font: 600 .8125rem var(--f-mono); white-space: nowrap; }
.pbar.promised { background: repeating-linear-gradient(135deg, var(--rule) 0 6px, transparent 6px 10px); border: 1px solid var(--faint); color: var(--ink); }
.pbar.actual { background: var(--accent); color: var(--paper); }
.pbar.missing { border: 1px dashed var(--crit); color: var(--crit); background: transparent; width: 100%; }
.pout { position: absolute; top: 4px; font: 600 .8125rem var(--f-mono); }
.ratio { font-family: var(--f-display); font-weight: 900; font-size: var(--step-2); }
.timeline { display: grid; }
.dec { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 18px; padding-block: 18px; border-top: 1px solid var(--rule); }
@media (max-width: 640px) { .dec { grid-template-columns: 1fr; gap: 6px; } }
.dec .when { font-family: var(--f-mono); font-size: .875rem; color: var(--muted); }
.dec .body { display: grid; gap: 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule); color: var(--muted); }
.tag.amt { color: var(--ink); border-color: var(--faint); font-family: var(--f-mono); }
.progress { height: 18px; border-radius: 4px; background: var(--ground); display: flex; overflow: hidden; gap: 2px; }
.progress i { display: block; height: 100%; }

/* ---------- live chart ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--f-mono); font-size: 11px; fill: var(--muted); }
.chead { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px 16px; }
.chead h3 { margin: 0 0 2px; }
.chead .seg label { padding: 4px 11px; font-size: .8125rem; }
.cbox { position: relative; }
.cbox .chart { touch-action: pan-y; cursor: crosshair; }
.cbox .chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.ctip { position: absolute; z-index: 5; pointer-events: none; transform: translate(-50%, -100%); display: grid; gap: 2px;
  background: var(--ink); color: var(--paper); font-size: .8125rem; line-height: 1.35; padding: 7px 10px; border-radius: 6px; white-space: nowrap; }
.ctip .small { color: inherit; opacity: .75; }
.ctip.below { transform: translate(-50%, 0); }
#live-read { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.empty { border: 1px dashed var(--rule); border-radius: 10px; padding: 26px; display: grid; gap: 8px; justify-items: start; background: var(--paper); }
.empty b { font-family: var(--f-display); font-size: var(--step-1); font-weight: 800; }

.tip { position: fixed; z-index: 20; pointer-events: none; background: var(--ink); color: var(--paper); font-size: .8125rem; padding: 6px 10px; border-radius: 6px; max-width: 260px; transform: translate(-50%, calc(-100% - 12px)); }
footer.site { padding-block: 36px 56px; color: var(--muted); font-size: var(--step--1); border-top: 1px solid var(--rule); }
footer.site .wrap { display: grid; gap: 8px; }
@media (prefers-reduced-motion: no-preference) { details.row .chev { transition: transform .2s; } }
@media (prefers-reduced-motion: reduce) { details.row .chev { transition: none; } }

.sticky-col { position: sticky; top: 76px; }
@media (max-width: 900px) { .sticky-col { position: static; } }

/* ---------- v3: hidden attribute must win over display rules (renter / car fields) ---------- */
[hidden] { display: none !important; }

/* ---------- header slogan, footer ---------- */
.brand .slogan { font-family: var(--f-display); font-weight: 600; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-left: 1px solid var(--rule); padding-left: 10px; white-space: nowrap; }
@media (max-width: 720px) { .brand .slogan { display: none; } }
footer.site .foot-brand b { font-family: var(--f-display); font-weight: 900; color: var(--ink); font-size: 1.0625rem; }
footer.site .foot-brand span { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-left: 8px; }
footer.site .made-by { margin-top: 6px; font-family: var(--f-display); font-weight: 700; color: var(--ink); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; padding: 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.filters label { display: grid; gap: 4px; font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.filters select { font: 600 .9375rem var(--f-body); color: var(--ink); background: var(--ground); border: 1px solid var(--rule); border-radius: 8px; padding: 7px 30px 7px 10px; min-width: 9rem; }
.filters .count { margin-left: auto; font-size: var(--step--1); color: var(--muted); align-self: center; }
.chipset { display: flex; flex-wrap: wrap; gap: 6px; }
button.chipbtn { border: 1px solid var(--rule); background: var(--ground); color: var(--muted); font: 600 .8125rem var(--f-body); padding: 5px 11px; border-radius: 999px; cursor: pointer; }
button.chipbtn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- votes ---------- */
.vote-card { border-top: 1px solid var(--rule); padding-block: 18px; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 18px; }
@media (max-width: 640px) { .vote-card { grid-template-columns: 1fr; gap: 6px; } }
.vote-card .when { font-family: var(--f-mono); font-size: .875rem; color: var(--muted); display: grid; gap: 2px; align-content: start; }
.vote-card .body { display: grid; gap: 8px; min-width: 0; }
.vote-card h3 { font-size: 1.125rem; }
.tally { display: inline-flex; align-items: center; gap: 8px; font: 700 .875rem var(--f-mono); }
.tally .dots { display: inline-flex; gap: 2px; flex-wrap: wrap; max-width: 220px; }
.tally .dots i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.v-yes { background: var(--sign); } .v-no { background: var(--crit); } .v-absent { background: var(--bar-muted); }
.v-abstain { background: var(--warn); } .v-recused { background: var(--faint); }
.rollcall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 4px 14px; font-size: .875rem; padding: 0; list-style: none; }
.rollcall li { display: flex; align-items: center; gap: 7px; }
.rollcall li i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.rollcall li span { color: var(--muted); font-size: var(--step--1); margin-left: auto; text-transform: capitalize; }
.record { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; }
.claim { border-left: 3px solid var(--rule); padding: 6px 0 6px 12px; display: grid; gap: 4px; font-size: .9375rem; }
.claim.supported { border-color: var(--sign); } .claim.missing_context { border-color: var(--warn); } .claim.contradicted { border-color: var(--crit); }
.claim q { font-style: italic; }

/* ---------- money timeline stages ---------- */
.stages { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.stages li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 14px; }
.stages li::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--rule); }
.stages li:last-child::before { display: none; }
.stages .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 .6875rem var(--f-display); background: var(--sign); color: var(--paper); position: relative; z-index: 1; }
.stages li.unknown .dot { background: var(--paper); color: var(--crit); border: 2px dashed var(--crit); }
.stages li.held .dot { background: var(--warn); }
/* A step on hold with no date yet: amber dashed ring, readable "?" (it was red on amber, Nov 9, 2026). */
.stages li.unknown.held .dot { background: var(--paper); color: var(--warn); border-color: var(--warn); }
iframe:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stages .what { display: grid; gap: 2px; }
.stages .what b { font-family: var(--f-display); font-weight: 800; }
.stages .what .d { font-family: var(--f-mono); font-size: .8125rem; color: var(--muted); }
.stages .what .d.gap { color: var(--crit); }
.stages .what p { font-size: .9375rem; color: var(--muted); }
.lag { font: 700 .8125rem var(--f-mono); color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; justify-self: start; }

/* ---------- pipeline diagram ---------- */
.diagram { width: 100%; height: auto; display: block; }
.diagram text { font-family: var(--f-body); fill: var(--ink); }
.diagram .t { font-family: var(--f-display); font-weight: 800; font-size: 15px; }
.diagram .s { font-size: 12px; fill: var(--muted); }
.diagram .box { fill: var(--paper); stroke: var(--rule); stroke-width: 1.5; }
.diagram .box.acc { stroke: var(--accent); stroke-width: 2; }
.diagram .box.gate { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.diagram .box.out { fill: var(--sign-soft); stroke: var(--sign); }
.diagram .box.bad { fill: var(--crit-soft); stroke: var(--crit); stroke-dasharray: 5 4; }
.diagram .ln { stroke: var(--faint); stroke-width: 1.75; fill: none; }
.diagram .ln.bad { stroke: var(--crit); stroke-dasharray: 5 4; }
.diagram .ah { fill: var(--faint); }
.diagram .num { font: 900 12px var(--f-display); fill: var(--paper); }
.diagram .numbg { fill: var(--accent); }
.diagram-mobile { display: none; }
@media (max-width: 760px) { .diagram-desktop { display: none; } .diagram-mobile { display: block; } }
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 36px; counter-reset: rule; }
@media (max-width: 820px) { .rules { grid-template-columns: 1fr; } }
.rules article { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 4px 14px; }
.rules article::before { counter-increment: rule; content: counter(rule); grid-row: span 2; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font: 900 1rem var(--f-display); }
.rules h3 { font-size: 1.125rem; align-self: center; margin: 0; }
.rules article::before { align-self: start; }
.rules article { align-content: start; }
.mcard .endlbl { font-weight: 700; }
.rules p { max-width: 72ch; margin: 0; }

/* ---------- measures ---------- */
.mcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.mcard { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); text-decoration: none; color: var(--ink); align-content: start; }
.mcard:hover { border-color: var(--accent); }
.mcard b { font-family: var(--f-display); font-weight: 900; font-size: var(--step-1); }
.mcard .k { font-size: var(--step--1); color: var(--muted); }
.mcard .alloc { display: flex; height: 10px; border-radius: 3px; overflow: hidden; gap: 2px; }
.mcard .alloc span { display: block; background: var(--accent); }
.mcard .alloc span:nth-child(2n) { background: var(--r3); } .mcard .alloc span:nth-child(3n) { background: var(--r1); } .mcard .alloc span:nth-child(5n) { background: var(--r4); }
.dash-yes { color: var(--sign); font-weight: 700; } .dash-no { color: var(--crit); font-weight: 700; }
.bars-v { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 180px; padding-top: 8px; }
.bars-v div { display: grid; gap: 4px; align-items: end; height: 100%; grid-template-rows: 1fr auto; min-width: 0; }
.bars-v .col { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.bars-v .col i { flex: 1; border-radius: 3px 3px 0 0; display: block; min-height: 2px; }
.bars-v .col i.now { background: var(--accent); } .bars-v .col i.prev { background: var(--bar-muted); }
.bars-v span { font: 600 .6875rem var(--f-mono); color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; }

/* ---------- video + transcript ---------- */
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-empty { aspect-ratio: 16 / 9; border: 1px dashed var(--rule); border-radius: 10px; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 20px; background: var(--paper); }
.player-empty b { font-family: var(--f-display); font-size: var(--step-1); font-weight: 800; }
.transcript { max-height: 460px; overflow-y: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.transcript .seg { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--rule); font-size: .9375rem; }
.transcript .seg button { font: 600 .8125rem var(--f-mono); color: var(--accent-ink); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; align-self: start; }
.transcript .seg b { font-weight: 700; margin-right: 6px; }
.transcript input[type=search] { width: 100%; border: 0; border-bottom: 1px solid var(--rule); padding: 10px 14px; font: 1rem var(--f-body); background: var(--ground); color: var(--ink); position: sticky; top: 0; }
.mlist .mrow { border-top: 1px solid var(--rule); }
.mlist .mrow > summary, .mlist a.mrow { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 6px; cursor: pointer; list-style: none; text-decoration: none; color: var(--ink); }
.mlist .mrow > summary::-webkit-details-marker { display: none; }
.mlist .mrow > summary:hover { background: var(--hover); }
.mlist .mrow > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mlist .mrow[open] > summary { background: var(--hover); }
.mlist .mrow .when { font-family: var(--f-mono); font-size: .875rem; color: var(--muted); }
.mlist .mrow .has { display: flex; gap: 6px; flex-wrap: wrap; justify-content: end; }
.mlist .mbody { display: grid; gap: 12px; padding: 4px 6px 18px; max-width: 860px; }
.mlist .docs { margin: 0; padding-left: 1.1rem; display: grid; gap: 4px; font-size: var(--step--1); }
.player button.play { position: absolute; inset: 0; width: 100%; border: 0; background: #111; color: #fff; font: 700 1rem var(--f-body); cursor: pointer; }
.player button.play:hover, .player button.play:focus-visible { background: #222; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent-ink); font: inherit; text-decoration: underline; cursor: pointer; }
.pdfview iframe { width: 100%; height: 75vh; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }
@media (max-width: 640px) { .mlist .mrow > summary, .mlist a.mrow { grid-template-columns: 1fr; gap: 4px; } .mlist .mrow .has { justify-content: start; } }

/* ---------- data tables on the site ---------- */
.tbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tbar label { font-weight: 700; font-size: .875rem; }
.tbar input { flex: 1 1 240px; min-width: 0; font: 1rem var(--f-body); color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 8px; padding: 8px 12px; }
.tbar .tcount { font-size: var(--step--1); color: var(--muted); }
.sortbtn { all: unset; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.sortbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
th[aria-sort="ascending"] .sortbtn span::after { content: "▲"; font-size: .625rem; }
th[aria-sort="descending"] .sortbtn span::after { content: "▼"; font-size: .625rem; }
th[aria-sort="none"] .sortbtn span::after { content: "↕"; font-size: .6875rem; color: var(--faint); }
table caption { text-align: left; padding: 12px 14px; font-size: var(--step--1); color: var(--muted); caption-side: top; }
@media (max-width: 700px) {
  table[data-table] thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table[data-table], table[data-table] tbody, table[data-table] tr, table[data-table] td { display: block; width: 100%; }
  table[data-table] tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  table[data-table] caption { display: block; }
  table[data-table] td { border: 0; padding: 4px 14px 4px calc(7rem + 24px); position: relative; text-align: left !important; white-space: normal; min-height: 1.6em; }
  table[data-table] td::before { content: attr(data-label); position: absolute; left: 14px; top: 6px; width: 7rem; font-family: var(--f-display); font-weight: 800; font-size: .6875rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
}
.viewtoggle { display: inline-flex; border: 1px solid var(--rule); border-radius: 8px; padding: 3px; background: var(--ground); gap: 3px; }
.viewtoggle button { border: 0; background: none; font: 600 .875rem var(--f-body); color: var(--muted); padding: 6px 14px; border-radius: 6px; cursor: pointer; }
.viewtoggle button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Collapsible source lists */
.srcgroups { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.srcgroup { border-bottom: 1px solid var(--rule); }
.srcgroup > summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; cursor: pointer; font-weight: 600; list-style: none; }
.srcgroup > summary::-webkit-details-marker, details.srcs > summary::-webkit-details-marker { display: none; }
.srcgroup > summary::before, details.srcs > summary::before { content: "+"; display: inline-block; width: 1.1em; font-weight: 700; color: var(--accent-ink); }
.srcgroup[open] > summary::before, details.srcs[open] > summary::before { content: "−"; }
.srcgroup > summary > span:first-child { flex: 1; }
.srcgroup ul { margin: 0 0 14px; padding-left: 1.6rem; display: grid; gap: 4px; font-size: .9375rem; }
details.srcs { font-size: var(--step--1); color: var(--muted); margin-top: 8px; }
details.srcs > summary { cursor: pointer; list-style: none; font-weight: 600; }
details.srcs ul { margin: 6px 0 0; padding-left: 1.4rem; display: grid; gap: 3px; }
.muted { color: var(--muted); }
ul.plain { margin: 0; padding-left: 1.1rem; display: grid; gap: 8px; }
/* Contact form */
.contact-form label { display: grid; gap: 5px; font-weight: 600; font-size: var(--step--1); color: var(--ink); }
.contact-form input, .contact-form select, .contact-form textarea { font: 400 1rem var(--f-body); color: var(--ink); background: var(--ground); border: 1px solid var(--rule); border-radius: 8px; padding: 9px 11px; width: 100%; box-sizing: border-box; }
.contact-form input:focus-visible, .contact-form select:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.contact-form .row2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 560px) { .contact-form .row2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.contact-form .small { font-weight: 400; color: var(--muted); }
.contact-form .ferr { color: var(--crit); font-weight: 600; font-size: .8125rem; }
.contact-form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.powbox { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--ground); font-size: var(--step--1); }
.powdot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.powbox.ok .powdot { animation: none; border: 0; background: var(--sign); }
.powbox.wait .powdot { animation: none; border: 0; background: #e0a100; }
:root[data-tally-theme="dark"] .powbox.wait .powdot { background: var(--warn); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .powdot { animation: none; } }
.btn { font: 700 1rem var(--f-body); background: var(--accent); color: var(--paper); border: 0; border-radius: 8px; padding: 11px 18px; cursor: pointer; justify-self: start; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.note.crit { border-color: var(--crit); background: var(--crit-soft); }
/* Meeting agenda and roll calls */
.agsec { margin: 18px 0 6px; font-size: var(--step-0); }
.agenda { border-top: 1px solid var(--rule); }
.agitem { border-bottom: 1px solid var(--rule); }
.agitem > summary { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 4px; cursor: pointer; list-style: none; }
.agitem > summary::-webkit-details-marker { display: none; }
.agitem > summary:hover { background: var(--hover); }
.agitem > summary .small { display: block; }
.agno { font-family: var(--f-mono); color: var(--muted); }
.agbody { padding: 0 4px 14px 3.1rem; display: grid; gap: 10px; font-size: .9375rem; }
.roll ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 18px; font-size: .875rem; }
.roll li { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--rule); padding: 2px 0; }
.roll li.v-no { color: var(--crit); font-weight: 600; }
.roll li.v-absent, .roll li.v-recused { color: var(--muted); }
.roll .rg { margin: 3px 0 0; font-size: .875rem; line-height: 1.5; }
.roll .rg b { font-weight: 600; }
.roll .rg-no, .roll .rg-no a { color: var(--crit); font-weight: 600; }
.roll .rg-absent, .roll .rg-recused, .roll .rg-abstain { color: var(--muted); }
@media (max-width: 640px) { .agitem > summary { grid-template-columns: 2rem minmax(0, 1fr); } .agitem > summary .has { grid-column: 2; } .agbody { padding-left: 4px; } }

/* Meeting summaries: section headings and item lists */
.sum-h { font-size: var(--step-0); margin: 1.4em 0 .4em; }
.sum-list { margin: 0 0 1em; padding-left: 1.2em; }
.sum-list li { margin: 0 0 .55em; max-width: 72ch; }

/* Chip in: header button and page */
.navside { display: flex; align-items: center; gap: 8px; }
.chipin { font: 800 .9375rem var(--f-display); background: var(--accent); color: var(--paper); text-decoration: none; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.chipin:hover, .chipin:focus-visible { background: var(--accent-ink); color: var(--paper); }
.give { display: grid; gap: 18px; }
.give .amounts { display: flex; flex-wrap: wrap; gap: 10px; }
.give .amt { font: 800 1.25rem var(--f-display); color: var(--accent-ink); background: var(--accent-soft); border: 2px solid var(--accent); border-radius: 10px; padding: 12px 22px; font-variant-numeric: tabular-nums; cursor: pointer; }
.give .amt:hover, .give .amt[aria-pressed="true"] { background: var(--accent); color: var(--paper); }
.give .amt:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 2px; }
.give .confirm { display: grid; gap: 12px; border: 1px solid var(--rule); border-radius: 10px; padding: 16px; background: var(--ground); }
.give .confirm[hidden] { display: none; }
.give .go { text-decoration: none; justify-self: start; }
.give .go.off { opacity: .45; cursor: not-allowed; }
.give .attest { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; max-width: 70ch; }
.give .attest input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.give .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; border-top: 1px solid var(--rule); padding-top: 14px; }
.terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.terms .panel.final { grid-column: 1 / -1; }
.terms .panel h3 { font-size: 1.0625rem; margin: 0 0 4px; }
.terms .panel p { margin: 0; }
.terms .panel.final { border: 0; border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 18px 22px; }
@media (max-width: 600px) { .give .stats { grid-template-columns: 1fr; } .chipin { padding: 7px 10px; font-size: .875rem; } }
/* Programs */
.progtable td { vertical-align: top; }
.checks { display: flex; flex-wrap: wrap; gap: 4px; }
.pill.none { color: var(--muted); background: transparent; border: 1px dashed var(--rule); }
.evid { border-top: 1px solid var(--rule); padding-top: 8px; display: grid; gap: 4px; }
.evid p { margin: 0; }
.prose { max-width: 70ch; }
.prose p { margin: 0 0 .85em; }
.progtable td.n .small { font-family: var(--f-body); white-space: normal; text-align: right; }
.progtable th:nth-child(3), .progtable td:nth-child(3) { width: 11rem; }
.progtable th:nth-child(4), .progtable td:nth-child(4) { width: 15rem; }
.progtable th:nth-child(2), .progtable td:nth-child(2) { width: 6.5rem; }
.citytable td { vertical-align: top; }

/* Breadcrumbs and prev/next pager */
.correction-note .wrap { padding-block: 10px; }
.correction-note summary { cursor: pointer; width: fit-content; font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.correction-note p { margin: 8px 0 0; max-width: 76ch; font-size: var(--step--1); color: var(--muted); }
.corrections-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.corrections-log li { margin: 0; }
.corrections-log b { display: block; }
.corrections-older { margin-top: 14px; }
.corrections-older > summary { cursor: pointer; font-weight: 600; font-size: .9375rem; color: var(--accent-ink); }
.corrections-older .corrections-log { margin-top: 14px; }
.crumbbar { border-bottom: 1px solid var(--rule); background: var(--paper); }
.crumbbar ol { list-style: none; margin: 0; padding: 9px 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: var(--step--1); color: var(--muted); }
.crumbbar li { display: inline-flex; align-items: center; min-width: 0; }
.crumbbar li + li::before { content: "›"; margin: 0 8px; color: var(--faint); }
.crumbbar a { color: var(--muted); text-decoration: none; }
.crumbbar a:hover, .crumbbar a:focus-visible { color: var(--accent-ink); text-decoration: underline; }
.crumbbar [aria-current] { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.pager { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; border-top: 1px solid var(--rule); padding-top: 18px; }
.pager a { display: grid; gap: 2px; text-decoration: none; color: var(--ink); padding: 10px 14px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); min-width: 0; }
.pager a:hover, .pager a:focus-visible { border-color: var(--accent); }
.pager a span { font-size: var(--step--1); color: var(--muted); }
.pager a b { overflow-wrap: anywhere; }
.pager .next { text-align: right; }
.pager .all { align-self: center; text-align: center; border: 0; background: none; color: var(--accent-ink); font-weight: 700; }
@media (max-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } .pager .all { grid-column: 1 / -1; grid-row: 1; } }
.search { font: inherit; width: 100%; max-width: 40rem; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); color: var(--ink); }
.search:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.mcard[hidden] { display: none !important; }

/* Light/dark switch in the top bar */
.themebtn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--rule); background: var(--paper); color: var(--muted); border-radius: 8px; cursor: pointer; padding: 0; flex: none; }
.themebtn:hover, .themebtn:focus-visible { color: var(--accent-ink); border-color: var(--accent); }
.themebtn svg { width: 18px; height: 18px; }
.themebtn .i-sun { display: none; }
.themebtn.is-dark .i-sun { display: block; }
.themebtn.is-dark .i-moon { display: none; }
@media (max-width: 600px) { .themebtn { width: 34px; height: 34px; } }

/* Money decisions list */
.moneyrows td { vertical-align: top; }
.ministeps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ministeps li { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px dashed var(--rule); color: var(--muted); white-space: nowrap; }
.ministeps li.done { border-style: solid; border-color: transparent; background: var(--sign-soft); color: var(--sign); }
a.chipbtn { border: 1px solid var(--rule); background: var(--ground); color: var(--muted); font: 600 .8125rem var(--f-body); padding: 5px 11px; border-radius: 999px; text-decoration: none; }
a.chipbtn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }

/* Policy pages */
.policy { max-width: 72ch; display: flex; flex-direction: column; gap: 6px; }
.policy h2 { font-size: var(--step-1); margin: 1.2em 0 .2em; }
.policy h3 { font-size: var(--step-0); margin: .8em 0 0; }
.policy p, .policy ul { margin: 0 0 .6em; }
.policy li { margin: 0 0 .35em; }
.policy-nav { display: flex; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 12px; }
.foot-legal { font-size: var(--step--1); }

/* Meeting page: big centered video, then summary, transcript and records */
.mstack { display: flex; flex-direction: column; gap: 22px; max-width: 980px; margin-inline: auto; }
.mstack > * { min-width: 0; }
.mvideo { display: flex; flex-direction: column; gap: 10px; }
.mvideo .player { width: 100%; }
.mvideo .chipset { justify-content: center; }
.mvideo .src { text-align: center; }
.msummary h2, .mtranscript h2 { font-size: var(--step-1); margin: 0; }
.mtranscript { display: flex; flex-direction: column; gap: 10px; }
.clamp { max-height: 22em; overflow: hidden; position: relative; }
.clamp::after { content: ""; position: absolute; inset: auto 0 0 0; height: 5em; background: linear-gradient(to bottom, transparent, var(--paper)); pointer-events: none; }
.clamp.open { max-height: none; }
.clamp.open::after { display: none; }
.readmore { justify-self: start; align-self: flex-start; font: 700 .9375rem var(--f-body); color: var(--accent-ink); background: var(--accent-soft); border: 1px solid var(--accent); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.readmore:hover, .readmore:focus-visible { background: var(--accent); color: var(--paper); }
.mtranscript .pdfview iframe { height: min(80vh, 900px); }
.msummary .clamp p, .msummary > p { margin: 0 0 .8em; }

/* Hidden labels inside a scrolling table stay inside it (they made /approved-amounts/ scroll sideways) */
.table-wrap { position: relative; }
.table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Program page: body text with a key-facts column, then the three accountability records as full-width rows */
.pgrid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px 48px; align-items: start; }
.pgrid .prose { grid-column: 1; grid-row: 1; max-width: none; }
.pfacts { grid-column: 2; grid-row: 1; position: sticky; top: 84px; padding: 0; }
.pfacts dl { margin: 0; }
.pfacts dl > div { padding: 16px 20px; border-top: 1px solid var(--rule); display: grid; gap: 4px; }
.pfacts dl > div:first-child { border-top: 0; }
.pfacts dt { font: 800 var(--step--1)/1.2 var(--f-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pfacts dd { margin: 0; font-size: .9375rem; line-height: 1.45; }
.pfacts dd.big { font: 900 var(--step-2)/1.05 var(--f-display); }
.pfacts dd.big .none { font: 600 1rem var(--f-body); color: var(--muted); }
.pfacts dd.fine { font-size: var(--step--1); color: var(--muted); }
@media (max-width: 860px) {
  .pgrid { grid-template-columns: 1fr; }
  .pgrid .prose, .pfacts { grid-column: 1; }
  .pgrid .prose { grid-row: 2; }
  .pfacts { position: static; }
  .pfacts dl { display: grid; grid-template-columns: 1fr 1fr; }
  .pfacts dl > div:nth-child(2) { border-top: 0; border-left: 1px solid var(--rule); }
  .pfacts dl > div:nth-child(n+3) { grid-column: 1 / -1; }
}
.anum { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 900 .9375rem var(--f-display); }
.aglance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.aglance a { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: var(--ink); text-decoration: none; }
.aglance a:hover, .aglance a:focus-visible { border-color: var(--accent); }
.aglance a .anum { grid-row: span 2; }
.aglance a b { font-family: var(--f-display); font-weight: 800; line-height: 1.2; }
.aglance a.gap .anum { background: var(--ground); color: var(--muted); }
.acct { display: grid; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.arow { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px 36px; padding: 24px; border-top: 1px solid var(--rule); scroll-margin-top: 90px; }
.arow:first-child { border-top: 0; }
.arow-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.arow-sum { display: grid; gap: 10px; align-content: start; }
.arow-sum p { margin: 0; }
.clamp.clamp-s { max-height: 11.5em; }
.arow-recs { display: grid; gap: 8px; align-content: start; }
.arow-recs .eyebrow { margin: 0; }
.atl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.atl li { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--rule); font-size: var(--step--1); }
.atl li:first-child { border-top: 0; padding-top: 2px; }
.atl .when { font-family: var(--f-mono); color: var(--muted); white-space: nowrap; }
.atl b { display: block; font-size: .9375rem; line-height: 1.3; margin-bottom: 2px; }
.atl p { margin: 0 0 4px; color: var(--muted); }
.amore > summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); font-size: var(--step--1); padding: 6px 0; }
.amore[open] > summary { margin-bottom: 0; }
.amore .atl li:first-child { border-top: 1px solid var(--rule); padding-top: 10px; }
@media (max-width: 860px) {
  .aglance { grid-template-columns: 1fr; }
  .arow { grid-template-columns: 1fr; padding: 18px 16px; }
  .atl li { grid-template-columns: 1fr; gap: 2px; }
}
.pfacts dl > div { align-content: start; }
.arow.arow-none { grid-template-columns: 1fr; padding-block: 18px; }
.arow.arow-none .arow-recs { display: none; }
/* Program pages: links into the rest of the site */
ul.link-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 8px; }
/* "What it does" on a ballot measure page: label column, then the measure's own terms */
table.facts th { white-space: normal; width: 30%; min-width: 9rem; text-transform: none; letter-spacing: 0; font-size: .875rem; color: var(--ink); }
@media (max-width: 560px) { table.facts th, table.facts td { display: block; width: auto; border-bottom: 0; padding: 8px 12px 0; } table.facts td { padding: 2px 12px 10px; border-bottom: 1px solid var(--rule); } }
ul.link-list .small { color: var(--muted); }
[id^="law-"], [id^="decision-"], [id^="promise-"], [id^="outcome-"], #inside-safe { scroll-margin-top: 90px; }
.is-target { outline: 2px solid var(--accent, currentColor); outline-offset: 4px; transition: outline-color .8s ease; }
.is-target.is-target-fade { outline-color: transparent; }
ul.link-list .tag { white-space: nowrap; }
/* "Connected to this program": one box, a row per kind of link */
.lrow { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 8px 28px; padding: 18px 24px; border-top: 1px solid var(--rule); }
.lrow:first-child { border-top: 0; }
.lrow h3 { font-size: 1.0625rem; }
@media (max-width: 860px) { .lrow { grid-template-columns: 1fr; padding: 16px; } }
/* Staff: nightly reports */
.nightly > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.nightly-text { white-space: pre-wrap; font: .875rem/1.5 var(--f-mono); margin: 12px 0 0; overflow-wrap: anywhere; }

.pill.retired { background: var(--ground); color: var(--muted); }

/* Promise tracker: counts that double as filters */
.pstrip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
button.pstat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink); padding: 12px 14px; border-radius: 6px; font: inherit; }
button.pstat .v { font: 700 var(--step-2) var(--f-body); line-height: 1.1; }
button.pstat[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.ptable { table-layout: fixed; min-width: 760px; }
.ptable td { overflow-wrap: anywhere; }
.pfilters { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; }
.psearch input { font: inherit; font-size: .9375rem; padding: 8px 12px; min-width: min(320px, 100%); border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); }
.pcard[hidden] { display: none !important; }
.ppager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.ppager .chipbtn { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; line-height: 1; font-variant-numeric: tabular-nums; }
details.gapbox { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 8px 12px; font-size: .9375rem; }
details.gapbox summary { cursor: pointer; font-weight: 600; color: var(--warn); }
details.gapbox p { margin: 8px 0 0; }
details.morebox { font-size: .9375rem; border-left: 3px solid var(--rule); padding: 6px 12px; }
details.morebox summary { cursor: pointer; font-weight: 600; color: var(--muted); }
details.morebox p { margin: 8px 0 0; }
.grantstable { table-layout: fixed; min-width: 900px; }
.grantstable td { overflow-wrap: anywhere; }
ul.paysfor { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
ul.paysfor li { padding-left: 10px; border-left: 2px solid var(--rule); line-height: 1.35; }

/* Home: promised vs. actual as two bars */
.pvs { gap: 5px; }
.pvrow { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); align-items: center; gap: 8px; }
.pvrow em { font-style: normal; font-size: .75rem; color: var(--muted); }
.bar.missing { border: 1px dashed var(--crit); background: transparent; }
.pvn { line-height: 1.25; }
.pvn small { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); }

/* Sources page */
ol.srcsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
ol.srcsteps li { border-top: 2px solid var(--ink); padding-top: 14px; display: grid; gap: 6px; align-content: start; }
ol.srcsteps li.keep { border-top-color: var(--accent); }
ol.srcsteps h3 { font-size: 1.0625rem; margin: 0; }
ol.srcsteps p { margin: 0; font-size: .9375rem; color: var(--muted); }
ol.srcsteps .anum { font: 700 .8125rem var(--f-mono); color: var(--accent-ink); }
.freshkey { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 14px; }
.fk-card { border-top: 2px solid var(--ink); padding-top: 14px; display: grid; gap: 8px; align-content: start; }
.fk-card h3 { font-size: 1.0625rem; margin: 0; }
.fk-card p { margin: 0; font-size: .9375rem; }
.fk-card .fk-list { color: var(--muted); font-size: .8125rem; }
dl.fklegend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0 0 18px; }
dl.fklegend div { display: flex; align-items: center; gap: 8px; }
dl.fklegend dt, dl.fklegend dd { margin: 0; }
dl.fklegend dd { font-size: .8125rem; color: var(--muted); }

/* Department facts: "In review" stays on one line, under the program name */
.pfacts dd.runitem { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.pfacts .tag, .tag { white-space: nowrap; }
/* A whole sentence styled as a tag wraps on small screens instead of pushing the page sideways (Nov 9, 2026). */
p.tag { white-space: normal; }
@media (max-width: 600px) { p.tag { border-radius: 10px; } }
/* Sources: payee table scrolls inside a fixed height */
.payees-scroll { max-height: 360px; overflow-y: auto; border-bottom: 1px solid var(--rule); }
.payees-scroll thead th { position: sticky; top: 0; background: var(--ground); z-index: 1; }

/* Downloads */
.dlnote { display: grid; gap: 8px; max-width: 1100px; }
.dlhow { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.dlhow h3 { font-size: 1rem; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dlhow p { margin: 0; }
.dlwhen { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.dlnote p { margin: 0; }
.dlgroup { display: grid; gap: 10px; margin-top: 12px; }
.dlgroup h2 { font-size: var(--step-1, 1.25rem); margin: 0; }
ul.dllist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
ul.dllist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 24px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.dlmain h3 { font-size: 1.0625rem; margin: 0 0 2px; }
.dlmain p { margin: 0; }
.dlmain p + p { margin-top: 4px; }
.dlget { display: grid; justify-items: end; gap: 4px; text-align: right; }
a.btn { display: inline-block; text-decoration: none; font-size: .9375rem; padding: 9px 16px; white-space: nowrap; }
@media (max-width: 640px) { ul.dllist li { grid-template-columns: 1fr; } .dlget { justify-items: start; text-align: left; grid-auto-flow: column; align-items: center; gap: 12px; justify-content: start; } }
.dlink { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.dlink svg { flex: none; }
.dlrow { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }

/* Contracts (approved amounts) */
.amttable { table-layout: fixed; min-width: 860px; }
.amttable td { vertical-align: top; overflow-wrap: anywhere; }
.amttable td.n .small { font-family: var(--f-body); white-space: normal; }

/* State payments */
.sphow { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.sphow h3 { font-size: 1rem; margin: 0; }
.sphow p { margin: 0; }
.spyear { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.spyear h2 { margin: 0; }
.spyear .seg label { padding: 4px 11px; font-size: .8125rem; }
.pstat.static { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--rule); background: var(--paper); padding: 12px 14px; border-radius: 6px; }
.pstat.static .v { font: 700 var(--step-2) var(--f-body); line-height: 1.1; }
.sptable { table-layout: fixed; }
.sptable tr.grp th, .sptable tr.grp td { background: var(--ground); font-weight: 700; text-align: left; }
.sptable td { overflow-wrap: anywhere; }
.spbar { cursor: pointer; }
.spbar:hover { opacity: .85; }
.spbox .spbars { display: grid; gap: 6px; }
.spbox .sprow { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 6rem; align-items: center; gap: 10px; font-size: .875rem; }
.spbox .sprow .bar { height: 8px; border-radius: 4px; background: var(--accent); }
.spbox .sprow .n { text-align: right; }

/* Staff two-step sign-in */
.twostep { max-width: 560px; display: grid; gap: 14px; }
.twostep h1 { font-size: var(--step-3, 2rem); margin: 0; }
.twostep ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.twostep .qr svg { width: 220px; height: 220px; background: #fff; padding: 8px; border-radius: 6px; }
.twostep form { display: grid; gap: 8px; }
.twostep input { font: 600 1.25rem var(--f-mono); letter-spacing: .15em; padding: 10px 12px; max-width: 220px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); color: var(--ink); }
.twostep ul.codes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; }
.twostep ul.codes code { font-size: 1.125rem; }

/* Cost and results by year (money.ResultYear) */
.rtl { gap: 12px; }
.ryear { background: var(--paper); border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; display: grid; gap: 10px; }
.ryear h3 { font-size: 1.0625rem; margin: 0; }
.rcols { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 18px; }
.rcols .eyebrow { margin: 0; }
.rcols p { margin: 0; }
.rlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.rnote { border-top: 1px solid var(--rule); padding-top: 8px; margin: 0; }
.ryear .src { margin: 0; }
.rgroup { gap: 10px; }
.rgroup + .rgroup { margin-top: 18px; }
.rhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.rhead h3 { margin: 0; }
.rhead a { margin-left: auto; }
@media (max-width: 800px) { .rcols { grid-template-columns: 1fr; gap: 12px; } .rhead a { margin-left: 0; } }

/* Footer: Tally LA's social accounts. One-color official logos in the text color, so they follow light and dark mode. */
footer.site .social { list-style: none; display: flex; gap: 4px; padding: 0; margin: 4px 0 0 -8px; }
footer.site .soc { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; color: var(--muted); text-decoration: none; transition: color .15s, background-color .15s; }
footer.site .soc:hover, footer.site .soc:focus-visible { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
footer.site .soc-i { width: 20px; height: 20px; display: block; }

/* Receipt: household prices in cards */
.hhcards { align-items: start; }
.hhcard h3 { margin: 0; }
.hhcard .tag { font-size: .6875rem; vertical-align: middle; }
.hhlist { list-style: none; padding: 0; margin: 0; display: grid; border-top: 1px solid var(--rule); }
.hhlist li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: var(--step--1); }
.hhlist b { white-space: nowrap; text-align: right; }
.hhdate { white-space: nowrap; }
.rcols { align-items: start; }
.rcols > .stack-v { gap: 6px; align-content: start; }
.rmore > summary { cursor: pointer; font-weight: 600; font-size: var(--step--1); padding: 8px 0; color: var(--accent); }
.rmore[open] > summary { margin-bottom: 10px; }

/* Receipt, desktop: the receipt stays in view while you fill in the worksheet. If it's taller than the window,
   it scrolls on its own so the whole receipt can still be read. Phones keep the stacked layout. */
@media (min-width: 901px) {
  .receipt-aside { position: sticky; top: 108px; max-height: calc(100vh - 124px); overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: var(--rule) transparent; padding-right: 6px; }
}
.tracenav { margin-bottom: 24px; }
[id^="trace-"] { scroll-margin-top: 110px; }

/* Home: this month's tax receipts */
.nowlist { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.nowlist { grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 10px; }
.nowlist li { display: grid; gap: 1px; border-bottom: 1px solid var(--rule); padding-bottom: 8px; min-width: 0; }
.nowlist li a { font-size: .8rem; white-space: nowrap; }
.nowlist li b { font: 400 1.35rem var(--f-editorial); }
.nowlist li .small { margin: 0; font-size: .76rem; color: var(--muted); }

/* Search */
.searchbtn { display: inline-grid; place-items: center; width: 36px; height: 36px; color: var(--ink); border-radius: 8px; }
.searchbtn svg { width: 20px; height: 20px; }
.searchbtn:hover, .searchbtn:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.searchbox input { width: 100%; font: 400 1.25rem var(--f-body); padding: 14px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: var(--ink); }
.searchbox input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sresults { list-style: none; padding: 0; margin: 0; display: grid; }
.sresults li { border-bottom: 1px solid var(--rule); }
.sresults a { display: grid; gap: 3px; padding: 12px 2px; color: var(--ink); text-decoration: none; }
.sresults a:hover b { text-decoration: underline; }
.sresults .sk { font: 400 .75rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sresults .small { color: var(--muted); }

/* Budget overview lists: name, bar, amount, share */
.blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.blist li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto 2.6rem; gap: 10px; align-items: center; }
.blist .bn { font-size: .9rem; line-height: 1.25; }
.blist .bar { height: 12px; }
.blist b { font-size: .9rem; }
.blist .small { text-align: right; color: var(--muted); }
@media (max-width: 560px) {
  .blist li { grid-template-columns: minmax(0, 1fr) auto 2.6rem; row-gap: 4px; }
  .blist .bar { grid-column: 1 / -1; grid-row: 2; }
}
.cal { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cal li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 10px; font-size: .92rem; }
.cal b { font-variant-numeric: lining-nums tabular-nums; }

.ledger-tools { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; }
.linkbtn { border: 0; background: none; padding: 4px 2px; color: var(--accent-ink); font: 600 var(--step--1) var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.openall { white-space: nowrap; color: var(--muted); }

/* "Keep following it" link lists on Follow the tax and elsewhere */
.linklist { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; }
.linklist li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: .9rem; }
.linklist li .small { margin-left: 6px; }
.deptlinks { font-size: var(--step--1); color: var(--muted); }

/* Program, grant and department lists: one card per row on phones */
@media (max-width: 700px) {
  table.progtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.progtable, table.progtable tbody, table.progtable tr, table.progtable td { display: block; width: 100% !important; min-width: 0; table-layout: auto; }
  table.progtable tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  table.progtable caption { display: block; }
  table.progtable td { border: 0; padding: 4px 14px 4px calc(7rem + 24px); position: relative; text-align: left !important; white-space: normal; min-height: 1.6em; }
  table.progtable td .small { text-align: left; }
  table.progtable td::before { content: attr(data-label); position: absolute; left: 14px; top: 6px; width: 7rem; font-family: var(--f-display); font-weight: 800; font-size: .6875rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
}

/* Phone and short-window fixes (Nov 18, 2026 audit). Layout only: nothing here adds a request or a script. */
/* A grid or flex child can't grow its column past the screen; long text wraps instead. */
.stack-v { grid-template-columns: minmax(0, 1fr); }
.dlnote { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .receipt-grid { grid-template-columns: minmax(0, 1fr); } }
.dlink { white-space: normal; min-width: 0; }
.tag.amt { white-space: normal; overflow-wrap: anywhere; }
.receipt, .receipt-notes, .receipt-actions { min-width: 0; overflow-wrap: anywhere; }
/* Header on narrow phones: the menu button keeps its icon (its name stays "Menu" for screen readers). */
@media (max-width: 440px) {
  .top .wrap { gap: 10px; }
  .navside { gap: 6px; min-width: 0; }
  .burger { padding: 7px 9px; }
}
@media (max-width: 400px) { .burger-label { display: none; } .brand { gap: 6px; } }
/* Menus scroll inside a short window instead of running past its bottom. */
@media (min-width: 901px) { .gpanel { max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain; } }
.field { grid-template-columns: minmax(0, 1fr); }
.money { min-width: 0; }
.dlgroup { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 640px) { ul.dllist li { grid-template-columns: minmax(0, 1fr); } .dlget { display: flex; flex-wrap: wrap; gap: 6px 12px; } }
.dlwhen .pill { white-space: normal; }
/* Table sorting on phones: the hidden headings leave the tab order and a "Sort by" list takes their place. */
.tsort { display: none; align-items: center; gap: 6px; }
.tsort label { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.tsort select { font: inherit; font-size: .875rem; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 8px; background: var(--ground); color: var(--ink); max-width: 100%; }
@media (max-width: 700px) { table[data-table] thead { visibility: hidden; } .tsort { display: inline-flex; flex-wrap: wrap; } }
.field .hint.warn { color: var(--crit); font-weight: 600; }
/* Promise cards whose two figures count different things: shown side by side, no bars. */
dl.pside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
dl.pside div { border: 1px solid var(--rule); border-radius: 8px; padding: 8px 10px; }
dl.pside dt { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
dl.pside dd { margin: 0; font-weight: 700; font-size: 1.125rem; }
