:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #f1f1ee;
  --text: #15171a;
  --text-2: #4b5059;
  --muted: #6f747d;
  --line: #e4e4df;
  --line-strong: #d3d3cc;
  --accent: #0f766e;
  --accent-soft: #e6f4f1;
  --focus: #2563eb;
  --pending: #6b7280;
  --pending-bg: #eef0f2;
  --kept: #15803d;
  --kept-bg: #e7f6ec;
  --partly: #a16207;
  --partly-bg: #fdf4dc;
  --progress: #1d4ed8;
  --progress-bg: #e8effd;
  --broken: #b91c1c;
  --broken-bg: #fdeaea;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-lg: 0 10px 30px -12px rgba(16, 24, 40, .18);
  --d-kept: #15803d; --d-partly: #d4920f; --d-progress: #1d4ed8; --d-broken: #b91c1c; --d-none: #d6d6cf;
  --h1: #e9e3fb; --h2: #cbbcf3; --h3: #a58de8; --h4: #7859d4; --h5: #4f32a8; --h-ink-dark: #1d1340;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1113;
    --surface: #171a1d;
    --surface-2: #1f2327;
    --text: #eceef0;
    --text-2: #b9bec5;
    --muted: #8b919a;
    --line: #2a2f34;
    --line-strong: #383e45;
    --accent: #2dd4bf;
    --accent-soft: #10302c;
    --focus: #60a5fa;
    --pending: #a3a9b2;
    --pending-bg: #262a2f;
    --kept: #4ade80;
    --kept-bg: #12301c;
    --partly: #facc15;
    --partly-bg: #332a0c;
    --progress: #93b4fd;
    --progress-bg: #172340;
    --broken: #f87171;
    --broken-bg: #3a1616;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --d-kept: #15803d; --d-partly: #c08a12; --d-progress: #5b86f0; --d-broken: #e5484d; --d-none: #3a4047;
    --h1: #2a2347; --h2: #3e3175; --h3: #5a46a8; --h4: #8a70e6; --h5: #bcaaf7; --h-ink-dark: #160f33;
    --shadow-lg: 0 12px 30px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.wrap { max-width: 1360px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
main { min-height: 70vh; padding-bottom: 64px; outline: none; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark svg { width: 32px; height: 32px; display: block; }
.brand-mark rect { fill: var(--text); }
.brand-mark path { fill: none; stroke: #34d399; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.brand-text span { font-size: 12px; color: var(--muted); }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--text-2);
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--text); color: var(--bg); }

/* Hero */
.hero { padding: 48px 0 28px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: end; }
.eyebrow { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin: 0 0 12px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 800; margin: 0 0 16px; letter-spacing: -0.035em; }
.hero p.lead { font-size: 18px; color: var(--text-2); margin: 0; max-width: 620px; }
.vote-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.vote-card h2 { font-size: 15px; margin: 0 0 12px; }
.vote-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.vote-card dt { color: var(--muted); }
.vote-card dd { margin: 0; font-weight: 600; }
.vote-card a.btn { margin-top: 14px; }
.countdown { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }

.stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 28px; }
.stat {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--text-2);
}
.stat b { font-size: 16px; color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600;
  background: var(--text); color: var(--bg); border: 0; border-radius: 999px; padding: 9px 16px;
}
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.btn:hover { opacity: .9; }

/* Filters */
.toolbar {
  position: sticky; top: 64px; z-index: 4;
  background: var(--bg); padding: 12px 0; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.toolbar-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 14px;
}
.search svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search input { border: 0; outline: none; background: transparent; color: var(--text); font: inherit; padding: 10px 0; width: 100%; }
.select {
  appearance: none; font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f747d' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 34px 9px 14px; cursor: pointer;
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { text-decoration: none;
  flex: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 12px;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .count { font-weight: 500; opacity: .7; }
.result-line { font-size: 14px; color: var(--muted); margin: 16px 0 4px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; font-weight: 600; }

/* Topic sections and cards */
.topic-section { margin-top: 32px; }
.topic-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.topic-head h2 { font-size: 22px; margin: 0; }
.topic-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.topic-head a { font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; white-space: nowrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }

.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px 20px; text-decoration: none; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card h3 { font-size: 16.5px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 4px; }
.party-tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.party-tag .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 9px; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
}
.badge svg { width: 12px; height: 12px; }
.badge.status-pending { background: var(--pending-bg); color: var(--pending); }
.badge.status-kept { background: var(--kept-bg); color: var(--kept); }
.badge.status-partly-kept { background: var(--partly-bg); color: var(--partly); }
.badge.status-in-progress { background: var(--progress-bg); color: var(--progress); }
.badge.status-broken, .badge.status-stalled { background: var(--broken-bg); color: var(--broken); }
.badge.status-not-in-government { background: var(--pending-bg); color: var(--muted); }
.badge.flag { background: var(--accent-soft); color: var(--accent); }

.empty {
  text-align: center; padding: 48px 20px; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--radius); margin-top: 24px;
}

