/* Wat zegt de raad — "inkt & signaal"
   Inktzwarte vlakken, warm papier, één elektrisch accent. Vette koppen, functionele werkbladen. */
/* Lettertypes: zelf gehost (SIL Open Font License, zie assets/fonts/LICENSE-*.txt) — geen externe verzoeken */
@font-face { font-family: 'Bricolage Grotesque Variable'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-ext-standard-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque Variable'; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/bricolage-grotesque-latin-standard-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-ext-opsz-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-opsz-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'JetBrains Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono Variable'; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --ink-band: #0e0f14;          /* donkere kopvlakken + zijbalk */
  --ink-band-2: #171923;
  --on-band: #f3f1ea;
  --on-band-2: #a9abb8;
  --signal: #c8f031;            /* accent: elektrisch limoen */
  --signal-ink: #0e0f14;
  --bg: #f4f1ea;                /* warm papier */
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --ink: #111216;
  --ink-2: #3b3d46;
  --muted: #6e7080;
  --faint: #a3a4ae;
  --line: #e3dfd4;
  --line-2: #eeeae1;
  --accent: #3a35d6;            /* links */
  --accent-soft: #ecebfd;
  --accent-ink: #ffffff;
  --bar: #3a35d6;
  --bar-track: #ece8de;
  --pos: #147a3f; --pos-bg: #e3f6e9;
  --neg: #b42318; --neg-bg: #fdecea;
  --warn: #8a5a00; --warn-bg: #fff4d6;
  --neu-bg: #efece4;
  --mark: #ffe45c;              /* markeerstift */
  --shadow: 0 1px 0 rgba(17,18,22,.04), 0 8px 24px -16px rgba(17,18,22,.18);
  --shadow-lg: 0 30px 70px -20px rgba(0,0,0,.45);
  --r: 16px;
  --font: "Inter Variable", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --display: "Bricolage Grotesque Variable", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono Variable", "Cascadia Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --side: 252px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink-band: #08090c; --ink-band-2: #12141b;
    --bg: #0f1015; --surface: #171920; --surface-2: #1c1e26; --ink: #f1efe8; --ink-2: #cfcfd8; --muted: #9a9caa; --faint: #6b6d7a;
    --line: #2a2c36; --line-2: #22242d; --accent: #a7a4ff; --accent-soft: #24224a; --bar: #a7a4ff; --bar-track: #262833;
    --pos: #5fd68b; --pos-bg: #13301f; --neg: #ff8a7a; --neg-bg: #3a1714; --warn: #ffcf5a; --warn-bg: #352a10; --neu-bg: #25272f;
    --mark: #6b5c00; --shadow: none;
  }
}
* { box-sizing: border-box; }
html { font-size: 15.5px; -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.55; font-feature-settings: "cv11", "ss03"; letter-spacing: -.003em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5rem; }
h1 { font-family: var(--display); font-weight: 800; letter-spacing: -.035em; }
h2 { font-family: var(--display); font-size: 1.15rem; font-weight: 750; letter-spacing: -.015em; }
h3 { font-size: 1rem; font-weight: 650; letter-spacing: -.005em; }
h4 { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 1.2rem 0 .5rem; }
mark { background: linear-gradient(transparent 12%, var(--mark) 12%, var(--mark) 88%, transparent 88%); color: inherit; padding: 0 .15em; }
kbd { font-family: var(--mono); font-size: .68rem; color: var(--on-band-2); border: 1px solid rgba(255,255,255,.18); border-radius: 6px; padding: 1px 6px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); }
.sub { color: var(--muted); font-size: .84rem; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.pre { white-space: pre-line; }
code { font-family: var(--mono); font-size: .85em; }

/* ── Shell: inktzwarte zijbalk ── */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 16px; padding: 20px 14px;
  background: var(--ink-band); color: var(--on-band); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--on-band); padding: 2px 8px 8px; }
.brand:hover { text-decoration: none; }
.brand b { display: block; font-family: var(--display); font-size: 1.12rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.05; }
.brand small { display: block; color: var(--signal); font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-top: -1px; }
.brand-mark { position: relative; display: inline-grid; place-items: center; width: 38px; height: 34px; border-radius: 11px 11px 11px 4px; background: var(--signal);
  color: var(--signal-ink); font-family: var(--display); font-weight: 800; font-size: 1.35rem; line-height: 1; margin-bottom: 6px; flex: none; }
