:root {
  --paper: #f4f7f6;
  --paper-2: #e6eeec;
  --ink: #0f3d3e;
  --ink-soft: #4c6b6b;
  --rule: #b9cbc8;
  --pen: #1c46d9;
  --nope: #b3261e;
  --hold: #8a5a00;
  --hold-bg: #f6e7b8;
  --decent-bg: #d6ecdf;
  --decent: #1e6a43;
  --wide: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-variation-settings: "wdth" 100;
  font-size: 17px;
  line-height: 1.5;
}
a { color: var(--ink); text-decoration-color: var(--rule); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* Masthead: the yard-sign moment */
.masthead { border-bottom: 3px solid var(--ink); }
.masthead-inner { max-width: var(--wide); margin: 0 auto; padding: 40px 20px 28px; }
.stub { margin: 0 0 18px; font-size: 14px; color: var(--ink-soft); }
h1 {
  margin: 0;
  font-weight: 900;
  font-variation-settings: "wdth" 62;
  font-size: clamp(64px, 15vw, 136px);
  line-height: .86;
  letter-spacing: -.01em;
}
.lede { max-width: 34em; margin: 18px 0 24px; font-size: 20px; line-height: 1.4; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 14px; color: var(--ink-soft); }
.legend-item { display: inline-flex; align-items: center; gap: 7px; }

/* Jurisdiction tabs */
.tabs { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); }
.tabs-inner { max-width: var(--wide); margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  flex: none;
  padding: 12px 12px 10px;
  text-decoration: none;
  font-weight: 700;
  font-variation-settings: "wdth" 80;
  font-size: 16px;
  border-bottom: 3px solid transparent;
}
.tabs a[aria-current="true"] { border-bottom-color: var(--ink); }

/* Ballot */
.ballot { max-width: var(--wide); margin: 0 auto; padding: 8px 20px 60px; }
.place { padding-top: 36px; scroll-margin-top: 52px; }
.place > h2 {
  margin: 0 0 4px;
  font-weight: 900;
  font-variation-settings: "wdth" 62;
  font-size: 54px;
  line-height: 1;
}
.place-note { margin: 0 0 8px; color: var(--ink-soft); max-width: 40em; }

.race { margin-top: 26px; background: #fff; border: 2px solid var(--ink); }
.race-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 16px; background: var(--ink); color: var(--paper); }
.race-head h3 { margin: 0; font-size: 19px; font-weight: 800; font-variation-settings: "wdth" 85; line-height: 1.2; }
.race-head .vote-for { flex: none; font-size: 13px; opacity: .85; }
.race-note { margin: 0; padding: 10px 16px; font-size: 15px; color: var(--ink-soft); border-bottom: 1px solid var(--rule); }

.cand { display: grid; grid-template-columns: 52px 1fr; gap: 0 12px; padding: 16px 16px 16px 12px; border-top: 1px solid var(--rule); }
.cand:first-of-type { border-top: 0; }
.cand .oval { grid-row: span 3; margin-top: 2px; }
.cand-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cand-name { margin: 0; font-size: 20px; font-weight: 800; font-variation-settings: "wdth" 90; line-height: 1.2; }
.cand-meta { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }
.cand-blurb { margin: 8px 0 0; max-width: 38em; }
.sources { margin: 6px 0 0; font-size: 13px; color: var(--ink-soft); }
.sources a { color: var(--ink-soft); }

/* Ovals and the pen mark */
.oval { width: 44px; height: 26px; overflow: visible; }
.oval.sm { width: 30px; height: 18px; }
.oval ellipse { fill: none; stroke: var(--ink); stroke-width: 2; }
.oval .scribble { fill: none; stroke: var(--pen); stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; display: none; }
.pick .oval .scribble, .legend .scribble { display: block; }
.pick .oval .scribble { stroke-dasharray: 220; stroke-dashoffset: 220; animation: mark .9s cubic-bezier(.5,.1,.3,1) forwards; animation-delay: var(--d, .2s); }
@keyframes mark { to { stroke-dashoffset: 0; } }

