/*
  Glasbüro – das ganze Design in einer Datei.

  Leitidee „Glas“: Die Oberfläche ist unbunt und durchsichtig, Farbe trägt
  nur, was Daten sind – Parteien, Stimmen, der Stand von Versprechen.
  Gliederung entsteht durch Raster, Abstand und Haarlinien, nicht durch
  Kästen. Das Wiedererkennbare ist der Belegapparat: an jeder Angabe eine
  kleine Nummer, am Seitenende das Verzeichnis mit Fundstelle, Zitat und
  dem Weg zurück zur Quelle.

  Regeln (aus quiet-pages und mira übernommen):
    - Farben, Grade und Abstände nur aus den Tokens unten.
    - Kontraste gerechnet, nicht geschätzt (WCAG 2.x); die Werte stehen
      neben den Tokens. Fließtext ≥ 7:1, Nebentext ≥ 4,5:1, Linien und
      Fokus ≥ 3:1.
    - Farbe nie allein: neben jeder Farbmarke steht ein Wort (SC 1.4.1).
    - Hover nur in @media (hover: hover), Flächen werden nicht animiert.
    - Kein style-Attribut im HTML (Content-Security-Policy style-src 'self').

  Abschnitte: 1 Schrift · 2 Tokens · 3 Grundlage · 4 Hülle · 5 Text ·
  6 Komponenten · 7 Diagramme · 8 Seiten · 9 Druck und Sonderfälle
*/

/* ═══ 1 Schrift ═════════════════════════════════════════════════════ */

/* Atkinson Hyperlegible Next (Braille Institute, SIL OFL 1.1), selbst
   gehostet wie in mira. Gewählt, weil auf dieser Seite Zahlen und Namen
   nachgeprüft werden: 1, l und I, 0 und O sind unverwechselbar, und die
   Schrift hat Tabellenziffern (tnum). Kein Abruf bei Google Fonts – das
   LG München I hat ihn 2022 als Datenschutzverstoß gewertet (3 O 17493/20). */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/AtkinsonHyperlegibleNext-VF.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ═══ 2 Tokens ══════════════════════════════════════════════════════ */