/* Compare */
.page-head { padding: 36px 0 8px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); margin: 0 0 8px; font-weight: 800; }
.page-head p { margin: 0; color: var(--text-2); max-width: 720px; font-size: 17px; }
.topic-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 18px 0 6px; scrollbar-width: none; }
.topic-tabs::-webkit-scrollbar { display: none; }
.compare-scroll { overflow-x: auto; margin: 16px -20px 0; padding: 0 20px 12px; }
.compare { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; min-width: min-content; }
.compare-col { display: flex; flex-direction: column; gap: 10px; }
.compare-col-head {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--c);
  border-radius: var(--radius-sm); text-decoration: none; position: sticky; top: 0;
}
.compare-col-head strong { font-size: 15px; }
.compare-col-head span { font-size: 12px; color: var(--muted); margin-left: auto; }
.compare-col .card { padding: 14px 14px 12px 17px; }
.compare-col .card h3 { font-size: 15px; }
.compare-col .card p { -webkit-line-clamp: 4; font-size: 13.5px; }
.compare-none {
  font-size: 13px; color: var(--muted); padding: 14px; border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm); text-align: center;
}

/* Promise detail */
.crumbs { padding-top: 24px; font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--text-2); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-top: 16px; align-items: start; }
.detail-main h1 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin: 10px 0 14px; }
.detail-main .summary { font-size: 18px; color: var(--text-2); margin: 0 0 24px; }
.party-pill {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-size: 13px; font-weight: 700; padding: 5px 12px 5px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--text);
  border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line));
}
.party-pill .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.kept-box {
  background: var(--accent-soft); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 28px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.kept-box h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; margin: 0 0 6px; color: var(--accent); }
.kept-box p { margin: 0; font-weight: 500; }
.section-title { font-size: 20px; margin: 32px 0 6px; }
.section-sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

.evidence { display: flex; flex-direction: column; gap: 14px; }
.quote {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  box-shadow: var(--shadow);
}
.quote-kind { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.quote blockquote {
  margin: 0; font-size: 17px; line-height: 1.55; font-weight: 500;
  padding-left: 16px; border-left: 3px solid var(--c);
}
.quote .who { margin: 12px 0 0; font-size: 14px; color: var(--text-2); }
.quote .who b { color: var(--text); }
.source-row {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px;
}
.source-meta { color: var(--muted); min-width: 0; }
.source-meta b { color: var(--text-2); font-weight: 600; }
.source-meta .title { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.source-links { display: flex; gap: 6px; flex-wrap: wrap; }
.source-links a {
  text-decoration: none; font-weight: 600; font-size: 13px; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text); background: var(--surface);
}
.source-links a:hover { background: var(--surface-2); }

.side { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 14px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 12px; }
.facts { margin: 0; display: grid; gap: 12px; }
.facts div { display: grid; gap: 2px; }
.facts dt { font-size: 12.5px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; font-size: 15px; }
.status-big { display: flex; flex-direction: column; gap: 8px; }
.status-big p { margin: 0; font-size: 14px; color: var(--text-2); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; font-size: 14px; }
.timeline li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); margin-top: 6px; }
.timeline li.done::before { background: var(--accent); }
.timeline small { display: block; color: var(--muted); }

/* Parties */
.party-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 24px; }
.party-card {
  display: flex; flex-direction: column; gap: 12px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); border-top: 5px solid var(--c);
  transition: transform .15s ease, box-shadow .15s ease;
}
.party-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.party-card h2 { margin: 0; font-size: 22px; }
.party-card .leaders { color: var(--text-2); font-size: 14px; margin: 0; }
.party-card .role { font-size: 13px; color: var(--muted); margin: 0; }
.bars { display: grid; gap: 6px; margin-top: 4px; }
.bar { display: grid; grid-template-columns: 130px 1fr 22px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.bar-track { display: block; height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--c); border-radius: 999px; }
.party-hero {
  margin-top: 24px; padding: 28px; border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
}
.party-hero h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
.party-hero p { margin: 4px 0; color: var(--text-2); }
.party-hero .btn { margin-top: 14px; }

