/* ==========================================================================
   boulder.vote money dashboard — component styles.

   Ported 1:1 from incoming/Boulder Vote Dashboard v3.dc.html: every size,
   weight, letter-spacing, padding, border and bar height below is the value
   that mockup uses inline. Colors go through ds/theme tokens (copied verbatim
   from the main campaign site) because the mockup's hexes ARE those tokens:
     #f6efe0 --canvas   #22313a --ink        #f0e6d2 --paper
     #2c3b44 --text-body #5c6b6d --text-muted #d7c0a3 --sand
     #1e3124 --forest   #16261c --forest-deep #ece2cd --newsprint
     #8f2816 --brick-deep #ab331d --brick     #436366 --teal
     #bc7231 --ochre    #e2d4ba --paper-dim
   Raw values appear only where the mockup uses something the token set has
   no exact match for (e.g. #47412f, the sand-band label color).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg-page); }
body { font-family: var(--font-body); color: var(--text-body); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
table { border-collapse: collapse; width: 100%; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* --- header --------------------------------------------------------------
   The dashboard's own header: wordmark, its section links, and a single
   "Campaign site" button back to boulder.vote (where the mockup put it).
   No campaign nav / Meet / Donate here — this page is the dashboard. */
header.top { position: sticky; top: 0; z-index: 20; border-bottom: 2px solid var(--forest-deep); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px 24px; flex-wrap: wrap; }
header.top .brand-link { display: flex; align-items: baseline; gap: 12px; text-decoration: none; color: var(--paper); }
header.top .brand { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.02em; text-shadow: 3px 3px 0 var(--forest-deep); }
header.top .sub { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand); font-weight: 600; }
.top-nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.top-nav a { color: var(--paper); text-decoration: none; }
.top-nav a:hover { color: var(--sand); }
.top-nav a.nav-cta { color: var(--ink); background: var(--sand); padding: 8px 14px; border-radius: 3px; }
.top-nav a.nav-cta:hover { color: var(--ink); filter: brightness(0.94); }

/* Collapses to a hamburger on small screens — same mechanism as the main
   site's Header.astro/campaign.css: CSS breakpoint + a JS-toggled .open. */
.nav-toggle { display: none; width: 44px; height: 44px; margin-left: auto; border: 2px solid var(--line-on-dark); border-radius: 3px; background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--paper); }
@media (max-width: 860px) {
  /* Measured at 375px: .brand-link is 327px wide (wordmark 204 + gap 12 +
     "Money Dashboard" 111), which is the whole available width — so the 44px
     toggle had nowhere to sit, flex-wrap pushed it to a second line, and the
     sticky header grew to 134px, a third of the screen. Stacking the two
     labels keeps both and puts the toggle back on the first line. */
  header.top .wrap { padding: 10px 24px; }
  header.top .brand-link { flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
  header.top .brand { font-size: 20px; }
  header.top .sub { font-size: 11px; }
  .nav-toggle { display: flex; }
  .top-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 14px; }
  .top-nav.open { display: flex; }
  .top-nav a { padding: 12px 0; }
  .top-nav a.nav-cta { text-align: center; padding: 12px 14px; }
}

/* --- hero ----------------------------------------------------------------- */
.hero .wrap { padding: 64px 24px 56px; }
.hero .eyebrow { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand); font-weight: 700; margin-bottom: 18px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(44px, 8vw, 96px); line-height: 0.95; letter-spacing: 0.01em; margin: 0 0 24px; text-transform: uppercase; text-shadow: 6px 6px 0 var(--forest-deep); max-width: 14em; }
.hero p { font-size: 19px; line-height: 1.6; max-width: 54ch; margin: 0 0 22px; color: var(--paper); }
.hero p.dim { font-size: 16px; margin: 0 0 40px; color: var(--paper-dim); }
.hero .stats-line { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sand); font-weight: 600; }
.hero .stats-line .sep { opacity: 0.5; }

/* --- top band (stat tiles + its own Race/Candidate controls) -------------- */
.band { border-top: 2px solid rgba(34,49,58,0.28); border-bottom: 2px solid rgba(34,49,58,0.28); }
.band .wrap { padding: 26px 24px 0; }
.band-controls { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 4px; }
/* Capped (as in the mockup) so the select doesn't stretch across the row now
   that nothing sits to its right. */
.band-controls .focus-group { flex: 1 1 240px; min-width: 200px; max-width: 340px; }
/* Buttons and the select are bottom-aligned, so they must be the SAME height
   or their labels above sit on different lines — which is what made this row
   look crooked. 44px is also the touch-target floor. */
.band .filters button, .band-controls select { height: 44px; padding-top: 0; padding-bottom: 0; }

/* Tiles: explicit column counts per breakpoint rather than auto-fit, because
   the divider rules below have to know which tile starts a row. With auto-fit
   the "first/last child" padding+border hacks broke the moment the grid
   wrapped: column 1 of row 2 kept its left padding while column 1 of row 1
   had none, so the columns didn't line up. */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); }
.tile { padding: 30px 26px 32px; border-right: 1px solid rgba(34,49,58,0.2); }
.tile:nth-child(4n+1) { padding-left: 0; }
.tile:nth-child(4n), .tile:last-child { padding-right: 0; border-right: none; }
@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile { padding: 24px 20px 26px; }
  .tile:nth-child(n) { padding-left: 20px; border-right: 1px solid rgba(34,49,58,0.2); }
  .tile:nth-child(2n+1) { padding-left: 0; }
  .tile:nth-child(2n) { padding-right: 0; border-right: none; }
  .tile:nth-child(n+3) { border-top: 1px solid rgba(34,49,58,0.2); }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: 1fr; }
  .tile:nth-child(n) { padding: 20px 0; border-right: none; border-top: 1px solid rgba(34,49,58,0.2); }
  .tile:first-child { border-top: none; padding-top: 24px; }
}
.tile .label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: #47412f; margin-bottom: 10px; }
.tile .value { font-family: var(--font-display); font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.tile.city .value { color: var(--brick-deep); }
.tile .note { font-size: 13px; color: var(--text-body); margin-top: 8px; }
.splitbar-row { padding: 0 0 28px; }
.splitbar { display: flex; height: 16px; border: 2px solid var(--ink); border-radius: 2px; overflow: hidden; }
.splitbar .priv { background: var(--ink); }
.splitbar .pub { background: var(--brick-deep); }

/* --- sections ------------------------------------------------------------- */
section .wrap { padding: 72px 24px 0; }
section h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); text-transform: uppercase; letter-spacing: 0.01em; line-height: 1; margin: 0 0 10px; color: var(--forest); }
p.lede { font-size: 17px; line-height: 1.6; color: var(--text-body); max-width: 64ch; margin: 0 0 30px; }
p.subnote { font-size: 14px; line-height: 1.6; color: var(--text-muted); max-width: 64ch; margin: 0 0 26px; }
.footnote { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 16px 0 0; max-width: 82ch; }
.empty { color: var(--text-muted); font-size: 14px; font-style: italic; }

