/* ── Lettertypen (zelf gehost — geen CDN) ──────────────────────────── */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/archivo-var.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/fonts/plexsans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/plexmono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plexmono-500.woff2') format('woff2');
}

/* ── Design tokens (licht) — kamerblauw functionalisme ─────────────── */
:root {
  --page: #f2f4f7;
  --surface: #ffffff;
  --ink: #101420;
  --ink-2: #4a5468;
  --muted: #8a93a6;
  --grid: #e2e6ee;
  --baseline: #c6cddb;
  --border: rgba(16, 20, 32, 0.13);
  --good: #0ca30c;
  --good-text: #006300;
  --critical: #d03b3b;
  --good-wash: rgba(12, 163, 12, 0.10);
  --critical-wash: rgba(208, 59, 59, 0.10);
  --accent: #2145db;
  --accent-wash: rgba(33, 69, 219, 0.08);
  --shadow: 0 12px 34px rgba(16, 32, 78, 0.08);
  --shadow-soft: 0 2px 10px rgba(16, 32, 78, 0.06);
  --display: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  --body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', Consolas, monospace;
  --r: 4px;
  --r-l: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0c0f16;
    --surface: #141924;
    --ink: #f2f4f9;
    --ink-2: #b9c1d4;
    --muted: #7c869c;
    --grid: #242b3c;
    --baseline: #38415a;
    --border: rgba(214, 226, 255, 0.14);
    --good: #0ca30c;
    --good-text: #2fbe4f;
    --critical: #e05252;
    --good-wash: rgba(12, 163, 12, 0.16);
    --critical-wash: rgba(224, 82, 82, 0.16);
    --accent: #6e8cff;
    --accent-wash: rgba(110, 140, 255, 0.12);
    --shadow: 0 16px 42px rgba(0, 0, 0, 0.30);
    --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.22);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -10%, color-mix(in srgb, var(--accent) 9%, transparent) 0, transparent 34rem),
    var(--page);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
}

.page { max-width: 1180px; margin: 0 auto; padding: 28px 22px 56px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ────────────────────────────────────────────────────────── */
.site-header { padding: 22px 24px; border: 1px solid var(--border); border-radius: 18px; background: color-mix(in srgb, var(--surface) 91%, transparent); box-shadow: var(--shadow-soft); }
.site-header h1 { margin: 0 0 4px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.035em; }
.subtitle { margin: 0; color: var(--ink-2); font-size: 15px; }
.data-stamp { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }

.site-nav { display: flex; gap: 4px; margin-top: 14px; flex-wrap: wrap; }
.site-nav a {
  padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 550;
  color: var(--ink-2); border: 1px solid transparent;
}
.site-nav a:hover { text-decoration: none; border-color: var(--border); color: var(--ink); }
.site-nav a.active { background: var(--surface); border-color: var(--border); color: var(--ink); }

/* ── Cards & sections ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  margin-top: 20px;
  box-shadow: var(--shadow-soft);
}
.card h2 { margin: 0 0 2px; font-size: 18px; }
.card-sub { margin: 0 0 16px; color: var(--ink-2); font-size: 13.5px; }

.loading-card, .error-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin-top: 24px;
  text-align: center;
  color: var(--ink-2);
}
.error-card { color: var(--critical); }

/* ── KPI row ───────────────────────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow-soft);
}
.stat-tile .label { font-size: 12.5px; color: var(--ink-2); }
.stat-tile .value { font-size: 32px; font-weight: 650; margin-top: 2px; }
.stat-tile .value.small { font-size: 19px; line-height: 1.25; padding: 6px 0; }
.stat-tile .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }

.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start;
}
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.two-col .card { margin-top: 20px; }

/* ── Hemicycle ─────────────────────────────────────────────────────── */
.hemicycle-wrap {
  display: grid;
  grid-template-columns: minmax(300px, 1.4fr) minmax(230px, 1fr);
  gap: 24px;
  align-items: center;
}
@media (max-width: 720px) { .hemicycle-wrap { grid-template-columns: 1fr; } }
.hemicycle svg { width: 100%; height: auto; display: block; }
.hemicycle circle { stroke: var(--surface); stroke-width: 1; cursor: pointer; }
.hemicycle circle:hover { stroke: var(--ink); stroke-width: 1.5; }

.party-table { font-size: 13px; }
.party-table table { width: 100%; border-collapse: collapse; }
.party-table td { padding: 3px 6px 3px 0; border-bottom: 1px solid var(--grid); }
.party-table tr:last-child td { border-bottom: none; }
.party-table tr[data-party-id] { cursor: pointer; }
.party-table tr[data-party-id]:hover td { background: var(--page); }
.party-table .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 8px; vertical-align: middle;
}
.party-table .zetels { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ── Vote list ─────────────────────────────────────────────────────── */
.vote-list { display: flex; flex-direction: column; gap: 14px; }
.vote-item { display: grid; grid-template-columns: 1fr; gap: 5px; }
.vote-head { display: flex; gap: 10px; align-items: baseline; }
.vote-title { font-size: 13.5px; flex: 1; min-width: 0; }
.vote-date { font-size: 12px; color: var(--muted); white-space: nowrap; }
.badge {
  font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px;
  white-space: nowrap;
}
.badge.aangenomen { background: var(--good-wash); color: var(--good-text); }
.badge.verworpen { background: var(--critical-wash); color: var(--critical); }
.badge.overig { background: var(--grid); color: var(--ink-2); }

.vote-bar-row { display: flex; align-items: center; gap: 10px; }
.vote-bar {
  position: relative; flex: 1; height: 14px; border-radius: 4px;
  background: var(--grid); overflow: visible; cursor: default;
}
.vote-bar .seg { position: absolute; top: 0; height: 100%; }
.vote-bar .seg.voor { background: var(--good); border-radius: 4px 0 0 4px; }
.vote-bar .seg.tegen { background: var(--critical); }
.vote-bar .seg.tegen.rounded { border-radius: 0 4px 4px 0; }
.vote-bar .majority {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  background: var(--ink); opacity: 0.55;
}
.vote-counts {
  font-size: 12px; color: var(--ink-2); white-space: nowrap;
  font-variant-numeric: tabular-nums; min-width: 130px; text-align: right;
}

/* ── Agreement matrix ──────────────────────────────────────────────── */
.insight-lines { margin: 0 0 14px; font-size: 13.5px; color: var(--ink-2); }
.insight-lines .pair { color: var(--ink); font-weight: 600; }
.matrix-scroll { overflow-x: auto; }
#matrix table { border-collapse: separate; border-spacing: 2px; }
#matrix th {
  font-size: 11px; font-weight: 600; color: var(--ink-2); padding: 0;
}
#matrix thead th {
  height: 64px; vertical-align: bottom; min-width: 30px;
}
#matrix thead th > span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: inline-block; padding: 2px 0; max-height: 62px;
}
#matrix tbody th { text-align: right; padding-right: 8px; white-space: nowrap; }
#matrix td {
  width: 30px; height: 26px; text-align: center; font-size: 10px;
  border-radius: 3px; font-variant-numeric: tabular-nums; cursor: default;
}
#matrix td.diag { background: var(--grid); }
#matrix td:not(.diag):hover { outline: 2px solid var(--ink); outline-offset: -1px; }

/* ── Tooltip ───────────────────────────────────────────────────────── */
.tooltip {
  position: fixed; z-index: 10; pointer-events: none;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  padding: 8px 11px; font-size: 12.5px; max-width: 320px;
}
.tooltip h4 { margin: 0 0 4px; font-size: 12.5px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 14px; }
.tooltip .tt-muted { color: var(--ink-2); }

