/* ==========================================================================
   The Human Direction
   Neutral on purpose. Red and blue appear in the brand mark, the hero
   diagram, and party data, where showing them side by side is the point.
   ========================================================================== */

:root {
  --paper: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #faf9f5;
  --ink: #17171c;
  --ink-2: #3b3b45;
  --muted: #6a6a75;
  --line: #dfdbd1;
  --line-strong: #bdb8ab;
  --accent: #5a3ea6;
  --accent-ink: #4a3190;
  --accent-soft: #eee9f8;
  --neutral-bar: #a9a39a;
  --red: #c0392b;
  --blue: #2457a6;
  --on-fill: #ffffff;

  --amber-bg: #fbefd5; --amber-fg: #7a4e00;
  --green-bg: #dff1e6; --green-fg: #1f6b3e;
  --sand-bg:  #efe7d6; --sand-fg:  #5f4a1c;

  --shadow-sm: 0 1px 2px rgb(20 20 30 / 0.05);
  --shadow: 0 1px 2px rgb(20 20 30 / 0.04), 0 10px 30px -14px rgb(20 20 30 / 0.22);

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 44rem;
  --wide: 70rem;
  --gutter: 20px;
  --radius: 14px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121216; --surface: #1b1b22; --surface-2: #17171d;
    --ink: #f2f0ea; --ink-2: #d2cfc7; --muted: #9b99a3;
    --line: #2e2e38; --line-strong: #4a4a56;
    --accent: #ab95ef; --accent-ink: #c7b8f6; --accent-soft: #272040;
    --neutral-bar: #6c6878;
    --red: #e2675a; --blue: #6f9be6; --on-fill: #121216;
    --amber-bg: #3a2c10; --amber-fg: #f2c46b;
    --green-bg: #133523; --green-fg: #7fd6a2;
    --sand-bg:  #33291a; --sand-fg:  #e3c98f;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 14px 34px -18px rgb(0 0 0 / 0.75);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121216; --surface: #1b1b22; --surface-2: #17171d;
  --ink: #f2f0ea; --ink-2: #d2cfc7; --muted: #9b99a3;
  --line: #2e2e38; --line-strong: #4a4a56;
  --accent: #ab95ef; --accent-ink: #c7b8f6; --accent-soft: #272040;
  --neutral-bar: #6c6878;
  --red: #e2675a; --blue: #6f9be6; --on-fill: #121216;
  --amber-bg: #3a2c10; --amber-fg: #f2c46b;
  --green-bg: #133523; --green-fg: #7fd6a2;
  --sand-bg:  #33291a; --sand-fg:  #e3c98f;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 14px 34px -18px rgb(0 0 0 / 0.75);
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap, .wrap-wide { width: 100%; margin: 0 auto; padding-inline: var(--gutter); }
.wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.wrap-wide { max-width: calc(var(--wide) + 2 * var(--gutter)); }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.012em; }
h2 { font-size: clamp(1.65rem, 4.6vw, 2.2rem); margin-bottom: 0.5rem; }
h3 { font-size: 1.05rem; font-weight: 700; margin: 1.75rem 0 0.75rem; }
h4 { font-size: 1.05rem; font-weight: 700; margin: 0.25rem 0 0.35rem; }
p { margin: 0 0 1rem; text-wrap: pretty; }
strong { font-weight: 700; }
a { color: var(--accent-ink); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
sup { font-size: 0.68em; line-height: 0; margin-left: 1px; }
sup a { text-decoration: none; font-weight: 700; }
button { font: inherit; color: inherit; }
svg { display: block; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

main > section { padding-top: 3.5rem; padding-bottom: 3.5rem; border-top: 1px solid var(--line); }
main > section:first-child { border-top: 0; }
.section-sub { color: var(--ink-2); margin-bottom: 1.75rem; }

/* Scroll reveal: only hides things when JS is running and motion is OK. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0; transform: translateY(18px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- Masthead ---------- */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.masthead-inner { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.masthead-actions { display: flex; align-items: center; gap: 8px; }

.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em;
}
.mark {
  display: inline-block; flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(90deg, var(--red) 0 50%, var(--blue) 50% 100%);
}

.pill {
  font-size: 0.85rem; font-weight: 700; text-decoration: none;
  color: var(--paper); background: var(--ink); border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 5px 15px;
  transition: transform 150ms ease;
}
.pill:hover { transform: translateY(-1px); }

.icon-btn {
  appearance: none; cursor: pointer;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: transparent; border: 1.5px solid var(--line-strong); border-radius: 50%;
  color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: none; }
.icon-btn .fill { fill: currentColor; stroke: none; }
.icon-btn[data-mode="auto"] .i-auto,
.icon-btn[data-mode="light"] .i-light,
.icon-btn[data-mode="dark"] .i-dark,
.icon-btn:not([data-mode]) .i-auto { display: block; }

/* ---------- Hero ---------- */

.hero { padding-top: 2.5rem; overflow: hidden; }
.hero-grid { display: grid; gap: 1.25rem; align-items: center; }
@media (min-width: 900px) {
  .hero { padding-top: 4.5rem; }
  .hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 3rem; }
}

.hero-text { max-width: 40rem; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.6rem, 9.5vw, 4.6rem); margin-bottom: 1.25rem; letter-spacing: -0.02em; }
.lead { font-family: var(--serif); font-weight: 600; font-size: clamp(1.25rem, 3.6vw, 1.6rem); line-height: 1.4; }
.hero-body { color: var(--ink-2); margin-bottom: 0; }