:root {
  color-scheme: light dark;

  --schrift: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --grad: 1rem;              /* 16 px Fließtext */
  --grad-ui: 0.875rem;       /* 14 px Tabellen, Navigation */
  --grad-klein: 0.8125rem;   /* 13 px Meta, Fußnoten, Legenden */
  --grad-mini: 0.75rem;      /* 12 px Verweisnummern, Marken */
  --grad-h3: 1.0625rem;      /* 17 px */
  --grad-h2: 1.375rem;       /* 22 px */
  --grad-titel: clamp(1.75rem, 1.45rem + 1.3vw, 2.25rem);  /* 28–36 px */

  --raum: 1.5rem;            /* 24 px Grundrhythmus */
  --spalte: 74rem;           /* Register und Tabellen */
  --satz: 42em;              /* Fließtext: ~75 Zeichen */
  --rand: 1.25rem;           /* 20 px, ab 48em 32 px */
  --radius: 4px;
  --treffer: 2.75rem;        /* 44 px Zeilen in Registern */

  /* Hell – Kontraste gegen --grund / --flaeche-2 */
  --grund: #f7f8f8;
  --flaeche-2: #eceff1;      /* Hover, Code, Eingabefeld */
  --linie: #dde1e4;          /* Dekor, trägt nie Information */
  --linie-stark: #878f96;    /* 3,08:1 – Feldränder */
  --tinte: #15191c;          /* 16,62:1 / 15,31:1 */
  --tinte-2: #454c52;        /*  8,19:1 /  7,55:1 */
  --tinte-3: #5f676e;        /*  5,40:1 /  4,98:1 */
  --fokus: #2c3237;          /* 12,19:1 */

  /* Daten: Status der Versprechen (Symbol + Wort, nie Farbe allein) */
  --status-eingeloest: #0a8a22;
  --status-teilweise: #e0a000;
  --status-in_arbeit: #257de0;
  --status-offen: #9aa2a9;
  --status-gebrochen: #d0383a;

  /* Daten: Stimmen – Ja und Nein als Gegenpole (blau/rot), dazwischen grau */
  --stimme-ja: #257de0;
  --stimme-nein: #e2474a;
  --stimme-enthalten: #9aa2a9;
  --stimme-abwesend: #dfe3e6;

  /* Heatmap: eine Farbe, hell → dunkel (Blau aus der Datenvisualisierung) */
  --h-0: #eef4fc; --h-1: #dbe9fb; --h-2: #c4dbf8; --h-3: #a9cbf4; --h-4: #8bb8ef;
  --h-5: #6aa3e8; --h-6: #4a8de0; --h-7: #2f76d2; --h-8: #1f60b8; --h-9: #164c96; --h-10: #0f3a74;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #121518;
    --flaeche-2: #1c2125;
    --linie: #2a3035;
    --linie-stark: #5f676e;  /* 3,19:1 */
    --tinte: #e6e9eb;        /* 15,02:1 / 13,31:1 */
    --tinte-2: #b3b9be;      /*  9,25:1 /  8,19:1 */
    --tinte-3: #929aa1;      /*  6,42:1 /  5,69:1 */
    --fokus: #c8cdd2;        /* 11,45:1 */

    --status-eingeloest: #2fb34a;
    --status-teilweise: #f2b62a;
    --status-in_arbeit: #4b97ee;
    --status-offen: #6b737a;
    --status-gebrochen: #ec5b5d;

    --stimme-ja: #338ced;
    --stimme-nein: #eb6263;
    --stimme-enthalten: #6b737a;
    --stimme-abwesend: #2d3338;

    /* Im Dunkeln dreht sich der Anker: wenig = dunkel, viel = hell. */
    --h-0: #172230; --h-1: #1a2a3d; --h-2: #1d334b; --h-3: #203d5c; --h-4: #24486e;
    --h-5: #2a5584; --h-6: #33649b; --h-7: #4576b2; --h-8: #5d8cc7; --h-9: #7ba5d9; --h-10: #9dbfe8;
  }
}

@media (min-width: 48em) { :root { --rand: 2rem; } }

/* ═══ 3 Grundlage ═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-padding-top: var(--raum);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--grund);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: var(--grad);
  line-height: 1.55;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, p, ul, ol, dl, figure, table, blockquote { margin-top: 0; }
p, ul, ol, dl { margin-bottom: 1rem; }
h1, h2, h3 { text-wrap: balance; hyphens: auto; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: var(--linie-stark); }
@media (hover: hover) {
  a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
}

:where(a, button, input, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--fokus);
  outline-offset: 2px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: color-mix(in srgb, var(--status-in_arbeit) 28%, transparent); }

.nur-vorlesen {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.sprung {
  position: absolute; left: -9999px; top: 0;
  padding: 0.5rem 1rem; background: var(--tinte); color: var(--grund); z-index: 10;
}
.sprung:focus-visible { left: var(--rand); top: 0.5rem; }

/* ═══ 4 Hülle ═══════════════════════════════════════════════════════ */

.huelle {
  width: 100%;
  max-width: calc(var(--spalte) + 2 * var(--rand));
  margin-inline: auto;
  padding-inline: var(--rand);
}

.kopfleiste { border-bottom: 1px solid var(--linie); }
.kopfleiste__oben {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem;
  padding-block: 0.875rem 0.5rem;
}

.wortmarke {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em;
  text-decoration: none;
}
/* Das Zeichen: eine Fensterscheibe, viergeteilt. Ornament, aria-hidden. */
.wortmarke__zeichen { width: 18px; height: 18px; flex: none; }
.wortmarke__zeichen rect, .wortmarke__zeichen path { fill: none; stroke: currentColor; stroke-width: 1.5; }
.wortmarke__dev {
  font-size: var(--grad-mini); font-weight: 600; color: var(--tinte-2);
  border: 1px solid var(--linie-stark); border-radius: var(--radius); padding: 0 0.35em;
}