/* --- control groups (band + explore share these) -------------------------- */
.control-row { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 28px; }
.control-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 10px; }
.band .control-label { color: #47412f; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 11px 18px; border: 2px solid var(--ink); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer; }
.band .filters button { font-size: 13px; padding: 10px 16px; }
.filters button:hover { filter: brightness(0.92); }
.filters button:active { transform: translate(2px, 2px); }
.filters button.active { background: var(--ink); color: var(--paper); }
.focus-group { flex: 1 1 200px; min-width: 180px; }
.focus-group select { width: 100%; }
input[type="text"], select { font-family: var(--font-body); font-size: 15px; padding: 12px; border: 2px solid var(--ink); border-radius: 3px; background: var(--paper); color: var(--ink); }

/* --- explore -------------------------------------------------------------- */
.explore-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px; align-items: start; }
.explore-title { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 18px; }
.bars { display: flex; flex-direction: column; gap: 16px; }
.bar-row .bar-label { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin-bottom: 6px; }
.bar-row .bar-label .bar-name { color: var(--ink); font-weight: 600; }
.bar-row .bar-label .bar-amt { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.bar-row .bar-track { height: 18px; border: 2px solid var(--ink); border-radius: 2px; background: rgba(34,49,58,0.06); overflow: hidden; }
.bar-row .bar-fill { height: 100%; background: var(--ink); }
.breakdown { border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); overflow-x: auto; }
.breakdown table { min-width: 320px; font-size: 15px; }
.breakdown tr { border-top: 1px solid rgba(34,49,58,0.14); }
.breakdown tr:first-child { border-top: none; }
.breakdown td { padding: 12px 16px; color: var(--ink); font-weight: 600; }
.breakdown td.count { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 400; }
.breakdown td.amount { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); }
.breakdown-note { font-size: 13px; line-height: 1.6; color: var(--text-muted); margin: 14px 0 0; }

/* --- data tables (ledger, vendors, transactions) -------------------------- */
.panel { overflow-x: auto; border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); }
/* table-layout: fixed — without it, column widths are derived from whatever
   happens to be on the current page, so every pager click re-measures and the
   whole table visibly reflows. Fixed widths + single-line cells also make
   every row exactly one line tall, which is what lets the pager reserve a
   constant height (see .pad-row). Full text stays available via title="". */
