/* If Only They Voted — an optical-scan ballot (who counts) beside a results board (what happens). */

:root {
  --page: #e8eaed;
  --card: #ffffff;
  --panel: #f6f7f8;
  --ink: #121418;
  --ink-2: #434955;
  --ink-3: #6f7581;
  --rule: #d2d6dc;
  --rule-soft: #e5e8ec;
  --d1: #cfdcf2;
  --d2: #96b4e4;
  --d3: #5585d0;
  --d4: #27549e;
  --r1: #f4d0c7;
  --r2: #e8a090;
  --r3: #d2614f;
  --r4: #9f3326;
  --on-d1: #121418;
  --on-d2: #121418;
  --on-d3: #121418;
  --on-d4: #ffffff;
  --on-r1: #121418;
  --on-r2: #121418;
  --on-r3: #121418;
  --on-r4: #ffffff;
  --dpart: #27549e;
  --rpart: #9f3326;
  --none: #e4e6e9;
  --none-line: #cfd3d9;
  --tie: #bfc2ca;
  --empty: #dadde2;
  --focus: #2f6fe0;
  --shadow: 0 1px 0 rgba(18, 20, 24, 0.04), 0 10px 30px -18px rgba(18, 20, 24, 0.35);
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0c0e11;
    --card: #16191e;
    --panel: #121519;
    --ink: #e8eaee;
    --ink-2: #b2b7c2;
    --ink-3: #858b97;
    --rule: #2a2e36;
    --rule-soft: #1e2128;
    --d1: #3f4e66;
    --d2: #426399;
    --d3: #4e7fd0;
    --d4: #7fa8ed;
    --r1: #63443e;
    --r2: #924d42;
    --r3: #c45d4e;
    --r4: #e48d7e;
    --on-d1: #e8eaee;
    --on-d2: #ffffff;
    --on-d3: #0c0e11;
    --on-d4: #0c0e11;
    --on-r1: #e8eaee;
    --on-r2: #ffffff;
    --on-r3: #0c0e11;
    --on-r4: #0c0e11;
    --dpart: #8fb3f0;
    --rpart: #ee9d8c;
    --none: #1b1e24;
    --none-line: #2a2e36;
    --tie: #4a4e57;
    --empty: #22252c;
    --focus: #7aa6ff;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 34px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0c0e11;
  --card: #16191e;
  --panel: #121519;
  --ink: #e8eaee;
  --ink-2: #b2b7c2;
  --ink-3: #858b97;
  --rule: #2a2e36;
  --rule-soft: #1e2128;
  --d1: #3f4e66;
  --d2: #426399;
  --d3: #4e7fd0;
  --d4: #7fa8ed;
  --r1: #63443e;
  --r2: #924d42;
  --r3: #c45d4e;
  --r4: #e48d7e;
  --on-d1: #e8eaee;
  --on-d2: #ffffff;
  --on-d3: #0c0e11;
  --on-d4: #0c0e11;
  --on-r1: #e8eaee;
  --on-r2: #ffffff;
  --on-r3: #0c0e11;
  --on-r4: #0c0e11;
  --dpart: #8fb3f0;
  --rpart: #ee9d8c;
  --none: #1b1e24;
  --none-line: #2a2e36;
  --tie: #4a4e57;
  --empty: #22252c;
  --focus: #7aa6ff;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 34px -20px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}

.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top, 0px)) max(18px, env(safe-area-inset-right, 0px)) 56px max(18px, env(safe-area-inset-left, 0px));
  display: grid;
  gap: 18px;
}

/* top bar, same shape as the other tools on vltanh.me */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--ink-2);
}
.top a {
  text-decoration: none;
}
.top a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.top-end {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}
.theme {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
  padding: 0;
}
.theme svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.theme svg .solid {
  fill: currentColor;
  stroke: none;
}

/* masthead */
.masthead {
  display: grid;
  gap: 6px;
  padding-top: 6px;
}
.eyebrow {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.title {
  margin: 0;
  font-family: var(--display);
  font-stretch: 62%;
  font-weight: 900;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.9;
  letter-spacing: -0.012em;
  text-transform: uppercase;
}
.deck {
  margin: 6px 0 0;
  max-width: 62ch;
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-2);
  text-wrap: pretty;
}