.venn { margin: 0; text-align: center; order: -1; }
@media (min-width: 900px) { .venn { order: 0; } }
.venn svg { width: min(100%, 420px); height: auto; margin: 0 auto; overflow: visible; }
@media (max-width: 899px) { .venn svg { width: min(78%, 300px); } }
.venn-red { fill: var(--red); }
.venn-blue { fill: var(--blue); }
.venn-overlap { fill: var(--accent); }
.venn-red, .venn-blue { opacity: 0.92; }
.venn-label {
  fill: var(--on-fill); font-family: var(--sans); font-weight: 800; font-size: 15px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.venn-human { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: 0; text-transform: none; }
.venn figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.6rem; font-style: italic; }

/* ---------- Meter ---------- */

.meter { margin: 0.5rem 0; }
.meter-track-area {
  --label-h: 46px;
  --track-h: 14px;
  position: relative;
  padding-top: var(--label-h);
}

.track {
  position: relative; height: var(--track-h);
  border-radius: 999px; background: var(--line); overflow: hidden;
  transition: box-shadow 150ms ease;
}
.track-fill {
  height: 100%; width: 0%; background: var(--accent); border-radius: 999px;
  transition: width 1100ms var(--ease-out);
}
.ticks, .deadlines { position: absolute; left: 0; right: 0; top: var(--label-h); height: var(--track-h); pointer-events: none; }
.tick { position: absolute; top: 0; width: 2px; height: 100%; margin-left: -1px; background: var(--paper); }

.deadline-mark {
  position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  background: var(--surface); border: 2px solid var(--ink); transform: rotate(45deg); border-radius: 2px;
}
.deadline-mark.is-done { background: var(--ink); }

.pin {
  position: absolute; z-index: 3; top: 0; left: var(--pos, 0%);
  width: 0; height: calc(var(--label-h) + var(--track-h) / 2);
  transition: left 1100ms var(--ease-out);
  pointer-events: none;
}
.pin-label {
  position: absolute; top: 0; white-space: nowrap;
  background: var(--ink); color: var(--paper);
  font-size: 0.75rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 6px;
}
.pin[data-align="start"] .pin-label { left: -11px; }
.pin[data-align="center"] .pin-label { left: 0; transform: translateX(-50%); }
.pin[data-align="end"] .pin-label { right: -11px; }
.pin-stem { position: absolute; left: -1px; top: 26px; bottom: 0; width: 2px; background: var(--ink); }
.pin-stem::after {
  content: ""; position: absolute; left: 50%; bottom: -11px;
  width: 22px; height: 22px; margin-left: -11px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--ink);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%  { box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent); }
}