.panel table { font-size: 15px; table-layout: fixed; }
.panel th, .panel td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel .committee-name, .panel .tag, .panel .vendor-name, .panel .vendor-cat { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Filler keeps the table (and everything below it) from jumping up on a
   short last page. No border, so it reads as empty space, not as blank rows. */
.pad-row td { border-top: none; padding: 0; }
.panel thead tr { background: var(--ink); color: var(--paper); text-align: left; }
.panel th { padding: 14px 16px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.panel th[data-sort] { cursor: pointer; }
.panel th[data-sort].sorted::after { content: " \2193"; }
.panel th[data-sort].sorted.asc::after { content: " \2191"; }
.panel td { padding: 14px 16px; border-top: 1px solid rgba(34,49,58,0.16); }
/* Explicit column widths, required by table-layout: fixed. */
#ledgerTable { min-width: 1060px; }
#ledgerTable th:nth-child(1) { width: 24%; }
#ledgerTable th:nth-child(n+2) { width: 9.5%; }

#vendorsTable { min-width: 860px; }
#vendorsTable th:nth-child(1) { width: 26%; }
#vendorsTable th:nth-child(2) { width: 16%; }
#vendorsTable th:nth-child(3) { width: 96px; }
#vendorsTable th:nth-child(4) { width: 104px; }
#vendorsTable th:nth-child(5) { width: 116px; }
#vendorsTable th:nth-child(6) { width: 190px; }

#txTable { min-width: 940px; }
#txTable th:nth-child(1) { width: 104px; }
#txTable th:nth-child(2) { width: 19%; }
#txTable th:nth-child(3) { width: 112px; }
#txTable th:nth-child(4) { width: 21%; }
#txTable th:nth-child(5) { width: 15%; }
#txTable th:nth-child(6) { width: 17%; }
#txTable th:nth-child(7) { width: 116px; }

tr.ledger-row { cursor: pointer; }
tr.ledger-row:hover { background: var(--newsprint); }
tr.ledger-row td { padding: 15px 16px; }
tr.ledger-row .committee-name { font-weight: 700; color: var(--ink); }
tr.ledger-row .tag { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-top: 3px; }
td.city-amt { font-weight: 700; color: var(--brick-deep); }
td.city-amt.zero { font-weight: 400; color: var(--text-muted); }
td.outside-amt { color: var(--ochre-deep); white-space: nowrap; }
td.outside-amt.zero { color: var(--text-muted); }
td.total-amt { font-weight: 700; color: var(--ink); }

.vendor-name { font-weight: 700; color: var(--ink); }
.vendor-cat { color: var(--text-muted); }
.vendor-payers { font-weight: 600; color: var(--text-body); }
.vendor-payers.wide { color: var(--brick-deep); }
.share-cell { min-width: 180px; }
.share-wrap { display: flex; align-items: center; gap: 10px; }
.share-track { flex: 1; height: 12px; background: rgba(34,49,58,0.1); border-radius: 2px; overflow: hidden; }
.share-fill { height: 100%; background: var(--teal); }
.share-pct { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-muted); min-width: 34px; text-align: right; }

/* --- committee detail card ------------------------------------------------ */
tr.detail-row.collapsed { display: none; }
tr.detail-row > td { padding: 0; border-top: none; }
.detail { border: 2px solid var(--ink); border-radius: 6px; background: var(--paper); box-shadow: 8px 8px 0 rgba(34,49,58,0.18); margin: 0 0 28px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 28px 28px 0; flex-wrap: wrap; }
.detail-head .meta { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.detail-head h3 { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); text-transform: uppercase; line-height: 1; margin: 0; color: var(--forest); }
.detail-close { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 9px 16px; border: 2px solid var(--ink); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer; font-family: var(--font-body); }
.detail-close:hover { filter: brightness(0.92); }
.detail .stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 22px; padding: 26px 28px 0; }
.detail .s-label { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 7px; }
.detail .s-value { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ink); }
.detail .s-value.city { color: var(--brick-deep); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 36px; padding: 32px 28px 0; }
.detail-grid:last-child { padding-bottom: 34px; }
.detail-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 16px; }
.detail .cat-row { margin-bottom: 12px; }
.detail .cat-row .bar-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 5px; }
.detail .cat-row .bar-label span:first-child { color: var(--text-body); font-weight: 600; }
.detail .cat-row .bar-label span:last-child { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.detail .cat-row .bar-track { height: 12px; background: rgba(34,49,58,0.1); border-radius: 2px; overflow: hidden; }
.detail .line-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 14px; padding-bottom: 9px; margin-bottom: 9px; border-bottom: 1px solid rgba(34,49,58,0.12); }
.detail .line-row span:first-child { color: var(--ink); font-weight: 600; }
.detail .line-row span:last-child { color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --- transactions --------------------------------------------------------- */
.tx-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.tx-controls input[type="text"] { flex: 1 1 280px; font-size: 16px; padding: 13px 14px; }
.tx-controls select { padding: 13px 12px; }
.tx-summary { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 18px 0; font-size: 14px; color: var(--text-muted); }
.tx-summary span:last-child { font-variant-numeric: tabular-nums; }
.panel #txBody td { padding: 12px 16px; }
#txBody td:first-child { font-variant-numeric: tabular-nums; color: var(--text-muted); white-space: nowrap; }
#txBody td:nth-child(2), #txBody td:nth-child(4) { font-weight: 600; color: var(--ink); }
#txBody td:nth-child(3), #txBody td:nth-child(5) { color: var(--text-muted); }
#txBody td:last-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
/* Flex children default to min-width:auto, so a long vendor name or a chip
   like "3 days after committee certification" refuses to shrink and shoves
   the whole row past the panel edge. Let them shrink and wrap instead. */
.detail .line-row > *, .detail .cat-row .bar-label > * { min-width: 0; }
.detail .line-row span:first-child, .detail .cat-row .bar-label span:first-child { overflow-wrap: anywhere; }
.detail .line-row span:last-child { white-space: normal; }
.detail .chip { white-space: normal; text-align: right; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 8px; border-radius: 3px; border: 2px solid rgba(34,49,58,0.3); background: rgba(34,49,58,0.06); color: var(--text-body); white-space: nowrap; }
.chip.chip-correction { border-color: var(--ochre); background: rgba(188,114,49,0.16); color: var(--ochre-deep); }

/* --- tables become cards on phones ---------------------------------------
   The three tables are 860–1060px wide by design, so on a phone they were a
   horizontally-scrolling strip with most columns off-screen — unusable for
   what is mostly a mobile audience. Below 720px each row becomes a stacked
   card and every cell carries its own label via data-label. */
@media (max-width: 720px) {
  .panel { border-radius: 6px; overflow: visible; }
  .panel table, .panel tbody, .panel tr, .panel td { display: block; width: auto; }
  .panel table { table-layout: auto; min-width: 0; }
  /* The desktop min-widths are set with ID selectors (#ledgerTable etc), which
     out-specify `.panel table` above — so they survived into mobile and held
     every table ~1060px wide inside a 390px viewport. That's what stretched
     the row borders off-screen and stopped the detail panel resizing, since it
     lays out to its table's width, not the screen's. Match the specificity. */
  #ledgerTable, #vendorsTable, #txTable { min-width: 0; width: 100%; }
  .panel thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .panel tr { border-top: 2px solid var(--ink); padding: 14px 16px; }
  .panel tbody tr:first-child { border-top: none; }
  .panel td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
    border-top: none; padding: 4px 0; white-space: normal; overflow: visible; text-overflow: clip;
  }
  /* The label the hidden header would have supplied. */
  .panel td::before {
    content: attr(data-label);
    flex: 0 0 auto; font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--text-muted);
  }
  .panel td:empty, .panel .pad-row { display: none; }   /* filler is desktop-only */
  /* The server renders the desktop page (15 rows) so the HTML carries more for
     crawlers. Until JS hydrates and re-pages to 5, clip the extras here — the
     alternative is a phone painting 15 rows and then dropping 10. Once the
     client has re-rendered there are only 5 rows and this matches nothing. */
  #txBody tr:nth-child(n+6), #vendorsBody tr:nth-child(n+6) { display: none; }
  .panel td.num { text-align: right; }
  /* First cell of each card is its title: no label, bigger, own line. */
  .panel td:first-child { display: block; font-size: 17px; font-weight: 700; margin-bottom: 8px; }
  .panel td:first-child::before { content: none; }
  /* .tag / .vendor-cat were left on nowrap+ellipsis while their sibling names
     were freed — so "Official Candidate Committee" truncated under the name. */
  .panel .committee-name, .panel .vendor-name,
  .panel .tag, .panel .vendor-cat { white-space: normal; overflow: visible; text-overflow: clip; }
  .panel .share-cell { display: block; }
  .panel .share-cell::before { content: attr(data-label); display: block; margin-bottom: 6px; }
  tr.ledger-row td:first-child { border-left: none; }
  /* Ledger on phones: one column — the campaign — instead of nine stacked
     label/value pairs. Every number is already in that row's own detail
     panel, so the card layout was just restating it at twice the height.
     Tap the row to open the panel; the chevron flips to say so. CSS-only:
     the server-rendered rows and the client re-rendered ones share it. */
  #ledgerTable tbody tr.ledger-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; cursor: pointer;
  }
  #ledgerTable tbody tr.ledger-row td.num { display: none; }
  #ledgerTable tbody tr.ledger-row td:first-child { flex: 1; margin-bottom: 0; }
  #ledgerTable tbody tr.ledger-row::after {
    content: "\25BE"; flex: 0 0 auto; font-size: 15px; line-height: 1;
    color: var(--text-muted); transition: transform 120ms ease;
  }
  /* :has() reads the sibling detail row's state, so no extra class is needed
     on the ledger row itself when a committee is expanded. */
  #ledgerTable tbody tr.ledger-row:has(+ tr.detail-row:not(.collapsed))::after {
    transform: rotate(180deg);
  }
  tr.detail-row > td { padding: 0; }
  tr.detail-row td::before { content: none; }
  .detail-head, .detail .stat-grid, .detail-grid { padding-left: 18px; padding-right: 18px; }
  .detail { box-shadow: 4px 4px 0 rgba(34,49,58,0.18); }

  /* The changelog is the one grid that isn't auto-fit: a fixed 110–150px date
     column beside the entry. At 358px usable that leaves ~200px for the text,
     so the date stacks above it instead. */
  .changelog-item { grid-template-columns: 1fr; gap: 6px; padding: 16px 0; }

  /* Desktop gutters sized for two side-by-side columns; once these grids drop
     to one column the gap is just dead vertical space between stacked blocks. */
  .explore-grid { gap: 28px; }
  .method-grid { gap: 28px; }
  .detail-grid { gap: 24px; }
  .detail .stat-grid { gap: 18px; }

  /* 72px of section padding is ~a fifth of a phone screen before any content. */
  section .wrap { padding-top: 48px; }
  .hero .wrap { padding: 44px 24px 40px; }
}

