/* RTM results. Loaded BEFORE maxmautner.com's site stylesheet: the tokens
   below are fallbacks that the site's own :root values replace. Component
   rules are all .rt-* classes, so the site's element rules don't override them. */

:root {
  --bg: #211e1b; --surface: #2c2925; --surface-sunken: #1a1714;
  --text: #f1efe9; --text-2: #aaa39a; --text-3: #8a847b;
  --accent: #c79045; --accent-ink: #332416; --hairline: rgba(255,255,255,.08);
  --font-serif: 'Newsreader', Georgia, serif; --font-sans: 'IBM Plex Sans', system-ui, sans-serif;
  --gutter: 22px; --radius-sm: 9px; --radius-md: 14px;
}
[data-theme="light"] {
  --bg: #faf8f4; --surface: #eeeae4; --surface-sunken: #dedad3;
  --text: #1c1a17; --text-2: #56514a; --text-3: #6f6a62; --accent: #9a5f1f; --accent-ink: #fff;
  --hairline: rgba(0,0,0,.10);
}
body { background: var(--bg); }

/* Fallback copies of maxmautner.com's base and header rules, so the page holds
   together if the site stylesheet fails to load. The site stylesheet wins. */
*, :after, :before { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; line-height: 1.5; color: var(--text-2); }
main { max-width: 60rem; margin: 0 auto; }
header { display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gutter);
  border-bottom: 1px solid var(--hairline); }
.site-title { font-size: 15px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--text);
  text-decoration: none; white-space: nowrap; }
header nav ul { display: flex; align-items: center; gap: 1.5rem; list-style: none; }
header li { display: inline-flex; align-items: center; }
header nav a { font-size: 16px; color: var(--text-2); text-decoration: none; }
.dark-mode-toggle { background: none; border: none; cursor: pointer; color: var(--text-2); display: inline-flex; padding: 0; }
.dark-mode-toggle .icon-moon { display: none; }
[data-theme="dark"] .dark-mode-toggle .icon-moon { display: block; }
[data-theme="dark"] .dark-mode-toggle .icon-sun { display: none; }
@media (max-width: 45rem) { header { padding: 12px 14px; } header nav ul { gap: .75rem; } }

/* Vote-share bins: the same colors as the static maps (blue = Yes, orange = No). Not theme tokens, because the map
   fills and the PNGs must match; both read on the light and dark grounds. */
:root { --st-bart: #111111; --st-cal: #d0262f; }
[data-theme="dark"] { --st-bart: #f1efe9; }
:root { --k6: #1c579a; --k5: #3b7fc4; --k4: #6fa7dc; --k3: #a9cbec; --k2: #d6e6f5; --k1: #f0ae84; --k0: #c4602b; --kx: #e4e7ea; }

.rt { max-width: 46rem; margin: 0 auto; padding: 20px 16px 48px; color: var(--text-2); font-size: 17px; }
.rt a { color: var(--accent); text-underline-offset: 2px; }
.rt a:focus-visible, .rt button:focus-visible, .rt-table-wrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rt-eyebrow { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.rt h1 { font-family: var(--font-serif); font-weight: 600; font-size: 30px; line-height: 1.15;
  letter-spacing: -.015em; color: var(--text); margin: 0 0 8px; text-wrap: balance; }
@media (max-width: 30rem) { .rt { padding-top: 14px; } .rt h1 { font-size: 26px; } }
.rt h2 { font-family: var(--font-serif); font-weight: 600; font-size: 22px; color: var(--text); margin: 36px 0 10px; scroll-margin-top: 16px; }
.rt h3 { font-family: var(--font-serif); font-weight: 600; font-size: 19px; color: var(--text); margin: 24px 0 8px; scroll-margin-top: 16px; }
.rt h3 span { display: block; font: 500 14px var(--font-sans); color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.rt p { margin: 0 0 12px; }
.rt code { font-size: .88em; overflow-wrap: anywhere; }
.rt-lede { font-family: var(--font-serif); font-size: 20px; line-height: 1.35; color: var(--text); margin-bottom: 4px; }
.rt-lede strong { font-weight: 600; }
.rt-meta { font-size: 14px; color: var(--text-3); }


.rt-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 8px; }
.rt-seg { display: flex; gap: 6px; }
.rt-select select { min-height: 40px; max-width: 100%; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--hairline);
  background: var(--surface); color: var(--text); font: 600 14px var(--font-sans); }
.rt-select select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rt-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rt-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border-radius: var(--radius-sm);
  background: var(--accent); color: var(--accent-ink); font: 600 14px var(--font-sans); border: 1px solid transparent; cursor: pointer; }
.rt-btn-2 { background: var(--surface); color: var(--text); border-color: var(--hairline); }
.rt-btn-2 span { font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rt-btn-2[aria-pressed="true"] { background: var(--surface-sunken); border-color: var(--accent); }

.rt-map { height: 560px; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-sunken); border: 1px solid var(--hairline); }
@media (max-width: 45rem) { .rt-map { height: 62vh; min-height: 360px; } }
.rt-info { min-height: 64px; margin: 10px 0 8px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); font-size: 15px; color: var(--text); }
.rt-info strong { font-family: var(--font-serif); font-weight: 600; font-size: 17px; }
.rt-info .rt-pct { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rt-bar { height: 8px; border-radius: 4px; background: var(--k0); overflow: hidden; margin: 6px 0; }
.rt-bar i { display: block; height: 100%; background: var(--k6); }

.rt-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--text); margin: 0 0 10px; }
.rt-legend li { display: inline-flex; align-items: center; gap: 6px; }
.rt-chip { display: inline-block; width: 14px; height: 11px; border-radius: 2px; border: 1px solid rgba(0,0,0,.25); }
.rt-k6 { background: var(--k6); } .rt-k5 { background: var(--k5); } .rt-k4 { background: var(--k4); } .rt-k3 { background: var(--k3); }
.rt-st { position: relative; width: 26px; height: 11px; border: 0; background: none; }
.rt-st::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 3px; background: var(--st-bart); }
.rt-st::after { content: ""; position: absolute; left: 7px; top: 0; width: 11px; height: 11px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 2.5px solid var(--st-bart); }
.rt-st-cal::before { background: var(--st-cal); } .rt-st-cal::after { border-color: var(--st-cal); }
.rt-k2 { background: var(--k2); } .rt-k1 { background: var(--k1); } .rt-k0 { background: var(--k0); } .rt-kx { background: var(--kx); }