.brand-mark::after { content: ""; position: absolute; left: 6px; bottom: -7px; border-left: 0 solid transparent; border-right: 10px solid transparent; border-top: 8px solid var(--signal); }
.search-trigger { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05); color: var(--on-band-2); font: inherit; font-size: .9rem; cursor: pointer; transition: all .15s; }
.search-trigger:hover { border-color: rgba(255,255,255,.3); color: var(--on-band); }
.search-trigger span { flex: 1; text-align: left; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .side-foot a { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: 9px; color: var(--on-band-2); font-size: .93rem; font-weight: 550;
  transition: background .12s, color .12s; }
.nav a:hover, .side-foot a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: var(--on-band); }
.nav a.active { background: var(--signal); color: var(--signal-ink); font-weight: 700; }
.nav a[href$="p=ai"]:not(.active) .ic { color: var(--signal); }
.period-switch { position: relative; padding: 0 8px; font-size: .8rem; color: var(--on-band-2); }
.period-switch summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 8px 11px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: var(--on-band); white-space: nowrap; transition: border-color .15s; }
.period-switch summary::-webkit-details-marker { display: none; }
.period-switch summary:hover, .period-switch[open] summary { border-color: rgba(255,255,255,.3); }
.period-switch .ps-label { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: .68rem; color: var(--on-band-2); }
.period-switch summary b { font-weight: 700; }
.period-switch .ps-chev { margin-left: auto; flex: none; transition: transform .15s; }
.period-switch[open] .ps-chev { transform: rotate(180deg); }
.period-switch .ps-menu { position: absolute; z-index: 30; left: 8px; right: 8px; bottom: calc(100% + 6px); display: flex; flex-direction: column; gap: 2px; padding: 4px;
  background: #1d1f25; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.6); max-height: 60vh; overflow-y: auto; }
.period-switch .ps-menu a { padding: 8px 11px; border-radius: 8px; color: var(--on-band-2); font-weight: 650; white-space: nowrap; }
.period-switch .ps-menu a:hover { color: var(--on-band); text-decoration: none; background: rgba(255,255,255,.07); }
.period-switch .ps-menu a.on { background: var(--on-band); color: var(--band, #111216); }
.side-foot { margin-top: auto; font-size: .78rem; color: var(--on-band-2); padding: 0 8px; }
.content { min-width: 0; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 40px; }
main { padding-top: 0; padding-bottom: 40px; flex: 1; }

/* ── Kopband: elke pagina opent met een vet, donker vlak ── */
.page-head { position: relative; margin: 18px -22px 28px; padding: 44px 40px 38px; background: var(--ink-band); color: var(--on-band);
  border-radius: 26px; overflow: hidden; box-shadow: 0 24px 50px -30px rgba(0,0,0,.6); }
.page-head::after { content: ""; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,240,49,.22), transparent 65%); pointer-events: none; }
.page-head h1 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); color: var(--on-band); margin: 6px 0 10px; max-width: 22ch; }
.page-head h1 .ic { width: .8em; height: .8em; vertical-align: -.05em; color: var(--signal); }
.page-head .lede { color: var(--on-band-2); font-size: 1.08rem; max-width: 70ch; margin: 0; }
.page-head .eyebrow { color: var(--on-band-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin: 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-head .eyebrow a, .page-head a { color: var(--signal); }
.page-head .meta { color: var(--on-band-2); font-size: .9rem; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.page-head .tags { margin-top: 14px; }
.page-head .tag { background: rgba(255,255,255,.08); color: var(--on-band); }
.page-head .tag:hover { background: var(--signal); color: var(--signal-ink); }
.page-head .badge { background: rgba(255,255,255,.1); color: var(--on-band); }
.page-head .badge.accent { background: var(--signal); color: var(--signal-ink); }
.page-head .badge.pos { background: var(--pos); color: #fff; }
.page-head .badge.neg { background: var(--neg); color: #fff; }
.page-head .dot { box-shadow: 0 0 0 2px var(--ink-band); }
.page-head .period { color: var(--signal); }
@media (max-width: 980px) { .page-head { margin: 0 -16px 22px; padding: 32px 18px 28px; border-radius: 0 0 20px 20px; } }

/* Grote cijfers in de kopband */
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 26px; }
.hero-stat b { display: block; font-family: var(--display); font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--on-band); font-variant-numeric: tabular-nums; }
.hero-stat span { color: var(--on-band-2); font-size: .82rem; }
.hero-stat b em { font-style: normal; color: var(--signal); }

/* Vraag-het-veld in de kopband */
.hero-ask { margin-top: 26px; display: flex; gap: 10px; max-width: 860px; background: var(--surface); border-radius: 16px; padding: 8px; box-shadow: var(--shadow-lg); }
.hero-ask input { flex: 1; border: 0 !important; box-shadow: none !important; background: transparent; font-size: 1.12rem; padding: 12px 14px; color: var(--ink); }
.hero-ask button { background: var(--signal); color: var(--signal-ink); font-weight: 800; padding: 0 22px; border-radius: 11px; display: inline-flex; gap: 8px; align-items: center; }
.hero-ask-hint { margin-top: 10px; color: var(--on-band-2); font-size: .84rem; }
.hero-ask-hint a { color: var(--signal); }
.show-sm { display: none; }

/* Menuknop: alleen op smalle schermen. Op desktop telt de menu-wrapper niet mee (display: contents). */
.menu-btn { display: none; }
.side-menu { display: contents; }
.period-switch { order: 1; }
.side-foot { order: 2; }

/* Smal scherm: rij 1 logo + naam en menuknop, rij 2 zoeken + periode, menu klapt uit met icoon en tekst. */
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; display: grid; grid-template-columns: minmax(0, 1fr) auto 44px;
    grid-template-areas: "brand brand btn" "search period period" "menu menu menu"; gap: 8px 10px; padding: 10px 14px; }
  .brand { grid-area: brand; padding: 0; min-width: 0; }
  .brand b { font-size: 1.05rem; }
  .brand small { font-size: .66rem; }
  .brand-mark { width: 34px; height: 30px; font-size: 1.2rem; margin-bottom: 5px; }
  .menu-btn { grid-area: btn; display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 42px; padding: 0 12px;
    border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05); cursor: pointer; align-self: center; }
  .menu-btn span { display: block; height: 2px; border-radius: 2px; background: var(--on-band); transition: transform .2s, opacity .2s; }
  .menu-open .menu-btn { background: var(--signal); border-color: var(--signal); }
  .menu-open .menu-btn span { background: var(--signal-ink); }
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .search-trigger { grid-area: search; width: auto; min-width: 0; }
  .search-trigger kbd { display: none; }
  .period-switch { grid-area: period; align-self: center; flex: none; padding: 0; }
  .period-switch .ps-label { display: none; }
  .period-switch summary { padding: 9px 11px; }
  .period-switch .ps-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 6px); min-width: 170px; }
  .brand b, .brand small { transition: opacity .2s, transform .2s; }
  .side.brand-quiet .brand b, .side.brand-quiet .brand small { opacity: 0; transform: translateY(6px); }
  .side-menu { grid-area: menu; display: none; max-height: calc(100dvh - 130px); overflow-y: auto; overscroll-behavior: contain;
    border-top: 1px solid rgba(255,255,255,.1); padding-top: 8px; }
  .menu-open .side-menu { display: block; }
  .nav { flex-direction: column; }
  .nav a, .side-foot a { padding: 11px 12px; font-size: 1rem; }
  .side-foot { display: block; margin: 6px 0 2px; padding: 6px 0 0; border-top: 1px solid rgba(255,255,255,.1); }
  .side-foot:empty { display: none; }
}
@media (max-width: 560px) {
  .hero-ask { gap: 4px; padding: 6px; }
  .hero-ask input { min-width: 0; font-size: 1rem; padding: 10px 8px; }
  .hero-ask button { padding: 0 14px; }
  .hero-ask button span { display: none; }
  .card { padding: 16px 12px; overflow-x: auto; }
  .tbl td.nowrap, .tbl th.nowrap { white-space: normal; }
  .tbl td, .tbl th { overflow-wrap: break-word; padding-left: 4px; padding-right: 4px; }
  .tbl th, .tbl td.num, .tbl .bar-value { overflow-wrap: normal; white-space: nowrap; }
  .tbl th { letter-spacing: .02em; font-size: .62rem; }
  .tbl { font-size: .88rem; }
  .tbl .bar-value { font-size: .7rem; letter-spacing: -.02em; }
  .tbl .badge { white-space: nowrap; }
  pre, .doctext { white-space: pre-wrap; overflow-wrap: anywhere; }
  .hide-sm { display: none; }
  .bar-value .muted { display: block; font-size: .72rem; }
  .bar-cell .bar-value { min-width: 0; }
  .bar-cell .bar-track { display: none; }
  .tbl td.bar-cell { min-width: 0; display: table-cell; }
  .show-sm { display: inline; }
}
/* Vangnet: niets mag de pagina breder maken dan het scherm */
@media (max-width: 980px) { html, body { overflow-x: clip; } .content, .wrap, .card { min-width: 0; } }