/* --- collapsible tables ---------------------------------------------------
   Native <details>, so collapsing needs no JS and the rows stay in the DOM
   (and in the server-rendered HTML) when closed — crawlers and JS-off readers
   see everything either way. Open by default: a dashboard that shows nothing
   until you click is a worse first impression than a long page. */
.table-collapse > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); padding: 4px 0 14px; user-select: none;
}
.table-collapse > summary::-webkit-details-marker { display: none; }  /* Safari's own triangle */
.table-collapse > summary::after {
  content: "\25BE"; font-size: 14px; line-height: 1; transition: transform 120ms ease;
}
.table-collapse[open] > summary::after { transform: rotate(180deg); }
.table-collapse > summary:hover { color: var(--ink); }
.table-collapse > summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* --- paging under tables -------------------------------------------------
   Same control as the main site's endorsement carousel / events pager
   (campaign.css .events-nav/.events-status): status on the left, prev/next
   arrows on the right, prev outline + next solid. */
.page-nav { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.page-status { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-right: auto; }
.page-nav button { width: 44px; height: 44px; cursor: pointer; font-family: var(--font-display); font-size: 20px; border: 2px solid var(--ink); border-radius: var(--radius-sm); background: transparent; color: var(--ink); }
.page-nav button[data-dir="1"] { background: var(--ink); color: var(--paper); }
.page-nav button:hover { filter: brightness(0.92); }
.page-nav button:active { transform: translate(2px, 2px); }

/* --- buttons under tables ------------------------------------------------- */
.actions-row { padding: 22px 0 0; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn-solid { font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 14px 20px; border: 2px solid var(--ink); border-radius: 3px; background: var(--ink); color: var(--paper); cursor: pointer; }
.btn-solid:hover { filter: brightness(1.15); }
.btn-solid:active { transform: translate(2px, 2px); }
.btn-outline { font-family: var(--font-body); font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; padding: 14px 20px; border: 2px solid var(--ink); border-radius: 3px; color: var(--ink); background: transparent; cursor: pointer; }
.btn-outline:hover { filter: brightness(0.92); }
.btn-outline:active { transform: translate(2px, 2px); }
.hidden { display: none; }

/* --- filing calendar ------------------------------------------------------ */
.cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 16px; }
.cal-card { border: 2px solid var(--ink); border-radius: 6px; padding: 20px; background: var(--paper); color: var(--ink); }
.cal-card.filed { background: var(--ink); color: var(--paper); }
.cal-card.due { background: var(--ochre); color: var(--ink); }
.cal-card .status { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; opacity: 0.75; margin-bottom: 10px; }
.cal-card .date { font-family: var(--font-display); font-size: 28px; line-height: 1; margin-bottom: 8px; }
.cal-card .label { font-size: 14px; line-height: 1.4; font-weight: 600; }

/* --- change log ----------------------------------------------------------- */
.changelog { max-width: 860px; }
.changelog-item { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid rgba(34,49,58,0.16); }
.changelog-item .cl-date { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.changelog-item .cl-kind { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brick); margin-bottom: 6px; }
.changelog-item p { font-size: 16px; line-height: 1.6; color: var(--text-body); margin: 0; }

/* --- methodology ---------------------------------------------------------- */
#method .wrap { padding-bottom: 80px; }
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 48px; }
.method-grid h3 { font-family: var(--font-display); font-size: 24px; text-transform: uppercase; line-height: 1; margin: 0 0 14px; color: var(--forest); }
.method-grid h3 + p { margin-top: 0; }
.method-grid p { font-size: 16px; line-height: 1.65; color: var(--text-body); margin: 0 0 14px; }
.method-grid p.gap-after { margin-bottom: 28px; }
.method-box { border: 2px solid var(--ink); border-radius: 6px; padding: 24px; background: var(--paper); margin-bottom: 18px; }
.method-box:last-child { margin-bottom: 0; }
.method-box .box-label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--text-muted); margin-bottom: 12px; }
.method-box p { font-size: 15px; line-height: 1.6; margin: 0 0 14px; }
.method-box p:last-child { margin-bottom: 0; }
.method-links { display: flex; gap: 18px; flex-wrap: wrap; }
.method-links a { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; color: var(--accent); }

/* --- footer --------------------------------------------------------------- */
footer.site-footer { border-top: 2px solid var(--forest-deep); margin-top: 72px; }
footer.site-footer .wrap { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding: 52px 24px; }
footer.site-footer .footer-brand { font-family: var(--font-display); font-size: 32px; letter-spacing: 0.02em; text-shadow: 4px 4px 0 var(--forest-deep); margin-bottom: 14px; }
footer.site-footer p { font-size: 15px; line-height: 1.6; max-width: 46ch; margin: 0; color: var(--paper-dim); }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; white-space: nowrap; }
.footer-nav a { color: var(--paper); text-decoration: none; }
.footer-nav a:hover { color: var(--sand); }

/* --- v2 draft (/v2) ---------------------------------------------------------
   Every v2 section is <section class="v2-section v2-NAME" data-colorway?> with
   exactly one .v2-container inside. The section owns the colorway and the
   vertical padding; the container owns width and side gutters — so chrome and
   content line up at every breakpoint. Layout + responsive rules live here as
   classes, never inline: an inline style beats every class and media query. */
.v2-container { max-width: var(--container-max); margin: 0 auto; padding-inline: 28px; }
@media (max-width: 720px) { .v2-container { padding-inline: 20px; } }
/* Keeps #anchor jumps clear of the sticky header — tune to the header's height. */
.v2-section { scroll-margin-top: 100px; padding-block: 72px 0; }
/* Stands in for the old footer's margin-top, so the gap is padding, not margin. */
.v2-main { padding-bottom: 72px; }

/* Header — boulder.vote's sticky forest bar, holding the section anchor links. */
.v2-header { position: sticky; top: 0; z-index: 20; border-bottom: 2px solid var(--border); padding-block: 12px; }
/* Anchor links, centered — boulder.vote's nav-link look (13px bold uppercase
   cream, tan on hover). Phones: one row that scrolls sideways (no scrollbar). */