.site-footer { margin-top: 28px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ── Kolomdiagram (histogram) ──────────────────────────────────────── */
.col-chart {
  display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 8px;
}
.col-chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.col-chart .col-bar {
  width: 100%; max-width: 64px; background: var(--accent);
  border-radius: 4px 4px 0 0; min-height: 2px;
}
.col-chart .col-value { font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.col-chart .col-label { font-size: 12px; color: var(--muted); margin-top: 6px; }

/* ── Horizontale balken ────────────────────────────────────────────── */
.hbar-chart { display: flex; flex-direction: column; gap: 8px; }
.hbar-row { display: flex; align-items: center; gap: 10px; }
.hbar-label { width: 64px; font-size: 12.5px; color: var(--ink-2); text-align: right; flex-shrink: 0; }
.hbar-label.wide { width: 190px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-sub { color: var(--muted); font-size: 11.5px; }
.hbar-track { flex: 1; height: 16px; display: flex; gap: 2px; border-radius: 4px; overflow: hidden; }
.hbar-track.stacked { background: none; }
.hbar-seg {
  height: 100%; color: #fff; font-size: 10.5px; line-height: 16px; text-align: center;
  border-radius: 3px; min-width: 0; overflow: hidden; font-variant-numeric: tabular-nums;
}
.hbar-seg.solo { border-radius: 0 4px 4px 0; }
.hbar-value { width: 130px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; flex-shrink: 0; }

.chart-legend { display: flex; gap: 16px; margin-bottom: 12px; font-size: 12.5px; color: var(--ink-2); }
.legend-item .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 6px; vertical-align: middle;
}

/* ── Thema-chips & knoppen ─────────────────────────────────────────── */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  font: inherit; font-size: 12.5px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: none; color: var(--ink-2); cursor: pointer;
}
.chip:hover { color: var(--ink); border-color: var(--baseline); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip.active .chip-count { color: rgba(255, 255, 255, 0.85); }
.chip-count { color: var(--muted); font-variant-numeric: tabular-nums; }

.more-btn {
  font: inherit; font-size: 13px; margin-top: 16px; padding: 8px 16px;
  border-radius: 8px; border: 1px solid var(--border); background: none;
  color: var(--ink); cursor: pointer;
}
.more-btn:hover { border-color: var(--baseline); }

/* ── Ledentabel ────────────────────────────────────────────────────── */
.search-box {
  font: inherit; font-size: 13.5px; width: 100%; max-width: 380px;
  padding: 8px 12px; margin-bottom: 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--page); color: var(--ink);
}
.search-box:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.member-table-wrap { overflow-x: auto; max-height: 480px; overflow-y: auto; }
.member-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.member-table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 6px 10px 6px 0; border-bottom: 1px solid var(--baseline);
  position: sticky; top: 0; background: var(--surface);
}
.member-table td { padding: 5px 10px 5px 0; border-bottom: 1px solid var(--grid); }
.member-table .num, .member-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.member-table .dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle;
}
.member-table .empty { color: var(--muted); text-align: center; padding: 18px; }

/* ── Subtabs ───────────────────────────────────────────────────────── */
.subtab-row {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px;
  border-bottom: 1px solid var(--grid); padding-bottom: 0;
}
.subtab {
  font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer;
  background: none; border: none; color: var(--ink-2);
  padding: 8px 14px 10px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.subtab:hover { color: var(--ink); }
.subtab.active { color: var(--ink); border-bottom-color: var(--accent); }
.subtab-panel > .card:first-child, .subtab-panel > .two-col { margin-top: 16px; }

/* ── Pasfoto's ─────────────────────────────────────────────────────── */
.avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  vertical-align: middle; flex-shrink: 0; background: var(--grid);
  border: 1px solid var(--border);
}
.name-cell { display: inline-flex; align-items: center; gap: 9px; }
.hbar-label.with-avatar {
  display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end;
}
.hbar-label.with-avatar .hbar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Dwarsliggers ──────────────────────────────────────────────────── */
.dwars-list { display: flex; flex-direction: column; gap: 12px; }
.dwars-item { display: flex; gap: 12px; align-items: flex-start; }
.dwars-item .avatar { width: 38px; height: 38px; margin-top: 2px; }
.dwars-name { font-size: 13.5px; font-weight: 600; }
.dwars-meta { font-size: 12.5px; color: var(--ink-2); }
.dwars-example { font-size: 12px; color: var(--muted); margin-top: 2px; font-style: italic; }

/* ── Inconsistenties ───────────────────────────────────────────────── */
.intro-note {
  font-size: 13.5px; color: var(--ink-2); margin: 20px 4px 0;
  max-width: 760px;
}
.finding-head { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; }
.finding-count {
  font-size: 20px; font-weight: 650; color: var(--accent);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.finding-examples {
  margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-2);
}
.finding-examples li { margin-bottom: 4px; }

/* ── Kamerprijzen ──────────────────────────────────────────────────── */
.award-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px;
}
.award-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 16px;
  background: var(--page);
}
.award-emoji { font-size: 30px; }
.award-title { font-size: 15px; font-weight: 650; margin-top: 6px; }
.award-winner {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  font-size: 13.5px; font-weight: 600;
}
.award-winner .avatar { width: 30px; height: 30px; }
.award-stat { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.award-note { font-size: 12px; color: var(--muted); margin-top: 8px; font-style: italic; }

/* ── Belangen ──────────────────────────────────────────────────────── */
.sub-h { font-size: 14.5px; margin: 22px 0 10px; }
.quote-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.quote-list li { margin-bottom: 8px; }
.dwars-item.compact .avatar { width: 28px; height: 28px; }
.dwars-item.compact { gap: 9px; align-items: center; }

/* ── Opvallend: blokken & bedgenoten ───────────────────────────────── */
.blok-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.blok-card {
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px;
  background: var(--page);
}
.blok-card.meerderheid { border-color: var(--accent); }
.blok-head { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; }
.blok-parties { display: flex; flex-wrap: wrap; gap: 8px 14px; max-width: 320px; }
.blok-party { font-size: 13px; white-space: nowrap; }
.blok-party .dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  margin-right: 5px; vertical-align: middle;
}
.bedgenoot-item { padding: 10px 0; border-bottom: 1px solid var(--grid); }
.bedgenoot-item:last-child { border-bottom: none; }
.bedgenoot-paar { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; }
.bedgenoot-hart { font-size: 15px; }
.bedgenoot-tekst { font-size: 13px; color: var(--ink-2); margin-top: 4px; }

/* ── Kolomvarianten voor Opvallend ─────────────────────────────────── */
.col-chart.tall { height: 220px; gap: 2px; align-items: flex-end; }
.col-chart .col.slim { min-width: 0; }
.col-chart .col.slim .col-bar { max-width: none; border-radius: 2px 2px 0 0; }
.col-chart .col.slim .col-label { font-size: 10px; height: 14px; margin-top: 4px; }
.col-chart .col-bar.nacht { background: var(--critical); }

/* ── Thema × fractie-matrix ────────────────────────────────────────── */
#themePartyMatrix table { border-collapse: separate; border-spacing: 2px; }
#themePartyMatrix th { font-size: 11px; font-weight: 600; color: var(--ink-2); padding: 0; }
#themePartyMatrix thead th { height: 64px; vertical-align: bottom; min-width: 30px; }
#themePartyMatrix thead th > span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: inline-block; padding: 2px 0; max-height: 62px;
}
#themePartyMatrix tbody th { text-align: right; padding-right: 8px; white-space: nowrap; }
#themePartyMatrix td {
  width: 30px; height: 26px; text-align: center; font-size: 10px;
  border-radius: 3px; font-variant-numeric: tabular-nums; cursor: pointer;
}
#themePartyMatrix td.diag { background: var(--grid); cursor: default; }
#themePartyMatrix td.outlier { outline: 2px solid var(--ink); outline-offset: -2px; }
#themePartyMatrix td:not(.diag):hover { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ── Documentatie ──────────────────────────────────────────────────── */
.docs h3 { font-size: 14.5px; margin: 18px 0 4px; }
.docs p, .docs li { font-size: 13.5px; color: var(--ink-2); }
.docs strong { color: var(--ink); }
.docs code {
  font-size: 12px; background: var(--page); border: 1px solid var(--grid);
  border-radius: 4px; padding: 1px 5px;
}
.docs ul { padding-left: 20px; margin: 8px 0; }
.docs li { margin-bottom: 6px; }
.docs-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.docs-table th {
  text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 5px 12px 5px 0; border-bottom: 1px solid var(--baseline);
}
.docs-table td { padding: 5px 12px 5px 0; border-bottom: 1px solid var(--grid); color: var(--ink-2); vertical-align: top; }