/* The scrubber: a custom slider laid over the track. Horizontal drags scrub; vertical drags still scroll. */
.scrub {
  position: absolute; z-index: 4; left: 0; right: 0;
  top: calc(var(--label-h) - 16px); height: calc(var(--track-h) + 32px);
  cursor: ew-resize; touch-action: pan-y; border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}
.scrub:focus-visible { outline: none; }
.scrub:focus-visible ~ .track { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--accent); }

.ghost {
  position: absolute; z-index: 2; left: var(--gpos, 0%);
  top: calc(var(--label-h) - 8px); height: calc(var(--track-h) + 16px); width: 0;
  opacity: 0; transition: opacity 160ms ease; pointer-events: none;
}
.ghost.is-on { opacity: 1; }
.ghost-line { position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--accent); border-radius: 2px; }
.ghost-tip {
  position: absolute; bottom: calc(100% + 8px); white-space: nowrap;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  font-size: 0.8rem; line-height: 1.35; padding: 7px 10px; border-radius: 8px;
}
.ghost[data-align="start"] .ghost-tip { left: -10px; }
.ghost[data-align="center"] .ghost-tip { left: 0; transform: translateX(-50%); }
.ghost[data-align="end"] .ghost-tip { right: -10px; }
.ghost-tip b { font-weight: 800; }
.ghost-tip .tip-sub { display: block; color: var(--muted); }
.ghost-tip .tip-flag { display: block; color: var(--accent-ink); font-weight: 700; }

.milestones {
  --row-gap: 44px;
  position: relative; list-style: none; margin: 0; padding: 0;
  height: calc(14px + var(--row-gap) + 40px);
}
.ms { position: absolute; left: var(--pos); top: 14px; font-size: 0.78rem; line-height: 1.3; white-space: nowrap; color: var(--muted); }
.ms[data-row="0"] { z-index: 2; background: var(--paper); padding-bottom: 2px; }
.ms[data-row="1"] { z-index: 1; top: calc(14px + var(--row-gap)); }
.ms[data-align="start"]  { transform: translateX(-1px); }
.ms[data-align="center"] { transform: translateX(-50%); text-align: center; }
.ms[data-align="end"]    { transform: translateX(calc(-100% + 1px)); text-align: right; }
.ms::before { content: ""; position: absolute; bottom: 100%; width: 1px; height: 12px; background: var(--line-strong); }
.ms[data-row="1"]::before { height: calc(12px + var(--row-gap)); }
.ms[data-align="start"]::before  { left: 0; }
.ms[data-align="center"]::before { left: 50%; }
.ms[data-align="end"]::before    { right: 0; }
.ms b { display: block; font-weight: 700; color: var(--ink-2); }
.ms.is-past, .ms.is-past b { color: var(--ink); }

.scrub-hint { font-size: 0.85rem; color: var(--muted); margin: 0 0 1.5rem; }
.hint-touch { display: none; }
@media (hover: none) { .hint-touch { display: inline; } .hint-mouse { display: none; } }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 1rem; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 14px 12px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px;
}
.stat dt { font-size: 0.78rem; line-height: 1.3; color: var(--muted); font-weight: 600; }
.stat dd {
  margin: 0; font-family: var(--serif); font-weight: 700;
  font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1; font-variant-numeric: tabular-nums;
}
.meter-note { color: var(--ink-2); font-size: 0.95rem; margin: 0 0 0.75rem; }
.record-link {
  display: inline-flex; gap: 0.35em; font-size: 0.9rem; font-weight: 700; text-decoration: none;
  color: var(--accent-ink); background: var(--accent-soft); padding: 6px 12px; border-radius: 999px;
}
.record-link:hover { text-decoration: underline; }

/* ---------- Prose ---------- */

