/* 2026 election results page: dark mode by default (html.theme-dark), on top of site.css. */
html.theme-dark {
  color-scheme: dark;
  --ink: #e6e9e4;
  --muted: #a7b0a9;
  --paper: #121513;
  --card: #1b201d;
  --line: #333b36;
  --accent: #7cc4a2;
  --accent-soft: #1d2f27;
  --warn: #f0c27a;
  --warn-soft: #2c2418;
}
html.theme-dark th { background: #222824; }
html.theme-dark .sources code { background: #222824; }

.er-banner {
  border: 1px solid var(--warn);
  border-left-width: 4px;
  background: var(--warn-soft);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}
.er-banner strong { color: var(--warn); }
.er-jump { font-size: 0.92rem; color: var(--muted); }
.er-card { min-width: 0; }
.er-card h3 { margin-bottom: 0.4rem; }
.er-table, .er-matrix, .er-glance { margin: 0.3rem 0 0.3rem; font-size: 0.9rem; }
.er-table caption, .er-matrix caption, .er-glance caption { text-align: left; font-size: 0.82rem; color: var(--muted); padding-bottom: 0.25rem; }
.er-table th[scope="row"], .er-glance th[scope="row"], .er-matrix th[scope="row"] { font-weight: 600; background: transparent; }
.er-party { color: var(--muted); font-size: 0.85rem; }
.er-leader th, .er-leader td { color: var(--accent); }
.er-lead { color: var(--accent); }
.er-minor th, .er-minor td { font-weight: normal !important; color: var(--muted); font-size: 0.85rem; }
.er-foot { font-size: 0.84rem; color: var(--muted); margin: 0.2rem 0 0.6rem; }
.er-flag { border-left: 3px solid var(--warn); padding: 0.3rem 0 0.3rem 0.6rem; font-size: 0.9rem; }
.er-towns { margin: 0.4rem 0 0.8rem; }
.er-towns summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; min-height: 1.6rem; }
.er-matrix { font-size: 0.82rem; white-space: nowrap; }
.er-matrix th, .er-matrix td { padding: 0.3rem 0.4rem; }
.er-home th, .er-home td { background: var(--accent-soft) !important; }
.er-total th, .er-total td { font-weight: 700; border-top: 2px solid var(--muted); }
.er-measures { padding-left: 1.2rem; }
.er-measures li { margin: 0 0 0.4rem; }
.er-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0 1rem; }
.er-summary td { font-size: 0.88rem; }
main.wrap, .table-scroll { min-width: 0; }
@media (max-width: 420px) {
  .er-table, .er-glance { font-size: 0.82rem; }
  .er-table th, .er-table td, .er-glance th, .er-glance td { padding: 0.3rem 0.3rem; }
}
