/* Layout: an election atlas. The hero is a topographic sheet of New Zealand
   on the real NZTM2000 grid, with coastline contour lines, lakes and a
   Chatham Islands inset. As on a printed map, the countdown sits in the
   Tasman Sea and the party key sits in open water. Below it, sections are
   set on map paper, with figures drawn on white plates. Archivo throughout:
   wide cuts for headings, condensed cuts for big figures. Party colours
   appear only as data; the site's own accent is the magenta charts use for
   overprints, which no party uses. Dark mode is a night chart. */
:root {
  --paper: #F3F5F1;       /* map paper */
  --panel: #FFFFFF;       /* plates */
  --panel-2: #E8EEEA;     /* tracks, shaded cells */
  --sea: #D3E5E3;         /* glacial water */
  --sea-line: #86B5B2;    /* coastline contour lines */
  --land: #FCFDF9;
  --contour: #C08A55;     /* contours on land */
  --ink: #17201E;
  --ink-2: #39443F;
  --muted: #5B6863;
  --line: #D4DDD9;
  --line-2: #AFC0BB;
  --grid: rgb(23 32 30 / 0.085);
  --accent: #C2136C;      /* survey magenta */
  --accent-2: #9E0F58;
  --accent-ink: #FFFFFF;
  --accent-soft: #FBE3EF;
  --band: #17201E;
  --band-ink: #F3F5F1;
  --notice-bg: #FFF2C2;
  --notice-ink: #4A3800;
  --focus: #C2136C;
  --pop: 0 14px 36px -14px rgb(23 32 30 / 0.45);

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --xwide: 125%;
  --wide: 112%;
  --semi: 90%;
  --cond: 70%;
  --xcond: 62%;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.1875rem;
  --t-xl: 1.5rem;
  --t-2xl: clamp(1.6rem, 1.15rem + 1.5vw, 2.1rem);

  --radius: 4px;
  --wrap: 76rem;
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D1413;
    --panel: #15201F;
    --panel-2: #1D2B29;
    --sea: #0E2224;
    --sea-line: #2F6264;
    --land: #152120;
    --contour: #9C7449;
    --ink: #E6EEEA;
    --ink-2: #C3D0CB;
    --muted: #94A49F;
    --line: #263634;
    --line-2: #3B504D;
    --grid: rgb(230 238 234 / 0.07);
    --accent: #FF6BAF;
    --accent-2: #FF94C4;
    --accent-ink: #1A0710;
    --accent-soft: #3A1A2B;
    --band: #1B2927;
    --band-ink: #E6EEEA;
    --notice-bg: #3A3212;
    --notice-ink: #FFE7A6;
    --focus: #FF6BAF;
    --pop: 0 16px 40px -12px rgb(0 0 0 / 0.8);
    color-scheme: dark;
  }
  :root:not([data-theme="light"]) .p { --pc: var(--pd); }
}
:root[data-theme="dark"] {
  --paper: #0D1413;
  --panel: #15201F;
  --panel-2: #1D2B29;
  --sea: #0E2224;
  --sea-line: #2F6264;
  --land: #152120;
  --contour: #9C7449;
  --ink: #E6EEEA;
  --ink-2: #C3D0CB;
  --muted: #94A49F;
  --line: #263634;
  --line-2: #3B504D;
  --grid: rgb(230 238 234 / 0.07);
  --accent: #FF6BAF;
  --accent-2: #FF94C4;
  --accent-ink: #1A0710;
  --accent-soft: #3A1A2B;
  --band: #1B2927;
  --band-ink: #E6EEEA;
  --notice-bg: #3A3212;
  --notice-ink: #FFE7A6;
  --focus: #FF6BAF;
  --pop: 0 16px 40px -12px rgb(0 0 0 / 0.8);
  color-scheme: dark;
}
:root[data-theme="dark"] .p { --pc: var(--pd); }

