/* Presidents Vote: black, sleek. The only saturated color comes from the presidents' pins. */
@font-face {
  font-family: "Big Shoulders Display";
  src: url("/fonts/big-shoulders-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --raise: #0b0c0e;
  --raise-2: #14161a;
  --line: #1f2227;
  --line-2: #2c3037;
  --text: #f3f5f7;
  --muted: #8c939c;
  --unvoted: #14161a;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  grid-template-areas: "top ballot" "bottom ballot";
  grid-template-rows: auto 1fr;
  min-height: 100vh;
}
.top { grid-area: top; padding: clamp(22px, 3.4vw, 52px) clamp(20px, 3.4vw, 52px) 0; min-width: 0; }
.bottom { grid-area: bottom; padding: clamp(28px, 4vw, 56px) clamp(20px, 3.4vw, 52px) 72px; min-width: 0; }
.ballot {
  grid-area: ballot;
  align-self: start;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--raise);
  border-left: 1px solid var(--line);
}

/* ---------- masthead ---------- */
h1, h2 { font-family: var(--display); margin: 0; }
.masthead h1 {
  font-weight: 800;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: 0.9;
  letter-spacing: 0.004em;
  text-transform: uppercase;
  max-width: 16ch;
  text-wrap: balance;
}
.lede { margin: 20px 0 0; max-width: 54ch; color: var(--muted); }
.lede strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- map ---------- */
.mapwrap { position: relative; margin-top: clamp(16px, 3vw, 34px); }
#map { display: block; width: 100%; height: auto; }
.st {
  fill: var(--unvoted);
  stroke: #000;
  stroke-width: 1.1;
  stroke-linejoin: round;
  cursor: pointer;
  outline: none;
  transition: fill 0.5s ease;
}
.st:hover { filter: brightness(1.2) drop-shadow(0 0 7px rgba(255, 255, 255, 0.4)); }
.st.bump { animation: bump 0.9s ease-out; }
/* vote ripples and flying pins */
.fx { pointer-events: none; }
.rip { fill: none; stroke-width: 3; transform-box: fill-box; transform-origin: center; animation: rip 1.1s ease-out both; }
@keyframes rip { 0% { transform: scale(0.3); opacity: 0.95; } 100% { transform: scale(3.4); opacity: 0; stroke-width: 0.5; } }
.pin.fly { position: fixed; z-index: 60; --s: 38px; pointer-events: none; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--c), 0 0 26px var(--c); }
.mapwrap::before { content: ''; position: absolute; inset: -4% -2%; z-index: -1; background: radial-gradient(ellipse at 50% 55%, rgba(90, 120, 200, 0.16), transparent 65%); pointer-events: none; }
@keyframes bump { 0% { filter: brightness(2.4); } 100% { filter: brightness(1); } }
.hl { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; pointer-events: none; }
.lbl {
  font: 700 11.5px var(--body);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  fill: #6e7681;
  transition: fill 0.5s ease;
}
.note { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.note.err { color: #ff8a8a; }

.tip {
  position: absolute;
  z-index: 5;
  width: 264px;
  padding: 12px 14px 10px;
  background: var(--raise);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}
.tip-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.tip-name { font: 700 22px/1 var(--display); }
.tip-total { color: var(--muted); font-size: 13px; }
.tip-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 4px 0; font-size: 14px; }
.tip-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-v { font-variant-numeric: tabular-nums; color: var(--muted); }
.tip-empty { margin: 0 0 4px; color: var(--muted); font-size: 14px; }

/* ---------- pins (campaign-button style avatars) ---------- */
.pin {
  --s: 40px;
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c, #444);
  color: var(--fg, #fff);
  overflow: hidden;
  box-shadow: 0 0 0 2px #000, 0 0 0 3.5px var(--c, #444);
  font: 800 calc(var(--s) * 0.42) / 1 var(--display);
  letter-spacing: 0.02em;
}
.pin-link { display: inline-flex; border-radius: 50%; line-height: 0; }
.pin-link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.pin-link .pin, .vote .pin { cursor: pointer; transition: filter 0.15s, transform 0.15s; }
.pin-link:hover .pin, .vote .pin:hover { filter: brightness(1.2); transform: scale(1.06); }
.pin.sm { --s: 22px; box-shadow: 0 0 0 1.5px #000, 0 0 0 2.5px var(--c); }
.pin.xl { --s: 200px; box-shadow: 0 0 0 4px #000, 0 0 0 7px var(--c), 0 0 60px color-mix(in srgb, var(--c) 35%, transparent); }
.pin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; }
.pin.has-img img { opacity: 1; }
.pin.has-img .pin-i { opacity: 0; }

/* ---------- ballot (president list) ---------- */
.ballot-head { padding: 24px 22px 14px; }
.ballot-head h2 { font-weight: 800; font-size: 34px; line-height: 1; text-transform: uppercase; }
#q {
  width: 100%;
  margin-top: 14px;
  padding: 11px 14px;
  background: #000;
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
}
#q::placeholder { color: var(--muted); }
#q:focus { outline: 2px solid #fff; outline-offset: 1px; }
#list {
  list-style: none;
  margin: 0;
  padding: 4px 10px 12px;
  overflow-y: auto;
  flex: 1;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
#list li { display: flex; align-items: stretch; gap: 2px; margin: 2px 0; }
.vote {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 9px 12px 9px 11px;
  border: 0;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  background-color: transparent;
  background-image: linear-gradient(90deg, color-mix(in srgb, var(--c) 24%, transparent) calc(var(--w, 0%) - 14%), transparent var(--w, 0%));
  transition: background-color 0.15s;
}
.vote:hover { background-color: var(--raise-2); }
.vote:active { transform: scale(0.992); }
.nm { min-width: 0; }
.nm .n { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm .yr { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct { font: 700 22px/1 var(--display); font-variant-numeric: tabular-nums; text-align: right; }
.prof {
  align-self: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.prof:hover { color: var(--text); background: var(--raise-2); }
#list li.voted .vote { animation: flash 1s ease-out; }
@keyframes flash { 0% { background-color: color-mix(in srgb, var(--c) 55%, transparent); } 100% { background-color: transparent; } }
.none { padding: 6px 22px 18px; margin: 0; color: var(--muted); }
.fine { margin: 0; padding: 14px 22px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ---------- boards ---------- */
.boards { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); }
.boards h2 { font-weight: 700; font-size: 30px; line-height: 1; }
.rank { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.rank li { display: grid; grid-template-columns: 26px auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.rank .empty { display: block; color: var(--muted); }
.rk { font: 700 26px/1 var(--display); color: var(--muted); text-align: center; }
.rank .pin { --s: 36px; }
.bar { display: block; height: 4px; margin-top: 7px; border-radius: 2px; background: #1b1e23; overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--p); border-radius: 2px; background: var(--c); transition: width 0.6s ease; }

.globe-row { display: flex; gap: 24px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.globe {
  --g: 150px;
  position: relative;
  flex: none;
  width: var(--g);
  height: var(--g);
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #12223a, #070d18);
  box-shadow: 0 0 0 1px var(--line-2), 0 0 48px rgba(110, 150, 255, 0.14);
}
/* starts halfway round so the first view is Europe, Africa and Asia */
.globe svg { position: absolute; left: 0; top: 0; height: 100%; width: calc(var(--g) * 4); animation: spin 90s linear -45s infinite; }
.globe path { fill: #5c7390; }
.globe::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 72% 80%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 62%);
}
@keyframes spin { to { transform: translateX(-50%); } }
.globe-info { min-width: 0; flex: 1 1 140px; }
.bignum { margin: 0; font: 800 56px/0.95 var(--display); font-variant-numeric: tabular-nums; }
.globe-info .note { margin-top: 6px; }

.foot { margin-top: 56px; color: var(--muted); font-size: 13px; }
.foot p { margin: 0; }
.sample-note { margin-top: 6px; color: var(--muted); }
.legal { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; }
.legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover, .legal a:focus-visible { color: #fff; }
.plain + .foot, body > .foot { max-width: 720px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 32px) 56px; }

/* ---------- one-screen layout on desktop: only the president list scrolls ---------- */
@media (min-width: 961px) and (min-height: 460px) {
  body.home { overflow: hidden; }
  .shell {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 400px;
    grid-template-areas: "head ballot" "map ballot" "boards ballot" "foot ballot";
    grid-template-rows: auto minmax(0, 1fr) auto auto;
  }
  .top, .bottom { display: contents; }
  .masthead { grid-area: head; padding: clamp(14px, 3vh, 30px) 40px 0; }
  .masthead h1 { font-size: clamp(34px, 6.2vh, 62px); max-width: none; line-height: 0.95; }
  .lede { margin-top: clamp(4px, 1vh, 10px); max-width: none; font-size: 15px; }
  .mapcol { grid-area: map; min-height: 0; display: flex; flex-direction: column; padding: 0 40px; }
  .mapwrap { flex: 1; min-height: 0; margin-top: clamp(4px, 1vh, 12px); }
  #map { height: 100%; }
  .mapcol .note { margin: 4px 0 0; font-size: 13px; }
  .boards { grid-area: boards; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 6px 40px 4px; }
  .boards h2 { font-size: 24px; }
  .rank { margin-top: 8px; gap: 7px; }
  .rank li { gap: 10px; grid-template-columns: 20px auto minmax(0, 1fr) auto; }
  .rk { font-size: 20px; }
  .rank .pin { --s: 30px; }
  .nm .n { font-size: 14px; }
  .bar { margin-top: 4px; }
  .ct { font-size: 18px; }
  .globe-row { margin-top: 8px; gap: 14px; flex-wrap: nowrap; }
  .globe { --g: 70px; }
  .bignum { font-size: 34px; }
  .globe-info .note { margin-top: 2px; font-size: 12px; line-height: 1.35; }
  .share-btn { padding: 5px 11px; font-size: 12.5px; }
  .foot { grid-area: foot; margin: 0; padding: 6px 40px 12px; font-size: 12px; }
}

/* short windows (laptops with display scaling): trim extras so everything still fits */
@media (min-width: 961px) and (min-height: 460px) and (max-height: 700px) {
  .masthead { padding-top: 10px; }
  .lede { font-size: 13.5px; }
  .globe-info .note { display: none; }
  .globe { --g: 54px; }
  .bignum { font-size: 28px; }
  .rank { gap: 4px; margin-top: 6px; }
  .rank .pin { --s: 26px; }
  .rk { font-size: 17px; }
  .boards h2 { font-size: 21px; }
  .boards { padding-top: 2px; }
  .foot { font-size: 11px; padding: 2px 40px 8px; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: min(560px, calc(100vw - 32px));
  padding: 12px 18px 12px 14px;
  background: #16181d;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  font-size: 14.5px;
}
.toast i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c, #fff); }
.toast.err i { background: #ff6b6b; }
.toast.in { animation: rise 0.22s ease-out; }
/* ---------- sharing ---------- */
.toast-act { flex: none; margin-left: 4px; padding: 7px 14px; border: 0; border-radius: 10px; background: #fff; color: #000; font: 700 14px var(--body); cursor: pointer; }
.toast-act:hover { background: #dfe3e8; }
.board-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.share-btn { flex: none; white-space: nowrap; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text); font: 600 13.5px var(--body); cursor: pointer; }
.share-btn:hover { border-color: #fff; }
.share-btn[hidden] { display: none; }
dialog.share { width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 18px; border: 1px solid var(--line-2); border-radius: 20px; background: #0c0e11; color: var(--text); overflow: auto; }
dialog.share::backdrop { background: rgba(0, 0, 0, 0.78); }
.share-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.share-h h2 { font-weight: 800; font-size: 28px; text-transform: uppercase; line-height: 1; }
.share-x { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--muted); font: 600 13px var(--body); cursor: pointer; }
.share-x:hover { color: #fff; border-color: #fff; }
.share-stage canvas { display: block; width: auto; max-width: 100%; height: auto; max-height: max(260px, calc(100vh - 330px)); max-height: max(260px, calc(100dvh - 330px)); margin: 0 auto; border-radius: 12px; border: 1px solid var(--line); background: #000; }
.share-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.share-b { padding: 12px 10px; border: 1px solid var(--line-2); border-radius: 12px; background: #16181d; color: var(--text); font: 600 15px var(--body); cursor: pointer; }
.share-b:hover { border-color: #fff; }
.share-b.primary { grid-column: 1 / -1; background: #fff; color: #000; border-color: #fff; font-weight: 700; }
.share-note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }
@keyframes rise { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- bio pages ---------- */
.bio-shell { max-width: 1000px; margin: 0 auto; padding: 28px clamp(20px, 4vw, 40px) 64px; }
.back { color: var(--muted); font-size: 14px; text-decoration: none; }
.back:hover { color: var(--text); }
.bio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px; align-items: start; }
.bio-a .portrait { justify-content: start; padding: 0 0 8px; }
.bio-b { margin-top: 36px; }
.bio-c { margin-top: 40px; }
.portrait { display: grid; place-items: center; padding: 10px; }
.portrait .pin.xl { --s: 200px; }
.bio h1 { font-weight: 800; font-size: clamp(42px, 6vw, 76px); line-height: 0.92; text-transform: uppercase; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px 28px; margin: 28px 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 3px 0 0; font: 700 26px/1.1 var(--display); }
.cta {
  padding: 13px 22px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #000;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 0 0 0 var(--c, #fff);
  transition: box-shadow 0.2s, transform 0.1s;
}
.cta:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, #fff) 55%, transparent); }
.cta:active { transform: scale(0.985); }
.bio-sec { margin-top: 40px; }
.bio-sec h2 { font-weight: 700; font-size: 30px; }
.facts.more { margin: 36px 0 0; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.facts dd.sm { font: 600 17px/1.3 var(--ui, inherit); }
.facts .sub { display: block; margin-top: 3px; font-weight: 400; font-size: 13.5px; color: var(--muted); }
.facts .sub:empty { display: none; }
.srcs { margin: 44px 0 0; max-width: 70ch; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.srcs a { color: inherit; text-underline-offset: 2px; }
.srcs a:hover { color: var(--text); }
.where { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 32px; margin-top: 16px; align-items: center; }
.mini svg { display: block; width: 100%; height: auto; }
.mini .mst { fill: #15181c; stroke: #000; stroke-width: 0.8; transition: fill 0.3s; }
.mini .mst.lead { fill: var(--c); }
.mini .mst.birth { stroke: #fff; stroke-width: 1.8; paint-order: stroke; }
.lead-sum { margin: 0 0 10px; font-weight: 600; }
.top-states { margin: 0 !important; padding: 0 !important; list-style: none; gap: 6px !important; }
.top-states li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.top-states b { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.bio-sec ul { margin: 14px 0 0; padding-left: 1.3em; display: grid; gap: 10px; max-width: 62ch; }
.bio-sec ol { margin: 14px 0 0; padding-left: 1.3em; display: grid; gap: 12px; max-width: 62ch; }
.bio-sec li::marker { color: var(--muted); font-weight: 600; }

/* previous / next president */
.pn { display: flex; justify-content: space-between; gap: 16px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); }
.pn a { display: grid; gap: 2px; text-decoration: none; color: var(--text); }
.pn .nx { text-align: right; }
.pn span { color: var(--muted); font-size: 13px; }
.pn b { font-weight: 600; }
.pn .chev { display: none; }
.pn a:hover b { text-decoration: underline; }

/* desktop: the whole bio fits one screen; previous and next sit left and right, mid-height */
@media (min-width: 961px) and (min-height: 540px) {
  body.bio-page { overflow: hidden; }
  .bio-shell {
    max-width: none; height: 100vh; height: 100dvh; padding: 18px 0 0;
    display: grid;
    grid-template-columns: clamp(96px, 9vw, 150px) minmax(0, 1fr) clamp(96px, 9vw, 150px);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "back back back" ". main ." "foot foot foot";
  }
  .back { grid-area: back; padding: 0 clamp(20px, 4vw, 40px); }
  .bio {
    grid-area: main; margin: 0; align-self: center; min-height: 0; max-height: 100%;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.25fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto; gap: 0 clamp(24px, 3vw, 48px);
  }
  .bio-a { grid-row: 1; }
  .bio-b, .bio-c { grid-column: auto; grid-row: 1; min-height: 0; }
  .bio-b { overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
  .bio-c { margin: 0; overflow-y: auto; scrollbar-width: thin; }
  .bio-a .portrait .pin.xl { --s: clamp(120px, 20vh, 190px); }
  .bio h1 { font-size: clamp(34px, 4.4vw, 62px); margin-top: 10px; }
  .bio .facts { grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 18px 0; }
  .facts dd { font-size: 22px; }
  .bio .cta { width: 100%; padding: 12px 18px; }
  .bio-sec { margin-top: 0; }
  .bio-b .bio-sec { margin-top: 0; }
  .bio-b .bio-sec + .bio-sec, .bio-b .facts.more, .bio-b .bio-sec:last-child { margin-top: 20px; }
  .bio-sec h2 { font-size: 24px; }
  .bio-sec ul, .bio-sec ol { margin-top: 8px; gap: 7px; font-size: 15px; line-height: 1.4; }
  .bio-b .facts.more { grid-template-columns: 1fr 1fr; gap: 12px 18px; }
  .facts dd.sm { font-size: 15px; }
  .where { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 10px; }
  .mini { max-width: 380px; }
  .top-states li { padding: 5px 0; font-size: 15px; }
  .srcs { grid-column: 1 / -1; grid-row: 2; margin: 14px 0 0; max-width: none; font-size: 11.5px; line-height: 1.45; }
  .pn { display: contents; }
  .pn .pv, .pn .nx { align-self: center; justify-self: center; grid-row: 2; width: 100%; padding: 0 12px; text-align: center; justify-items: center; }
  .pn .pv { grid-column: 1; }
  .pn .nx { grid-column: 3; text-align: center; }
  .pn a { gap: 4px; transition: transform 0.15s; }
  .pn a b { font-size: 14px; line-height: 1.25; }
  .pn .chev { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 4px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel, #0d0f12); transition: border-color 0.15s, background 0.15s; }
  .pn .chev::before { content: ""; width: 10px; height: 10px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateX(2px) rotate(45deg); }
  .pn .nx .chev::before { transform: translateX(-2px) rotate(-135deg); }
  .pn a:hover .chev, .pn a:focus-visible .chev { border-color: #fff; background: #15181c; }
  .pn a:hover.pv { transform: translateX(-3px); }
  .pn a:hover.nx { transform: translateX(3px); }
  .pn a:hover b { text-decoration: none; }
  .bio-shell .foot { grid-area: foot; margin: 0; padding: 8px clamp(20px, 4vw, 40px) 14px; font-size: 12px; }
}
@media (min-width: 961px) and (min-height: 540px) and (max-height: 760px) {
  .bio-shell { padding-top: 10px; }
  .bio h1 { font-size: clamp(30px, 3.6vw, 48px); }
  .bio-a .portrait .pin.xl { --s: 104px; }
  .bio .facts { margin: 12px 0; gap: 10px 16px; }
  .facts dd { font-size: 19px; }
  .bio-sec h2 { font-size: 21px; }
  .bio-sec ul, .bio-sec ol { font-size: 13.5px; gap: 5px; }
  .facts dd.sm { font-size: 13.5px; }
  .facts dt { font-size: 12px; }
  .bio .cta { padding: 10px 14px; font-size: 15px; }
  .bio-b .bio-sec + .bio-sec, .bio-b .facts.more, .bio-b .bio-sec:last-child { margin-top: 12px; }
  .top-states li { padding: 3px 0; font-size: 13.5px; }
  .mini { max-width: 280px; }
  .srcs { margin-top: 8px; font-size: 11px; }
}

/* ---------- plain text pages ---------- */
.plain { max-width: 720px; margin: 0 auto; padding: 36px clamp(20px, 4vw, 32px) 80px; }
.plain h1 { font-weight: 800; font-size: clamp(40px, 6vw, 64px); line-height: 0.95; text-transform: uppercase; margin: 22px 0 18px; }
.plain h2 { font-weight: 700; font-size: 28px; margin: 34px 0 8px; }
.plain p, .plain li { color: #cfd4da; }
.plain ul { padding-left: 1.2em; display: grid; gap: 8px; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "ballot" "bottom"; grid-template-rows: auto; }
  .ballot { position: static; height: auto; align-self: stretch; border-left: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 24px; }
  #list { max-height: 68vh; flex: none; }
  .boards { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .lbl { display: none; }
  .bio { grid-template-columns: minmax(0, 1fr); }
  .where { grid-template-columns: minmax(0, 1fr); }
  .portrait { justify-content: start; }
  .portrait .pin.xl { --s: 150px; }
  .tip { width: 232px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
