@font-face { font-family: "Plex Sans"; font-weight: 400; font-display: swap; src: url("/fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "Plex Sans"; font-weight: 600; font-display: swap; src: url("/fonts/ibm-plex-sans-600.woff2") format("woff2"); }
@font-face { font-family: "Plex Condensed"; font-weight: 500; font-display: swap; src: url("/fonts/ibm-plex-sans-condensed-500.woff2") format("woff2"); }
@font-face { font-family: "Plex Condensed"; font-weight: 700; font-display: swap; src: url("/fonts/ibm-plex-sans-condensed-700.woff2") format("woff2"); }

/* Red and blue belong to the candidates and are used for nothing else. */
:root {
  --paper: #f4f6f8;
  --raised: #ffffff;
  --ink: #0e1726;
  --muted: #5b6676;
  --faint: #8a94a3;
  --rule: #d5dbe3;
  --void: #e4e8ee;
  --lawler: #b92e2a;
  --conley: #1e5aa8;
  --road: #b7bfcb;
  --label-halo: #ffffff;
  --land: #eceff3;
  --water: #c3d6ea;
  --park: #dde8d8;
  --street: rgba(255, 255, 255, .7);
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cond: "Plex Condensed", "Plex Sans", system-ui, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f141b;
    --raised: #171e28;
    --ink: #e8ecf1;
    --muted: #9aa5b4;
    --faint: #6b7686;
    --rule: #283141;
    --void: #222b38;
    --lawler: #e0564f;
    --conley: #5b8fd9;
    --road: #46526a;
    --label-halo: #171e28;
    --land: #141a23;
    --water: #1a2c42;
    --park: #17231c;
    --street: rgba(255, 255, 255, .3);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--sans); }
p, h1, h2, h3 { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.num, .n, .split, .meter-note, .counted, .share, .detail dd { font-variant-numeric: tabular-nums; }

/* masthead */
.masthead { padding-top: 16px; }
.status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .875rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.status.live .dot { background: var(--ink); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .status.live .dot { animation: none; } * { transition: none !important; } }
h2 { font: 700 1.625rem/1.1 var(--cond); margin-bottom: 8px; }
h3 { font: 600 1rem/1.3 var(--sans); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the matchup board: names, animals, count and bar in one block */
.board { position: relative; display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; padding-top: 28px; isolation: isolate; }
/* Each animal fills the rows from the names down to the percentages, never the bar below.
   height: 0 + min-height: 100% keeps the image from making those rows taller. */
.animal { grid-row: 1 / 4; z-index: -1; align-self: stretch; width: 100%; height: 0; min-height: 100%; object-fit: contain; pointer-events: none; opacity: .3; }
.animal.elephant { grid-column: 1; object-position: left bottom; }
.animal.donkey { grid-column: 2; object-position: right bottom; }
/* In dark mode the navy ink would vanish, so the drawings flip to light lines on dark; the hue turn keeps
   the rosettes red and blue. */
@media (prefers-color-scheme: dark) { .animal { filter: invert(1) hue-rotate(180deg); opacity: .4; } }
.matchup { grid-column: 1 / -1; grid-row: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; font-weight: 400; }
.side { display: flex; flex-direction: column; }
.side.conley { align-items: flex-end; text-align: right; }
.first { font: 600 clamp(1rem, 3.6vw, 1.375rem)/1.1 var(--sans); }
.last { font: 700 clamp(2.5rem, 11vw, 5rem)/.9 var(--cond); text-transform: uppercase; letter-spacing: .005em; }
.vs { font: 500 clamp(1rem, 3.6vw, 1.375rem)/1 var(--cond); color: var(--muted); padding: 0 12px .4em; }
.num { font: 700 clamp(2.75rem, 12vw, 5.5rem)/1 var(--cond); margin-top: 10px; }
.num.lawler, .share.lawler { grid-column: 1; }
.num.conley, .share.conley { grid-column: 2; text-align: right; }
.num { grid-row: 2; }
.share { grid-row: 3; }
.num.lawler { color: var(--lawler); }
.num.conley { color: var(--conley); }
.share { color: var(--muted); font-size: .9375rem; min-height: 1.5em; }
.share-bar { grid-column: 1 / -1; grid-row: 4; position: relative; display: flex; height: 14px; margin-top: 12px; background: var(--void); border-radius: 5px; overflow: hidden; }
.share-bar .l { background: var(--lawler); width: 0; transition: width .8s ease; }
.share-bar .c { background: var(--conley); width: 0; margin-left: auto; transition: width .8s ease; }
/* Votes from the bloc districts sit at the outer end of each candidate's bar, darker and hatched. */
.share-bar .l, .share-bar .c { position: relative; display: flex; }
.share-bar .c { justify-content: flex-end; }
.share-bar .bloc { width: 0; height: 100%; transition: width .8s ease; background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .38) 0 2px, rgba(0, 0, 0, .12) 2px 5px); }
.bloc-share { grid-column: 1 / -1; grid-row: 5; display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .875rem; color: var(--muted); }
[hidden] { display: none !important; }
.bloc-share i { flex: none; width: 22px; height: 12px; border-radius: 2px; background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .45) 0 2px, rgba(0, 0, 0, .12) 2px 5px), var(--faint); }
.bloc-share b { color: var(--ink); font-weight: 600; }
.share-bar .half { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--paper); }
.counted { grid-column: 1 / -1; grid-row: 6; margin-top: 8px; font-size: .9375rem; color: var(--muted); }
.counted b { color: var(--ink); font-weight: 600; }
.counted b.r { color: var(--lawler); }
.counted b.d { color: var(--conley); }
.dek { grid-column: 1 / -1; grid-row: 8; color: var(--muted); font-size: .875rem; margin-top: 4px; max-width: 60ch; }