.v2-anchors { display: flex; justify-content: center; gap: 24px; overflow-x: auto; scrollbar-width: none; }
.v2-anchors::-webkit-scrollbar { display: none; }
.v2-anchors a { flex: none; padding-block: 6px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--paper); text-decoration: none; white-space: nowrap; }
.v2-anchors a:hover { color: var(--sand); }
.v2-header-row { display: flex; align-items: center; justify-content: center; }
/* Phones: links hide behind boulder.vote's ☰ button (right); its panel drops
   under the bar with the links stacked and centered. */
.v2-menu-btn {
  display: none; width: 44px; height: 44px; margin-left: auto; padding: 0; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: transparent; color: var(--paper); border: 2px solid var(--line-on-dark); border-radius: var(--radius-sm);
}
.v2-menu-btn span { display: block; width: 20px; height: 2px; background: currentColor; }
.v2-menu { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-block: 12px 16px; border-top: 2px solid var(--line-on-dark); }
.v2-menu[hidden] { display: none; }
.v2-menu a { padding: 8px 0; font-size: 15px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--paper); text-decoration: none; }
.v2-menu a:hover { color: var(--sand); }
/* Header Visit button (phones only): collapsed to zero width — hidden from
   the tab order — until .visit-on, then grows to fill the bar left of ☰. */
.v2-header .v2-header-visit { display: none; } /* two classes: beats .v2-btn's display further down */
@media (max-width: 720px) {
  .v2-anchors { display: none; }
  .v2-menu-btn { display: flex; }
  .v2-header .v2-header-visit {
    display: inline-flex; flex: 0 1 0%; min-width: 0; overflow: hidden; white-space: nowrap;
    padding-inline: 0; border-width: 0; opacity: 0; visibility: hidden;
    color: var(--paper); margin-right: 12px;
  }
  .v2-header.visit-on .v2-header-visit { flex-grow: 1; padding-inline: 24px; border-width: 2px; opacity: 1; visibility: visible; }
  .v2-header .v2-header-visit:hover { color: var(--sand); }
}
@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .v2-header .v2-header-visit { transition: flex-grow .25s ease, padding .25s ease, opacity .2s ease, visibility .25s; }
}
@media (min-width: 721px) { .v2-menu { display: none !important; } }
#calendar { scroll-margin-top: 100px; } /* clear the sticky header when jumped to */
.v2-hero { padding-block: 118px 110px; } /* ~1/3 taller than the original 64/56: calmer landing */
/* Hero photo: the Flatirons from Chautauqua under an ink wash (same .82 wash
   as boulder.vote's teal hero), so the cream text stays readable. Smaller
   file on phones. */
.v2-hero {
  background: linear-gradient(rgba(34,49,58,.82), rgba(34,49,58,.82)), url("/assets/boulder-hero-1600.jpg") center 40% / cover;
}
@media (max-width: 720px) {
  .v2-hero { background-image: linear-gradient(rgba(34,49,58,.82), rgba(34,49,58,.82)), url("/assets/boulder-hero-1000.jpg"); }
}
/* Phones: the tall hero padding read as dead space under the header (measured
   118px gap at 375px), so it tightens there. */
@media (max-width: 720px) { .v2-hero { padding-block: 40px 56px; } }
/* Totals section: less top padding than the default 72px — the hero's colored
   band already separates them. */
.v2-cards { padding-top: 22px; }
/* Explore: same tight top as the totals section; the note leads it, centered
   and small, 24px above the Explore bar. */
/* View bands (Spending / Ledger / Transactions): room inside each colored band;
   the totals section ends 24px above the first one. */
.v2-view-band { padding-block: 40px 56px; }
.v2-cards { padding-bottom: 24px; }
/* Table title (left of the grouping toggle): 28px display, uppercase. */
.v2-table-title { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 400; text-transform: uppercase; color: var(--text-strong); }
/* Ledger view: taupe (sand) band, but navy (ink) text instead of sand's green. */
#ledger { --text-strong: var(--ink); --text-body: var(--ink); --text-muted: var(--ink); color: var(--ink); }
/* Paging arrows — boulder.vote's .v2-arrow: 48px square, cream fill, navy border and glyph. */
.v2-arrows { display: flex; gap: 8px; }
.v2-arrows-phone { display: none; justify-content: center; margin-top: 24px; }
.v2-arrow { width: 48px; height: 48px; cursor: pointer; background: var(--paper); border: 2px solid var(--ink); border-radius: var(--radius-sm); font-size: 20px; font-weight: 800; color: var(--ink); }
/* Group-by toggle: the same pills, kept on phones (other pill groups hide
   there). On the teal band the unselected pill is cream, the selected one ink. */
@media (max-width: 720px) {
  .v2-selectors.v2-toggle { display: flex; }
  /* Phones: table title bars (Spending: title + Category / Vendor toggle;
     Transactions: title) stack, centered. */
  .v2-spend-bar { flex-direction: column; justify-content: center; }
  .v2-spend-bar .v2-table-title { text-align: center; }
}
#spending .v2-selector span { border-color: var(--paper); color: var(--paper); }
#spending .v2-selector input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
/* Spending table: one full-width column; category left, numbers right. */
.v2-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 17px;
  border: 2px solid var(--ink); border-radius: var(--radius-md); } /* navy (ink); separate, so the radius shows */
