/* Plain Sight — shared styles
   Concept: records brought into plain sight. Findings are printed slips; key figures get a highlighter swipe.
   Tokens are defined once here; dark mode re-steps them rather than inverting. */

:root {
  color-scheme: light;
  --sky: #e7edf1;          /* page background: cool Chinook-sky grey */
  --sky-2: #dbe3e9;        /* recessed areas */
  --paper: #ffffff;        /* receipts, panels */
  --ink: #16202a;          /* primary text */
  --ink-2: #4a5866;        /* secondary text */
  --ink-3: #566370;        /* tertiary, captions (AA on sky and paper) */
  --rule: #cbd5dd;         /* hairlines */
  --river: #0b74a8;        /* links, data series 1 */
  --river-ink: #075d87;    /* link text (AA on paper) */
  --sand: #b97a00;         /* data series 2: proposed */
  --sand-ink: #7a5000;     /* sand as text (e.g. "No" votes): passes 4.5:1 on sand tints */
  --hl: #ffe45c;           /* highlighter */
  --hl-ink: #16202a;
  --flag: #b42318;         /* form errors, and broken-commitment badges on the votes page */
  --ok: #17663a;           /* record status: published */
  --wait: #8a5a00;         /* record status: partly public / not public */
  --focus: #0b74a8;
  --shadow: 0 1px 0 rgba(22, 32, 42, .08), 0 8px 24px -12px rgba(22, 32, 42, .25);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Type scale (1.25 ratio, 17px base) */
  --t-xs: .8125rem;
  --t-sm: .9rem;
  --t-md: 1.0625rem;
  --t-lg: 1.33rem;
  --t-xl: 1.66rem;
  --t-2xl: 2.2rem;
  --t-3xl: clamp(2.3rem, 5.6vw, 4.1rem);

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --sky: #0f161c;
    --sky-2: #141d25;
    --paper: #18222b;
    --ink: #e5ecf1;
    --ink-2: #a9b6c1;
    --ink-3: #8794a0;
    --rule: #2b3a47;
    --river: #2b95d0;
    --river-ink: #6cbbe6;
    --sand: #c98500;
    --sand-ink: #e0a030;
    --hl: #6b5a00;
    --hl-ink: #fff7c2;
    --flag: #ff8a80;
    --ok: #6fd39b;
    --wait: #f2b94b;
    --focus: #6cbbe6;
    --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --sky: #0f161c; --sky-2: #141d25; --paper: #18222b; --ink: #e5ecf1; --ink-2: #a9b6c1; --ink-3: #8794a0;
  --rule: #2b3a47; --river: #2b95d0; --river-ink: #6cbbe6; --sand: #c98500; --sand-ink: #e0a030; --hl: #6b5a00; --hl-ink: #fff7c2;
  --flag: #ff8a80; --ok: #6fd39b; --wait: #f2b94b; --focus: #6cbbe6;
  --shadow: 0 1px 0 rgba(0, 0, 0, .4), 0 10px 28px -14px rgba(0, 0, 0, .8);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--river-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
p, li, dd, .lede, .note { text-wrap: pretty; } /* no single words stranded on a last line */
h1 { font-size: var(--t-3xl); font-variation-settings: "wdth" 78; font-weight: 850; letter-spacing: -.015em; }
h2 { font-size: var(--t-2xl); font-variation-settings: "wdth" 82; }
h3 { font-size: var(--t-lg); font-variation-settings: "wdth" 92; }
p { margin: 0 0 1em; max-width: 62ch; } /* about 75 characters a line in Archivo */
.lede { font-size: var(--t-lg); color: var(--ink-2); line-height: 1.45; max-width: 58ch; }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-sm); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Highlighter: the one recurring visual device */
.hl {
  background: linear-gradient(100deg, transparent 0 .2em, var(--hl) .25em calc(100% - .3em), transparent calc(100% - .15em));
  background-size: 100% 62%;
  background-position: 0 72%;
  background-repeat: no-repeat;
  color: var(--hl-ink);
  padding: 0 .12em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--sky) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 850; font-size: 1.2rem; font-variation-settings: "wdth" 75; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 34px; flex: none; }
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--t-sm);
  padding: 8px 10px; border-radius: var(--radius); white-space: nowrap;
}
.nav a:hover { color: var(--ink); background: var(--sky-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper); box-shadow: inset 0 -2px 0 var(--river); }
.nav-group { position: relative; }
.nav-group summary {
  list-style: none; cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: var(--t-sm);
  padding: 8px 10px; border-radius: var(--radius); white-space: nowrap; display: flex; align-items: center; gap: 6px;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); }
.nav-group[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.nav-group summary:hover { color: var(--ink); background: var(--sky-2); }
.nav-group.current summary { color: var(--ink); background: var(--paper); box-shadow: inset 0 -2px 0 var(--river); }
.nav-sub {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; min-width: 220px;
  display: flex; flex-direction: column; padding: 6px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
}
.nav-sub a { padding: 10px 12px; }
.nav-sub a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--river); }
.menu-btn { display: none; margin-left: auto; background: var(--paper); border: 1px solid var(--rule); color: var(--ink); border-radius: var(--radius); padding: 8px 12px; font: 600 var(--t-sm) var(--font); }

@media (max-width: 1080px) {
  .menu-btn { display: inline-flex; align-items: center; gap: 8px; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--sky); border-bottom: 1px solid var(--rule);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; font-size: var(--t-md); border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--river); background: transparent; }
  /* In the phone menu, Records opens in place as an indented list. */
  .nav-group summary { padding: 14px 8px; font-size: var(--t-md); border-bottom: 1px solid var(--rule); border-radius: 0; justify-content: space-between; }
  .nav-group.current summary { box-shadow: none; background: transparent; }
  .nav-sub { position: static; min-width: 0; padding: 0 0 0 16px; border: 0; box-shadow: none; background: transparent; }
  .nav-sub a { padding: 12px 8px; }
}

