:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --ink: #0d1526;
  --ink-2: #344055;
  --muted: #667085;
  --line: #e2e6ee;
  --navy: #0c1a33;
  --navy-2: #13264a;
  --stop: #d7141a;
  --stop-soft: #fdecec;
  --blue: #1d5fd8;
  --blue-soft: #e8f0fe;
  --amber: #b45309;
  --amber-soft: #fff7e6;
  --pp: #1d6fd8;
  --vox: #5fa30f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(13, 21, 38, .06), 0 8px 24px rgba(13, 21, 38, .06);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--stop); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }

.i { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-fill { fill: currentColor; stroke: none; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 24px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand-logo { width: 40px; height: 40px; filter: drop-shadow(0 2px 4px rgba(215, 20, 26, .25)); }
.brand-name { font-weight: 900; font-size: 1.2rem; letter-spacing: -.02em; line-height: 1; }
.brand-name span { color: var(--stop); }
.brand-tag { font-size: .72rem; color: var(--muted); font-weight: 600; margin-top: 2px; }
.nav { display: none; gap: 4px; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; border: 1px solid transparent;
  background: none; font-weight: 700; font-size: .875rem; color: var(--ink-2);
}
.nav-btn:hover { background: var(--surface-2); color: var(--ink); }
.nav-btn[aria-selected="true"] { color: var(--stop); background: var(--stop-soft); border-color: #f8d0d1; }
.menu-btn { background: none; border: 0; padding: 8px; border-radius: 10px; color: var(--ink-2); }
.menu-btn .i { width: 24px; height: 24px; }
.mobile-nav { border-top: 1px solid var(--line); background: #fff; padding: 8px 16px 14px; display: grid; gap: 4px; }
.mobile-nav .nav-btn { width: 100%; justify-content: flex-start; padding: 11px 12px; font-size: .95rem; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .menu-btn, .mobile-nav { display: none !important; }
}

main.wrap { flex: 1; padding-top: 28px; padding-bottom: 48px; }
.tab { display: grid; gap: 24px; }

/* Cards & chips */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
@media (min-width: 640px) { .pad { padding: 28px; } }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  background: var(--surface-2); color: var(--ink-2);
}
.chip-stop { background: var(--stop-soft); color: #a50f14; }
.chip-amber { background: var(--amber-soft); color: var(--amber); }
.chip-blue { background: var(--blue-soft); color: #1847a3; }
.eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; line-height: 1.15; }
.h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 900; }
.lead { color: var(--ink-2); margin: 6px 0 0; font-size: .95rem; }
.small { font-size: .8rem; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 800; font-size: .9rem; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-dark .i { color: #ff6b6f; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-stop { background: var(--stop); color: #fff; }
.btn-stop:hover { background: #b70f14; }
.btn-block { width: 100%; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: 28px 22px;
  background: radial-gradient(120% 140% at 100% 0%, #1c3a73 0%, var(--navy) 55%);
  color: #fff; box-shadow: 0 20px 50px rgba(12, 26, 51, .25);
}
@media (min-width: 640px) { .hero { padding: 44px; } }
.hero-mark { position: absolute; right: -30px; bottom: -60px; font-size: 13rem; font-weight: 900; opacity: .07; letter-spacing: -.05em; pointer-events: none; }
.hero-body { position: relative; max-width: 760px; display: grid; gap: 16px; }
.hero .chip { background: rgba(215, 20, 26, .22); color: #ffb3b5; border: 1px solid rgba(255, 120, 124, .3); width: fit-content; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #ff4d52; box-shadow: 0 0 0 0 rgba(255, 77, 82, .7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 77, 82, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 82, 0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } html { scroll-behavior: auto; } }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 900; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #ff6b6f, #ffd166); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: #c9d3e6; font-size: 1rem; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.hero .btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .14); }

/* Banners */
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius); padding: 16px 18px; font-size: .9rem; }
.banner .i { width: 20px; height: 20px; margin-top: 2px; }
.banner-amber { background: var(--amber-soft); border: 1px solid #f5d9a8; color: #7a3d06; }
.banner strong { display: block; margin-bottom: 2px; }

/* Congress projection */
.congress-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.congress-head h2 { font-size: 1.15rem; font-weight: 900; }
.blocs { display: flex; flex-wrap: wrap; gap: 18px; }
.bloc-num { font-size: 1.9rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.bloc-label { font-size: .75rem; font-weight: 700; color: var(--muted); }
.bloc-right .bloc-num { color: var(--blue); }
.bloc-left .bloc-num { color: var(--stop); }
.seat-bar { position: relative; display: flex; height: 26px; border-radius: 999px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .08); }
.seat-bar > span { height: 100%; transition: width .3s ease; }
.majority-line { position: absolute; top: 18px; bottom: 0; width: 2px; background: var(--ink); }
.majority-wrap { position: relative; padding: 24px 0 4px; }
.majority-tag { position: absolute; top: 0; transform: translateX(-50%); font-size: .68rem; font-weight: 800; color: var(--ink); white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.source { margin-top: 14px; font-size: .78rem; color: var(--muted); }
.source button { background: none; border: 0; padding: 0; color: var(--blue); font-weight: 700; font-size: inherit; text-decoration: underline; }

/* Filters */
.filters { display: grid; gap: 12px; padding: 16px; }
@media (min-width: 768px) { .filters { grid-template-columns: 1fr auto; align-items: center; padding: 18px 20px; } }
.search { position: relative; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input, .select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid #cfd6e3; background: #fbfcfe; font-weight: 600; font-size: .95rem;
}
.search .input { padding-left: 42px; }
.input:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(29, 95, 216, .18); }
.select-row { display: flex; align-items: center; gap: 10px; }
.select-row label { white-space: nowrap; }
.select { font-weight: 700; }

/* Spotlight */
.spotlight { border: 2px solid #f6c9ca; padding: 22px; display: grid; gap: 22px; }
@media (min-width: 640px) { .spotlight { padding: 30px; } }
@media (min-width: 1000px) { .spotlight { grid-template-columns: 1fr 340px; align-items: center; } }
.spot-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.spot-name { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 900; margin: 12px 0; }
.spot-headline { margin: 0; padding: 16px 18px; border-radius: 16px; background: var(--stop-soft); border: 1px solid #f6c9ca; color: #8f0d12; font-weight: 800; font-size: 1.08rem; line-height: 1.4; }
.spot-side { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 14px; }
.spot-rival { display: flex; align-items: center; gap: 8px; font-weight: 800; margin-top: 4px; }
.mini-seats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mini-seat { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .8rem; font-weight: 800; }
.spot-actions { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Province grid */
.grid-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; }
.grid-head h2 { font-size: 1.2rem; font-weight: 900; }
.prov-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .prov-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .prov-grid { grid-template-columns: repeat(3, 1fr); } }
.prov-card {
  text-align: left; width: 100%;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  padding: 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.prov-card:hover { border-color: #f09ea1; box-shadow: var(--shadow); transform: translateY(-1px); }
.prov-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.prov-name { display: block; font-size: 1.2rem; font-weight: 900; letter-spacing: -.02em; margin: 6px 0 8px; }
.prov-text { margin-top: 8px; font-size: .86rem; font-weight: 700; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prov-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--surface-2); font-size: .78rem; font-weight: 700; color: var(--muted); }
.prov-foot strong { color: var(--ink); }
.prov-cta { display: inline-flex; align-items: center; gap: 4px; color: var(--stop); }
.empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--muted); font-weight: 600; }
.vote-tag { display: inline-flex; padding: 3px 8px; border-radius: 6px; font-size: .7rem; font-weight: 900; color: #fff; background: var(--navy); letter-spacing: .02em; }

/* Simulator */
.sim-top { display: grid; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .sim-top { grid-template-columns: 1fr 320px; align-items: end; } }
.sim-banner { background: var(--navy); color: #fff; border-radius: 16px; padding: 18px 20px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.sim-banner .eyebrow { color: #ff8a8d; }
.sim-banner h3 { font-size: 1.5rem; font-weight: 900; }
.sim-banner p { margin: 2px 0 0; color: #b9c4d8; font-size: .8rem; }
.sim-banner .btn { background: rgba(255, 255, 255, .08); color: #d5dceb; border: 1px solid rgba(255, 255, 255, .16); padding: 9px 12px; font-size: .78rem; }
.sim-grid { display: grid; gap: 24px; }
@media (min-width: 1000px) { .sim-grid { grid-template-columns: 1fr 1fr; } }
.sliders { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 16px; align-content: start; }
.sliders h4, .panel-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 900; }
.slider-row { display: grid; gap: 6px; }
.slider-head { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; font-weight: 800; }
.slider-head span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.pct { font-family: var(--mono); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
input[type="range"] { width: 100%; accent-color: var(--blue); height: 22px; }
.seats-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
@media (min-width: 560px) { .seats-list { grid-template-columns: repeat(3, 1fr); } }
.seat-pill { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: .8rem; font-weight: 800; }
.seat-pill.zero { background: var(--surface-2); opacity: .6; }
.seat-pill b { font-size: 1rem; }
.bloc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.bloc-box { border-radius: 12px; padding: 10px 12px; font-size: .78rem; font-weight: 800; }
.bloc-box b { display: block; font-size: 1.4rem; line-height: 1.1; }
.bloc-box.right { background: var(--blue-soft); color: #1847a3; }
.bloc-box.left { background: var(--stop-soft); color: #a50f14; }
.dispute { background: var(--amber-soft); border: 1px solid #f5d9a8; border-radius: 16px; padding: 16px 18px; }
.dispute .panel-title { color: var(--amber); font-size: .9rem; }
.dispute p { margin: 6px 0 0; font-size: .88rem; color: #6b3605; }
.table-box { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; }
.table-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.table-scroll { max-height: 260px; overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .8rem; }
th { text-align: left; font-weight: 800; color: var(--muted); background: #fafbfd; position: sticky; top: 0; }
th, td { padding: 7px 12px; border-bottom: 1px solid var(--surface-2); }
td.num, th.num { text-align: right; font-family: var(--mono); }
tr.won { font-weight: 800; background: #f4f8ff; }
tr.lost { color: #98a2b3; }

/* Quiz */
.quiz { max-width: 780px; margin: 0 auto; width: 100%; display: grid; gap: 22px; }
.quiz-intro { text-align: center; display: grid; gap: 8px; justify-items: center; }
.quiz-step { display: grid; gap: 12px; }
.quiz-step h3 { font-size: 1.1rem; font-weight: 800; }
.option {
  text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: #fff;
  transition: border-color .15s ease, background .15s ease;
}
.option:hover { border-color: var(--stop); background: #fff8f8; }
.option b { display: block; font-weight: 900; }
.option span { font-size: .82rem; color: var(--muted); }
.quiz-result { background: var(--navy); color: #fff; border-radius: 18px; padding: 22px; display: grid; gap: 12px; }
.quiz-result .eyebrow { color: #ff8a8d; display: flex; align-items: center; gap: 6px; }
.quiz-result h3 { font-size: 1.6rem; font-weight: 900; }
.quiz-result p { margin: 0; color: #c9d3e6; font-size: .95rem; }
.quiz-result .btn-ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Programs */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.compare { min-width: 640px; font-size: .9rem; }
.compare th { position: static; font-size: .95rem; padding: 14px 16px; background: var(--surface-2); color: var(--ink); }
.compare td { padding: 14px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare td:first-child { font-weight: 900; background: #fafbfd; width: 18%; }
.compare tr:last-child td { border-bottom: 0; }
.th-pp { color: var(--pp) !important; }
.th-vox { color: var(--vox) !important; }

/* Explainer */
.steps { display: grid; gap: 16px; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; gap: 10px; align-content: start; }
.step-n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: 1.1rem; }
.step h3 { font-size: 1rem; font-weight: 900; }
.step p { margin: 0; font-size: .85rem; color: var(--ink-2); }
.method { display: grid; gap: 10px; font-size: .9rem; color: var(--ink-2); }
.method h3 { font-size: 1.1rem; font-weight: 900; color: var(--ink); }
.method ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* Floating share */
.fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--navy); color: #fff; border: 1px solid #23365c; border-radius: 16px;
  padding: 11px 16px; box-shadow: 0 14px 30px rgba(12, 26, 51, .35); font-weight: 900; font-size: .85rem;
}
.fab .i { color: #ff6b6f; width: 20px; height: 20px; }
.fab:hover { background: var(--navy-2); }
.share-sheet { position: fixed; inset: 0; z-index: 60; background: rgba(12, 26, 51, .5); display: grid; place-items: end center; padding: 16px; }
@media (min-width: 640px) { .share-sheet { place-items: center; } }
.share-panel { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 20px; display: grid; gap: 14px; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
.share-panel header { display: flex; justify-content: space-between; align-items: center; }
.share-panel h2 { font-size: 1.1rem; font-weight: 900; }
.icon-btn { background: var(--surface-2); border: 0; border-radius: 10px; padding: 8px; display: grid; place-items: center; }
.share-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.share-grid a, .share-grid button { justify-content: flex-start; }
.copied { color: #0a7a3d; font-weight: 800; font-size: .85rem; }

/* Footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 28px 0 90px; font-size: .82rem; color: var(--muted); }
.footer-row { display: grid; gap: 16px; }
@media (min-width: 900px) { .footer-row { grid-template-columns: 1fr auto; align-items: center; } }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.footer-brand b { color: var(--ink); font-size: .95rem; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-weight: 700; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--stop); }
.no-cookies { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-weight: 800; font-size: .74rem; }
.disclaimer { margin-top: 16px; font-size: .75rem; line-height: 1.55; }

/* Legal pages */
.doc { max-width: 820px; margin: 0 auto; }
.doc .card { padding: 24px; }
@media (min-width: 640px) { .doc .card { padding: 40px; } }
.doc h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 900; margin-bottom: 6px; }
.doc h2 { font-size: 1.15rem; font-weight: 900; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink-2); font-size: .95rem; }
.doc ul { padding-left: 20px; }
.doc table { font-size: .85rem; margin: 10px 0; }
.doc td, .doc th { border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; position: static; }
.back { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-decoration: none; margin-bottom: 16px; }
.form { display: grid; gap: 16px; margin-top: 18px; }
.form label { font-weight: 800; font-size: .9rem; display: grid; gap: 6px; }
.form textarea { min-height: 160px; resize: vertical; }
.check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px; font-weight: 600 !important; font-size: .85rem !important; color: var(--ink-2); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--stop); }
.hp { position: absolute; left: -9999px; }
