/* 29n.voto — hoja de estilos común
   Concepto: interfaz amable de estilo shadcn/ui (neutros zinc, tarjetas con borde suave, radios generosos)
   con un único acento propio del tema: el sepia de la papeleta del Senado. El color de partido solo aparece en los datos. */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --bg: #ffffff;
  --fg: #09090b;
  --card: #ffffff;
  --muted: #f4f4f5;
  --muted-fg: #71717a;
  --border: #e4e4e7;
  --primary: #18181b;
  --primary-fg: #fafafa;
  --ring: #a1a1aa;
  --sepia: #a8743f;
  --sepia-soft: #fbf5ee;
  --sepia-line: #ecd9c3;
  --info: #2563eb;
  --good: #16a34a;
  --live: #dc2626;
  --shadow: 0 1px 2px rgba(9, 9, 11, 0.05), 0 1px 3px rgba(9, 9, 11, 0.04);
  --shadow-lg: 0 10px 30px -12px rgba(9, 9, 11, 0.18);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09090b; --fg: #fafafa; --card: #0f0f12; --muted: #18181b; --muted-fg: #a1a1aa;
    --border: #27272a; --primary: #fafafa; --primary-fg: #18181b; --ring: #52525b;
    --sepia: #d9a873; --sepia-soft: #1d1710; --sepia-line: #3d2f20; --info: #60a5fa; --good: #4ade80; --live: #f87171;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lg: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09090b; --fg: #fafafa; --card: #0f0f12; --muted: #18181b; --muted-fg: #a1a1aa;
  --border: #27272a; --primary: #fafafa; --primary-fg: #18181b; --ring: #52525b;
  --sepia: #d9a873; --sepia-soft: #1d1710; --sepia-line: #3d2f20; --info: #60a5fa; --good: #4ade80; --live: #f87171;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4); --shadow-lg: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg); color: var(--fg);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
html.i18n-pending body { visibility: hidden; }
.site-header:empty { min-height: 93px; }
.site:empty { min-height: 240px; }
.wrap {
  max-width: 1080px; margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
a { color: var(--fg); font-weight: 500; text-decoration: underline; text-decoration-color: var(--ring); text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--fg); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--bg); padding: 6px 10px; z-index: 40; }

/* ---------- Cabecera fija ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding-block: 12px 0; }
.site-header .brand { margin-right: auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); flex: none; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px; background: var(--primary); color: var(--primary-fg);
  display: grid; place-items: center; font-weight: 700; font-size: 14px; letter-spacing: -0.02em; position: relative;
}
.brand .mark::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--sepia); }
.brand .word { font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }
.brand .word span { color: var(--muted-fg); font-weight: 500; }
.mainnav { min-width: 0; }
.mainnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.mainnav ul::-webkit-scrollbar { display: none; }
.mainnav a {
  display: block; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--muted-fg); text-decoration: none; transition: color .15s, background .15s;
}
.mainnav a:hover { color: var(--fg); background: var(--muted); }
.mainnav a[aria-current="page"] { color: var(--fg); background: var(--muted); }
.header-cta { flex: none; }
.langs { display: inline-flex; flex: none; padding: 2px; border: 1px solid var(--border); border-radius: 9px; background: var(--muted); }
.langs a { font-size: 12px; font-weight: 600; text-decoration: none; color: var(--muted-fg); padding: 4px 7px; border-radius: 7px; line-height: 1.2; }
.langs a:hover { color: var(--fg); }
.langs a[aria-current="true"] { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.mainnav { order: 3; flex-basis: 100%; margin-inline: -10px; padding-bottom: 6px; }
@media (max-width: 640px) { .site-header .header-cta { display: none; } }

/* ---------- Botones e insignias ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px; font-size: 14px; font-weight: 550;
  text-decoration: none; border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 88%, var(--bg)); }
.btn-outline { background: var(--card); color: var(--fg); border-color: var(--border); box-shadow: var(--shadow); }
.btn-outline:hover { background: var(--muted); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sepia); }
.badge, .kicker {
  display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: 100%;
  font-size: 12.5px; font-weight: 550; line-height: 1; padding: 6px 10px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--fg); margin: 0;
}
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sepia); flex: none; }
.badge.sepia { background: var(--sepia-soft); border-color: var(--sepia-line); color: var(--sepia); }
.badge.info { color: var(--info); }

/* ---------- Cabecera de página ---------- */
.page-head { padding-block: 48px 28px; display: grid; gap: 14px; justify-items: start; }
h1 {
  font-weight: 700; font-size: clamp(32px, 5vw, 48px); line-height: 1.05; letter-spacing: -0.035em;
  margin: 0; text-wrap: balance; max-width: 22ch;
}
.standfirst { font-size: clamp(17px, 2vw, 19px); line-height: 1.55; color: var(--muted-fg); margin: 0; max-width: 60ch; }
.meta { font-size: 13.5px; color: var(--muted-fg); margin: 0; }
.meta a { color: var(--muted-fg); }
h2 { font-weight: 650; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; letter-spacing: -0.025em; margin: 0 0 8px; text-wrap: balance; }
h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.prose { max-width: 68ch; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--muted-fg); }
.muted { color: var(--muted-fg); }
.small { font-size: 13.5px; }
.num { font-variant-numeric: tabular-nums; }