/* the split: two bars from a centre line, each pointing toward whoever leads in that part of the district */
.gap { padding-top: 48px; }
.lede { font-size: 1.125rem; line-height: 1.45; max-width: 44ch; margin-bottom: 22px; }
.lede .r { color: var(--lawler); font-weight: 600; }
.lede .d { color: var(--conley); font-weight: 600; }
.split { position: relative; display: grid; gap: 18px; }
.split::before { content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; background: var(--ink); }
.split-row { position: relative; display: grid; gap: 6px; }
.split-row .lab { display: flex; flex-direction: column; gap: 2px; width: 50%; padding: 0 12px; font-size: .875rem; color: var(--muted); line-height: 1.25; }
.split-row.right .lab { margin-left: 50%; }
.split-row.left .lab { text-align: right; }
.split-row .lab b { font: 700 1.375rem/1.1 var(--cond); color: var(--ink); }
.split-row .lab b.r { color: var(--lawler); }
.split-row .lab b.d { color: var(--conley); }
.split-row .lab small { display: block; font-size: .8125rem; color: var(--faint); }
/* The Heimish row matches the big number beside it and the hatched Heimish part of the main bar. */
.split-row.hl .lab span { color: var(--ink); font-weight: 600; }
.split-row.hl .bar.r, .split-row.hl .bar.d { background-image: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .38) 0 2px, rgba(0, 0, 0, .12) 2px 5px); }
.split-row .bar { position: relative; height: 28px; transition: left .8s ease, width .8s ease; }
.split-row.right .bar { border-radius: 0 3px 3px 0; }
.split-row.left .bar { border-radius: 3px 0 0 3px; }
.split-row .bar.r { background: var(--lawler); }
.split-row .bar.d { background: var(--conley); }
.split.one-sided::before { left: 0; margin-left: 0; }
.split.one-sided .split-row .lab { width: 100%; margin-left: 0; text-align: left; }
.split.one-sided .split-row .bar { border-radius: 0 3px 3px 0; }
.axis { display: flex; justify-content: space-between; margin-top: 12px; font-size: .8125rem; color: var(--muted); }
.axis span:first-child::before { content: "← "; }
.axis span:last-child::after { content: " →"; }
.gap-note { margin-top: 14px; font-size: .875rem; color: var(--muted); max-width: 60ch; }
.turnout { margin-top: 40px; max-width: 640px; }
.meter { position: relative; height: 14px; margin: 12px 0 8px; background: var(--void); border-radius: 7px; }
.meter .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 7px; background: var(--ink); transition: width .8s ease; }
.meter .tick { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--muted); }
.meter .tick span { position: absolute; top: 26px; transform: translateX(-50%); font-size: .75rem; color: var(--muted); white-space: nowrap; }
.meter .tick.end span { transform: translateX(-100%); }
.meter-note { margin-top: 26px; color: var(--muted); font-size: .9375rem; max-width: 60ch; }
.meter-note b { color: var(--ink); font-weight: 600; }

