/* 2026 Election Dashboard — dark theme, zero dependencies */
:root {
  --bg: #0b1020;
  --bg2: #101830;
  --card: #151e3a;
  --card2: #1b2648;
  --line: #263156;
  --text: #e8ecf7;
  --muted: #8d97b8;
  --dem: #3b82f6;
  --dem-soft: #1e3a6e;
  --rep: #ef4444;
  --rep-soft: #6e1e23;
  --other: #a855f7;
  --gold: #f59e0b;
  --green: #22c55e;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  color: var(--text);
  min-height: 100vh;
}

/* ---------- header ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px 10px;
  flex-wrap: wrap;
}
.brand h1 { margin: 0; font-size: 24px; letter-spacing: 0.3px; }
.home-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12.5px;
  letter-spacing: .3px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.home-link:hover { color: var(--text); border-bottom-color: var(--line); }
.subline { color: var(--muted); font-size: 13px; margin-top: 3px; }
.scope-note { font-size: 11.5px; opacity: 0.8; margin-top: 5px; max-width: 720px; }

.status-cluster { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--card); white-space: nowrap;
}
.pill-phase.pre { color: var(--gold); border-color: #5a4413; }
.pill-phase.post { color: var(--green); border-color: #14532d; }
.pill-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill-live.ok .dot { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.6s infinite; }
.pill-live.err .dot { background: var(--rep); }
@keyframes pulse { 50% { opacity: 0.45; } }

.muted { color: var(--muted); font-size: 12.5px; }

.ghost-btn {
  background: transparent; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 12px; cursor: pointer; font-size: 13px;
}
.ghost-btn:hover { border-color: var(--muted); }
.ghost-btn:disabled { opacity: 0.5; cursor: wait; }

/* ---------- tabs ---------- */
.tabs {
  display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(11, 16, 32, 0.94);
  backdrop-filter: blur(6px); z-index: 5; overflow-x: auto;
}
.tab {
  background: none; border: none; color: var(--muted); padding: 12px 16px;
  font-size: 14.5px; font-weight: 600; cursor: pointer;
  border-bottom: 2.5px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--gold); }

main { padding: 20px 22px 60px; max-width: 1380px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; }

.section-title { font-size: 15px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); margin: 26px 0 12px; }