/* About */
.prose { max-width: 760px; }
.prose h2 { font-size: 22px; margin: 36px 0 10px; }
.prose p, .prose li { color: var(--text-2); font-size: 16.5px; }
.prose li { margin: 6px 0; }
.legend { display: grid; gap: 10px; margin: 14px 0; }
.legend div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; align-items: center; font-size: 15px; color: var(--text-2); }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 18px 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--text-2); }
.footer p { margin: 0 0 8px; max-width: 760px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  transition: all .2s ease; pointer-events: none; z-index: 20;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .detail { grid-template-columns: 1fr; }
  .side { position: static; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 8px; }
  .brand-text span { display: none; }
  .nav { width: 100%; overflow-x: auto; }
  .nav a { padding: 6px 10px; font-size: 13.5px; white-space: nowrap; }
  .toolbar { top: 0; position: static; }
  .compare-scroll { margin: 16px -16px 0; padding: 0 16px 12px; }
  .bar { grid-template-columns: 110px 1fr 20px; }
  .legend div { grid-template-columns: 1fr; gap: 4px; }
  .hero p.lead { font-size: 16.5px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* Coalition badges */
.badge.coal-included { background: var(--kept-bg); color: var(--kept); }
.badge.coal-modified { background: var(--partly-bg); color: var(--partly); }
.badge.coal-dropped { background: var(--broken-bg); color: var(--broken); }

/* Sign-up */
.signup {
  margin: 32px 0 8px; padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: grid; gap: 12px;
}
.side .signup { margin: 0; padding: 18px; }
.signup h2 { font-size: 19px; margin: 0 0 4px; }
.side .signup h2 { font-size: 16px; }
.signup p { margin: 0; color: var(--text-2); font-size: 15px; }
.signup-row { display: flex; gap: 8px; flex-wrap: wrap; }
.signup input[type=email] {
  flex: 1 1 220px; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 16px;
}
.signup .fine { font-size: 12.5px; color: var(--muted); }

/* Latest updates */
.updates { display: grid; gap: 8px; }
.update {
  display: grid; grid-template-columns: 110px 1fr; gap: 14px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c);
  border-radius: var(--radius-sm); padding: 12px 16px;
}
.update:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.update-date { font-size: 13px; color: var(--muted); font-weight: 600; padding-top: 2px; }
.update-body { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.update-body b { font-size: 15px; }
.update-badges { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.update-note { flex-basis: 100%; font-size: 14px; color: var(--text-2); }

/* Scoreboard */
.scoreboard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 10px; margin-top: 16px; }
.score-row { display: grid; grid-template-columns: 130px 1fr 220px; gap: 14px; align-items: center; text-decoration: none; font-size: 14px; }
.score-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.score-name .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.score-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.score-nums { color: var(--muted); font-size: 13px; }
.score-nums b { color: var(--text); }
.seg { display: inline-block; height: 100%; min-width: 4px; }
.seg-kept { background: var(--d-kept); }
.seg-partly-kept { background: var(--d-partly); }
.seg-in-progress { background: var(--d-progress); }
.seg-stalled { background: repeating-linear-gradient(135deg, var(--d-broken) 0 3px, transparent 3px 6px); }
.seg-broken { background: var(--d-broken); }
.seg-not-in-government { background: color-mix(in srgb, var(--pending) 35%, var(--surface)); }
.seg-pending { background: var(--d-none); }
.score-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); padding-top: 6px; border-top: 1px solid var(--line); }
.score-legend span { display: inline-flex; align-items: center; gap: 6px; }
.score-legend .seg { width: 10px; height: 10px; border-radius: 3px; }

/* Status history on a promise */
.history { display: grid; gap: 16px; margin-bottom: 8px; }
.history-item { border-left: 3px solid var(--line-strong); padding-left: 16px; }
.history-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.history-note { margin: 0 0 12px; color: var(--text-2); }
.response { margin-top: 12px; background: var(--surface-2); border-radius: var(--radius); padding: 14px 18px; }
.response blockquote { margin: 0; padding-left: 14px; border-left: 3px solid var(--c); white-space: pre-wrap; }

