:root { --navy: #0b1f44; --navy-deep: #071222; --gold: #d4af37; --ink: #1f2937; --cream: #faf7f2; --sand: #e7e1d6; --muted: #6b7280; --dem: #3b6fd6; --gop: #c0392b; --oth: #3a4f7a; --ok: #2e9e5b; --warn: #e08a1e; --bad: #b11e2d; --serif: Georgia, "Iowan Old Style", serif; --sans: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: light; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.45; }
a { color: var(--navy); }
.topbar { background: var(--navy-deep); color: #fff; padding: 10px 16px; display: flex; align-items: center; gap: 12px; font-size: 13px; position: sticky; top: 0; z-index: 5; }
.topbar b { font-family: var(--serif); color: var(--gold); font-size: 17px; font-weight: 400; }
.topbar .subbrand { font-family: var(--serif); color: #fff; font-size: 15px; padding-left: 10px; margin-left: -4px; border-left: 1px solid #3a4f7a; letter-spacing: .01em; }
.topbar .tag { color: #c7cfdf; }
.topbar a.back { color: #c7cfdf; font-size: 12.5px; margin-left: 6px; }
.topbar a:hover .subbrand, .topbar a:hover b { text-decoration: none; }
.topbar a { color: #fff; text-decoration: none; }
.status { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: #c7cfdf; font-size: 12px; text-align: right; white-space: nowrap; }
@media (max-width: 640px) { .topbar .tag { display: none; } .status .long { display: none; } }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.off { background: #777; }
.testbanner { background: var(--warn); color: #1a1200; font-size: 12px; font-weight: 700; text-align: center; padding: 4px 10px; letter-spacing: .04em; }
main { max-width: 1100px; margin: 0 auto; padding: 14px 16px 60px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; align-items: center; }
.chip { font-size: 12.5px; padding: 4px 10px; border: 1px solid var(--sand); border-radius: 14px; background: #fff; color: var(--ink); cursor: pointer; }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.filters select, .filters input { font: inherit; font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--sand); border-radius: 6px; background: #fff; }
.race { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center; padding: 9px 8px; margin: 0 -8px; border-bottom: 1px solid var(--sand); border-radius: 6px; transition: background .12s; }
.race:hover { background: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.race:hover .nm { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.race .who { cursor: pointer; }
.race .star { color: #c9c3b6; font-size: 20px; text-align: center; cursor: pointer; user-select: none; } .race .star.on { color: var(--gold); }
.race .who { display: flex; align-items: center; gap: 8px; min-width: 0; text-decoration: none; color: inherit; }
.race .who > .txt { min-width: 0; display: block; flex: 1; }
.faces { display: flex; flex: none; align-items: center; }
.face { position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%; background: #16244a; border: 2.5px solid #c9c3b6; box-sizing: border-box; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; }
.face img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.faces .face + .face { margin-left: -10px; }
.faces .face:nth-child(1) { z-index: 3; } .faces .face:nth-child(2) { z-index: 2; } .faces .face:nth-child(3) { z-index: 1; }
.face.ind { border-color: var(--gold); }
.face.dem { border-color: #8fb0ea; }
.face.gop { border-color: #e39a90; }
.face.oth { border-color: #9aa7bd; }
.face.side { font-size: 9.5px; letter-spacing: .02em; border-radius: 8px; }
.face.side.yes { background: var(--navy); border-color: var(--navy); } .face.side.no { background: #8a93a6; border-color: #8a93a6; }
.kind { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; padding: 1px 5px; border-radius: 3px; background: #ebe6db; color: #5b5648; vertical-align: 1px; margin-right: 4px; }
.kind.k-governor { background: #e4e9f5; color: #1f3a6e; } .kind.k-statewide { background: #eef0f4; color: #3a4f7a; } .kind.k-measure { background: #e9e4f3; color: #4b3b78; } .kind.k-local { background: #e4f1ea; color: #1c6b3c; }
.filters .sep { width: 1px; height: 18px; background: var(--sand); margin: 0 2px; }
.race .nm .mt { font-weight: 400; }
.race .nm { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race .sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.race .num { text-align: right; font-variant-numeric: tabular-nums; min-width: 60px; }
.race .num b { font-size: 16px; display: block; }
.race .num span { font-size: 11px; color: var(--muted); }
.pill { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 3px; letter-spacing: .03em; vertical-align: 1px; }
.pill.counting { background: #e8edf6; color: #1f3a6e; } .pill.open { background: #eee; color: #555; } .pill.call { background: var(--gold); color: #1a1600; }
.p { display: inline-block; min-width: 1.6em; text-align: center; font-weight: 700; border-radius: 3px; padding: 0 4px; font-size: 10px; color: #fff; background: var(--oth); }
.p.dem { background: var(--dem); } .p.gop { background: var(--gop); } .p.ind { background: var(--gold); color: #1a1600; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }
.pinned { margin: 0 0 14px; padding: 6px 12px 4px; background: #fff; border: 1px solid var(--gold); border-radius: 8px; }
.pinned h2 { font-family: var(--serif); font-weight: 400; font-size: 17px; color: var(--navy); margin: 4px 0 2px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pinned h2::before { content: "★"; color: var(--gold); font-size: 15px; }
.pinned h2 span { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.pinned .race:last-child { border-bottom: 0; }
.pinned.empty-state { border-style: dashed; background: transparent; text-align: center; padding: 18px 16px 16px; }
.pinned.empty-state h2 { justify-content: center; }
.pinned.empty-state p { margin: 4px auto 0; max-width: 46ch; font-size: 13.5px; color: var(--muted); }
.pinned.empty-state .starhint { color: var(--gold); font-size: 17px; font-weight: 400; vertical-align: -1px; }
.asof { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--sand); flex-wrap: wrap; }

/* race page */
.racehead h1 { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--navy); margin: 6px 0 2px; }
.racehead .sub { font-size: 12.5px; color: var(--muted); }
.racehead h1 .kind { font-size: 11px; vertical-align: 5px; }
.measure { background: #fff; border: 1px solid var(--sand); border-radius: 6px; padding: 10px 14px; margin: 10px 0 0; font-size: 14px; }
.measure p { margin: 4px 0; } .measure .cat { color: var(--muted); font-size: 12.5px; }
.bars { display: grid; gap: 8px; margin: 12px 0; }
.row { display: grid; grid-template-columns: minmax(120px, 170px) 1fr 52px 80px; gap: 8px; align-items: center; font-size: 13.5px; }
.row .cand { display: flex; align-items: center; gap: 7px; min-width: 0; }
.row .cand .face { width: 30px; height: 30px; font-size: 10px; }
.row .cand span.n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .bar { height: 16px; background: #eee; border-radius: 3px; overflow: hidden; } .row .bar i { display: block; height: 100%; transition: width .6s; }
.row.ind .bar i { background: var(--gold); } .row.gop .bar i { background: var(--gop); } .row.dem .bar i { background: var(--dem); } .row.oth .bar i { background: var(--oth); }
.row .pc { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; } .row .vt { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.kpi { background: #fff; border: 1px solid var(--sand); border-radius: 6px; padding: 8px 10px; }
.kpi b { display: block; font-size: 22px; font-family: var(--serif); font-weight: 400; color: var(--navy); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 11.5px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 860px) { .grid2 { grid-template-columns: 1fr 1fr; align-items: start; } }
.countymap { background: var(--navy-deep); border-radius: 8px; padding: 8px; position: relative; }
.countymap svg { display: block; width: 100%; height: auto; }
.countymap .tip { position: absolute; left: 10px; top: 10px; background: rgba(7,18,34,.92); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 4px; pointer-events: none; display: none; max-width: 70%; }
.legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); margin: 6px 0; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
table.ct { border-collapse: collapse; width: 100%; font-size: 12.5px; background: #fff; border: 1px solid var(--sand); border-radius: 6px; }
table.ct th, table.ct td { padding: 6px 8px; border-bottom: 1px solid var(--sand); text-align: left; }
table.ct th { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); cursor: pointer; white-space: nowrap; position: sticky; top: 44px; background: #fbfaf7; }
table.ct td.r, table.ct th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.ct tr.hl td { background: #fff7dc; }
table.ct tr { cursor: pointer; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
footer { font-size: 12px; color: var(--muted); max-width: 1100px; margin: 0 auto; padding: 0 16px 30px; }

/* Winner mark: green check beside a candidate once AP has called the race. */
.win { color: var(--ok); font-weight: 700; margin-left: 4px; }