section.block { padding-block: 40px 4px; }
.intro { color: var(--muted-fg); max-width: 66ch; margin: 0 0 22px; }

/* ---------- Rejillas ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lead-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .lead-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.grid-2 > *, .grid-3 > *, .lead-grid > * { min-width: 0; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px;
}
.card > :last-child { margin-bottom: 0; }
.grid-3 > div, .grid-2 > .card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; }
.grid-3 > div > :last-child, .grid-2 > .card > :last-child { margin-bottom: 0; }
.grid-2 > figure { margin: 0; }

/* ---------- Portada: héroe ---------- */
.hero { padding-block: 56px 16px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; }
@media (max-width: 860px) { .hero { grid-template-columns: minmax(0, 1fr); padding-top: 36px; } }
.hero-copy { display: grid; gap: 18px; justify-items: start; }
.hero-copy h1 { font-size: clamp(36px, 5.6vw, 56px); max-width: 15ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.countdown-card {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px;
}
.countdown-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 16px 16px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 60%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent 60%);
}
.countdown-card > * { position: relative; }
.cd-label { font-size: 13px; color: var(--muted-fg); margin: 0; }
.cd-big { font-size: 64px; font-weight: 700; letter-spacing: -0.05em; line-height: 1; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.cd-sub { font-size: 14px; color: var(--muted-fg); margin: 0 0 18px; }
.next-dates { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.next-dates li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 14px; }
.next-dates li:last-child { border-bottom: 0; padding-bottom: 0; }
.next-dates .d { font-family: var(--mono); font-size: 12.5px; color: var(--muted-fg); min-width: 54px; font-variant-numeric: tabular-nums; }

/* ---------- Ficha de datos ---------- */
aside.facts { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
aside.facts h2 { font-size: 14px; font-weight: 600; letter-spacing: 0; margin: 0 0 4px; }
.facts dl { margin: 0; }
.facts .row { display: flex; justify-content: space-between; gap: 16px; padding-block: 9px; border-bottom: 1px solid var(--border); font-size: 14px; }
.facts .row:last-child { border-bottom: 0; }
.facts dt { color: var(--muted-fg); }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.src { font-size: 12.5px; color: var(--muted-fg); margin: 10px 0 0; }
.src a { color: var(--muted-fg); }

/* ---------- Portada: tarjetas de guía ---------- */
.index-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .index-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .index-list { grid-template-columns: minmax(0, 1fr); } }
.index-list a {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; color: var(--fg); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.index-list a:hover { border-color: var(--ring); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .index-list a:hover { transform: none; } }
.index-list .icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 10px;
  background: var(--muted); color: var(--fg); border: 1px solid var(--border);
}
.index-list .icon svg { width: 20px; height: 20px; }
.index-list .when { font-size: 12.5px; font-weight: 550; color: var(--sepia); }
.index-list h3 { margin: 0; }
.index-list p { color: var(--muted-fg); font-size: 14px; margin: 2px 0 0; flex: 1; }
.index-list .go { font-size: 13.5px; font-weight: 550; margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; }
.index-list .go svg { width: 15px; height: 15px; transition: transform .15s; }
.index-list a:hover .go svg { transform: translateX(3px); }

/* ---------- Papeletas ---------- */
.ballots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 620px) { .ballots { grid-template-columns: minmax(0, 1fr); } }
.ballot { border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.ballot.senado { background: var(--sepia-soft); border-color: var(--sepia-line); }
.ballot header { padding: 12px 18px; border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.ballot header .muted, .ballot.senado header span + span { font-size: 12.5px; font-weight: 500; }
.ballot.senado header { border-bottom-color: var(--sepia-line); color: var(--sepia); }
.ballot .body { padding: 18px; }
.ballot .n { font-size: 56px; font-weight: 700; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.ballot .what { font-weight: 550; margin: 4px 0 12px; }
.ballot ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--muted-fg); display: grid; gap: 4px; }
.ballot ul li::before { content: "✓"; color: var(--sepia); margin-right: 8px; font-weight: 700; }

/* ---------- Pasos ---------- */
ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 12px; }
ol.steps > li {
  counter-increment: s; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
}
ol.steps > li::before {
  content: counter(s); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 650; font-size: 15px; background: var(--primary); color: var(--primary-fg);
}
ol.steps h3 { margin-top: 6px; }
ol.steps p { color: var(--muted-fg); max-width: 66ch; margin-bottom: 8px; }
ol.steps p:last-child { margin-bottom: 0; }
ol.steps p strong { color: var(--fg); font-weight: 600; }