/* ---------------------------------------------------------------- buttons, inputs */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: 700 var(--t-md) var(--font); text-decoration: none; cursor: pointer;
  padding: 12px 18px; border-radius: var(--radius); border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); min-height: 46px;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 85%, var(--river)); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper); }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: var(--t-sm); }
.btn svg { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 4px; font-size: var(--t-sm); font-weight: 600; color: var(--ink-2); }
.input, select.input {
  font: 500 var(--t-md) var(--font); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--rule); border-radius: var(--radius);
  padding: 10px 12px; min-height: 46px; width: 100%;
}
.input:focus { border-color: var(--river); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--river) 25%, transparent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 var(--t-sm) var(--font); color: var(--ink-2);
  background: var(--paper); border: 1.5px solid var(--rule); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; min-height: 38px;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .count { font-weight: 500; opacity: .7; }

/* ---------------------------------------------------------------- sections */
section { padding: clamp(48px, 7vw, 88px) 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 28px; }
.section-head p { margin: 0; color: var(--ink-2); }
.band { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* ---------------------------------------------------------------- hero */
.hero { padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero h1 { margin-bottom: .35em; }
.hero .hero-note { margin: 18px 0 0; max-width: 58ch; font-weight: 600; color: var(--ink); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.countdown {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 999px;
  padding: 6px 14px 6px 8px; font-weight: 600; font-size: var(--t-sm);
}
.countdown b { background: var(--ink); color: var(--paper); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  /* One column on phones, with the receipt straight after the headline so the numbers are on
     the first screen. The text column's children join the flex flow so they can be reordered. */
  .hero .wrap { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero .wrap > div:first-child { display: contents; }
  .hero .countdown { align-self: flex-start; }
  .hero .receipt-slot { order: 1; margin: 8px 0 28px; }
  .hero .lede, .hero .hero-note, .hero .actions { order: 2; }
  .hero .lede { margin-top: 0; }
}

/* ---------------------------------------------------------------- receipt (hero) */
.receipt-slot { position: relative; padding-top: 14px; }
.receipt-slot::before { /* the printer slot the receipt feeds out of */
  content: ""; position: absolute; top: 0; left: -10px; right: -10px; height: 14px;
  background: var(--ink); border-radius: 8px 8px 3px 3px;
}
.receipt {
  position: relative; background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: .95rem; line-height: 1.55;
  padding: 26px 24px 34px;
  box-shadow: var(--shadow);
  -webkit-mask: radial-gradient(circle at 8px 100%, transparent 7px, #000 7.5px) 0 0 / 16px 100% repeat-x;
          mask: radial-gradient(circle at 8px 100%, transparent 7px, #000 7.5px) 0 0 / 16px 100% repeat-x;
  transform-origin: top center;
}
.receipt h2 { font-family: var(--mono); font-size: 1rem; font-weight: 600; letter-spacing: .02em; margin: 0 0 2px; font-variation-settings: normal; }
.receipt .r-sub { color: var(--ink-2); font-size: .85rem; margin: 0 0 14px; }
.receipt hr { border: 0; border-top: 1.5px dashed var(--rule); margin: 12px 0; }
.r-row { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; align-items: baseline; }
.r-row .r-was { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.r-row .r-now { font-weight: 600; text-align: right; min-width: 4.5ch; }
.r-row .r-chg { grid-column: 2 / 4; text-align: right; font-size: .82rem; color: var(--ink-2); margin-top: -4px; }
.r-total { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: 1.05rem; }
.r-total .big { font-family: var(--font); font-size: 2.4rem; font-weight: 850; font-variation-settings: "wdth" 72; letter-spacing: -.02em; }
.r-foot { color: var(--ink-2); font-size: .8rem; margin-top: 12px; }
.receipt.stale { opacity: .45; transition: opacity .2s; }
.r-barcode { height: 34px; margin-top: 14px; background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px, var(--ink) 8px 11px, transparent 11px 12px); opacity: .85; }

@media (prefers-reduced-motion: no-preference) {
  .receipt.printing { animation: print 1.6s cubic-bezier(.25, .7, .2, 1) both .15s; }
  .receipt.printing .hl-draw { animation: draw .7s ease-out both 1.65s; }
  @keyframes print { from { clip-path: inset(0 0 100% 0); transform: translateY(-14px); } to { clip-path: inset(0 0 0 0); transform: none; } }
  @keyframes draw { from { background-size: 0% 62%; } to { background-size: 100% 62%; } }
}

/* ---------------------------------------------------------------- category explorer */
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cat {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  display: grid; grid-template-rows: auto auto 1fr auto; gap: 6px;
  background: var(--paper); border: 1.5px solid var(--rule); border-radius: var(--radius);
  padding: 18px 18px 16px; min-height: 196px; position: relative;
  transition: border-color .15s, transform .15s;
}
.cat:hover { border-color: var(--ink); }
.cat[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.cat .icon { width: 34px; height: 34px; color: var(--river); }
.cat .cat-name { font-weight: 800; font-size: var(--t-lg); font-variation-settings: "wdth" 88; line-height: 1.15; margin-top: 6px; }
.cat .cat-blurb { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.4; }
.cat .cat-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--rule); font-size: var(--t-sm); }
.cat .cat-meta strong { font-size: 1.15rem; font-variation-settings: "wdth" 80; font-weight: 850; }
@media (max-width: 980px) { .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .cats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cat { min-height: 0; padding: 14px; grid-template-rows: auto auto auto; }
  .cat .cat-blurb { display: none; }
  .cat .icon { width: 28px; height: 28px; }
  .cat .cat-name { font-size: 1.05rem; }
}

/* ---------------------------------------------------------------- finding slips */
.feed-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.feed-status { font-size: var(--t-sm); color: var(--ink-2); }
.feed { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 20px; align-items: start; }
.slip {
  margin: 0; display: block;
  background: var(--paper); box-shadow: var(--shadow);
  padding: 22px 22px 18px; position: relative;
  border-top: 3px dotted var(--sky);  /* perforation */
}
.slip-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; margin-bottom: 10px; }
.slip-cat { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; }
.slip-cat svg { width: 16px; height: 16px; color: var(--river); }
.slip-figure { font-size: clamp(2.2rem, 4.6vw, 3rem); font-weight: 850; font-variation-settings: "wdth" 70; line-height: 1; letter-spacing: -.02em; margin: 4px 0 4px; display: inline-block; }
.slip-figure-note { display: block; font-family: var(--mono); font-size: var(--t-xs); color: var(--ink-2); margin-bottom: 12px; }
.slip h3 { font-size: 1.28rem; font-variation-settings: "wdth" 92; margin-bottom: .45em; }
.slip h3 a { color: var(--ink); text-decoration: none; }
.slip h3 a:hover { text-decoration: underline; }
.slip p { color: var(--ink-2); margin-bottom: .8em; }
.slip details { border-top: 1px dashed var(--rule); margin-top: 10px; }
.slip summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.slip summary::-webkit-details-marker { display: none; }
.slip summary::after { content: "+"; font-family: var(--mono); font-size: 1.2rem; color: var(--ink-3); }
.slip details[open] summary::after { content: "–"; }
.slip ul { margin: 0 0 14px; padding-left: 1.1em; color: var(--ink); }
.slip li { margin-bottom: 4px; }
.slip .sub { font-weight: 700; font-size: var(--t-sm); margin: 12px 0 4px; color: var(--ink); }
.slip .other-side { background: var(--sky); padding: 10px 12px; border-radius: var(--radius); font-size: var(--t-sm); color: var(--ink-2); margin-bottom: 12px; }
.ask { background: var(--sky); border-radius: var(--radius); padding: 10px 12px; margin: 6px 0 14px; }
.ask q { quotes: none; font-weight: 600; color: var(--ink); }
.ask-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; font-size: var(--t-sm); }
.ask-links a:first-child { font-weight: 700; }
/* "What the record doesn't show": a torn-off line of the receipt, in the record-check's status colour. */
.not-public { border-block: 1.5px dashed var(--rule); padding: 10px 0 2px; margin: 4px 0 14px; }
.not-public b { display: block; font-family: var(--mono); font-size: var(--t-xs); font-weight: 600; color: var(--wait); letter-spacing: .02em; margin-bottom: 4px; }
.not-public p { color: var(--ink); margin-bottom: .6em; }
.slip-sources { font-size: var(--t-sm); margin: 0 0 6px; padding: 0; list-style: none; }
.slip-sources li { margin-bottom: 2px; }
.slip-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px dashed var(--rule); margin-top: 8px; }
.slip-actions .explore { font-weight: 700; }

.slip-dates { font-family: var(--mono); font-size: var(--t-xs); color: var(--ink-2); margin: 10px 0 0; }
.notice, .correction { background: color-mix(in srgb, var(--hl) 28%, var(--paper)); border: 1px solid color-mix(in srgb, var(--hl) 70%, var(--rule)); padding: 10px 12px; border-radius: var(--radius); font-size: var(--t-sm); color: var(--ink); }
.corrections-log { list-style: none; padding: 0; }
.corrections-log li { padding: 12px 0; border-top: 1px dashed var(--rule); }

/* Compact cards in the home feed: the whole card links to the finding's own page. */
.feed .slip.compact { position: relative; display: flex; flex-direction: column; align-self: stretch; transition: box-shadow .15s, transform .15s; }
.slip.compact .slip-figure { font-size: clamp(1.9rem, 3.6vw, 2.4rem); }
.slip.compact h3 { font-size: 1.15rem; margin: 8px 0 .6em; }
.slip.compact .card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.slip.compact .card-link:focus-visible { outline: none; }
.slip.compact:has(.card-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.slip.compact:hover { box-shadow: 0 1px 0 rgba(22, 32, 42, .08), 0 14px 30px -14px rgba(22, 32, 42, .4); }
.slip.compact:hover h3 a { text-decoration: underline; }
.slip.compact .card-q { margin: auto 0 0; padding-top: 12px; border-top: 1px dashed var(--rule); font-size: var(--t-sm); color: var(--ink); font-weight: 600; }
.slip.compact .card-q::before { content: "The question: "; color: var(--ink-2); font-weight: 400; }
.feed { align-items: stretch; }
#feed { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.feed-more { margin: 24px 0 0; }
@media (prefers-reduced-motion: no-preference) { .slip.compact:hover { transform: translateY(-2px); } }

.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--t-xs); white-space: nowrap; }
.status svg { width: 14px; height: 14px; }
.status.not-asked { color: var(--flag); }
.status.asked { color: var(--wait); }
.status.answered { color: var(--ok); }
.confidence { display: inline-flex; align-items: center; gap: 5px; font-size: var(--t-xs); color: var(--ink-2); }
.confidence svg { width: 14px; height: 14px; }

.share { position: relative; display: inline-flex; gap: 6px; }
.share-menu {
  position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 5;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
  display: none; flex-direction: column; min-width: 200px; padding: 6px;
}
.share-menu.open { display: flex; }
.share-menu a, .share-menu button {
  font: 600 var(--t-sm) var(--font); text-align: left; color: var(--ink); text-decoration: none;
  background: none; border: 0; padding: 10px 10px; border-radius: 4px; cursor: pointer;
}
.share-menu a:hover, .share-menu button:hover { background: var(--sky); }

.empty { background: var(--paper); padding: 32px; text-align: center; border: 1.5px dashed var(--rule); }

/* ---------------------------------------------------------------- method steps (a real sequence) */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding-top: 52px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; font-weight: 850;
}
.steps h3 { margin-bottom: .35em; }
.steps p { color: var(--ink-2); margin: 0; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 20px; } }