/* Detail drawers: every visible number can be opened and explained. */
.vote-item[role="button"] {
  cursor: pointer; border-radius: 8px; padding: 7px; margin: -7px;
  transition: background 120ms ease, box-shadow 120ms ease;
}
.vote-item[role="button"]:hover { background: var(--page); }
.vote-item[role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.detail-dialog {
  width: min(760px, calc(100vw - 24px)); max-height: min(88vh, 900px);
  padding: 0; border: 1px solid var(--border); border-radius: 16px;
  overflow: hidden; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.detail-dialog::backdrop { background: rgba(10, 18, 28, .55); backdrop-filter: blur(2px); }
.detail-shell { position: relative; box-sizing: border-box; padding: 28px; overflow-y: auto; overscroll-behavior: contain; max-height: min(88vh, 900px); }
.detail-close {
  position: sticky; z-index: 2; float: right; top: 0; width: 34px; height: 34px;
  border: 1px solid var(--border); border-radius: 50%; background: var(--surface);
  color: var(--ink); font: 24px/1 sans-serif; cursor: pointer;
}
.detail-loading { padding: 70px 20px; text-align: center; color: var(--ink-2); }
.detail-eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.detail-dialog h2 { margin: 5px 48px 10px 0; font-size: clamp(20px, 3vw, 28px); line-height: 1.2; }
.detail-dialog h3 { margin: 18px 0 6px; font-size: 14px; }
.detail-dialog p { color: var(--ink-2); line-height: 1.55; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--muted); font-size: 12.5px; }
.detail-explanation { margin: 20px 0; padding: 16px; border-left: 3px solid var(--accent); background: var(--page); border-radius: 0 8px 8px 0; }
.detail-explanation h3 { margin-top: 0; }
.vote-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.vote-detail-grid ul { list-style: none; padding: 0; margin: 0; }
.vote-detail-grid li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--grid); font-size: 12.5px; }
.detail-footnote { font-size: 12px; color: var(--muted) !important; }
.source-link, .motion-detail a { color: var(--accent); font-size: 12.5px; font-weight: 600; text-decoration: none; }
.source-link:hover, .motion-detail a:hover { text-decoration: underline; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.primary-link { display: inline-flex; padding: 9px 14px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.primary-link:hover { filter: brightness(1.06); }
.member-detail-head { display: flex; align-items: center; gap: 14px; }
.member-detail-head img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.member-detail-head h2 { margin-bottom: 2px; }
.member-detail-head p { margin: 0; }
.member-story { font-size: 14.5px; background: var(--page); border-radius: 10px; padding: 14px; }
.detail-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 16px 0; }
.detail-stats div { background: var(--page); border: 1px solid var(--grid); border-radius: 8px; padding: 10px; text-align: center; }
.detail-stats strong { display: block; font-size: 20px; }
.detail-stats span { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; }
.motion-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.motion-toolbar h3 { margin: 0; }
.motion-toolbar input { width: min(280px, 58%); padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--page); color: var(--ink); }
.motion-list { display: grid; gap: 10px; margin-top: 10px; }
.motion-detail { border: 1px solid var(--grid); border-radius: 10px; padding: 12px; background: var(--page); }
.motion-detail.is-clickable { cursor: pointer; }
.motion-detail.is-clickable:hover { border-color: var(--accent); }
.motion-detail:focus-visible { outline: 2px solid var(--accent); }
.motion-detail h3 { margin: 8px 0 4px; font-size: 13.5px; line-height: 1.35; }
.motion-detail p { margin: 0 0 7px; font-size: 12px; }
.motion-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--muted); font-size: 11.5px; }
.motion-open { float: right; color: var(--accent); font-size: 12px; font-weight: 600; }
.hbar-row[data-member-id], .member-table tr[data-member-id], .award-card[data-member-id] { cursor: pointer; }
.hbar-row[data-member-id]:hover, .member-table tr[data-member-id]:hover td { background: var(--page); }

@media (max-width: 620px) {
  .detail-shell { padding: 20px; }
  .vote-detail-grid { grid-template-columns: 1fr; }
  .detail-stats { grid-template-columns: repeat(3, 1fr); }
  .vote-head { align-items: flex-start; flex-wrap: wrap; }
  .vote-title { flex-basis: calc(100% - 100px); }
  .vote-bar-row { align-items: flex-start; flex-direction: column; }
  .vote-bar { width: 100%; flex: none; }
  .vote-counts { min-width: 0; text-align: left; }
}

/* Searchable member dossiers */
.section-kicker { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.member-search-hero {
  display: grid; grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.2fr); gap: 30px; align-items: end;
  margin-top: 18px; padding: 26px 28px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border)); border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), var(--surface) 60%); box-shadow: var(--shadow);
}
.member-search-hero h2 { margin: 5px 0 3px; font-size: 27px; letter-spacing: -.025em; }
.member-search-hero p { margin: 0; max-width: 560px; color: var(--ink-2); font-size: 13.5px; }
.member-search-controls { display: grid; grid-template-columns: 1fr 150px; gap: 10px; }
.member-search-controls label, .motion-filter-grid label { display: grid; gap: 5px; }
.member-search-controls label > span, .motion-filter-grid label > span { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.member-search-controls .search-box { max-width: none; margin: 0; }
.member-search-controls select, .motion-filter-grid input, .motion-filter-grid select {
  width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--page); color: var(--ink); font: inherit; font-size: 12.5px;
}
.member-browser-layout { display: grid; grid-template-columns: 286px minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.member-directory { position: sticky; top: 14px; margin-top: 0; padding: 14px 10px 10px; max-height: calc(100vh - 28px); overflow: hidden; }
.directory-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 6px 10px; border-bottom: 1px solid var(--grid); }
.directory-head h3 { margin: 0; font-size: 14px; }
.directory-head span { color: var(--muted); font-size: 11px; }
.member-results { max-height: calc(100vh - 105px); overflow-y: auto; overscroll-behavior: contain; padding: 6px 2px; scrollbar-width: thin; }
.member-result {
  width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 9px 8px;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font: inherit;
}
.member-result:hover { background: var(--page); border-color: var(--grid); }
.member-result.active { background: color-mix(in srgb, var(--accent) 11%, var(--page)); border-color: color-mix(in srgb, var(--accent) 36%, var(--border)); }
.member-result .avatar { width: 38px; height: 38px; }
.member-result-main, .member-result-stat { display: grid; min-width: 0; }
.member-result-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.member-result small { color: var(--muted); font-size: 10.5px; }
.member-result-stat { justify-items: end; }
.member-result-stat strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.directory-empty { padding: 20px 8px; color: var(--muted); font-size: 12px; text-align: center; }