/* Verdict tags */
.tag { font-style: normal; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 3px; white-space: nowrap; }
.v-good { background: var(--decent-bg); color: var(--decent); }
.v-compromised { background: var(--hold-bg); color: var(--hold); }
.v-bad { background: #f6d9d6; color: var(--nope); }
.v-unknown { background: var(--paper-2); color: var(--ink-soft); }
.lean { font-size: 13px; color: var(--ink-soft); }

/* Info sections */
.info { border-top: 3px solid var(--ink); }
.info.alt { background: var(--paper-2); }
.info-inner { max-width: var(--wide); margin: 0 auto; padding: 36px 20px 44px; }
.info h2 { margin: 0 0 12px; font-weight: 900; font-variation-settings: "wdth" 62; font-size: 44px; line-height: 1; }
.info p, .info li { max-width: 38em; }
.info dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0 0 18px; max-width: 44em; }
.info dt { font-weight: 700; }
.info dd { margin: 0; }
.fine { font-size: 14px; color: var(--ink-soft); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .cand { grid-template-columns: 40px 1fr; }
  .oval { width: 34px; height: 20px; }
  .place > h2 { font-size: 44px; }
  .info dl { grid-template-columns: 1fr; }
  .info dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .pick .oval .scribble { animation: none; stroke-dashoffset: 0; }
}
.info h3 { margin: 26px 0 10px; font-size: 22px; font-weight: 800; font-variation-settings: "wdth" 85; }