/* ---------------------------------------------------------------- approve / disapprove (assets/votes.js) */
/* Same blue and amber as Yes and No in the council vote grid, so the colours mean one thing site-wide. */
.vote-box { position: relative; z-index: 2; margin: 12px 0 4px; }
.v-bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--sky-2); gap: 2px; }
.v-bar.v-empty { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rule); }
.v-yes { background: var(--river); transition: width .35s cubic-bezier(.2, .7, .2, 1); }
.v-no { background: var(--sand); transition: width .35s cubic-bezier(.2, .7, .2, 1); }
.v-yes[style*="width:0%"], .v-no[style*="width:0%"] { display: none; }
.v-counts { display: flex; justify-content: space-between; gap: 8px; max-width: none; margin: 6px 0 10px; font-family: var(--mono); font-size: var(--t-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.v-counts b { color: var(--ink); font-weight: 600; }
.v-counts > span { white-space: nowrap; }
.v-counts .v-t { text-align: center; }
@media (max-width: 480px) { .v-counts .v-t { display: none; } }
.v-counts .v-d { text-align: right; }
.v-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.v-btn {
  min-height: 44px; padding: 8px 12px; border-radius: var(--radius); cursor: pointer;
  font: 700 var(--t-sm) var(--font); color: var(--ink); background: var(--paper); border: 1.5px solid var(--rule);
  transition: background-color .15s, border-color .15s;
}
.v-btn:hover:not(:disabled) { border-color: var(--ink-2); }
.v-btn:disabled { cursor: default; color: var(--ink-3); }
.v-approve[aria-pressed="true"] { background: color-mix(in srgb, var(--river) 18%, var(--paper)); border-color: var(--river); color: var(--river-ink); }
.v-disapprove[aria-pressed="true"] { background: color-mix(in srgb, var(--sand) 22%, var(--paper)); border-color: var(--sand); color: var(--sand-ink); }
.v-note { font-size: var(--t-xs); color: var(--ink-2); margin: 8px 0 0; }
.v-error { font-size: var(--t-sm); color: var(--flag); font-weight: 600; margin: 8px 0 0; }
.vote-box.compact { margin-top: 12px; }
.vote-box.compact .v-btn { min-height: 40px; }
@media (prefers-reduced-motion: reduce) { .v-yes, .v-no { transition: none; } }

/* ---------------------------------------------------------------- home: tally, method slip, tools */
.home-tally { display: flex; flex-wrap: wrap; gap: 6px 22px; max-width: none; margin: 0 0 48px; padding: 12px 0; border-block: 1.5px dashed var(--rule); font-family: var(--mono); font-size: var(--t-sm); color: var(--ink-2); }
.home-tally b { color: var(--ink); font-weight: 600; }
.method-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.method-receipt { -webkit-mask: none; mask: none; max-width: 560px; }
.method-receipt h3 { font-family: var(--mono); font-size: 1rem; font-weight: 600; margin: 0 0 2px; font-variation-settings: normal; }
.method-lines { list-style: none; margin: 0; padding: 0; }
.method-lines li { display: grid; grid-template-columns: 2ch minmax(0, 1fr); gap: 14px; padding: 10px 0; }
.method-lines li + li { border-top: 1px dashed var(--rule); }
.method-lines .m-n { font-weight: 600; color: var(--ink-2); }
.method-lines b { display: block; font-weight: 600; color: var(--ink); }
.method-lines span:not(.m-n) { display: block; color: var(--ink-2); font-size: .88rem; line-height: 1.5; }
@media (max-width: 860px) { .method-grid { grid-template-columns: 1fr; } }
.tool-list { list-style: none; margin: 0; padding: 4px 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.tool-list li { display: grid; grid-template-columns: minmax(10rem, .4fr) minmax(0, 1fr); gap: 4px 24px; align-items: baseline; padding: 14px 0; }
.tool-list li + li { border-top: 1px dashed var(--rule); }
.tool-list a { font-weight: 750; font-size: var(--t-lg); font-variation-settings: "wdth" 90; text-underline-offset: .2em; }
.tool-list span { color: var(--ink-2); font-size: var(--t-sm); }
@media (max-width: 640px) { .tool-list li { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- stat strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 8px 0 36px; }
.stat { padding: 18px 20px 18px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--rule); }
.stat .v { font-size: 2.3rem; font-weight: 850; font-variation-settings: "wdth" 72; letter-spacing: -.02em; line-height: 1.05; }
.stat .l { color: var(--ink-2); font-size: var(--t-sm); }
@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat, .stat + .stat { padding: 14px 12px 14px 0; border-left: 0; }
  .stat:nth-child(even) { padding-left: 12px; border-left: 1px solid var(--rule); }
  .stat .v { font-size: 1.8rem; }
}

/* ---------------------------------------------------------------- panels & charts */
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); margin-bottom: 24px; }
.panel h2 { font-size: var(--t-xl); }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; align-items: baseline; margin-bottom: 8px; }
.panel-head p { margin: 0; }
.chart { position: relative; width: 100%; margin-top: 12px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--ink-2); font-size: 12px; }
.chart .value-label { fill: var(--ink); font-weight: 700; }
.chart .axis line, .chart .grid line { stroke: var(--rule); }
.chart .baseline { stroke: var(--ink-3); }
.chart .mark { cursor: default; }
.chart .hit { fill: transparent; }
.chart .hit:hover + .mark, .chart .mark.active { filter: brightness(1.12); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: var(--t-sm); color: var(--ink-2); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 10;
  background: var(--ink); color: var(--paper); font-size: var(--t-sm); line-height: 1.35;
  padding: 8px 10px; border-radius: 4px; max-width: 260px; opacity: 0; transform: translateY(4px);
  transition: opacity .08s, transform .08s;
}
.tooltip.show { opacity: 1; transform: none; }
.tooltip b { display: block; }
details.table-view { margin-top: 10px; font-size: var(--t-sm); }
details.table-view summary { cursor: pointer; color: var(--river-ink); font-weight: 600; }
.note { font-size: var(--t-sm); color: var(--ink-2); background: var(--sky); border-radius: var(--radius); padding: 12px 14px; margin-top: 14px; max-width: 64ch; }
.note strong { color: var(--ink); }