/* ── Werkbladen ── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; margin-bottom: 22px; box-shadow: var(--shadow); }
.card > h2:first-child { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.card > h2:first-child .muted { font-weight: 500; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-2 > .card, .grid-3 > .card { margin-bottom: 0; }
.grid-2, .grid-3 { margin-bottom: 22px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 22px; align-items: start; }
.grid-main > aside { position: sticky; top: 20px; }
@media (max-width: 1100px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .grid-2, .grid-3, .grid-main { grid-template-columns: 1fr; } .grid-main > aside { position: static; } }
.more { margin: 14px 0 0; font-size: .88rem; }
.more a { font-weight: 700; }
.lede { color: var(--ink-2); margin: 4px 0 0; font-size: 1.02rem; }
.eyebrow { font-size: .82rem; margin: 0 0 6px; color: var(--muted); }
.meta { color: var(--muted); font-size: .88rem; margin: 8px 0 0; }

/* Kengetallen-tegels (buiten de kopband) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.tile-num { font-family: var(--display); font-size: 2.1rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.05; }
.tile-label { color: var(--muted); font-size: .82rem; margin-top: 3px; }

/* ── Lijsten ── */
.list { list-style: none; margin: 0 -10px; padding: 0; }
.list li a { display: grid; grid-template-columns: 108px minmax(0, 1fr) auto; gap: 14px; padding: 11px 10px; border-radius: 10px; color: var(--ink); align-items: baseline; transition: background .12s; }
.list li a:hover { background: var(--surface-2); text-decoration: none; }
.list li + li a { border-top: 1px solid var(--line-2); }
.list-date { font-family: var(--mono); color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.list-main { min-width: 0; }
.list-main strong { font-weight: 750; }
.list-meta { color: var(--muted); font-size: .78rem; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 5px 0; }

/* ── Tabellen ── */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 2px solid var(--ink); }
.tbl td { padding: 11px 10px; border-top: 1px solid var(--line-2); vertical-align: top; }
.tbl tbody tr:first-child td { border-top: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl td a { font-weight: 650; }
.tbl td.nowrap.muted:first-child { font-family: var(--mono); font-size: .8rem; }
.people-cell { font-size: .86rem; line-height: 1.65; }
.card > .tbl { margin: 0 -10px; width: calc(100% + 20px); }

/* ── Labels & chips ── */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 750; padding: 2px 9px; border-radius: 6px; background: var(--neu-bg); color: var(--ink-2);
  white-space: nowrap; line-height: 1.65; letter-spacing: .01em; }
