/* Wahlen – Gestaltung
   Tokens zuerst, dann Grundgerüst, Bausteine, Seiten. Mobil zuerst, breitere Ansichten per min-width. */

:root {
  color-scheme: light;
  --bg: #f4f5f7; --surface: #fff; --surface-2: #f8f9fb; --surface-3: #eef0f4;
  --ink: #0e1621; --ink-2: #2d3947; --muted: #5b6676; --faint: #8b95a4;
  --line: #e3e6eb; --line-2: #d2d7df;
  --accent: #2451d6; --accent-2: #1b3fae; --accent-soft: #e9eefc; --accent-ink: #fff;
  --warn: #8a5300; --warn-bg: #fff4dc; --ok: #19754a; --ok-bg: #e5f4eb; --info-bg: #eef3fe;
  --live: #c8371f; --live-bg: #fdecea;
  --k-bund: #3558d8; --k-eu: #0a88ad; --k-land: #7547d6; --k-kom: #0d8672; --k-abs: #c27300;
  --radius: 18px; --radius-md: 14px; --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / .05);
  --shadow: 0 1px 2px rgb(16 24 40 / .04), 0 8px 24px -8px rgb(16 24 40 / .08);
  --shadow-hover: 0 2px 4px rgb(16 24 40 / .05), 0 16px 32px -12px rgb(16 24 40 / .16);
  --shadow-lg: 0 24px 64px -12px rgb(16 24 40 / .28);
  --font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --gutter: 16px; --topbar: 60px; --ease: cubic-bezier(.2, .7, .2, 1);
  --p-cdu: #2d3338; --p-csu: #3d5a73;
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f15; --surface: #121921; --surface-2: #161f29; --surface-3: #1c2632;
  --ink: #edf1f6; --ink-2: #c9d2dd; --muted: #9aa6b5; --faint: #6d7988;
  --line: #222c38; --line-2: #2f3c4b;
  --accent: #7f9fff; --accent-2: #a6bcff; --accent-soft: #1a2644; --accent-ink: #0a0f15;
  --warn: #f3c56f; --warn-bg: #2a2112; --ok: #72d6a1; --ok-bg: #11281c; --info-bg: #152139;
  --live: #ff8b73; --live-bg: #33150f;
  --k-bund: #8aa2ff; --k-eu: #4fc3e3; --k-land: #b397ff; --k-kom: #4fd1b6; --k-abs: #f2b04c;
  --p-cdu: #717c88; --p-csu: #6f93b4;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .3);
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -8px rgb(0 0 0 / .5);
  --shadow-hover: 0 2px 4px rgb(0 0 0 / .35), 0 16px 32px -12px rgb(0 0 0 / .6);
  --shadow-lg: 0 24px 64px -12px rgb(0 0 0 / .7);
}

