
:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --card-soft:#f9fbff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --primary:#2563eb;
  --primary-soft:#dbeafe;
  --success:#16a34a;
  --shadow:0 18px 40px rgba(15,23,42,.08);
  --radius:24px;
}
*{box-sizing:border-box}
body{
  margin:0;
  background:linear-gradient(180deg,#f8fbff 0%,#f5f7fb 48%,#eef3f9 100%);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
.page-shell{min-height:100vh}
.topbar{
  padding:40px 0 24px;
  background:
    radial-gradient(circle at top right, rgba(37,99,235,.16), transparent 30%),
    radial-gradient(circle at top left, rgba(14,165,233,.12), transparent 28%);
}
.topbar-inner{
  display:flex; gap:24px; align-items:flex-start; justify-content:space-between;
}
.topbar h1{font-size:clamp(2rem,4vw,3rem); font-weight:800; margin:.35rem 0}
.subtitle{margin:0; color:var(--muted); max-width:780px}
.topbar-actions{display:flex; gap:14px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.sync-pill{
  display:inline-flex; align-items:center; gap:10px;
  padding:12px 16px; background:rgba(255,255,255,.9); border:1px solid var(--border);
  border-radius:999px; box-shadow:var(--shadow); color:var(--muted); font-weight:600;
}
.sync-dot{width:10px;height:10px;border-radius:50%;background:var(--success);box-shadow:0 0 0 6px rgba(22,163,74,.12)}
.eyebrow{display:inline-block;font-size:.85rem;letter-spacing:.08em;text-transform:uppercase;color:var(--primary);font-weight:800}
.hero-grid,.charts-grid,.changes-grid{display:grid;gap:22px}
.hero-grid{grid-template-columns:2fr 1fr;margin-bottom:22px}
.hero-card,.status-card,.toolbar-card,.panel-card{
  background:rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border:1px solid rgba(226,232,240,.9); border-radius:var(--radius); box-shadow:var(--shadow);
}
.hero-card{padding:30px; display:grid; grid-template-columns:1.5fr 1fr; gap:24px}
.hero-copy h2{font-size:clamp(1.6rem,3vw,2.3rem); font-weight:800; margin:14px 0 12px}
.hero-copy p{color:var(--muted); max-width:58ch; margin:0}
.hero-badge{
  display:inline-flex; margin:0 8px 8px 0; background:var(--primary-soft);
  color:var(--primary); border-radius:999px; padding:8px 12px; font-weight:700; font-size:.88rem
}
.hero-stats{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.mini-stat{
  background:linear-gradient(180deg,#fff,#f8fbff);
  border:1px solid var(--border); border-radius:20px; padding:18px;
}
.mini-stat span{display:block; color:var(--muted); font-size:.92rem; margin-bottom:6px}
.mini-stat strong{font-size:1.55rem; font-weight:800}
.status-card{padding:26px}
.status-card-head,.panel-head,.section-head{
  display:flex; justify-content:space-between; gap:16px; align-items:flex-start
}
.status-card h3,.panel-head h3,.section-head h2{margin:0; font-weight:800}
.chip,.results-count{
  background:#eff6ff; color:var(--primary); border:1px solid #bfdbfe;
  border-radius:999px; padding:8px 12px; font-weight:700; font-size:.85rem
}
.clean-list{list-style:none;padding:0;margin:18px 0 0}
.clean-list li{
  display:flex; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px dashed var(--border)
}
.clean-list li span{color:var(--muted)}
.warning-box{
  margin:18px 0 0; padding:14px 16px; border-radius:16px; background:#fff8e7; border:1px solid #fde68a; color:#8a6500
}
.toolbar-card{padding:22px; margin-bottom:22px}
.charts-grid{grid-template-columns:1.15fr .85fr; margin-bottom:22px}
.changes-grid{grid-template-columns:1fr; margin-bottom:22px}
.panel-card{padding:24px}
.panel-head p,.section-head p{margin:6px 0 0;color:var(--muted)}
.chart-box{min-height:300px}
.chart-tall{min-height:380px}
.changes-feed{display:grid; gap:12px; margin-top:18px}
.change-item{
  display:flex; gap:14px; align-items:flex-start; padding:16px 18px; border-radius:18px;
  background:var(--card-soft); border:1px solid var(--border)
}
.change-index{
  flex:0 0 38px; width:38px; height:38px; border-radius:12px;
  display:grid; place-items:center; background:#e0ecff; color:var(--primary); font-weight:800
}
.cards-section{margin-top:8px}
.section-head{margin-bottom:16px}
.party-grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:18px;
}
.party-card{
  background:linear-gradient(180deg,#ffffff 0%, #f8fbff 100%);
  border:1px solid var(--border); border-radius:24px; box-shadow:var(--shadow); overflow:hidden;
}
.party-top{
  padding:20px 22px 14px; display:flex; justify-content:space-between; align-items:flex-start; gap:12px
}
.party-rank{
  width:42px;height:42px;border-radius:14px;display:grid;place-items:center;
  background:#eef4ff; color:var(--primary); font-weight:800
}
.party-dot{width:16px;height:16px;border-radius:50%;margin-top:8px}
.party-body{padding:0 22px 22px}
.party-name{font-weight:800;font-size:1.18rem;margin:0 0 12px}
.party-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:14px}
.party-metrics .metric{
  background:#fff; border:1px solid var(--border); border-radius:18px; padding:12px
}
.party-metrics .metric span{display:block;color:var(--muted);font-size:.82rem;margin-bottom:4px}
.party-metrics .metric strong{font-size:1.08rem}
.progress-track{
  width:100%; height:12px; background:#eaf0f8; border-radius:999px; overflow:hidden; margin-bottom:14px
}
.progress-fill{height:100%; border-radius:999px}
.party-actions{display:flex;gap:10px;justify-content:space-between;align-items:center}
.source-link{font-size:.9rem;color:var(--primary);text-decoration:none;font-weight:700}
.source-link:hover{text-decoration:underline}
.candidate-list{margin:16px 0 0; display:grid; gap:10px}
.candidate-row{
  display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center;
  padding:12px 14px; background:#fff; border:1px solid var(--border); border-radius:16px
}
.candidate-row small{display:block; color:var(--muted); margin-top:3px}
.empty-state{
  text-align:center; padding:40px 20px; color:var(--muted); background:#fff; border-radius:24px; border:1px dashed var(--border)
}
@media (max-width: 1100px){
  .hero-grid,.charts-grid{grid-template-columns:1fr}
  .hero-card{grid-template-columns:1fr}
}
@media (max-width: 768px){
  .topbar-inner{flex-direction:column}
  .party-metrics{grid-template-columns:1fr}
  .hero-stats{grid-template-columns:1fr 1fr}
}