.checklist { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.checklist li { counter-increment: step; position: relative; padding: 0.7rem 0 0.7rem 2.75rem; border-top: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 1px solid var(--line); }
.checklist li::before {
  content: counter(step); position: absolute; left: 0; top: 0.7rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  font-size: 0.85rem; font-weight: 800; background: var(--ink); color: var(--paper);
}

/* ---------- Stance cards ---------- */

.group-label { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 640px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 20px 16px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.card > p { color: var(--ink-2); font-size: 0.98rem; margin-bottom: 0.75rem; }
.card .card-topic {
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 0.6rem; line-height: 1.35;
}
.card > .card-stat { color: var(--ink-2); margin-bottom: 0.9rem; }
.card .big {
  display: block;
  font-family: var(--serif); font-weight: 700; font-size: 2.8rem; line-height: 1;
  color: var(--accent-ink); margin: 0 0 0.3rem; font-variant-numeric: tabular-nums;
}
.card .cite { margin: auto 0 0; padding-top: 0.75rem; font-size: 0.8rem; color: var(--muted); }
.card > .party-note { font-size: 0.88rem; color: var(--ink-2); }
.party-note .party-label { display: block; }

.party { margin: 0.25rem 0 0.9rem; display: grid; gap: 6px; }
.party-label { font-size: 0.78rem; font-weight: 700; color: var(--muted); margin: 0 0 2px; letter-spacing: 0.02em; }
.party-row { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr) 2.6rem; align-items: center; gap: 8px; font-size: 0.82rem; }
.party-name { color: var(--ink-2); font-weight: 600; }
.party-track { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.party-fill { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1200ms var(--ease-out); }
.party-fill.d { background: var(--blue); }
.party-fill.r { background: var(--red); }
.party-fill.i { background: var(--neutral-bar); }
.party-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

.card > .callout {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 10px 12px; border-radius: 0 8px 8px 0; color: var(--ink);
}

.stance-box {
  margin-top: 0.25rem; padding: 14px; border-radius: 12px;
  background: var(--surface-2); border: 1px dashed var(--line-strong);
}
.stance-ask { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 4px; }
.stance-statement { font-family: var(--serif); font-weight: 600; font-size: 1.02rem; line-height: 1.4; margin: 0 0 10px; color: var(--ink); }
.stance-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stance-btn {
  appearance: none; cursor: pointer; font-weight: 700; font-size: 0.92rem;
  padding: 9px 10px; border-radius: 10px; background: var(--surface);
  border: 1.5px solid var(--line-strong); color: var(--ink);
  transition: transform 120ms ease, background-color 160ms ease, border-color 160ms ease;
}
.stance-btn:hover { border-color: var(--ink); }
.stance-btn:active { transform: scale(0.97); }
.stance-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.stance-btn:disabled { cursor: progress; }

.stance-fine { font-size: 0.75rem; color: var(--muted); margin: 8px 0 0; line-height: 1.4; }
.stance-result { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 420ms var(--ease-out); }
.stance-result-inner { overflow: hidden; min-height: 0; }
.stance.is-answered .stance-result { grid-template-rows: 1fr; }
.stance-verdict { font-weight: 700; font-size: 0.92rem; margin: 10px 0 2px; color: var(--accent-ink); }
.stance-live { font-size: 0.8rem; color: var(--muted); margin: 0; font-variant-numeric: tabular-nums; }

.common {
  margin-top: 1.5rem; display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.common-dots { display: grid; grid-template-columns: repeat(2, 14px); gap: 5px; flex: none; }
.common-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); transition: background-color 300ms ease, border-color 300ms ease, transform 300ms var(--ease-out); }
.common-dots span.is-with { background: var(--accent); border-color: var(--accent); transform: scale(1.08); }
.common-dots span.is-against { background: var(--neutral-bar); border-color: var(--neutral-bar); }
.common-text { margin: 0; font-weight: 600; color: var(--ink-2); }
.common.is-complete .common-text { color: var(--ink); }

.closer { font-family: var(--serif); font-weight: 600; font-size: clamp(1.2rem, 3.4vw, 1.45rem); line-height: 1.4; margin: 2rem 0 0; }

/* ---------- On the record ---------- */

.record-tally { display: flex; flex-wrap: wrap; gap: 8px; margin: -0.5rem 0 1.25rem; }
.record-tally[hidden], .filters[hidden], .record-empty[hidden] { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 1rem; }
.filter {
  appearance: none; cursor: pointer; font-size: 0.85rem; font-weight: 700;
  padding: 6px 14px; border-radius: 999px; background: transparent;
  border: 1.5px solid var(--line-strong); color: var(--ink-2);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.promises { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.promise {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.promise:target { box-shadow: 0 0 0 3px var(--accent); }
.promise-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.78rem; }
.promise-cat { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.promise-deadline { color: var(--ink-2); font-weight: 600; margin-left: auto; }
.promise-deadline.is-overdue { color: var(--ink); font-weight: 800; }
.promise h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 8px; }
.promise blockquote {
  margin: 0 0 10px; padding: 2px 0 2px 14px; border-left: 3px solid var(--line-strong);
  font-family: var(--serif); font-size: 1.02rem; line-height: 1.5; color: var(--ink);
}
.promise-who { font-size: 0.9rem; color: var(--ink-2); margin: 0 0 8px; }
.promise-who b { color: var(--ink); }
.promise-links { font-size: 0.85rem; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.promise-status-note { font-size: 0.88rem; margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); color: var(--ink-2); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.chip.on_record   { border: 1.5px solid var(--line-strong); color: var(--ink-2); }
.chip.in_progress { background: var(--amber-bg); color: var(--amber-fg); }
.chip.kept        { background: var(--green-bg); color: var(--green-fg); }
.chip.compromise  { background: var(--sand-bg); color: var(--sand-fg); }
.chip.broken      { background: var(--ink); color: var(--paper); }
.chip .n { font-variant-numeric: tabular-nums; }

.record-empty {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  padding: 20px; color: var(--ink-2); background: var(--surface-2);
}
.record-empty p:last-child { margin: 0; }
.record-empty-title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); margin-bottom: 0.4rem; }

/* ---------- Poll ---------- */

.poll { text-align: center; }
.poll h2 { font-size: clamp(2rem, 6vw, 2.7rem); }
.statement { font-family: var(--serif); font-weight: 600; font-size: clamp(1.15rem, 3.2vw, 1.35rem); line-height: 1.45; max-width: 34rem; margin: 0.5rem auto 1.75rem; }

.vote-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 30rem; margin: 0 auto; }
.vote {
  appearance: none; cursor: pointer; color: var(--ink);
  background: var(--surface); border: 2px solid var(--line-strong); border-radius: var(--radius);
  padding: 18px 10px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 200ms ease;
}
.vote:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.vote:active { transform: scale(0.97); }
.vote:disabled { cursor: progress; }
.vote svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vote-label { font-weight: 700; font-size: 1rem; }
.vote-count { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; line-height: 1; font-variant-numeric: tabular-nums; }
.vote[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.vote[aria-pressed="true"] svg { fill: color-mix(in srgb, var(--accent) 25%, transparent); stroke: var(--accent-ink); }
.vote[aria-pressed="true"] .vote-label::after { content: " \2713"; color: var(--accent-ink); }
.vote.is-bump svg { animation: bump 520ms var(--ease-out); }
@keyframes bump { 0% { transform: scale(1) rotate(0); } 35% { transform: scale(1.3) rotate(-12deg); } 100% { transform: scale(1) rotate(0); } }

.split { display: flex; height: 12px; border-radius: 999px; overflow: hidden; max-width: 30rem; margin: 1.25rem auto 0.5rem; background: var(--line); }
.split span { height: 100%; width: 0; transition: width 700ms var(--ease-out); }
.split-up { background: var(--accent); }
.split-down { background: var(--neutral-bar); }
.split-legend { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); margin: 0 0 0.5rem; font-variant-numeric: tabular-nums; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-fg); animation: live 2s ease-out infinite; }
.live-dot.is-off { background: var(--neutral-bar); animation: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green-fg) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 8px transparent; } }