/* election pickers */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 18px;
  padding: 12px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.field {
  display: grid;
  gap: 3px;
}
.field > span,
.ctl-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 9.5em;
  padding: 7px 34px 7px 11px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background-color: var(--card);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 52%,
    calc(100% - 12px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
}
.field select:hover {
  background-color: var(--panel);
}
.ctl-group {
  display: grid;
  gap: 3px;
}
.seg {
  display: inline-flex;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  overflow: hidden;
  background: var(--card);
}
.seg button {
  border: 0;
  background: none;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-2);
}
.seg button + button {
  border-left: 1px solid var(--rule);
}
.seg button:hover {
  background: var(--panel);
  color: var(--ink);
}
.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--card);
}
.seg button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 8px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--ink);
}

/* layout */
.layout {
  display: grid;
  grid-template-columns: 352px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
@media (max-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .results {
    order: -1;
  }
}

/* the ballot */
.ballot {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: var(--shadow);
}
@media (min-width: 981px) and (min-height: 860px) {
  .ballot {
    position: sticky;
    top: 12px;
  }
}
.timing {
  background: repeating-linear-gradient(to bottom, transparent 0 14px, var(--ink) 14px 20px, transparent 20px 26px);
  background-size: 7px 100%;
  background-repeat: repeat-y;
  background-position: 4px 0;
  border-right: 1px dashed var(--rule);
}
.ballot-body {
  padding: 12px 14px 10px;
  display: grid;
  gap: 10px;
  min-width: 0;
}
.ballot-head {
  display: grid;
  gap: 6px;
}
.ballot-code {
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ballot-head h2 {
  margin: 0;
  font-family: var(--display);
  font-stretch: 70%;
  font-weight: 900;
  font-size: 26px;
  line-height: 0.95;
  text-transform: uppercase;
}
.instr {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-2);
  border-left: 3px solid var(--ink);
  padding-left: 9px;
}
.instr b {
  font-weight: 650;
  color: var(--ink);
}
.contest {
  border: 1px solid var(--ink);
  margin: 0;
  padding: 0 0 3px;
  min-width: 0;
}
#contests {
  display: grid;
  gap: 8px;
}
.contest legend {
  float: left;
  width: 100%;
  padding: 0;
  margin: 0 0 4px;
}
.contest-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  background: var(--ink);
  color: var(--card);
  padding: 4px 9px 3px;
}
.contest-head b {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.contest-head small {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  opacity: 0.85;
}
.contest-cols {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 34px 44px 44px;
  gap: 6px;
  padding: 0 10px;
  margin-bottom: -4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contest-cols span:nth-child(3),
.contest-cols span:nth-child(5) {
  text-align: right;
}
.contest-cols span:nth-child(4) {
  text-align: center;
}
.opt {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 34px 44px 44px;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: 0;
  background: none;
  padding: 3px 9px;
  text-align: left;
  cursor: pointer;
}
.contest .opt:first-of-type {
  clear: both;
}
.opt:hover {
  background: var(--panel);
}
.oval {
  width: 22px;
  height: 13px;
  border: 1.6px solid var(--ink);
  border-radius: 50%;
  position: relative;
  display: block;
}
.oval::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.16s cubic-bezier(0.3, 1.5, 0.6, 1);
}
.opt[aria-pressed="true"] .oval::after {
  transform: scale(1);
}
.lab {
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opt[aria-pressed="true"] .lab {
  font-weight: 650;
}
.pct,
.mg {
  font-family: var(--mono);
  font-size: 11.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}
.mg {
  color: var(--ink-2);
}
.lean {
  position: relative;
  height: 7px;
  background: var(--rule-soft);
  overflow: hidden;
}
.lean::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--ink-3);
}
.lean i {
  position: absolute;
  top: 0;
  bottom: 0;
}
.ballot-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-3);
}
.erase {
  border: 1.5px solid var(--ink);
  background: var(--card);
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 13px;
  cursor: pointer;
}
.erase:disabled {
  opacity: 0.4;
  cursor: default;
}