/* Party colour: --pl (light) / --pd (dark) are set inline per party. */
.p { --pc: var(--pl); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 0.75rem; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.55;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--paper);
}
::selection { background: var(--accent-soft); }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 32px);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ── Bookmark reminder (very top) ───────────────────────────── */
.bookmark { background: var(--band); color: var(--band-ink); }
.bookmark-row { display: flex; align-items: center; gap: 0.55rem 0.75rem; padding-block: 0.6rem; flex-wrap: wrap; }
.bm-icon { flex: none; width: 1.25rem; height: 1.25rem; color: var(--accent); }
.bookmark-text { flex: 1 1 10.5rem; min-width: 0; font-size: var(--t-sm); line-height: 1.4; }
@media (max-width: 29.99rem) { #bm-hint { display: none; } }
.bookmark-text strong { font-weight: 700; font-stretch: var(--wide); }
.bookmark-text span { opacity: 0.82; }
.bm-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.bm-btn {
  font-size: var(--t-sm);
  font-weight: 650;
  color: var(--band-ink);
  background: transparent;
  border: 1.5px solid color-mix(in srgb, var(--band-ink) 55%, transparent);
  border-radius: 6px;
  padding: 0.4rem 0.85rem;
  min-height: 2.25rem;
  cursor: pointer;
  white-space: nowrap;
}
.bm-btn:hover { border-color: var(--band-ink); }
.bm-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bm-btn.ghost { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; }
.bm-panel { padding-block: 0 0.9rem; font-size: var(--t-sm); display: grid; gap: 0.7rem; }
.bm-panel ol { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.25rem; }
.bm-status { font-size: var(--t-sm); min-height: 1.2em; }
.bm-status:empty { display: none; }

/* ── Masthead, desktop nav ──────────────────────────────────── */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.mast-row { display: flex; align-items: center; gap: 0.75rem 1.5rem; min-height: 3.75rem; padding-block: 0.5rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); min-width: 0; margin-right: auto; }
.mark { flex: none; width: auto; height: 2.5rem; }
.mark path { fill: var(--ink); }
.mark circle { fill: var(--accent); stroke: var(--paper); stroke-width: 5; }
.logo-text { display: grid; line-height: 1.05; min-width: 0; }
#brand-name { font-size: 1.4rem; font-weight: 820; font-stretch: var(--xwide); letter-spacing: -0.02em; white-space: nowrap; }
.logo-text small { font-size: var(--t-xs); color: var(--muted); font-weight: 500; margin-top: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 29.99rem) { .mast-long { display: none; } }
@media (max-width: 22.49rem) { #brand-name { font-size: 1.2rem; } .mark { height: 2.15rem; } .chip-in { padding-inline: 0.7rem; } }
.nav { display: none; }
.chip-in {
  flex: none;
  display: inline-flex; align-items: center;
  min-height: 2.4rem; padding: 0.35rem 0.95rem;
  font-size: var(--t-sm); font-weight: 700; text-decoration: none;
  color: var(--accent); border: 1.5px solid currentColor; border-radius: 6px;
}
.chip-in:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

@media (min-width: 64rem) {
  html { scroll-padding-top: 5rem; }
  .masthead { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
  .mark { height: 2.75rem; }
  #brand-name { font-size: 1.55rem; }
  .logo { margin-right: 0; }
  .nav { display: block; margin-left: auto; min-width: 0; }
  .nav-links { display: flex; gap: 0.15rem; }
  .nav-links a {
    position: relative;
    text-decoration: none; white-space: nowrap;
    font-size: var(--t-sm); font-weight: 600; color: var(--ink-2);
    padding: 0.45rem 0.6rem; border-radius: 6px;
  }
  .nav-links a:hover { color: var(--ink); background: var(--panel-2); }
  .nav-links a[aria-current="true"] { color: var(--ink); }
  .nav-links a[aria-current="true"]::after { content: ""; position: absolute; left: 0.6rem; right: 0.6rem; bottom: -0.55rem; height: 3px; background: var(--accent); }
  .nav-links a.is-live::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.4rem; border-radius: 50%; background: var(--accent); vertical-align: 0.06em; }
}

/* ── Latest banner and election-day notice ──────────────────── */
.breaking { background: var(--accent-soft); border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.breaking a, .breaking > p {
  display: flex; gap: 0.75rem; align-items: baseline;
  width: 100%; max-width: calc(var(--wrap) + 32px); margin-inline: auto;
  padding: 0.65rem max(16px, env(safe-area-inset-right, 0px)) 0.65rem max(16px, env(safe-area-inset-left, 0px));
  text-decoration: none; font-weight: 650; line-height: 1.35;
}
.breaking a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.breaking b { flex: none; font-size: var(--t-xs); font-weight: 800; font-stretch: var(--wide); color: var(--accent-ink); background: var(--accent); border-radius: 3px; padding: 0.1rem 0.45rem; }
.notice { padding-block: 0.9rem 0; }
.notice p { background: var(--notice-bg); color: var(--notice-ink); padding: 0.85rem 1rem; font-size: var(--t-sm); border-radius: var(--radius); }

/* ── Hero: the map sheet ────────────────────────────────────── */
.hero { position: relative; overflow: hidden; background: var(--sea); border-bottom: 1px solid var(--line); }
.hero-in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "stack" "key" "sub";
}
.hero-copy { grid-area: stack; position: relative; z-index: 2; align-self: start; display: grid; justify-items: start; gap: 0.55rem; padding-top: 1rem; max-width: 12.5rem; }
.status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--t-sm); font-weight: 650; line-height: 1.25;
  background: var(--panel); color: var(--ink);
  padding: 0.3rem 0.7rem 0.3rem 0.55rem; border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line-2);
}
.pulse { flex: none; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 1.8s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: 0.3; } }
}
.hero h1 { font-size: 1.45rem; font-weight: 760; font-stretch: var(--wide); letter-spacing: -0.015em; }
.clock { display: grid; grid-template-columns: repeat(2, max-content); gap: 0.45rem 1.4rem; }
.clock div { display: grid; }
.clock span, .count b {
  font-size: clamp(3rem, 15.5vw, 4rem);
  font-weight: 800;
  font-stretch: var(--xcond);
  line-height: 0.86;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.clock small, .count small { font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); margin-top: 0.25rem; }
.count { display: grid; }
.hero-sub { grid-area: sub; position: relative; z-index: 2; color: var(--ink-2); max-width: 32rem; padding-block: 1rem 1.4rem; }
.hero-sub strong { color: var(--ink); }

