/* Archive pages (/2026/...): the result card, the scorecard and the still-counting list. Colors come from styles.css. */
/* the kicker line, laid out like the shared .race-crumbs / .race-switch (STANDARDS: Header) */
.arc-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 36px; margin: 0 0 16px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.arc-crumbs > a { color: var(--muted); text-decoration: none; }
.arc-crumbs > a:hover { color: var(--ink); }
.arc-crumbs .arc-badge { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.arc-switch { display: inline-flex; border: 1px solid var(--axis); letter-spacing: 0; text-transform: none; }
.arc-switch a { padding: 7px 14px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.arc-switch a + a { border-left: 1px solid var(--axis); }
.arc-switch a:hover { color: var(--ink); }
.arc-switch a[aria-current="page"] { background: var(--ink); color: var(--page); }

.arc-card { padding: 28px 0 0; }
.arc-kicker { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.arc-kicker span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.arc-forecast-kicker { margin: 26px 0 -4px; }
.arc-headline { font-family: var(--display); font-stretch: var(--wide); font-weight: 800; font-size: clamp(26px, 4.4vw, 40px); line-height: 1.05; margin: 8px 0 10px; letter-spacing: -0.02em; text-wrap: balance; }
.arc-sub { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; max-width: 80ch; }
.arc-sub b { color: var(--ink); }

.arc-tally { position: relative; display: flex; height: 26px; border-radius: 0; overflow: hidden; background: var(--norace); margin: 14px 0 6px; }
.arc-seg { height: 100%; }
.arc-seg.d.won { background: var(--d-3); } .arc-seg.d.lead { background: var(--d-1); }
.arc-seg.r.won { background: var(--r-3, #e61d16); } .arc-seg.r.lead { background: var(--r-1, #f7c4c0); }
.arc-seg.i.won { background: var(--i-bar); } .arc-seg.i.lead { background: color-mix(in srgb, var(--i-bar) 35%, transparent); }
.arc-seg.none { background: var(--norace); }
.arc-maj { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .85; }
.arc-tally-key { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.arc-tally-key b { font-family: var(--display); font-size: 18px; font-variant-numeric: tabular-nums; }
.arc-maj-label { text-align: center; }

.arc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 24px; margin: 22px 0 4px; }
.arc-stat { border: 0; border-top: 1px solid var(--grid); border-radius: 0; padding: 12px 0 0; background: none; }
.arc-stat b { display: block; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.05; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.arc-stat span { font-size: 12.5px; color: var(--muted); }
.arc-misses { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.arc-misses-label { color: var(--ink-2); }
.arc-chip { font: inherit; font-size: 12.5px; color: var(--ink); background: none; border: 1px solid var(--axis); border-radius: 0; padding: 3px 10px; cursor: pointer; }
.arc-chip:hover, .arc-chip:focus-visible { border-color: var(--ink-2); }

.arc-head-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.arc-head-row h2 { margin: 0 0 4px; font-size: 26px; }
.arc-updated { font-size: 12.5px; color: var(--muted); }
.arc-list { display: grid; gap: 0; border-top: 1px solid var(--ink-2); }
.arc-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 14px; margin: 0 -14px; border-bottom: 1px solid var(--grid); cursor: pointer; }   /* 14px of room on each side of the hover highlight */
.arc-row:hover, .arc-row:focus-visible { background: var(--surface-2); outline: none; }
.arc-row-name b { display: block; font-size: 15px; }
.arc-row-name span, .arc-row-lead span, .arc-row-rep span { display: block; font-size: 12px; color: var(--muted); }
.arc-row-lead { font-weight: 700; font-size: 15px; }
.arc-muted { color: var(--muted); font-weight: 500; }
.arc-rep-bar { height: 6px; border-radius: 0; background: var(--norace); overflow: hidden; margin-bottom: 4px; }
.arc-rep-bar i { display: block; height: 100%; background: var(--ink-2); }
.arc-chance { display: flex; gap: 2px; height: 6px; border-radius: 0; overflow: hidden; margin-bottom: 4px; }
.arc-chance i { display: block; height: 100%; }
.arc-chance i:last-child { flex: 1; }
.arc-chance i.d { background: var(--d-bar, #0077cd); } .arc-chance i.r { background: var(--r-bar, #e61d16); } .arc-chance i.i { background: var(--i-bar, #a848bf); }
.arc-row-rep .arc-chance-txt { font-size: 13px; color: var(--ink-2, inherit); }
.arc-row-rep .arc-chance-txt b { font-weight: 700; }
#arc-counting.is-final .arc-list { display: none; }
@media (max-width: 560px) {
  .arc-row { grid-template-columns: minmax(0, 1fr) auto; }
  .arc-row-rep { grid-column: 1 / -1; }
  .arc-tally-key { font-size: 12px; }
}

/* the archive's views: four map views, two seat-chart views, and a caption under each title */
body .view-seg { grid-template-columns: repeat(4, 1fr); }
.seat-seg { margin: 0 0 8px; }
.view-caption { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); max-width: 90ch; }
.arc-lessons ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; }
.arc-lessons li { color: var(--ink-2); font-size: 14.5px; max-width: 85ch; }
.arc-lessons li b { color: var(--ink); }
.arc-lessons .arc-note { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.arc-more { margin: 12px auto 2px; display: block; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink); background: none; border: 1px solid var(--axis); border-radius: 0; padding: 8px 16px; cursor: pointer; }
.arc-more:hover, .arc-more:focus-visible { border-color: var(--ink-2); }
.arc-scored { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); max-width: 90ch; }

/* the Overview tab: the four map views in a 2 x 2 grid, each with a short key; a panel's title opens that view */
body .view-seg { grid-template-columns: repeat(5, 1fr); }
#map-section.is-overview .map-wrap { display: none; }
#map-section.is-overview #map-legend:empty { display: block; }   /* kept, empty, so switching views never moves anything (steady.js holds its height) */
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.ov-grid[hidden] { display: none; }
.ov-panel { margin: 0; min-width: 0; display: flex; flex-direction: column; }
.ov-panel figcaption { margin: 0 0 4px; }
.ov-open { font: inherit; font-family: var(--display); font-stretch: var(--wide); font-size: 15px; font-weight: 800; color: var(--ink); background: none; border: 0; padding: 4px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.ov-open .ov-arrow { color: var(--muted); font-weight: 400; transition: transform .15s, color .15s; }
.ov-open:hover .ov-arrow, .ov-open:focus-visible .ov-arrow { color: var(--ink); transform: translateX(2px); }
.ov-map { width: 100%; height: auto; display: block; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.ov-map.tiles { max-width: 86%; margin-inline: auto; }
.ov-key { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.ov-key > span + span { color: var(--muted); }
.ov-key > span:first-child:not(.ov-acc) { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.ov-key .ov-pair { white-space: nowrap; }
.ov-key .ov-pair > .sw { margin-right: 4px; }
.ov-key i, .ov-key .sw { display: inline-block; width: 11px; height: 11px; border-radius: 0; vertical-align: -1px; margin-right: 4px; }
.ov-key .ov-sw { display: inline-flex; gap: 1px; margin-right: 4px; vertical-align: -1px; }
.ov-key .ov-sw i { margin-right: 0; }
.ov-key .ov-acc i { width: 14px; }
.ov-key .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--surface); border: 1px solid var(--ink); margin-right: 4px; vertical-align: 0; }
/* the small maps: the same shapes and colors as the full maps, with labels sized for the smaller drawing */
.ov-map .state { stroke: var(--surface); stroke-width: .8px; transition: fill .3s; }
.ov-map .state.race, .ov-map .tile.race, .ov-map .hex { cursor: pointer; }
.ov-map .ring { fill: none; stroke: var(--ink); stroke-width: 2.5px; stroke-linejoin: round; pointer-events: none; }
.ov-map .tile rect { stroke: var(--surface); stroke-width: 2; transition: fill .3s; }
.ov-map .tile.race:hover rect, .ov-map .tile.race.hl rect { stroke: var(--ink); stroke-width: 3; }
.ov-map text { pointer-events: none; font-size: 19px; font-weight: 600; text-anchor: middle; dominant-baseline: central; transition: fill .3s; }
.ov-map .tile text { font-size: 17px; }
.ov-map .lbl-dark { fill: #0b0b0b; }
.ov-map .lbl-light { fill: #ffffff; }
.ov-map .lbl-water { fill: var(--ink); }
.ov-map .lbl-muted { fill: var(--muted); font-weight: 500; }
.ov-map :focus { outline: none; }
@media (max-width: 560px) {
  body .view-seg button { font-size: 11.5px; padding: 4px 3px; }
  .ov-grid { gap: 12px 10px; }
  .ov-open { font-size: 13.5px; }
  .ov-key { font-size: 11px; }
  .ov-map text { display: none; }   /* state names are too small to read on a phone's half-width map */
}

/* Download the data */
.arc-dl { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 2px; }
.arc-dl-btn { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); background: none; border: 1px solid var(--axis); border-radius: 0; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.arc-dl-btn span { font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--muted); }
.arc-dl-btn:hover, .arc-dl-btn:focus-visible { border-color: var(--ink-2); }
.arc-data .hint a { color: inherit; }
@media (max-width: 560px) { .arc-dl-btn { width: 100%; justify-content: space-between; } }

/* the seat and over-time charts keep the width they had inside the old boxed cards (34px narrower than the column), so
   they draw exactly the same axis labels as before (the charts pick their labels from their width) */
@media (max-width: 1100px) { #seat-chart, #trend-chart { width: auto; max-width: calc(100% - 34px); margin-inline: 17px; } }
/* the result card opens the page right under the section tabs, whose hairline is already its top rule */
main > .arc-card:first-child { border-top: 0; padding-top: 0; margin-top: 44px; }
@media (max-width: 720px) { main > .arc-card:first-child { margin-top: 32px; } }

/* the settings values keep one width whatever they show ("no shift" / "R +1.5 pts", "0%" to "100%"), so clicking never moves anything */
#offset-val { --val-w: 6.6em; }
#mkt-val { --val-w: 3.2em; }

/* a sortable column head keeps room for its sort arrow when it isn't sorted, so sorting never changes its width */
.pollster-table th[data-k]::after { content: " ▼"; font-size: 9px; visibility: hidden; }
.pollster-table th[aria-sort="ascending"]::after, .pollster-table th[aria-sort="descending"]::after { visibility: visible; }

/* clicking never moves anything (steady.js): no transitions while it tries a state and puts it back; the zoom buttons keep
   their place when the Overview hides them; a "Show more" with every row open keeps its place; the rows it opens sit below it */
.arc-measuring *, .arc-measuring *::before, .arc-measuring *::after { transition: none !important; }
#map-section .zoom-ctl[hidden] { display: inline-flex; visibility: hidden; }
.reset.arc-keep[hidden] { display: inline-block; visibility: hidden; }
.arc-rest { margin-top: 10px; }
.arc-rest table { border-top: 1px solid var(--grid); }
@media (max-width: 720px) {
  /* a filter beside a section title sits on its own line, so the title's length never moves it */
  .card-head:has(#only-close) { flex-direction: column; align-items: flex-start; }
}
.reset.arc-keep, #latest-more, #pollsters-more, #districts-more { font-variant-numeric: tabular-nums; }

/* text sections in two columns that end level (.method-short.flow, as the forecast pages): headings stay with their text, and
   charts, tables, and number rows stay whole */
.method-short.flow h3 { break-after: avoid; margin-top: 0; }
.method-short.flow > :first-child { margin-top: 0; }
.method-short.flow svg, .method-short.flow .table-scroll, .method-short.flow .stat-row, .method-short.flow li { break-inside: avoid; }
.method-short.flow ul { margin-top: 0; }
.arc-lessons .method-short.flow ul { display: block; }
.arc-lessons .method-short.flow li { margin: 0 0 8px; }

/* archived pages are static: nothing shows until the saved results are drawn, so there's no loading text or jump (archive.js) */
html.arc-loading .site-header .header-row, html.arc-loading main, html.arc-loading .site-footer { visibility: hidden; }