.laender { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0; padding: 0; list-style: none; font-size: var(--grad-ui); }
.laender a { text-decoration: none; color: var(--tinte-2); padding-block: 0.25rem; }
.laender a[aria-current] { color: var(--tinte); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: currentColor; }

.suche { margin-left: auto; display: flex; gap: 0.25rem; }
.suche input {
  width: 12rem; max-width: 52vw;
  font: inherit; font-size: var(--grad-ui); color: var(--tinte);
  background: var(--flaeche-2); border: 1px solid var(--linie-stark); border-radius: var(--radius);
  padding: 0.3rem 0.55rem;
}
.suche button, .knopf {
  font: inherit; font-size: var(--grad-ui); color: var(--tinte); cursor: pointer;
  background: transparent; border: 1px solid var(--linie-stark); border-radius: var(--radius);
  padding: 0.3rem 0.7rem;
}
@media (hover: hover) { .suche button:hover, .knopf:hover { background: var(--flaeche-2); } }

.navigation { overflow-x: auto; scrollbar-width: none; }
.navigation::-webkit-scrollbar { display: none; }
.navigation ul { display: flex; gap: 1.25rem; margin: 0; padding: 0 0 0.6rem; list-style: none; font-size: var(--grad-ui); white-space: nowrap; }
.navigation a { text-decoration: none; color: var(--tinte-2); padding-block: 0.35rem; display: inline-block; }
.navigation a[aria-current] { color: var(--tinte); font-weight: 600; box-shadow: inset 0 -2px 0 currentColor; }
@media (hover: hover) { .navigation a:hover, .laender a:hover { color: var(--tinte); } }

main { flex: 1 0 auto; padding-block: calc(var(--raum) * 1.5) calc(var(--raum) * 2); }

.fusszeile { border-top: 1px solid var(--linie); font-size: var(--grad-klein); color: var(--tinte-2); }
.fusszeile__innen { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1rem 1.5rem; }
.fusszeile ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.fusszeile a { color: inherit; text-decoration: none; }
@media (hover: hover) { .fusszeile a:hover { color: var(--tinte); text-decoration: underline; } }

.dev-hinweis {
  font-size: var(--grad-klein); color: var(--tinte-2);
  border-bottom: 1px dashed var(--linie-stark); padding: 0.35rem 0;
}

/* ═══ 5 Text ════════════════════════════════════════════════════════ */

.titel { font-size: var(--grad-titel); line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; margin-bottom: 0.35rem; }
.untertitel { font-size: 1.0625rem; color: var(--tinte-2); margin-bottom: var(--raum); max-width: var(--satz); }
.vorspann { max-width: var(--satz); color: var(--tinte-2); }

.abschnitt { margin-top: calc(var(--raum) * 2.25); }
.abschnitt:first-of-type { margin-top: calc(var(--raum) * 1.5); }
.abschnitt > h2, .abschnitt__kopf h2 { font-size: var(--grad-h2); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 0.25rem; }
.abschnitt__kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; margin-bottom: 0.75rem; }
.abschnitt__kopf h2 { margin-bottom: 0; }
.abschnitt__kopf .mehr { font-size: var(--grad-ui); color: var(--tinte-2); }
.abschnitt__einleitung { max-width: var(--satz); color: var(--tinte-2); font-size: 0.9375rem; margin-bottom: 1rem; }
h3 { font-size: var(--grad-h3); font-weight: 600; line-height: 1.35; margin-bottom: 0.4rem; }

.text { max-width: var(--satz); }
.text h2 { font-size: var(--grad-h2); font-weight: 600; margin-top: calc(var(--raum) * 1.75); }
.text h3 { margin-top: var(--raum); }
.text li { margin-bottom: 0.35rem; }