/* map */
.mapsec { padding-top: 48px; }
/* The heading with the map/list switch at its right: what you're looking at, apart from how the map is coloured. */
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sec-head h2 { margin-bottom: 0; text-wrap: balance; }
.seg.icons { flex: none; }
.seg.icons button { display: grid; place-items: center; padding: 6px 9px; }
.seg.icons svg { width: 18px; height: 18px; fill: currentColor; }
.mapsec .controls { margin-top: 12px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: space-between; margin: 4px 0 12px; }
.seg, .zoom { display: inline-flex; max-width: 100%; overflow-x: auto; background: var(--void); border-radius: 8px; padding: 3px; }
.seg button, .zoom button { border: 0; background: none; padding: 7px 12px; border-radius: 6px; font-size: .875rem; cursor: pointer; color: var(--muted); white-space: nowrap; }
.seg button[aria-checked="true"], .zoom button[aria-pressed="true"] { background: var(--raised); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(14, 23, 38, .14); }
.map-shell { display: grid; grid-template-columns: 1fr; gap: 12px; }
.map { position: relative; background: var(--raised); border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; max-height: 80vh; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.map.zoomed { touch-action: none; cursor: grab; }
.map svg { display: block; width: 100%; height: 100%; }
.map .ed { stroke: var(--raised); stroke-width: .5px; vector-effect: non-scaling-stroke; cursor: pointer; }
.map .roads path { fill: none; stroke: var(--road); stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.map .roads path.major { stroke-width: 2px; }
.map .outline path { fill: none; stroke: var(--ink); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.map .outline path.newsquare { stroke-dasharray: 5 3; stroke-width: 2px; }
.map .outline path.pockets { stroke-width: 1px; stroke-dasharray: 1.5 2.5; opacity: .8; }
.map .selected { fill: none; stroke: var(--ink); stroke-width: 3.5px; vector-effect: non-scaling-stroke; }
.map .roads, .map .outline, .map .selected, .map .places { pointer-events: none; }
.map .places text { font-family: var(--sans); fill: var(--ink); paint-order: stroke; stroke: var(--label-halo); stroke-linejoin: round; text-anchor: middle; }
.map .places text { font-weight: 600; }
.map .places text.t2, .map .places text.t3 { display: none; }
.map.mid .places text.t2, .map.close .places text.t3 { display: inline; }
.map .places text.t3 { font-weight: 400; }
.map-btns { position: absolute; right: 10px; top: 10px; display: grid; gap: 6px; z-index: 2; }
.map-btns button { width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--rule); background: var(--raised); font-size: 1.25rem; line-height: 1; cursor: pointer; }

.detail { position: relative; background: var(--raised); border-radius: 12px; padding: 16px; }
.detail .hint { color: var(--muted); }
.detail h3 { font: 700 1.5rem/1.1 var(--cond); padding-right: 40px; }
.detail .tag { color: var(--muted); font-size: .875rem; margin-top: 4px; }
.detail dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 14px 0 0; font-size: .9375rem; }
.detail dt { color: var(--muted); }
.detail dd { margin: 0; text-align: right; }
.detail .r { color: var(--lawler); font-weight: 600; }
.detail .d { color: var(--conley); font-weight: 600; }
.detail .close { position: absolute; right: 10px; top: 10px; border: 0; background: var(--void); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.125rem; line-height: 1; }

.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: .8125rem; color: var(--muted); }
.legend .ramp { display: inline-flex; align-items: center; gap: 6px; }
.legend .ramp span { display: inline-flex; border-radius: 3px; overflow: hidden; }
.legend .ramp i { width: 20px; height: 10px; }
.legend .key { display: inline-flex; align-items: center; gap: 6px; }
.legend .key svg { width: 20px; height: 12px; overflow: visible; }
.note { color: var(--muted); font-size: .8125rem; margin-top: 6px; max-width: 70ch; }