.map {
  grid-area: stack;
  justify-self: end;
  position: relative;
  width: calc(100% + var(--gut-l) + var(--gut-r));
  max-width: 32rem;
  margin-right: calc(-1 * var(--gut-r));
  aspect-ratio: 1080 / 1500;
  pointer-events: none;
  user-select: none;
}
.nzmap { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.nzmap pattern path { fill: none; stroke: var(--grid); stroke-width: 2.4; }
.nzmap .sea-lines path { fill: none; stroke: var(--sea-line); stroke-width: 1.7; }
.nzmap .sea-lines .r2 { opacity: 0.78; }
.nzmap .sea-lines .r3 { opacity: 0.58; }
.nzmap .sea-lines .r4 { opacity: 0.4; }
.nzmap .sea-lines .r5 { opacity: 0.25; }
.nzmap .land { fill: var(--land); stroke: var(--ink); stroke-width: 2.3; stroke-linejoin: round; }
.nzmap .contours path { fill: none; stroke: var(--contour); stroke-width: 1.6; opacity: 0.6; }
.nzmap .lakes { fill: var(--sea); stroke: var(--sea-line); stroke-width: 1.4; }

/* Place names: dot plus name, set like map lettering */
.pl {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(0.45rem, -50%);
  font-size: 0.72rem; font-weight: 600; font-stretch: var(--semi); line-height: 1;
  color: var(--ink); white-space: nowrap;
  text-shadow: 0 0 3px var(--land), 0 0 2px var(--land);
}
.pl::before { content: ""; position: absolute; left: -0.62rem; top: 50%; width: 0.32rem; height: 0.32rem; margin-top: -0.16rem; border-radius: 50%; background: var(--ink); }
.pl-l { transform: translate(calc(-100% - 0.45rem), -50%); }
.pl-l::before { left: auto; right: -0.62rem; }
.pl-parl { font-weight: 800; }
.pl-parl::before { width: 0.62rem; height: 0.62rem; margin-top: -0.31rem; left: -0.78rem; background: var(--accent); box-shadow: 0 0 0 2px var(--land); }
.pl-parl::after { content: ""; position: absolute; left: -0.78rem; top: 50%; width: 0.62rem; height: 0.62rem; margin-top: -0.31rem; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  [data-phase="night"] .pl-parl::after { animation: ping 2.2s ease-out infinite; }
  @keyframes ping { 0% { opacity: 0.9; transform: scale(1); } 100% { opacity: 0; transform: scale(3.2); } }
}
.region {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%) rotate(var(--a));
  font-size: 0.58rem; font-weight: 700; font-stretch: var(--wide); letter-spacing: 0.32em; text-transform: uppercase; line-height: 1;
  color: var(--ink-2); white-space: nowrap;
  text-shadow: 0 0 2px var(--land), 0 0 3px var(--land), 0 0 4px var(--land);
}
@media (min-width: 48rem) { .region { font-size: 0.62rem; } }
.sea-name {
  position: absolute;
  font-size: 0.68rem; font-style: italic; font-weight: 500; font-stretch: var(--wide);
  letter-spacing: 0.28em; line-height: 1.5; text-transform: uppercase;
  color: color-mix(in srgb, var(--sea-line) 50%, var(--ink));
}
.sea-tasman { left: 1.5%; top: 63%; letter-spacing: 0.2em; }
.sea-pacific { left: 66%; top: 66%; width: 7rem; }
.inset { position: absolute; right: 2%; top: 1.5%; display: grid; justify-items: center; gap: 0.2rem; width: 3.6rem; }
.inset svg { width: 100%; height: auto; border: 1px solid var(--line-2); background: var(--sea); overflow: hidden; }
.inset .land { fill: var(--land); stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.inset span { font-size: 0.62rem; font-weight: 600; font-stretch: var(--semi); line-height: 1.15; text-align: center; color: var(--ink-2); }
.scale { position: absolute; left: 66%; top: 91%; width: var(--w); }
.scale-bar { display: block; height: 0.32rem; border: 1px solid var(--ink); background: linear-gradient(90deg, var(--ink) 0 25%, var(--land) 25% 50%, var(--ink) 50% 75%, var(--land) 75%); }
.scale-n { position: absolute; top: 0.5rem; transform: translateX(-50%); font-size: 0.6rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; line-height: 1; }
.scale-n:last-child { transform: translateX(-0.5rem); }
.ge, .gn { display: none; position: absolute; font-size: 0.62rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1; }
.ge { left: var(--x); top: -1.15rem; transform: translateX(-50%); }
.gn { top: var(--y); right: calc(100% + 0.4rem); transform: translateY(-50%); }
.wide-only { display: none; }

/* The key: the map's legend, in open water */
.map-key {
  grid-area: key;
  position: relative; z-index: 2;
  background: var(--panel);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  padding: 0.75rem 0.85rem 0.7rem;
  display: grid; gap: 0.5rem;
  margin-top: 0.75rem;
}
.key-title { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; }
.key-title b { font-size: var(--t-sm); font-weight: 760; font-stretch: var(--wide); }
.key-title a, .key-title span { font-size: var(--t-xs); color: var(--muted); }
.key-title a { color: var(--ink-2); text-underline-offset: 2px; text-decoration-color: var(--line-2); }
.key-rows { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem 1.1rem; }
@media (max-width: 23.99rem) { .key-rows { grid-template-columns: minmax(0, 1fr); } }
.key-rows li { display: grid; grid-template-columns: 1rem minmax(0, 1fr) auto; align-items: center; gap: 0.45rem; font-size: var(--t-sm); line-height: 1.2; min-width: 0; }
.key-rows.with-seats li { grid-template-columns: 1rem minmax(0, 1fr) auto 1.6rem; }
@media (max-width: 29.99rem) { .key-rows.with-seats { grid-template-columns: minmax(0, 1fr); } }
.key-rows i { width: 1rem; height: 0.7rem; background: var(--pc, var(--muted)); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.18); }
.key-rows span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.key-rows b { font-weight: 700; font-variant-numeric: tabular-nums; }
.key-rows em { font-style: normal; font-weight: 800; font-stretch: var(--cond); font-size: 1.05rem; text-align: right; font-variant-numeric: tabular-nums; }
.key-note { font-size: var(--t-xs); color: var(--muted); }
.key-list { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; font-size: var(--t-sm); color: var(--ink-2); }
.key-link { justify-self: start; font-size: var(--t-sm); font-weight: 700; color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

@media (min-width: 30rem) {
  .hero-copy { max-width: 14rem; }
}
@media (min-width: 48rem) {
  .hero-in {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "copy map" "sub map" "key map";
    column-gap: 2rem;
    padding-block: 1.75rem;
  }
  .hero-copy { grid-area: copy; max-width: none; padding-top: 0.5rem; gap: 0.75rem; }
  .hero-sub { grid-area: sub; padding-block: 1rem 0; }
  .map-key { grid-area: key; align-self: end; justify-self: start; width: min(100%, 28rem); margin-top: 1.25rem; }
  .map { grid-area: map; width: auto; height: clamp(28rem, 43vw, 37rem); max-width: none; margin: 0; }
  .ge, .gn, .wide-only { display: block; }
  .sea-tasman { left: 3%; top: 49%; letter-spacing: 0.28em; }
  .inset { width: 4.2rem; }
  .hero h1 { font-size: 1.9rem; }
  .clock span, .count b { font-size: 5rem; }
}
@media (min-width: 64rem) {
  .clock { grid-template-columns: repeat(4, max-content); gap: 0 1.6rem; }
  .clock span, .count b { font-size: clamp(5.5rem, 7.4vw, 7.25rem); }
  .clock small, .count small { font-size: var(--t-sm); }
  .hero h1 { font-size: 2.2rem; }
  .hero-sub { font-size: 1.0625rem; }
}

/* ── Page layout ────────────────────────────────────────────── */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; row-gap: 2.75rem; padding-block: 2rem 1rem; overflow-x: clip; }
.side { display: contents; }
.block { display: grid; gap: 1.1rem; min-width: 0; border-top: 2px solid var(--ink); padding-top: 0.9rem; }
.block-head { display: grid; gap: 0.4rem; }
.block-head h2 {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: var(--t-2xl); font-weight: 780; font-stretch: var(--xwide); letter-spacing: -0.022em;
}
.block-meta { font-size: var(--t-sm); color: var(--muted); max-width: 44rem; }
.lede { color: var(--ink-2); max-width: 40rem; }
.fine { font-size: var(--t-xs); color: var(--muted); line-height: 1.45; }
.fine a { color: var(--ink-2); }
.subhead { font-size: var(--t-md); font-weight: 750; font-stretch: var(--wide); margin: 0.35rem 0 0; }
.plate { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; min-width: 0; }

