/* =========================================================================
   Politkompass – Styles (nur Dark Mode)
   ========================================================================= */
:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --sep: rgba(84, 84, 88, .55);
  --text: #f5f5f7;
  --text-2: rgba(235, 235, 245, .64);
  --text-3: rgba(235, 235, 245, .34);
  --accent: #0a84ff;
  --green: #30d158;
  --red: #ff453a;
  --orange: #ff9f0a;
  --radius: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 17px; line-height: 1.47; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  min-height: 100vh; display: flex; flex-direction: column;
}
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.022em; }
h1 { font-size: clamp(1.6rem, 3.6vw, 2.1rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .8em; }
::selection { background: rgba(10, 132, 255, .45); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 20px; }
main.container { padding-top: 28px; padding-bottom: 56px; flex: 1; outline: none; }
.muted { color: var(--text-2); }
.small { font-size: .82rem; }
.center { text-align: center; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(22, 22, 23, .78);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--sep);
}
.topbar-inner { max-width: 920px; margin: 0 auto; padding: 0 20px; height: 52px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 0; font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.brand-mark { position: relative; width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid var(--text); }
.brand-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 2px; height: 10px; background: var(--accent); border-radius: 2px; transform: translate(-50%, -50%) rotate(40deg); }
.mainnav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav button { background: none; border: 0; padding: 6px 10px; color: var(--text-2); font-size: .82rem; white-space: nowrap; transition: color .2s; }
.mainnav button:hover, .mainnav button.active { color: var(--text); }

.segmented, .country-switch { display: flex; background: rgba(118, 118, 128, .24); border-radius: 9px; padding: 2px; flex-shrink: 0; }
.country-switch button { border: 0; background: none; padding: 3px 12px; border-radius: 7px; font-size: .78rem; font-weight: 600; color: var(--text-2); transition: background .2s, color .2s; }
.country-switch button.active { background: #636366; color: var(--text); box-shadow: 0 2px 6px rgba(0,0,0,.25); }

@media (max-width: 720px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 4px; row-gap: 2px; }
  .country-switch { margin-left: auto; }
  .mainnav { order: 3; width: 100%; margin-left: -10px; }
}

/* ---------- Grundbausteine ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 28px; margin-bottom: 20px; }
@media (max-width: 560px) { .card { padding: 20px; border-radius: 14px; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--accent);
  font-size: .94rem; font-weight: 500; text-decoration: none; transition: background .2s, opacity .2s;
}
.btn:hover { background: var(--surface-3); }
.btn:disabled { opacity: .35; cursor: default; background: var(--surface-2); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #2a95ff; }
.btn.plain { background: none; padding-left: 8px; padding-right: 8px; }
.btn.plain:hover { opacity: .75; }
.btn.big { padding: 13px 28px; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font-size: inherit; text-align: left; }
.linklike:hover { text-decoration: underline; }
.linklike.quiet { color: var(--text-2); font-size: .94rem; }
.linklike.quiet:hover { color: var(--text); text-decoration: none; }
.icon-btn { display: grid; place-items: center; background: var(--surface-3); border: 0; width: 24px; height: 24px; border-radius: 50%; color: var(--text-2); }
.icon-btn:hover { color: var(--text); }

.eyebrow { font-size: .82rem; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.eyebrow.warn { color: var(--orange); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: middle; flex-shrink: 0; }
.star { font-size: .75rem; color: var(--text-3); }

/* Gruppierte Listen (iOS-Stil) */
.section-title { font-size: 1.25rem; margin: 36px 4px 10px; }
.section-foot { font-size: .82rem; color: var(--text-2); margin: 8px 4px 0; }
.group { background: var(--surface); border-radius: 14px; overflow: hidden; }
.row { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 18px; min-height: 48px; text-align: left; background: none; border: 0; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 18px; right: 0; border-top: .5px solid var(--sep); }
.row-btn { cursor: pointer; transition: background .15s; }
.row-btn:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: 1rem; }
.row-title.link { color: var(--accent); }
.row-title.destructive { color: var(--red); }
.row-sub { font-size: .85rem; color: var(--text-2); line-height: 1.4; }
.row-num { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: .8rem; font-weight: 600; display: grid; place-items: center; flex-shrink: 0; align-self: flex-start; margin-top: 1px; }
.row-value { display: flex; align-items: center; color: var(--text-2); font-size: .95rem; white-space: nowrap; }
.row-value .num { color: var(--text); font-weight: 600; margin-left: 12px; font-variant-numeric: tabular-nums; }
.check { width: 18px; height: 18px; flex-shrink: 0; }
.checked .check::after { content: ""; display: block; width: 6px; height: 12px; margin: 0 auto; border: solid var(--accent); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg) translate(-1px, -1px); }
@media (max-width: 560px) {
  .row:has(.row-value) { flex-wrap: wrap; gap: 4px; }
  .row-value { width: 100%; }
}

