/* civic.css — the "City & wards" layer's own styles (CIVIC-BRIEF.md,
   2026-09-19). Its own file, linked from index.html, so the concurrent
   rebrand sitting owns app.css untouched. Everything inside the card
   reads the card's own tokens (--ink/--muted/--line/--accent), set by
   app.css on .tb-card, so this file never redefines a colour the card
   already owns. Accent = a neutral slate, on purpose: the layer shows
   every party's colour on the map, so its own chrome must belong to none. */
#card-civic { --accent: #7a8fa6; --accent-wash: #7a8fa626; }
:root { --civic-accent: #7a8fa6; --civic-station: #ffd23f; }   /* station = civic.js STATION_COLOUR */

/* The Wards on/off button -- see civic.js's _buildToggleButtons(). Shape
   and the outline-off / filled-on states come from app.css's shared
   `.layer-toggle`; this only supplies the colour. */
.civic-toggle { --accent: var(--civic-accent); }

/* Election strip -- date, countdown, status pill. */
.civic-election {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin: 0 0 10px;
  border: 1px solid var(--line); border-radius: 12px;
}
.civic-election-date { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.civic-election-date b { font-size: 14px; font-weight: 600; letter-spacing: 0.01em; }
.civic-election-date span { font-size: 12px; color: var(--muted); }
.civic-pill {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 4px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); background: var(--accent-wash);
}
.civic-pill[data-live="1"] { background: rgba(72, 187, 120, 0.18); }
.civic-pill[data-live="1"]::before {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #48bb78; margin-right: 6px; vertical-align: 0;
}

/* Leaderboard -- one row per party: swatch + name (text, never colour
   alone), wards held, thin bar. Marks are thin and text wears the text
   tokens (dataviz rule). */
.civic-board { display: flex; flex-direction: column; gap: 6px; margin: 0 0 6px; }
.civic-board-row { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; column-gap: 9px; row-gap: 3px; }
.civic-swatch { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(255,255,255,0.35) inset; }
.civic-board-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.civic-board-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.civic-board-bar { grid-column: 2 / 4; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.civic-board-bar i { display: block; height: 100%; border-radius: 2px; }
.civic-note { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin: 6px 0 12px; }

/* Section headings inside the card. */
.civic-h {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin: 14px 0 6px;
}

/* Ward rows reuse .row.place-row from app.css; only the swatch and the
   result chip are new. */
.civic-row .civic-swatch { margin-right: 10px; }
.civic-result { font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Same framed panel as the site's own .detail (app.css) -- it used to be a
   bare block with no side padding, so its text sat flush against the
   card's edge (caught 2026-09-23 on the station details). Link rows inside
   span the panel, text aligned with the panel's own. */
.civic-detail {
  margin: 0.1rem 8px 0.6rem;
  padding: 0.55rem 0.9rem 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.civic-detail .row { width: 100%; margin: 0; padding: 0 2px; }
.civic-detail .detail-kind { margin: 4px 0 2px; }
.civic-detail .eat-line { color: var(--muted); }
.civic-lines { display: flex; flex-direction: column; gap: 3px; margin: 4px 0 8px; font-size: 13px; }
.civic-lines span { display: flex; align-items: center; gap: 8px; }
.civic-lines .civic-pct { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.civic-lines .civic-counted { color: var(--muted); font-size: 12px; }
a.row.eat-link { text-decoration: none; color: inherit; }
.civic-sample {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 2px 6px; border-radius: 6px; margin-left: 8px;
  color: #1c2226; background: #ffd166; text-shadow: none; vertical-align: 1px;
}
.civic-src { font-size: 11px; color: var(--muted); margin: 2px 0 0; }

/* Where to vote (2026-09-23): the yellow dot is the map pin's own colour, so
   the list and the map read as one thing. */
.civic-vs-dot {
  flex: 0 0 auto;
  width: 10px; height: 10px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--civic-station);
  box-shadow: 0 0 0 1px rgba(22, 32, 43, 0.35);
}
.civic-note .civic-vs-dot { display: inline-block; vertical-align: -1px; margin-right: 6px; }
.civic-vs-ward[aria-expanded="true"] .row-name { font-weight: 600; }
.civic-vs-row { padding-left: 18px; }