.poll-status { min-height: 1.5em; font-size: 0.9rem; font-weight: 600; color: var(--accent-ink); margin: 0; }
.poll-fine { font-size: 0.8rem; color: var(--muted); max-width: 28rem; margin: 0.75rem auto 0; }

.share { margin: 1rem auto 0; max-width: 28rem; }
.share[hidden] { display: none; }
.share p { font-size: 0.92rem; color: var(--ink-2); margin-bottom: 0.6rem; }
.share-btn {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem; padding: 10px 18px; border-radius: 999px;
  background: var(--accent); color: var(--on-fill); border: 0;
  transition: transform 140ms ease, filter 140ms ease;
}
.share-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.share-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share-btn.subtle { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); padding: 7px 14px; font-size: 0.85rem; }

/* ---------- Register to vote ---------- */

.hero-cta { margin: 1.25rem 0 0; font-weight: 700; }
.hero-cta a { color: var(--accent-ink); text-underline-offset: 3px; }
.register { text-align: center; }
.register h2 { font-size: clamp(1.8rem, 5.5vw, 2.4rem); }
.register .section-sub { max-width: 34rem; margin-inline: auto; }
.register-picker { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; max-width: 32rem; margin: 0 auto; }
.register-picker select {
  flex: 1 1 15rem; min-width: 0; font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 10px 16px; cursor: pointer;
}
.register-picker select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.register-picker .share-btn { text-decoration: none; justify-content: center; }
.register-links { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 0.92rem; font-weight: 600; }
.register-links a, .register-fine a { color: var(--accent-ink); text-underline-offset: 3px; }
.register-fine { font-size: 0.8rem; color: var(--muted); max-width: 32rem; margin: 1.25rem auto 0; }