/* Key dates */
.dates { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; }
.date-item { display: grid; grid-template-columns: 130px 1fr; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; }
.date-item[style] { border-left: 4px solid var(--c); }
.date-item.past { opacity: .62; }
.date-when { font-weight: 700; font-size: 14px; }
.date-when small { display: block; font-weight: 500; color: var(--muted); }
.date-what { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 15px; }
.date-what a { color: var(--text); font-weight: 600; text-decoration: none; }
.date-what a:hover { text-decoration: underline; }
.date-what .muted { flex-basis: 100%; font-size: 13.5px; }

@media (max-width: 640px) {
  .score-row { grid-template-columns: 1fr; gap: 6px; }
  .update, .date-item { grid-template-columns: 1fr; gap: 4px; }
}

/* Compare: one row per party, no sideways scrolling */
.topic-tabs { flex-wrap: wrap; overflow: visible; }
.compare-note { margin: 10px 0 0; font-size: 14.5px; }
.compare-rows { display: grid; gap: 12px; margin-top: 20px; }
.compare-row {
  display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 18px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c);
  border-radius: var(--radius); padding: 16px;
}
.compare-row.empty { display: block; text-align: left; margin-top: 0; color: inherit; padding: 10px 16px; background: transparent; border-style: dashed; border-left-style: solid; }
.compare-row-head { display: flex; flex-direction: column; gap: 2px; text-decoration: none; padding-top: 4px; }
.compare-row-head .dot { display: none; }
.compare-row-head strong { font-size: 17px; }
.compare-row-head .muted { font-size: 13px; }
.compare-row.empty .compare-row-head { flex-direction: row; align-items: baseline; gap: 12px; padding: 0; }
.compare-row.empty .compare-row-head strong { font-size: 15px; min-width: 158px; }
.compare-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.compare-cards .card { box-shadow: none; background: var(--bg); }
.compare-cards .card p { -webkit-line-clamp: 4; }

/* Let long badges wrap instead of being cut off */
.badge { white-space: normal; max-width: 100%; line-height: 1.35; }

