/* ============ Wahlspiegel – ruhiges Daten-Dashboard ============
   Weiße Karten auf hellgrauem Grund, Franklin für Text und Zahlen, Farbe nur für Daten (Parteifarben) und Links. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f2f3f5;      /* zarte Hinterlegung (Durchschnittszeile, Hover) */
  --surface-3: #e6e8eb;      /* Balken-Spuren */
  --text: #121212;
  --text-2: #363636;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --rule: #e1e4e8;           /* Haarlinie */
  --rule-strong: #121212;    /* Rubrik-Linie */
  --border: var(--rule);
  --accent: #1d5a96;         /* Links */
  --accent-2: #15467a;
  --on-accent: #ffffff;
  --live: #c4161c;
  --up: #2e6f4e;
  --down: #b3261e;
  --ok-bg: #f1f6f3;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;
  --mono: var(--sans);       /* Zahlen: Franklin mit Tabellenziffern */
  /* Parteifarben (statische Seiten; das Dashboard setzt Farben per JS) */
  --p-union: #1d1d1b; --p-afd: #009ee0; --p-spd: #e3000f; --p-gruene: #1aa037; --p-linke: #be3075;
  --p-bsw: #7d254f; --p-fdp: #ffcc00; --p-sonst: #9ca3af; --p-fw: #f29400; --p-ssw: #003c8f; --p-biw: #1e3a8a;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1012; --surface: #16191c; --surface-2: #1d2024; --surface-3: #2a2e33; --text: #ececec; --text-2: #cfcfcf;
    --muted: #a3a3a3; --faint: #737373; --rule: #2c3036; --rule-strong: #ececec; --accent: #8db8e8; --accent-2: #b3d0f0;
    --on-accent: #121212; --live: #ff5a5f; --up: #6fcf97; --down: #ff8a80; --ok-bg: #18241d; color-scheme: dark;
    --p-union: #b8b8b8; --p-bsw: #c0628f; --p-ssw: #5b8fd9; --p-biw: #7c93d6;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1012; --surface: #16191c; --surface-2: #1d2024; --surface-3: #2a2e33; --text: #ececec; --text-2: #cfcfcf;
  --muted: #a3a3a3; --faint: #737373; --rule: #2c3036; --rule-strong: #ececec; --accent: #8db8e8; --accent-2: #b3d0f0;
  --on-accent: #121212; --live: #ff5a5f; --up: #6fcf97; --down: #ff8a80; --ok-bg: #18241d; color-scheme: dark;
  --p-union: #b8b8b8; --p-bsw: #c0628f; --p-ssw: #5b8fd9; --p-biw: #7c93d6;
}