/* ---------- Footer ---------- */

.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 2.5rem 0 3rem; }
.sources-title { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.pledge { margin-bottom: 2rem; }
.pledge-list { margin: 0; padding-left: 1.1rem; font-size: 0.9rem; color: var(--ink-2); display: grid; gap: 0.45rem; }
.pledge-list strong { color: var(--ink); }
.sources { margin: 0 0 2rem; padding-left: 1.25rem; font-size: 0.85rem; color: var(--ink-2); }
.sources li { margin-bottom: 0.6rem; padding-left: 0.25rem; }
.sources li:target { background: var(--accent-soft); border-radius: 4px; }
.footer-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.sign-off { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 600; margin: 0; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 80;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: 0.9rem;
  padding: 10px 16px; border-radius: 999px; box-shadow: var(--shadow);
  transition: opacity 220ms ease, transform 220ms var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Motion off ---------- */

@media (prefers-reduced-motion: reduce) {
  .pin-stem::after, .live-dot { animation: none; }
  .track-fill, .pin, .party-fill, .split span, .stance-result { transition: none; }
  .vote.is-bump svg { animation: none; }
}

/* Facts paragraph on the "Two things that can't wait" cards */
.card > .card-facts { font-size: 0.92rem; line-height: 1.6; }

/* "Three things that can't wait": text-heavy, so one full-width card each */
@media (min-width: 640px) { .priorities .cards { grid-template-columns: 1fr; } }
.priorities .card { padding: 22px 24px 18px; }
@media (min-width: 640px) {
  .priorities .stance-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); column-gap: 16px; align-items: center; }
  .priorities .stance-box > .stance-ask, .priorities .stance-box > .stance-statement { grid-column: 1; }
  .priorities .stance-box > .stance-buttons { grid-column: 2; grid-row: 1 / span 2; }
  .priorities .stance-box > .stance-fine, .priorities .stance-box > .stance-result { grid-column: 1 / -1; }
}

