/* The early vote page (scripts/_early_page.py, site/src/early.js). */
.ev-head { margin: 8px 0 28px; }
.ev-kick { margin: 0 0 10px; font: 600 13px var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.ev-kick a { color: var(--accent); text-decoration: none; }
.ev-kick a:hover { text-decoration: underline; }
.ev-deck { max-width: 720px; margin: 14px 0 8px; font: 400 18px/1.5 var(--serif); color: var(--body); }
.ev-asof { margin: 0; font: 500 14px var(--sans); color: var(--mute); }
/* Compare with 2022 / 2018 */
.ev-vs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
.ev-vs[hidden] { display: none; }
.ev-vs .lab { font: 600 13px var(--sans); color: var(--mute); }
.ev-vs-note { font: 400 13px/1.4 var(--sans); color: var(--soft); }

.ev-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 40px; }
.ev-stat { background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; padding: 14px 16px; }
.ev-stat .lab { font: 600 12.5px var(--sans); color: var(--mute); }
.ev-stat .num { font: 700 32px/1.15 var(--serif); margin: 4px 0; font-variant-numeric: tabular-nums; }
.ev-stat .sub { font: 400 13px/1.35 var(--sans); color: var(--soft); }

.ev-sec { margin: 0 0 48px; }
.ev-sec h2 { margin: 0 0 6px; font: 700 26px/1.2 var(--serif); }
.ev-sub { margin: 0 0 16px; max-width: 760px; font: 400 15px/1.5 var(--sans); color: var(--body); }
.ev-note { max-width: 760px; margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--rule); font: 400 14px/1.5 var(--sans); color: var(--body); }