/* ============ Basis ============ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* sonst gewinnt z. B. display:grid gegen das hidden-Attribut */
html { scroll-padding-top: 116px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 var(--sans); font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 .35em; letter-spacing: -.005em; color: var(--text); }
h1 { font-size: 2.6rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
.muted { color: var(--muted); font-weight: 400; }
.mono, .k-val, .bar-val, .poll-table td, .mini b, output, .el-date b, .coal-meta b { font-family: var(--sans); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 99; background: var(--bg); padding: 8px 12px; border: 1px solid var(--rule); }

/* ============ App-Leiste (Dashboard-Kopf) ============ */
.site-header {
  position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px) saturate(160%);
}
.appbar { display: flex; align-items: center; gap: 28px; height: 62px; }
/* Logo: Kachel mit Balken und Spiegelung („Wahlspiegel“) */
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand:hover { color: var(--text); }
.logo { width: 32px; height: 32px; border-radius: 8px; background: var(--text); display: grid; place-items: center; flex-shrink: 0; }
.logo svg { display: block; }
.logo .b0 { fill: var(--surface); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b { font: 800 1.08rem var(--sans); letter-spacing: -.02em; }
.brand-text small { font: 500 .68rem var(--sans); color: var(--muted); letter-spacing: .01em; margin-top: 2px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 8px; color: var(--muted);
  text-decoration: none; white-space: nowrap; font-size: .84rem; font-weight: 600;
}
.tabs a svg { flex-shrink: 0; opacity: .85; }
.tabs a:hover { color: var(--text); background: var(--surface-2); }
.tabs a[aria-selected="true"], .tabs a[aria-current="page"] { color: var(--surface); background: var(--text); }
.tabs a[aria-selected="true"] svg, .tabs a[aria-current="page"] svg { opacity: 1; }
.tabs .sm { display: none; }

/* Reiter mit Aufklappmenü (Landtagswahlen) */
.nav-dd { position: relative; }
.nav-dd-trigger .chev { opacity: .7; margin-left: -2px; transition: transform .15s; }
.nav-dd-panel {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; width: 420px; padding: 8px;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s;
}
.nav-dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* Hover-Brücke */
.nav-dd:hover .nav-dd-panel, .nav-dd:focus-within .nav-dd-panel { opacity: 1; visibility: visible; transform: none; }
.nav-dd:hover .chev, .nav-dd:focus-within .chev { transform: rotate(180deg); }
.nav-dd-panel a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-decoration: none; color: var(--text); border-radius: 7px; }
.nav-dd-panel a:hover, .nav-dd-panel a:focus-visible { background: var(--surface-2); outline: none; }
.nav-dd-all { padding: 9px 10px; font-weight: 700; font-size: .84rem; margin-bottom: 4px; border-bottom: 1px solid var(--rule); border-radius: 7px 7px 0 0 !important; }
.nav-dd-panel ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 6px; }
.nav-dd-panel li a { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 10px; font-size: .84rem; font-weight: 600; line-height: 1.3; }
.nav-dd-panel small { font-size: .7rem; font-weight: 500; color: var(--muted); }
@media (min-width: 601px) { .appbar .tabs { overflow: visible; } }   /* Menü darf über die Leiste hinausragen */
@media (max-width: 1360px) { .status span { display: none; } }        /* Platz für sechs Reiter */
@media (max-width: 1240px) and (min-width: 601px) {
  .tabs a > svg:not(.chev) { display: none; }
  .tabs a { padding: 7px 10px; }
}
@media (max-width: 1100px) and (min-width: 601px) {
  .tabs .lg { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabs a .sm { display: inline; }
  .brand-text small { display: none; }
}
@media (max-width: 960px) {   /* Reiter in eigene Zeile */
  .appbar { flex-wrap: wrap; height: auto; gap: 8px 12px; padding: 10px 0 8px; }
  .appbar .tabs { order: 3; flex-basis: 100%; }
}
@media (max-width: 600px) { .nav-dd-panel, .nav-dd-trigger .chev { display: none; } }  /* Handy: direkt zur Übersicht */

.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.status {
  display: inline-flex; align-items: center; gap: 7px; font-size: .74rem; color: var(--muted); white-space: nowrap;
  border: 1px solid var(--rule); border-radius: 999px; padding: 5px 11px 5px 10px; background: var(--surface);
}
.foot-about .status { border: 0; padding: 0; background: transparent; }
.status b { color: var(--text); font-weight: 600; }

/* Kennzahlen-Leiste unter der Navigation */
.pulse { border-top: 1px solid var(--rule); }
.pulse-inner { display: flex; align-items: center; gap: 4px; height: 40px; overflow-x: auto; scrollbar-width: none; }
.pulse-inner::-webkit-scrollbar { display: none; }
.pulse-label { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); white-space: nowrap; margin-right: 8px; }
.pulse-item {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  font-size: .78rem; color: var(--text-2); text-decoration: none;
}
a.pulse-item:hover { background: var(--surface-2); color: var(--text); }
.pulse-item i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.pulse-item b { color: var(--text); font-weight: 700; }
.pulse-item small { font-size: .68rem; font-weight: 600; }
.pulse-sep { width: 1px; height: 16px; background: var(--rule); margin: 0 6px; flex-shrink: 0; }
.pulse-more { margin-left: auto; padding-left: 12px; font-size: .74rem; font-weight: 600; white-space: nowrap; color: var(--muted); text-decoration: none; }
.pulse-more:hover { color: var(--text); }
@media (max-width: 1360px) { .pulse-more { display: none; } }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 22%, transparent); }
.theme-btn {
  display: inline-grid; place-items: center; border: 1px solid var(--rule); background: transparent; color: var(--text);
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; flex-shrink: 0;
}
.theme-btn:hover { border-color: var(--text); }