.member-profile { min-width: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.profile-empty, .profile-loading { min-height: 420px; display: grid; place-content: center; justify-items: center; padding: 40px; color: var(--muted); text-align: center; }
.profile-empty h2, .profile-loading h2 { margin: 8px 0 2px; color: var(--ink); font-size: 20px; }
.profile-empty p, .profile-loading p { margin: 0; max-width: 360px; font-size: 12.5px; }
.profile-empty-icon { width: 48px; height: 48px; display: grid; place-content: center; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, var(--page)); color: var(--accent); font-size: 24px; }
.profile-loading > span { width: 32px; height: 32px; border: 3px solid var(--grid); border-top-color: var(--accent); border-radius: 50%; animation: profile-spin .8s linear infinite; }
@keyframes profile-spin { to { transform: rotate(360deg); } }
.profile-back { margin: 14px 18px 0; padding: 6px 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.profile-hero { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 22px 26px 26px; }
.profile-hero::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--profile-accent), transparent 70%); }
.profile-portrait { width: 92px; height: 92px; overflow: hidden; border: 4px solid color-mix(in srgb, var(--profile-accent) 36%, var(--surface)); border-radius: 24px; background: var(--page); }
.profile-portrait img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity h2 { margin: 3px 0 2px; font-size: clamp(25px, 4vw, 36px); line-height: 1.08; letter-spacing: -.035em; }
.profile-identity p { margin: 0; color: var(--ink-2); }
.profile-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--muted); font-size: 11.5px; }
.profile-rank { display: grid; justify-items: end; padding-left: 18px; border-left: 1px solid var(--grid); }
.profile-rank strong { font-size: 34px; color: var(--profile-accent); }
.profile-rank span { max-width: 90px; color: var(--muted); font-size: 10.5px; text-align: right; text-transform: uppercase; letter-spacing: .06em; }
.profile-stat-grid { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--grid); background: var(--page); }
.profile-stat-grid > div { min-width: 0; padding: 14px 12px; border-right: 1px solid var(--grid); }
.profile-stat-grid > div:last-child { border-right: 0; }
.profile-stat-grid span, .profile-stat-grid small { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.profile-stat-grid strong { display: block; margin: 2px 0; font-size: 22px; }
.profile-tabs { display: flex; gap: 4px; padding: 12px 18px 0; border-bottom: 1px solid var(--grid); overflow-x: auto; }
.profile-tabs button { padding: 9px 12px 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-2); font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.profile-tabs button.active { border-bottom-color: var(--profile-accent); color: var(--ink); }
.profile-tabs button span { margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--grid); font-size: 10px; }
.profile-panel { padding: 18px; background: color-mix(in srgb, var(--page) 55%, var(--surface)); }
.profile-two-col { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-bottom: 14px; }
.profile-section { padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-soft); }
.profile-section h3 { margin: 3px 0 9px; font-size: 16px; }
.profile-section p { margin: 0 0 8px; color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.story-section { background: linear-gradient(145deg, color-mix(in srgb, var(--profile-accent) 8%, var(--surface)), var(--surface)); }
.context-note { color: var(--muted) !important; font-size: 11px !important; }
.profile-facts { margin: 6px 0 0; }
.profile-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--grid); font-size: 12px; }
.profile-facts div:last-child { border: 0; }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; font-weight: 650; text-align: right; }
.theme-profile-bars { display: grid; gap: 7px; }
.theme-profile-bars > div { display: grid; grid-template-columns: minmax(95px, 1fr) minmax(90px, 1.4fr) 28px; gap: 8px; align-items: center; font-size: 10.5px; }
.theme-profile-bars > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theme-profile-bars > div > div { height: 7px; overflow: hidden; border-radius: 999px; background: var(--grid); }
.theme-profile-bars i { display: block; height: 100%; border-radius: inherit; background: var(--profile-accent); }
.theme-profile-bars strong { text-align: right; font-variant-numeric: tabular-nums; }
.compact-list { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 11.5px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.section-heading > span { color: var(--muted); font-size: 11.5px; }
.motion-filter-grid { display: grid; grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(110px, 1fr)); gap: 10px; margin: 16px 0; padding: 14px; border-radius: 10px; background: var(--page); }
.motion-filter-grid .filter-search { grid-column: span 2; }
.filter-actions { display: flex; align-items: end; gap: 8px; }
.primary-button, .text-button { min-height: 38px; padding: 8px 12px; border-radius: 8px; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: #fff; }
.text-button { border: 1px solid var(--border); background: transparent; color: var(--ink-2); }
.profile-motion-list { display: grid; gap: 10px; }
.profile-motion { padding: 14px; border: 1px solid var(--grid); border-radius: 10px; background: var(--page); transition: border-color 120ms ease, transform 120ms ease; }
.profile-motion.is-clickable { cursor: pointer; }
.profile-motion.is-clickable:hover { border-color: var(--accent); transform: translateY(-1px); }
.profile-motion h3 { margin: 8px 0 4px; font-size: 13.5px; line-height: 1.4; }
.profile-motion p { margin: 0 0 8px; }
.motion-card-footer { display: flex; flex-wrap: wrap; gap: 7px 14px; align-items: center; color: var(--muted); font-size: 11px; }
.motion-card-footer a { color: var(--accent); font-weight: 650; }
.motion-card-footer .motion-open { margin-left: auto; }
.interest-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.interest-summary div { padding: 16px; border-radius: 11px; background: color-mix(in srgb, var(--profile-accent) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--profile-accent) 25%, var(--border)); }
.interest-summary strong { display: block; font-size: 26px; }
.interest-summary span { color: var(--muted); font-size: 11px; }
.register-section { margin-bottom: 14px; }
.register-list { display: grid; gap: 0; }
.register-list article { padding: 11px 0; border-bottom: 1px solid var(--grid); }
.register-list article:last-child { border-bottom: 0; }
.register-list strong { display: block; font-size: 12.5px; line-height: 1.4; }
.register-list p { margin: 3px 0 !important; }
.register-list span { color: var(--muted); font-size: 11px; }
.register-empty { padding: 18px; border-radius: 9px; background: var(--page); color: var(--muted) !important; text-align: center; }

@media (max-width: 960px) {
  .member-search-hero { grid-template-columns: 1fr; }
  .member-browser-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .profile-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .profile-stat-grid > div:nth-child(3) { border-right: 0; }
  .profile-two-col { grid-template-columns: 1fr; }
  .motion-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .page { padding: 14px 12px 36px; }
  .site-header { padding: 18px; border-radius: 14px; }
  .member-search-hero { padding: 20px; }
  .member-search-controls { grid-template-columns: 1fr; }
  .member-browser-layout { grid-template-columns: 1fr; }
  .member-directory { position: static; max-height: 360px; }
  .member-results { max-height: 290px; }
  .profile-hero { grid-template-columns: 72px 1fr; padding: 18px; }
  .profile-portrait { width: 72px; height: 72px; border-radius: 18px; }
  .profile-rank { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 10px 0 0; border: 0; border-top: 1px solid var(--grid); }
  .profile-rank span { max-width: none; }
  .profile-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-stat-grid > div:nth-child(odd) { border-right: 1px solid var(--grid); }
  .profile-stat-grid > div:nth-child(even) { border-right: 0; }
  .profile-panel { padding: 10px; }
  .motion-filter-grid { grid-template-columns: 1fr; }
  .motion-filter-grid .filter-search { grid-column: auto; }
  .interest-summary { grid-template-columns: 1fr; }
}

