/* Charts and county table for the early and mail vote counts. Tokens only (css/vf-tokens.css).
   Square ruled sheets in the paper style: hairlines, no shadows, no card grid. One ink color for marks. */
.evc { margin:22px 0 0; padding:18px 0 0; border-top:2px solid var(--vf-ink); color:var(--vf-ink); }
.evc h3,.evc h4 { margin:0 0 10px; font:750 1.25rem/1.2 var(--vf-font-head); }
.evc h4 { font-size:1.1rem; margin-top:22px; }
.evc>h4:first-child,.evc>h3:first-child { margin-top:0; }
.evc h5 { margin:0 0 8px; font:700 .8rem/1.3 var(--vf-font-body, inherit); letter-spacing:.1em; text-transform:uppercase; color:var(--vf-gold-text); }
.evc .evc-sub { margin-top:16px; }
.evc-note,.evc-sum { margin:8px 0 0; color:var(--vf-mute); font-size:.84rem; line-height:1.5; max-width:70ch; }
.evc-sum { color:var(--vf-ink-2, var(--vf-ink)); }
.evc a { color:var(--vf-blue-text); }

.evc-fig { margin:0 0 26px; padding:0 0 20px; border-bottom:1px solid var(--vf-rule); }
.evc-fig:last-of-type { border-bottom:0; }
.evc-fig figcaption { display:flex; flex-wrap:wrap; gap:2px 14px; align-items:baseline; margin-bottom:6px; }
.evc-fig figcaption strong { font:750 1rem/1.3 var(--vf-font-head); }
.evc-fig figcaption span { color:var(--vf-mute); font-size:.84rem; font-variant-numeric:tabular-nums; }

/* plots: the stylesheet shows one of the two sizes */
.evc-plot { margin:6px 0 0; }
.evc-svg { display:block; width:100%; height:auto; overflow:visible; }
.evc-wide { display:none; }
@media (min-width:640px) { .evc-narrow { display:none; } .evc-wide { display:block; } .evc-plot { max-width:760px; } }
.evc-grid { stroke:var(--vf-rule); stroke-width:1; }
.evc-base { stroke:var(--vf-rule-strong); }
.evc-tick { fill:var(--vf-mute); font:11px/1 var(--vf-font-body, sans-serif); font-variant-numeric:tabular-nums; }
.evc-value { fill:var(--vf-ink); font:700 12px/1 var(--vf-font-body, sans-serif); font-variant-numeric:tabular-nums; paint-order:stroke; stroke:var(--vf-surface); stroke-width:3px; }
.evc-line { fill:none; stroke:var(--vf-navy); stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
.evc-dot { fill:var(--vf-navy); stroke:var(--vf-surface); stroke-width:2; }
.evc-sm { stroke:none; }
.evc-last { fill:var(--vf-navy); }
.evc-bar { fill:var(--vf-navy); }
.evc-hit { fill:transparent; }
.evc svg a:focus-visible { outline:3px solid var(--vf-blue); outline-offset:2px; }
.evc svg a:hover .evc-dot { fill:var(--vf-gold-text); }
.evc svg a:hover .evc-bar { fill:var(--vf-gold-text); }

/* data table fallback */
.evc-data { margin-top:10px; font-size:.88rem; }
.evc-data summary { cursor:pointer; color:var(--vf-blue-text); font-weight:700; padding:6px 0; }
.evc-table-wrap { max-width:100%; overflow-x:auto; }
.evc-table { width:100%; border-collapse:collapse; font-size:.88rem; font-variant-numeric:tabular-nums; }
.evc-table th,.evc-table td { padding:7px 10px; border-bottom:1px solid var(--vf-rule); text-align:left; vertical-align:top; }
.evc-table thead th { border-bottom:2px solid var(--vf-ink); font-size:.75rem; letter-spacing:.08em; text-transform:uppercase; color:var(--vf-mute); white-space:nowrap; }
.evc-table tbody th { font-weight:700; }
.evc-table .evc-num { text-align:right; }
.evc-na { color:var(--vf-mute); font-size:.8rem; }
.evc-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.evc-table thead th a { color:inherit; text-decoration:none; }
.evc-table thead th a:hover,.evc-table thead th[aria-sort="ascending"] a,.evc-table thead th[aria-sort="descending"] a { color:var(--vf-ink); text-decoration:underline; text-underline-offset:3px; }

/* small multiples: a ruled grid, not boxes */
.evc-multiples { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); margin:8px 0 0; padding:0; list-style:none; border-top:1px solid var(--vf-rule); border-left:1px solid var(--vf-rule); }
.evc-multiples>li { display:flex; flex-direction:column; gap:3px; padding:10px 12px 12px; border-right:1px solid var(--vf-rule); border-bottom:1px solid var(--vf-rule); min-width:0; }
.evc-m-name { font-weight:800; font-size:.95rem; }
.evc-spark { display:block; width:100%; height:40px; }
.evc-m-meta,.evc-m-none { color:var(--vf-mute); font-size:.78rem; line-height:1.35; font-variant-numeric:tabular-nums; }
.evc-m-meta strong { color:var(--vf-ink); }