/* ============ Layout ============ */
main { padding: 28px 24px 48px; }
main.wrap { padding-top: 36px; padding-bottom: 48px; }   /* .wrap würde sonst den Abstand nach oben auf 0 setzen */
main.wrap.article { padding-top: 32px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.aside { position: sticky; top: 118px; display: grid; gap: 28px; border-left: 1px solid var(--rule); padding-left: 28px; }
.panel { display: none; }
.panel.active { display: block; }

.panel-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head { margin-bottom: 20px; }
.page-head h1, .page-head h2 { font-size: 2.6rem; margin-bottom: 10px; }
.lead, .deck { font-family: var(--serif); font-size: 1.2rem; line-height: 1.45; color: var(--text-2); max-width: 760px; margin: 0; }
.byline { font-size: .78rem; color: var(--muted); margin: 12px 0 0; }
.byline b { color: var(--text); font-weight: 600; }
.section-title { font-size: 2rem; }
.eyebrow, .label {
  font-family: var(--sans); text-transform: uppercase; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  color: var(--text); margin: 0 0 8px;
}
.eyebrow { color: var(--live); }

/* Reiter (Ansicht, Quelle …) */
.seg { display: inline-flex; gap: 18px; border-bottom: 1px solid var(--rule); }
.seg button {
  border: 0; background: transparent; color: var(--muted); padding: 6px 0 7px; cursor: pointer; white-space: nowrap;
  font: 600 .82rem var(--sans); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--text); border-bottom-color: var(--rule-strong); }
.seg.small { gap: 14px; }
.seg.small button { font-size: .76rem; }

/* Filter-Chips */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 2px;
  border: 1px solid var(--rule); background: transparent; color: var(--text);
  font: 500 .76rem var(--sans); cursor: pointer;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip[aria-pressed="true"] { border-color: var(--text-2); }
.chip[aria-pressed="false"] { color: var(--faint); text-decoration: line-through; }
.chip:hover { border-color: var(--text); }

/* ============ Rubriken statt Kästen ============ */
.card { background: transparent; border: 0; border-top: 1px solid var(--rule); border-radius: 0; box-shadow: none; padding: 16px 0 4px; margin-bottom: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head h2 { font-size: 1.35rem; }
.card-head .label { margin: 4px 0 0; }
.info {
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--rule); background: transparent;
  color: var(--muted); display: grid; place-items: center; cursor: help; flex-shrink: 0; position: relative;
  font: italic 600 .72rem var(--serif); padding: 0;
}
.info[data-tip]:hover::after, .info[data-tip]:focus::after {
  content: attr(data-tip); position: absolute; right: 0; top: 26px; width: 250px; z-index: 5;
  background: var(--text); color: var(--bg); font: 400 .76rem/1.45 var(--sans); padding: 9px 11px; text-align: left;
}
.legend-note, .caption { font-size: .76rem; color: var(--muted); line-height: 1.45; }
.caption { margin: 8px 0 0; }

/* Grafik-Bereich: Rubrik-Linie oben, Quelle unten */
.viz { position: relative; border-top: 2px solid var(--rule-strong); padding: 12px 0 8px; margin-bottom: 8px; }
.viz > .info { position: absolute; top: 12px; right: 0; }
.viz-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 32px 6px 0; }
.viz-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .72rem; color: var(--muted); align-items: center; }
.viz-legend i { display: inline-block; width: 14px; height: 0; border-top: 2px dashed var(--muted); vertical-align: middle; margin-right: 5px; }
.viz-legend i.solid { border-top: 8px solid var(--text-2); width: 10px; }
.viz-source { font-size: .72rem; color: var(--muted); margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--rule); }
.viz-source a { color: var(--muted); }