/* Global accessibility */
.skip-link { position: fixed; z-index: 1000; left: 12px; top: 10px; transform: translateY(-150%); padding: 9px 13px; border-radius: 8px; background: var(--ink); color: var(--page); font-weight: 700; }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.standalone-state { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 32rem); }
.standalone-state > div { max-width: 560px; padding: 36px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.standalone-state h1 { margin: 6px 0; font-size: 34px; }
.standalone-state p { margin: 0 0 20px; color: var(--ink-2); }
.standalone-state > div > div { display: flex; justify-content: center; align-items: center; gap: 16px; }
.inline-note { margin-top: 10px !important; }

/* Fractie explorer */
.directory-intro { display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: end; margin-top: 20px; padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface)); box-shadow: var(--shadow); }
.directory-intro h2, .search-stage h2 { margin: 4px 0; font-size: 25px; letter-spacing: -.025em; }
.directory-intro p { margin: 0; color: var(--ink-2); font-size: 12.5px; }
.directory-search { display: grid; gap: 5px; }
.directory-search span { color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.directory-search input { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--page); color: var(--ink); font: inherit; }
.party-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 12px; margin-top: 16px; }
.party-card { position: relative; display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 14px; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); color: var(--ink); text-align: left; box-shadow: var(--shadow-soft); cursor: pointer; font: inherit; }
.party-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--party-color); }
.party-card:hover, .party-card.active { border-color: color-mix(in srgb, var(--party-color) 52%, var(--border)); transform: translateY(-1px); }
.party-card-mark { width: 48px; height: 48px; display: grid; place-content: center; border-radius: 13px; background: color-mix(in srgb, var(--party-color) 14%, var(--page)); color: var(--party-color); font-size: 12px; font-weight: 800; }
.party-card-name, .party-card-seats { display: grid; }
.party-card-name strong { overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.party-card small { color: var(--muted); font-size: 10px; }
.party-card-seats { justify-items: end; }
.party-card-seats strong { font-size: 21px; }
.party-card-metrics { grid-column: 2 / -1; display: flex; gap: 12px; color: var(--muted); font-size: 10.5px; }
.party-dossier { margin-top: 20px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.party-hero { display: flex; gap: 18px; align-items: center; padding: 22px 26px 26px; border-bottom: 3px solid var(--party-color); }
.party-monogram { width: 76px; height: 76px; display: grid; place-content: center; border-radius: 20px; background: color-mix(in srgb, var(--party-color) 15%, var(--page)); color: var(--party-color); font-size: 18px; font-weight: 850; }
.party-hero h2 { margin: 3px 0; font-size: 30px; }
.party-hero p { margin: 0; color: var(--ink-2); }
.party-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px; background: color-mix(in srgb, var(--page) 55%, var(--surface)); }
.party-detail-grid .profile-section { margin: 0; }
.party-detail-grid .party-themes, .party-detail-grid .recent-party-votes { grid-column: 1 / -1; }
.party-members { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 7px; }
.party-members a, .search-member-grid a { display: flex; gap: 9px; align-items: center; padding: 8px; border: 1px solid var(--grid); border-radius: 9px; color: var(--ink); background: var(--page); }
.party-members a:hover, .search-member-grid a:hover { border-color: var(--accent); text-decoration: none; }
.party-members a > span, .search-member-grid a > span { display: grid; min-width: 0; }
.party-members strong, .search-member-grid strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.party-members small, .search-member-grid small { color: var(--muted); font-size: 10px; }
.relation-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.relation-columns h4 { margin: 5px 0; color: var(--muted); font-size: 10.5px; text-transform: uppercase; }
.relation-columns a { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 6px 0; border-bottom: 1px solid var(--grid); color: var(--ink); font-size: 11.5px; }
.relation-columns a small { grid-column: 1 / -1; color: var(--muted); font-size: 9.5px; }
.party-vote-side { position: relative; padding-left: 7px; border-left: 3px solid var(--grid); }
.party-vote-side.voor { border-left-color: var(--good); }
.party-vote-side.tegen { border-left-color: var(--critical); }
.party-vote-side::before { content: attr(data-side); position: absolute; right: 0; top: 0; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }

/* Global search */
.search-stage { margin-top: 20px; padding: 28px; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border)); border-radius: 18px; background: radial-gradient(circle at 85% 0, color-mix(in srgb, var(--accent) 16%, transparent), transparent 40%), var(--surface); box-shadow: var(--shadow); }
.global-search { display: grid; grid-template-columns: minmax(0,1fr) auto; margin-top: 18px; }
.global-search input { min-height: 52px; padding: 12px 16px; border: 1px solid var(--baseline); border-right: 0; border-radius: 12px 0 0 12px; background: var(--page); color: var(--ink); font: inherit; font-size: 15px; }
.global-search button { padding: 0 22px; border: 0; border-radius: 0 12px 12px 0; background: var(--accent); color: #fff; font: inherit; font-weight: 750; cursor: pointer; }
.search-filters { display: grid; grid-template-columns: repeat(4,1fr); gap: 9px; margin-top: 12px; }
.search-filters label { display: grid; gap: 4px; }
.search-filters label > span { color: var(--muted); font-size: 9.5px; font-weight: 750; text-transform: uppercase; }
.search-filters select { min-height: 36px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--page); color: var(--ink); font: inherit; font-size: 11.5px; }
.search-summary { margin: 24px 0 6px; }
.search-summary h2 { margin: 3px 0; font-size: 23px; }
.search-summary p { margin: 0; color: var(--muted); font-size: 12px; }
.search-result-section { margin-top: 16px; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); }
.search-result-section .section-heading h2 { margin: 2px 0; }
.search-member-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 8px; margin-top: 12px; }
.search-motion-list { display: grid; gap: 9px; margin-top: 12px; }
.search-motion-list article { padding: 13px; border: 1px solid var(--grid); border-radius: 10px; background: var(--page); }
.search-motion-list h3 { margin: 7px 0 3px; font-size: 13.5px; }
.search-motion-list p { margin: 0 0 7px; color: var(--muted); font-size: 10.5px; }
.search-motion-list article > div:last-child { display: flex; gap: 10px; }
.search-motion-list button { border: 0; background: none; color: var(--accent); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }

/* Homepage editorial highlights */
.dashboard-highlights { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin-top: 18px; }
.highlight-story, .highlight-close { padding: 22px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-soft); }
.highlight-story { background: radial-gradient(circle at 95% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 42%), var(--surface); }
.highlight-story h2, .highlight-close h2 { margin: 4px 0 7px; font-size: 19px; }
.highlight-story p, .highlight-close p { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.55; }
.highlight-links { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 13px; font-size: 11.5px; font-weight: 700; }
.highlight-close { display: grid; grid-template-columns: minmax(150px,.75fr) 1.25fr; gap: 15px; }
.closest-votes { display: grid; gap: 5px; }
.closest-votes button { display: grid; grid-template-columns: minmax(0,1fr) 28px; gap: 8px; align-items: center; padding: 7px 8px; border: 1px solid var(--grid); border-radius: 8px; background: var(--page); color: var(--ink); text-align: left; cursor: pointer; }
.closest-votes button:hover { border-color: var(--accent); }
.closest-votes button span { display: grid; min-width: 0; }
.closest-votes strong { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.closest-votes small { color: var(--muted); font-size: 9.5px; }
.closest-votes b { color: var(--critical); font-size: 16px; text-align: right; }

@media (max-width: 760px) {
  .directory-intro { grid-template-columns: 1fr; }
  .party-detail-grid { grid-template-columns: 1fr; padding: 10px; }
  .party-detail-grid .party-themes, .party-detail-grid .recent-party-votes { grid-column: auto; }
  .party-stats { grid-template-columns: repeat(2,1fr); }
  .search-filters { grid-template-columns: repeat(2,1fr); }
  .dashboard-highlights { grid-template-columns: 1fr; }
  .highlight-close { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .global-search { grid-template-columns: 1fr; }
  .global-search input { border-right: 1px solid var(--baseline); border-radius: 10px 10px 0 0; }
  .global-search button { min-height: 42px; border-radius: 0 0 10px 10px; }
  .search-filters { grid-template-columns: 1fr; }
  .party-hero { align-items: flex-start; padding: 18px; }
  .party-monogram { width: 58px; height: 58px; border-radius: 15px; font-size: 14px; }
}

/* ══ Huisstijl 3.0 — kamerblauw functionalisme ═══════════════════════ */
/* Quotes en verbindingswoorden blijven in een rustige schreef. */
:root { --serif: Georgia, "Iowan Old Style", "Times New Roman", serif; }

/* Koppen in zware grotesk; cijfers en labels in mono. */
h1, h2, .hero-title { font-family: var(--display); letter-spacing: -0.01em; }
.card h2 { font-size: 20px; font-weight: 800; }
h3, h4 { font-family: var(--display); }

/* Masthead: postergewicht, kamerblauwe regel eronder */
.site-header h1 { font-size: 34px; font-weight: 900; text-transform: uppercase; letter-spacing: -0.015em; }
.masthead { border-bottom: 2px solid var(--accent); padding-bottom: 18px; }
.masthead h1 { font-size: clamp(32px, 5.5vw, 52px); margin: 2px 0 6px; line-height: 0.98; }
.masthead h1 em { font-style: normal; color: var(--accent); display: block; }
.masthead-date {
  margin: 0; font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .14em;
}

/* Navigatie met Meer-dropdown */
.nav-more { position: relative; }
.nav-more summary {
  list-style: none; cursor: pointer; padding: 6px 14px; border-radius: 999px;
  font-size: 13.5px; font-weight: 550; color: var(--ink-2);
  border: 1px solid transparent; user-select: none;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more summary::after { content: " ▾"; font-size: 10px; }
.nav-more summary:hover { color: var(--ink); border-color: var(--border); }
.nav-more[open] summary { background: var(--surface); border-color: var(--border); color: var(--ink); }
.nav-more-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18); padding: 6px; min-width: 160px;
  display: flex; flex-direction: column; gap: 2px;
}
.nav-more-menu a { border-radius: 7px; padding: 7px 12px; }

/* Hero-grid: de koppen van de voorpagina */
.hero-grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; margin-top: 22px;
  align-items: stretch;
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-lead { display: flex; flex-direction: column; gap: 12px; margin-top: 0; }
.hero-title { font-size: clamp(20px, 3vw, 27px); line-height: 1.25; margin: 0; font-weight: 650; }
.hero-marge p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }
.hero-bar {
  display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px;
}
.hero-bar .voor { background: var(--good); }
.hero-bar .tegen { background: var(--critical); }
.hero-cta {
  align-self: flex-start; margin-top: auto; font: inherit; font-size: 13.5px; font-weight: 600;
  color: #fff; background: var(--accent); border: none; border-radius: 8px;
  padding: 9px 16px; cursor: pointer;
}
.hero-cta:hover { filter: brightness(1.1); }

.hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 1020px) { .hero-side { grid-template-columns: 1fr; } }
.hero-story {
  display: flex; flex-direction: column; gap: 7px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; font: inherit; color: var(--ink); cursor: pointer;
  text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.hero-story:hover {
  text-decoration: none; transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.hero-story p { margin: 0; font-size: 13px; color: var(--ink-2); }
.hero-story .section-kicker { font-size: 10.5px; }
.hero-story-person { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink); }
.hero-story-person .avatar { width: 34px; height: 34px; }
.hero-paar { font-size: 14px !important; color: var(--ink) !important; font-weight: 600; }
.hero-paar .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.hero-quote { font-family: var(--serif); font-style: italic; font-size: 14px !important; color: var(--ink) !important; line-height: 1.4; }

/* Weekjournaal-strip */
.week-strip .week-head h2 { margin: 2px 0 0; }
.week-stats {
  display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 14px; align-items: center;
}
.week-stat .value { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.1; }
.week-stat .hint { font-size: 12px; color: var(--muted); }
.week-stat.persoon { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.week-stat.persoon .avatar { width: 38px; height: 38px; }

/* Beweging — subtiel, en uit te zetten via systeeminstelling */
@keyframes groeiBreed { from { transform: scaleX(0); } }
@keyframes groeiHoog { from { transform: scaleY(0); } }
.hbar-seg, .vote-bar .seg, .hero-bar .voor, .hero-bar .tegen {
  transform-origin: left center; animation: groeiBreed .5s ease-out;
}
.col-chart .col-bar { transform-origin: bottom center; animation: groeiHoog .5s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .hbar-seg, .vote-bar .seg, .hero-bar .voor, .hero-bar .tegen, .col-chart .col-bar { animation: none; }
  .hero-story, .hero-story:hover { transition: none; transform: none; }
}

/* Entiteit-links: kleur van de context, onderstrepen bij hover */
.entity-link { color: inherit; }
.entity-link:hover { color: var(--accent); }

/* ── Trends (Opvallend) ────────────────────────────────────────────── */
.trend-chart svg { width: 100%; height: auto; display: block; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 4px; font-size: 12.5px; color: var(--ink-2); }
.trend-legend .lijn { display: inline-block; width: 18px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.formatie-feiten { font-size: 13.5px; color: var(--ink-2); margin: 0 0 10px; }
.formatie-feiten strong { color: var(--ink); }

/* ── Head-to-head ──────────────────────────────────────────────────── */
.h2h-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.h2h-controls select {
  font: inherit; font-size: 13.5px; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--page); color: var(--ink);
  max-width: 280px;
}
.h2h-vs { font-family: var(--serif); font-style: italic; color: var(--muted); }
.h2h-score {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid);
}
.h2h-partij { font-size: 15px; font-weight: 650; white-space: nowrap; }
.h2h-partij .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.h2h-pct { text-align: center; }
.h2h-pct strong { font-size: 38px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.h2h-pct small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.h2h-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 14px 0; }
@media (max-width: 640px) { .h2h-columns { grid-template-columns: 1fr; } }
.h2h-columns h4, .h2h-botsing-kop { font-size: 13px; margin: 8px 0 6px; color: var(--ink-2); }
.h2h-thema { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--grid); }
.h2h-thema:last-child { border-bottom: none; }
.h2h-botsingen { display: flex; flex-direction: column; gap: 8px; }
.h2h-botsing {
  font: inherit; text-align: left; background: var(--page); color: var(--ink);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; cursor: pointer;
}
.h2h-botsing:hover { border-color: var(--accent); }
.h2h-stemmen { display: block; font-size: 12px; margin-bottom: 3px; }
.h2h-onderwerp { display: block; font-size: 13px; color: var(--ink-2); }

/* ══ Huisstijl 3.0 — vlakken, mono-cijfers, kamerblauw ═══════════════ */

/* Vlakke panelen met strakke hoeken; schaduw minimaal */
.site-header {
  background: var(--surface); border-radius: var(--r-l);
  box-shadow: var(--shadow-soft);
}
.card, .loading-card, .error-card, .stat-tile, .hero-story, .blok-card,
.award-card, .h2h-botsing, .nav-more-menu, .tooltip {
  border-radius: var(--r-l);
}
.badge, .hero-cta, .more-btn, .search-box, .h2h-controls select, .chip,
.subtab, .member-table .dot, .nav-more-menu a { border-radius: var(--r); }

/* De hoofdkop krijgt als enige de kamerblauwe koprand */
.hero-lead { border-top: 3px solid var(--accent); }

/* Kickers en labels: mono, staatsstuk-stijl */
.section-kicker {
  font-family: var(--mono); font-weight: 500; font-size: 11px;
  letter-spacing: .12em;
}

/* Alle sleutel-cijfers in mono — data leest als data */
.stat-tile .value, .week-stat .value, .h2h-pct strong, .finding-count,
.hbar-value, .vote-counts, .col-chart .col-value, .party-card-seats strong,
.chip-count { font-family: var(--mono); font-weight: 500; }
.stat-tile .value { font-size: 28px; }
.week-stat .value { font-size: 27px; }

/* Navigatie: cobaltblok voor de actieve pagina */
.site-nav { gap: 3px; }
.site-nav a, .nav-more summary {
  font-family: var(--mono); font-size: 12px; text-transform: uppercase;
  letter-spacing: .05em; padding: 7px 12px; border-radius: var(--r);
}
.site-nav a:hover, .nav-more summary:hover { background: var(--accent-wash); border-color: transparent; }
.site-nav a.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.nav-more[open] summary { background: var(--accent-wash); border-color: transparent; }

/* Badges: rechte blokjes, mono */
.badge {
  font-family: var(--mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 7px;
}

/* Subtabs: zwaar, met dikke onderstreep */
.subtab { font-family: var(--display); font-weight: 700; font-size: 13.5px; }
.subtab.active { border-bottom-width: 3px; }

/* Pasfoto's als vierkante portretjes — het is tenslotte een register */
.avatar { border-radius: var(--r); }

/* Tabellen en matrixkoppen in mono */
.member-table th, #matrix th, #themePartyMatrix th, .docs-table th {
  font-family: var(--mono); font-weight: 500; text-transform: uppercase;
  font-size: 10.5px; letter-spacing: .04em;
}
.member-table td, .party-table td { font-variant-numeric: tabular-nums; }

/* Knoppen */
.hero-cta { font-family: var(--display); font-weight: 700; }
.chip { font-family: var(--mono); font-size: 11.5px; }
.chip.active { background: var(--accent); border-color: var(--accent); }

/* Grafiekassen in mono */
.trend-chart text, .col-chart .col-label { font-family: var(--mono); }

/* Zichtbare toetsenbordfocus, overal hetzelfde */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r); }

/* Datastempel in mono */
.data-stamp { font-family: var(--mono); font-size: 11px; }

/* ==========================================================================
   Product system 4.0 — public-data newsroom
   A single finishing layer shared by every route. Older component selectors
   remain supported, while spacing, hierarchy, interaction and responsiveness
   are normalized here.
   ========================================================================== */