.leise { color: var(--tinte-2); }
.klein { font-size: var(--grad-klein); }
.zahl { font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }

blockquote.zitat {
  margin: 0.5rem 0 0.75rem;
  padding: 0 0 0 0.9rem;
  border-left: 2px solid var(--linie-stark);
  color: var(--tinte);
  max-width: var(--satz);
}
blockquote.zitat p { margin-bottom: 0.4rem; }

/* ═══ 6 Komponenten ═════════════════════════════════════════════════ */

/* Kopf einer Seite: Eigenschaften wie in einem Register (dl, 2 Spalten ab 40em). */
.kopf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0 0 var(--raum); font-size: 0.9375rem; max-width: 52rem; }
.kopf dt { color: var(--tinte-3); font-size: var(--grad-klein); margin-top: 0.6rem; }
.kopf dt:first-of-type { margin-top: 0; }
.kopf dd { margin: 0; }
@media (min-width: 40em) {
  .kopf { grid-template-columns: 11rem minmax(0, 1fr); row-gap: 0.35rem; }
  .kopf dt { margin-top: 0; padding-top: 0.15rem; }
}

/* Zahlenreihe: wenige Kennzahlen nebeneinander, kein Kasten. */
.kennzahlen { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 0 0 var(--raum); padding: 0; list-style: none; }
.kennzahl { min-width: 8rem; }
.kennzahl__wert { display: block; font-size: 1.625rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
.kennzahl__name { display: block; font-size: var(--grad-klein); color: var(--tinte-2); }

/* Tabellen: Haarlinien zwischen Zeilen, kein Zebra, Zahlen rechtsbündig. */
.tabellenrahmen { overflow-x: auto; margin-bottom: 1rem; }
.tabelle { width: 100%; border-collapse: collapse; font-size: var(--grad-ui); line-height: 1.4; }
.tabelle th, .tabelle td { padding: 0.55rem 0.75rem 0.55rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linie); }
.tabelle th { font-weight: 600; color: var(--tinte-2); font-size: var(--grad-klein); border-bottom-color: var(--linie-stark); }
.tabelle td:last-child, .tabelle th:last-child { padding-right: 0; }
.tabelle .n { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.tabelle .eng { width: 1%; white-space: nowrap; }
.tabelle tr.hervorgehoben td { background: var(--flaeche-2); }
.tabelle caption { text-align: left; font-size: var(--grad-klein); color: var(--tinte-2); padding-bottom: 0.5rem; caption-side: top; }
.tabelle a { text-decoration-color: var(--linie-stark); }

/* Register: Zeilen, deren Fläche ein Link ist (Personen, Parteien). */
.register { list-style: none; margin: 0 0 1rem; padding: 0; columns: 16rem auto; column-gap: 2rem; }
.register li { break-inside: avoid; }
.register a { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; min-height: 2.25rem; padding: 0.4rem 0.5rem; margin-inline: -0.5rem; border-radius: var(--radius); text-decoration: none; }
.register .register__neben { font-size: var(--grad-klein); color: var(--tinte-3); white-space: nowrap; }
@media (hover: hover) { .register a:hover { background: var(--flaeche-2); } }

.gruppe { margin-top: calc(var(--raum) * 1.25); }
.gruppe__titel { display: flex; align-items: baseline; gap: 0.6rem; font-size: var(--grad-h3); font-weight: 600; margin-bottom: 0.25rem; border-bottom: 1px solid var(--linie); padding-bottom: 0.35rem; }
.gruppe__titel .anzahl { font-weight: 400; color: var(--tinte-3); font-size: var(--grad-klein); }

/* Parteimarke: ein Farbfeld (Ornament) und der Name (Information). */
.partei { display: inline-flex; align-items: baseline; gap: 0.4em; white-space: nowrap; }
.partei__feld { display: inline-block; width: 0.62em; height: 0.62em; border-radius: 2px; flex: none; transform: translateY(-0.02em); }
.f-ohne { background-color: var(--status-offen); fill: var(--status-offen); }

/* Status eines Versprechens: Symbol in der Statusfarbe, Wort in Tinte. */
.status { display: inline-flex; align-items: center; gap: 0.35em; font-size: var(--grad-ui); white-space: nowrap; }
.status--leer { color: var(--tinte-3); }
.symbol { flex: none; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.symbol .voll { stroke: none; }
.symbol--eingeloest { stroke: var(--status-eingeloest); }
.symbol--teilweise { stroke: var(--status-teilweise); }
.symbol--teilweise .voll { fill: var(--status-teilweise); }
.symbol--in_arbeit { stroke: var(--status-in_arbeit); }
.symbol--offen { stroke: var(--status-offen); }
.symbol--gebrochen { stroke: var(--status-gebrochen); }

.stimme { display: inline-flex; align-items: baseline; gap: 0.35em; white-space: nowrap; font-size: var(--grad-ui); }
.stimme__feld { display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; }
.stimme--leer { color: var(--tinte-3); }
.f-ja { fill: var(--stimme-ja); background-color: var(--stimme-ja); }
.f-nein { fill: var(--stimme-nein); background-color: var(--stimme-nein); }
.f-enthalten { fill: var(--stimme-enthalten); background-color: var(--stimme-enthalten); }
.f-abwesend { fill: var(--stimme-abwesend); background-color: var(--stimme-abwesend); }
.f-eingeloest { fill: var(--status-eingeloest); background-color: var(--status-eingeloest); }
.f-teilweise { fill: var(--status-teilweise); background-color: var(--status-teilweise); }
.f-in_arbeit { fill: var(--status-in_arbeit); background-color: var(--status-in_arbeit); }
.f-offen { fill: var(--status-offen); background-color: var(--status-offen); }
.f-gebrochen { fill: var(--status-gebrochen); background-color: var(--status-gebrochen); }

/* Gewissheit: nur, was NICHT unmittelbar aus einer Quelle stammt, trägt eine Marke. */
.gewiss {
  display: inline-block; font-size: var(--grad-mini); line-height: 1.5; font-weight: 600;
  color: var(--tinte-2); border: 1px solid var(--linie-stark); border-radius: 3px;
  padding: 0 0.4em; vertical-align: 0.1em; white-space: nowrap; cursor: help;
}
/* Eine Vermutung ist gestrichelt umrandet – die gestrichelte Linie liest
   man in Diagrammen als „Schätzung, Annahme“, genau das ist gemeint. */
.gewiss--vermutet { border-style: dashed; color: var(--tinte); }
.vermutet { text-decoration: underline dashed var(--linie-stark); text-underline-offset: 0.2em; }

/* Verweise auf das Belegverzeichnis */
.verweis { font-size: var(--grad-mini); line-height: 0; margin-left: 0.1em; white-space: nowrap; }
.verweis__nr { display: inline-block; padding: 0.15em 0.1em; color: var(--tinte-3); text-decoration: none; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .verweis__nr:hover { color: var(--tinte); text-decoration: underline; } }

/* Das Belegverzeichnis */
.apparat { margin-top: calc(var(--raum) * 3); padding-top: var(--raum); border-top: 1px solid var(--linie-stark); }
.apparat h2 { font-size: var(--grad-h2); font-weight: 600; margin-bottom: 0.25rem; }
.apparat__einleitung { font-size: var(--grad-klein); color: var(--tinte-2); max-width: var(--satz); margin-bottom: 1rem; }
.apparat ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.9rem; max-width: 56rem; }
.apparat li { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); font-size: var(--grad-klein); line-height: 1.5; scroll-margin-top: 1rem; }
.apparat li:target { background: var(--flaeche-2); border-radius: var(--radius); outline: 2px solid var(--linie-stark); outline-offset: 4px; }
.apparat__nr { font-variant-numeric: tabular-nums; color: var(--tinte-3); }
.apparat__quelle { color: var(--tinte); }
.apparat__zitat { margin: 0.25rem 0; padding-left: 0.7rem; border-left: 2px solid var(--linie); color: var(--tinte-2); }
.apparat__wege { display: flex; flex-wrap: wrap; gap: 0.15rem 1rem; margin-top: 0.2rem; }
.apparat__pruefung { display: inline-flex; align-items: center; gap: 0.3em; color: var(--tinte-3); }
.apparat__pruefung--nicht_gefunden, .apparat__pruefung--nicht_erreichbar { color: var(--tinte); font-weight: 600; }