/* Säulendiagramm Sonntagsfrage */
.columns { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; height: 280px; margin-top: 30px; padding-right: 40px; border-bottom: 1px solid var(--text); }
.col-labels { padding-right: 40px; }
.columns .guide { position: absolute; left: 0; right: 0; border-top: 1px solid var(--rule); pointer-events: none; }
.columns .guide.hurdle { border-top: 1px dashed var(--down); }
.columns .guide span { position: absolute; right: 0; top: -8px; width: 36px; text-align: right; font: 500 .66rem/1.2 var(--sans); color: var(--faint); }
.columns .guide.hurdle span { color: var(--down); }
.col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; z-index: 1; }
.col .bar { width: 100%; max-width: 54px; border-radius: 1px 1px 0 0; transition: height .5s cubic-bezier(.2,.8,.2,1); position: relative; }
.col .v { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; font: 700 .95rem var(--sans); white-space: nowrap; color: var(--text); }
.col .btw { position: absolute; left: 50%; transform: translateX(-50%); width: min(100%, 70px); border-top: 2px dotted var(--text); opacity: .7; }
.col-labels { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; margin-top: 8px; text-align: center; }
.col-labels b { display: block; font-size: .78rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-labels span { font: 500 .72rem var(--sans); }
.up { color: var(--up); } .down { color: var(--down); }
.dots { display: none; }

/* Balkenliste */
.bars { display: grid; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name val" "track track"; gap: 4px 10px; align-items: baseline; }
.bar-name { grid-area: name; font-size: .86rem; font-weight: 500; }
.bar-name a { text-decoration: none; }
.bar-val { grid-area: val; font-weight: 700; font-size: .86rem; white-space: nowrap; text-align: right; }
.bar-track { grid-area: track; height: 6px; background: var(--surface-3); position: relative; overflow: hidden; }
.bar-fill { height: 100%; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.bar-track .hurdle { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--surface); }
.bar-track .tick { position: absolute; top: -1px; bottom: -1px; width: 0; border-left: 2px solid var(--text); }
.delta { font-size: .72rem; font-weight: 500; margin-left: 6px; }

/* ============ Seitenleiste ============ */
.kpi-card { margin: 0; padding: 10px 0 0; border-top: 2px solid var(--rule-strong); }
.kpi-card .card-head { margin-bottom: 4px; }
.big { font: 700 2.3rem/1.05 var(--sans); letter-spacing: -.02em; margin: 4px 0 6px; }
.big small { font-size: .45em; font-weight: 600; letter-spacing: 0; }
.spark { width: 100%; height: 56px; display: block; margin-top: 10px; }
.spark-axis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--muted); }
.hemi-mini { display: block; width: 100%; max-width: 250px; margin: 8px auto 10px; }
.hemi-mini .c-num { font: 700 26px var(--sans); fill: var(--text); }
.hemi-mini .c-sub { font: 500 9.5px var(--sans); fill: var(--muted); }
.hemi-mini .maj { stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; }
.hemi-mini .maj-bg { stroke: var(--surface); stroke-width: 6; stroke-linecap: round; }
.seat-legend { grid-template-columns: 1fr 1fr; gap: 5px 20px; }
.seat-out { margin: 10px 0 0; }
.seat-coal { margin: 10px 0 4px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: .82rem; line-height: 1.45; }
.seat-coal .muted { color: var(--muted); }
.seat-link { font-size: .78rem; font-weight: 600; color: var(--text-2); }
.seat-link:hover { color: var(--text); }
.legend-list { display: grid; gap: 5px; font-size: .82rem; }
.legend-list div { display: flex; align-items: center; gap: 8px; }
.legend-list i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-list b { margin-left: auto; font: 700 .82rem var(--sans); }