/* Phone order: campaign leads with coverage; election night with results. */
#live { order: 1; } #coverage { order: 2; } #social { order: 3; } #polls { order: 4; } #seats { order: 5; }
#results { order: 6; } #watch { order: 7; } #night { order: 8; } #turnout { order: 9; }
#parties { order: 10; } #donate { order: 11; } #vote { order: 12; }
[data-phase="night"] #results, [data-phase="counting"] #results, [data-phase="official"] #results { order: -4; }
[data-phase="night"] #live, [data-phase="counting"] #live, [data-phase="official"] #live { order: -3; }
[data-phase="night"] #seats, [data-phase="counting"] #seats, [data-phase="official"] #seats { order: -2; }
[data-phase="night"] #night { order: -1; }
[data-phase="electionday"] #vote { order: -1; }

@media (min-width: 64rem) {
  .layout {
    grid-template-columns: minmax(0, 1fr) 22.5rem;
    column-gap: 3rem;
    row-gap: 3.25rem;
    padding-top: 2.75rem;
    grid-template-areas:
      "coverage side"
      "social side"
      "polls side"
      "seats side"
      "results side"
      "parties parties"
      "donate donate";
  }
  [data-phase="night"] .layout, [data-phase="counting"] .layout, [data-phase="official"] .layout {
    grid-template-areas:
      "results side"
      "seats side"
      "coverage side"
      "social side"
      "polls side"
      "parties parties"
      "donate donate";
  }
  #results { grid-area: results; } #seats { grid-area: seats; } #coverage { grid-area: coverage; } #social { grid-area: social; }
  #polls { grid-area: polls; } #parties { grid-area: parties; } #donate { grid-area: donate; }
  .side { grid-area: side; display: grid; gap: 3.25rem; align-content: start; }
  .side .block-head h2 { font-size: 1.45rem; }
}

/* ── Bars (poll average, results, 2023 baseline) ────────────── */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.bars.plate { padding: 1rem; }
.bar { display: grid; grid-template-columns: minmax(6.5rem, 9.5rem) minmax(0, 1fr) 3.9rem; align-items: center; gap: 0.7rem; }
.bars.with-extra .bar { grid-template-columns: minmax(6.5rem, 9.5rem) minmax(0, 1fr) 3.9rem 3.6rem; }
.bar-name { display: flex; align-items: center; gap: 0.5rem; font-weight: 650; font-size: var(--t-sm); min-width: 0; }
.bar-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ballot { flex: none; width: 1rem; height: 0.7rem; background: var(--pc, var(--muted)); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.18); }
.bar-track { position: relative; height: 0.75rem; background: var(--panel-2); }
.bar-fill { position: absolute; inset: 0 auto 0 0; width: calc(min(var(--v), var(--max)) / var(--max) * 100%); background: var(--pc, var(--muted)); }
.bar-thr { position: absolute; top: -4px; bottom: -4px; left: calc(5 / var(--max) * 100%); border-left: 1.5px dashed var(--ink); opacity: 0.6; }
.bar-val, .bar-extra { font-weight: 700; font-size: var(--t-md); text-align: right; font-variant-numeric: tabular-nums; }
.bar-extra { color: var(--ink-2); font-weight: 500; }
.bar-head { font-size: var(--t-xs); color: var(--muted); }
.bar-head .bar-val, .bar-head .bar-extra, .bar-head .bar-name { font-size: var(--t-xs); font-weight: 600; color: var(--muted); }