/* The way back to the results page */
.ev-results { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 28px; margin: -24px 0 44px; padding: 14px 18px; background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; text-decoration: none; color: var(--ink); }
.ev-results:hover { border-color: var(--ink); }
.ev-results .er-txt { display: flex; flex-direction: column; gap: 3px; }
.ev-results .er-kick { font: 600 12px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.ev-results .er-head { font: 700 22px/1.2 var(--serif); }
.ev-results .er-sub { font: 400 14px/1.4 var(--sans); color: var(--soft); max-width: 620px; }
.ev-results .er-go { white-space: nowrap; }
@media (max-width: 640px) {
  .ev-results { grid-template-columns: 1fr; }
  .ev-results .er-go { justify-self: start; }
}

/* The pace */
.ev-chart { background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; padding: 12px 8px 4px; }
.ev-chart svg { display: block; width: 100%; height: auto; }
.ev-chart .grid { stroke: #ebe9e2; stroke-width: 1; }
.ev-chart .ax { font: 400 11.5px var(--sans); fill: var(--faint); }
.ev-chart .ax-note { font-size: 10.5px; font-style: italic; }
.ev-chart .then { fill: none; stroke: #a8a49a; stroke-width: 2; stroke-dasharray: 5 4; }
.ev-chart .now { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.ev-chart .now-dot { fill: var(--ink); }
.ev-chart .then-dot { fill: #fff; stroke: #a8a49a; stroke-width: 2; }
.ev-chart .lab-now { font: 700 13px var(--sans); fill: var(--ink); }
.ev-chart .lab-then { font: 500 12px var(--sans); fill: var(--faint); }

/* Who has voted */
.ev-who { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); align-items: stretch; }
.ev-panel { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; padding: 14px 16px 10px; }
/* Cards side by side share a height; their rows spread to fill it. */
.ev-rows { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; gap: 4px; }
.ev-panel h3 { margin: 0 0 10px; font: 600 15px var(--sans); }
.ev-row { display: grid; grid-template-columns: 130px 1fr 96px; align-items: center; gap: 10px; min-height: 30px; }
.ev-row .nm { font: 500 13.5px var(--sans); }
.ev-row .trk { position: relative; height: 18px; border-bottom: 1px solid var(--rule); }
.ev-row .gap { position: absolute; top: 8px; height: 2px; background: #cfccc2; }
.ev-row .d-now, .ev-row .d-then { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; box-sizing: border-box; }
.ev-row .d-then { background: #fff; border: 2px solid; }
.ev-row .val { text-align: right; font: 400 13px var(--sans); font-variant-numeric: tabular-nums; }
.ev-row .val b { font-weight: 600; }
.ev-row .val small { display: block; font-size: 11.5px; color: var(--faint); }
.k-now, .k-then { display: inline-block; width: 11px; height: 11px; border-radius: 50%; vertical-align: -1px; box-sizing: border-box; }
.k-now { background: var(--ink); }
.k-then { border: 2px solid var(--ink); background: #fff; }

/* Turnout within each party */
.ev-psub { margin: -4px 0 10px; font: 400 13px/1.4 var(--sans); color: var(--soft); }

/* Mail ballots */
.ev-mailbar { display: flex; height: 22px; border-radius: 4px; overflow: hidden; background: #dedcd4; }
.ev-mailkey { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font: 400 13.5px var(--sans); font-variant-numeric: tabular-nums; }
.ev-mailkey i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ev-mailkey b { font-weight: 600; }
.ev-mailkey small { color: var(--faint); font-size: 12px; }

/* The map */
.ev-mapctl { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 10px; }
.ev-mapctl .ev-pick[hidden] { display: none; }
/* The page's segmented controls: compare with, the map's views, the party. */
.ev-vs .seg, .ev-mapctl .seg { display: inline-flex; border: 1px solid #cfccc2; border-radius: 999px; overflow: hidden; background: var(--surface); }
.ev-vs .seg button, .ev-mapctl .seg button { font: 500 14px/1 var(--sans); min-height: 40px; padding: 0 16px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.ev-vs .seg button + button, .ev-mapctl .seg button + button { border-left: 1px solid #cfccc2; }
.ev-vs .seg button[aria-pressed="true"], .ev-mapctl .seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.ev-vs .seg button { font-weight: 600; min-height: 38px; padding: 0 18px; }
.ev-map .ev-arrows { pointer-events: none; }
.ev-mapwrap { max-width: 980px; }
.ev-map { position: relative; }
.ev-map svg { display: block; width: 100%; height: auto; }
.ev-map path[data-id] { stroke: #9a978d; stroke-width: .6; vector-effect: non-scaling-stroke; cursor: pointer; }
.ev-map .ev-hov { fill: none; stroke: var(--ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; }
.ev-tip { position: absolute; z-index: 10; pointer-events: none; background: var(--surface); border: 1px solid #c9c6bc; border-radius: 6px; padding: 8px 10px; font: 400 13px/1.35 var(--sans); box-shadow: 0 4px 14px rgba(0,0,0,.1); min-width: 190px; }
.ev-tip b, .ev-picked b { font-weight: 600; }
.ev-tip .t-row, .ev-picked .t-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ev-tip .t-meta, .ev-picked .t-meta { color: var(--faint); font-size: 12px; }
.ev-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; font: 400 12px var(--sans); color: var(--body); }
.ev-key .lab { font-weight: 600; font-size: 12.5px; }
.ev-key .k-scale { display: inline-flex; flex-direction: column; gap: 3px; }
.ev-key .scale, .ev-key .ticks { display: flex; gap: 2px; }
.ev-key .sw { width: 40px; height: 11px; border-radius: 2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ev-key .ticks { color: var(--faint); font-size: 11px; }
.ev-key .ticks span { width: 40px; text-align: center; }
.ev-key .k-arrows { display: flex; gap: 16px; align-items: center; }
.ev-key .k-arrows > span { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.ev-key .k-arrow { width: 40px; height: 22px; }
.ev-key .pd { color: #1f4fa8; }
.ev-key .pr { color: #8f1d1d; }
.ev-key .k-note { flex: 1 1 260px; color: var(--faint); font-size: 11.5px; max-width: 340px; }
.ev-picked { flex: 1 1 100%; max-width: 320px; font-size: 13px; }
.ev-picked:empty { display: none; }

/* Races to watch */
.ev-watch { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ev-card { display: block; background: var(--surface); border: 1px solid var(--edge); border-radius: 8px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.ev-card:hover { border-color: var(--ink); }
.ev-card .hd { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 400 14px var(--sans); }
.ev-card .hd b { font-weight: 600; }
.ev-card .n { font-size: 12.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-card .cands { margin: 2px 0 10px; font: 400 13px var(--sans); color: var(--soft); }
.ev-card .sw-race { display: block; }
.ev-card .pd { color: #1f4fa8; }
.ev-card .pr { color: #8f1d1d; }
.ev-card .mix { display: flex; height: 12px; border-radius: 3px; overflow: hidden; }
.ev-card .mixlab { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; font: 400 12px var(--sans); color: var(--body); font-variant-numeric: tabular-nums; }
.ev-card .mixlab i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 4px; }
.ev-card .edge { margin: 8px 0 0; font: 400 12.5px/1.4 var(--sans); color: var(--soft); }
.ev-card .edge b { font-weight: 600; }

/* Every county: the site's data table (site.css .datatable). */
.ev-data { margin: 0 0 48px; }
.ev-data[hidden] { display: none; }

.ev-how h3 { margin: 18px 0 6px; font: 600 16px var(--sans); }
.ev-how ul { max-width: 760px; margin: 0; padding-left: 20px; font: 400 15px/1.55 var(--sans); color: var(--body); }
.ev-how li { margin-bottom: 6px; }
.ev-src { font: 400 14px var(--sans); color: var(--mute); }

@media (max-width: 640px) {
  .ev-stat .num { font-size: 26px; }
  .ev-row { grid-template-columns: 92px 1fr 78px; }
  .ev-key .sw, .ev-key .ticks span { width: 36px; }
}

/* The tip for the charts (early.js showTip) and the pace's crosshair. */
.ev-ftip { position: fixed; z-index: 20; pointer-events: none; background: var(--surface); border: 1px solid #c9c6bc; border-radius: 6px; padding: 8px 10px; font: 400 13px/1.4 var(--sans); box-shadow: 0 4px 14px rgba(0,0,0,.1); max-width: 280px; font-variant-numeric: tabular-nums; }
.ev-ftip[hidden] { display: none; }
.ev-ftip b { font-weight: 600; }
.ev-ftip .t-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 4px; }
.ev-ftip .t-meta { color: var(--faint); font-size: 12px; }
.ev-row[data-tip], .ev-mailbar span, .ev-card .mix span { cursor: default; }
.ev-row[data-tip]:hover .nm { text-decoration: underline; }
.ev-chart .xh-l { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.ev-chart .xh-now { fill: var(--ink); }
.ev-chart .xh-then { fill: #fff; stroke: #a8a49a; stroke-width: 2; }
.ev-pace-hit { cursor: crosshair; touch-action: pan-y; }