:root {
  --page: #eef2f7;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --ink: #0d1830;
  --ink-2: #43516c;
  --muted: #71809c;
  --grid: #e1e7f0;
  --baseline: #c7d1df;
  --border: rgba(13, 24, 48, .12);
  --accent: #1646d8;
  --accent-strong: #0d2f9f;
  --accent-wash: rgba(22, 70, 216, .08);
  --cyan: #00a6a6;
  --good: #087a45;
  --good-text: #075f39;
  --critical: #c62f43;
  --warning: #b86d00;
  --shadow: 0 24px 70px rgba(22, 43, 86, .12);
  --shadow-soft: 0 8px 28px rgba(22, 43, 86, .07);
  --r: 8px;
  --r-l: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #09101d;
    --surface: #111b2d;
    --surface-2: #162238;
    --ink: #f5f7fc;
    --ink-2: #c3cce0;
    --muted: #8e9bb6;
    --grid: #25334c;
    --baseline: #3a4a68;
    --border: rgba(226, 235, 255, .14);
    --accent: #7393ff;
    --accent-strong: #a9bbff;
    --accent-wash: rgba(115, 147, 255, .12);
    --cyan: #3bd1cb;
    --good: #38b978;
    --good-text: #64d69a;
    --critical: #ff6f7f;
    --warning: #f4b34f;
    --shadow: 0 24px 70px rgba(0, 0, 0, .36);
    --shadow-soft: 0 8px 28px rgba(0, 0, 0, .22);
  }
}

html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  min-height: 100vh;
  background:
    linear-gradient(90deg, transparent 0, transparent calc(50% - 590px), color-mix(in srgb, var(--accent) 5%, transparent) calc(50% - 590px), transparent calc(50% - 589px)),
    radial-gradient(circle at 88% 2%, color-mix(in srgb, var(--cyan) 8%, transparent), transparent 26rem),
    radial-gradient(circle at 8% 0, color-mix(in srgb, var(--accent) 10%, transparent), transparent 34rem),
    var(--page);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