@media (max-width: 34rem) {
  .bar, .bars.with-extra .bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "track track"; gap: 0.3rem 0.6rem; }
  .bars.with-extra .bar { grid-template-columns: minmax(0, 1fr) auto 3rem; grid-template-areas: "name val extra" "track track track"; }
  .bar > .bar-name { grid-area: name; } .bar > .bar-val { grid-area: val; } .bar > .bar-extra { grid-area: extra; }
  .bar > .bar-track { grid-area: track; height: 0.6rem; }
  .bar-head > span:nth-child(2) { display: none; }
  .bars { gap: 0.75rem; }
}

/* ── Results card ───────────────────────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; display: grid; gap: 1rem; min-width: 0; }
.results-state { display: grid; gap: 0.45rem; }
.results-state h3 { font-size: var(--t-xl); font-weight: 760; font-stretch: var(--wide); letter-spacing: -0.015em; }
.progress { height: 0.55rem; background: var(--panel-2); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); width: var(--w); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr)); gap: 0.8rem 1.4rem; border-block: 1px solid var(--line); padding-block: 0.8rem; }
.kpi { display: grid; }
.kpi b { font-size: 2.6rem; font-weight: 800; font-stretch: var(--xcond); line-height: 0.95; font-variant-numeric: tabular-nums; }
.kpi small { font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.demo-flag { justify-self: start; font-size: var(--t-xs); font-weight: 800; font-stretch: var(--wide); color: var(--accent-ink); background: var(--accent); padding: 0.15rem 0.55rem; border-radius: 3px; }

/* ── Seats: hemicycle, table, majority builder ──────────────── */
.seats-grid { display: grid; gap: 1rem; align-items: center; }
@media (min-width: 40rem) { .seats-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; } }
.hemi { margin: 0; min-width: 0; }
.hemi svg { display: block; width: 100%; height: auto; }
.hemi .seat { fill: var(--pc, var(--line-2)); }
.hemi .seat.empty { fill: var(--panel-2); }
.hemi .maj { stroke: var(--ink); stroke-width: 0.01; stroke-dasharray: 0.03 0.025; }
.hemi .hemi-total { fill: var(--ink); font-family: var(--font); font-weight: 800; font-stretch: 62%; font-size: 0.3px; }
.hemi .hemi-label { fill: var(--muted); font-family: var(--font); font-weight: 600; font-size: 0.068px; }
.seat-table { list-style: none; margin: 0; padding: 0; display: grid; font-variant-numeric: tabular-nums; }
.seat-table li { display: grid; grid-template-columns: minmax(0, 1fr) 2.6rem 4.6rem; gap: 0.5rem; align-items: center; padding-block: 0.4rem; border-top: 1px solid var(--line); }
.seat-table li:first-child { border-top: 0; font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.seat-table b { font-size: 1.35rem; font-weight: 800; font-stretch: var(--cond); text-align: right; }
.seat-table .chg { text-align: right; font-size: var(--t-sm); color: var(--ink-2); }
.seat-table .bar-name { font-size: var(--t-sm); }

.coalition { display: grid; gap: 0.65rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.coalition .subhead { margin: 0; }
.coal-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.coal-chips button {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 2.75rem; padding: 0.35rem 0.85rem 0.35rem 0.5rem;
  font-size: var(--t-sm); font-weight: 650;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer;
}
.coal-chips button:hover { border-color: var(--ink); }
.coal-chips button[aria-pressed="true"] { background: var(--panel); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.coal-chips button .n { font-weight: 800; font-stretch: var(--cond); font-size: 1.05rem; color: var(--ink-2); }
/* A ballot circle you tick, as on the real voting paper */
.tick-c { position: relative; flex: none; width: 1.45rem; height: 1.45rem; border-radius: 50%; border: 2px solid var(--pc, var(--ink)); background: var(--panel); }
.tick-c svg { position: absolute; inset: -5px -7px -3px -1px; width: calc(100% + 8px); height: calc(100% + 8px); opacity: 0; transform: scale(0.7); transition: opacity 0.12s, transform 0.12s; }
.tick-c path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.coal-chips button[aria-pressed="true"] .tick-c svg { opacity: 1; transform: none; }
.coal-meter { position: relative; height: 1rem; background: var(--panel-2); overflow: hidden; display: flex; }
.coal-meter span { display: flex; height: 100%; width: 100%; }
.coal-meter span i { height: 100%; background: var(--pc); border-right: 2px solid var(--panel); }
.coal-meter > i { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--ink); }
.coal-status { font-size: var(--t-lg); font-weight: 760; font-stretch: var(--wide); }
.coal-status small { font-size: var(--t-sm); font-weight: 450; font-stretch: 100%; color: var(--muted); }

/* ── Trend chart ────────────────────────────────────────────── */
.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); }
.legend li { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend i { width: 1rem; height: 3px; background: var(--pc); }
.chart { position: relative; touch-action: pan-y; padding: 0.75rem 0.75rem 0.5rem; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart .thr-line { stroke: var(--ink); stroke-dasharray: 5 4; stroke-width: 1.25; opacity: 0.55; }
.chart .eday { stroke: var(--accent); stroke-dasharray: 2 3; stroke-width: 1.75; }
.chart .eday-label { fill: var(--accent); font-size: 11.5px; font-weight: 700; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--pc); stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--pc); opacity: 0.3; }
.chart .end-dot { fill: var(--pc); stroke: var(--panel); stroke-width: 2; }
.chart .end-label { fill: var(--ink); font-size: 11.5px; font-family: var(--font); font-weight: 700; font-variant-numeric: tabular-nums; }
.chart .hover-line { stroke: var(--ink-2); stroke-width: 1; }
.chart .hover-dot { fill: var(--pc); stroke: var(--panel); stroke-width: 2; }
.tip {
  position: absolute; top: 0.5rem; pointer-events: none; z-index: 2; min-width: 10rem;
  background: var(--panel); border: 1.5px solid var(--ink); border-radius: 2px;
  padding: 0.5rem 0.65rem; font-size: var(--t-xs); box-shadow: var(--pop);
}
.tip b { display: block; margin-bottom: 0.3rem; font-weight: 750; }
.tip div { display: flex; align-items: center; gap: 0.4rem; }
.tip div span:last-child { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.tip i { width: 0.8rem; height: 0.55rem; background: var(--pc); }

/* Every-poll table */
details.polls-table { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); min-width: 0; }
details.polls-table summary { cursor: pointer; padding: 0.75rem 1rem; font-weight: 700; }
details.polls-table[open] summary { border-bottom: 1px solid var(--line); }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
th, td { padding: 0.45rem 0.6rem; text-align: right; white-space: nowrap; border-top: 1px solid var(--line); }
th:first-child, td:first-child, th:nth-child(2), td:nth-child(2) { text-align: left; }
thead th { font-size: var(--t-xs); font-weight: 650; color: var(--muted); border-top: 0; }
thead th .ballot { display: inline-block; width: 0.8rem; height: 0.55rem; margin-right: 0.3rem; vertical-align: 0.02em; }
td a { color: var(--ink); text-decoration-color: var(--line-2); text-underline-offset: 3px; font-weight: 650; }
td.in-avg::after { content: " •"; color: var(--accent); font-weight: 800; }