/* ---------- Grundgerüst */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 16px); }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: 'kern'; }
#app { flex: 1; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: default; opacity: .45; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.15; font-weight: 700; }
img, svg { display: block; }
kbd { font: 600 .75rem/1 var(--font); padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); box-shadow: 0 1px 0 var(--line-2); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
main:focus, main:focus-visible { outline: none; }
[hidden] { display: none !important; }
.wrap { width: min(1200px, 100% - var(--gutter) * 2); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: -80px; left: 16px; z-index: 200; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.ico { width: 1.2em; height: 1.2em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico.flip { transform: scaleX(-1); }
.muted { color: var(--muted); }
.r { text-align: right; }
.link-icon { display: inline-block; width: .95em; height: .95em; flex-shrink: 0; vertical-align: -.1em; background-color: currentColor; -webkit-mask: url("/icons/external-link-svgrepo-com.svg") center/contain no-repeat; mask: url("/icons/external-link-svgrepo-com.svg") center/contain no-repeat; pointer-events: none; }
.page { padding: 20px 0 56px; animation: page-in .35s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Kopfzeile */
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.topbar-inner { height: var(--topbar); display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.5rem/1 var(--serif); letter-spacing: -.03em; text-decoration: none; }
.brand-dot { color: var(--accent); }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); display: inline-flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 7px 6px; }
.brand-mark i { width: 3px; background: var(--accent-ink); border-radius: 2px; }
.brand-mark i:nth-child(1) { height: 7px; } .brand-mark i:nth-child(2) { height: 14px; } .brand-mark i:nth-child(3) { height: 10px; } .brand-mark i:nth-child(4) { height: 5px; }
.topnav { display: none; }
.search-trigger { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.search-trigger span, .search-trigger kbd { display: none; }
.search-trigger:hover { border-color: var(--line-2); box-shadow: var(--shadow); color: var(--ink); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-sm); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }

/* ---------- Tab-Leiste (mobil) */
.tabbar { position: fixed; inset: auto 0 0 0; z-index: 60; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 12px; font-size: .6875rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.tabbar .ico { width: 22px; height: 22px; }
.tabbar a.active { color: var(--accent); }
.tabbar a.active .ico { stroke-width: 2.1; }

/* ---------- Fußzeile */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0 calc(96px + env(safe-area-inset-bottom)); }
.footer-inner { display: grid; gap: 18px; }
.footer .brand { font-size: 1.25rem; }
.footer p { color: var(--muted); font-size: .875rem; margin-top: 8px; max-width: 42ch; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .9375rem; }
.footer-nav a { text-decoration: none; color: var(--ink-2); }
.footer-nav a:hover { color: var(--accent); }

/* ---------- Schaltflächen, Chips, Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: .9375rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; border-radius: 10px; }
.btn.wide { width: 100%; margin-top: 14px; }
.link-btn { color: var(--accent); font-weight: 600; font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.more-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }
.ext { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 600; text-decoration: none; }
.ext:hover { text-decoration: underline; }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .875rem; font-weight: 600; text-decoration: none; color: var(--ink-2); box-shadow: var(--shadow-sm); transition: border-color .15s, color .15s, transform .15s; }
.pill:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.seg-ctrl { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg-ctrl button { min-height: 34px; padding: 5px 12px; border-radius: 9px; font-size: .875rem; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.seg-ctrl button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { position: relative; padding: 10px 12px; font-weight: 600; font-size: .9375rem; color: var(--muted); white-space: nowrap; }
.tabs button[aria-pressed="true"] { color: var(--ink); }
.tabs button[aria-pressed="true"]::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.fchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.fchips::-webkit-scrollbar, .seg-ctrl::-webkit-scrollbar, .tabs::-webkit-scrollbar { display: none; }
.fchip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: .875rem; color: var(--ink-2); white-space: nowrap; transition: all .15s; }
.fchip span { font-weight: 600; font-size: .75rem; color: var(--muted); background: var(--surface-3); padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.fchip:hover { border-color: var(--faint); }
.fchip.zero:not([aria-pressed="true"]) { opacity: .5; }
.fchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.fchip[aria-pressed="true"] span { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }
.fchips.sub .fchip { min-height: 34px; font-size: .8125rem; }
.frow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.select { display: flex; flex-direction: column; gap: 5px; flex: 1 1 160px; min-width: 0; font-size: .75rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.select.grow { flex: 2 1 240px; }
.select select, .select input { width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: .9375rem; font-weight: 500; letter-spacing: 0; }
.select select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b95a4' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.select select:disabled { opacity: .55; }
.tag { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 600; }
.tag .ico { width: 14px; height: 14px; }

/* ---------- Suchfeld mit Vorschlägen */
.searchbox { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.searchbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), var(--shadow); }
.searchbox > .ico { color: var(--faint); width: 22px; height: 22px; }
.searchbox input { flex: 1; min-width: 0; min-height: 46px; border: 0; background: transparent; font-size: 1.0625rem; outline: none; }
.searchbox input::-webkit-search-cancel-button { cursor: pointer; }
.searchbox.plain { padding-right: 14px; }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 40; max-height: min(60vh, 460px); overflow: auto; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.opt-group + .opt-group { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.opt-label { font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 6px 10px 4px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; text-decoration: none; }
.opt > .ico { width: 20px; height: 20px; color: var(--muted); }
.opt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt-main b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-main small { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-badge { font-size: .6875rem; font-weight: 700; color: var(--muted); background: var(--surface-3); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.opt:hover, .opt[aria-selected="true"] { background: var(--accent-soft); }
.opt[aria-selected="true"] > .ico, .opt[aria-selected="true"] .opt-main b { color: var(--accent); }
.opt-empty { padding: 18px 12px; color: var(--muted); font-size: .9375rem; text-align: center; }

/* ---------- Palette */
.palette { padding: 0; border: 0; background: transparent; width: min(640px, 100% - 24px); max-width: none; max-height: none; margin: 10vh auto auto; color: var(--ink); overflow: visible; }
.palette::backdrop { background: rgb(8 12 18 / .5); backdrop-filter: blur(3px); }
.palette[open] .pal-box { animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.pal-box { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.pal-input { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.pal-input > .ico { width: 22px; height: 22px; color: var(--faint); }
.pal-input input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; outline: none; font-size: 1.125rem; }
.pal-list { max-height: min(56vh, 480px); overflow: auto; padding: 8px; }
.pal-foot { display: none; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: .75rem; color: var(--muted); }
.pal-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Karten und Abschnitte */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card.pad { padding: 18px; }
a.card { display: block; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--line-2); }
.block { margin-top: 40px; }
.narrow { max-width: 820px; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 16px; }
.sec-head h2 { font-size: 1.375rem; }
.sec-head p { color: var(--muted); font-size: .9375rem; margin-top: 4px; max-width: 60ch; }
.card .sec-head h2 { font-size: 1.125rem; }
.card .sec-head p { font-size: .875rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { font-size: 1.25rem; }
.card-head p { margin-top: 2px; font-size: .875rem; }
.h-small { display: flex; align-items: center; gap: 8px; font-size: .9375rem; margin-bottom: 12px; }
.h-small .ico { color: var(--accent); }
.h-mid { font-size: 1.5rem; }
.list-card { overflow: hidden; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: .8125rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .ico { width: 14px; height: 14px; color: var(--faint); }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 600; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(1.875rem, 5vw, 2.75rem); letter-spacing: -.03em; }
.page-head .lead { margin-top: 8px; }
.page-head.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lead { font-size: 1.0625rem; color: var(--muted); max-width: 62ch; }
.lead.small { font-size: .9375rem; }
.count { font-size: .875rem; color: var(--muted); margin: 14px 0 8px; }
.count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-foot { font-size: .8125rem; color: var(--muted); margin-top: 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: .8125rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg-scale { width: 48px; height: 10px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, var(--surface-3)), var(--accent)); }
.lg-thin { width: 12px; height: 12px; border-radius: 4px; background: repeating-linear-gradient(135deg, var(--surface-3) 0 3px, color-mix(in srgb, var(--accent) 35%, var(--surface-3)) 3px 5px); }
.lg-fill, .lg-open { width: 22px; height: 10px; border-radius: 4px; background: var(--accent); }
.lg-open { background: var(--surface-3); border: 1px dashed var(--line-2); }

/* ---------- Hinweise und Leerzustände */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--info-bg); color: var(--ink-2); font-size: .9375rem; margin: 10px 0; }
.note .ico { color: var(--accent); margin-top: 2px; }
.note.warn { background: var(--warn-bg); color: var(--warn); }
.note.warn .ico { color: var(--warn); }
.note-list { margin: 0; padding-left: 18px; font-size: .9375rem; color: var(--ink-2); }
.empty { text-align: center; padding: 48px 20px; max-width: 520px; margin: 0 auto; }
.empty-ico { width: 44px; height: 44px; margin: 0 auto 14px; padding: 10px; border-radius: 14px; background: var(--surface-3); color: var(--muted); }
.empty h3 { font-size: 1.25rem; margin-bottom: 8px; }
.empty p { color: var(--muted); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.pad-y { padding: 16px 0; }

/* ---------- Skelett und Ladeanzeige */
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--surface-3) 25%, color-mix(in srgb, var(--surface-3) 50%, var(--surface)) 50%, var(--surface-3) 75%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk-title { height: 44px; width: min(520px, 80%); margin: 24px 0 14px; }
.sk-line { height: 18px; width: min(380px, 60%); }
.sk-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 32px; }
.sk-card { height: 180px; border-radius: var(--radius); }
.sk-block { height: 300px; margin-top: 20px; border-radius: var(--radius); }
.sk-chip { display: inline-block; width: 110px; height: 26px; border-radius: 999px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Kennzeichen */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .01em; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge.k-bund, .badge.k-eu, .badge.k-land, .badge.k-kom, .badge.k-abs { background: color-mix(in srgb, var(--k) 13%, transparent); color: color-mix(in srgb, var(--k) 80%, var(--ink)); }
.k-bund { --k: var(--k-bund); } .k-eu { --k: var(--k-eu); } .k-land { --k: var(--k-land); } .k-kom { --k: var(--k-kom); } .k-abs { --k: var(--k-abs); }
.kdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--k, var(--faint)); flex-shrink: 0; }
.status { display: inline-flex; align-items: center; gap: 7px; font-size: .75rem; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.status i { width: 8px; height: 8px; border-radius: 50%; border: 2px solid currentColor; flex-shrink: 0; }
.status.s-final { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: var(--ok-bg); }
.status.s-final i { background: currentColor; }
.status.s-prelim { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.status.s-prelim i { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status.s-interim { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); background: var(--warn-bg); }
.chip-party { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; font-size: .875rem; }
.chip-party i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .12); flex-shrink: 0; }
.chip-party b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.chip-party small { color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; max-width: 10ch; }
.chip-party > span { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.delta { font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.delta.up::before { content: '▲ '; font-size: .625rem; vertical-align: .1em; }
.delta.down::before { content: '▼ '; font-size: .625rem; vertical-align: .1em; }
.delta.up, .delta.down { color: var(--ink-2); }
.countdown { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .8125rem; font-weight: 700; }
.warn-text { color: var(--warn); font-weight: 600; }

/* ---------- Diagramm-Bausteine */
.stack { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-3); }
.stack .seg { width: var(--w); min-width: 2px; background: var(--c); position: relative; display: flex; align-items: center; overflow: hidden; transform-origin: left; animation: grow-x .7s var(--ease) both; }
.stack .seg:first-child { border-radius: 7px 0 0 7px; }
.stack .seg-rest { background: repeating-linear-gradient(135deg, var(--surface-3) 0 4px, var(--line-2) 4px 6px); }
.stack .seg em { font-style: normal; font-size: .75rem; font-weight: 700; color: #fff; padding: 0 8px; white-space: nowrap; text-shadow: 0 1px 2px rgb(0 0 0 / .35); overflow: hidden; text-overflow: ellipsis; }
.stack-xs { height: 8px; border-radius: 4px; }
.stack-sm { height: 10px; border-radius: 5px; margin: 12px 0; }
.stack-md { height: 16px; border-radius: 8px; margin: 14px 0 6px; }
.stack-lg { height: 30px; border-radius: 10px; margin: 4px 0 16px; }
.stack-lg .seg:first-child { border-radius: 10px 0 0 10px; }
.stack-xl { height: 52px; border-radius: 14px; margin: 8px 0 18px; }
.stack-xl .seg em { font-size: .9375rem; }
.stack .seg.c1 { background: var(--accent); } .stack .seg.c2 { background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); } .stack .seg.c3 { background: var(--line-2); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.sw.c1 { background: var(--accent); } .sw.c2 { background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); } .sw.c3 { background: var(--line-2); }
@keyframes grow-x { from { transform: scaleX(0); } }
.ring { flex-shrink: 0; }
.ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 7; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: var(--dash) var(--full); animation: ring-in 1s var(--ease) both; }
@keyframes ring-in { from { stroke-dasharray: 0 var(--full); } }