.v2-table th, .v2-table td { padding: 10px 16px; border-bottom: 2px solid var(--ink); text-align: right; }
.v2-table:not(.v2-ledger, .v2-paged) tbody tr:last-child > * { border-bottom: 0; } /* the table's own border closes it (paged tables use .is-last) */
.v2-paged tr.is-last > * { border-bottom: 0; }
/* Arrows that always sit centered under their table (desktop and phones). */
.v2-arrows-bottom { justify-content: center; margin-top: 24px; }
/* "Page 2 of 5" between a table's arrows. */
.v2-page-status { align-self: center; min-width: 8.5em; text-align: center; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
/* City matching funds: the ledger's City figure when the city has paid out,
   and a transaction's amount when part of it qualifies for matching. */
.v2-match { font-weight: 800; }
.v2-ledger-view .v2-city { color: var(--brick); } /* ledger: city matching paid, in red (table + phone detail) */
.v2-match-note { font-size: 13px; font-weight: 500; } /* "$200 pending" / "$2,100 eligible" beside the status */
.v2-filter-empty { margin: 16px 0 0; text-align: center; font-size: 15px; } /* shown when a filter leaves a table empty */
/* Fit any width without sideways scrolling: fixed layout, numbers get set
   widths, the name column takes the rest and truncates. */
.v2-fit { table-layout: fixed; }
.v2-fit th, .v2-fit td { white-space: nowrap; }
/* Amount + Share are the LAST two columns in both Spending tables (the vendor
   table has an extra Category column), so they're sized from the end and line
   up whichever grouping is showing. */
.v2-fit thead th:nth-last-child(2) { width: 8.5em; }
.v2-fit thead th:nth-last-child(1) { width: 5.5em; }
/* Vendor table's Category column (2nd of 4): fixed, left-aligned; hidden on phones. */
.v2-fit thead th:nth-child(2):nth-last-child(3) { width: 11em; }
.v2-fit tr > :nth-child(2):nth-last-child(3) { text-align: left; }
@media (max-width: 720px) { .v2-fit tr > :nth-child(2):nth-last-child(3) { display: none; } }
.v2-fit .v2-trunc { max-width: 100%; }
/* Transactions table: fixed columns so it fits without sideways scrolling;
   Campaign and Payee share the leftover width and truncate. Phones: Date,
   Campaign, Amount only (City match is desktop-only for now). */
.v2-tx { table-layout: fixed; }
.v2-tx th, .v2-tx td { white-space: nowrap; }
/* Widths include the cell padding. Date fits MM/DD/YYYY; Payee is capped so
   Campaign takes all the leftover width (~25 characters at 1200px). */
.v2-tx thead th:nth-child(1) { width: 8em; }   /* Date */
.v2-tx thead th:nth-child(3) { width: 8.5em; } /* Type */
.v2-tx thead th:nth-child(4) { width: 11em; }  /* Payee or source */
.v2-tx thead th:nth-child(5), .v2-tx thead th:nth-child(6) { width: 7.5em; } /* City match, Amount */
.v2-tx thead th:nth-child(7) { width: 9em; }   /* Category */
.v2-tx .v2-trunc { max-width: 100%; }
.v2-tx tr > :nth-child(-n+4), .v2-tx tr > :nth-child(7) { text-align: left; } /* text left; City match + Amount right */
@media (max-width: 720px) {
  .v2-tx tr > :nth-child(3), .v2-tx tr > :nth-child(4), .v2-tx tr > :nth-child(5), .v2-tx tr > :nth-child(7) { display: none; } /* phones: Date, Campaign, Amount */
  .v2-tx th, .v2-tx td { padding-inline: 10px; }
  .v2-tx thead th:nth-child(1) { width: 4.5em; } /* MM/DD on phones */
  .v2-tx thead th:nth-child(6) { width: 6.5em; }
}
/* Ledger rows: 1.5x the spending table's (10px -> 20px padding: ~40px -> ~60px rows). */
.v2-table-tall th, .v2-table-tall td { padding-block: 20px; }
/* Ledger: navy header with cream text, cream rows. Campaign names cut off with
   an ellipsis past ~22 characters (full name on hover) so the table fits its
   width on desktop without sideways scrolling. The scroll box is only a
   fallback for screens too narrow for nine columns. */
.v2-table-scroll { overflow-x: auto; }
/* Ledger box keeps a full page's height, so a short last page doesn't shrink
   the section (or move the phone arrows). Measured: 10 rows = 684px (desktop),
   5 rows = 371px (phones). Rows never wrap (nowrap + truncated names), so these
   hold at every width in each range. On the wrapper, not the table: a table
   stretches its rows to fill a set height. */
.v2-ledger-view .v2-table-scroll { min-height: 684px; }
@media (max-width: 720px) { .v2-ledger-view .v2-table-scroll { min-height: 371px; } }
.v2-ledger th, .v2-ledger td { white-space: nowrap; padding-inline: 12px; } /* 12px (not 16): ten columns fit the 1200px container */
.v2-table.v2-ledger thead th { background: var(--ink); color: var(--paper); } /* .v2-table on purpose: must beat the generic header color (var(--text-muted)) further down */
.v2-ledger tbody > tr > * { background: var(--paper); color: var(--ink); }
.v2-ledger thead th:first-child { border-top-left-radius: 4px; }
.v2-ledger thead th:last-child { border-top-right-radius: 4px; }
.v2-ledger tr.is-last > * { border-bottom: 0; } /* last row on the page: the table border closes it */
.v2-ledger tr.is-last > :first-child { border-bottom-left-radius: 4px; }
.v2-ledger tr.is-last > :last-child { border-bottom-right-radius: 4px; }
/* Clickable rows: the name is a button (keyboard + screen readers), the whole
   row responds to clicks. */
.v2-ledger .v2-row { cursor: pointer; }
.v2-ledger .v2-row:hover > *, .v2-ledger .v2-row.open > * { background: var(--newsprint); }
.v2-row-btn { display: block; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
/* Open row loses the line on the side its panel attaches to, so they read as one block. */
.v2-ledger .v2-row.open:not(.open-up) > * { border-bottom-color: transparent; }
/* Detail panel — floats in the ledger box (position: relative below), so the
   box keeps its fixed height. Desktop: full width, flush under (or .up: over)
   the row, same color as the open row. */
.v2-ledger-view .v2-table-scroll { position: relative; }
.v2-detail-panel {
  position: absolute; left: 0; right: 0; z-index: 2; padding: 8px 18px 16px;
  background: var(--newsprint); color: var(--ink); border: 2px solid var(--ink); border-top: 0;
}
.v2-detail-panel.up { padding: 16px 18px 8px; border-top: 2px solid var(--ink); border-bottom: 0; }
.v2-detail-head { display: none; }
.v2-detail-name { margin: 0 0 10px; font-size: 17px; font-weight: 800; line-height: 1.3; } /* full name, desktop */
.v2-detail-head-name { min-width: 0; overflow-wrap: anywhere; } /* phones: wraps, never truncates */
/* Panel content. Desktop: filings | corrections side by side, links in a bar
   under them. Phones: one column, the hidden figures first (below). */
.v2-detail-figs { display: none; }
.v2-detail-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.v2-detail-label { margin: 0 0 8px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.v2-detail-list { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.v2-detail-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(34, 49, 58, .2); }
.v2-detail-empty { margin: 0; font-size: 15px; }
.v2-chip { flex: none; padding: 2px 6px; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.v2-detail-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--ink); }
.v2-see-spend { padding: 0; border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink); text-decoration: underline; cursor: pointer; }
.v2-detail-foot a { color: var(--ink); font-weight: 700; }
.v2-phone { display: none; }
/* Phones: the panel takes over the whole box — name + close pinned at the top,
   content scrolls inside if it ever outgrows the box. */
@media (max-width: 720px) {
  .v2-detail-panel { inset: 0; top: 0 !important; overflow-y: auto; padding: 0 16px 16px; border: 2px solid var(--ink); border-radius: var(--radius-md); }
  /* Sticky: the name + ✕ bar stays pinned while the panel's content scrolls under it. */
  .v2-detail-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -16px 14px; padding: 12px 16px; background: var(--ink); color: var(--paper); font-weight: 700; }
  .v2-detail-name { display: none; } /* phones show the name in the navy bar instead */
  .v2-detail-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0 0 16px; }
  .v2-detail-figs dt { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
  .v2-detail-figs dd { margin: 2px 0 0; font-size: 17px; font-weight: 700; }
  .v2-detail-cols { grid-template-columns: 1fr; }
  .v2-detail-foot { justify-content: flex-start; }
  .v2-desk { display: none; }
  .v2-phone { display: inline; }
  .v2-detail-close { flex: none; width: 36px; height: 36px; border: 2px solid var(--paper); border-radius: var(--radius-sm); background: none; color: var(--paper); font-size: 16px; cursor: pointer; }
}
.v2-trunc { display: block; max-width: 20ch; overflow: hidden; text-overflow: ellipsis; }
/* Phones: just Campaign + Total (the first two columns); the rest hide. */
@media (max-width: 720px) {
  .v2-ledger tr > :nth-child(n+3) { display: none; }
  /* Fit the screen exactly: fixed layout, Total gets a set width, Campaign takes
     the rest and truncates to it (the 22ch cap was wider than a phone allows). */
  .v2-ledger { table-layout: fixed; }
  .v2-ledger thead th:nth-child(2) { width: 8.5em; }
  .v2-ledger th, .v2-ledger td { padding-inline: 12px; }
  .v2-ledger .v2-trunc { max-width: 100%; }
  /* Ledger bar: title centered, its arrows move under the table. */
  .v2-ledger-bar .v2-arrows { display: none; }
  .v2-ledger-bar .v2-bar-title { flex: 1; text-align: center; }
  .v2-arrows-phone { display: flex; }
}
.v2-table th[scope="row"], .v2-table thead th:first-child { text-align: left; font-weight: 700; }
.v2-table thead th { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); }
/* View lead line: same look as the controls note (15px, muted), centered. */
.v2-view-lead { flex: 1; margin: 0; text-align: center; font-size: 15px; color: var(--text-muted); }
.v2-explore-note { margin: 0; text-align: center; font-size: 15px; color: var(--text-muted); }
/* Hero: copies boulder.vote's "Follow the Money" section (campaign.css
   .v2-dash-*): two equal columns (one under 720px); left = 38px display title,
   16px gap, 17px/1.6 list; right = 17px/1.6 paragraph, then the button centered
   and pushed to the column floor (the grid stretches both columns to one
   height, so it bottoms out with the list). */