.badge.pos { background: var(--pos-bg); color: var(--pos); }
.badge.neg { background: var(--neg-bg); color: var(--neg); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.muted { color: var(--muted); }
.badge.accent { background: var(--ink); color: var(--signal); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: .02em; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink-2); background: var(--surface);
  font-size: .86rem; font-weight: 600; transition: all .12s; }
.chip:hover { text-decoration: none; border-color: var(--ink); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--signal); border-color: var(--ink); }
.chip.on .muted { color: inherit; opacity: .7; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 7px; background: var(--neu-bg); color: var(--ink-2); }
.tag:hover { text-decoration: none; background: var(--ink); color: var(--signal); }
.tag .ic { width: 13px; height: 13px; }

/* ── Formulieren ── */
input[type=search], input[type=email], input[type=password], input[type=date], input[type=text], select {
  font: inherit; font-size: .92rem; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 12px; transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(200,240,49,.45); }
button { font: inherit; font-weight: 700; font-size: .92rem; background: var(--ink); color: var(--surface); border: 0; border-radius: 10px; padding: 9px 18px; cursor: pointer; }
.search-form .big { flex: 1 1 380px; font-size: 1.08rem; padding: 12px 15px; }
.search-form label { color: var(--muted); font-size: .86rem; display: flex; gap: 6px; align-items: center; }