/* bloc districts */
.blocsec .controls { align-items: center; }
.blocsec .note { margin: 0; }
.blocs { width: 100%; border-collapse: collapse; font-size: .9375rem; margin-top: 4px; }
.blocs th { text-align: left; font-weight: 400; color: var(--muted); font-size: .8125rem; padding: 0 0 6px; border-bottom: 1px solid var(--rule); }
.blocs th.n, .blocs td.n { text-align: right; padding-left: 10px; }
.blocs td { padding: 8px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.blocs tr.group td { padding-top: 18px; font: 700 1.0625rem/1.2 var(--cond); border-bottom: 2px solid var(--ink); }
.blocs tr.ed { cursor: pointer; }
.blocs tr.ed:hover td { background: var(--void); }
.blocs tr.ed.is-selected td { background: var(--void); }
.blocs .ed-name { font-weight: 600; }
.blocs .ed-place { display: block; font-size: .8125rem; color: var(--muted); }
.blocs .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--void); border: 1px solid var(--faint); margin-right: 8px; vertical-align: 1px; }
.blocs .dot.in { background: var(--ink); border-color: var(--ink); }
.blocs tr.fresh .dot.in { animation: pulse 1.2s 3; }
.blocs .r { color: var(--lawler); font-weight: 600; }
.blocs .d { color: var(--conley); font-weight: 600; }
.blocs .tbar { position: relative; display: inline-block; width: 72px; height: 8px; background: var(--void); border-radius: 4px; vertical-align: middle; margin-left: 8px; }
.blocs .tbar span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--ink); }
.blocs .tbar i { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--muted); }
@media (max-width: 560px) { .blocs .tbar, .blocs .hide-sm { display: none; } }