/* Multi-page additions */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stub a { color: inherit; }
h4.cand-name { margin: 0; }
.county-list { list-style: none; margin: 20px 0 16px; padding: 0; display: grid; gap: 12px; }
.county-link { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; padding: 18px 20px; background: #fff; border: 2px solid var(--ink); text-decoration: none; }
.county-link:hover { background: var(--paper-2); }
.county-name { font-weight: 900; font-variation-settings: "wdth" 70; font-size: 32px; line-height: 1.05; }
.county-towns { color: var(--ink-soft); font-size: 15px; }
.prose { padding-top: 8px; }
.prose h2 { margin: 30px 0 12px; font-weight: 900; font-variation-settings: "wdth" 62; font-size: 38px; line-height: 1; }
.prose p { max-width: 38em; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0 0 18px; max-width: 44em; }
.prose dt { font-weight: 700; }
.prose dd { margin: 0; }
.site-foot { border-top: 3px solid var(--ink); background: var(--paper-2); font-size: 15px; }
.site-foot .info-inner { padding: 24px 20px 32px; }
.contact { display: grid; gap: 16px; max-width: 34em; padding-bottom: 40px; }
.contact label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.contact input, .contact select, .contact textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink); }
.contact button { justify-self: start; font: inherit; font-weight: 800; padding: 12px 22px; background: var(--ink); color: var(--paper); border: 0; cursor: pointer; }
.contact button:hover { background: var(--pen); }
.hp { position: absolute; left: -9999px; }
@media (max-width: 560px) { .prose dl { grid-template-columns: 1fr; } .county-name { font-size: 26px; } }
.ballot > .info-inner { padding-left: 0; padding-right: 0; }
.running { margin-top: 30px; padding: 18px 20px; background: #fff; border: 2px solid var(--ink); }
.running h2 { margin: 0 0 10px; font-size: 24px; font-weight: 800; font-variation-settings: "wdth" 80; line-height: 1.15; }
.running dl { display: grid; grid-template-columns: minmax(10em, max-content) 1fr; gap: 6px 18px; margin: 0; font-size: 15px; }
.running dt { font-weight: 700; }
.running dt a { text-decoration: none; }
.running dd { margin: 0; }
.also-list { margin: 12px 0 0; padding-left: 1.1em; display: grid; gap: 8px; max-width: 46em; }
.also-list .tag { font-size: 12px; }
@media (max-width: 560px) { .running dl { grid-template-columns: 1fr; gap: 2px; } .running dd { margin-bottom: 8px; } }
.town-links { margin: 8px 0 0; font-size: 15px; color: var(--ink-soft); }

/* Homepage map */
.usmap { margin: 22px 0 8px; }
.usmap svg { display: block; width: 100%; height: auto; overflow: visible; }
.st { fill: #fff; stroke: var(--rule); stroke-width: 1; stroke-linejoin: round; }
.st-soon { fill: var(--paper-2); }
.st-live { fill: #dce3fa; stroke: #9fb0e6; }
.spot circle { stroke-width: 2.5; }
.spot-live circle { fill: var(--pen); stroke: #fff; }
.spot-soon circle { fill: #fff; stroke: var(--ink); }
.spot text {
  font: 700 19px "Archivo", system-ui, sans-serif;
  fill: var(--ink);
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 5px;
  stroke-linejoin: round;
  opacity: 0;
  pointer-events: none;
}
.spot:hover text, .spot:focus-visible text { opacity: 1; }
.spot:hover circle, .spot:focus-visible circle { stroke: var(--pen); }
.spot-live:hover circle, .spot-live:focus-visible circle { stroke: var(--ink); }
.spot:focus-visible { outline: none; }
.map-key { display: flex; gap: 22px; margin-top: 10px; font-size: 14px; color: var(--ink-soft); }
.key::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 7px; border-radius: 50%; vertical-align: -1px; box-sizing: border-box; }
.key-live::before { background: var(--pen); }
.key-soon::before { background: #fff; border: 2px solid var(--ink); }
.state-head { margin: 26px 0 0; font-size: 20px; font-weight: 800; font-variation-settings: "wdth" 85; }
.state-head + .county-list { margin-top: 10px; }
.soon-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.soon-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); color: var(--ink-soft); font-size: 16px; }
.soon-name { display: block; color: var(--ink); font-weight: 700; }
.spot-live .ring { fill: none; stroke: var(--pen); stroke-width: 2; transform-box: fill-box; transform-origin: center; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .spot-live .ring { animation: ping 1.6s ease-out .4s 2; }
}
@keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }

/* Site nav */
.site-nav { background: var(--ink); color: var(--paper); }
.nav-inner { max-width: var(--wide); margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.brand { color: var(--paper); text-decoration: none; font-weight: 900; font-variation-settings: "wdth" 70; font-size: 22px; line-height: 1; white-space: nowrap; margin-right: auto; }
.nav-menu { display: flex; align-items: center; gap: 18px; }
.nav-menu > a { color: var(--paper); text-decoration: none; font-weight: 700; font-variation-settings: "wdth" 85; font-size: 15px; white-space: nowrap; }
.nav-menu > a:hover { text-decoration: underline; text-decoration-color: var(--paper); }
.site-nav :focus-visible { outline-color: #9fb4ff; }
.chip-in { display: inline-block; padding: 7px 14px; background: var(--pen); color: #fff; font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; border-radius: 3px; }
.chip-in:hover { background: #fff; color: var(--pen); }
.chip-in.big { padding: 12px 22px; font-size: 17px; }
.chip-in.alt { background: var(--ink); }
.chip-in.alt:hover { background: var(--pen); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 6px; color: var(--paper); cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; display: block; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; fill: none; }

/* ZIP form */
.zip-form { display: flex; gap: 0; }
.zip-form input { width: 7.5em; font: inherit; font-weight: 700; padding: 6px 10px; border: 2px solid var(--ink); border-right: 0; border-radius: 0; background: #fff; color: var(--ink); letter-spacing: .06em; }
.zip-form input::placeholder { font-weight: 400; letter-spacing: 0; color: var(--ink-soft); }
.zip-form button { font: inherit; font-weight: 800; padding: 6px 14px; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); cursor: pointer; white-space: nowrap; }
.zip-form button:hover { background: var(--pen); border-color: var(--pen); }
.nav-zip input { border-color: var(--paper); font-size: 15px; width: 6.5em; }
.nav-zip button { border-color: var(--paper); background: var(--paper); color: var(--ink); font-size: 14px; }
.zip-form.big input { width: 6.2em; font-size: 30px; padding: 8px 14px; font-variation-settings: "wdth" 90; }
.zip-form.big button { font-size: 20px; padding: 8px 22px; }
.finder { margin: 6px 0 24px; }
.finder-label { margin: 0 0 8px; font-weight: 800; font-size: 17px; }
.finder-hint { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); max-width: 36em; }
.masthead .legend { margin-top: 4px; }
#guides .legend { margin: 6px 0 0; }

/* Find results */
.find-result { padding-top: 32px; min-height: 30vh; }
.find-h { margin: 0 0 6px; font-weight: 900; font-variation-settings: "wdth" 62; font-size: 44px; line-height: 1; }
.find-h:focus { outline: none; }
.find-list .miss { padding: 16px 20px; border: 2px dashed var(--rule); background: transparent; }
.miss-name { margin: 0; font-weight: 900; font-variation-settings: "wdth" 70; font-size: 26px; line-height: 1.1; }
.miss .place-note { margin: 4px 0 0; }
.fallback { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--rule); }
.fallback h3 { margin: 0 0 6px; font-size: 22px; font-weight: 800; font-variation-settings: "wdth" 85; }
.fallback p { margin: 0 0 10px; max-width: 38em; }
.near-list { margin: 6px 0 0; padding-left: 1.1em; display: grid; gap: 6px; font-weight: 700; }

/* Many counties: compact grid, grouped by state */
.state-block + .state-block { margin-top: 8px; }
.state-head a { text-decoration-thickness: 2px; }
.state-sub { display: block; font-size: 14px; font-weight: 400; color: var(--ink-soft); font-variation-settings: "wdth" 100; }
.county-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.county-list .county-link { flex-direction: column; justify-content: flex-start; gap: 4px; padding: 14px 16px; height: 100%; }
.county-list .county-name { font-size: 26px; }
.county-list .county-towns { font-size: 14px; }
.county-list li { display: flex; flex-direction: column; }
.town-links { font-size: 14px; }

/* Support */
.support { border-top: 3px solid var(--ink); background: #fff; }
.support h2 { margin: 0 0 12px; font-weight: 900; font-variation-settings: "wdth" 62; font-size: 44px; line-height: 1; }
.support p { max-width: 38em; }
.support-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 18px 0 8px; }

@media (max-width: 760px) {
  .nav-inner { flex-wrap: wrap; gap: 12px; padding: 10px 16px; }
  .nav-toggle { display: block; }
  .js .nav-menu { display: none; }
  .nav-menu { order: 5; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 8px; }
  .site-nav.open .nav-menu { display: flex; }
  .nav-menu > a { padding: 12px 0; font-size: 18px; border-top: 1px solid rgba(244, 247, 246, .18); }
  .nav-zip { margin: 6px 0 12px; }
  .nav-zip input { flex: 1; font-size: 18px; padding: 10px 12px; }
  .nav-zip button { font-size: 16px; padding: 10px 16px; }
  .brand { font-size: 20px; }
  .chip-in { padding: 6px 12px; font-size: 14px; }
  .chip-in.big { padding: 12px 20px; font-size: 17px; }
  .county-list { grid-template-columns: 1fr; }
  .zip-form.big { width: 100%; }
  .zip-form.big input { flex: 1; min-width: 0; font-size: 26px; }
  .zip-form.big button { font-size: 18px; padding: 8px 16px; }
  .find-h, .support h2 { font-size: 36px; }
}

/* Map zoom */
.usmap { position: relative; }
.usmap svg { overflow: hidden; }
.st { vector-effect: non-scaling-stroke; transition: fill .3s, opacity .3s; }
.st-live, .st-soon { cursor: pointer; }
.st-live:hover { fill: #c8d3f7; }
.st:focus-visible { outline: none; stroke: var(--pen); stroke-width: 2.5; }
.usmap.zoomed .st { opacity: .45; }
.usmap.zoomed .st, .usmap.zoomed .st-live, .usmap.zoomed .st-soon { cursor: zoom-out; }
.usmap.zoomed .st-on { opacity: 1; stroke: var(--ink); stroke-width: 1.5; }
.usmap.zoomed .st-on.st-live { fill: #dce3fa; }
.spot circle { vector-effect: non-scaling-stroke; }
.spot text { font-size: calc(19px / var(--k, 1)); stroke-width: calc(5px / var(--k, 1)); }
.usmap.zoomed .spot:not(.spot-on) { display: none; }
.usmap.zoomed .spot-on text { opacity: 1; font-size: calc(15px / var(--k, 1)); }
.usmap.zoomed .ring { display: none; }
.map-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.map-bar[hidden], .map-panel[hidden] { display: none; }
.map-back { font: 700 15px "Archivo", system-ui, sans-serif; color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 3px; padding: 6px 12px; cursor: pointer; }
.map-back::before { content: "\2039"; margin-right: 7px; font-size: 18px; line-height: 0; }
.map-back:hover { background: var(--paper-2); }
.map-state { font-weight: 800; font-size: 20px; font-variation-settings: "wdth" 85; }
.map-panel { margin-top: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--rule); border-radius: 3px; }
.map-panel-h { margin: 0 0 8px; font-weight: 800; }
.map-panel-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.map-panel-list a { font-weight: 700; }
.map-panel-more { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 15px; }
.map-tip { margin-left: auto; }
@media (hover: none) { .usmap:not(.zoomed) .spot text { opacity: 0; } }
@media (max-width: 560px) { .map-tip { margin-left: 0; flex-basis: 100%; } .map-key { flex-wrap: wrap; gap: 6px 22px; } }