/* ---------- Avisos ---------- */
.note {
  display: block; border: 1px solid var(--sepia-line); background: var(--sepia-soft);
  border-radius: var(--radius-sm); padding: 14px 16px 14px 44px; margin: 16px 0; max-width: 76ch; position: relative;
}
.note::before {
  content: "!"; position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--sepia); color: var(--bg);
}
.note p:last-child { margin-bottom: 0; }
.note strong { font-weight: 600; }
.note.plain { border-color: var(--border); background: var(--card); box-shadow: var(--shadow); padding: 20px 22px; margin: 0; max-width: none; }
.note.plain::before { content: none; }
.note.plain p { color: var(--muted-fg); }
.note.plain p strong { color: var(--fg); }

/* ---------- Tablas ---------- */
.table-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
caption { text-align: left; font-size: 13.5px; font-weight: 550; padding: 14px 16px 4px; }
thead th { text-align: left; font-size: 13px; font-weight: 550; color: var(--muted-fg); border-bottom: 1px solid var(--border); padding: 12px 16px; vertical-align: bottom; background: color-mix(in srgb, var(--muted) 55%, var(--card)); }
tbody td, tbody th { border-bottom: 1px solid var(--border); padding: 12px 16px; vertical-align: top; text-align: left; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 550; }
tbody tr:hover td, tbody tr:hover th { background: color-mix(in srgb, var(--muted) 45%, transparent); }
td.r, th.r { text-align: right; white-space: nowrap; }
tr.total td { font-weight: 650; border-top: 1px solid var(--border); }
tr.key td, tr.key th { background: var(--sepia-soft); }
.party { display: inline-flex; align-items: center; gap: 10px; font-weight: 550; }
.party i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* ---------- Calendario ---------- */
.timeline { list-style: none; margin: 0; padding: 8px 22px 16px; position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.timeline::before { content: ""; position: absolute; left: 133px; top: 70px; bottom: 28px; width: 1px; background: var(--border); }
.timeline li { display: grid; grid-template-columns: 96px 30px minmax(0, 1fr); align-items: start; padding-block: 11px; }
.timeline .d { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; font-size: 14px; line-height: 1.3; }
.timeline .d span { display: block; font-weight: 400; color: var(--muted-fg); font-size: 12.5px; }
.timeline .dot { width: 13px; height: 13px; border-radius: 50%; background: var(--card); border: 2px solid var(--ring); margin: 3px 0 0 9px; position: relative; z-index: 1; }
.timeline li.past { opacity: 0.6; }
.timeline li.past .dot { background: var(--ring); }
.timeline li.today .dot { background: var(--sepia); border-color: var(--sepia); box-shadow: 0 0 0 4px var(--sepia-soft); }
.timeline .now-badge { margin-left: 8px; font-size: 11.5px; font-weight: 600; color: var(--sepia); background: var(--sepia-soft); border: 1px solid var(--sepia-line); padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.timeline li.big .dot { width: 17px; height: 17px; margin-left: 7px; background: var(--primary); border-color: var(--primary); }
.timeline .t h3 { font-size: 15.5px; margin: 0 0 2px; }
.timeline .t p { margin: 0; color: var(--muted-fg); font-size: 14px; max-width: 62ch; }
.timeline .tag { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; margin-left: 6px; border-radius: 999px; vertical-align: 2px; border: 1px solid var(--border); background: var(--muted); }
.timeline .tag.postal { color: var(--info); }
.timeline .tag.ext { color: var(--sepia); background: var(--sepia-soft); border-color: var(--sepia-line); }
.timeline .month { display: block; position: relative; z-index: 1; font-weight: 650; font-size: 18px; letter-spacing: -0.02em; padding: 22px 0 6px; background: var(--card); }
.timeline .month:first-child { padding-top: 14px; }
@media (max-width: 520px) {
  .timeline { padding-inline: 14px; }
  .timeline::before { left: 105px; }
  .timeline li { grid-template-columns: 70px 30px minmax(0, 1fr); }
  .timeline .d { font-size: 13px; }
}

/* ---------- Figuras ---------- */
figure { margin: 0; }
figure svg { display: block; width: 100%; height: auto; }
figcaption { font-size: 13px; color: var(--muted-fg); margin-top: 10px; }
.figure-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }

/* ---------- Preguntas frecuentes (acordeón) ---------- */
.faq { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 20px; max-width: 820px; }
details { border-bottom: 1px solid var(--border); padding-block: 16px; }
details:last-child { border-bottom: 0; }
summary { cursor: pointer; font-weight: 550; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--muted-fg); border-bottom: 1.5px solid var(--muted-fg);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform .2s; flex: none;
}
details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
summary:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--ring); }
details > div { padding-top: 10px; color: var(--muted-fg); }
details > div p:last-child { margin-bottom: 0; }