/* ---------- Who was actually asked ---------- */
.sample-n {
  font-weight: 800; color: var(--ink);
  background: var(--accent-soft); padding: 1px 6px; border-radius: 6px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.card > .sample-moe { font-size: 0.8rem; color: var(--muted); margin: -0.45rem 0 0.9rem; }
.sample-moe a { font-weight: 700; margin-left: 4px; white-space: nowrap; }

/* ---------- How to read these numbers ---------- */
.explain-grid { display: grid; gap: 12px; margin-bottom: 1.25rem; }
@media (min-width: 640px) { .explain-grid { grid-template-columns: 1fr 1fr; } }
.explain {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.explain p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.explain .explain-big { font-family: var(--serif); font-weight: 700; font-size: 1.9rem; line-height: 1.1; color: var(--accent-ink); margin-bottom: 0.35rem; }
.explain-list { margin: 0 0 1rem; padding-left: 1.1rem; display: grid; gap: 0.6rem; color: var(--ink-2); }
.explain-list strong { color: var(--ink); }
.explainer .cite { font-size: 0.8rem; color: var(--muted); margin: 0; }

/* A lone last card in a two-column grid spans the full width */
@media (min-width: 640px) { .cards > .card:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.common-dots { grid-template-columns: repeat(5, 14px) !important; }

/* ---------- Sharing ---------- */
.icon-btn.share-icon svg { display: block; }
.card.stance { position: relative; }
.card-share {
  appearance: none; cursor: pointer; position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--muted);
  transition: color 140ms ease, border-color 140ms ease;
}
.card-share:hover, .card-share:focus-visible { color: var(--ink); border-color: var(--ink); }
.card-share svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card .card-topic { padding-right: 44px; }

.share-dialog {
  width: min(28rem, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line);
  border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.share-dialog::backdrop { background: rgb(10 10 15 / 0.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.share-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.share-head h2 { font-size: 1.35rem; margin: 0; }
.close-x { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; display: block !important; }
.share-preview { font-size: 0.9rem; color: var(--ink-2); margin: 0 0 14px; }
.share-copy { display: flex; gap: 8px; margin-bottom: 14px; }
.share-copy input {
  flex: 1; min-width: 0; font: inherit; font-size: 0.88rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 8px 14px;
}
.share-copy .share-btn { padding: 8px 16px; font-size: 0.9rem; }
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share-option {
  display: grid; place-items: center; min-height: 44px; padding: 8px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  font-weight: 700; font-size: 0.9rem; text-decoration: none;
  transition: border-color 140ms ease, transform 140ms ease;
}
.share-option:hover, .share-option:focus-visible { border-color: var(--ink); transform: translateY(-1px); }
.share-more {
  appearance: none; cursor: pointer; width: 100%; margin-top: 12px; padding: 10px; border-radius: 12px;
  background: transparent; border: 1.5px dashed var(--line-strong); color: var(--ink-2); font-weight: 700;
}
.share-more[hidden] { display: none; }
@media (max-width: 520px) {
  /* Phones without a system share sheet: open as a bottom sheet */
  .share-dialog { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; }
}

/* Small phones: keep the name and the header buttons on one line */
.wordmark { white-space: nowrap; }
@media (max-width: 420px) {
  .wordmark { font-size: 1rem; gap: 8px; }
  .masthead-actions { gap: 6px; }
  .icon-btn { width: 34px; height: 34px; }
  .pill { padding: 5px 12px; }
}

/* ---------- Email alerts signup ---------- */
.alerts {
  margin-top: 1.5rem; padding: 18px 20px; border-radius: var(--radius);
  background: var(--accent-soft); border: 1.5px solid var(--accent);
}
.alerts[hidden] { display: none; }
.alerts-title { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; margin: 0 0 4px; color: var(--ink); }
.alerts-sub { font-size: 0.88rem; color: var(--ink-2); margin: 0 0 12px; }
.alerts-form { display: flex; gap: 8px; flex-wrap: wrap; }
.alerts-form input[type="email"] {
  flex: 1 1 14rem; min-width: 0; font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 10px 16px;
}
.alerts-form input[type="email"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.alerts-form .share-btn:disabled { opacity: 0.6; cursor: progress; }
.alerts-msg { font-size: 0.9rem; font-weight: 600; color: var(--accent-ink); margin: 8px 0 0; min-height: 1.2em; }
.visually-hidden, .hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