/* ---------------------------------------------------------------- data tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.panel .table-wrap { border: 0; border-radius: 0; } /* the panel is already the container */
table.data { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data th { position: sticky; top: 0; background: var(--paper); font-weight: 700; color: var(--ink-2); white-space: nowrap; z-index: 1; }
table.data th button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
table.data th button:hover { color: var(--ink); }
table.data th[aria-sort="ascending"] button::after { content: "▲"; font-size: .7em; }
table.data th[aria-sort="descending"] button::after { content: "▼"; font-size: .7em; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr:hover td { background: color-mix(in srgb, var(--sky) 55%, transparent); }
table.data .up { color: var(--ink); font-weight: 700; }
.tag { display: inline-block; font-size: var(--t-xs); font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--sky); color: var(--ink-2); margin: 2px 4px 0 0; white-space: nowrap; }
.tag.flag { background: color-mix(in srgb, var(--hl) 70%, transparent); color: var(--hl-ink); }

/* expenses explorer */
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 12px; align-items: end; }
@media (max-width: 860px) { .filters { grid-template-columns: 1fr 1fr; } .filters .field:first-child { grid-column: 1 / -1; } }
.flag-row { margin-top: 14px; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 22px 0 12px; }
.results-bar .sum { font-size: var(--t-lg); font-weight: 700; font-variation-settings: "wdth" 90; }
.results-bar .sum .hl { font-weight: 850; }
.exp-desc { max-width: 46ch; }
.exp-who { color: var(--ink-2); font-size: var(--t-xs); }
@media (max-width: 760px) {
  table.data.stack thead { display: none; }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td { display: block; width: 100%; }
  table.data.stack tr { padding: 12px 14px; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
  table.data.stack td { border: 0; padding: 0; }
  table.data.stack td.num { grid-column: 2; grid-row: 1; font-weight: 800; font-size: var(--t-md); }
  table.data.stack td.c-date { grid-column: 1; grid-row: 1; color: var(--ink-2); font-size: var(--t-xs); }
  table.data.stack td.c-desc { grid-column: 1 / -1; }
  table.data.stack td.c-cat { grid-column: 1 / -1; }
}
.more { display: flex; justify-content: center; margin-top: 16px; }

/* council */
.vote { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.vote.spot { border: 2px solid var(--ink); }
.vote-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.vote-head h3 { margin: 0; font-size: 1.25rem; }
.vote-meta { font-size: var(--t-sm); color: var(--ink-2); margin: 4px 0 10px; }
.result { font-weight: 800; white-space: nowrap; }
.result.carried { color: var(--ok); }
.result.defeated { color: var(--ink-2); } /* red is for form errors, not outcomes */
.tally { display: flex; height: 10px; border-radius: 999px; overflow: hidden; margin: 10px 0 12px; gap: 2px; background: var(--paper); }
.tally .y { background: var(--river); }
.tally .n { background: var(--sand); }
.roll { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 8px; }
.roll div { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); padding: 5px 8px; border-radius: 4px; background: var(--sky); }
.roll div.me { outline: 2px solid var(--ink); }
.roll .yn { font-weight: 800; font-size: var(--t-xs); width: 30px; flex: none; }
.roll .yn.yes { color: var(--river-ink); }
.roll .yn.no { color: var(--sand-ink); }
.roll .yn.absent { color: var(--ink-3); }
.vote details summary { cursor: pointer; font-size: var(--t-sm); color: var(--river-ink); font-weight: 600; margin-top: 10px; }
.vote details p { font-size: var(--t-sm); color: var(--ink-2); margin-top: 8px; }

/* ---------------------------------------------------------------- footer */
.site-foot { background: var(--ink); color: var(--sky); padding: 48px 0 40px; margin-top: 40px; }
:root[data-theme="dark"] .site-foot { background: #0a1015; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .site-foot { background: #0a1015; } }
.site-foot a { color: inherit; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-foot h2 { font-size: 1rem; font-variation-settings: "wdth" 100; color: #fff; margin-bottom: 10px; }
.site-foot p, .site-foot li { font-size: var(--t-sm); color: #c3cdd5; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 6px; }
.social { display: flex; gap: 10px; margin-top: 12px; }
.social a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #3a4a58; border-radius: 50%; }
.social a:hover { background: #22303c; }
.social svg { width: 18px; height: 18px; }
.licence { border-top: 1px solid #2b3a47; margin-top: 32px; padding-top: 18px; font-size: var(--t-xs) !important; color: #9aa8b4 !important; max-width: none; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------------------------------------------------------------- page heads (inner pages) */
.page-head { padding-top: clamp(32px, 5vw, 56px); padding-bottom: 8px; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.crumbs { font-size: var(--t-sm); margin-bottom: 14px; }

/* single finding page */
.finding-page .slip { max-width: 760px; padding: clamp(22px, 4vw, 40px); }
.finding-page .slip h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-variation-settings: "wdth" 82; }
.finding-page .slip-figure { font-size: clamp(3rem, 8vw, 4.6rem); }

/* prose (about) */
.prose h2 { margin-top: 1.6em; font-size: var(--t-xl); }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; max-width: 62ch; }
.prose li { margin-bottom: .45em; }
.toc { position: sticky; top: 88px; font-size: var(--t-sm); }
.toc a { display: block; padding: 6px 0; color: var(--ink-2); text-decoration: none; border-left: 2px solid var(--rule); padding-left: 12px; }
.toc a:hover { color: var(--ink); border-color: var(--ink); }
.with-toc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; }
@media (max-width: 860px) { .with-toc { grid-template-columns: 1fr; } .toc { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .site-head, .site-foot, .slip-actions, .feed-tools { display: none; }
  body { background: #fff; }
  .slip { box-shadow: none; border: 1px solid #ccc; }
}

/* ---------------------------------------------------------------- what this means for you */
.mine { margin-top: 18px; }
.mine label { display: block; font-weight: 700; margin-bottom: 6px; }
.mine-row { display: flex; gap: 8px; }
.mine-row .input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.mine p { margin: 8px 0 0; }
.linklike { font: inherit; color: var(--river-ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.field-error { color: var(--flag); font-size: var(--t-sm); font-weight: 600; margin: 6px 0 0; }

.for-you { /* a line of the receipt, not a card inside the card */
  border-block: 1.5px dashed var(--rule); padding: 10px 0 10px 28px;
  margin: 4px 0 12px; position: relative; font-size: var(--t-sm); color: var(--ink);
}
.for-you::before { /* small lens, echoing the logo */
  content: ""; position: absolute; left: 0; top: 12px; width: 13px; height: 13px;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--hl);
}
.for-you::after { content: ""; position: absolute; left: 12px; top: 25px; width: 7px; height: 2.5px; background: var(--ink); transform: rotate(45deg); border-radius: 2px; }
.for-you b { display: block; font-size: var(--t-xs); color: var(--ink-2); font-weight: 700; margin-bottom: 2px; }
.for-you p { margin: 0 0 4px; color: var(--ink); max-width: none; }
.for-you .amt { font-weight: 800; }
.for-you a { font-weight: 600; }

/* your bill page */
.bill-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .bill-grid { grid-template-columns: 1fr; } }
.presets { margin: 10px 0 4px; }
.advanced { margin-top: 14px; font-size: var(--t-sm); }
.advanced summary { cursor: pointer; color: var(--river-ink); font-weight: 600; }
.advanced .field { margin-top: 10px; }
.share-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.share-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.share-list .what a { font-weight: 700; color: var(--ink); text-decoration: none; }
.share-list .what a:hover { text-decoration: underline; }
.share-list .what span { display: block; color: var(--ink-2); font-size: var(--t-sm); }
.share-list .amt { font-weight: 850; font-size: 1.3rem; font-variation-settings: "wdth" 78; text-align: right; white-space: nowrap; }
.actions-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 14px; }
.actions-list li { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.actions-list h3 { font-size: 1.1rem; margin: 0; }
.actions-list p { color: var(--ink-2); font-size: var(--t-sm); margin: 0; flex: 1; }
.actions-list a.btn { align-self: flex-start; margin-top: 8px; }
textarea.input { min-height: 180px; resize: vertical; line-height: 1.5; font-size: var(--t-sm); }

/* ---------------------------------------------------------------- open questions */
.q-group { padding: 8px 0 28px; }
.q-group h2 { display: flex; align-items: center; gap: 10px; font-size: var(--t-xl); margin: 0 0 14px; }
.q-group h2 .icon { width: 28px; height: 28px; color: var(--river); flex: none; }
.q-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.q {
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px 14px; scroll-margin-top: 90px;
}
.q:target { outline: 2px solid var(--ink); outline-offset: 2px; }
.q-text { font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 750; font-variation-settings: "wdth" 90; line-height: 1.3; color: var(--ink); margin: 0 0 8px; max-width: 60ch; }
.q-from { font-size: var(--t-sm); color: var(--ink-2); margin: 0 0 10px; }
.q-from .tag { margin-left: 4px; }
.q-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--rule); }
.q-teaser { list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.q-teaser .q { padding: 16px 18px; }
.q-teaser .q-text { font-size: 1.1rem; }

/* ---------------------------------------------------------------- what's public, and what isn't */
.record-check { padding-top: 0; }
.record-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .record-grid { grid-template-columns: 1fr; } }
.record-receipt { -webkit-mask: none; mask: none; border-bottom: 3px dotted var(--sky); }
.record-receipt h3 { font-family: var(--mono); font-size: 1rem; font-weight: 600; margin: 0 0 2px; font-variation-settings: normal; }
.records { list-style: none; margin: 0; padding: 0; }
.records li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: baseline; padding: 9px 0; }
.records li + li { border-top: 1px dashed var(--rule); }
.records li.group-start { border-top: 1.5px dashed var(--ink-3); margin-top: 4px; padding-top: 13px; }
.rec-name { font-weight: 600; color: var(--ink); }
.rec-name a { color: var(--ink); }
.rec-note { grid-column: 1 / -1; font-size: .82rem; color: var(--ink-2); line-height: 1.45; }
.rec-note a { color: var(--river-ink); white-space: nowrap; }
.rec-status { font-weight: 600; font-size: .85rem; white-space: nowrap; text-align: right; }
.rec-status.published { color: var(--ok); }
.rec-status.partly, .rec-status.not-public { color: var(--wait); }
.rec-foot { margin: 6px 0 0; font-size: .9rem; }
.rec-foot a { font-weight: 600; }

/* ---------------------------------------------------------------- where your City tax goes (you.html#split) */
.split-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .split-grid { grid-template-columns: 1fr; } }
.split-intro .lede { margin-top: 8px; }
.split-notes { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; max-width: 52ch; color: var(--ink-2); font-size: var(--t-sm); }
.split-notes li { padding-top: 14px; border-top: 1px dashed var(--rule); }
.split-receipt h3 { font-family: var(--mono); font-size: 1rem; font-weight: 600; letter-spacing: .02em; margin: 0 0 2px; font-variation-settings: normal; }
.split-list { list-style: none; margin: 0; padding: 0; }
.split-list > li + li { border-top: 1px dotted var(--rule); }
.split-loading { color: var(--ink-2); padding: 10px 0; }
.sp-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: baseline; padding: 11px 0; }
summary.sp-row { cursor: pointer; list-style: none; }
summary.sp-row::-webkit-details-marker { display: none; }
.sp-name { font-weight: 600; padding-left: 2ch; text-indent: -2ch; }
.sp-name::before { content: ""; display: inline-block; width: 2ch; color: var(--ink-3); }
summary.sp-row .sp-name::before { content: "+"; }
details[open] > summary.sp-row .sp-name::before { content: "−"; }
summary.sp-row:hover .sp-name { text-decoration: underline; text-underline-offset: 3px; }
.sp-amt { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.sp-bar { grid-column: 1 / -1; height: 6px; margin-left: 2ch; background: var(--sky); border-radius: 3px; overflow: hidden; }
.sp-bar i { display: block; height: 100%; background: var(--river); border-radius: 3px; }
.sp-pct { grid-column: 1 / -1; margin-left: 2ch; font-size: .8rem; color: var(--ink-2); line-height: 1.4; }
.sp-sub { list-style: none; margin: 0 0 12px 2ch; padding: 8px 0 0; border-top: 1px dashed var(--rule); font-size: .85rem; color: var(--ink-2); }
.sp-sub li { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; }
.sp-sub li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.split-total { font-family: var(--font); font-size: 1.9rem; font-weight: 850; font-variation-settings: "wdth" 72; letter-spacing: -.02em; }
@media (min-width: 861px) { .split-intro { position: sticky; top: 96px; } }

/* ---------------------------------------------------------------- budget debate tracker (debate.html) */
.debate-grid { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (min-width: 901px) { .debate-side { position: sticky; top: 96px; } }
@media (max-width: 900px) { .debate-grid { grid-template-columns: 1fr; } }
.d-day + .d-day { margin-top: 28px; }
.d-day h3 { font-size: var(--t-md); font-variation-settings: "wdth" 100; color: var(--ink-2); margin: 0 0 10px; }
.d-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.d-item { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; }
.d-title { font-weight: 750; font-size: var(--t-lg); font-variation-settings: "wdth" 90; line-height: 1.25; margin: 0 0 4px; }
.d-meta, .d-note { color: var(--ink-2); font-size: var(--t-sm); margin: 0 0 4px; }
.d-note { font-style: italic; }
.d-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.d-result { font-weight: 700; font-size: var(--t-sm); white-space: nowrap; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--ink); }
.d-result.passed { background: var(--ink); color: var(--paper); }
.d-result.defeated { color: var(--ink); }
.d-result.referred, .d-result.withdrawn { border-style: dashed; color: var(--ink-2); border-color: var(--ink-3); }
.d-impact { font-weight: 850; font-size: 1.5rem; font-variation-settings: "wdth" 72; letter-spacing: -.01em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.d-impact small { display: block; font: 500 var(--t-xs) var(--font); color: var(--ink-2); letter-spacing: 0; }
.d-item[data-result="defeated"], .d-item[data-result="withdrawn"] { background: transparent; }
@media (max-width: 560px) {
  .d-item { grid-template-columns: 1fr; }
  .d-side { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
  .d-impact { text-align: right; }
}

/* ---------------------------------------------------------------- site search (search.html, header button) */
.search-big { display: flex; gap: 10px; margin-top: 20px; max-width: 720px; }
.search-big .input { flex: 1; min-width: 0; font-size: var(--t-lg); padding: 14px 16px; }
.search-try { align-items: center; margin: 14px 0 6px; }
.search-try .chip { text-decoration: none; }
#s-status { margin: 22px 0 10px; font-size: var(--t-md); color: var(--ink); font-weight: 600; }
.s-jump { margin-bottom: 26px; }
.s-jump .chip { text-decoration: none; }
.s-group { padding: 0 0 30px; scroll-margin-top: 88px; }
.s-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin-bottom: 4px; }
.s-head h2 { font-size: var(--t-xl); margin: 0; }
.s-head .count { font-size: var(--t-md); font-weight: 600; color: var(--ink-2); margin-left: 4px; }
.s-list { list-style: none; margin: 0 0 14px; padding: 0; }
.s-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.s-list p { margin: 4px 0 0; color: var(--ink-2); font-size: var(--t-sm); max-width: 75ch; }
.s-title { font-weight: 700; color: var(--ink); }
a.s-title { text-decoration: none; }
a.s-title:hover { text-decoration: underline; }
.s-amt { float: right; font-weight: 700; font-variant-numeric: tabular-nums; margin-left: 12px; }
mark { background: var(--hl); color: var(--hl-ink); padding: 0 1px; border-radius: 2px; }
.search-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: var(--t-sm); padding: 8px 10px; border-radius: var(--radius); white-space: nowrap; }
.search-btn:hover { color: var(--ink); background: var(--sky-2); }
.search-btn[aria-current="page"] { color: var(--ink); background: var(--paper); box-shadow: inset 0 -2px 0 var(--river); }
.search-btn svg { width: 18px; height: 18px; }
@media (max-width: 1260px) {
  .search-btn { order: 1; margin-left: auto; background: var(--paper); border: 1px solid var(--rule); }
  .menu-btn { order: 2; margin-left: 0; }
}
@media (max-width: 420px) { .search-btn .label { display: none; } .search-btn { padding: 8px 10px; } }

/* ---------------------------------------------------------------- ward pages (ward.html) */
.ward-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .ward-pick { grid-template-columns: 1fr; } .ward-map-wrap { max-width: 320px; } }
.ward-map { width: 100%; height: auto; display: block; max-height: 640px; }
.ward-map path { fill: var(--paper); stroke: var(--ink-3); stroke-width: 1.2; stroke-linejoin: round; transition: fill .15s; }
.ward-map a:hover path, .ward-map a:focus-visible path { fill: var(--sky-2); }
.ward-map a[aria-current="true"] path { fill: var(--hl); stroke: var(--ink); stroke-width: 2; }
.ward-map a:focus-visible { outline: none; }
.ward-map a:focus-visible path { stroke: var(--focus); stroke-width: 3; }
.ward-map text { font: 800 15px var(--font); fill: var(--ink); text-anchor: middle; pointer-events: none; }
.ward-map a[aria-current="true"] text { fill: var(--hl-ink); }
.ward-find-h { font-size: var(--t-xl); margin: 0 0 12px; }
.ward-or { font-weight: 700; margin: 22px 0 8px; }
.ward-addr .field { margin-bottom: 4px; }
.addr-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ward-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 6px; }
.ward-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--t-sm); }
.ward-list a:hover { border-color: var(--ink-3); }
.ward-list a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ward-list .wn { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--sky); color: var(--ink); font-weight: 800; font-size: .85rem; }
.ward-list a[aria-current="true"] .wn { background: var(--hl); color: var(--hl-ink); }
.ward-detail { margin-top: 36px; scroll-margin-top: 72px; }
.ward-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; margin-bottom: 20px; }
.ward-head h2 { margin: 0; font-size: var(--t-2xl); }
.ward-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ward-cols { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); }
@media (max-width: 860px) { .ward-cols { grid-template-columns: 1fr; } }
.ward-cols h3 { margin: 0 0 6px; }
.w-votes { list-style: none; margin: 12px 0 16px; padding: 0; }
.w-votes li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.w-vote { font-weight: 700; font-size: var(--t-sm); text-align: center; padding: 2px 8px; border-radius: 999px; border: 1.5px solid var(--ink); white-space: nowrap; }
.w-vote.yes { background: var(--ink); color: var(--paper); }
.w-vote.no { color: var(--ink); }
.w-vote.absent { border-style: dashed; border-color: var(--ink-3); color: var(--ink-2); font-weight: 600; }
.w-vote-title { display: block; font-weight: 600; }
.w-comms { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.w-comms li { font-size: var(--t-sm); padding: 3px 10px; border-radius: 999px; background: var(--sky); }
.w-more { margin: -8px 0 16px; }
.w-more summary { cursor: pointer; font-weight: 700; font-size: var(--t-sm); color: var(--river-ink); padding: 8px 0; }
.w-more .w-votes { margin-top: 0; }

/* ---------------------------------------------------------------- budget basics (basics.html) */
.basics { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; padding-top: 24px; padding-bottom: 56px; }
.basics-toc { position: sticky; top: 88px; font-size: var(--t-sm); }
.basics-toc .toc-h { font-weight: 800; margin: 0 0 8px; }
.basics-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.basics-toc a { display: block; padding: 5px 0 5px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.basics-toc a:hover { color: var(--ink); }
.basics-toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--river); }
@media (max-width: 860px) {
  .basics { grid-template-columns: 1fr; }
  .basics-toc { position: static; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; }
  .basics-toc ol { columns: 2; column-gap: 20px; border: 0; }
  .basics-toc a { padding: 4px 0; border: 0; margin: 0; }
}
@media (max-width: 420px) { .basics-toc ol { columns: 1; } }
.basics-body { max-width: 62ch; }
.basics-body section { padding: 0 0 40px; scroll-margin-top: 88px; }
.basics-body section + section { padding-top: 36px; border-top: 1px dashed var(--rule); }
.basics-body h2 { font-size: var(--t-2xl); margin: 0 0 12px; }
.basics-body h3 { font-size: var(--t-lg); margin: 0 0 6px; }
.basics-body p, .basics-body li, .basics-body dd { line-height: 1.6; }
.basics-body ul { padding-left: 1.2em; }
.basics-body li + li { margin-top: 6px; }
.basics-body .src { font-size: var(--t-sm); color: var(--ink-2); margin-top: 14px; }
.formula { font-family: var(--mono); background: var(--paper); box-shadow: var(--shadow); padding: 18px 22px; margin: 18px 0; max-width: 460px; font-size: .95rem; }
.formula .f-sub { color: var(--ink-2); font-size: .85rem; margin: 0 0 10px; }
.f-row { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; font-variant-numeric: tabular-nums; }
.f-row.f-total { border-top: 1.5px dashed var(--rule); margin-top: 6px; padding-top: 9px; font-weight: 600; }
.f-row.f-total span:last-child { background: var(--hl); color: var(--hl-ink); padding: 0 6px; }
.f-row.f-note { color: var(--ink-2); font-size: .85rem; }
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 8px 0 16px; }
.two-up > div { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; }
.two-up p { margin: 0; }
@media (max-width: 560px) { .two-up { grid-template-columns: 1fr; } }
.split-bars { margin: 16px 0; display: grid; gap: 6px; max-width: 520px; }
.sb-row { display: grid; grid-template-columns: 3.2em 1fr; gap: 10px; align-items: center; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.sb { display: block; height: 26px; background: var(--sky-2); border-radius: 4px; overflow: hidden; }
.sb i { display: flex; align-items: center; height: 100%; padding-left: 8px; background: var(--river); color: var(--paper); font-style: normal; font-weight: 700; font-size: .8rem; white-space: nowrap; border-radius: 4px 0 0 4px; }
.steps-list { padding-left: 1.3em; }
.glossary { margin: 0; }
.glossary dt { font-weight: 800; margin-top: 16px; scroll-margin-top: 88px; }
.glossary dd { margin: 4px 0 0; color: var(--ink-2); }
.glossary dt:target { background: var(--hl); color: var(--hl-ink); display: inline-block; padding: 0 4px; }
.f-row span:last-child { white-space: nowrap; text-align: right; }

/* ---------------------------------------------------------------- how Calgary compares (compare.html) */
.compare-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.stat.cmp { display: flex; flex-direction: column; gap: 4px; }
.cmp-label { margin-bottom: 4px; }
.cmp-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; }
.cmp-row .v { font-size: 1.9rem; }
.cmp-row.muted span:last-child { font-weight: 700; font-size: 1.15rem; color: var(--ink-2); }
.cmp-city { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; }
.cmp-city i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.cmp-rel { font-size: var(--t-xs); color: var(--ink-2); margin-top: 4px; }
.growth { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px 28px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--rule); }
.growth p { margin: 6px 0 0; font-size: var(--t-sm); color: var(--ink-2); }
#method ul { margin: 0 0 10px; padding-left: 1.2em; }
#method li + li { margin-top: 6px; }
@media (max-width: 560px) { .compare-stats .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); } }