/* ---------- Tooltip und Toast */
.tip { position: fixed; top: 0; left: 0; z-index: 300; pointer-events: none; max-width: 300px; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: .8125rem; line-height: 1.45; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.tip b { font-size: .875rem; }
.tip span { opacity: .85; }
.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 300; display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .9375rem; box-shadow: var(--shadow-lg); transform: translate(-50%, 20px); opacity: 0; transition: transform .25s var(--ease), opacity .25s; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ico { color: var(--ok); }

/* ================================================================ Startseite */
.hero { padding: 28px 0 8px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8125rem; font-weight: 700; margin-bottom: 18px; }
.kicker .ico { width: 16px; height: 16px; }
.hero h1 { font-size: clamp(2.25rem, 7vw, 4.25rem); letter-spacing: -.04em; line-height: 1.02; }
.hero h1 span { color: var(--accent); display: block; }
.hero .lead { margin: 16px 0 24px; font-size: 1.125rem; }
.hero .searchbox { max-width: 720px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 32px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0; }
.kpi > .ico { width: 22px; height: 22px; color: var(--accent); margin-bottom: 8px; }
.kpi strong { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.kpi strong small { font-size: .9375rem; color: var(--muted); font-weight: 600; }
.kpi span { font-size: .8125rem; color: var(--muted); }
.home .kpis .kpi:last-child { grid-column: 1 / -1; }
.feature-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.feature { padding: 18px; display: flex !important; flex-direction: column; }
.f-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.feature h3 { font-size: 1.25rem; }
.f-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: .8125rem; margin: 6px 0 14px; }
.f-meta .ico { width: 15px; height: 15px; }
.mini-rank { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 7px; }
.mini-rank li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 62px; align-items: center; gap: 8px; font-size: .9375rem; }
.mini-rank i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }
.mini-rank span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-rank b { font-variant-numeric: tabular-nums; }
.mini-rank .delta { text-align: right; }
.f-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.f-foot > span { display: inline-flex; align-items: center; gap: 8px; }
.f-foot b { color: var(--ink); }
.go { color: var(--accent); font-weight: 700; }
.go .ico { width: 16px; height: 16px; transition: transform .2s var(--ease); }
a.card:hover .go .ico { transform: translateX(3px); }
.runoff-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.runoff { padding: 16px; }
.ro-head { display: flex; flex-direction: column; margin-bottom: 12px; }
.ro-head strong { font-size: 1.125rem; }
.ro-head span { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.duel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 8px; }
.cand { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; min-width: 0; }
.cand i { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.cand .cn { font-weight: 700; font-size: .9375rem; line-height: 1.25; overflow-wrap: anywhere; }
.cand small { color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand b { font-size: 1.125rem; font-variant-numeric: tabular-nums; margin-top: 4px; }
.vs { align-self: center; font-size: .75rem; font-weight: 700; color: var(--faint); text-transform: uppercase; }
.ro-foot { margin-top: 12px; font-size: .8125rem; color: var(--muted); }
.major-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mcard { padding: 16px; }
.m-head { display: flex; align-items: center; gap: 8px; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.m-head time { margin-left: auto; font-weight: 600; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.m-title { display: block; font-size: 1.0625rem; margin-top: 8px; line-height: 1.25; letter-spacing: -.01em; }
.m-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .8125rem; }
.m-note { display: flex; gap: 6px; align-items: center; margin-top: 10px; font-size: .75rem; color: var(--warn); }
.m-note .ico { width: 14px; height: 14px; }
.two-col { display: grid; gap: 14px; align-items: start; grid-template-columns: minmax(0, 1fr); }
.heat { display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.heat-row { display: grid; grid-template-columns: 36px repeat(12, minmax(0, 1fr)); gap: 4px; align-items: center; }
.heat-head span { text-align: center; font-size: .6875rem; font-weight: 700; color: var(--faint); }
.heat-head b { font-weight: 700; display: none; }
.heat-year { font-size: .75rem; font-weight: 700; color: var(--muted); }
.hc { position: relative; aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; text-decoration: none; background: color-mix(in srgb, var(--accent) calc(var(--i) * 100%), var(--surface-3)); color: var(--ink-2); font-size: .5625rem; font-weight: 700; transition: transform .15s, box-shadow .15s; }
.hc.hc-hi { color: #fff; }
.hc span { display: none; }
.hc-off { background: transparent; border: 1px dashed var(--line); }
.hc-zero { background: var(--surface-3); }
.hc:hover, .hc:focus-visible { transform: scale(1.12); box-shadow: 0 4px 12px rgb(0 0 0 / .18); z-index: 2; }
.hc-dot { position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--k-abs); box-shadow: 0 0 0 1.5px var(--surface); }
.hc-dot.static { position: static; display: inline-block; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(6, auto); gap: 5px; max-width: 320px; margin: 0 auto; }
.tile { aspect-ratio: 1.3; border-radius: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; text-decoration: none; background: color-mix(in srgb, var(--accent) calc(var(--i) * 100%), var(--surface-3)); color: var(--ink); transition: transform .15s var(--ease), box-shadow .15s; }
.tile b { font-size: 1rem; letter-spacing: .02em; }
.tile span { font-size: .6875rem; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .9; }
.tile.tile-hi { color: #fff; }
[data-theme="dark"] .hc.hc-hi, [data-theme="dark"] .tile.tile-hi { color: var(--accent-ink); }
.tile-thin { background: repeating-linear-gradient(135deg, var(--surface-3) 0 5px, color-mix(in srgb, var(--accent) 30%, var(--surface-3)) 5px 8px); }
.tile-empty { background: var(--surface-2); border: 1.5px dashed var(--line-2); color: var(--faint); }
a.tile:hover, .tile:focus-visible { transform: scale(1.06); box-shadow: 0 6px 18px rgb(0 0 0 / .18); position: relative; z-index: 2; }
.lrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 20px; grid-template-areas: 'date main go' 'date lead go'; align-items: center; gap: 2px 12px; padding: 12px 16px; text-decoration: none; border-top: 1px solid var(--line); transition: background .15s; }
.lrow:first-child { border-top: 0; }
.lrow:hover { background: var(--surface-2); }
.l-date { grid-area: date; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-3); font-size: .6875rem; font-weight: 700; color: var(--muted); text-transform: uppercase; line-height: 1; gap: 2px; }
.l-date b { font-size: 1.0625rem; color: var(--ink); }
.l-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; }
.l-main b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-main small { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-lead { grid-area: lead; min-width: 0; }
.l-bar { display: none; }
.l-go { grid-area: go; color: var(--faint); width: 18px; height: 18px; }
.trust { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.trust-item, .principles > div { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.trust-item > .ico { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.trust-item h3 { font-size: 1rem; margin-bottom: 4px; }
.trust-item p { font-size: .875rem; color: var(--muted); }
.trust-item a { color: var(--accent); font-weight: 600; }
.principles { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }

/* ================================================================ Suche */
.search-sticky { position: sticky; top: calc(var(--topbar) + 8px); z-index: 20; margin-bottom: 14px; }
.search-sticky .searchbox .btn { display: none; }
.filters { display: flex; flex-direction: column; gap: 6px; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.erows { display: flex; flex-direction: column; }
.month-head { position: sticky; top: calc(var(--topbar) + 76px); z-index: 5; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 18px 0 8px; background: linear-gradient(var(--bg) 70%, transparent); }
.erow { display: grid; grid-template-columns: 50px minmax(0, 1fr) 18px; grid-template-areas: 'date main go' 'date lead go'; align-items: center; gap: 4px 14px; padding: 12px 14px; margin-bottom: 8px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s var(--ease); }
.erow:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.list-card .erow { border-radius: 0; margin: 0; border: 0; border-top: 1px solid var(--line); }
.list-card .erow:first-child { border-top: 0; }
.list-card .erow:hover { transform: none; box-shadow: none; background: var(--surface-2); }
.e-date { grid-area: date; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 54px; border-radius: 12px; background: var(--surface-3); font-size: .6875rem; font-weight: 700; text-transform: uppercase; color: var(--muted); line-height: 1.05; }
.e-date b { font-size: 1.125rem; color: var(--ink); }
.e-date small { font-size: .625rem; font-weight: 600; color: var(--faint); }
.e-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.e-main b { font-size: 1rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.e-main small { display: flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--muted); min-width: 0; }
.e-main small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: block; }
.e-main small .kdot { margin-right: 6px; vertical-align: 1px; }
.e-lead { grid-area: lead; min-width: 0; }
.e-lead:empty { display: none; }
.e-go { grid-area: go; color: var(--faint); width: 18px; height: 18px; transition: transform .15s; }
.erow:hover .e-go { transform: translateX(2px); color: var(--accent); }

/* ================================================================ Ergebnis */
.res-head { margin-bottom: 18px; }
.res-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .8125rem; color: var(--muted); margin-bottom: 12px; }
.res-meta > span:not(.badge):not(.status) { display: inline-flex; align-items: center; gap: 6px; }
.res-meta .ico { width: 15px; height: 15px; }
.res-head h1 { font-size: clamp(1.875rem, 5.5vw, 3rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
.res-sub { font-size: 1.0625rem; color: var(--muted); margin-top: 6px; }
.res-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }
.area-btn { display: inline-flex; align-items: center; gap: 12px; padding: 8px 12px 8px 14px; min-height: 52px; max-width: 100%; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-sm); text-align: left; transition: border-color .15s, box-shadow .15s; }
.area-btn:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.area-btn > .ico:first-child { color: var(--accent); }
.area-btn span { display: flex; flex-direction: column; min-width: 0; }
.area-btn b { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-btn small { font-size: .75rem; color: var(--muted); }
.area-btn > .ico:last-child { color: var(--muted); }
.area-static { display: inline-flex; align-items: center; gap: 8px; font-size: .9375rem; }
.area-static .ico { color: var(--accent); }
.res-actions { display: flex; gap: 8px; }
.kpis.kpis-res { margin: 0 0 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.kpis.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-ring { flex-direction: row; align-items: center; gap: 12px; }
.kpi-ring > div { display: flex; flex-direction: column; min-width: 0; }
.kpi-ring strong { white-space: nowrap; }
@media (max-width: 639px) { .kpi-ring { gap: 10px; } .kpi-ring .ring { width: 40px; height: 40px; } .kpi strong { font-size: 1.3125rem; } }
.kpi-lead { padding-left: 20px; overflow: hidden; }
.kpi-lead::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.kpi-bar { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.kpi-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.res-grid { display: grid; gap: 16px; margin-bottom: 16px; grid-template-columns: minmax(0, 1fr); }
.res-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.chart-card { min-width: 0; }
.facts { margin: 0; display: grid; gap: 0; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .875rem; }
.facts > div:first-child { border-top: 0; padding-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.side-links { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .9375rem; }
.side-links a:not(.ext) { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; color: var(--ink-2); }
.side-links a:not(.ext):hover { color: var(--accent); }
.side-links .ico { color: var(--muted); width: 18px; height: 18px; }
.side-note { display: flex; gap: 6px; align-items: flex-start; margin-top: 14px; font-size: .75rem; color: var(--faint); }
.side-note .ico { width: 14px; height: 14px; margin-top: 1px; color: var(--ok); }
.banner { display: flex; gap: 14px; padding: 18px; margin-bottom: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.banner-ico .ico { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.banner-body { flex: 1; min-width: 0; }
.banner-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.banner h2 { font-size: 1.375rem; }
.banner-text { font-size: .9375rem; color: var(--ink-2); margin-top: 8px; overflow-wrap: anywhere; }
.banner-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; }
.banner-links:empty { display: none; }
.banner-runoff { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); }
.duel-lg { margin-top: 14px; max-width: 560px; }
.duel-lg .cand { background: var(--surface); }
.duel-lg .cn { font-size: 1.0625rem; }
.banner-elected .banner-ico .ico { background: var(--ok-bg); color: var(--ok); }
.banner-elected .banner-kicker { color: var(--ok); }
.elected-name { position: relative; display: inline; padding-left: 4px; box-shadow: inset 4px 0 0 var(--c); }
.elected-name small { font-size: .9375rem; color: var(--muted); font-weight: 600; }
.banner-question blockquote { margin: 6px 0 0; font: 600 1.125rem/1.45 var(--serif); color: var(--ink); }
.chart-lead { font-size: .9375rem; color: var(--muted); margin-bottom: 14px; }
.legend-line { display: flex; gap: 16px; font-size: .75rem; color: var(--muted); margin: -6px 0 12px; }
.legend-line span { display: inline-flex; align-items: center; gap: 6px; }
.lg-bar { width: 16px; height: 8px; border-radius: 3px; background: var(--ink-2); }
.lg-prev { width: 3px; height: 14px; border-radius: 2px; background: var(--ink); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(78px, 26%) minmax(0, 1fr) auto; grid-template-areas: 'label track val' 'label track delta'; align-items: center; column-gap: 12px; min-height: 44px; padding: 4px 0; }
.bars:not(:has(.delta)) .bar-row { grid-template-areas: 'label track val'; }
.b-label { grid-area: label; display: flex; align-items: center; gap: 8px; min-width: 0; }
.b-label i { width: 10px; height: 22px; border-radius: 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); flex-shrink: 0; }
.b-label > span { display: flex; flex-direction: column; min-width: 0; }
.b-label b { font-size: .9375rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-label small { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-track { grid-area: track; position: relative; height: 18px; border-radius: 6px; background: var(--surface-3); }
.b-fill { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: 6px; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); transform-origin: left; animation: grow-x .8s var(--ease) both; animation-delay: var(--d); }
.b-prev { position: absolute; top: -4px; bottom: -4px; left: var(--p); width: 3px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 0 1.5px var(--surface); }
.has-threshold .b-track::after { content: ''; position: absolute; top: -3px; bottom: -3px; left: var(--t); border-left: 1.5px dashed var(--faint); }
.b-val { grid-area: val; display: flex; flex-direction: column; align-items: flex-end; min-width: 72px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.b-val b { font-size: 1.0625rem; font-weight: 700; }
.b-val b small { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.b-val > small { font-size: .75rem; color: var(--muted); }
.bar-row .delta { grid-area: delta; text-align: right; }
.div-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.div-bars li { display: grid; grid-template-columns: minmax(80px, 24%) minmax(0, 1fr) 64px; align-items: center; gap: 12px; min-height: 34px; }
.dv-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9375rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dv-name i { width: 10px; height: 18px; border-radius: 4px; background: var(--c); flex-shrink: 0; }
.dv-track { position: relative; height: 20px; }
.dv-track::before { content: ''; position: absolute; left: 50%; top: -6px; bottom: -6px; border-left: 1.5px solid var(--line-2); }
.dv-bar { position: absolute; top: 0; bottom: 0; width: var(--v); background: var(--c); animation: grow-x .7s var(--ease) both; animation-delay: var(--d); }
.pos .dv-bar { left: 50%; border-radius: 0 6px 6px 0; transform-origin: left; }
.neg .dv-bar { right: 50%; border-radius: 6px 0 0 6px; transform-origin: right; opacity: .8; }
.dv-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.seats { position: relative; max-width: 460px; margin: 0 auto; }
.hemi { width: 100%; height: auto; overflow: visible; }
.hemi circle { animation: dot-in .4s var(--ease) both; animation-delay: var(--d); transform-box: fill-box; transform-origin: center; }
@keyframes dot-in { from { opacity: 0; transform: scale(.2); } }
.seat-total { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.seat-total strong { font-size: 2rem; letter-spacing: -.02em; }
.seat-total span { font-size: .8125rem; color: var(--muted); }
.seat-legend { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; }
.seat-legend li { display: flex; align-items: center; gap: 8px; font-size: .9375rem; min-width: 0; }
.seat-legend i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.seat-legend span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-legend b { font-variant-numeric: tabular-nums; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.ref { padding: 16px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px solid var(--line); border-top: 4px solid var(--c); display: flex; flex-direction: column; }
.ref span { font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: .8125rem; letter-spacing: .06em; }
.ref strong { font-size: 2rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ref small { color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.num-table { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.num-table th, .num-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.num-table thead th { padding: 0; border-bottom: 1px solid var(--line-2); font-size: .75rem; font-weight: 700; color: var(--muted); letter-spacing: .03em; white-space: nowrap; }
.num-table thead th button { display: inline-flex; align-items: center; gap: 4px; padding: 10px; width: 100%; font-weight: 700; color: inherit; }
.num-table thead th.r button { justify-content: flex-end; }
.num-table thead th .ico { width: 14px; height: 14px; opacity: .35; }
.num-table thead th[aria-sort="ascending"] .ico, .num-table thead th[aria-sort="descending"] .ico { opacity: 1; color: var(--accent); }
.num-table tbody th { font-weight: 600; }
.num-table .r { text-align: right; }
.num-table td.r { white-space: nowrap; }
.num-table tbody tr:hover { background: var(--surface-2); }
.t-name { display: flex; align-items: flex-start; gap: 8px; }
.t-name i { width: 10px; height: 10px; margin-top: 6px; border-radius: 3px; background: var(--c); flex-shrink: 0; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .1); }
.t-name small { color: var(--muted); font-weight: 500; }
.t-full { display: block; font-size: .75rem; }
.t-details { margin: 6px 0 0 18px; font-weight: 400; }
.t-details summary { cursor: pointer; font-size: .8125rem; color: var(--accent); font-weight: 600; list-style-position: inside; }
.t-details ol { margin: 8px 0 0; padding-left: 20px; font-size: .8125rem; color: var(--ink-2); }
.t-details li { display: grid; grid-template-columns: minmax(0, 1fr) auto 60px; gap: 10px; padding: 2px 0; }
.t-details li b { font-weight: 600; } .t-details li small { color: var(--muted); text-align: right; }
.delta-cell.up::before { content: '▲ '; font-size: .625rem; } .delta-cell.down::before { content: '▼ '; font-size: .625rem; }
.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.totals > div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; font-size: .8125rem; color: var(--muted); }
.totals b { font-size: 1.125rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.acc { border-top: 1px solid var(--line); }
.acc:last-child { border-bottom: 1px solid var(--line); }
.card .acc:last-child { border-bottom: 0; }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 0; cursor: pointer; font-weight: 700; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary .ico { color: var(--muted); transition: transform .2s; }
.acc[open] summary .ico { transform: rotate(180deg); }
.acc > p, .acc > ul, .acc > table { margin: 0 0 16px; color: var(--ink-2); }
.acc.small summary { min-height: 40px; font-size: .875rem; font-weight: 600; color: var(--muted); }
.mini-table { width: 100%; border-collapse: collapse; font-size: .875rem; font-variant-numeric: tabular-nums; }
.mini-table th, .mini-table td { padding: 8px 6px; border-top: 1px solid var(--line); text-align: left; }
.mini-table td { text-align: right; white-space: nowrap; }
.ex-controls { display: flex; flex-direction: column; gap: 4px; }
.ex-loading { display: flex; align-items: center; gap: 10px; padding: 24px 0; color: var(--muted); }
.ex-head { display: none; }
.arows { list-style: none; margin: 0; padding: 0; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'name turn' 'val val'; gap: 6px 12px; align-items: center; padding: 11px 10px; border-radius: 12px; text-decoration: none; transition: background .15s; }
.arows li + li .arow { border-top: 1px solid var(--line); border-radius: 0; }
.arow:hover { background: var(--surface-2); border-radius: 12px; }
.arow.current { background: var(--accent-soft); border-radius: 12px; }
.a-name { grid-area: name; display: flex; align-items: center; gap: 10px; min-width: 0; }
.a-name em { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--muted); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-3); display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.a-name > span { display: flex; flex-direction: column; min-width: 0; }
.a-name b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-name small { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-val { grid-area: val; min-width: 0; }
.a-share { display: grid; grid-template-columns: minmax(0, 1fr) 64px; align-items: center; gap: 10px; }
.a-sbar { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--c) var(--w), var(--surface-3) var(--w)); }
.a-share b { text-align: right; font-variant-numeric: tabular-nums; }
.a-turn { grid-area: turn; font-size: .875rem; font-variant-numeric: tabular-nums; color: var(--muted); }

/* ================================================================ Quellen, Archiv, Tabelle */
.source-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.source-card h3 { font-size: 1.0625rem; margin: 10px 0 12px; }
.sc-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: .75rem; }
.sc-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: .9375rem; }
.sc-links a:not(.ext) { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.sc-links .ico { width: 16px; height: 16px; }
.source-card .acc { margin-top: 12px; }
.hash { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .75rem; overflow-wrap: anywhere; color: var(--muted); }
.file-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.file-card { display: flex; flex-direction: column; padding: 16px; gap: 14px; }
.fc-main { display: flex; gap: 14px; text-decoration: none; min-width: 0; }
.fc-main:hover b { color: var(--accent); }
.fc-type { flex-shrink: 0; width: 48px; height: 56px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: .6875rem; font-weight: 800; letter-spacing: .04em; clip-path: polygon(0 0, 72% 0, 100% 20%, 100% 100%, 0 100%); }
.fc-body { display: flex; flex-direction: column; min-width: 0; }
.fc-body b { font-weight: 700; line-height: 1.3; }
.fc-body small { color: var(--muted); font-size: .8125rem; }
.fc-file { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .6875rem !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-stats { display: flex; gap: 16px; font-size: .8125rem; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--line); }
.fc-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.fc-actions { display: flex; gap: 8px; }
.t-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.pager { display: flex; gap: 6px; }
.raw-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); overscroll-behavior-x: contain; }
.raw-table { border-collapse: separate; border-spacing: 0; font-size: .8125rem; min-width: 100%; font-variant-numeric: tabular-nums; }
.raw-table th, .raw-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 12px; min-width: 150px; max-width: 360px; white-space: pre-wrap; overflow-wrap: anywhere; vertical-align: top; }
.raw-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-3); font-weight: 700; color: var(--muted); }
.raw-table tbody th { position: sticky; left: 0; z-index: 1; min-width: 56px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.raw-table thead th:first-child { left: 0; z-index: 3; min-width: 56px; }
.raw-table tbody tr:hover td { background: var(--surface-2); }
.doc-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.doc-list a { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 600; text-decoration: none; }
.doc-list .ico { width: 18px; height: 18px; }

/* ================================================================ Datenbestand */
.dash-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.timeline { padding: 8px 0 0; }
.tl-track { position: relative; height: 18px; border-radius: 9px; background: repeating-linear-gradient(90deg, var(--surface-3) 0 6px, transparent 6px 8px); border: 1px dashed var(--line-2); }
.tl-fill { position: absolute; top: -1px; bottom: -1px; border-radius: 9px; background: var(--accent); min-width: 10px; animation: grow-x .9s var(--ease) both; transform-origin: right; }
.tl-axis { position: relative; height: 22px; margin-top: 6px; font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-axis span { position: absolute; transform: translateX(-50%); }
.tl-axis span:first-child { transform: none; }
.tl-now { color: var(--accent); font-weight: 700; transform: translateX(-100%) !important; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; align-items: center; gap: 12px; font-size: .875rem; }
.hbars b { text-align: right; font-variant-numeric: tabular-nums; }
.hb-track { height: 12px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.hb-fill { display: block; height: 100%; width: var(--w); background: var(--k); border-radius: 6px; transform-origin: left; animation: grow-x .8s var(--ease) both; }
.big-stat { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.big-stat > div { display: flex; flex-direction: column; }
.big-stat strong { font-size: 2rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.big-stat span { color: var(--muted); font-size: .875rem; }
.stat-list { list-style: none; margin: 0; padding: 0; }
.stat-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .875rem; }
.stat-list b { font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.steps li { position: relative; padding-left: 44px; display: flex; flex-direction: column; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .875rem; }
.steps span { color: var(--muted); font-size: .875rem; }
.error-list { max-height: 280px; overflow: auto; padding-left: 18px; font-size: .875rem; }
.error-list li { padding: 3px 0; }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.25rem; margin: 24px 0 8px; }
.prose h2:first-child, .prose .note + h2 { margin-top: 8px; }
.prose p { color: var(--ink-2); line-height: 1.7; }

/* Auf dem Handy: lange Kartenreihen wischen statt scrollen. */
@media (max-width: 639px) {
  .major-grid, .runoff-grid { grid-auto-flow: column; grid-auto-columns: 84%; grid-template-columns: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 10px; scroll-padding-inline: var(--gutter); }
  .major-grid::-webkit-scrollbar, .runoff-grid::-webkit-scrollbar { display: none; }
  .major-grid > *, .runoff-grid > * { scroll-snap-align: start; }
  .swipe-hint { display: flex; }
}
.swipe-hint { display: none; align-items: center; gap: 6px; font-size: .75rem; color: var(--faint); margin-top: 2px; }
.swipe-hint .ico { width: 14px; height: 14px; }


/* ---------- Aktualität, Jahre, Sitze, Rechtsseiten */
.fresh { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-size: .8125rem; color: var(--muted); }
.fresh .ico { width: 15px; height: 15px; color: var(--ok); }
.years { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; align-items: end; height: 150px; padding-top: 8px; }
.yr { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; text-decoration: none; min-width: 0; }
.yr-bar { width: 100%; height: var(--h); min-height: 2px; border-radius: 4px 4px 1px 1px; background: var(--accent); transform-origin: bottom; animation: grow-y .7s var(--ease) both; transition: filter .15s; }
.yr-empty .yr-bar { background: var(--surface-3); border: 1px dashed var(--line-2); }
.yr:hover .yr-bar, .yr:focus-visible .yr-bar { filter: brightness(1.15); }
.yr-label { margin-top: 5px; font-size: .625rem; font-weight: 700; color: var(--faint); font-variant-numeric: tabular-nums; }
@keyframes grow-y { from { transform: scaleY(0); } }
@media (max-width: 639px) { .yr-label { font-size: .5rem; } .yr:nth-child(odd) .yr-label { visibility: hidden; } }
.f-seats { margin: -2px 0 12px; font-size: .75rem; font-weight: 600; color: var(--muted); }
.f-seats .stack-sm { margin: 5px 0 0; }
.seat-majority { text-align: center; font-size: .8125rem; color: var(--muted); margin-top: 6px; }
.seat-legend span small { display: block; font-size: .75rem; color: var(--muted); }
.legal-page .topbar-inner { justify-content: space-between; }
.legal-page .footer { padding-bottom: 32px; }
.legal-back { margin-left: auto; }
.prose a { color: var(--accent); }
.history-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ================================================================ Breitere Ansichten */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .card.pad { padding: 22px; }
  .table-wrap { margin: 0 -22px; padding: 0 22px; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .home .kpis .kpi:last-child { grid-column: auto; }
  .kpi strong { font-size: 1.75rem; }
  .runoff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust, .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .heat-head b { display: inline; }
  .hc span { display: block; }
  .hc { aspect-ratio: 1.25; font-size: .625rem; }
  .erow { grid-template-columns: 54px minmax(0, 1fr) minmax(0, 240px) 18px; grid-template-areas: 'date main lead go'; padding: 12px 16px; }
  .e-lead { justify-self: end; }
  .lrow { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 220px) 18px; grid-template-areas: 'date main lead go'; }
  .l-lead { justify-self: end; }
  .arow { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 90px; grid-template-areas: 'name val turn'; }
  .ex-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 90px; gap: 12px; padding: 8px 10px; font-size: .75rem; font-weight: 700; color: var(--muted); letter-spacing: .03em; border-bottom: 1px solid var(--line-2); }
  .ex-head .r, .a-turn { text-align: right; }
  .pal-foot { display: flex; }
  .toast { bottom: 28px; }
  .kpis.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .search-trigger span { display: inline; }
  .search-trigger { min-width: 200px; }
  .banner { padding: 22px; gap: 18px; }
}
@media (min-width: 900px) {
  .topnav { display: flex; gap: 2px; margin-left: 24px; }
  .topnav a { padding: 8px 12px; border-radius: 10px; font-size: .9375rem; font-weight: 600; color: var(--muted); text-decoration: none; transition: color .15s, background .15s; }
  .topnav a:hover { color: var(--ink); background: var(--surface-3); }
  .topnav a.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 7px 11px; }
  .search-trigger kbd { display: inline-block; margin-left: auto; }
  .search-trigger { min-width: 260px; }
  .tabbar { display: none; }
  .footer { padding-bottom: 32px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
  .page { padding-top: 28px; }
  .hero { padding: 56px 0 8px; text-align: center; display: flex; flex-direction: column; align-items: center; }
  .hero .lead { margin-inline: auto; }
  .hero .searchbox { width: 100%; }
  .quick { justify-content: center; }
  .feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .runoff-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .two-col { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
  .res-grid { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  .res-side { position: sticky; top: calc(var(--topbar) + 16px); }
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lrow { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 220px) 160px 18px; grid-template-areas: 'date main lead bar go'; }
  .l-bar { display: block; grid-area: bar; }
  .bar-row { grid-template-columns: minmax(110px, 22%) minmax(0, 1fr) 92px 64px; grid-template-areas: 'label track val delta'; }
  .bars:not(:has(.delta)) .bar-row { grid-template-columns: minmax(110px, 22%) minmax(0, 1fr) 92px; grid-template-areas: 'label track val'; }
  .bar-row .delta { align-self: center; }
  .hbars li { grid-template-columns: 150px minmax(0, 1fr) 72px; }
}
@media (min-width: 1100px) {
  .dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid > .card:nth-child(2) { grid-row: span 2; }
  .dash-grid > .card.wide { grid-column: 1 / -1; }
  .dash-grid > .card.wide .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ================================================================ Wahlabend */
.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--live); flex-shrink: 0; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--live); opacity: .55; animation: pulse-ring 1.8s var(--ease) infinite; }
@keyframes pulse-ring { 0% { transform: scale(.55); opacity: .7; } 70% { transform: scale(1.35); opacity: 0; } 100% { opacity: 0; } }
.badge.b-live { background: var(--live-bg); color: var(--live); text-decoration: none; }
.badge.b-final { background: var(--ok-bg); color: var(--ok); }
.badge.b-soon { background: var(--accent-soft); color: var(--accent); }
.badge.b-soft { background: var(--surface-3); color: var(--muted); }
.badge.b-live .ico, .badge.b-final .ico { width: 13px; height: 13px; }
a.badge.b-live:hover { text-decoration: underline; text-underline-offset: 3px; }

.stand { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: .875rem; color: var(--muted); }
.stand b { color: var(--ink-2); font-weight: 600; }
.nav-live[hidden], .tab-live[hidden], .pill-live[hidden] { display: none; }
.nav-live { display: inline-flex; align-items: center; gap: 7px; }
.nav-live .ico { width: 15px; height: 15px; }
.tabbar.has-live { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tab-live { color: var(--live) !important; }
.tab-live .ico { color: var(--live); }
.tab-live .pulse { width: 11px; height: 11px; margin: 6px 0 5px; }
.pill-live { border-color: color-mix(in srgb, var(--live) 40%, var(--line)); color: var(--live); gap: 8px; }
.pill-live .ico { width: 15px; height: 15px; }

.live-head .kicker.live-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--live); }
.live-page .page-head { margin-bottom: 8px; }
.live-kpis { margin-top: 18px; }
.live-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.live-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.live-card.is-final { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.lc-head { display: flex; flex-direction: column; }
.lc-head strong { font-size: 1.0625rem; }
.lc-head span { color: var(--muted); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-elected { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9375rem; color: var(--ok); }
.lc-elected .ico { width: 16px; height: 16px; flex-shrink: 0; }
.lc-rows { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .875rem; }
.lc-row { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.lc-row i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.lc-row b { font-variant-numeric: tabular-nums; }
.lc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: .8125rem; color: var(--muted); margin-top: auto; }
.lc-count { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.lc-bar { display: inline-block; width: 60px; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.lc-bar b { display: block; height: 100%; background: var(--accent); }
.lc-stamp { font-size: .75rem; color: var(--faint); }
.live-how { margin-top: 24px; }

.upcoming { margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ================================================================ Bewegung, Druck */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .tabbar, .footer, .res-actions, .area-btn > .ico:last-child, .search-sticky, .tabs, .seg-ctrl, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .res-grid { display: block; }
  .b-fill, .seg, .kpi-lead::before { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