/* ── Staafjes (één reeks: één kleur; waarde als tekst) ── */
.bars { display: flex; flex-direction: column; gap: 1px; margin: 0 -6px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 40%) 1fr 80px; gap: 12px; align-items: center; padding: 6px 6px; border-radius: 8px; color: var(--ink); font-size: .9rem; }
a.bar-row:hover { background: var(--surface-2); text-decoration: none; }
.bars.compact .bar-row { grid-template-columns: minmax(110px, 48%) 1fr 60px; padding: 3px 6px; font-size: .86rem; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.bar-track { display: block; height: 12px; background: var(--bar-track); border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 3px; transform-origin: left; animation: grow .6s cubic-bezier(.2,.7,.2,1); }
@keyframes grow { from { transform: scaleX(0); } }
.bar-value { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: .8rem; white-space: nowrap; }
.bar-cell { min-width: 220px; display: flex; gap: 10px; align-items: center; }
.bar-cell .bar-track { flex: 1; }
.bar-cell .bar-value { min-width: 70px; }

/* ── Agenda ── */
.agenda { list-style: none; padding: 0; margin: 0 -10px; }
.agenda > li + li { border-top: 1px solid var(--line-2); }
.agenda summary { cursor: pointer; padding: 13px 10px; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; list-style: none; border-radius: 10px; }
.agenda summary::-webkit-details-marker { display: none; }
.agenda summary:hover { background: var(--surface-2); }
.agenda details.empty summary { cursor: default; color: var(--ink-2); }
.agenda details[open] { padding-bottom: 16px; }
.agenda details > *:not(summary) { margin-left: 70px; margin-right: 10px; }
.ai-num { font-family: var(--mono); color: var(--muted); font-size: .82rem; }
.ai-title { font-weight: 700; font-size: 1.02rem; }
.ai-meta { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.ai-desc { color: var(--ink-2); font-size: .93rem; white-space: pre-line; }
.speakers { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-size: .88rem; }
.doc { padding: 4px 0; font-size: .9rem; display: flex; gap: 9px; align-items: baseline; }
.doc::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--ink); flex: none; transform: translateY(-1px); }
:target { scroll-margin-top: 80px; }
li:target > details > summary { background: var(--signal); color: var(--signal-ink); }

/* ── Besluiten / items ── */
.item { padding: 16px 0; border-top: 1px solid var(--line-2); }
.item:first-child { border-top: 0; padding-top: 4px; }
.item h3 { font-family: var(--display); font-size: 1.12rem; font-weight: 750; letter-spacing: -.015em; margin: 5px 0 5px; }
.item h3 a { color: var(--ink); }
.item h3 a:hover { color: var(--accent); }
.item-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: .8rem; color: var(--muted); }
.item-meta > span:first-child { font-family: var(--mono); font-size: .76rem; }
.item p { margin: 4px 0 8px; color: var(--ink-2); font-size: .93rem; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }

/* ── Zoekresultaten ── */
.result { padding: 16px 0; border-top: 1px solid var(--line-2); }
.result:first-child { border-top: 0; padding-top: 2px; }
.result h3 { font-family: var(--display); font-size: 1.1rem; font-weight: 750; margin: 6px 0 4px; }
.result p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.result-meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.doctext { white-space: pre-wrap; font-family: var(--font); font-size: .95rem; line-height: 1.7; max-height: 78vh; overflow: auto; background: var(--surface-2); padding: 24px 28px; border-radius: 12px; border: 1px solid var(--line-2); }
.inline-search { margin-bottom: 14px; }
.inline-search input { width: 100%; max-width: 440px; }
.doctext { position: relative; } /* treffers scrollen binnen het tekstvak */
.doc-find { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-find input { flex: 1 1 260px; }
.find-count { font-size: .85rem; color: var(--muted); min-width: 7.5em; font-variant-numeric: tabular-nums; }
.find-btn { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; }
.find-btn:hover { background: var(--surface-2); }
.doctext mark.current { --mark: var(--signal); box-shadow: 0 0 0 2px var(--signal); border-radius: 2px; }
.pager { display: flex; gap: 16px; justify-content: center; margin-top: 16px; }

/* ── Stemmingen ── */
.votes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0 8px; }
.vote-col { padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); }
.vote-col:first-child { background: var(--pos-bg); border-color: transparent; }
.vote-col:last-child { background: var(--neg-bg); border-color: transparent; }
.vote-col h4 { margin-top: 0; color: var(--ink); }
.vote-chip { display: inline-flex; align-items: center; margin: 0 6px 6px 0; padding: 4px 11px; border-radius: 999px; color: var(--ink); font-size: .85rem; font-weight: 600; background: var(--surface); }
.vote-chip:hover { text-decoration: none; outline: 2px solid var(--ink); }