/* ---------- summary cards ---------- */
.summary-row { display: flex; gap: 14px; flex-wrap: wrap; }
.summary-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; min-width: 180px; flex: 1;
}
.summary-card.wide { flex: 3; }
.summary-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; }
.summary-value { font-size: 30px; font-weight: 700; margin-top: 4px; }
.summary-note { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---------- seat bar ---------- */
.seat-bar {
  display: flex; height: 22px; border-radius: 6px; overflow: hidden;
  background: var(--card2); margin-top: 10px; border: 1px solid var(--line);
  position: relative;
}
.seat-bar.big { height: 34px; }
.seat-bar .seg { height: 100%; transition: width 0.6s ease; position: relative; min-width: 0; }
.seat-bar .seg.dem { background: var(--dem); }
.seat-bar .seg.other { background: var(--other); }
.seat-bar .seg.rep { background: var(--rep); }
.seat-bar .seg.undecided { background: var(--card2); }
.seat-bar .majority-mark {
  position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; opacity: 0.85; z-index: 2;
}

/* ---------- tile map ---------- */
.tilemap-note { font-size: 12.5px; margin-bottom: 10px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; border: 1px solid rgba(255,255,255,0.15); }
.swatch.dem { background: var(--dem); }
.swatch.rep { background: var(--rep); }
.swatch.other { background: var(--other); }
.swatch.no-race { background: #232c4e; }
.swatch.split { background: linear-gradient(135deg, var(--dem) 0 50%, var(--rep) 50% 100%); }
.swatch.pending { background: repeating-linear-gradient(45deg, #2a3358, #2a3358 3px, #1d2544 3px, #1d2544 6px); }

.tilemap {
  display: grid;
  grid-template-columns: repeat(11, minmax(52px, 1fr));
  gap: 6px;
}
@media (max-width: 900px) { .tilemap { grid-template-columns: repeat(8, minmax(46px, 1fr)); } }
@media (max-width: 600px) { .tilemap { grid-template-columns: repeat(6, minmax(44px, 1fr)); } }

.tile {
  aspect-ratio: 1.25 / 1; border-radius: 8px; border: 1px solid var(--line);
  background: #232c4e; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px; cursor: default;
  font-size: 13px; font-weight: 700; position: relative; transition: transform 0.08s;
}
.tile:hover { transform: scale(1.06); z-index: 3; }
.tile .pct { font-size: 10px; font-weight: 600; opacity: 0.95; }
.tile.dem { background: var(--dem-soft); border-color: var(--dem); }
.tile.rep { background: var(--rep-soft); border-color: var(--rep); }
.tile.other { background: #3b2360; border-color: var(--other); }
.tile.pending { background: repeating-linear-gradient(45deg, #2a3358, #2a3358 4px, #1d2544 4px, #1d2544 8px); }
.tile.no-race { opacity: 0.38; }
/* States with no 2026 race still show their current senators, so they render at
   full strength instead of the old faded "no-race" look. */
.tile.no-race.dem, .tile.no-race.rep, .tile.no-race.other,
.tile.no-race.ind-dem, .tile.no-race.ind-rep { opacity: 1; font-weight: 700; }
.tile.no-race.ind-dem, .tile.no-race.ind-rep { color: #10203a; }
.tile.no-race.split { font-weight: 700; }
.tile.no-race.other { color: #16233f; }
.tile.no-race.split { color: #f3f4f6; text-shadow: 0 1px 3px rgba(0,0,0,0.75); }
.cur-sen { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; margin: 0 2px; }
.cur-sen.dem { background: rgba(59,130,246,0.2); color: #93c5fd; border: 1px solid rgba(59,130,246,0.5); }
.cur-sen.rep { background: rgba(239,68,68,0.2); color: #fca5a5; border: 1px solid rgba(239,68,68,0.5); }
.cur-sen.ind-dem { background: rgba(91,143,214,0.22); color: #bfdbfe; border: 1px solid rgba(91,143,214,0.6); }
.cur-sen.ind-rep { background: rgba(214,124,124,0.22); color: #fecaca; border: 1px solid rgba(214,124,124,0.6); }
.cur-sen.other { background: #e5e7eb; color: #1f2937; border: 1px solid #9ca3af; }
.tile.called::after {
  content: "★"; position: absolute; top: 2px; right: 5px; font-size: 9px; color: var(--gold);
}
.tile .special-badge {
  position: absolute; top: 2px; left: 4px; font-size: 8px; color: var(--gold); font-weight: 800;
}

/* ---------- race cards ---------- */
.race-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.race-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px;
}
.race-card h3 { margin: 0 0 2px; font-size: 15px; display: flex; justify-content: space-between; gap: 8px; }
.race-card .seat-kind { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.race-card .no-race-note { color: var(--muted); font-size: 13px; font-style: italic; }
.cand-row { display: grid; grid-template-columns: 18px 1fr auto auto; gap: 8px; align-items: center; margin-top: 8px; font-size: 13.5px; }
.cand-row .rank { color: var(--muted); font-size: 11px; }
.cand-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand-row .name .inc { color: var(--gold); font-size: 10px; margin-left: 4px; }
.cand-row .votes { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.cand-row .pct { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 52px; text-align: right; }
.cand-row.leader .name { font-weight: 700; }
.cand-row .bar-wrap { grid-column: 2 / 5; height: 5px; background: var(--card2); border-radius: 3px; overflow: hidden; margin-top: -3px; }
.cand-row .bar { height: 100%; border-radius: 3px; transition: width 0.6s; }
.party-DEM .bar { background: var(--dem); }
.party-REP .bar { background: var(--rep); }
.party-other .bar { background: var(--other); }
.badge { font-size: 10.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.won { color: var(--gold); border-color: var(--gold); }
.badge.live { color: var(--green); border-color: var(--green); }
.race-meta { margin-top: 9px; font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* ---------- house states ---------- */
.filter-row { display: flex; gap: 14px; align-items: center; margin: 16px 0; flex-wrap: wrap; }
#state-filter {
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 8px 12px; font-size: 14px; min-width: 240px;
}
.checkbox { color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; }

.state-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
@media (max-width: 560px) { .state-list { grid-template-columns: 1fr; } }

.state-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.state-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 11px 15px; cursor: pointer; user-select: none;
}
.state-head:hover { background: var(--card2); }
.state-head h3 { margin: 0; font-size: 15px; }
.state-head .mini-bar { display: flex; height: 10px; width: 170px; border-radius: 5px; overflow: hidden; background: var(--card2); border: 1px solid var(--line); }
.state-head .mini-bar .seg { height: 100%; }
.state-head .seg.dem { background: var(--dem); }
.state-head .seg.rep { background: var(--rep); }
.state-head .seg.other { background: var(--other); }
.state-head .seg.pending { background: #2a3358; }
.state-head .status-tag { font-size: 11px; color: var(--muted); }

.state-body { display: none; border-top: 1px solid var(--line); padding: 10px 15px 14px; }
.state-card.open .state-body { display: block; }
.district-row {
  display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center;
  padding: 7px 0; border-bottom: 1px dashed #202a4d; font-size: 13px;
}
.district-row:last-child { border-bottom: none; }
.district-row .dist-no { color: var(--muted); font-weight: 700; font-size: 12px; }
.district-row .dist-results { display: flex; flex-direction: column; gap: 3px; }
.district-row .winner-line { display: flex; justify-content: space-between; gap: 8px; }
.district-row .winner-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.district-row .winner-name .won-star { color: var(--gold); }
.district-row .opponent-line { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.pending-note { color: var(--muted); font-size: 13px; font-style: italic; padding: 10px 0; }
.pending-note code { background: var(--card2); padding: 2px 6px; border-radius: 5px; font-size: 12px; }

/* ---------- ballot measures ---------- */
.measures-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; margin-top: 14px; }
.measure-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.measure-head { display: flex; align-items: baseline; gap: 10px; }
.measure-no { font-size: 21px; font-weight: 800; color: var(--gold); }
.measure-title { font-size: 13.5px; line-height: 1.45; color: var(--text); }
.yesno { margin-top: 13px; }
.yesno-row { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 4px; }
.yesno-row .lbl { font-weight: 800; letter-spacing: 0.5px; }
.yesno-row .lbl.yes { color: var(--green); }
.yesno-row .lbl.no { color: var(--rep); }
.yesno-row .num { color: var(--muted); font-variant-numeric: tabular-nums; }
.yesno-row .pct { font-weight: 800; font-variant-numeric: tabular-nums; margin-left: 10px; color: var(--text); }
.yesno-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--card2); position: relative; }
.yesno-bar .yes-seg { background: var(--green); transition: width 0.6s; }
.yesno-bar .no-seg { background: var(--rep); transition: width 0.6s; }
.yesno-bar .thresh { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; opacity: 0.9; z-index: 2; box-shadow: 0 0 0 1px rgba(0,0,0,0.35); }
.measure-meta { margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.measure-card.leading-yes { border-color: #14532d; }
.measure-card.leading-no { border-color: #5a1e23; }

.fineprint { color: var(--muted); font-size: 12px; margin-top: 18px; line-height: 1.5; max-width: 900px; }

/* ---------- sources ---------- */
.sources-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.source-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; }
.source-card h3 { margin: 0 0 6px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.source-card .src-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.source-card .src-dot.ok { background: var(--green); box-shadow: 0 0 8px var(--green); }
.source-card .src-dot.err { background: var(--rep); }
.source-card .src-dot.off { background: #555f85; }
.source-card p { margin: 6px 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.source-card code { background: var(--card2); padding: 2px 6px; border-radius: 5px; font-size: 12px; }

/* ---------- state coverage tracker ---------- */
.coverage-summary { max-width: 960px; }
.cov-nationwide {
  background: linear-gradient(180deg, rgba(34,197,94,0.12), rgba(34,197,94,0.04));
  border: 1px solid rgba(34, 197, 94, 0.45);
  border-radius: 12px; padding: 12px 15px; margin-bottom: 20px;
  font-size: 14px; line-height: 1.55; color: var(--text);
}
.cov-nationwide strong { color: #6ee7a4; font-size: 16px; }
.cov-nationwide a { color: var(--dem); }
.cov-nw-badge {
  display: inline-block; margin-right: 8px; padding: 2px 9px; border-radius: 999px;
  background: rgba(34,197,94,0.2); color: #6ee7a4; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px; vertical-align: 1px;
}
.cov-subhead {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); margin-bottom: 12px;
}
.cov-subnote {
  color: var(--muted); font-size: 12.5px; line-height: 1.6; max-width: 900px;
  margin: -4px 0 12px;
}
.cov-headline { font-size: 14.5px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.cov-headline strong { color: var(--text); font-size: 17px; }
.cov-headline-2 { margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.cov-headline-2 strong { font-size: 15px; }
.cov-pct {
  margin-left: auto; font-variant-numeric: tabular-nums; color: var(--gold);
  font-weight: 700; font-size: 15px;
}
.cov-bar {
  height: 8px; background: var(--card2); border-radius: 999px; overflow: hidden;
  margin: 9px 0 16px; border: 1px solid var(--line);
}
.cov-bar span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #16a34a);
  transition: width 0.4s ease;
}
.cov-row { display: flex; gap: 12px; align-items: baseline; margin-bottom: 10px; }
.cov-label { flex: 0 0 220px; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.5px; }
.cov-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cov-chip {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px;
  font-weight: 600; border: 1px solid var(--line); cursor: default;
  font-variant-numeric: tabular-nums;
}
.cov-chip.ok { background: rgba(34, 197, 94, 0.14); border-color: rgba(34, 197, 94, 0.5); color: #6ee7a4; }
.cov-chip.pending { background: rgba(245, 158, 11, 0.14); border-color: rgba(245, 158, 11, 0.5); color: #fcd34d; }
.cov-chip.off { background: var(--card2); color: var(--muted); }
.cov-note { color: var(--muted); font-size: 12.5px; line-height: 1.6; max-width: 900px; margin-top: 14px; }
.cov-note code { background: var(--card2); padding: 2px 6px; border-radius: 5px; font-size: 12px; }
.cov-updated { display: block; margin-top: 4px; opacity: 0.75; }

.about { line-height: 1.7; font-size: 14px; max-width: 900px; color: var(--text); padding-left: 20px; }
.about code { background: var(--card2); padding: 2px 6px; border-radius: 5px; font-size: 12.5px; }
.about a { color: var(--dem); }
.endpoints code { color: var(--gold); }

.footer {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
  padding: 18px 22px 30px; color: var(--muted); font-size: 12px;
  border-top: 1px solid var(--line); margin-top: 30px;
}
.footer-sep { opacity: 0.6; }
#sources-link { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
#sources-link:hover { color: var(--text); }

/* spinner for initial load */
.loading-block { color: var(--muted); font-size: 14px; padding: 26px 6px; }

/* ---------- updates ticker (crawl) ---------- */
.ticker {
  display: flex; align-items: center; gap: 14px;
  background: #080d1b; border-bottom: 1px solid var(--line);
  padding: 7px 22px; overflow: hidden;
}
.ticker-label {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--gold);
  background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 9px; border-radius: 999px;
}
.ticker-viewport { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 2%, #000 98%, transparent); }
.ticker-track {
  display: flex; list-style: none; margin: 0; padding: 0;
  white-space: nowrap; width: max-content;
  animation: ticker-scroll 80s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  display: inline-flex; align-items: baseline; gap: 8px; margin-right: 44px; font-size: 13px;
}
.ticker-item a { color: var(--text); text-decoration: none; }
.ticker-item a:hover { color: var(--gold); text-decoration: underline; }
.ticker-item .ticker-time { color: var(--muted); font-size: 11.5px; }
.ticker-item.muted { color: var(--muted); }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- early voting ---------- */
.ev-toggle { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.ev-tab {
  background: var(--card); color: var(--muted); border: none;
  padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.ev-tab + .ev-tab { border-left: 1px solid var(--line); }
.ev-tab.active { background: var(--dem); color: #fff; }

.ev-tile { color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
.ev-tile .pct { font-size: 10px; font-weight: 700; }

.ev-table {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--card);
}
.ev-row {
  display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(3, minmax(90px, 1fr));
  align-items: center; padding: 9px 15px; border-bottom: 1px solid #202a4d; font-size: 13.5px;
}
.ev-row:last-child { border-bottom: none; }
.ev-row.ev-head {
  background: var(--card2); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--muted);
}
.ev-state { font-weight: 600; display: flex; flex-direction: column; gap: 3px; }
.ev-state .status-tag { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.ev-cell { text-align: right; font-variant-numeric: tabular-nums; }
.ev-cell.hi { color: var(--gold); font-weight: 700; }
.ev-sortable { cursor: pointer; user-select: none; }
.ev-sortable:hover { color: var(--text); }
.ev-party {
  display: flex; height: 5px; width: 100%; max-width: 180px; border-radius: 3px;
  overflow: hidden; background: var(--card2); margin-top: 3px;
}
.ev-party .seg { height: 100%; }
.ev-party .seg.dem { background: var(--dem); }
.ev-party .seg.rep { background: var(--rep); }
.ev-party .seg.other { background: var(--other); }
@media (max-width: 600px) {
  .ev-row { grid-template-columns: minmax(90px, 1.4fr) repeat(3, minmax(62px, 1fr)); font-size: 12.5px; }
}

/* ---------- sources & setup modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(4, 8, 20, 0.78);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 32px 16px; overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  max-width: 940px; width: 100%; padding: 24px 28px 34px; position: relative;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}
.modal .section-title:first-of-type { margin-top: 0; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; line-height: 1;
}
.modal-close:hover { color: var(--text); border-color: var(--muted); }
body.modal-open { overflow: hidden; }


/* ---------- race-call notifications (added 2026-10-30) ---------- */
#notify-toggle.on { color: var(--gold); border-color: var(--gold); }
.call-toasts {
  position: fixed; top: 64px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  width: min(380px, calc(100vw - 32px)); pointer-events: none;
}
.call-toast {
  pointer-events: auto;
  background: linear-gradient(180deg, var(--card2) 0%, var(--card) 100%);
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 12px 14px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  opacity: 0; transform: translateX(24px); transition: opacity .3s ease, transform .3s ease;
  position: relative;
}
.call-toast.in { opacity: 1; transform: translateX(0); }
.call-toast.out { opacity: 0; transform: translateX(24px); }
.call-toast .ct-title { font-weight: 700; font-size: 15px; margin: 0 0 6px; padding-right: 18px; }
.call-toast .ct-close {
  position: absolute; top: 6px; right: 8px; background: none; border: 0;
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.call-toast .ct-close:hover { color: var(--text); }
.call-toast .ct-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.call-toast .ct-list li { font-size: 13px; line-height: 1.35; }
.call-toast .ct-kind { color: var(--muted); }
.call-toast .ct-chip {
  display: inline-block; min-width: 16px; text-align: center; font-size: 11px; font-weight: 700;
  color: #fff; border-radius: 4px; padding: 0 5px; margin-right: 6px;
}
.call-toast .ct-chip.dem { background: var(--dem); }
.call-toast .ct-chip.rep { background: var(--rep); }
.call-toast .ct-chip.other { background: var(--other); }
.call-toast .ct-foot { margin-top: 8px; font-size: 11px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .call-toast { transition: opacity .2s ease; transform: none; }
  .call-toast.in, .call-toast.out { transform: none; }
}