/* ---------- Fortschritt ---------- */
.progress-wrap { margin: 0 0 14px; }
.progress { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); border-radius: 99px; transition: width .35s ease; }
.progress-wrap small { display: flex; justify-content: space-between; color: var(--text-2); font-size: .78rem; margin-top: 8px; }

/* ---------- Start ---------- */
.hero { text-align: center; padding: 48px 0 12px; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin-bottom: 18px; }
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 640px; line-height: 1.5; }
.hero .lead { margin: 0 auto 30px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-progress { max-width: 320px; margin: 26px auto 0; }
.facts { margin-top: 26px; font-size: .85rem; color: var(--text-3); }
.term-demo { text-decoration: underline dotted rgba(10, 132, 255, .9); text-underline-offset: 3px; }

/* ---------- Fragen ---------- */
.cat-strip { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 18px; scrollbar-width: none; }
.cat-strip::-webkit-scrollbar { display: none; }
.cat-chip { display: flex; align-items: baseline; gap: 6px; flex-shrink: 0; border: 0; background: var(--surface); color: var(--text-2); padding: 6px 13px; border-radius: 999px; font-size: .8rem; transition: background .2s, color .2s; }
.cat-chip:hover { color: var(--text); }
.cat-chip small { color: var(--text-3); font-size: .72rem; font-variant-numeric: tabular-nums; }
.cat-chip.complete small { color: var(--green); }
.cat-chip.active { background: var(--text); color: #000; font-weight: 500; }
.cat-chip.active small { color: rgba(0,0,0,.5); }

.qcard { padding: 36px 40px 28px; }
@media (max-width: 560px) { .qcard { padding: 24px 20px 20px; } }
.qmeta { display: flex; gap: 12px; margin-bottom: 10px; }
.qtext { font-size: clamp(1.45rem, 3.6vw, 2rem); font-weight: 600; letter-spacing: -.028em; line-height: 1.18; margin-bottom: 16px; }
.qinfo { color: rgba(235, 235, 245, .8); font-size: 1.02rem; margin-bottom: 22px; }
.procon { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 18px 0 4px; border-top: .5px solid var(--sep); margin-bottom: 24px; }
@media (max-width: 600px) { .procon { grid-template-columns: 1fr; gap: 14px; } }
.procon h3 { font-size: .78rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.procon p { margin: 0; font-size: .94rem; color: var(--text-2); }

.term { background: none; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; line-height: inherit; text-decoration: underline dotted rgba(10, 132, 255, .9); text-decoration-thickness: 1.5px; text-underline-offset: 3px; cursor: help; }
.term:hover { color: var(--accent); }

.answers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ans { border: 0; background: var(--surface-2); border-radius: 12px; padding: 15px 6px; font-size: .95rem; font-weight: 500; color: var(--text); transition: background .15s, transform .1s; }
.ans:hover { background: var(--surface-3); }
.ans:active { transform: scale(.97); }
.ans.selected { background: var(--accent); color: #fff; }
@media (max-width: 600px) {
  .answers { grid-template-columns: 1fr; gap: 0; background: var(--surface-2); border-radius: 12px; overflow: hidden; }
  .ans { border-radius: 0; text-align: left; padding: 14px 16px; position: relative; background: none; }
  .ans + .ans::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
  .ans.selected { background: none; color: var(--accent); font-weight: 600; }
  .ans.selected::after { content: ""; position: absolute; right: 20px; top: 50%; width: 6px; height: 12px; border: solid var(--accent); border-width: 0 2.2px 2.2px 0; transform: translateY(-65%) rotate(45deg); }
}
.answer-extra { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

/* iOS-Schalter */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: .94rem; color: var(--text-2); user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 44px; height: 26px; border-radius: 99px; background: rgba(120, 120, 128, .36); transition: background .25s; flex-shrink: 0; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.3); transition: transform .25s cubic-bezier(.3,.7,.4,1); }
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:checked ~ span:last-child { color: var(--text); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

.qnav { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- Begriff-Popover ---------- */
.term-pop { position: fixed; z-index: 50; width: min(340px, calc(100vw - 24px)); background: rgba(44, 44, 46, .92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.5); padding: 14px 16px 16px; }
.term-pop-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; font-size: .95rem; }
.term-pop p { margin: 0; font-size: .9rem; color: var(--text-2); line-height: 1.45; }
@media (max-width: 640px) { .term-pop { left: 10px !important; right: 10px; bottom: 10px; top: auto !important; width: auto; } }

/* ---------- Ergebnis ---------- */
.result-hero { padding: 24px 4px 26px; }
.result-hero h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 700; letter-spacing: -.035em; margin-bottom: 12px; }
.result-hero .lead { margin: 0; }
.result-actions { margin: 20px 0 36px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid2 > .card { margin-bottom: 20px; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; gap: 0; } }
.card > h2 + .muted { margin-top: -4px; }
.chart svg { width: 100%; height: auto; max-width: 480px; display: block; margin: 8px auto 0; }

.spider .sp-grid { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 1; }
.spider .sp-mid { stroke: rgba(255,255,255,.22); stroke-dasharray: 2 4; }
.spider .sp-axis { stroke: rgba(255,255,255,.09); }
.spider .sp-label { font-size: 11.5px; fill: var(--text-2); font-weight: 500; letter-spacing: -.01em; }
.overlay-sel { display: flex; align-items: center; gap: 10px; justify-content: center; margin-top: 12px; font-size: .85rem; color: var(--text-2); }
.overlay-sel select { padding: 6px 28px 6px 12px; border-radius: 8px; border: 0; background: var(--surface-2); font-size: .85rem; }
.legend { display: flex; justify-content: center; gap: 18px; margin-top: 10px; font-size: .8rem; color: var(--text-2); }
.legend i { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }
.legend i.dash { background: none; border-top: 2px dashed; height: 0; border-radius: 0; }

.compass .cq { fill: none; }
.compass .c-grid { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.compass .c-zero { stroke: rgba(255,255,255,.28); stroke-width: 1; }
.compass .c-quad { font-size: 10.5px; fill: var(--text-3); font-weight: 500; }
.compass .c-axis { font-size: 11.5px; fill: var(--text-2); font-weight: 600; }
.compass .c-party { font-size: 11px; fill: var(--text); font-weight: 500; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.compass .c-user { fill: var(--accent); stroke: #fff; stroke-width: 2; }
.compass .c-user-halo { fill: var(--accent); fill-opacity: .22; }
.compass .c-user-label { font-size: 12px; font-weight: 700; fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }

.axes-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 36px; margin-top: 8px; }
@media (max-width: 680px) { .axes-list { grid-template-columns: 1fr; } }
.axis-head { display: flex; justify-content: space-between; font-size: .95rem; }
.axis-head b { font-weight: 500; }
.axis-head span { font-variant-numeric: tabular-nums; color: var(--text-2); }
.bar { position: relative; height: 4px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin: 8px 0 6px; }
.bar > div { height: 100%; background: var(--accent); border-radius: 99px; }
.bar .mid { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.4); }
.axis-row small { font-size: .78rem; line-height: 1.4; display: block; color: var(--text-3); }

.rank { display: flex; flex-direction: column; gap: 14px; margin: 14px 0 16px; }
.rank-row { display: grid; grid-template-columns: 16px minmax(84px, auto) 1fr 42px; align-items: center; gap: 12px; font-size: .95rem; }
.rank-row.duo { grid-template-columns: 16px minmax(140px, auto) 1fr 42px; }
@media (max-width: 480px) { .rank-row.duo { grid-template-columns: 16px 1fr 42px; row-gap: 6px; } .rank-row.duo .rank-bar { grid-column: 2 / 4; grid-row: 2; } }
.rank-n { color: var(--text-3); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.rank-name { display: flex; align-items: center; white-space: nowrap; }
.rank-bar { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.rank-bar > div { height: 100%; border-radius: 99px; }
.rank-row b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

.cat-detail { border-top: .5px solid var(--sep); }
.cat-detail summary { cursor: pointer; padding: 14px 0; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 8px; }
.cat-detail summary::-webkit-details-marker { display: none; }
.cat-detail summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border: solid var(--text-3); border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform .2s; }
.cat-detail[open] summary::after { transform: rotate(45deg); }
.cat-detail summary small { color: var(--text-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin-bottom: 14px; }
.cmp { width: 100%; border-collapse: collapse; font-size: .82rem; }
.cmp th, .cmp td { padding: 9px 8px; border-bottom: .5px solid var(--sep); text-align: left; vertical-align: top; }
.cmp th { font-size: .72rem; color: var(--text-3); white-space: nowrap; font-weight: 500; }
.cmp th .dot { width: 6px; height: 6px; margin-right: 5px; }
.cmp td:first-child { min-width: 240px; }
.cmp .qjump { color: var(--text); }
.cmp .qjump:hover { color: var(--accent); text-decoration: none; }

/* Antwort-Kennzeichnung: farbiger Punkt + Text, keine Pillen */
.pill, .pp { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 500; white-space: nowrap; color: var(--text-2); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--text-3)); flex-shrink: 0; }
.pill.sm { font-size: .74rem; }
.a-yes2 { --c: var(--green); }
.a-yes1 { --c: rgba(48, 209, 88, .5); }
.a-neu  { --c: rgba(235, 235, 245, .35); }
.a-no1  { --c: rgba(255, 69, 58, .55); }
.a-no2  { --c: var(--red); }
.a-skip { --c: transparent; }
.pill.a-skip::before { border: 1px solid var(--text-3); }
.pill.a-yes2, .pill.a-no2 { color: var(--text); }

/* ---------- Abstimmungshilfe ---------- */
.search input { width: 100%; padding: 11px 16px; border-radius: 11px; border: 0; background: rgba(118, 118, 128, .24); font-size: 1rem; outline: none; }
.search input::placeholder { color: var(--text-3); }
.search input:focus { box-shadow: 0 0 0 2px var(--accent); }
.quick-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; }
.tag { border: 0; background: var(--surface-2); color: var(--text-2); border-radius: 99px; padding: 5px 13px; font-size: .8rem; transition: color .2s, background .2s; }
.tag:hover { color: var(--text); background: var(--surface-3); }
#vote-results { margin-top: 18px; }
.vote-item { padding: 20px 0; border-top: .5px solid var(--sep); }
.vi-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.vote-item h3 { font-size: 1.1rem; margin-bottom: 8px; }
.vote-item > p.small { color: var(--text-2); }
.tip { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; font-size: .92rem; }
.tip .yes { color: var(--green); } .tip .no { color: var(--red); }
.party-pos { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; }
.pp .dot { width: 7px; height: 7px; margin-right: 0; }
.pp { color: var(--text-2); }
.pp::after { content: ""; }
.pp.a-yes2, .pp.a-yes1 { color: var(--green); }
.pp.a-no2, .pp.a-no1 { color: var(--red); }
.pp.a-yes1, .pp.a-no1 { opacity: .75; }
.explain-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; margin-top: 6px; }
@media (max-width: 640px) { .explain-grid { grid-template-columns: 1fr; gap: 18px; } }
.ex h3 { margin-bottom: 4px; }
.ex p { margin: 0; font-size: .92rem; color: var(--text-2); }
.steps { padding-left: 1.2em; margin: 6px 0 0; color: var(--text-2); }
.steps li { margin-bottom: .75em; padding-left: 4px; }
.steps li::marker { color: var(--text-3); font-variant-numeric: tabular-nums; }
.steps b { color: var(--text); font-weight: 500; }
.card > .lead { margin-bottom: 20px; }

/* ---------- Lexikon ---------- */
.glossary { margin: 20px 0 0; }
.gl-item { padding: 14px 0; border-top: .5px solid var(--sep); }
.gl-item dt { font-weight: 500; }
.gl-item dt small { color: var(--text-3); font-weight: 400; }
.gl-item dd { margin: 3px 0 0; color: var(--text-2); font-size: .92rem; }

/* ---------- Sonstiges ---------- */
.empty { padding: 56px 24px; }
.empty .btn { margin-top: 8px; }
.footer { border-top: .5px solid var(--sep); font-size: .75rem; color: var(--text-3); }
.footer-inner { padding-top: 18px; padding-bottom: 26px; }
.footer p { margin: 0 0 6px; max-width: 680px; }
.footer .linklike { color: var(--text-2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: rgba(58, 58, 60, .94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: var(--text); padding: 10px 18px; border-radius: 999px; font-size: .85rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 60; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.print-area { display: none; }

/* =========================================================================
   Druck / PDF (Papier bleibt hell)
   ========================================================================= */
@media print {
  @page { size: A4; margin: 14mm 12mm; }
  :root { color-scheme: light; --text: #111; --text-2: #444; --text-3: #777; --sep: #ccc; --surface: #fff; --surface-2: #f2f2f4; --surface-3: #e5e5ea; --accent: #0a84ff; --green: #1f9d48; --red: #d63a30; }
  html, body { background: #fff; color: #111; font-size: 10.5pt; display: block; letter-spacing: 0; }
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .p-head { border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 14px; }
  .p-head h1 { font-size: 20pt; margin: 0 0 2px; }
  .p-head p { margin: 0; color: #555; font-size: 9pt; }
  .p-sec { margin-bottom: 14px; }
  .p-sec h2 { font-size: 12.5pt; border-bottom: .5pt solid #bbb; padding-bottom: 3px; margin-top: 6px; }
  .p-sec h3 { font-size: 10pt; margin: 10px 0 4px; }
  .p-big { font-size: 17pt; font-weight: 700; margin-bottom: 4px; }
  .p-summary { break-inside: avoid; }
  .p-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; break-inside: avoid; }
  .p-charts svg { width: 100%; height: auto; }
  .p-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; break-inside: avoid; }
  .p-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  .p-table td, .p-table th { border-bottom: .5pt solid #ddd; padding: 3px 4px; text-align: left; vertical-align: top; }
  .p-table th { font-size: 8pt; color: #666; font-weight: 500; }
  .p-table .r { text-align: right; }
  .p-ans tr { break-inside: avoid; }
  .p-ans td.ans-cell { width: 130px; white-space: nowrap; }
  .p-answers h3 { break-after: avoid; }
  .p-foot { margin-top: 16px; font-size: 8pt; color: #666; border-top: .5pt solid #ccc; padding-top: 6px; }
  .pill { font-size: 8.5pt; color: #111; }
  .spider .sp-grid, .spider .sp-axis { stroke: #d0d0d5; }
  .spider .sp-mid { stroke: #999; }
  .spider .sp-label { font-size: 11px; fill: #444; }
  .compass .c-grid { stroke: #e5e5ea; }
  .compass .c-zero { stroke: #888; }
  .compass .c-quad { fill: #999; }
  .compass .c-axis { fill: #333; }
  .compass .c-party, .compass .c-user-label { fill: #111; stroke: #fff; }
}
.plus { margin: 0 8px; color: var(--text-3); }
.btn.small { padding: 6px 14px; font-size: .82rem; }
.chart-actions { display: flex; justify-content: center; margin-top: 16px; }

/* ---------- Links in Kopf- und Fusszeile, Rechtstexte ---------- */
a.brand { color: var(--text); text-decoration: none; }
.mainnav a { padding: 6px 10px; color: var(--text-2); font-size: .82rem; text-decoration: none; white-space: nowrap; transition: color .2s; }
.mainnav a:hover { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover, .footer-links a[aria-current] { color: var(--text); }
.footer-inner.footer-links { padding-top: 18px; }

.legal { max-width: 720px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 700; letter-spacing: -.03em; margin: 16px 0 14px; }
.legal .lead { margin-bottom: 8px; }
.legal h2 { font-size: 1.1rem; margin: 34px 0 10px; }
.legal p, .legal li { color: rgba(235, 235, 245, .8); font-size: .97rem; }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul { padding-left: 1.2em; margin: 0 0 .8em; }
.legal li { margin-bottom: .3em; }
.legal li::marker { color: var(--text-3); }
.legal address { font-style: normal; background: var(--surface); border-radius: 14px; padding: 16px 18px; margin: 0 0 12px; line-height: 1.6; }
.legal a { color: var(--accent); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal > .small { margin-top: 40px; }

/* ---------- Bestätigungsdialog (iOS-Alert) ---------- */
.dialog-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, 0); transition: background .2s; }
.dialog-backdrop.open { background: rgba(0, 0, 0, .55); }
.dialog { width: min(300px, 100%); background: rgba(44, 44, 46, .96); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border-radius: 16px; overflow: hidden; text-align: center; transform: scale(1.08); opacity: 0; transition: transform .2s cubic-bezier(.3,.7,.4,1), opacity .2s; }
.dialog-backdrop.open .dialog { transform: scale(1); opacity: 1; }
.dialog-body { padding: 20px 18px 18px; }
.dialog h2 { font-size: 1.05rem; margin: 0 0 6px; }
.dialog p { font-size: .84rem; color: var(--text-2); margin: 0; line-height: 1.4; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: .5px solid var(--sep); }
.dialog-btn { border: 0; background: none; padding: 12px 8px; font-size: 1rem; color: var(--accent); transition: background .15s; }
.dialog-btn + .dialog-btn { border-left: .5px solid var(--sep); }
.dialog-btn:hover, .dialog-btn:focus-visible { background: rgba(255, 255, 255, .06); outline: none; }
.dialog-btn[data-result="cancel"] { font-weight: 600; }
.dialog-btn.destructive { color: var(--red); }
@media (prefers-reduced-motion: reduce) { .dialog, .dialog-backdrop { transition: none; } }