/* Auswahl über Listen: Links in einer Eigenschaftenzeile, kein Formular (wie quiet-pages). */
.auswahl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem; margin: 0 0 var(--raum); font-size: var(--grad-ui); }
.auswahl__zeile { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; align-items: baseline; }
.auswahl__name { color: var(--tinte-3); font-size: var(--grad-klein); min-width: 7rem; }
.auswahl a { color: var(--tinte-2); text-decoration: none; padding-block: 0.2rem; }
.auswahl a[aria-current] { color: var(--tinte); font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; }
@media (hover: hover) { .auswahl a:hover { color: var(--tinte); text-decoration: underline; } }

.hinweis {
  max-width: var(--satz); font-size: 0.9375rem; color: var(--tinte-2);
  border-left: 2px solid var(--linie-stark); padding: 0.1rem 0 0.1rem 0.85rem; margin: 0.5rem 0 1rem;
}
.hinweis--warnung { border-left-color: var(--status-gebrochen); color: var(--tinte); }
.leer { color: var(--tinte-3); font-size: 0.9375rem; }

/* Versprechen in Listen */
.versprechen-liste { list-style: none; margin: 0; padding: 0; }
.versprechen-liste > li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.15rem 1.5rem; padding: 0.75rem 0; border-bottom: 1px solid var(--linie); }
@media (min-width: 48em) { .versprechen-liste > li { grid-template-columns: minmax(0, 1fr) 15rem; } }
.versprechen-liste__titel { font-weight: 600; text-decoration: none; }
.versprechen-liste__meta { font-size: var(--grad-klein); color: var(--tinte-3); }