/* ── Personen ── */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.person { display: flex; gap: 13px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); transition: border-color .12s, transform .12s; }
.person:hover { text-decoration: none; border-color: var(--ink); transform: translateY(-2px); }
.avatar { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: .95rem; color: #fff; flex: none; background: var(--faint); }
.person b { display: block; font-size: .96rem; font-weight: 750; }
.person small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.person small.clamp { display: -webkit-box; }

/* ── Kaart ── */
.map { height: 560px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.leaflet-container { font: inherit !important; }
.leaflet-popup-content { font-size: .88rem; line-height: 1.45; }

.foot { color: var(--muted); font-size: .8rem; padding: 22px 40px 40px; }

/* ── Transcript (tijd · spreker · tekst) ── */
.transcript { margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.transcript > summary { cursor: pointer; padding: 10px 14px; font-size: .86rem; font-weight: 750; color: var(--ink); list-style: none; background: var(--surface-2); }
.transcript > summary::-webkit-details-marker { display: none; }
.transcript > summary::before { content: "▸ "; color: var(--accent); }
.transcript[open] > summary::before { content: "▾ "; }
.transcript[open] { padding-bottom: 8px; }
.utt { display: grid; grid-template-columns: 66px minmax(0, 1fr); column-gap: 12px; row-gap: 1px; padding: 10px 14px; font-size: .93rem; border-top: 1px solid var(--line-2); }
.utt-time { grid-row: span 2; }
.utt-time { font-family: var(--mono); color: var(--muted); font-size: .78rem; padding-top: 3px; }
.utt-who { font-weight: 750; font-size: .84rem; display: flex; align-items: center; }
.utt-text { color: var(--ink-2); line-height: 1.6; }
.utt:target { background: #fff9d1; }
.transcript .sub { padding: 8px 14px 0; margin: 0; }
@media (max-width: 700px) { .utt { grid-template-columns: 1fr; gap: 2px; } }

/* ── Vraag het (AI) ── */
.ai-form { display: flex; gap: 10px; align-items: stretch; }
.ai-form textarea { flex: 1; font: inherit; font-size: 1.1rem; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 14px 16px; resize: vertical; }
.ai-form button { padding: 0 24px; background: var(--signal); color: var(--signal-ink); font-weight: 800; }
.ai-form button:disabled { opacity: .6; cursor: wait; }
form button.voice-btn { flex: none; width: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 11px;
  background: transparent; color: var(--ink); border: 1.5px solid var(--line); cursor: pointer; transition: background .15s, color .15s; }
form button.voice-btn:hover { background: var(--surface-2); }
form button.voice-btn.listening { background: #e5484d; border-color: #e5484d; color: #fff; animation: voice-pulse 1.2s ease-in-out infinite; }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(229,72,77,.45); } 50% { box-shadow: 0 0 0 8px rgba(229,72,77,0); } }
@media (prefers-reduced-motion: reduce) { form button.voice-btn.listening { animation: none; } }
form.hero-ask button.voice-btn:not(.listening) { border-color: transparent; }
.ai-quota { margin: 6px 0 0; font-size: .88rem; font-weight: 600; color: var(--ink-2); }
.dpg-key { margin-bottom: 12px; }
.dpg-key label { display: block; margin-bottom: 6px; }
.dpg-key-row { display: flex; gap: 8px; }
.dpg-key-row input { flex: 1; font: inherit; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.dpg-key-row button { padding: 0 18px; background: var(--ink); color: var(--bg); font-weight: 700; border-radius: 10px; }
button.linkish { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9rem; }
button.tag { border: 0; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; }
.ai-answer { font-size: 1.02rem; line-height: 1.7; margin: 12px 0 8px; }
.ai-answer p { margin: 0 0 .75em; }
.ai-answer ul { margin: 0 0 .9em; padding-left: 1.2em; }
.ai-answer h3 { font-family: var(--display); margin: 1.1em 0 .4em; }
.cite { display: inline-block; min-width: 1.4em; padding: 0 .3em; margin: 0 1px; border-radius: 5px; background: var(--ink); color: var(--signal); font-family: var(--mono); font-size: .68rem; font-weight: 700; text-align: center; text-decoration: none; }
.cite:hover { background: var(--signal); color: var(--signal-ink); text-decoration: none; }
.ai-sources { margin: 0; padding-left: 1.6em; font-size: .88rem; }
.ai-sources li { padding: 3px 0; }
.ai-table { overflow-x: auto; margin: 6px 0 14px; }
.ai-table .tbl { font-size: .9rem; }
.ai-thinking { display: flex; gap: 7px; padding: 16px 0; }
.ai-thinking span { width: 9px; height: 9px; border-radius: 3px; background: var(--ink); animation: blink 1.2s infinite ease-in-out; }
.ai-thinking span:nth-child(2) { animation-delay: .2s; } .ai-thinking span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; transform: scale(.8); } 40% { opacity: 1; transform: scale(1); background: var(--signal); } }

/* ── Zoekpalet ── */
.palette { position: fixed; inset: 0; z-index: 1000; background: rgba(8,9,12,.6); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; animation: fade .12s ease-out; }
.palette[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.palette-box { width: min(660px, 92vw); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .14s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { transform: translateY(-6px) scale(.98); opacity: 0; } }
.palette-form { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette-form input { flex: 1; border: 0; background: transparent; font-size: 1.12rem; padding: 6px 0; box-shadow: none !important; }
.palette-form kbd { color: var(--muted); border-color: var(--line); }
.palette-results { max-height: 52vh; overflow: auto; padding: 8px; }
.palette-results:empty { display: none; }
.pr-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 10px 10px 4px; font-weight: 700; }
.pr { display: flex; gap: 10px; align-items: baseline; padding: 9px 10px; border-radius: 9px; color: var(--ink); }
.pr:hover, .pr.sel { background: var(--ink); color: var(--on-band); text-decoration: none; }
.pr:hover .s, .pr.sel .s { color: var(--signal); }
.pr .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pr .s { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.palette-hint { font-size: .76rem; color: var(--muted); padding: 9px 18px; border-top: 1px solid var(--line-2); background: var(--surface-2); }

/* ── Laden ── */
.loading-bar { position: fixed; top: 0; left: 0; height: 3px; background: var(--signal); z-index: 2000; width: 0; opacity: 0; transition: width .4s ease, opacity .2s; }
.loading-bar.on { opacity: 1; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .12s; }

/* ── Login ── */
.login-body { display: grid; place-items: center; min-height: 100vh; background: var(--ink-band); }
.login { width: min(380px, calc(100vw - 24px)); display: flex; flex-direction: column; gap: 14px; }
.login h1 { font-size: 1.4rem; display: flex; gap: 10px; align-items: center; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--ink-2); }
.error { color: var(--neg); }

/* Donker: "inkt"-accenten omdraaien (anders limoen op crème) */
@media (prefers-color-scheme: dark) {
  .chip.on, .badge.accent, .cite, .tag:hover, button.tag:hover { background: var(--signal); color: var(--signal-ink); border-color: var(--signal); }
  .chip:hover { border-color: var(--signal); }
  .pr:hover, .pr.sel { background: var(--signal); color: var(--signal-ink); }
  .pr:hover .s, .pr.sel .s { color: var(--signal-ink); }
  .tbl th { border-bottom-color: var(--line); }
  .doc::before { background: var(--faint); }
  .utt:target { background: #3a3510; }
  .vote-chip { background: var(--surface-2); }
}

.page-head h1 em { font-style: normal; color: var(--signal); }
.hero-title { font-size: clamp(3rem, 8vw, 6.6rem) !important; line-height: .95; letter-spacing: -.045em !important; max-width: none !important; }

/* ── Spreker-labels (partij in partijkleur, rol in inkt) ── */
.who { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.who-name { font-weight: 700; }
.who-labels { display: inline-flex; gap: 4px; align-items: center; }
.pchip, .rchip { display: inline-flex; align-items: center; font-family: var(--font); font-size: .68rem; font-weight: 700; line-height: 1; padding: 3px 7px 3px; border-radius: 5px; white-space: nowrap; letter-spacing: .01em; }
.pchip { background: color-mix(in srgb, var(--pc) 15%, var(--surface)); color: color-mix(in srgb, var(--pc) 60%, var(--ink)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 35%, transparent); }
.rchip { background: var(--ink); color: var(--surface); }
@media (prefers-color-scheme: dark) {
  .pchip { background: color-mix(in srgb, var(--pc) 22%, var(--surface)); color: color-mix(in srgb, var(--pc) 45%, #ffffff); }
  .rchip { background: var(--signal); color: var(--signal-ink); }
}
.page-head .pchip { background: color-mix(in srgb, var(--pc) 30%, var(--ink-band)); color: color-mix(in srgb, var(--pc) 40%, #ffffff); }
.utt-who .who { gap: 3px 6px; }
.speakers .spk { display: inline-flex; align-items: center; gap: 6px; }
.co-signer { opacity: .72; }
.people-cell > div { margin: 2px 0; }
.utt-jump { font-family: var(--mono); font-size: .78rem; font-weight: 600; margin-left: 8px; }
.result h3 .who-name { font-family: var(--display); font-size: 1.1rem; }
.bars.compact .bar-row { grid-template-columns: minmax(0, 1fr) 56px; row-gap: 3px; padding: 6px 6px; }
.bars.compact .bar-row .bar-label { grid-column: 1 / -1; }
.bars.compact .bar-row + .bar-row { border-top: 1px solid var(--line-2); }
.bar-label .who { flex-wrap: nowrap; max-width: 100%; }
.bar-label .who-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* Woordmerk: zelfde tekening als de grote kop (optische grootte vast op "groot") */
.page-head h1, .brand b { font-variation-settings: "opsz" 96; }
.brand b { font-size: 1.32rem; font-weight: 800; letter-spacing: -.045em; line-height: 1; }
.brand b em { font-style: normal; color: var(--signal); }
.brand small { margin-top: 3px; }
.login h1 em { font-style: normal; color: var(--signal); }

/* ── Terugval als de AI niet bereikbaar is ── */
.ai-explain { margin-top: 16px; max-width: 760px; color: var(--on-band-2); font-size: .92rem; }
.ai-explain p { margin: 0 0 6px; }
.ai-explain strong { color: var(--on-band); }
.ai-explain .sub { color: var(--on-band-2); opacity: .85; }
.ai-fallback-page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; margin-bottom: 22px; box-shadow: var(--shadow); }
.ai-fallback-page .hero-ask { margin-top: 0; box-shadow: none; border: 1.5px solid var(--line); }
.ai-fallback-page .ai-explain, .ai-fallback-page .ai-explain strong, .ai-fallback-page .ai-explain .sub { color: var(--ink-2); }
.ai-fallback-page .ai-explain strong { color: var(--ink); }
[data-ai-gate][hidden], [data-ai-fallback][hidden] { display: none !important; }

/* ── Tabellen die niet passen: gestapelde rijen (app.js zet .stacked alleen als de tabel breder is dan de kaart) ── */
.tbl.stacked, .tbl.stacked tbody { display: block; width: 100%; }
.tbl.stacked thead { display: none; }
.tbl.stacked tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 12px; padding: 11px 2px; border-top: 1px solid var(--line-2); }
.tbl.stacked tbody tr:first-child { border-top: 0; }
.tbl.stacked td { display: block; padding: 0 !important; border: 0; white-space: normal; text-align: left; }
.tbl.stacked td:empty { display: none; }
.tbl.stacked td.main { flex: 1 1 100%; order: -1; }
.tbl.stacked td:not(.main) { font-size: .82rem; }
.tbl.stacked td.num[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