/* ranked bars: text in HTML so it stays legible at any width; the bar is an inline SVG */
.evc-rank { margin:14px 0 0; }
.evc-ranked { margin:0; padding:0; list-style:none; max-width:760px; }
.evc-ranked>li { display:grid; grid-template-columns:minmax(96px,150px) 1fr minmax(92px,auto); gap:10px; align-items:center; padding:5px 0; border-bottom:1px solid var(--vf-rule); }
.evc-r-name { font-weight:700; font-size:.92rem; }
.evc-r-bar { display:block; width:100%; height:8px; }
.evc-r-val { text-align:right; font-variant-numeric:tabular-nums; font-size:.92rem; }
.evc-r-val small { display:block; color:var(--vf-mute); font-size:.72rem; }
@media (max-width:480px) {
  .evc-ranked>li { grid-template-columns:1fr auto; row-gap:3px; }
  .evc-r-bar { grid-column:1 / -1; grid-row:2; }
}

/* county filter */
.evc-filter { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:0 0 6px; }
.evc-filter label { font-weight:700; font-size:.88rem; }
.evc-filter input[type=search] { min-width:0; flex:1 1 180px; max-width:280px; padding:8px 10px; border:1.5px solid var(--vf-rule-strong); background:var(--vf-bg); color:var(--vf-ink); font:inherit; }
.evc-filter button { padding:8px 16px; border:1.5px solid var(--vf-navy); background:var(--vf-navy); color:var(--vf-on-navy); font:700 .88rem var(--vf-font-body, inherit); cursor:pointer; }
.evc-filter button:focus-visible,.evc-filter input:focus-visible,.evc-data summary:focus-visible,.evc-table thead a:focus-visible { outline:3px solid var(--vf-blue); outline-offset:2px; }
.evc-counties .evc-table-wrap { max-height:70vh; }
.evc-counties thead th { position:sticky; top:0; background:var(--vf-surface); }
.evc-counties tr[hidden] { display:none; }
.evc-sortbar { display:none; margin:10px 0 0; font-size:.88rem; line-height:1.7; }
.evc-sortbar a[aria-current] { color:var(--vf-ink); font-weight:800; }
/* phones: each county becomes a short record instead of a clipped wide table */
@media (max-width:560px) {
  .evc-sortbar { display:block; }
  .evc-counties .evc-table-wrap { max-height:none; overflow:visible; }
  .evc-county-table,.evc-county-table tbody { display:block; }
  .evc-county-table thead { display:none; }
  .evc-county-table tr { display:block; padding:8px 0; border-bottom:1px solid var(--vf-rule); }
  .evc-county-table tr[hidden] { display:none; }
  .evc-county-table tbody th,.evc-county-table td { display:flex; justify-content:space-between; gap:12px; padding:2px 0; border:0; text-align:right; }
  .evc-county-table tbody th { font:750 1rem/1.3 var(--vf-font-head); text-align:left; padding-bottom:4px; }
  .evc-county-table td::before { content:attr(data-label); color:var(--vf-mute); text-align:left; }
  .evc-county-table td[colspan] { display:block; }
}
@media (prefers-reduced-motion:no-preference) { .evc-dot,.evc-bar { transition:fill 150ms var(--vf-ease, ease); } }