.rt-fig { margin: 12px 0; background: #fff; border-radius: var(--radius-md); padding: 10px; border: 1px solid var(--hairline); }
.rt-fig img { display: block; width: 100%; height: auto; }
.rt-points { margin: 0 0 14px 1.1em; display: grid; gap: 8px; font-size: 16px; }
.rt-points strong { color: var(--text); font-weight: 600; }
.rt-county { margin-bottom: 20px; }

.rt-table-wrap { overflow-x: auto; border: 1px solid var(--hairline); border-radius: var(--radius-md); margin: 0 0 8px; }
.rt-table { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
.rt-table th, .rt-table td { padding: 8px 10px; border-bottom: 1px solid var(--hairline); text-align: right; white-space: nowrap; }
.rt-table td { color: var(--text); }
.rt-table td strong { font-weight: 600; }
.rt-table tbody th { text-align: left; white-space: normal; min-width: 9rem; font-weight: 600; color: var(--text); }
.rt-table tbody th span { display: block; font-size: 13px; font-weight: 400; color: var(--text-3); }
.rt-table thead th { background: var(--surface); vertical-align: bottom; font: 600 13px/1.25 var(--font-sans); color: var(--text-2); }
.rt-table thead th:first-child { text-align: left; }
.rt-table thead button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; }
.rt-table thead [aria-sort="ascending"] button::after { content: " ▲"; }
.rt-table thead [aria-sort="descending"] button::after { content: " ▼"; }
.rt-table tr.rt-tot th, .rt-table tr.rt-tot td { border-bottom: 0; background: var(--surface); }
.rt-table tr.rt-no td strong { color: var(--accent); }
.rt-table tr.rt-no td strong::after { content: " No"; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
#rt-cities { max-height: none; }

.rt-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--hairline); font-size: 14px; color: var(--text-3); }
.rt-foot p { margin: 0 0 8px; }
.rt-map .maplibregl-ctrl-attrib { font-size: 11px; }

/* Phones (390-430px): the live site stylesheet's header still overflows by a few px here. Same rules as the blog's
   30rem block in _sass/_main.scss, made more specific so they win over the site stylesheet that loads after this file.
   Safe to delete once the blog with that block is deployed. */
@media screen and (max-width: 30rem) {
  main > header[role="banner"] { flex-wrap: wrap; row-gap: 6px; padding: 12px; }
  main > header[role="banner"] .site-title { font-size: 13px; letter-spacing: .08em; }
  main > header[role="banner"] nav a { font-size: 14px; }
  main > header[role="banner"] nav ul { gap: .6rem; }
}