/* ── Coverage feed ──────────────────────────────────────────── */
.filters { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.filters button {
  font-size: var(--t-sm); font-weight: 650;
  background: transparent; border: 1px solid var(--line-2); border-radius: 999px;
  padding: 0.3rem 0.95rem; min-height: 2.4rem; cursor: pointer;
}
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.posts { list-style: none; margin: 0; padding: 0; display: grid; }
.post { border-top: 1px solid var(--line); padding-block: 1rem; display: grid; gap: 0.55rem; min-width: 0; position: relative; }
.post:first-child { border-top: 0; padding-top: 0.2rem; }
.post-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; text-decoration: none; align-items: start; }
.post-link:hover h3, .post h3 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.post-text { display: grid; gap: 0.3rem; min-width: 0; }
.post-meta { font-size: var(--t-xs); color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.65rem; }
.post-meta b { color: var(--ink); font-weight: 750; font-stretch: var(--wide); }
.stamp { font-size: 0.68rem; font-weight: 750; color: var(--accent); border: 1px solid currentColor; border-radius: 3px; padding: 0 0.35rem; line-height: 1.5; }
.post h3 { font-size: 1.08rem; font-weight: 650; line-height: 1.32; letter-spacing: -0.005em; }
.post h3 a { text-decoration: none; }
.post-sum { font-size: var(--t-sm); color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-thumb { position: relative; display: grid; place-items: center; width: 4rem; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--sea); box-shadow: inset 0 0 0 1px var(--line); }
.post-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-badge { font-size: 0.8rem; font-weight: 800; font-stretch: var(--cond); letter-spacing: 0.02em; color: var(--ink-2); }
@media (min-width: 40rem) { .post-thumb { width: 4.75rem; } }
.post.pinned { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem; margin-bottom: 0.4rem; }
.post.pinned + .post { border-top: 0; }
.more {
  justify-self: start; font-size: var(--t-sm); font-weight: 700;
  padding: 0.5rem 1.2rem; min-height: 2.6rem; border-radius: 6px;
  border: 1.5px solid var(--ink); background: transparent; cursor: pointer;
}
.more:hover { background: var(--ink); color: var(--paper); }