/* counties */
.counties { width: 100%; border-collapse: collapse; font-size: .9375rem; margin-top: 4px; }
.counties th { text-align: left; font-weight: 400; color: var(--muted); font-size: .8125rem; padding: 0 0 6px; border-bottom: 1px solid var(--rule); }
.counties td { padding: 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.counties .n { text-align: right; padding-left: 12px; }
.counties th.n { text-align: right; }
.counties .st { display: block; font-size: .8125rem; color: var(--muted); }
.counties .st.bad { color: var(--ink); font-weight: 600; }
.counties .r { color: var(--lawler); font-weight: 600; }
.counties .d { color: var(--conley); font-weight: 600; }
main > section.wrap:not(.board):not(.gap) { margin-top: 48px; }

.about p { max-width: 66ch; color: var(--muted); margin-top: 10px; }
.foot { padding-top: 40px; padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
/* Gallop's credit: quiet at the top, a short card at the end. */
.topline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.byline { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; font-size: .8125rem; white-space: nowrap; }
.byline img { width: 28px; height: auto; }
.byline:hover { color: var(--ink); }
.maker { display: flex; align-items: center; gap: 18px; max-width: 560px; padding: 16px 20px; background: var(--raised); border-radius: 12px; color: var(--muted); text-decoration: none; font-size: .9375rem; line-height: 1.4; }
.maker img { flex: none; width: 96px; height: auto; }
.maker b { display: block; color: var(--ink); font-size: 1.0625rem; margin-bottom: 2px; }
.maker .go { display: block; margin-top: 6px; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.maker:hover b { text-decoration: underline; }

@media (min-width: 900px) {
  .map-shell { grid-template-columns: 1fr 300px; align-items: start; }
  .map { aspect-ratio: 1 / 1; }
  .mapside { position: sticky; top: 16px; display: grid; gap: 16px; }
  .detail { min-height: 140px; }
  .mapkey .legend { flex-direction: column; align-items: flex-start; margin-top: 0; }
  .detail .close { display: none; }
}
@media (max-width: 899px) {
  /* On phones the district panel docks to the bottom of the screen once a district is tapped. */
  .detail { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 10; box-shadow: 0 8px 30px rgba(14, 23, 38, .28); max-height: 55vh; overflow: auto; transform: translateY(calc(100% + 24px)); transition: transform .25s ease; }
  .detail.open { transform: none; }
  .detail .hint { display: none; }
}

/* buttons shared by the share bar, the feed and the table */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); background: var(--raised); color: var(--ink); border-radius: 8px; padding: 8px 12px; font-size: .875rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.small { padding: 6px 10px; font-size: .8125rem; font-weight: 400; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

/* before the count: the 2024 story in place of two zeros */
.board.pre .num, .board.pre .share, .board.pre .share-bar { display: none; }
.board.pre .animal { grid-row: 1 / 3; opacity: .16; }
.hook { grid-column: 1 / -1; grid-row: 2; margin-top: 18px; }
.hook-big { font: 700 clamp(2rem, 7.5vw, 3.75rem)/1 var(--cond); letter-spacing: -.005em; }
.hook-big span { display: inline-block; }
.hook-big span:last-child { color: var(--lawler); }
.hook-sub { margin-top: 12px; font-size: 1.0625rem; max-width: 56ch; color: var(--muted); }
.outside { grid-column: 1 / -1; grid-row: 7; margin-top: 4px; font-size: .9375rem; color: var(--muted); }
.outside b { font-weight: 600; } .outside b.r { color: var(--lawler); } .outside b.d { color: var(--conley); }
.outside span { color: var(--faint); }
.sharebar { grid-column: 1 / -1; grid-row: 9; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sharebar .wa { background: #1f7a4d; border-color: #1f7a4d; color: #fff; }
/* Phones: one row. The share sheet already offers copying, and "WhatsApp" alone is clear next to the logo. */
@media (max-width: 480px) {
  .sharebar { flex-wrap: nowrap; }
  .sharebar .btn { white-space: nowrap; }
  .sharebar .long, .sharebar.has-share #share-copy { display: none; }
}
@media (max-width: 350px) { .sharebar { flex-wrap: wrap; } }

/* the one big number in the Heimish section */
.bigstat { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.bigstat b { font: 700 clamp(3rem, 12vw, 5.5rem)/.9 var(--cond); color: var(--lawler); }
.bigstat span { font-size: 1.125rem; max-width: 30ch; line-height: 1.35; }

/* the night so far */
.night { margin-top: 48px; }
.night-grid { display: grid; gap: 24px; margin-top: 8px; }
@media (min-width: 900px) { .night-grid { grid-template-columns: 3fr 2fr; } }
.night h3 { margin-bottom: 8px; }
.chart svg { display: block; width: 100%; height: 220px; background: var(--raised); border-radius: 12px; }
.chart .zero { stroke: var(--rule); stroke-width: 1.5; }
.chart path { fill: none; stroke-width: 3; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart path.all { stroke: var(--ink); }
.chart path.out { stroke: var(--muted); stroke-dasharray: 6 4; }
.chart text { font-size: 12px; fill: var(--muted); }
.chart text.zero-label { font-size: 11px; fill: var(--faint); }
#chart-note b { font-weight: 600; } #chart-note b.r { color: var(--lawler); } #chart-note b.d { color: var(--conley); }
#chart-note .k { display: inline-block; width: 18px; height: 0; border-top: 3px solid var(--ink); margin: 0 4px 3px 8px; }
#chart-note .k:first-child { margin-left: 0; }
#chart-note .k.out { border-top: 3px dashed var(--muted); }
.feed { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.feed li { display: grid; grid-template-columns: 4.5em 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.feed time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .8125rem; padding-top: 2px; }
.feed b { font-weight: 600; } .feed b.r { color: var(--lawler); } .feed b.d { color: var(--conley); }
#feed-more { margin-top: 10px; }

/* map basemap */
.map .land { fill: var(--land); }
.map .parks { fill: var(--park); }
.map .water { fill: var(--water); pointer-events: none; }
.map .streets, .map .secondary { fill: none; stroke: var(--street); vector-effect: non-scaling-stroke; pointer-events: none; stroke-linecap: round; stroke-linejoin: round; }
.map .streets { stroke-width: .7px; display: none; opacity: .75; }
.map .secondary { stroke-width: 1.4px; display: none; }
.map.streets-on .secondary, .map.streets-on .streets { display: inline; }
.map .street-names { display: none; pointer-events: none; font-family: var(--sans); font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: var(--label-halo); stroke-linejoin: round; text-anchor: middle; dominant-baseline: central; }
.map.names-on .street-names { display: inline; }
.map.close .streets { opacity: 1; stroke-width: 1px; }
.map .me circle { fill: var(--ink); stroke: var(--raised); stroke-width: 3px; }
.locate { position: absolute; left: 10px; top: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); background: var(--raised); color: var(--ink); border-radius: 8px; padding: 8px 10px; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.locate svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.locate svg circle:first-child { fill: currentColor; stroke: none; }

/* villages in the district table */
.blocs tr.group td { padding-top: 0; padding-bottom: 0; font: 400 .9375rem/1.3 var(--sans); border-bottom: 1px solid var(--rule); }
.blocs tr.group td:first-child { font: 700 1.0625rem/1.2 var(--cond); }
.blocs tr.group button { display: grid; grid-template-columns: 8px 1fr; align-items: center; column-gap: 10px; width: 100%; padding: 10px 0; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
.blocs tr.group button small { grid-column: 2; margin-top: 2px; }
.blocs tr.group small { font: 400 .8125rem var(--sans); color: var(--muted); }
.blocs tr.group:hover td { background: var(--void); }
.blocs .chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s ease; flex: none; }
.blocs tr.group.open .chev { transform: rotate(45deg); }
.blocs tr.group.open td { border-bottom: 2px solid var(--ink); }
.blocs tr.ed td:first-child { padding-left: 16px; }
.blocs tr.tiny td { font-size: .8125rem; color: var(--muted); padding-left: 16px; }
.blocs tr.sep td { border: 0; padding: 10px 0 0; }
#expand-all { margin: 0 0 8px; }
.counties td.empty { color: var(--muted); }

/* the map's own zoom choice, docked on the map */
.map-zoom { position: absolute; left: 10px; bottom: 10px; z-index: 2; box-shadow: 0 1px 3px rgba(14, 23, 38, .25); }
.map-zoom button { padding: 6px 10px; font-size: .8125rem; }
.mapkey .legend { margin-top: 0; }
@media (max-width: 899px) { .mapkey { margin-top: 4px; } }

/* ---- sections, Oct 30: numbers as tiles and labels, explanation at the end ---- */
.barkey { grid-column: 1 / -1; grid-row: 5; display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: .8125rem; color: var(--muted); }
.barkey i { width: 22px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .45) 0 2px, rgba(0, 0, 0, .12) 2px 5px), var(--faint); }
.tiles { grid-column: 1 / -1; grid-row: 6; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
/* On wide screens the tiles size to their numbers instead of stretching across the page. */
@media (min-width: 700px) { .tiles { display: flex; flex-wrap: wrap; } .tiles > div { min-width: 170px; padding: 10px 18px 10px 14px; } }
.tiles > div { background: var(--raised); border-radius: 10px; padding: 10px 12px; }
.tiles dd { margin: 0; font: 700 clamp(1.25rem, 4.5vw, 1.75rem)/1.1 var(--cond); font-variant-numeric: tabular-nums; }
.tiles dd.r { color: var(--lawler); } .tiles dd.d { color: var(--conley); }
.tiles dt { font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.sharebar { grid-row: 8; }
.fine { grid-column: 1 / -1; grid-row: 9; margin-top: 10px; font-size: .8125rem; }
.fine a { color: var(--muted); }
.gap h2 { display: flex; align-items: center; gap: 10px; }
.info { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--muted); background: none; color: var(--muted); font: 700 .8125rem/1 var(--sans); font-style: italic; cursor: pointer; padding: 0; }
.info[aria-expanded="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.def { max-width: 56ch; font-size: .9375rem; color: var(--muted); background: var(--raised); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.without { margin: 6px 0 22px; }
/* One line at any width: the size follows the column, which is half the page on desktop. */
.without { container-type: inline-size; }
.w-big { font: 700 clamp(2.5rem, 13.5cqw, 5rem)/.95 var(--cond); font-variant-numeric: tabular-nums; white-space: nowrap; }
.w-big.r { color: var(--lawler); } .w-big.d { color: var(--conley); }
.w-label { margin-top: 6px; font-size: 1rem; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.w-label span { color: var(--muted); font-size: .9375rem; }
.w-label b { font-weight: 600; } .w-label b.r { color: var(--lawler); } .w-label b.d { color: var(--conley); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.chips li { background: var(--void); border-radius: 999px; padding: 4px 10px; font-size: .8125rem; color: var(--ink); }
.meter-note { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .875rem; }
.listview, #listview { margin-top: 4px; }
#listview h3 { font: 700 1.25rem/1.2 var(--cond); margin: 4px 0 6px; }
.gap-top { display: grid; gap: 8px 40px; margin-bottom: 18px; }
.gap-top .turnout { margin-top: 0; }
@media (min-width: 900px) { .gap-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } .gap-top .without { margin-bottom: 0; } }

/* toasts for new results while the page is open */
.toasts { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(420px, calc(100% - 24px)); display: grid; gap: 8px; z-index: 20; pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); border-radius: 12px; padding: 10px 14px; font-size: .9375rem; box-shadow: 0 8px 30px rgba(14, 23, 38, .3); animation: toast-in .25s ease; transition: opacity .5s ease, transform .5s ease; }
.toast b { font-weight: 700; }
.toast b.r { color: #ff8a84; } .toast b.d { color: #8db7ff; }
@media (prefers-color-scheme: dark) { .toast b.r { color: #b92e2a; } .toast b.d { color: #1e5aa8; } }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
#notify[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