::selection { color: #fff; background: var(--accent-strong); }
.page { width: min(100%, 1240px); max-width: none; padding: 20px 28px 64px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { z-index: 1000; }

/* Header and global discovery */
.site-header {
  position: relative;
  padding: 0 0 18px;
  border: 0;
  border-bottom: 1px solid var(--baseline);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.site-header::after {
  content: ""; position: absolute; bottom: -1px; left: 0; width: clamp(72px, 13vw, 160px);
  height: 4px; background: linear-gradient(90deg, var(--accent), var(--cyan));
}
.site-utility {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 42px; margin-bottom: 22px; border-bottom: 1px solid var(--grid);
  font-family: var(--mono); font-size: 10px; letter-spacing: .035em; text-transform: uppercase;
}
.mini-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; }
.mini-brand:hover { text-decoration: none; color: var(--accent); }
.mini-brand span {
  display: grid; place-items: center; width: 29px; height: 29px; color: #fff;
  background: var(--accent-strong); font-weight: 500; letter-spacing: -.04em;
}
.utility-meta { display: flex; align-items: center; gap: 18px; color: var(--muted); }
.utility-meta a { color: var(--ink-2); }
.live-label { color: var(--ink-2); }
.live-label i, .footer-freshness span {
  display: inline-block; width: 7px; height: 7px; margin-right: 6px;
  border-radius: 50%; background: #16a566; box-shadow: 0 0 0 4px rgba(22, 165, 102, .11);
}
.site-header h1 {
  max-width: 900px; margin: 0 0 7px; font-size: clamp(36px, 6vw, 68px);
  line-height: .95; font-weight: 850; letter-spacing: -.045em; text-transform: none;
}
.site-header:not(.masthead) h1::before {
  content: "Dossier"; display: block; margin-bottom: 10px; color: var(--accent);
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
}
.masthead { padding-bottom: 18px; border-bottom: 1px solid var(--baseline); }
.masthead h1 { max-width: 720px; font-size: clamp(42px, 7vw, 78px); line-height: .88; }
.masthead h1 em { color: var(--accent); }
.masthead-date { margin-bottom: 12px; color: var(--accent); font-size: 10px; font-weight: 500; }
.subtitle { max-width: 770px; color: var(--ink-2); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.5; }
.data-stamp { margin-top: 11px; color: var(--muted); }
.nav-row { display: flex; align-items: center; gap: 18px; margin-top: 24px; }
.site-nav { flex: 1; gap: 2px; margin: 0; }
.site-nav a, .nav-more summary {
  min-height: 40px; display: inline-flex; align-items: center; padding: 9px 12px;
  color: var(--ink-2); font-size: 10.5px; letter-spacing: .055em;
}
.site-nav a:hover, .nav-more summary:hover { color: var(--accent); background: var(--accent-wash); }
.site-nav a.active { color: #fff; background: var(--accent-strong); }
.nav-more-menu { top: calc(100% + 7px); min-width: 190px; padding: 8px; background: var(--surface); box-shadow: var(--shadow); }
.nav-more-menu a { width: 100%; min-height: 36px; }
.header-search {
  display: grid; grid-template-columns: auto minmax(155px, 240px) auto auto; align-items: center;
  min-height: 42px; border: 1px solid var(--baseline); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow-soft); overflow: hidden;
}
.header-search > span { padding-left: 12px; color: var(--muted); font-size: 20px; line-height: 1; }
.header-search input {
  min-width: 0; height: 40px; padding: 0 9px; border: 0; outline: 0;
  background: transparent; color: var(--ink); font: 13px var(--body);
}
.header-search kbd {
  padding: 2px 6px; border: 1px solid var(--grid); border-radius: 4px;
  color: var(--muted); background: var(--surface-2); font: 10px var(--mono);
}
.header-search button {
  align-self: stretch; margin-left: 9px; padding: 0 13px; border: 0;
  color: #fff; background: var(--accent-strong); font: 600 10px var(--mono);
  letter-spacing: .05em; text-transform: uppercase; cursor: pointer;
}

/* Interpretation band: useful content is visible while heavier data loads. */
.reading-guide {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end;
  margin: 18px 0 0; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-left: 4px solid var(--accent); background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-soft);
}
.reading-guide strong { display: block; margin: 3px 0 2px; font: 750 17px/1.3 var(--display); }
.reading-guide p { max-width: 850px; margin: 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.reading-guide nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; }
.reading-guide nav a { white-space: nowrap; font: 600 11px var(--mono); }

/* Loading, cards and editorial rhythm */
main { scroll-margin-top: 16px; }
.loading-card {
  position: relative; min-height: 116px; display: grid; place-items: center; overflow: hidden;
  color: var(--ink-2); background: var(--surface); border-color: var(--border);
}
.loading-card::before {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 10%, transparent), transparent);
  animation: loadingSweep 1.5s ease-in-out infinite;
}
@keyframes loadingSweep { to { transform: translateX(100%); } }
.card, .stat-tile, .search-result-section, .party-dossier, .highlight-story, .highlight-close {
  border-color: var(--border); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-soft);
}
.card { padding: clamp(20px, 3vw, 32px); margin-top: 24px; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 22%, var(--border)); }
.card h2 { font-size: clamp(21px, 2.4vw, 29px); line-height: 1.15; letter-spacing: -.025em; }
.card-sub { max-width: 860px; margin-top: 7px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.section-kicker {
  display: inline-block; color: var(--accent); font-size: 10px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
}
.kpi-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 24px; border: 1px solid var(--border); background: var(--border); }
.stat-tile { min-height: 132px; padding: 20px; border: 0; border-radius: 0; box-shadow: none; }
.stat-tile .label { color: var(--muted); font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.stat-tile .value { margin-top: 12px; color: var(--ink); font-size: clamp(25px, 3vw, 38px); line-height: 1; }
.stat-tile .value.small { font: 750 clamp(17px, 2vw, 23px)/1.1 var(--display); }
.stat-tile .hint { margin-top: 8px; color: var(--ink-2); font-size: 12px; line-height: 1.35; }
.hero-grid { grid-template-columns: minmax(0, 1.55fr) minmax(310px, .9fr); gap: 16px; margin-top: 24px; }
.hero-lead { min-height: 360px; padding: clamp(24px, 4vw, 42px); border-top-width: 5px; }
.hero-title { max-width: 760px; font-size: clamp(26px, 4vw, 43px); line-height: 1.08; letter-spacing: -.035em; }
.hero-side { gap: 12px; }
.hero-story { min-height: 168px; padding: 19px; border-radius: var(--r-l); }
.hero-story:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow); }
.week-strip { display: grid; grid-template-columns: minmax(220px, .7fr) 1.3fr; gap: 28px; align-items: center; }
.week-stats { margin: 0; justify-content: flex-end; }
.week-strip #periodeRegel { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid var(--grid); }
.discovery-board {
  display: grid; grid-template-columns: minmax(230px, .72fr) 1.28fr; gap: 18px;
  margin-top: 24px; padding: clamp(22px, 3.5vw, 38px); color: #fff;
  background: linear-gradient(135deg, #0b245f 0%, #123da9 64%, #075c88 100%);
  box-shadow: var(--shadow);
}
.discovery-intro h2 { margin: 5px 0 9px; font-size: clamp(25px, 3vw, 37px); line-height: 1.05; letter-spacing: -.035em; }
.discovery-intro p { margin: 0; color: rgba(255,255,255,.76); font-size: 13px; }
.discovery-board .section-kicker { color: #73e0dc; }
.discovery-routes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid rgba(255,255,255,.18); }
.discovery-routes a {
  display: grid; grid-template-columns: 32px 1fr; gap: 1px 9px; min-height: 116px; padding: 17px;
  color: #fff; border-right: 1px solid rgba(255,255,255,.18); border-bottom: 1px solid rgba(255,255,255,.18);
}
.discovery-routes a:nth-child(even) { border-right: 0; }
.discovery-routes a:nth-last-child(-n + 2) { border-bottom: 0; }
.discovery-routes a:hover { text-decoration: none; background: rgba(255,255,255,.09); }
.discovery-routes span { grid-row: 1 / 3; color: #73e0dc; font: 500 10px var(--mono); }
.discovery-routes strong { font: 700 15px var(--display); }
.discovery-routes small { color: rgba(255,255,255,.68); font-size: 11.5px; line-height: 1.4; }

/* Dense data components */
.vote-list { gap: 0; }
.vote-item { padding: 14px 2px; border-bottom: 1px solid var(--grid); border-radius: 6px; }
.vote-item:last-child { border-bottom: 0; }
.vote-item:hover { padding-inline: 10px; background: var(--surface-2); }
.vote-title { color: var(--ink); font-size: 14px; font-weight: 560; line-height: 1.4; }
.vote-bar { height: 10px; border-radius: 1px; }
.vote-bar .seg.voor, .vote-bar .seg.tegen, .vote-bar .seg.tegen.rounded { border-radius: 1px; }
.matrix-scroll, .member-table-wrap { scrollbar-color: var(--baseline) transparent; }
#matrix td { width: 34px; height: 29px; border-radius: 2px; }
.member-table-wrap { border: 1px solid var(--grid); border-radius: var(--r); }
.member-table th { padding: 11px 12px; background: var(--surface-2); }
.member-table td { padding: 9px 12px; }
.member-table tbody tr:hover td { background: var(--accent-wash); }
.chip-row { gap: 7px; }
.chip, .more-btn { min-height: 38px; }
.subtab-row { gap: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.subtab { min-height: 44px; white-space: nowrap; padding-inline: 18px; }
.search-box { min-height: 44px; padding-inline: 14px; background: var(--surface-2); }

/* Dossiers and search */
.directory-intro { gap: 18px; }
.party-grid { gap: 10px; }
.party-card { min-height: 112px; padding: 15px; border-radius: 12px; background: var(--surface); }
.party-card:hover { transform: translateY(-2px); border-color: var(--party-color); box-shadow: var(--shadow-soft); }
.party-card-mark { border-radius: 7px; }
.party-dossier { border-radius: 18px; }
.party-hero { min-height: 180px; padding: 30px; }
.party-monogram { border-radius: 12px; }
.party-detail-grid { gap: 16px; padding: 18px; }
.member-explorer { gap: 16px; }
.member-directory { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
.member-profile { min-height: 540px; }
.search-stage { padding: clamp(24px, 4vw, 46px); border-radius: 20px; }
.search-stage h2 { max-width: 780px; font-size: clamp(28px, 4vw, 46px); line-height: 1.05; letter-spacing: -.035em; }
.global-search input { min-height: 58px; font-size: 16px; }
.global-search button { min-width: 120px; }
.search-filters select { min-height: 42px; }
.search-result-section { padding: clamp(20px, 3vw, 30px); }

/* Long-form documentation */
.docs { max-width: 1000px; margin-inline: auto; }
.docs .card { padding: clamp(25px, 4vw, 46px); }
.docs .card > p, .docs .card > ul { max-width: 78ch; }
.docs h3 { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--grid); font-size: 18px; }
.docs-table { display: block; max-width: 100%; overflow-x: auto; }
.docs code { padding: 2px 5px; border-radius: 4px; background: var(--surface-2); }

/* Footer and long-page affordance */
.site-footer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px 44px; align-items: start;
  margin-top: 44px; padding: 28px 0 0; border-top: 1px solid var(--baseline); color: var(--ink-2); text-align: left;
}
.footer-brand strong { color: var(--ink); font: 750 16px var(--display); }
.footer-brand p { max-width: 600px; margin: 5px 0 0; font-size: 12px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 18px; font: 500 10.5px var(--mono); }
.footer-freshness { grid-column: 1 / -1; margin: 0; padding-top: 13px; border-top: 1px solid var(--grid); font: 10px var(--mono); }
.back-to-top {
  position: fixed; right: max(18px, calc((100vw - 1240px) / 2)); bottom: 18px; z-index: 40;
  width: 46px; height: 46px; border: 1px solid var(--baseline); border-radius: 50%;
  color: #fff; background: var(--accent-strong); box-shadow: var(--shadow); cursor: pointer; font: 22px var(--display);
}
.back-to-top:hover { transform: translateY(-2px); }

@media (max-width: 980px) {
  .nav-row { align-items: stretch; flex-direction: column; gap: 10px; }
  .site-nav { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
  .site-nav > a, .site-nav > details { flex: 0 0 auto; }
  .header-search { grid-template-columns: auto 1fr auto auto; }
  .reading-guide { grid-template-columns: 1fr; gap: 13px; }
  .reading-guide nav { justify-content: flex-start; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week-strip { grid-template-columns: 1fr; }
  .week-stats { justify-content: flex-start; }
  .discovery-board { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .page { padding: 12px 14px 42px; }
  .site-utility { margin-bottom: 18px; }
  .utility-meta > span:not(.live-label) { display: none; }
  .site-header h1 { font-size: clamp(34px, 12vw, 52px); }
  .subtitle { font-size: 15px; }
  .site-nav a, .nav-more summary { min-height: 38px; padding-inline: 10px; }
  .header-search kbd { display: none; }
  .reading-guide { margin-top: 12px; padding: 15px; }
  .card { padding: 19px 16px; margin-top: 16px; }
  .kpi-row { margin-top: 16px; }
  .stat-tile { min-height: 116px; padding: 16px; }
  .hero-lead { min-height: 310px; }
  .hero-side { grid-template-columns: 1fr; }
  .hero-story { min-height: 140px; }
  .week-stats { gap: 16px 24px; }
  .discovery-routes { grid-template-columns: 1fr; }
  .discovery-routes a, .discovery-routes a:nth-child(even), .discovery-routes a:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .discovery-routes a:last-child { border-bottom: 0; }
  .vote-head { align-items: flex-start; flex-wrap: wrap; }
  .vote-title { order: 3; flex-basis: 100%; }
  .vote-bar-row { align-items: flex-start; flex-direction: column; gap: 5px; }
  .vote-bar { width: 100%; }
  .vote-counts { min-width: 0; text-align: left; }
  .member-directory { position: static; max-height: none; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
  .footer-freshness { grid-column: auto; }
  .back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

@media (max-width: 440px) {
  .utility-meta a { display: none; }
  .mini-brand { font-size: 9px; }
  .kpi-row { grid-template-columns: 1fr; }
  .stat-tile { min-height: 100px; }
  .header-search { grid-template-columns: auto 1fr auto; }
  .header-search button { margin-left: 0; }
  .reading-guide nav { display: grid; justify-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .loading-card::before { animation: none; }
  .party-card, .back-to-top { transition: none; transform: none !important; }
}

@media print {
  body { background: #fff; color: #000; }
  .site-utility, .nav-row, .back-to-top, .reading-guide nav { display: none !important; }
  .page { width: 100%; padding: 0; }
  .card, .stat-tile, .party-dossier { break-inside: avoid; box-shadow: none; }
  .site-footer { color: #333; }
}