.details > summary { cursor: pointer; color: var(--tinte-2); font-size: var(--grad-ui); padding-block: 0.25rem; }
.details[open] > summary { margin-bottom: 0.5rem; }

.zweispaltig { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--raum) 3rem; }
@media (min-width: 60em) { .zweispaltig { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ═══ 7 Diagramme ═══════════════════════════════════════════════════ */

.diagramm { margin: 0.25rem 0 1rem; }
.balken { display: block; width: 100%; overflow: visible; }
.balken--hoch { height: 28px; }
.balken--duenn { height: 8px; }
.balken--mittel { height: 14px; }
/* 2 px Grundfarbe zwischen den Teilen: der Rand liegt je zur Hälfte innen
   und außen, zwei Nachbarn ergeben also genau 2 px Abstand. */
.seg { stroke: var(--grund); stroke-width: 2px; }
.seg-text { font-size: 12px; font-weight: 600; font-family: var(--schrift); font-variant-numeric: tabular-nums; dominant-baseline: central; text-anchor: middle; pointer-events: none; }
.t-ja, .t-nein, .t-in_arbeit, .t-gebrochen, .t-eingeloest { fill: #ffffff; }
.t-teilweise, .t-offen, .t-enthalten, .t-abwesend { fill: #141618; }
.mehrheitslinie { stroke: var(--tinte); stroke-width: 2px; }
.mehrheitstext { font-size: 12px; fill: var(--tinte-2); font-family: var(--schrift); }

.legende { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; margin: 0.4rem 0 0; padding: 0; list-style: none; font-size: var(--grad-klein); color: var(--tinte-2); }
.legende li { display: inline-flex; align-items: baseline; gap: 0.4em; }
.legende .feld { display: inline-block; width: 0.65em; height: 0.65em; border-radius: 2px; }
.legende strong { color: var(--tinte); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Heatmap der Übereinstimmung: Zahl in jeder Zelle, Farbe nur zur Orientierung. */
.heatmap td.zelle { text-align: center; font-variant-numeric: tabular-nums; min-width: 4.25rem; border: 2px solid var(--grund); padding: 0.55rem 0.25rem; }
.h-leer { background: transparent; color: var(--tinte-3); }
.h-0 { background: var(--h-0); } .h-1 { background: var(--h-1); } .h-2 { background: var(--h-2); }
.h-3 { background: var(--h-3); } .h-4 { background: var(--h-4); } .h-5 { background: var(--h-5); }
.h-6 { background: var(--h-6); } .h-7 { background: var(--h-7); } .h-8 { background: var(--h-8); }
.h-9 { background: var(--h-9); } .h-10 { background: var(--h-10); }
.h-0, .h-1, .h-2, .h-3, .h-4, .h-5 { color: #15191c; }
.h-6, .h-7, .h-8, .h-9, .h-10 { color: #ffffff; }
@media (prefers-color-scheme: dark) {
  .h-0, .h-1, .h-2, .h-3, .h-4, .h-5, .h-6 { color: #e6e9eb; }
  .h-7, .h-8, .h-9, .h-10 { color: #0f1316; }
}
.heatmap .selbst { color: var(--tinte-3); background: var(--flaeche-2); }

/* Streudiagramm (DW-NOMINATE) */
.streuung { display: block; width: 100%; height: 340px; overflow: visible; }
.streuung .achse { stroke: var(--linie-stark); stroke-width: 1px; }
.streuung .gitter { stroke: var(--linie); stroke-width: 1px; }
.streuung .punkt { stroke: var(--grund); stroke-width: 1.5px; }
.streuung .punkt--hervor { stroke: var(--tinte); stroke-width: 2.5px; }
.streuung text { font-size: 12px; fill: var(--tinte-3); font-family: var(--schrift); }

/* ═══ 8 Seiten ══════════════════════════════════════════════════════ */

.einstieg { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--raum) 3rem; align-items: start; }
@media (min-width: 64em) { .einstieg { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.einstieg__satz { font-size: 1.1875rem; line-height: 1.5; max-width: 36em; }
.einstieg__satz strong { font-weight: 600; }

.parlament + .parlament { margin-top: calc(var(--raum) * 1.25); }
.parlament__kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 0.4rem; }
.parlament__name { font-weight: 600; }
.parlament__meta { font-size: var(--grad-klein); color: var(--tinte-3); }

.abstimmungszeile { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.25rem 1.25rem; padding: 0.7rem 0; border-bottom: 1px solid var(--linie); }
@media (min-width: 48em) { .abstimmungszeile { grid-template-columns: 6.5rem minmax(0, 1fr) 11rem; align-items: baseline; } }
.abstimmungszeile__datum { font-size: var(--grad-klein); color: var(--tinte-3); font-variant-numeric: tabular-nums; }
.abstimmungszeile__titel { text-decoration: none; font-weight: 600; }
.abstimmungszeile__ergebnis { font-size: var(--grad-klein); color: var(--tinte-2); }
.abstimmungszeile .balken { margin-top: 0.35rem; }

.fehlerseite { max-width: var(--satz); padding-block: calc(var(--raum) * 2); }
.fehlerseite__nummer { font-size: var(--grad-klein); color: var(--tinte-3); font-variant-numeric: tabular-nums; }

/* ═══ 9 Druck und Sonderfälle ═══════════════════════════════════════ */

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

@media (forced-colors: active) {
  .partei__feld, .stimme__feld, .legende .feld { forced-color-adjust: none; border: 1px solid CanvasText; }
  .gewiss { border-color: CanvasText; }
}

@media print {
  :root {
    --grund: #ffffff; --flaeche-2: #f2f2f2; --linie: #bbbbbb; --linie-stark: #777777;
    --tinte: #000000; --tinte-2: #222222; --tinte-3: #444444;
  }
  .kopfleiste, .fusszeile, .suche, .auswahl, .sprung, .dev-hinweis { display: none; }
  body { font-size: 10.5pt; }
  .huelle { max-width: none; padding: 0; }
  a { text-decoration: none; }
  .apparat a[href^="http"]::after { content: " " attr(href); font-size: 0.85em; word-break: break-all; }
  .abschnitt, .tabelle tr, .apparat li { break-inside: avoid; }
}

/* Nachträge: Verteilung in Tabellenzeilen (Abstimmung nach Fraktion). */
.verteilung { width: 8rem; min-width: 6rem; }
.verteilung .balken { margin-top: 0.35rem; }

/* Lange Parteinamen im Untertitel und im Kopf dürfen umbrechen (gemessen:
   „Christlich Demokratische Union Deutschlands“ ließ die Seite bei 375 px
   um 6 px überlaufen). */
.untertitel .partei, .kopf .partei { white-space: normal; display: inline; }
.untertitel .partei__feld, .kopf .partei__feld { margin-right: 0.35em; }

/* Abstimmungslisten: Datum unter dem Titel, Stimme mit Wort daneben –
   auf dem Telefon blieb in der vierspaltigen Tabelle vom Stimmwert nur der
   Farbpunkt übrig. */
.stimmtabelle td:first-child { width: 100%; }
.stimmtabelle .datum { display: block; font-size: var(--grad-klein); color: var(--tinte-3); font-variant-numeric: tabular-nums; margin-top: 0.1rem; }
.stimmtabelle td.stimmen { white-space: nowrap; }
.stimmtabelle .fraktionsmehrheit { display: block; font-size: var(--grad-klein); color: var(--tinte-3); margin-top: 0.1rem; }

.kabinett { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 2rem; font-size: var(--grad-ui); }
@media (min-width: 40em) { .kabinett { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kabinett li { padding: 0.4rem 0; border-bottom: 1px solid var(--linie); }
.kabinett a { text-decoration: none; font-weight: 600; }
.kabinett .ressort { display: block; color: var(--tinte-3); font-size: var(--grad-klein); }

.details--gruppe { border-bottom: 1px solid var(--linie); }
.details--gruppe > summary { font-size: var(--grad-h3); color: var(--tinte); font-weight: 600; padding-block: 0.6rem; }
.details--gruppe > summary .anzahl { font-weight: 400; color: var(--tinte-3); font-size: var(--grad-klein); margin-left: 0.4rem; }
.abschnitt__unter { margin-top: calc(var(--raum) * 1.25); margin-bottom: 0; }

/* Ergebnisse je Partei in einem Satz („SPD: Ja (wie versprochen)“) – inline
   statt Flex, sonst setzt die Lücke des Flex-Containers Abstand vor den Doppelpunkt. */
.ergebnisliste { list-style: none; margin: 0.4rem 0 0; padding: 0; font-size: var(--grad-klein); color: var(--tinte-2); }
.ergebnisliste li { display: inline; margin-right: 1.25rem; white-space: nowrap; }

/* Gleich breite Spalten in der Übereinstimmung, Zeilenköpfe fest. */
.heatmap { table-layout: fixed; }
.heatmap th:first-child { width: 11rem; }

/* Achse des Streudiagramms als HTML unter der Grafik: SVG-Text unterhalb
   der Fläche lag über der Legende (gesehen bei 1440 px). */
.achse-x { display: flex; justify-content: space-between; font-size: var(--grad-mini); color: var(--tinte-3); margin: 0.25rem 0 0.5rem; font-variant-numeric: tabular-nums; }