.v2-hero-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.v2-hero-title { margin: 0 0 16px; font-family: var(--font-display); font-size: 38px; font-weight: 400; }
.v2-hero-list { margin: 0; padding-left: 1.2em; font-size: 17px; line-height: 1.6; }
.v2-hero-list li + li { margin-top: 6px; }
.v2-hero-right { display: flex; flex-direction: column; }
.v2-hero-copy { margin: 0 0 24px; font-size: 17px; line-height: 1.6; }
.v2-hero-right .v2-btn { align-self: center; margin-top: auto; }
@media (max-width: 720px) { .v2-hero-cols { grid-template-columns: 1fr; } }
/* Button — boulder.vote's .btn .btn-primary .btn-lg + .v2-btn-dash (slate text,
   hover included), under its own name so it can't collide with this site's
   existing .btn-solid / .btn-outline. On ink, --accent is sand. */
.v2-btn {
  display: inline-flex; align-items: center; justify-content: center; max-width: 100%;
  padding: 16px 34px; border: 2px solid transparent; border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 18px; font-weight: 800; letter-spacing: .10em; line-height: 1.15; text-transform: uppercase; text-align: center;
  background: var(--accent); color: #2c3b44; text-decoration: none; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), filter var(--dur-fast) var(--ease-out);
}
.v2-btn:hover { filter: brightness(0.92); color: #2c3b44; }
.v2-btn:active { transform: translate(2px, 2px); }
.v2-hero-stats { margin: 24px 0 0; font-size: 16px; } /* left column, under the list */
.v2-band { padding-block: 26px 28px; border-block: 2px solid rgba(34,49,58,0.28); }

/* Top bar + selectors — boulder.vote's (campaign.css .v2-carousel-bar /
   .v2-selector / .v2-filter): ink-outlined uppercase pills, the picked one
   filled ink; the phone dropdown is cream with ink text, full width. */
.v2-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
/* Bar heading — boulder.vote's .v2-bar-title ("Boulder by the Numbers"): 38px display. */
.v2-bar-title { margin: 0; font-family: var(--font-display); font-size: 38px; font-weight: 400; color: var(--text-strong); }
.v2-bar-center { justify-content: center; flex-wrap: wrap; }
.v2-cards .v2-bar { margin: 16px 0 24px; } /* under the note, above the cards */
.v2-selectors { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.v2-selector { position: relative; cursor: pointer; }
.v2-selector input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v2-selector span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px;
  font-family: var(--font-body); font-size: 15px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  border: 2px solid var(--ink); border-radius: var(--radius-md); color: var(--ink);
}
.v2-selector input:checked + span { background: var(--ink); color: var(--paper); }
.v2-selector input:focus-visible + span { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.v2-filter {
  display: none; min-height: 44px; padding: 8px 16px;
  font-family: var(--font-body); font-size: 15px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  border: 2px solid var(--ink); border-radius: var(--radius-md); color: var(--ink); background: var(--paper);
}
/* Campaign + view dropdowns: beside the pills above 720px; on phones they
   stack full width under the race dropdown. */
.v2-bar .v2-filter-always { display: block; flex: 1 1 200px; } /* grow to fill the rest of their row (never under 200px) */
/* Totals bar: the pill group grows too, and each pill stretches within it, so
   pills and dropdowns share the row's width instead of the pills sitting at
   their natural size. */
.v2-cards .v2-selectors { flex: 1 1 auto; }
.v2-cards .v2-selector { flex: 1 1 auto; }
.v2-cards .v2-selector span { width: 100%; justify-content: center; }
@media (max-width: 720px) {
  .v2-selectors { display: none; }
  .v2-filter { display: block; width: 100%; }
}

/* Four-card row — boulder.vote's section 2 cards (campaign.css .v2-cols-3 /
   .v2-card / .v2-card-title / .v2-card-body), with four columns: 4 across,
   2 under 900px, 1 under 720px. Cards share the row's height; titles are
   display type, uppercase, centered, in a 2-line slot (above 720px) so every
   body starts on the same line. */
.v2-cols-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.v2-card { height: 100%; border: 2px solid var(--border-strong); border-radius: var(--radius-md); padding: 28px 24px; }
.v2-card-title { margin: 0 0 14px; font-family: var(--font-display); font-size: clamp(18px, calc(2.8vw - 8px), 26px); font-weight: 400; line-height: 1.05; text-transform: uppercase; text-align: center; color: var(--text-strong); }
/* Totals cards: big display figure, note under it, both centered like the title. */
.v2-card-figure { margin: 0 0 6px; font-family: var(--font-display); font-size: 40px; line-height: 1.1; text-align: center; color: var(--text-strong); }
.v2-card[data-total="pub"] .v2-card-figure { color: var(--brick); } /* City funds figure in red */
.v2-card-body { margin: 0; font-size: 17px; line-height: 1.6; }
.v2-cards .v2-card-body { text-align: center; }
@media (min-width: 721px) {
  .v2-cols-4 .v2-card-title { min-height: calc(2 * 1.05em); display: flex; align-items: center; justify-content: center; }
}
@media (max-width: 900px) { .v2-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .v2-cols-4 { grid-template-columns: 1fr; } }

/* v2 debug overlay — on while <main> has .v2-debug (src/pages/v2.astro).
   Blue = content, green = padding, red outline = border edge; uncolored space
   between outlines is margin/gap. Covers header and footer too. */
body:has(> main.v2-debug) :is(.v2-header, .v2-site-footer, .v2-section, .v2-container, .v2-container > *, .v2-hero-cols > *, .v2-hero-cols > * > *, .v2-cols-4 > *, .v2-card, .v2-bar > *, .v2-view > *) {
  background: linear-gradient(rgba(0,120,255,.25), rgba(0,120,255,.25)) content-box, rgba(0,200,80,.3) padding-box !important;
  outline: 2px solid red; outline-offset: 0;
}
/* Debug only: give empty boxes some height so they show up. */
body:has(> main.v2-debug) :is(.v2-container, .v2-container > *, .v2-hero-cols > * > *):empty { min-height: 80px; min-width: 120px; }

/* v2 last section — Definitions | filing calendar (two columns, stacked under
   720px), then "Corrections and source" centered below both. */
.v2-info-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; align-items: start; }
.v2-info .v2-table-title, .v2-source .v2-table-title { margin-bottom: 16px; }
/* Definitions sized as reference text, closer to the calendar column's height:
   small uppercase terms (like the table headers), 15px explanations. */
.v2-defs { margin: 0; font-size: 15px; line-height: 1.5; }
.v2-defs dt { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.v2-defs dd { margin: 2px 0 12px; }
.v2-defs dd:last-child { margin-bottom: 0; }
/* Calendar cards: 2 across; Due next filled navy, Passed muted. */
.v2-cal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.v2-cal-card { padding: 16px 18px; border: 2px solid var(--ink); border-radius: var(--radius-md); color: var(--ink); }
.v2-cal-card p { margin: 0; }
.v2-cal-status { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.v2-cal-date { margin-top: 6px !important; font-family: var(--font-display); font-size: 28px; line-height: 1.1; }
.v2-cal-label { margin-top: 4px !important; font-size: 15px; }
.v2-cal-card.is-due-next { background: var(--ink); color: var(--paper); }
.v2-cal-card.is-passed { opacity: .6; }
/* Corrections and source: a tan band after the definitions/calendar, navy
   text (like the ledger's taupe), content centered. It runs straight into the
   footer, so <main> drops its bottom padding. */
.v2-source-section { margin-top: 56px; padding-block: 48px; --text-strong: var(--ink); --text-body: var(--ink); color: var(--ink); }
.v2-main:has(> .v2-source-section:last-child) { padding-bottom: 0; }
.v2-source { max-width: 62ch; margin: 0 auto; text-align: center; font-size: 17px; line-height: 1.6; }
.v2-source p { margin: 0 0 16px; }
.v2-source-email { font-weight: 800; color: var(--ink); }
/* About this data (bottom of the tan band): two columns of small print —
   data date + the conflict | known limits + change log. One column on phones. */
.v2-about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 44px; margin-top: 40px; padding-top: 28px; border-top: 2px solid var(--ink); font-size: 15px; line-height: 1.55; }
.v2-about .v2-detail-label { margin-top: 14px; }
.v2-about > div > .v2-detail-label:first-child { margin-top: 0; }
.v2-about p { margin: 0 0 10px; }
.v2-changelog { margin: 0; padding-left: 1.1em; }
.v2-changelog li + li { margin-top: 6px; }
@media (max-width: 720px) { .v2-about { grid-template-columns: 1fr; } }
/* See the source: on the page background the button is brick (--accent), so its text is cream, hover included. */
.v2-source .v2-btn, .v2-source .v2-btn:hover { color: var(--paper); }
@media (max-width: 720px) {
  .v2-info-cols { grid-template-columns: 1fr; }
}

/* --- Footer — ported from boulder.vote (campaign.css, v2 footer + talk bar) ---
   Ink band; "Talk to me" bar centered; three columns (4fr 3fr 3fr, one column
   on phones); "Paid for by" centered at the bottom. */
.v2-site-footer { border-top: 2px solid var(--border); padding-block: 44px; }
.v2-dash-link, .v2-dash-link:hover { font-weight: 800; color: inherit; text-decoration: underline; }
.v2-talk-bar { justify-content: center; margin-bottom: 48px; }
.v2-talk-email { min-width: 0; overflow-wrap: anywhere; }
.v2-talk-email, .v2-talk-email:hover { color: var(--sand); }
.v2-footer-grid { display: grid; grid-template-columns: 4fr 3fr 3fr; gap: 32px; }
.v2-footer-links { display: flex; flex-wrap: wrap; gap: 32px; }
.v2-footer-vote ul { margin: 0; padding-left: 1.1em; font-size: 13px; line-height: 1.5; color: var(--paper); }
.v2-footer-vote li + li { margin-top: 6px; }
.v2-footer-ballot { margin: 0 0 22px; font-size: 15px; font-weight: 700; color: var(--sand); }
.v2-footer-list { display: flex; flex-direction: column; gap: 10px; }
.v2-footer-head { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--sand); }
.v2-footer-list .v2-footer-head { margin-bottom: 4px; }
.v2-footer-list a { font-size: 13px; font-weight: 700; color: var(--paper); text-decoration: none; }
.v2-footer-list a:hover { color: var(--sand); }
.v2-paid { margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; font-size: 16px; color: var(--text-muted); }
/* Smaller button for the footer's signup link (boulder.vote's btn-md size). */
.v2-btn-sm { padding: 12px 24px; font-size: 15px; letter-spacing: .09em; }
@media (max-width: 720px) {
  .v2-footer-grid { grid-template-columns: 1fr; }
  .v2-talk-bar { flex-direction: column; }
  .v2-talk-email { text-align: center; }
}