/* results */
.results {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.verdict {
  display: grid;
  gap: 10px;
}
.counting {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  font-size: 15px;
  color: var(--ink-2);
}
.counting > b {
  font-weight: 650;
  color: var(--ink);
}
.counting .lead {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: 2px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  padding: 2px 4px 2px 11px;
  font-size: 14px;
  cursor: pointer;
}
.chip small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.chip .x {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  color: var(--ink-2);
}
.chip:hover .x {
  background: var(--ink);
  color: var(--card);
}
.jump {
  display: none;
  font-size: 14px;
  font-weight: 600;
  text-underline-offset: 3px;
}
@media (max-width: 980px) {
  .jump {
    display: inline;
  }
}
.headline {
  margin: 0;
  font-family: var(--display);
  font-stretch: 68%;
  font-weight: 900;
  font-size: clamp(38px, 6.2vw, 76px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.headline .d {
  color: var(--dpart);
}
.headline .r {
  color: var(--rpart);
}
.facts {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 14px;
  color: var(--ink-3);
}
.facts b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.facts .note {
  flex-basis: 100%;
  font-size: 13px;
}
.tally-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
}
.tally-top .side {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
}
.tally-top .side small {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-stretch: normal;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.tally-top .d {
  color: var(--dpart);
}
.tally-top .r {
  color: var(--rpart);
  text-align: right;
}
.tally-mid {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-align: center;
}
.tally svg {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: 8px;
  overflow: visible;
}
.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--ink-3);
}
.ramp {
  display: inline-flex;
  gap: 2px;
}
.ramp span {
  width: 24px;
  height: 12px;
  display: block;
}
.ramp-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
}
.key-sw {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sw {
  width: 15px;
  height: 12px;
  display: inline-block;
}
.sw.none {
  background: repeating-linear-gradient(135deg, var(--none) 0 3px, var(--none-line) 3px 4.5px);
  outline: 1px solid var(--rule);
}
.sw.key {
  border: 2px solid var(--ink);
}
.mapbox {
  position: relative;
  min-height: 260px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: var(--shadow);
  padding: 12px;
}
.mapbox svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
}
.loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-3);
}
.mapnote {
  margin: 8px 2px 0;
  font-size: 12px;
  color: var(--ink-3);
}
.u {
  stroke: var(--card);
  stroke-width: 0.8;
  transition: fill 0.28s ease;
}
.base {
  fill: var(--panel);
  stroke: var(--rule);
  stroke-width: 0.7;
  pointer-events: none;
}
.base.none {
  fill: url(#noRace);
  pointer-events: auto;
}
.bub {
  stroke: var(--card);
  stroke-width: 1;
}
.bub.key {
  stroke: var(--ink);
  stroke-width: 2;
}
.u:hover {
  filter: brightness(1.07) saturate(1.1);
}
.enter {
  transform-box: fill-box;
  transform-origin: center;
  animation: tile-in 0.42s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  animation-delay: var(--d, 0ms);
}
@keyframes tile-in {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
}
.keyline {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linejoin: round;
  pointer-events: none;
}
.stateline {
  fill: none;
  stroke: var(--ink);
  stroke-opacity: 0.5;
  stroke-width: 1;
  pointer-events: none;
}
.lbl {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}
.lbl .n {
  font-weight: 500;
}
.lbl.halo {
  paint-order: stroke;
  stroke: var(--card);
  stroke-width: 3px;
  fill: var(--ink);
}
.callout rect {
  stroke: var(--card);
  stroke-width: 1;
}
@media (max-width: 560px) {
  .lbl.small-hide,
  .tally-mid .extra {
    display: none;
  }
  .tally-top .side {
    font-size: 21px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .u,
  .oval::after {
    transition: none;
  }
  .enter {
    animation: none;
  }
}

/* key races, table */
.panel {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 13px 15px;
}
.panel h2,
details.panel summary {
  margin: 0;
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.panel .hint {
  margin: 3px 0 10px;
  font-size: 13px;
  color: var(--ink-3);
}
.keylist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0 20px;
}
.keylist li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 14px;
}
.keylist .nm {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.keylist .was {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
}
.res {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.res .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.flip {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 0 4px;
}
details.panel summary {
  cursor: pointer;
  font-size: 15px;
}
.tablewrap {
  overflow: auto;
  max-height: 540px;
  margin-top: 10px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  text-align: left;
  padding: 5px 9px;
  border-bottom: 1px solid var(--rule-soft);
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: var(--card);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
td.num,
th.num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* method */
.method {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px 30px;
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.method > h2 {
  grid-column: 1 / -1;
  margin: 0;
  font-family: var(--display);
  font-stretch: 68%;
  font-weight: 900;
  font-size: 34px;
  line-height: 1;
  text-transform: uppercase;
}
.method h3 {
  margin: 0 0 5px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.method p,
.method li {
  margin: 0 0 7px;
  max-width: 64ch;
  font-size: 14.5px;
  color: var(--ink-2);
}
.method ul {
  margin: 0;
  padding-left: 18px;
}
.bench {
  font-size: 12.5px;
}
.bench th,
.bench td {
  padding: 3px 7px;
}
.site-foot {
  font-size: 13px;
  color: var(--ink-3);
  border-top: 1px solid var(--rule);
  padding-top: 12px;
}

/* tooltip */
.tip {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  width: max-content;
  max-width: min(330px, calc(100vw - 24px));
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  font-size: 13px;
}
.tip h4 {
  margin: 0 0 2px;
  font-family: var(--display);
  font-stretch: 78%;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.1;
}
.tip .meta {
  margin-bottom: 7px;
  font-size: 12px;
  color: var(--ink-3);
}
.tip .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-variant-numeric: tabular-nums;
}
.tip .bar {
  display: flex;
  height: 7px;
  margin: 5px 0 6px;
  background: var(--rule-soft);
}
.tip .foot {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid var(--rule-soft);
  font-size: 12px;
  color: var(--ink-3);
}
.tip .tag {
  margin-left: 6px;
  vertical-align: 2px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 0 4px;
}
.err {
  padding: 16px;
  color: var(--ink-2);
}

/* one state, district by district */
.clickable .u {
  cursor: pointer;
}
.keylist li[data-u] {
  cursor: pointer;
}
.keylist li[data-u]:hover .nm {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.statebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 8px;
}
.back {
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: var(--card);
  padding: 6px 11px;
  font-size: 14px;
  cursor: pointer;
}
.back:hover {
  background: var(--ink);
  color: var(--card);
}
.st-title {
  display: grid;
  gap: 1px;
  flex: 1 1 260px;
  min-width: 0;
}
.st-title h3 {
  margin: 0;
  font-family: var(--display);
  font-stretch: 72%;
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  text-transform: uppercase;
}
.st-sum {
  font-size: 14px;
  color: var(--ink-2);
}
.st-sum b {
  color: var(--ink);
}
.statemap {
  display: block;
  width: 100%;
  height: auto;
  max-height: 64vh;
}
.stline {
  fill: var(--panel);
  stroke: var(--ink-3);
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
}
.dline {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.pc {
  stroke: var(--card);
  stroke-width: 1.3px;
  vector-effect: non-scaling-stroke;
  fill-opacity: 0.94;
  transition:
    cx 0.45s cubic-bezier(0.3, 0.7, 0.2, 1),
    cy 0.45s cubic-bezier(0.3, 0.7, 0.2, 1),
    r 0.45s cubic-bezier(0.3, 0.7, 0.2, 1),
    fill 0.28s ease;
}
.pc.key {
  stroke: var(--ink);
  stroke-width: 2.2px;
}
.plbl {
  font-weight: 700;
}
.parts {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0 18px;
}
.parts li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 13.5px;
}
.parts .res {
  white-space: nowrap;
}
.parts .was {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  min-width: 3.4em;
  text-align: right;
}
@media (prefers-reduced-motion: reduce) {
  .pc {
    transition: none;
  }
}
.inset-frame {
  fill: var(--card);
  stroke: var(--ink-3);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.inset-mark {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1px;
  stroke-dasharray: 3 3;
  vector-effect: non-scaling-stroke;
}
.inset-tag {
  font-family: var(--mono);
  fill: var(--ink-3);
}