/* Social media: cards, two across on wider screens */
.social-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); align-items: start; }
.social-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1rem 1rem; display: grid; gap: 0.6rem; min-width: 0; }
.social-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; font-size: var(--t-xs); color: var(--muted); }
.social-head .net { font-weight: 800; font-stretch: var(--wide); color: var(--ink); }
.social-head b { font-weight: 650; color: var(--ink-2); }
.social-text { font-size: var(--t-md); font-weight: 600; line-height: 1.38; overflow-wrap: anywhere; }
.social-text a { text-decoration: none; }
.social-text a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.social-img { display: block; border-radius: 3px; overflow: hidden; background: var(--panel-2); }
.social-img img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.social-open { justify-self: start; font-size: var(--t-sm); font-weight: 700; color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.social-card .player.tall iframe { height: min(var(--h, 560px), 70vh); }
.lowbw .social-img { display: none; }

/* Video players: a lightweight preview until tapped (saves data and keeps
   the page fast when thousands of people open it at once). */
.player { position: relative; width: 100%; max-width: 100%; overflow: hidden; background: #0D1413; border-radius: var(--radius); }
.player.ratio { aspect-ratio: var(--ratio, 16 / 9); }
.post .player.ratio { max-width: 36rem; }
.post .player.vertical { max-width: 15rem !important; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player.tall iframe { position: static; height: var(--h, 560px); }
.player.tall { background: var(--panel); border: 1px solid var(--line); }
.facade {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: grid; place-items: center;
  border: 0; padding: 1rem; cursor: pointer; color: #FFFFFF;
  background: #0D1413 radial-gradient(circle at 70% 30%, #1E3532, #0D1413 70%);
}
.player.tall .facade { position: static; min-height: 9rem; }
.facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.facade .play {
  position: relative; display: inline-flex; align-items: center; gap: 0.5rem;
  background: #C2136C; color: #FFFFFF; border-radius: 999px;
  padding: 0.6rem 1.15rem 0.6rem 0.9rem; font-size: var(--t-sm); font-weight: 750;
  box-shadow: 0 6px 18px -6px rgb(0 0 0 / 0.6);
}
.facade .play svg { width: 1.1rem; height: 1.1rem; }
.facade:hover .play { background: #9E0F58; }

.live-now h2 .pulse { width: 0.7rem; height: 0.7rem; }
.live-caption { font-size: var(--t-sm); font-weight: 650; color: var(--ink-2); margin-top: 0.5rem; }

/* ── Watch, timeline, turnout ───────────────────────────────── */
.streams { list-style: none; margin: 0; padding: 0; display: grid; }
.stream { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 0.8rem; align-items: center; padding-block: 0.8rem; border-top: 1px solid var(--line); }
.stream:first-child { border-top: 0; padding-top: 0.1rem; }
.stream-when { font-size: var(--t-xs); font-weight: 700; color: var(--accent); }
.stream h3 { font-size: var(--t-lg); font-weight: 760; font-stretch: var(--wide); letter-spacing: -0.01em; }
.stream p { font-size: var(--t-sm); color: var(--ink-2); }
.stream .go { grid-row: 1 / span 4; grid-column: 2; }
.go {
  display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none;
  font-size: var(--t-sm); font-weight: 700; white-space: nowrap;
  border: 1.5px solid var(--ink); border-radius: 6px; padding: 0.4rem 0.85rem; min-height: 2.4rem;
}
.go:hover { background: var(--ink); color: var(--paper); }
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.link-list a {
  display: inline-flex; align-items: center; min-height: 2.4rem;
  font-size: var(--t-sm); font-weight: 600;
  padding: 0.3rem 0.8rem; border-radius: 6px;
  border: 1px solid var(--line-2); background: var(--panel); text-decoration: none;
}
.link-list a:hover { border-color: var(--ink); }

/* Election night as a tramping route: a dashed track, huts as stops */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { position: relative; display: grid; grid-template-columns: 4.8rem minmax(0, 1fr); gap: 0.6rem; padding: 0.55rem 0 0.55rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: 0.42rem; top: 0; bottom: 0; border-left: 2px dashed var(--contour); }
.timeline li:first-child::before { top: 1rem; }
.timeline li:last-child::before { bottom: auto; height: 1rem; }
.timeline li::after { content: ""; position: absolute; left: 0.05rem; top: 0.78rem; width: 0.8rem; height: 0.8rem; background: var(--paper); border: 2px solid var(--ink); }
.timeline time { font-size: 1.15rem; font-weight: 800; font-stretch: var(--cond); line-height: 1.2; font-variant-numeric: tabular-nums; }
.timeline span { font-size: var(--t-sm); color: var(--ink-2); padding-top: 0.1rem; }
.timeline .done time, .timeline .done span { color: var(--muted); }
.timeline .done::after { background: var(--ink); }
.timeline .now::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.timeline .now time, .timeline .now span { color: var(--ink); font-weight: 700; }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.tile { display: grid; gap: 0.15rem; align-content: start; padding: 0.8rem 0.9rem 0.9rem 0; border-bottom: 1px solid var(--line); }
.tile:nth-child(even) { padding-left: 0.9rem; padding-right: 0; border-left: 1px solid var(--line); }
.tile span { font-size: var(--t-xs); font-weight: 650; color: var(--ink-2); }
.tile b { font-size: 2.5rem; font-weight: 800; font-stretch: var(--xcond); line-height: 1; font-variant-numeric: tabular-nums; }
.tile small { font-size: var(--t-xs); color: var(--muted); line-height: 1.35; }

.dates { list-style: none; margin: 0; padding: 0; display: grid; }
.dates li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); gap: 0.8rem; padding-block: 0.6rem; border-top: 1px solid var(--line); align-items: baseline; }
.dates li:first-child { border-top: 0; }
.dates time { font-size: 1.15rem; font-weight: 800; font-stretch: var(--cond); line-height: 1.1; display: grid; font-variant-numeric: tabular-nums; }
.dates time small { font-size: var(--t-xs); font-weight: 600; font-stretch: 100%; color: var(--muted); }
.dates li > span { font-size: var(--t-sm); color: var(--ink-2); }
.dates .past { color: var(--muted); }
.dates .past time { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
.dates .past > span { color: var(--muted); }
.dates .hl > span { font-weight: 700; color: var(--ink); }
.dates .hl time { color: var(--accent); }
.now-tag { display: inline-block; margin-left: 0.45rem; font-size: 0.68rem; font-weight: 800; color: var(--accent-ink); background: var(--accent); border-radius: 3px; padding: 0 0.35rem; vertical-align: 0.1em; }

/* ── Parties ────────────────────────────────────────────────── */
.party-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); }
.party { position: relative; background: var(--panel); border: 1px solid var(--line); border-top: 5px solid var(--pc); border-radius: 2px 2px var(--radius) var(--radius); padding: 0.95rem 1rem 1rem; display: grid; gap: 0.5rem; align-content: start; }
.party-head { display: flex; align-items: center; gap: 0.55rem; }
.party-head .ballot { display: none; }
.party-head h3 { font-size: 1.3rem; font-weight: 780; font-stretch: var(--wide); letter-spacing: -0.015em; }
.leaders { font-size: var(--t-sm); color: var(--muted); }
.pitch { font-size: var(--t-sm); color: var(--ink-2); }
.party-stats { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0.25rem 0 0; padding-top: 0.55rem; border-top: 1px solid var(--line); }
.party-stats div { display: grid; }
.party-stats dt { font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.party-stats dd { margin: 0; font-size: 1.2rem; font-weight: 800; font-stretch: var(--cond); font-variant-numeric: tabular-nums; }
.party-links { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: var(--t-sm); }
.party-links a { color: var(--ink); text-decoration-color: var(--line-2); text-decoration-thickness: 1.5px; text-underline-offset: 3px; font-weight: 650; }
.party-links a:hover { text-decoration-color: var(--accent); }

/* ── Donations, Givealittle-style ───────────────────────────── */
.donate { border-top: 0; padding: 1.4rem 1.1rem; background: var(--sea); border-radius: var(--radius); }
@media (min-width: 48rem) { .donate { padding: 2rem; } }
.donate-grid { display: grid; gap: 1.4rem; align-items: start; }
@media (min-width: 48rem) { .donate-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 2.5rem; } }
.donate-pitch { display: grid; gap: 1.1rem; }
.donate .block-meta { color: var(--ink-2); font-size: var(--t-md); }
.raised { display: grid; gap: 0.45rem; }
.raised p { font-weight: 650; }
.raised b { font-size: 2.6rem; font-weight: 800; font-stretch: var(--xcond); line-height: 1; margin-right: 0.25rem; }
.raised .progress { height: 0.7rem; background: color-mix(in srgb, var(--panel) 70%, var(--sea)); }
.raised .fine { color: var(--ink-2); }
.donate-form { display: grid; gap: 0.9rem; }
.donate-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 0.6rem; min-width: 0; }
.donate-form legend { padding: 0; margin-bottom: 0.6rem; }
.tiers { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
.tier {
  position: relative; display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 0.6rem;
  min-height: 3.6rem; padding: 0.55rem 0.8rem;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer;
  --pc: var(--accent);
}
.tier:hover { border-color: var(--ink); }
.tier input { position: absolute; opacity: 0; pointer-events: none; }
.tier-amt { font-size: 1.9rem; font-weight: 800; font-stretch: var(--xcond); line-height: 1; font-variant-numeric: tabular-nums; }
.tier-label { font-size: var(--t-sm); font-weight: 550; color: var(--ink-2); line-height: 1.25; }
.tier:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tier:has(input:checked) .tick-c svg { opacity: 1; transform: none; }
.tier:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.tier.off { background: transparent; border-style: dashed; cursor: default; }
.tier.off:hover { border-color: var(--line-2); }
.tier.off .tier-amt, .tier.off .tier-label { color: var(--muted); }
.give {
  display: flex; justify-content: center; align-items: center;
  text-decoration: none; font-size: 1.1rem; font-weight: 800; font-stretch: var(--wide);
  color: var(--accent-ink); background: var(--accent);
  border-radius: 8px; padding: 0.75rem 1rem; min-height: 3.25rem;
}
.give:hover { background: var(--accent-2); }
.give[aria-disabled="true"] { background: transparent; color: var(--muted); border: 1.5px dashed var(--line-2); cursor: default; }
.donate .fine { color: var(--ink-2); }

/* ── Footer ─────────────────────────────────────────────────── */
.footer { margin-top: 2.5rem; border-top: 2px solid var(--ink); }
.foot-in { padding-block: 1.5rem 2.5rem; display: grid; gap: 0.8rem; font-size: var(--t-sm); color: var(--ink-2); }
.foot-in p { max-width: 62rem; }
.footer strong { color: var(--ink); font-weight: 800; font-stretch: var(--xwide); }
.colophon { color: var(--muted); font-size: var(--t-xs); }
#foot-contact:empty { display: none; }

/* ── Phone tab bar and More sheet ───────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--panel);
  border-top: 1px solid var(--line-2);
  padding: 0.25rem max(6px, env(safe-area-inset-right, 0px)) calc(0.25rem + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
}
.tabbar a, .tabbar button {
  position: relative;
  display: grid; justify-items: center; align-content: center; gap: 0.15rem;
  min-height: 3.1rem; padding: 0.2rem 0;
  font-size: 0.7rem; font-weight: 650; color: var(--muted); text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.tabbar svg { width: 1.45rem; height: 1.45rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar [aria-current="true"], .tabbar [aria-expanded="true"] { color: var(--ink); }
.tabbar [aria-current="true"]::before { content: ""; position: absolute; top: -0.26rem; left: 30%; right: 30%; height: 3px; background: var(--accent); }
.tabbar .is-live { color: var(--accent); }
.tabbar .is-live::after { content: ""; position: absolute; top: 0.4rem; left: calc(50% + 0.55rem); width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--panel); }
.sheet {
  position: fixed; z-index: 24;
  left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px));
  bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
  background: var(--panel); border: 1.5px solid var(--ink); border-radius: 6px;
  box-shadow: var(--pop); padding: 0.4rem;
}
.sheet ul { list-style: none; margin: 0; padding: 0; display: grid; }
.sheet a { display: flex; align-items: center; min-height: 3rem; padding: 0.5rem 0.85rem; font-weight: 650; text-decoration: none; border-radius: 4px; }
.sheet a:hover { background: var(--panel-2); }
.sheet li + li { border-top: 1px solid var(--line); }
.sheet .sheet-give { color: var(--accent); font-weight: 800; }
@media (max-width: 63.99rem) {
  body { padding-bottom: calc(3.9rem + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 64rem) {
  .tabbar, .sheet { display: none !important; }
}

/* Low-bandwidth mode (admin switch): no thumbnails or preview images. */
.lowbw .post-thumb img, .lowbw .facade img { display: none; }

@media (prefers-reduced-motion: reduce) {
  .tick-c svg { transition: none; }
}
