:root {
  --ink: #142033;
  --muted: #637083;
  --paper: #f4f7fb;
  --card: #ffffff;
  --line: #dce4ee;
  --navy: #0b1220;
  --navy-2: #121d31;
  --primary: #635bff;
  --primary-dark: #473de7;
  --accent: #9df6d4;
  --danger: #b42318;
  --warning: #9a6700;
  --success: #067647;
  --shadow: 0 20px 60px rgba(27, 39, 66, .10);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--primary-dark); }
button { cursor: pointer; }
img, svg { max-width: 100%; }
.hidden { display: none !important; }
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  background: white;
  border-radius: 10px;
}
.skip-link:focus { top: 12px; }
:focus-visible {
  outline: 3px solid #8b85ff;
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 12px clamp(18px, 4vw, 64px);
  background: rgba(255, 255, 255, .90);
  border-bottom: 1px solid rgba(220, 228, 238, .85);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--primary), #9d59e9);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -.04em;
  box-shadow: 0 8px 20px rgba(99, 91, 255, .25);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.main-nav { display: flex; gap: 26px; margin-left: auto; }
.main-nav a { color: #455266; font-size: 14px; font-weight: 650; text-decoration: none; }
.main-nav a:hover { color: var(--primary-dark); }
.site-header > .button { margin-left: 0; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 750;
  font-size: 14px;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled { cursor: wait; opacity: .62; transform: none; }
.button-primary {
  color: white;
  background: var(--primary);
  box-shadow: 0 10px 25px rgba(99, 91, 255, .22);
}
.button-primary:hover { background: var(--primary-dark); }
.button-ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.button-ghost:hover { background: white; }
.button-light { color: var(--navy); background: white; }
.button-small { min-height: 40px; padding: 8px 15px; font-size: 13px; }
.button-danger { color: white; background: var(--danger); }
.text-button {
  padding: 5px;
  color: var(--primary-dark);
  background: none;
  border: 0;
  font-size: 13px;
  font-weight: 750;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--ink);
  background: #eef2f7;
  border: 0;
  border-radius: 50%;
  font-size: 27px;
  line-height: 1;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
  gap: clamp(36px, 6vw, 90px);
  overflow: hidden;
  padding: clamp(64px, 9vw, 120px) clamp(20px, 6vw, 92px) clamp(60px, 8vw, 100px);
  color: white;
  background:
    radial-gradient(circle at 80% 15%, rgba(99, 91, 255, .26), transparent 33%),
    radial-gradient(circle at 12% 80%, rgba(26, 176, 154, .12), transparent 30%),
    var(--navy);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to right, black, transparent 75%);
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.hero .eyebrow { color: var(--accent); }
.hero h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(42px, 6.1vw, 82px);
  line-height: 1.01;
  letter-spacing: -.065em;
  font-weight: 820;
}
.hero h1 span { color: #a9a4ff; }
.hero-lead { max-width: 680px; margin: 26px 0 0; color: #b9c5d8; font-size: clamp(16px, 1.5vw, 20px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero .button-ghost { color: white; border-color: #38445a; }
.hero .button-ghost:hover { background: #18253a; }
.source-line { display: flex; align-items: center; gap: 9px; margin-top: 28px; color: #8f9db3; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(157,246,212,.08); }
.national-card {
  align-self: center;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 26px;
  background: rgba(18, 29, 49, .88);
  box-shadow: 0 35px 80px rgba(0,0,0,.28);
  backdrop-filter: blur(16px);
}
.card-topline { display: flex; justify-content: space-between; align-items: center; color: #91a0b7; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.pill { padding: 5px 9px; color: #c8c4ff; background: rgba(99,91,255,.14); border-radius: 999px; letter-spacing: 0; text-transform: none; }
.national-card h2 { margin: 20px 0; font-size: 20px; letter-spacing: -.025em; }
.hero-results { display: grid; gap: 17px; }
.hero-result-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.hero-result-top strong { font-size: 17px; }
.bar-track { height: 7px; overflow: hidden; background: #2a364b; border-radius: 999px; }
.bar-fill { height: 100%; border-radius: inherit; transform-origin: left; animation: grow .8s ease both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.national-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; padding-top: 22px; border-top: 1px solid #2c384c; }
.national-foot div { display: grid; }
.national-foot strong { font-size: 22px; }
.national-foot span { color: #8f9db3; font-size: 11px; }
.microcopy { color: var(--muted); font-size: 11px; line-height: 1.55; }
.national-card .microcopy { margin: 20px 0 0; color: #7f8da4; }
.skeleton { background: linear-gradient(90deg, #263248 25%, #35425a 50%, #263248 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
.skeleton-row { height: 38px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.disclosure-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 17px clamp(20px, 6vw, 92px);
  color: #344157;
  background: #e9e7ff;
  border-bottom: 1px solid #d8d4ff;
  font-size: 12px;
}
.disclosure-strip strong { color: var(--primary-dark); }
.disclosure-strip a { margin-left: auto; white-space: nowrap; font-weight: 750; }
.section { padding: clamp(60px, 8vw, 100px) clamp(20px, 5vw, 76px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.section-heading h2, .participate-copy h2 { margin: 0; font-size: clamp(29px, 3.4vw, 46px); line-height: 1.1; letter-spacing: -.045em; }
.section-intro { max-width: 850px; margin: 0 0 28px; color: var(--muted); font-size: 14px; }
.dataset-switch { display: inline-flex; padding: 4px; background: #e7ecf3; border-radius: 13px; }
.dataset-switch button { padding: 10px 15px; color: #556276; background: transparent; border: 0; border-radius: 10px; font-size: 12px; font-weight: 750; }
.dataset-switch button.active { color: var(--ink); background: white; box-shadow: 0 3px 12px rgba(30,42,66,.09); }
.dataset-switch button span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 5px; padding: 0 5px; color: white; background: var(--primary); border-radius: 999px; font-size: 10px; }
.toolbar { display: flex; align-items: end; gap: 16px; margin: 28px 0 20px; }
.toolbar label:not(.compare-toggle) { display: grid; gap: 6px; min-width: 210px; color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
select, input[type="text"], input[type="search"], input[type="number"], input[type="password"], input[type="date"], input[type="email"] {
  min-height: 45px;
  padding: 10px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid #cfd9e6;
  border-radius: 11px;
}
select { padding-right: 34px; }
.compare-toggle { display: flex; align-items: center; gap: 8px; min-height: 45px; margin-left: auto; color: #4c5a6f; font-size: 12px; }
.compare-toggle input, .checkbox-field input { width: 18px; height: 18px; accent-color: var(--primary); }
.explorer-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 20px; align-items: stretch; }
.map-panel, .province-panel, .ranking-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(32,45,72,.06);
}
.map-panel { padding: 24px; color: white; background: var(--navy-2); border-color: #202e45; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.panel-heading h3 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.map-panel .panel-heading p { color: #8493aa; }
.map-legend { display: flex; align-items: center; gap: 7px; color: #8493aa; font-size: 9px; text-transform: uppercase; }
.legend-gradient { width: 60px; height: 6px; background: linear-gradient(90deg, #2c3a51, var(--primary)); border-radius: 999px; }
.province-map { position: relative; height: 570px; margin-top: 10px; }
.province-tile {
  position: absolute;
  display: grid;
  place-items: center;
  width: 35px;
  height: 31px;
  padding: 0;
  transform: translate(-50%, -50%);
  color: white;
  background: #34435b;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  transition: transform .15s ease, border-color .15s ease, filter .15s ease;
}
.province-tile:hover { z-index: 3; transform: translate(-50%, -50%) scale(1.2); filter: brightness(1.18); }
.province-tile.selected { z-index: 4; border: 2px solid white; transform: translate(-50%, -50%) scale(1.22); box-shadow: 0 5px 18px rgba(0,0,0,.35); }
.province-tile.suppressed { color: #8591a4; background: #253248; }
.map-note { margin: 0; color: #6f7e95; font-size: 10px; }
.inline-notice { margin-top: 14px; padding: 10px 12px; color: #d6deea; background: #223047; border-radius: 10px; font-size: 11px; }
.province-panel { padding: 26px; background: white; }
.province-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.province-heading h3 { margin: 0; font-size: 28px; line-height: 1.1; letter-spacing: -.045em; }
.province-heading .eyebrow { margin-bottom: 7px; font-size: 9px; }
.reliability { padding: 6px 9px; color: #76500a; background: #fff4d6; border-radius: 8px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.reliability.media_alta, .reliability.media { color: #06644c; background: #dcf9ed; }
.winner-block { padding: 20px 0 12px; }
.winner-label { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.winner-value { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.winner-value strong { font-size: 21px; letter-spacing: -.03em; }
.winner-value span { font-size: 30px; font-weight: 850; letter-spacing: -.05em; }
.sample-row { display: flex; gap: 16px; margin-bottom: 20px; color: var(--muted); font-size: 10px; }
.province-results { display: grid; gap: 13px; max-height: 480px; overflow: auto; padding-right: 4px; }
.result-row { display: grid; gap: 5px; }
.result-meta { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: baseline; font-size: 11px; }
.result-party { display: flex; align-items: center; gap: 7px; font-weight: 700; }
.party-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; }
.result-numbers { text-align: right; font-variant-numeric: tabular-nums; }
.result-numbers strong { font-size: 13px; }
.result-interval { display: block; color: var(--muted); font-size: 9px; font-weight: 400; }
.result-track { position: relative; height: 6px; background: #edf1f6; border-radius: 999px; }
.result-fill { height: 100%; min-width: 2px; border-radius: inherit; }
.national-marker { position: absolute; top: -3px; width: 2px; height: 12px; background: #101828; border-radius: 2px; }
.model-details { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 11px; }
.model-details summary { cursor: pointer; color: var(--primary-dark); font-weight: 750; }
.model-details p { color: var(--muted); font-size: 10px; }
.raw-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 6px 0; border-bottom: 1px solid #edf1f5; }
.raw-row span:last-child { color: var(--primary-dark); font-weight: 750; }
.ranking-panel { margin-top: 20px; padding: 24px; background: white; }
.ranking-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 30px; margin-top: 18px; }
.ranking-item { display: grid; grid-template-columns: 24px minmax(100px, .8fr) 1fr 50px; gap: 10px; align-items: center; padding: 8px; color: var(--ink); background: transparent; border: 0; border-radius: 9px; text-align: left; }
.ranking-item:hover, .ranking-item.selected { background: #f0efff; }
.ranking-position { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.ranking-name { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ranking-bar { height: 5px; background: #edf1f6; border-radius: 999px; }
.ranking-bar span { display: block; height: 100%; border-radius: inherit; }
.ranking-share { text-align: right; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }

.participate-section { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(30px, 6vw, 80px); color: white; background: linear-gradient(120deg, #564cf0, #764ac5); }
.participate-copy p:not(.eyebrow) { max-width: 650px; color: #dddafe; }
.participate-copy .eyebrow { color: var(--accent); }
.participate-copy .button { margin-top: 18px; }
.quality-card { padding: 30px; color: var(--ink); background: white; border-radius: 22px; box-shadow: 0 25px 60px rgba(37,23,96,.22); }
.quality-card h3 { margin-top: 0; font-size: 20px; letter-spacing: -.03em; }
.quality-card > p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.check-list { display: grid; gap: 10px; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 23px; font-size: 13px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 6px; border-left: 2px solid var(--success); border-bottom: 2px solid var(--success); transform: rotate(-45deg); }
.method-section { background: white; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.method-grid article { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.method-number { color: var(--primary); font-size: 12px; font-weight: 850; letter-spacing: .1em; }
.method-grid h3 { margin: 16px 0 10px; font-size: 18px; letter-spacing: -.025em; }
.method-grid p { color: var(--muted); font-size: 12px; }
.metric-note { padding-top: 12px; border-top: 1px solid var(--line); color: var(--primary-dark) !important; font-weight: 750; }
.ai-note { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 20px; padding: 28px; color: white; background: var(--navy-2); border-radius: 18px; }
.ai-note .eyebrow { color: var(--accent); }
.ai-note h3 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.03em; }
.ai-note > p { margin: 0; color: #aab7ca; font-size: 13px; }
.method-links { display: flex; flex-wrap: wrap; gap: 12px 26px; margin-top: 25px; font-size: 12px; font-weight: 700; }
.site-footer { display: flex; align-items: center; gap: 28px; padding: 30px clamp(20px, 5vw, 76px); background: var(--paper); border-top: 1px solid var(--line); }
.site-footer p { margin: 0; color: var(--muted); font-size: 11px; }
.site-footer > a { margin-left: auto; font-size: 11px; }
.footer-brand { flex: 0 0 auto; }

.vote-dialog {
  width: min(720px, calc(100% - 30px));
  max-height: min(880px, calc(100dvh - 30px));
  padding: 0;
  color: var(--ink);
  background: white;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 35px 100px rgba(0,0,0,.35);
}
.vote-dialog::backdrop { background: rgba(5, 10, 20, .72); backdrop-filter: blur(5px); }
.vote-dialog form { padding: 28px; }
.dialog-header { display: flex; align-items: start; justify-content: space-between; }
.dialog-header h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.vote-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 24px 0; padding: 0; list-style: none; counter-reset: steps; }
.vote-progress li { padding-top: 9px; color: #8490a2; border-top: 3px solid #e2e8f0; font-size: 9px; text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.vote-progress li.active { color: var(--primary-dark); border-color: var(--primary); font-weight: 800; }
.vote-step h3, .vote-success h3 { margin: 0 0 7px; font-size: 21px; letter-spacing: -.03em; }
.vote-step > p, .vote-success > p { margin-top: 0; color: var(--muted); font-size: 12px; }
.field-label { display: grid; gap: 7px; margin: 18px 0; color: #39465a; font-size: 12px; font-weight: 700; }
.checkbox-field { display: flex; align-items: start; gap: 10px; margin: 16px 0; color: #455266; font-size: 12px; }
.checkbox-field input { flex: 0 0 auto; margin-top: 2px; }
.control-question { display: grid; gap: 8px; margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.control-question legend { padding: 0 5px; font-size: 12px; font-weight: 700; }
.control-question label { font-size: 12px; }
.control-question input { accent-color: var(--primary); }
.vote-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 390px; overflow: auto; padding: 2px; }
.vote-option { position: relative; display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 10px 12px; color: #3c495c; background: #f8fafc; border: 1px solid var(--line); border-radius: 11px; font-size: 11px; cursor: pointer; }
.vote-option:has(input:checked) { color: var(--primary-dark); background: #f0efff; border-color: var(--primary); }
.vote-option input { accent-color: var(--primary); }
.review-list { display: grid; gap: 0; margin: 22px 0; }
.review-list div { display: grid; grid-template-columns: 140px 1fr; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.review-list dt { color: var(--muted); font-size: 11px; }
.review-list dd { margin: 0; font-size: 12px; font-weight: 750; }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.dialog-actions .button-primary { margin-left: auto; }
.form-error { margin: 15px 0; padding: 12px 14px; color: var(--danger); background: #fff0ee; border: 1px solid #ffd1cc; border-radius: 10px; font-size: 12px; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.vote-success { padding: 25px 0; text-align: center; }
.success-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 18px; color: white; background: var(--success); border-radius: 50%; font-size: 30px; }
.receipt { display: grid; gap: 5px; margin: 20px auto; padding: 16px; background: var(--paper); border-radius: 12px; }
.receipt span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.receipt strong { font-family: ui-monospace, monospace; font-size: 16px; word-break: break-all; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: 360px; padding: 13px 17px; color: white; background: var(--navy-2); border-radius: 11px; box-shadow: var(--shadow); font-size: 12px; }

.legal-page { max-width: 880px; margin: 0 auto; padding: 70px 24px; }
.legal-page h1 { margin: 0; font-size: clamp(38px, 6vw, 62px); line-height: 1.05; letter-spacing: -.055em; }
.legal-lead { color: var(--muted); font-size: 18px; }
.legal-page section { margin: 38px 0; padding-top: 25px; border-top: 1px solid var(--line); }
.legal-page section h2 { font-size: 22px; letter-spacing: -.03em; }
.legal-page section p, .legal-page section li { color: #4c5a6f; font-size: 14px; }
.not-found { min-height: 70vh; }

.admin-body { background: #f2f5f9; }
.admin-shell { max-width: 1500px; margin: 0 auto; padding: 28px; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-heading h1 { margin: 0; font-size: 32px; letter-spacing: -.04em; }
.admin-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.admin-actions { display: flex; gap: 10px; }
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi-card { padding: 19px; background: white; border: 1px solid var(--line); border-radius: 15px; }
.kpi-card span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.kpi-card strong { display: block; margin-top: 7px; font-size: 28px; letter-spacing: -.04em; }
.admin-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 17px; background: white; border: 1px solid var(--line); border-radius: 15px 15px 0 0; }
.admin-filters label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.admin-filters select, .admin-filters input { min-height: 39px; padding: 7px 10px; font-size: 11px; }
.admin-table-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-top: 0; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 950px; }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid #e8edf3; text-align: left; font-size: 11px; white-space: nowrap; }
.admin-table th { color: var(--muted); background: #f8fafc; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; }
.admin-table td code { color: var(--primary-dark); font-size: 10px; }
.status-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.status-valid { color: #067647; background: #dcf9ed; }
.status-review { color: #9a6700; background: #fff2cc; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px; background: white; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 15px 15px; }
.pagination span { color: var(--muted); font-size: 11px; }
.login-page { display: grid; place-items: center; min-height: 100dvh; padding: 20px; background: var(--navy); }
.login-card { width: min(420px, 100%); padding: 32px; background: white; border-radius: 22px; box-shadow: var(--shadow); }
.login-card h1 { margin: 20px 0 5px; font-size: 27px; letter-spacing: -.04em; }
.login-card p { color: var(--muted); font-size: 12px; }
.login-card .button { width: 100%; margin-top: 10px; }
.admin-notice { margin-bottom: 18px; padding: 12px 15px; color: #6941a5; background: #f2ebff; border-radius: 11px; font-size: 11px; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr 380px; gap: 35px; }
  .explorer-grid { grid-template-columns: 1fr; }
  .province-results { max-height: none; }
  .province-panel { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0 30px; }
  .province-heading, .winner-block, .sample-row, .model-details { grid-column: 1; }
  .province-results { grid-column: 2; grid-row: 1 / span 5; }
  .province-heading { align-self: start; }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
  .site-header { gap: 15px; }
  .main-nav { display: none; }
  .site-header > .button { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .national-card { width: 100%; max-width: 560px; }
  .disclosure-strip { align-items: start; flex-wrap: wrap; }
  .disclosure-strip a { margin-left: 0; }
  .section-heading { align-items: start; flex-direction: column; }
  .toolbar { flex-wrap: wrap; }
  .compare-toggle { margin-left: 0; }
  .method-grid { grid-template-columns: 1fr; }
  .ai-note { grid-template-columns: 1fr; gap: 18px; }
  .participate-section { grid-template-columns: 1fr; }
  .site-footer { align-items: start; flex-wrap: wrap; }
  .site-footer > a { margin-left: 0; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .site-header { min-height: 64px; padding: 10px 15px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero { padding: 48px 19px; }
  .hero h1 { font-size: 43px; }
  .hero-actions { display: grid; }
  .hero-actions .button { width: 100%; }
  .national-card { padding: 22px; }
  .section { padding: 55px 16px; }
  .section-heading h2, .participate-copy h2 { font-size: 31px; }
  .dataset-switch { width: 100%; }
  .dataset-switch button { flex: 1; padding: 10px 8px; }
  .toolbar { display: grid; grid-template-columns: 1fr; }
  .toolbar label:not(.compare-toggle) { min-width: 0; }
  .map-panel { padding: 17px 10px; }
  .map-legend { display: none; }
  .province-map { height: 490px; }
  .province-tile { width: 29px; height: 27px; border-radius: 7px; font-size: 8px; }
  .province-panel { display: block; padding: 22px; }
  .province-results { margin-top: 10px; }
  .ranking-panel { padding: 18px 12px; }
  .ranking-list { grid-template-columns: 1fr; }
  .ranking-item { grid-template-columns: 22px minmax(100px, .8fr) 1fr 45px; gap: 7px; }
  .quality-card { padding: 23px; }
  .vote-dialog { width: 100%; max-width: none; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .vote-dialog form { min-height: 100%; padding: 20px 17px; }
  .vote-options { grid-template-columns: 1fr; max-height: none; }
  .vote-progress li { font-size: 8px; }
  .dialog-actions { position: sticky; bottom: -20px; margin: 25px -17px -20px; padding: 15px 17px; background: white; }
  .review-list div { grid-template-columns: 100px 1fr; }
  .legal-page { padding: 50px 20px; }
  .legal-lead { font-size: 16px; }
  .admin-shell { padding: 16px; }
  .admin-heading { align-items: start; flex-direction: column; }
  .kpi-grid { gap: 9px; }
  .kpi-card { padding: 14px; }
  .kpi-card strong { font-size: 23px; }
  .admin-actions { width: 100%; }
  .admin-actions .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