/* Schlagzeilen (News) */
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: 6px; vertical-align: 1px; }
.news-card .label { color: var(--live); }
.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { border-top: 1px solid var(--rule); }
.news-list li:first-child { border-top: 0; }
.news-list a { display: block; padding: 10px 0; color: var(--text); text-decoration: none; }
.news-list a:hover .news-title { text-decoration: underline; text-decoration-thickness: 1px; }
.news-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .68rem; color: var(--muted); margin-bottom: 3px; }
.news-meta b { font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.news-title { display: block; font-family: var(--serif); font-size: 1rem; font-weight: 600; line-height: 1.3; }
/* Laufschrift */
.news-viewport {
  height: 525px; overflow: hidden; position: relative; outline: none; border-radius: 6px;
  -webkit-mask-image: linear-gradient(transparent, #000 8%, #000 90%, transparent);
          mask-image: linear-gradient(transparent, #000 8%, #000 90%, transparent);
}
.news-viewport:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.news-scroll { animation: ticker var(--dur, 70s) linear infinite; }
.news-scroll li:first-child { border-top: 1px solid var(--rule); }
.news-viewport:hover .news-scroll, .news-viewport:focus-within .news-scroll { animation-play-state: paused; }
@keyframes ticker { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .news-scroll { animation: none; }
  .news-scroll li.dup { display: none; }
  .news-viewport { overflow-y: auto; -webkit-mask-image: none; mask-image: none; }
}
.news-more { display: block; width: 100%; margin-top: 6px; padding: 8px 0; border: 0; border-top: 1px solid var(--rule); background: transparent; color: var(--text); font: 600 .76rem var(--sans); cursor: pointer; text-align: left; }
.news-more:hover { text-decoration: underline; }

/* Institutskarten (Liste mit Linien) */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 28px; }
.inst-card { margin: 0; padding: 14px 0 16px; border-top: 1px solid var(--rule); }
.inst-card header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; gap: 8px; }
.inst-card h3 { margin: 0; font-size: 1.05rem; }
.inst-card h3 a { color: inherit; text-decoration: none; }
.inst-card h3 a:hover { text-decoration: underline; }
.inst-card time { font-size: .72rem; color: var(--muted); }
.stack { display: flex; height: 6px; overflow: hidden; margin-bottom: 10px; gap: 1px; }
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 4px; }
.mini div { text-align: left; }
.mini span { display: block; font-size: .66rem; color: var(--muted); font-weight: 500; }
.mini b { font-size: .95rem; font-weight: 700; }
.inst-card.off { opacity: .45; }
.inst-via { margin: 2px 0 0; font-size: .72rem; color: var(--muted); }
.inst-off { margin: -4px 0 8px; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Mehrheits-Wahrscheinlichkeit */
.aside:has(.fc-card) { position: static; }   /* Ticker + Karte sind höher als viele Bildschirme → nicht festkleben */
.fc-sub { margin: -2px 0 10px; }
.fc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.fc-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name p" "bar bar"; gap: 3px 10px; align-items: baseline; }
.fc-name { grid-area: name; display: flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 600; min-width: 0; }
.fc-dots { display: inline-flex; flex-shrink: 0; }
.fc-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--surface); margin-left: -3px; }
.fc-dots i:first-child { margin-left: 0; }
.fc-p { grid-area: p; font-size: .9rem; font-weight: 700; }
.fc-bar { grid-area: bar; height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.fc-bar span { display: block; height: 100%; background: var(--text); border-radius: 3px; }
.fc-excl { opacity: .5; }
.fc-excl .fc-bar span { background: var(--muted); }
.fc-h { margin: 14px 0 8px; padding-top: 10px; border-top: 1px solid var(--rule); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.fc-hurdle .fc-bar span { background: var(--muted); }

/* Prognosemärkte (Polymarket-Widgets, 400 px breit gebaut und auf die Spaltenbreite skaliert) */
.pm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pm-item { border-top: 1px solid var(--rule); padding-top: 10px; }
.pm-item:first-child { border-top: 0; padding-top: 0; }
.pm-q { margin: 0 0 6px; font-size: .74rem; font-weight: 600; line-height: 1.35; color: var(--text-2); }
.pm-yes { white-space: nowrap; font-weight: 800; color: var(--text); }
.pm-embed { --pm-s: .75; position: relative; min-width: 0; height: calc(320px * var(--pm-s)); overflow: hidden; border-radius: 8px; }
.pm-frame { position: absolute; top: 0; left: 0; display: block; width: 400px; height: 320px; border: 0; transform: scale(var(--pm-s)); transform-origin: 0 0; }

/* Spannweite der Institute (Landingpage Umfragen) */
.range-list { display: grid; gap: 10px; }
.range-row { display: grid; grid-template-columns: 96px 1fr 76px; gap: 12px; align-items: center; font-size: .86rem; }
.range-name { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.range-name i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.range-track { position: relative; height: 14px; background: var(--surface-2); border-radius: 7px; }
.range-band { position: absolute; top: 2px; bottom: 2px; border-radius: 5px; opacity: .55; min-width: 4px; }
.range-avg { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 2px solid var(--text); transform: translateX(-1px); }
.range-hurdle { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--down); }
.range-val { text-align: right; font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) { .range-row { grid-template-columns: 74px 1fr 64px; gap: 8px; font-size: .8rem; } }


/* Erklärseiten „Wahlsysteme“ */
.toc { padding: 14px 20px; }
.toc ol { margin: 6px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; font-size: .9rem; }
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.ws-section { scroll-margin-top: 120px; }
.ws-section h2 { font-size: 1.25rem; margin: 0 0 10px; }
.ws-section .table-wrap { margin: 12px 0; }
.compare-table td:first-child { color: var(--muted); font-weight: 600; width: 22%; }
.quotient-table td { text-align: right; }
.quotient-table td.won, .ws-section .src-table td.won { background: var(--ok-bg); font-weight: 700; color: var(--text); }
.quotient-table small { color: var(--up); font-weight: 700; }
.link-cards .label { margin: 0; color: var(--muted); }
.seat-calc { display: grid; gap: 12px; margin: 12px 0 4px; }
.seat-inputs { display: grid; gap: 6px; }
.seat-row { display: grid; grid-template-columns: 1fr 140px; gap: 6px; }
.seat-calc input {
  font: 500 .9rem var(--sans); color: var(--text); background: var(--surface); border: 1px solid var(--rule);
  border-radius: 6px; padding: 7px 10px; width: 100%; font-variant-numeric: tabular-nums;
}
.seat-calc input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.seat-n { display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600; }
.seat-n input { width: 100px; }
@media (max-width: 600px) { .toc ol { columns: 1; } .seat-row { grid-template-columns: 1fr 110px; } }

/* Kennzahlen „Auf einen Blick“ (vor Wahlwissen) */
.kpi-section { margin-top: 40px; }
.kpi-section > h2 { margin-bottom: 14px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kpi-grid .kpi-card { margin: 0; }
@media (max-width: 600px) { .kpi-grid { grid-template-columns: 1fr; } }

/* Abschnitt „Die einzelnen Umfragen“ */
.sub-section { margin-top: 36px; }
.sub-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.sub-head h2 { margin: 0 0 4px; }
.sub-lead { margin: 0; color: var(--text-2); font-size: .92rem; max-width: 620px; }
.filter-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.label-link { color: var(--accent); text-decoration: none; }
.label-link:hover { text-decoration: underline; }

/* Tabellen */
.table-wrap { overflow-x: auto; padding: 0; }
.poll-table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .82rem; }
.poll-table th, .poll-table td { white-space: nowrap; padding: 9px 7px; text-align: right; border-bottom: 1px solid var(--rule); }
.poll-table th:first-child, .poll-table td:first-child { text-align: left; padding-left: 0; font-weight: 600; }
.poll-table thead th { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--text); border-bottom: 2px solid var(--rule-strong); }
.poll-table thead th i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.poll-table tr.avg-row td { background: var(--surface-2); font-weight: 700; }
.poll-table tr.dim td { opacity: .35; }
.poll-table td.max { font-weight: 700; }

/* Trend */
.chart-box { height: 420px; }

/* Koalitionsrechner */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 8px; }
.calc-grid > * { margin-bottom: 0; }
.slider-row { display: grid; grid-template-columns: 82px 1fr 64px; gap: 12px; align-items: center; padding: 4px 0; }
.slider-row label { font-weight: 600; font-size: .86rem; display: flex; align-items: center; gap: 7px; }
.slider-row label i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.slider-row output { font-weight: 700; text-align: right; font-size: .86rem; }
.slider-row output small { display: block; font: 500 .64rem var(--sans); color: var(--down); }
.slider-row.out label, .slider-row.out output { opacity: .5; }
input[type=range] { width: 100%; accent-color: var(--c, var(--text)); height: 22px; }
.sum-line { font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
.sum-line.warn { color: var(--down); font-weight: 600; }
#hemicycle { width: 100%; height: auto; display: block; color: var(--text); }
.seat-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin-top: 8px; font-size: .8rem; }
.seat-legend span { display: inline-flex; align-items: center; gap: 6px; }
.seat-legend b { font-weight: 700; }
.seat-legend i { width: 8px; height: 8px; border-radius: 50%; }
.coal-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 28px; }
.coal { border-top: 1px solid var(--rule); padding: 12px 0 14px; }
.coal.maj .coal-name::after { content: " ✓"; color: var(--up); }
.coal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.coal-name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.coal-badge { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
.coal.maj .coal-badge { color: var(--up); }
.coal-bar { position: relative; height: 6px; background: var(--surface-3); margin: 10px 0 6px; display: flex; overflow: hidden; }
.coal-bar .mid { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px solid var(--text); }
.coal-meta { font-size: .76rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.coal-meta b { color: var(--text); font-weight: 700; }
.coal-note { font-size: .72rem; color: var(--muted); font-style: italic; font-family: var(--serif); }

/* Wahltermine */
.grid-elections { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 28px; }
.el { margin: 0; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--rule); padding: 14px 0 18px; }
.el-top { display: flex; gap: 14px; align-items: flex-start; }
.el-date { flex-shrink: 0; width: 54px; text-align: center; border-right: 1px solid var(--rule); padding-right: 12px; }
.el-date b { display: block; font: 700 1.6rem/1 var(--serif); }
.el-date span { font-size: .64rem; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.el-date.approx b { font-size: .95rem; padding: 4px 0; }
.el h3 { margin: 0; font-size: 1.1rem; }
.el h3 a { color: inherit; text-decoration: none; }
.el h3 a:hover { text-decoration: underline; }
.el-type { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.el-count { font-size: .76rem; font-weight: 600; color: var(--text-2); }
.el-last { font-size: .76rem; color: var(--muted); }
.el-res { display: flex; height: 6px; overflow: hidden; margin: 6px 0 5px; gap: 1px; }
.el-res-legend { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: .72rem; }
.el-res-legend span { display: inline-flex; align-items: center; gap: 4px; }
.el-res-legend i { width: 7px; height: 7px; border-radius: 50%; }
.el.next { border-top: 2px solid var(--live); }
.el.next .el-count { color: var(--live); }

/* FAQ */
.faq { margin-top: 44px; border-top: 2px solid var(--rule-strong); padding-top: 14px; }
.faq > h2 { font-size: 1.6rem; }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 28px; }
details { border-top: 1px solid var(--rule); padding: 12px 0; }
summary { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; cursor: pointer; }
details p { font-family: var(--serif); color: var(--text-2); margin: 8px 0 0; font-size: 1rem; line-height: 1.6; }

/* ============ Statische Unterseiten ============ */
.article { max-width: 920px; padding-top: 24px; }
.main-col.article { max-width: none; padding-top: 0; }   /* Unterseite mit Seitenleiste */
.article > h1 { font-size: 2.6rem; }
.article > h2, .more h2, .faq-block h2 { margin-top: 36px; font-size: 1.6rem; }
.article > .lead { margin-bottom: 22px; }
.crumbs { font-size: .74rem; color: var(--muted); margin-bottom: 18px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin: 0 4px; }
.crumbs [aria-current] { margin: 0; color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 28px; border-top: 2px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.kpi { padding: 12px 16px 14px; border-left: 1px solid var(--rule); }
.kpi:first-child { border-left: 0; padding-left: 0; }
.kpi .k-label { font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.kpi .k-val { font-size: 1.3rem; font-weight: 700; margin-top: 4px; }
.prose p, .prose li { font-family: var(--serif); font-size: 1.06rem; line-height: 1.65; color: var(--text-2); max-width: 720px; }
.small { font-size: .78rem; margin: 14px 0 0; }
.chart-static { padding: 12px 0; border-top: 2px solid var(--rule-strong); }
.chart-static svg { width: 100%; height: auto; display: block; font: 11px var(--sans); }
.chart-static text { fill: var(--muted); }
.chart-static .g { stroke: var(--rule); }
.chart-static .h { stroke: var(--down); stroke-dasharray: 5 5; opacity: .7; }
.chart-static polyline { fill: none; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.party-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; font-weight: 500; margin-top: 10px; }
.party-legend span { display: inline-flex; align-items: center; gap: 6px; }
.party-legend i { width: 8px; height: 8px; border-radius: 50%; }
.link-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; }
.link-cards.big { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 28px; margin-bottom: 24px; }
.link-card { display: flex; flex-direction: column; gap: 5px; padding: 12px 0 14px; text-decoration: none; color: var(--text); border-top: 1px solid var(--rule); }
.link-card b { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.link-card:hover b { text-decoration: underline; }
.link-card span { font-size: .76rem; color: var(--muted); }
.link-card .stack { margin: 4px 0 0; }
.link-card.accent { border-top: 2px solid var(--p-afd); }
.faq-block .faq-grid { margin-top: 8px; }

/* Rechtliches & Quellen */
.legal h2 { font-size: 1.2rem; margin: 22px 0 6px; }
.legal h2:first-child { margin-top: 0; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal li { margin-bottom: 6px; }
.src-table { min-width: 0; margin: 10px 0 14px; font-size: .84rem; }
.src-table td, .src-table th { text-align: left; white-space: normal; }
mark.todo { background: #fde68a; color: #78350f; padding: 1px 5px; font-weight: 600; }

/* Fußzeile (Dashboard) */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--rule); padding: 32px 0 20px; font-size: .78rem; color: var(--muted); margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.1fr 3fr; gap: 40px; padding-bottom: 24px; }
.foot-about .brand { margin-bottom: 10px; }
.foot-about p { margin: 0 0 12px; line-height: 1.55; max-width: 300px; }
.foot-about .status { white-space: normal; }
.link-hub { display: grid; grid-template-columns: .7fr 1.3fr 1.2fr 1fr; gap: 28px; }
.link-hub ul.one { grid-template-columns: 1fr; }
.dot-p { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.link-hub h4 { font-family: var(--sans); margin: 0 0 10px; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); }
.link-hub h4 a { color: var(--text); text-decoration: none; }
.link-hub ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 5px 14px; }
.link-hub li a { color: var(--text-2); text-decoration: none; }
.link-hub li a:hover { color: var(--text); text-decoration: underline; }
.foot-bottom { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--rule); }
.foot-bottom p { margin: 0; }
.site-footer a { color: var(--text-2); }

/* ============ Dashboard-Ebene: Karten, serifenlose Überschriften ============ */
h1, h2, h3, h4 { font-family: var(--sans); letter-spacing: -.02em; hyphens: auto; overflow-wrap: break-word; }
h1, .page-head h1, .page-head h2, .article > h1 { font-size: 2.1rem; }
h2, .faq > h2, .article > h2, .more h2, .faq-block h2 { font-size: 1.35rem; }
.lead, .deck { font-family: var(--sans); font-size: 1.05rem; line-height: 1.55; }
.eyebrow { color: var(--muted); }
.site-header { background: color-mix(in srgb, var(--surface) 94%, transparent); }

/* Karten */
.card, .viz, .kpi-card, .inst-card, .el, .chart-static, details {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.card { padding: 18px 20px; margin-bottom: 16px; }
.viz { padding: 16px 20px 14px; margin-bottom: 16px; }
.viz > .info { top: 14px; right: 16px; }
.kpi-card { padding: 16px 18px; border-top: 1px solid var(--rule); }
.aside { border-left: 0; padding-left: 0; gap: 14px; }
.layout { gap: 24px; }
.grid-cards, .grid-elections, .link-cards, .link-cards.big { gap: 12px; }
.inst-card, .el { margin: 0; }
.inst-card { padding: 14px 16px; border-top: 1px solid var(--rule); }
.el { padding: 16px 18px; border-top: 1px solid var(--rule); }
.el.next { border: 1px solid var(--live); box-shadow: inset 3px 0 0 var(--live); }
.el-date b, .coal-name, summary, .news-title, .link-card b { font-family: var(--sans); }
.coal-list { gap: 10px; }
.coal { background: var(--surface-2); border: 0; border-radius: 8px; padding: 12px 14px; }
.coal.maj { background: var(--ok-bg); }
.faq { border-top: 0; padding-top: 0; }
.faq-grid { gap: 10px; }
details { padding: 13px 16px; }
details p, .prose p, .prose li { font-family: var(--sans); font-size: .95rem; }
.chart-static { padding: 16px 18px; }
.link-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; }
.link-card:hover { border-color: var(--text-2); }
.link-card.accent { border-color: var(--p-afd); }
.stat-grid { border: 0; gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; }
.kpi:first-child { padding-left: 16px; border-left: 1px solid var(--rule); }
.table-wrap.card { padding: 4px 20px; }
.chip { border-radius: 6px; background: var(--surface); }
.seg { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; padding: 3px; gap: 2px; }
.seg button { padding: 5px 12px; border-radius: 6px; border-bottom: 0; margin: 0; }
.seg button.on { background: var(--text); color: var(--surface); }
.site-footer { background: var(--surface); }
.news-card .label { color: var(--text); }

/* ============ Responsiv ============ */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; border-left: 0; padding-left: 0; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
}
@media (max-width: 860px) {
  .calc-grid, .faq-grid, .link-hub, .foot-grid { grid-template-columns: 1fr; }
  .foot-grid { gap: 24px; }
  .status span { display: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(3) { border-left: 0; padding-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .chart-box { height: 340px; }
  .coal-list { grid-template-columns: 1fr; }
  h1, .page-head h1, .page-head h2, .article > h1 { font-size: 2rem; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  main { padding: 18px 16px 32px; }
  main.wrap, main.wrap.article { padding-top: 22px; padding-bottom: 32px; }
  .site-header { position: relative; }
  html { scroll-padding-top: 0; }
  .appbar { flex-wrap: wrap; height: auto; gap: 8px 12px; padding: 10px 0 8px; }
  .brand-text small { display: none; }
  .logo { width: 28px; height: 28px; }
  .tabs a svg { display: none; }
  .pulse-more { display: none; }
  .appbar .tabs { order: 3; flex-basis: 100%; }
  .appbar .status { display: none; }
  .tabs a { padding: 6px 9px; font-size: .78rem; }
  .tabs .lg { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabs a .sm { display: inline; }
  .lead, .deck { font-size: 1.05rem; }
  .columns, .col-labels { gap: 5px; padding-right: 28px; }
  .columns { height: 220px; }
  .col .v { font-size: .72rem; }
  .columns .guide span { font-size: .58rem; width: 26px; }
  .col-labels b { font-size: .66rem; }
  .col-labels span { font-size: .62rem; }
  .grid-elections, .grid-cards { grid-template-columns: 1fr; }
  .slider-row { grid-template-columns: 70px 1fr 58px; gap: 8px; }
  .poll-table th:first-child, .poll-table td:first-child { position: sticky; left: 0; background: var(--surface); }
}
@media (prefers-reduced-motion: reduce) {
  .col .bar, .bar-fill { transition: none; }
}