/* ---------- Recuento ---------- */
.status-bar {
  display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center;
  padding: 16px 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: 14px;
}
.status-bar .state { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border-radius: 999px; background: var(--muted); }
.status-bar .state i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-fg); }
.status-bar .state.live i { background: var(--live); animation: pulse 1.6s ease-in-out infinite; }
.status-bar .state.final i { background: var(--good); }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .status-bar .state.live i { animation: none; } }
.status-bar > span:not(.state) { color: var(--muted-fg); }
.status-bar b { color: var(--fg); font-variant-numeric: tabular-nums; font-weight: 600; }
.meter { height: 6px; background: var(--muted); border-radius: 999px; margin: 12px 0 8px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--primary); width: 0; border-radius: 999px; transition: width .6s ease; }
@media (prefers-reduced-motion: reduce) { .meter span { transition: none; } }
.seatbar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; position: relative; margin: 14px 0 6px; background: var(--muted); }
.seatbar span { height: 100%; }
.seatbar span + span { box-shadow: inset 1px 0 0 var(--card); }
.seatbar .maj { position: absolute; left: 50.29%; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--fg); opacity: .8; }
.seatbar-legend { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted-fg); }

/* ---------- Pie ---------- */
footer.site { margin-top: 64px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--muted) 40%, var(--bg)); padding-block: 36px 28px; font-size: 14px; color: var(--muted-fg); }
footer.site .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
@media (max-width: 720px) { footer.site .cols { grid-template-columns: minmax(0, 1fr); } }
footer.site h4 { font-size: 13.5px; font-weight: 600; color: var(--fg); margin: 0 0 10px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer.site a { color: var(--muted-fg); text-decoration: none; font-weight: 400; }
footer.site a:hover { color: var(--fg); }
footer.site .legal { border-top: 1px solid var(--border); margin-top: 28px; padding-top: 18px; font-size: 13px; }
.sel { user-select: all; font-family: var(--mono); font-size: 13.5px; }

/* ---------- count.vote ---------- */
.cv-header .wrap { padding-block: 14px; }
.cv-header .mainnav { display: none; }
.brand .mark.tally { background: var(--primary); }
.brand .mark.tally::after { content: none; }
.brand .mark.tally svg { width: 18px; height: 18px; }
.cv-hero { padding-block: 72px 24px; display: grid; gap: 20px; justify-items: start; max-width: 760px; }
.cv-hero h1 { font-size: clamp(40px, 6.4vw, 64px); max-width: 14ch; }
.mission { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.55; color: var(--muted-fg); max-width: 56ch; margin: 0; }
.mission strong { color: var(--fg); font-weight: 600; }
.elections { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.election {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 8px 20px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
}
.election .when { font-variant-numeric: tabular-nums; }
.election .when b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.election .when span { font-size: 13px; color: var(--muted-fg); }
.election h3 { margin: 0 0 2px; }
.election p { margin: 0; color: var(--muted-fg); font-size: 14.5px; }
.election.featured { border-color: var(--sepia-line); background: var(--sepia-soft); }
.election.muted-row { box-shadow: none; background: transparent; border-style: dashed; }
.status { font-size: 12.5px; font-weight: 550; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); white-space: nowrap; }
.status.live { color: var(--sepia); border-color: var(--sepia-line); }
@media (max-width: 640px) {
  .election { grid-template-columns: minmax(0, 1fr); }
  .election .btn, .election .status { justify-self: start; }
}
.cv-footer { padding-block: 24px; }
.cv-footer .legal { margin-top: 0; border-top: 0; padding-top: 0; }
.legal-doc h2 { font-size: 19px; margin-top: 28px; }
.legal-doc h2:first-child { margin-top: 0; }
.cv-footer .legal a { color: var(--muted-fg); }