@media (max-width: 700px) {
  .topic-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .compare-row { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .compare-row-head { flex-direction: row; align-items: baseline; gap: 10px; padding: 0; }
  .compare-row.empty .compare-row-head strong { min-width: 0; }
  .compare-cards { grid-template-columns: 1fr; }
}

.nav { scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }

/* ---------- Stats ---------- */
.stats-note { margin-top: 18px; font-size: 15px; color: var(--text-2); }
.stats-note a { color: var(--accent); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 18px 0 8px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 2px; }
.tile-n { font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.tile-l { font-size: 13.5px; color: var(--muted); }
.stat-section { margin-top: 40px; }
.stat-section h2 { font-size: 22px; margin: 0 0 4px; }
.stat-section > .section-sub { margin-bottom: 14px; }

/* heatmap */
.heat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; display: grid; gap: 2px; }
.heat-row { display: grid; grid-template-columns: minmax(150px, 1.6fr) repeat(7, minmax(34px, 1fr)) minmax(40px, .6fr); gap: 2px; align-items: center; }
.heat-head { padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.heat-foot { padding-top: 6px; border-top: 1px solid var(--line); margin-top: 4px; }
.heat-topic { font-size: 14px; font-weight: 600; color: var(--text); text-decoration: none; padding: 0 8px 0 2px; }
a.heat-topic:hover { text-decoration: underline; }
.heat-party { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; text-decoration: none; text-align: center; line-height: 1.15; }
.heat-party .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.heat-party .abbr { display: none; }
.heat-total { text-align: center; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.heat-cell {
  display: grid; place-items: center; height: 36px; border-radius: 6px; text-decoration: none;
  font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text);
}
.heat-cell.l0 { color: var(--line-strong); font-weight: 400; }
.heat-cell.l1, .heat-swatch.l1 { background: var(--h1); }
.heat-cell.l2, .heat-swatch.l2 { background: var(--h2); }
.heat-cell.l3, .heat-swatch.l3 { background: var(--h3); }
.heat-cell.l4, .heat-swatch.l4 { background: var(--h4); color: #fff; }
.heat-cell.l5, .heat-swatch.l5 { background: var(--h5); color: #fff; }
@media (prefers-color-scheme: dark) {
  .heat-cell.l1, .heat-cell.l2, .heat-cell.l3 { color: #eceef0; }
  .heat-cell.l4, .heat-cell.l5 { color: var(--h-ink-dark); }
}
a.heat-cell:hover { outline: 2px solid var(--text); outline-offset: 1px; }
.heat-legend { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.heat-swatch { width: 18px; height: 12px; border-radius: 3px; display: inline-block; }

/* topic bars */
.hbars { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 6px; }
.hbar { display: grid; grid-template-columns: 200px 1fr 34px; gap: 12px; align-items: center; text-decoration: none; font-size: 14px; }
.hbar-label { color: var(--text-2); }
.hbar-track { height: 14px; }
.hbar-fill { display: block; height: 100%; background: var(--h4); border-radius: 0 4px 4px 0; min-width: 4px; }
.hbar-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.hbar:hover .hbar-label { color: var(--text); text-decoration: underline; }

/* announcements by month */
.spark-grid { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 4px; }
.spark-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: end; }
.spark-name { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 700; text-decoration: none; padding-bottom: 2px; }
.spark-name .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.spark-bars { display: grid; grid-template-columns: repeat(var(--months), 1fr); gap: 3px; height: 36px; align-items: end; border-bottom: 1px solid var(--line); }
.spark-col { height: 100%; display: flex; align-items: flex-end; }
.spark-bar { display: block; width: 100%; background: var(--h4); border-radius: 3px 3px 0 0; min-height: 3px; }
.spark-col:hover .spark-bar { background: var(--h5); }
.spark-axis .spark-bars { height: auto; border: 0; }
.spark-tick { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: visible; }

/* delivery */
.dbars { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.dbar { display: grid; grid-template-columns: 120px 1fr 240px; gap: 14px; align-items: center; text-decoration: none; font-size: 14px; }
.dbar-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.dbar-name .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.dbar-track { display: flex; gap: 2px; height: 16px; }
.dseg { display: inline-block; height: 100%; min-width: 4px; }
.dseg:first-child { border-radius: 4px 0 0 4px; } .dseg:last-child { border-radius: 0 4px 4px 0; } .dseg:only-child { border-radius: 4px; }
.dseg-kept { background: var(--d-kept); }
.dseg-partly-kept { background: var(--d-partly); }
.dseg-in-progress { background: var(--d-progress); }
.dseg-stalled { background: repeating-linear-gradient(135deg, var(--d-broken) 0 3px, transparent 3px 6px); }
.dseg-broken { background: var(--d-broken); }
.dseg-not-in-government { background: repeating-linear-gradient(45deg, var(--d-none) 0 3px, transparent 3px 6px); }
.dseg-pending { background: var(--d-none); }
.dseg.sw { width: 14px; height: 10px; border-radius: 3px; }
.dbar-val { font-size: 13.5px; }
.table-view { margin-top: 10px; font-size: 14px; }
.table-view summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.table-view table, table.spec { width: 100%; border-collapse: collapse; margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table-view th, .table-view td, table.spec th, table.spec td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.table-view th, table.spec th { font-size: 12.5px; color: var(--muted); font-weight: 600; }
table.spec tr:last-child td { border-bottom: 0; }

/* tooltip */
.tip {
  position: fixed; z-index: 30; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: var(--text); color: var(--bg); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.4;
  max-width: 300px; display: grid; gap: 2px; box-shadow: var(--shadow-lg);
}
.tip.show { opacity: 1; }
.tip span { opacity: .85; }

@media (max-width: 700px) {
  .heat { padding: 8px 6px; }
  .heat-row { grid-template-columns: minmax(96px, 1.4fr) repeat(7, minmax(0, 1fr)) 30px; gap: 2px; }
  .heat-topic { font-size: 12.5px; }
  .heat-party .full { display: none; }
  .heat-party .abbr { display: inline; font-size: 10.5px; }
  .heat-cell { height: 30px; font-size: 12.5px; }
  .hbar { grid-template-columns: 120px 1fr 26px; gap: 8px; font-size: 13px; }
  .spark-row { grid-template-columns: 1fr; gap: 4px; }
  .spark-axis > span:first-child { display: none; }
  .dbar { grid-template-columns: 1fr; gap: 6px; }
  .tile-n { font-size: 28px; }
}
