/* =====================================================================
   Wahlhelfer Helmstedt – Stylesheet
   Flat Design · Light/Dark · Barrierefrei (WCAG 2.1 AA angestrebt)
   Keine externen Ressourcen: DSGVO-freundlich, offline nutzbar.
   ===================================================================== */
:root {
  --bg: #fcfcfb;
  --surface: #ffffff;
  --surface-2: #f2f4f3;
  --ink: #1a2330;
  --ink-2: #46505e;
  --ink-3: #6b7280;
  --line: #dde2e6;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-soft: #e0f2f0;
  --focus: #b45309;
  --good: #14713d;
  --warn: #92400e;
  --bad: #b42318;
  --radius: 8px;
  --radius-s: 5px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 4px 14px rgba(16,24,40,.06);
  --maxw: 1080px;
  --pro: #14713d;
  --neutralpos: #6b7280;
  --contra: #b42318;
}
[data-theme="dark"] {
  --bg: #14161a;
  --surface: #1d2127;
  --surface-2: #262b33;
  --ink: #eef1f4;
  --ink-2: #c3cad3;
  --ink-3: #97a0ab;
  --line: #39414c;
  --accent: #2dd4bf;
  --accent-ink: #0c1210;
  --accent-soft: #123f3a;
  --focus: #fbbf24;
  --good: #4ade80;
  --warn: #fcd34d;
  --bad: #f87171;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35);
  --pro: #4ade80;
  --neutralpos: #97a0ab;
  --contra: #f87171;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 1.05rem; line-height: 1.65;
}
img, svg { vertical-align: middle; }
a { color: var(--accent); text-underline-offset: 3px; }
[data-theme="dark"] a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; z-index: 100; border-radius: 0 0 var(--radius-s) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header / Nav ---------- */
header.site {
  position: sticky; top: 0; z-index: 50; background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: .75rem; padding: .55rem 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.brand .logo { width: 34px; height: 34px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); flex: none; }
nav.main { margin-left: auto; }
nav.main ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; flex-wrap: wrap; }
nav.main a {
  display: block; padding: .45rem .7rem; border-radius: var(--radius-s);
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem;
}
nav.main a:hover { background: var(--surface-2); color: var(--ink); }
nav.main a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.theme-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 10px; width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; flex: none;
}
.theme-btn:hover { background: var(--surface-2); }

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.section { margin-top: 2.2rem; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); line-height: 1.2; margin: .4em 0 .35em; letter-spacing: -.015em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 1.4em 0 .5em; letter-spacing: -.01em; }
h3 { font-size: 1.12rem; margin: 1.1em 0 .4em; }
p.lead { font-size: 1.18rem; color: var(--ink-2); max-width: 46rem; }
.muted { color: var(--ink-3); }
.small { font-size: .9rem; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 1rem; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.15rem 1.2rem; box-shadow: var(--shadow);
}
a.card { display: block; color: inherit; text-decoration: none; transition: transform .18s ease, border-color .18s ease; }
a.card:hover { transform: translateY(-3px); border-color: var(--accent); }
.card .icon-badge {
  width: 46px; height: 46px; border-radius: 8px; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: .6rem;
}
[data-theme="dark"] .card .icon-badge { color: var(--accent); }
.card h3 { margin-top: 0; }

/* Fakten-Kacheln (Stat Tiles) */
.fact { text-align: left; }
.fact .zahl { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; display: block; }
.fact .lbl { color: var(--ink-2); font-size: .95rem; }

/* Hero */
.hero {
  border-radius: calc(var(--radius) + 6px); padding: 2.2rem 1.6rem;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.hero .badge {
  display: inline-flex; align-items: center; gap: .45rem; background: var(--surface); border: 1px solid var(--line);
  padding: .3rem .8rem; border-radius: 8px; font-weight: 700; font-size: .9rem; color: var(--ink-2);
}
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.25rem; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; font-size: 1rem;
}
.btn:hover { filter: brightness(1.08); }
/* Link-Farbregeln dürfen Buttons nicht überschreiben (Spezifität!) */
a.btn, [data-theme="dark"] a.btn { color: var(--accent-ink); text-decoration: none; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
a.btn.secondary, [data-theme="dark"] a.btn.secondary { color: var(--ink); }
.btn.secondary:hover { border-color: var(--accent); filter: none; }
.btn.big { padding: .9rem 1.6rem; font-size: 1.1rem; }
.btn-row { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 1.1rem; }

/* Countdown */
.countdown { display: flex; gap: .6rem; margin-top: 1.2rem; flex-wrap: wrap; }
.countdown .unit {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: .5rem .9rem; text-align: center; min-width: 74px;
}
.countdown .unit b { display: block; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.countdown .unit span { font-size: .8rem; color: var(--ink-3); }

/* Einblend-Animation */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Partei-Elemente ---------- */
.partychip {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .95rem;
  padding: .2rem .7rem .2rem .3rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
}
.partychip .dot { width: 20px; height: 20px; border-radius: 999px; border: 2px solid var(--line); flex: none; }
.party-card { border-top: 6px solid var(--line); }
.party-card .head { display: flex; align-items: center; gap: .7rem; }
.party-card .dot { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); flex: none; }

/* Ergebnisbalken (Meter) – Identität IMMER auch als Text, nie nur Farbe */
.result-row { margin: .85rem 0; }
.result-row .top { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.result-row .name { font-weight: 700; }
.result-row .pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.meter {
  margin-top: .35rem; height: 18px; background: var(--surface-2); border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line); position: relative;
}
.meter > i {
  display: block; height: 100%; border-radius: 4px; width: 0;
  border-right: 2px solid var(--bg);
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}
.result-row .cov { font-size: .85rem; color: var(--ink-3); margin-top: .15rem; }

/* Positions-Badges */
.pos { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; font-size: .9rem; padding: .15rem .6rem; border-radius: 7px; border: 1.5px solid; }
.pos.pro     { color: var(--pro); border-color: var(--pro); background: color-mix(in srgb, var(--pro) 10%, transparent); }
.pos.neutral { color: var(--neutralpos); border-color: var(--neutralpos); background: color-mix(in srgb, var(--neutralpos) 10%, transparent); }
.pos.contra  { color: var(--contra); border-color: var(--contra); background: color-mix(in srgb, var(--contra) 10%, transparent); }
.pos.ka      { color: var(--ink-3); border-color: var(--line); border-style: dashed; background: transparent; font-weight: 600; }

/* Programm-Status-Kennzeichnung */
.prog { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; font-weight: 700; padding: .18rem .6rem; border-radius: 999px; border: 1.5px solid; }
.prog.kreis    { color: var(--good); border-color: var(--good); background: color-mix(in srgb, var(--good) 10%, transparent); }
.prog.land     { color: var(--warn); border-color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.prog.aussagen { color: var(--warn); border-color: var(--warn); border-style: dashed; background: color-mix(in srgb, var(--warn) 8%, transparent); }
.prog.keins    { color: var(--bad); border-color: var(--bad); border-style: dashed; background: color-mix(in srgb, var(--bad) 8%, transparent); }
.prog svg { width: 14px; height: 14px; }

/* Transparenz-Score (Nutri-Score-Stil) */
.ts-badge { display: inline-flex; align-items: center; gap: .45rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: .2rem .6rem .2rem .75rem; cursor: help; }
.ts-label { font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.ts-scale { display: inline-flex; border-radius: 8px; overflow: hidden; }
.ts-seg { width: 22px; height: 22px; display: grid; place-items: center; color: #fff; font-size: .72rem; font-weight: 800; opacity: .45; }
.ts-seg.aktiv { opacity: 1; width: 30px; height: 30px; font-size: 1rem; border-radius: 8px; box-shadow: 0 0 0 2px var(--surface); z-index: 1; }
.ts-badge.kompakt .ts-label { display: none; }
.ts-badge.kompakt .ts-seg { width: 14px; height: 18px; font-size: .6rem; }
.ts-badge.kompakt .ts-seg.aktiv { width: 24px; height: 24px; font-size: .85rem; }

/* ---------- Kompass ---------- */
.progress { height: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: .8rem 0 1.4rem; }
.progress > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s ease; border-radius: 999px; }
.theme-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: .8rem; }
.theme-pick label {
  display: flex; gap: .7rem; align-items: flex-start; border: 2px solid var(--line); border-radius: var(--radius);
  padding: .9rem; cursor: pointer; background: var(--surface); transition: border-color .15s ease, background .15s ease;
}
.theme-pick label:hover { border-color: var(--accent); }
.theme-pick input { width: 22px; height: 22px; margin-top: .2rem; accent-color: var(--accent); flex: none; }
.theme-pick input:checked + .tx { color: var(--ink); }
.theme-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.theme-pick .tx b { display: block; }
.theme-pick .tx span { font-size: .88rem; color: var(--ink-3); }

.these-card { max-width: 46rem; margin: 0 auto; }
.these-card .thema-tag { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: .2rem .7rem; border-radius: 999px; }
.these-text { font-size: 1.3rem; font-weight: 700; line-height: 1.45; margin: .8rem 0 .3rem; }
.these-einfach { color: var(--ink-2); background: var(--surface-2); border-left: 4px solid var(--accent); padding: .5rem .8rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.answer-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin-top: 1.1rem; }
.answer-group .ans {
  border: 2px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: .8rem .5rem;
  font-weight: 700; cursor: pointer; font-size: 1rem; color: var(--ink); display: grid; gap: .3rem; justify-items: center;
}
.answer-group .ans:hover { border-color: var(--accent); }
.answer-group .ans[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.weight-row { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; flex-wrap: wrap; }
.weight-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.wizard-nav { display: flex; justify-content: space-between; gap: .7rem; margin-top: 1.4rem; flex-wrap: wrap; }

/* ---------- Perfect Match (Kompass 2.0) ---------- */
.stack-wrap { max-width: 34rem; margin: 1rem auto 0; }
.match-stack { position: relative; padding-bottom: 14px; }
.match-stack::before, .match-stack::after {
  content: ""; position: absolute; left: 5%; right: 5%; height: 100%; top: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  z-index: 0; opacity: .6;
}
.match-stack::after { left: 10%; right: 10%; top: 16px; opacity: .35; }
.match-card {
  position: relative; z-index: 2; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.3rem 1.1rem; min-height: 260px;
  transition: transform .28s ease, opacity .28s ease;
}
.match-card.out-right { transform: translateX(60%) rotate(8deg); opacity: 0; }
.match-card.out-left  { transform: translateX(-60%) rotate(-8deg); opacity: 0; }
.match-card.out-down  { transform: translateY(30%); opacity: 0; }
.match-card.in { animation: cardIn .3s ease; }
@keyframes cardIn { from { transform: scale(.94) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.match-card-head { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.gap-tag {
  display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 700;
  background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--warn);
  border: 1.5px dashed var(--warn); border-radius: 999px; padding: .18rem .7rem;
}
.dealbreaker { display: flex; gap: .5rem; align-items: flex-start; margin-top: .9rem; cursor: pointer; }
.dealbreaker input { width: 20px; height: 20px; accent-color: var(--accent); margin-top: .15rem; }
.swipe-actions { display: flex; justify-content: center; gap: .9rem; margin-top: 1.1rem; flex-wrap: wrap; }
.swipe-btn {
  display: grid; justify-items: center; gap: .15rem; border: 2px solid var(--line); background: var(--surface);
  border-radius: 18px; padding: .6rem .9rem; min-width: 86px; cursor: pointer; color: var(--ink);
  font-weight: 700; transition: transform .15s ease, border-color .15s ease;
}
.swipe-btn span { font-size: 1.6rem; }
.swipe-btn small { font-size: .8rem; color: var(--ink-2); }
.swipe-btn:hover { transform: translateY(-3px) scale(1.04); }
.swipe-btn.yes:hover { border-color: var(--good); }
.swipe-btn.no:hover { border-color: var(--bad); }
.swipe-btn.meh:hover, .swipe-btn.skip:hover { border-color: var(--accent); }

.match-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; margin: .7rem 0; }
.match-row.top { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.m-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.m-emoji { font-size: 1.5rem; }
.m-label { font-weight: 700; color: var(--ink-2); }
.m-head .pct { margin-left: auto; font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }

.badges { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin: .8rem 0 1.2rem; }
.badge-chip {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .55rem; align-items: center;
  background: var(--surface); border: 1.5px solid var(--accent); border-radius: var(--radius); padding: .5rem .9rem; max-width: 260px;
}
.badge-chip .b-icon { grid-row: 1 / 3; font-size: 1.6rem; }
.badge-chip b { font-size: .95rem; }
.badge-chip small { color: var(--ink-3); font-size: .78rem; }

#confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 95; }
#confetti i {
  position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; opacity: .9;
  animation: confFall linear forwards;
}
@keyframes confFall {
  0% { transform: translateY(-30px) rotate(0deg); }
  100% { transform: translateY(105vh) rotate(720deg); opacity: .7; }
}
@media (prefers-reduced-motion: reduce) { #confetti { display: none; } }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
caption { text-align: left; padding: .8rem 1rem; font-weight: 700; }
th, td { padding: .6rem .8rem; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
thead th { background: var(--surface-2); border-top: none; position: sticky; top: 0; }
tbody tr:hover { background: var(--surface-2); }

/* Accordion */
details.acc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: .7rem 0; overflow: clip; }
details.acc > summary {
  cursor: pointer; padding: .95rem 1.1rem; font-weight: 700; list-style: none; display: flex; align-items: center; gap: .7rem;
}
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: "＋"; margin-left: auto; font-weight: 800; color: var(--accent); }
details.acc[open] > summary::after { content: "−"; }
details.acc .acc-body { padding: 0 1.1rem 1.1rem; border-top: 1px solid var(--line); }
.quote { font-size: .95rem; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: .7rem; margin: .4rem 0; }
.quote .src { display: block; font-size: .82rem; color: var(--ink-3); }

/* Hinweis-Boxen */
.note { border-radius: var(--radius); padding: .9rem 1.1rem; border: 1px solid var(--line); background: var(--surface-2); display: flex; gap: .7rem; align-items: flex-start; }
.note.info    { border-left: 5px solid var(--accent); }
.note.warning { border-left: 5px solid var(--warn); }
.note svg { flex: none; margin-top: .2rem; }

/* Admin */
.admin-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1.1rem; margin: 0 0 1rem; background: var(--surface); }
legend { font-weight: 700; padding: 0 .4rem; }
input[type="text"], textarea, select {
  width: 100%; padding: .55rem .7rem; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  background: var(--bg); color: var(--ink); font: inherit;
}
textarea { min-height: 70px; resize: vertical; }
label.fld { display: block; font-weight: 600; font-size: .92rem; margin: .6rem 0 .2rem; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; }
.pos-grid .pgi { border: 1px solid var(--line); border-radius: var(--radius-s); padding: .7rem; background: var(--bg); }

/* Footer */
footer.site { border-top: 1px solid var(--line); background: var(--surface); margin-top: 2rem; }
footer.site .inner { max-width: var(--maxw); margin: 0 auto; padding: 1.6rem 1rem; display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: space-between; align-items: flex-start; }
footer.site nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 1rem; flex-wrap: wrap; }
footer.site a { color: var(--ink-2); }
footer.site .version-line { max-width: var(--maxw); margin: 0 auto; padding: 0 1rem 1.2rem; font-size: .82rem; color: var(--ink-3); }
footer.site .version-line a { color: inherit; text-decoration: underline dotted; }

/* Vertrauens-Kacheln im Footer */
footer.site .trust-row { max-width: var(--maxw); margin: 0 auto; padding: .2rem 1rem 1rem; list-style: none;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .5rem; }
footer.site .trust-row li { display: flex; align-items: center; gap: .55rem; padding: .55rem .7rem;
  border: 1px solid var(--line); border-radius: 7px; background: var(--bg); font-size: .78rem; color: var(--ink-2); }
footer.site .trust-row li svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--accent); }
footer.site .trust-row li strong { display: block; font-size: .8rem; color: var(--ink); line-height: 1.25; }
footer.site .trust-row li small { display: block; color: var(--ink-3); }

/* Button, der wie ein Link aussieht (Footer: Datenschutz-Einstellungen) */
button.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2);
  text-decoration: underline; cursor: pointer; }
button.linklike:hover, button.linklike:focus-visible { color: var(--accent); }

/* Consent-Banner: Kategorien & Schalter */
.consent-katalog { display: grid; gap: .5rem; margin: .5rem 0; max-height: 42vh; overflow: auto;
  border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; background: var(--bg); }
.consent-kat { border-bottom: 1px dashed var(--line); padding-bottom: .45rem; }
.consent-kat:last-child { border-bottom: 0; padding-bottom: 0; }
.cswitch { display: flex; align-items: center; gap: .55rem; cursor: pointer; }
.cswitch input { position: absolute; opacity: 0; width: 44px; height: 24px; margin: 0; cursor: pointer; }
.cswitch .track { flex: 0 0 auto; width: 44px; height: 24px; border-radius: 999px; background: var(--line);
  position: relative; transition: background .18s; }
.cswitch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .18s; }
.cswitch input:checked + .track { background: var(--accent); }
.cswitch input:checked + .track::after { transform: translateX(20px); }
.cswitch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
.cswitch input:disabled + .track { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .cswitch .track, .cswitch .track::after { transition: none; } }
.disclaimer { font-size: .85rem; color: var(--ink-3); max-width: 42rem; }

/* ---------- Barrierefreiheits-Menü ---------- */
html.fs-1 { font-size: 115%; }
html.fs-2 { font-size: 130%; }
html.no-anim *, html.no-anim *::before, html.no-anim *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
[data-contrast="high"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f0f0f0;
  --ink: #000000; --ink-2: #1a1a1a; --ink-3: #333333; --line: #000000;
  --accent: #00443f; --accent-ink: #ffffff; --accent-soft: #d6efec; --focus: #a3009a;
}
[data-theme="dark"][data-contrast="high"] {
  --bg: #000000; --surface: #000000; --surface-2: #1c1c1c;
  --ink: #ffffff; --ink-2: #f0f0f0; --ink-3: #d9d9d9; --line: #ffffff;
  --accent: #6ef5e4; --accent-ink: #000000; --accent-soft: #063b35; --focus: #ffd0fc;
}
[data-contrast="high"] a { text-decoration: underline; }
.a11y-panel {
  position: absolute; right: 1rem; top: calc(100% + .4rem); z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.1rem; width: min(340px, calc(100vw - 2rem));
}
.nav-wrap { position: relative; }
.a11y-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.a11y-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin: .55rem 0; flex-wrap: wrap; }
.a11y-row [role="group"] { display: flex; gap: .35rem; }
.a11y-row .ans { padding: .35rem .6rem; border-radius: var(--radius-s); border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink); }
.a11y-row .ans[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.a11y-row input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }

/* ---------- DSGVO-Hinweis ---------- */
.dsgvo-box {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--surface); border-top: 2px solid var(--accent);
  box-shadow: 0 -4px 18px rgba(0,0,0,.15);
}
.dsgvo-inner { max-width: var(--maxw); margin: 0 auto; padding: .9rem 1rem; display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }
.dsgvo-inner p { margin: 0; flex: 1 1 22rem; }
.dsgvo-icon { color: var(--accent); flex: none; }

/* ---------- Zeitstrahl ---------- */
.timeline { position: relative; margin: 1.5rem 0; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 6px; bottom: 6px; width: 4px; border-radius: 2px; background: var(--accent-soft); }
.t-item { position: relative; margin: 0 0 1.6rem; }
.t-item::before {
  content: ""; position: absolute; left: -2rem; top: .35rem; width: 16px; height: 16px; border-radius: 999px;
  background: var(--accent); border: 3px solid var(--bg); margin-left: 3px;
}
.t-item .t-jahr { display: inline-block; font-weight: 800; color: var(--accent); font-size: 1.05rem; letter-spacing: .02em; }
.t-item h3 { margin: .15rem 0 .3rem; }
.t-item p { margin: .2rem 0; }
.t-era { margin-top: 2.2rem; }
.t-era:first-of-type { margin-top: 0; }

/* ---------- Über-uns / Story ---------- */
.story-step { display: flex; gap: 1rem; margin: 1.2rem 0; align-items: flex-start; }
.story-step .nr {
  flex: none; width: 44px; height: 44px; border-radius: 999px; background: var(--accent);
  color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 1.15rem;
}

/* ---------- Farbschemata (Avatar-Widget "Deine Farbe") ---------- */
[data-accent="blau"]    { --accent: #1d4ed8; --accent-soft: #dbe6fe; }
[data-accent="gruen"]   { --accent: #15803d; --accent-soft: #dcf2e3; }
[data-accent="violett"] { --accent: #7c3aed; --accent-soft: #ede4fe; }
[data-accent="orange"]  { --accent: #c2410c; --accent-soft: #ffe8d9; }
[data-accent="pink"]    { --accent: #be185d; --accent-soft: #fce1ec; }
[data-theme="dark"][data-accent="blau"]    { --accent: #7ba6ff; --accent-ink: #0a1020; --accent-soft: #1b2a4d; }
[data-theme="dark"][data-accent="gruen"]   { --accent: #5fd68a; --accent-ink: #07130b; --accent-soft: #143723; }
[data-theme="dark"][data-accent="violett"] { --accent: #b795f8; --accent-ink: #130a22; --accent-soft: #2e2050; }
[data-theme="dark"][data-accent="orange"]  { --accent: #ffa06a; --accent-ink: #1d0d04; --accent-soft: #45230f; }
[data-theme="dark"][data-accent="pink"]    { --accent: #f487b7; --accent-ink: #200914; --accent-soft: #471a2e; }

/* ---------- Info-Dosis (Bedürfnis-Filter) ---------- */
html.info-einfach .quote,
html.info-einfach .cov,
html.info-einfach .disclaimer { display: none; }
html.info-einfach body { font-size: 1.12rem; }
html.info-einfach .these-einfach { display: block; }

/* ---------- Avatar "Helmi" ---------- */
.helmi-btn {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 80;
  width: 64px; height: 64px; border-radius: 999px; border: 3px solid var(--surface);
  background: var(--accent); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  display: grid; place-items: center; padding: 0;
  animation: helmiBob 3.2s ease-in-out infinite;
}
.helmi-btn:hover { filter: brightness(1.08); }
.helmi-btn:hover, .helmi-btn:focus-visible, .helmi-btn[aria-expanded="true"] { animation-play-state: paused; }
@keyframes helmiBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) { .helmi-btn { animation: none; } }
.helmi-panel {
  position: fixed; right: 1.1rem; bottom: 5.6rem; z-index: 81;
  width: min(360px, calc(100vw - 2rem)); max-height: min(70vh, 560px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(0,0,0,.3); padding: 1rem 1.1rem;
}
.helmi-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.helmi-head b { font-size: 1.05rem; }
.helmi-widget { border-top: 1px solid var(--line); padding: .8rem 0; }
.helmi-widget h3 { margin: 0 0 .45rem; font-size: 1rem; }
.swatches { display: flex; gap: .5rem; flex-wrap: wrap; }
.swatch {
  width: 34px; height: 34px; border-radius: 999px; cursor: pointer; border: 3px solid var(--line); padding: 0;
}
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.helmi-opts { display: grid; gap: .4rem; }
.helmi-opts button {
  text-align: left; border: 2px solid var(--line); background: var(--bg); border-radius: var(--radius-s);
  padding: .45rem .7rem; cursor: pointer; font: inherit; color: var(--ink); font-weight: 600;
}
.helmi-opts button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.helmi-opts button[disabled] { opacity: .55; cursor: not-allowed; }
.baro-row { margin: .45rem 0; }
.baro-row .t { font-size: .85rem; margin: 0 0 .15rem; }
.baro-meter { height: 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.baro-meter i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }

/* ---------- Externe-Link-Hinweis ---------- */
.extern-overlay {
  position: fixed; inset: 0; z-index: 96; background: rgba(10, 14, 18, .55);
  display: grid; place-items: center; padding: 1rem;
}
.extern-overlay[hidden] { display: none; }
.extern-modal {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 16px 50px rgba(0,0,0,.4); max-width: 30rem; width: 100%; padding: 1.2rem 1.4rem;
}
.extern-ziel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: .6rem .8rem; }

/* ---------- Neue Hauptnavigation: Themen-Gruppen mit Dropdowns ---------- */
.nav-root { list-style: none; display: flex; gap: .1rem; margin: 0; padding: 0; flex-wrap: wrap; align-items: center; }
nav.main a.nav-top, nav.main .nav-top {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .75rem; border-radius: 7px;
  font: inherit; font-weight: 700; font-size: .95rem; color: var(--ink-2); background: none; border: none;
  cursor: pointer; text-decoration: none; box-shadow: none;
}
.nav-top svg { width: 18px; height: 18px; }
.nav-top:hover { background: var(--surface-2); color: var(--ink); }
.nav-top.aktiv, nav.main a.nav-top[aria-current="page"] { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 -3px 0 var(--accent); }
.nav-top .caret { font-size: .7rem; opacity: .7; }
.nav-item { position: relative; }
.nav-item .drop {
  position: absolute; left: 0; top: calc(100% + 8px); min-width: 350px; z-index: 75;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(0,0,0,.22); padding: .5rem; display: none;
}
.nav-item.open .drop { display: block; }
@media (hover: hover) and (min-width: 921px) {
  .nav-item:hover .drop, .nav-item:focus-within .drop { display: block; }
}
nav.main a.drop-item {
  display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: center;
  padding: .55rem .6rem; border-radius: 7px; text-decoration: none; color: var(--ink); box-shadow: none; font-weight: 500;
}
nav.main a.drop-item:hover { background: var(--accent-soft); color: var(--ink); }
nav.main a.drop-item[aria-current="page"] { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.drop-item .icon-badge { width: 38px; height: 38px; border-radius: 7px; margin: 0; flex: none; }
.drop-item b { display: block; font-size: .95rem; font-weight: 700; }
.drop-item small { display: block; color: var(--ink-3); font-size: .8rem; line-height: 1.35; }
@media (max-width: 920px) {
  .nav-item .drop { position: static; min-width: 0; box-shadow: none; border: none; border-left: 3px solid var(--accent-soft); border-radius: 0; margin: .15rem 0 .4rem .5rem; padding: .2rem; }
}

/* ---------- Thematische Hintergrund-Linien (Hero-Deko) ---------- */
main { position: relative; }
.hero { position: relative; overflow: hidden; }
.hero > *:not(.hero-lines) { position: relative; z-index: 1; }
.hero-lines {
  position: absolute; inset: 0; pointer-events: none; color: var(--accent);
  opacity: .16; z-index: 0;
}
.hero-lines svg { width: 100%; height: 100%; display: block; }
.page-lines {
  position: absolute; top: -6px; right: 0; width: min(540px, 72%); height: 240px;
  pointer-events: none; color: var(--accent); opacity: .13; z-index: 0;
}
.page-lines svg { width: 100%; height: 100%; display: block; }
[data-theme="dark"] .hero-lines, [data-theme="dark"] .page-lines { opacity: .22; }
[data-contrast="high"] .hero-lines, [data-contrast="high"] .page-lines { display: none; }

@media print {
  header.site, footer.site, .btn, .wizard-nav, .theme-btn, .hero-lines, .page-lines, .helmi-btn { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .table-wrap { box-shadow: none; }
}

/* =====================================================================
   Lebendige Hintergründe: weiche, langsam treibende Farbflächen je Seite
   (rein dekorativ, pointer-events:none, respektiert reduzierte Animation)
   ===================================================================== */
.bg-deko { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-deko .blob {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  filter: blur(70px); opacity: .16; background: radial-gradient(circle at 35% 35%, var(--accent), transparent 65%);
  animation: blobDrift 46s ease-in-out infinite alternate;
}
.bg-deko .blob.b2 { width: 38vmax; height: 38vmax; opacity: .1; animation-duration: 58s; animation-delay: -18s; }
.bg-deko .blob.b3 { width: 30vmax; height: 30vmax; opacity: .08; animation-duration: 70s; animation-delay: -35s; }
[data-theme="dark"] .bg-deko .blob { opacity: .12; }
[data-theme="dark"] .bg-deko .blob.b2 { opacity: .08; }
[data-theme="dark"] .bg-deko .blob.b3 { opacity: .06; }
@keyframes blobDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(6vw, -4vh) scale(1.08); }
  100% { transform: translate(-5vw, 5vh) scale(.94); }
}
.bg-deko .bg-motiv {
  position: absolute; right: -4%; bottom: -2%; width: min(680px, 70vw); height: 300px;
  color: var(--accent); opacity: .05; animation: motivFloat 18s ease-in-out infinite alternate;
}
[data-theme="dark"] .bg-deko .bg-motiv { opacity: .07; }
.bg-deko .bg-motiv svg { width: 100%; height: 100%; }
@keyframes motivFloat { from { transform: translateY(0) rotate(0deg); } to { transform: translateY(-14px) rotate(.6deg); } }
[data-contrast="high"] .bg-deko { display: none; }
@media (prefers-reduced-motion: reduce) { .bg-deko .blob, .bg-deko .bg-motiv { animation: none; } }

/* Hero-Linien: sanftes Schweben + Einzeichnen */
.hero-lines svg, .page-lines svg { animation: motivFloat 14s ease-in-out infinite alternate; }
.lines-draw path, .lines-draw circle, .lines-draw rect, .lines-draw ellipse {
  stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: linesDraw 2.4s ease-out forwards;
}
@keyframes linesDraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .hero-lines svg, .page-lines svg { animation: none; }
  .lines-draw path, .lines-draw circle, .lines-draw rect, .lines-draw ellipse { stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
}

/* =====================================================================
   Interaktivität: Karten-Tilt, Hover-Lift, Ripple, Scroll-Fortschritt
   ===================================================================== */
main .card { transition: transform .25s ease, box-shadow .25s ease; }
@media (hover: hover) and (pointer: fine) {
  main .card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.14); }
  [data-theme="dark"] main .card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.45); }
  main .card.tilt { will-change: transform; }
}
.icon-badge { transition: transform .25s ease; }
.card:hover .icon-badge, a:hover > .icon-badge { transform: rotate(-6deg) scale(1.1); }

.btn { position: relative; overflow: hidden; }
.ripple {
  position: absolute; border-radius: 50%; transform: scale(0); pointer-events: none;
  background: currentColor; opacity: .25; animation: rippleGo .55s ease-out forwards;
}
@keyframes rippleGo { to { transform: scale(2.6); opacity: 0; } }

#scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 120;
  background: linear-gradient(90deg, var(--accent), var(--accent-2, var(--accent)));
  pointer-events: none; transition: width .12s linear;
}
html.no-anim #scroll-progress { transition: none; }

/* Zahlen, die hochzählen, ruckeln nicht */
.zahl, .stat-num { font-variant-numeric: tabular-nums; }

/* =====================================================================
   Mobile-First: App-Tab-Bar unten + Menü-Sheet + Feinschliff ≤ 920px
   ===================================================================== */
.tab-bar { display: none; }
@media (max-width: 920px) {
  /* Header schlank: Navigation wandert in das Menü-Sheet */
  header.site nav.main { display: none; }
  .nav-wrap { flex-wrap: nowrap; }
  .brand { min-width: 0; }
  .brand > span:last-child { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .theme-btn { width: 38px; height: 38px; }
  body.nav-open header.site nav.main {
    display: block; position: fixed; inset: 0; top: 0; z-index: 110;
    background: var(--bg); overflow-y: auto; padding: 4.2rem 1rem calc(84px + env(safe-area-inset-bottom));
  }
  body.nav-open .nav-root { flex-direction: column; align-items: stretch; gap: .3rem; }
  body.nav-open .nav-root > li > .nav-top { width: 100%; font-size: 1.05rem; padding: .7rem .8rem; }
  body.nav-open .nav-item .drop { display: block !important; }  /* alles aufgeklappt – nichts verstecken */
  body.nav-open .nav-top .caret { display: none; }
  body.nav-open nav.main a.drop-item { padding: .65rem .6rem; }
  body.nav-open::after {
    content: "Menü"; position: fixed; top: 0; left: 0; right: 0; z-index: 111;
    padding: .8rem 1rem; font-weight: 800; font-size: 1.15rem; color: var(--ink);
    background: var(--surface); border-bottom: 1px solid var(--line);
  }
  body.nav-open { overflow: hidden; }

  .tab-bar {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 112;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 18px rgba(0,0,0,.12);
  }
  .tab-bar a, .tab-bar button {
    display: grid; justify-items: center; gap: .15rem; padding: .5rem .2rem .55rem;
    background: none; border: 0; font: inherit; font-size: .72rem; font-weight: 700;
    color: var(--ink-3); text-decoration: none; cursor: pointer; min-height: 56px;
  }
  .tab-bar svg { width: 22px; height: 22px; }
  .tab-bar .aktiv, .tab-bar a[aria-current="page"] { color: var(--accent); }
  .tab-bar a:active, .tab-bar button:active { transform: translateY(1px); }

  /* Platz für die Tab-Bar schaffen */
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .helmi-btn { bottom: calc(76px + env(safe-area-inset-bottom)); right: .8rem; width: 56px; height: 56px; }
  .helmi-panel { bottom: calc(140px + env(safe-area-inset-bottom)); }
  .dsgvo-box { bottom: calc(56px + env(safe-area-inset-bottom)); }

  /* Touch & Lesbarkeit */
  input, select, textarea { font-size: 16px; }   /* verhindert iOS-Auto-Zoom */
  .btn { padding: .7rem 1.1rem; min-height: 44px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap table { min-width: 560px; }
  .grid.cols-3, .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr; }
  .hero { padding: 1.2rem 1rem; }
  main { padding-inline: .9rem; }
  .consent-katalog { max-height: 34vh; }
  footer.site .trust-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  footer.site .trust-row { grid-template-columns: 1fr; }
  .tab-bar a, .tab-bar button { font-size: .68rem; }
}
@media print { .tab-bar, .bg-deko, #scroll-progress { display: none !important; } }

/* Soziale Kanäle: kleine Chips (gleiches Format für alle – Fairness) */
.soc-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
a.soc {
  display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface);
  font-size: .82rem; font-weight: 700; color: var(--ink-2); text-decoration: none;
}
a.soc:hover { border-color: var(--accent); color: var(--accent); }
.dorf-row { font-size: .92rem; }

/* Brand mit Untertitel */
.brand-text { display: grid; line-height: 1.15; }
.brand-text small { font-size: .68rem; font-weight: 600; color: var(--ink-3); letter-spacing: .04em; }

/* Analyse-Badges im Vergleich: nie umbrechen, sauber rechtsbündig vor dem Plus */
details.acc > summary { flex-wrap: nowrap; }
details.acc > summary .pos { white-space: nowrap; flex: none; margin-left: auto; font-size: .8rem; }
details.acc > summary::after { flex: none; margin-left: .5rem; }
@media (max-width: 560px) {
  details.acc > summary { flex-wrap: wrap; }
  details.acc > summary .pos { margin-left: 0; }
}

/* Punkt-Navigation: Abschnitts-Punkte am rechten Rand (nur große Bildschirme) */
.dot-nav {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 60;
  display: none; flex-direction: column; gap: 10px; padding: 8px 6px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line);
  border-radius: 8px; backdrop-filter: blur(4px);
}
@media (min-width: 1240px) { .dot-nav { display: flex; } }
.dot-nav button {
  width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink-3);
  background: transparent; cursor: pointer; padding: 0; position: relative;
}
.dot-nav button:hover { border-color: var(--accent); }
.dot-nav button.aktiv { background: var(--accent); border-color: var(--accent); transform: scale(1.15); }
.dot-nav button .dn-tip {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  background: var(--ink); color: var(--bg); font-size: .75rem; font-weight: 700;
  padding: .25rem .55rem; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .15s;
}
.dot-nav button:hover .dn-tip, .dot-nav button:focus-visible .dn-tip { opacity: 1; }
[data-contrast="high"] .dot-nav { background: var(--surface); }
@media print { .dot-nav { display: none !important; } }

/* =====================================================================
   Freundebuch-Steckbrief (Personen-Profile)
   ===================================================================== */
.fb-buch {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.4rem 1.5rem 1.2rem; box-shadow: var(--shadow); max-width: 46rem;
  background-image: linear-gradient(color-mix(in srgb, var(--accent) 4%, transparent) 1px, transparent 1px);
  background-size: 100% 2.2rem;
}
.fb-ecke { position: absolute; top: -14px; right: 16px; font-size: 1.7rem; transform: rotate(8deg); }
.fb-titel { margin: 0 0 .8rem; font-size: 1.25rem; }
.fb-zeile { display: grid; gap: .15rem; padding: .55rem 0; border-bottom: 2px dashed var(--line); }
.fb-zeile:last-of-type { border-bottom: 0; }
.fb-frage { font-weight: 800; color: var(--accent); font-size: .95rem; }
.fb-antwort { color: var(--ink); }
.fb-blank { color: var(--ink-3); font-style: italic; border-bottom: 2px dotted var(--ink-3); padding-bottom: 1px; }
.fb-cta { margin-top: .9rem; background: var(--accent-soft); border-radius: 8px; padding: .7rem .9rem; }
.fb-cta p { margin: 0; font-size: .95rem; }
.ts-badge.kein-score .ts-none {
  display: inline-block; font-size: .78rem; font-weight: 700; color: var(--ink-2);
  border: 1.5px dashed var(--ink-3); border-radius: 7px; padding: .12rem .5rem;
}

/* Übungs-Stimmzettel (Wahl-ABC) */
.sim-zettel { max-width: 44rem; }
.sim-liste { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin: .55rem 0; background: var(--bg); }
.sim-listenname { margin: 0 0 .3rem; }
.sim-person { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .3rem 0; border-top: 1px dashed var(--line); }
.sim-kreise { display: flex; gap: .4rem; }
.sim-kreis {
  width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--ink-2); background: var(--surface);
  cursor: pointer; font-weight: 900; font-size: 1.05rem; color: var(--accent); display: grid; place-items: center; padding: 0;
}
.sim-kreis:hover { border-color: var(--accent); }
.sim-kreis.voll { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 560px) { .sim-name { font-size: .95rem; } .sim-kreis { width: 40px; height: 40px; } }

/* „Keine Angabe“ → Nachfrage-Aufforderung (bewusst warnend gestaltet) */
.nachfrage {
  border: 2px dashed var(--warn); border-radius: 8px; background: color-mix(in srgb, var(--warn) 8%, transparent);
  padding: .7rem .9rem; margin: .6rem 0;
}
.nachfrage .nf-titel { margin: 0 0 .25rem; font-weight: 800; color: var(--warn); }
.nachfrage p { margin: .2rem 0; }
.nachfrage .nf-aktion { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.nf-btn { padding: .45rem .9rem; font-size: .9rem; }
a.nf-mini, button.nf-mini {
  display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; font-weight: 700;
  color: var(--warn); border: 1.5px dashed var(--warn); border-radius: 7px; padding: .1rem .5rem;
  background: none; cursor: pointer; text-decoration: none; font-family: inherit;
}
a.nf-mini:hover, button.nf-mini:hover { background: color-mix(in srgb, var(--warn) 12%, transparent); }

/* Zeitungs-Layout News */
.np-toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .8rem 0 .3rem; }
.np-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.np-chip {
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2);
  border-radius: 7px; padding: .3rem .7rem; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer;
}
.np-chip.aktiv { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
#np-suche { max-width: 16rem; margin-left: auto; }
.np-aufmacher { border-left: 6px solid var(--accent); margin: .8rem 0 1rem; }
.np-kicker { margin: 0; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.np-aufmacher .np-titel a { color: var(--ink); text-decoration: none; font-size: 1.35rem; line-height: 1.3; }
.np-aufmacher .np-titel a:hover { color: var(--accent); text-decoration: underline; }
.np-grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.np-grid .np-item { margin: 0; display: flex; flex-direction: column; }
.np-meta { margin: 0 0 .25rem; }
.np-grid .np-titel { margin: 0 0 .3rem; font-size: 1.02rem; line-height: 1.35; }
.np-grid .np-titel a { color: var(--ink); text-decoration: none; }
.np-grid .np-titel a:hover { color: var(--accent); text-decoration: underline; }
.np-anriss { margin: 0; color: var(--ink-2); }
@media (max-width: 560px) { #np-suche { max-width: none; width: 100%; margin-left: 0; } }

/* Wunsch-Erlebnis: Wizard + Wunsch-Wand */
.wz-fortschritt { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: .2rem 0 1rem; }
.wz-fortschritt i { display: block; height: 100%; width: 25%; background: var(--accent); transition: width .3s ease; }
.wz-frage { font-size: 1.15rem; font-weight: 700; margin: .3rem 0 .7rem; }
.wz-themen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.wz-kachel {
  display: grid; justify-items: center; gap: .25rem; padding: .8rem .4rem; border: 2px solid var(--line);
  border-radius: 8px; background: var(--bg); cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700; color: var(--ink-2);
  transition: transform .15s ease, border-color .15s ease;
}
.wz-kachel:hover { transform: translateY(-2px); border-color: var(--accent); }
.wz-kachel.aktiv { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.wk-emoji { font-size: 1.6rem; }
.wand { column-width: 260px; column-gap: .9rem; margin-top: .8rem; }
.zettel {
  break-inside: avoid; display: block; position: relative; margin: 0 0 .9rem; padding: .9rem 1rem 2.3rem;
  border-radius: 4px; box-shadow: 0 3px 10px rgba(0,0,0,.13); border-top: 14px solid rgba(0,0,0,.06);
}
.zettel.z1 { background: #fef9c3; transform: rotate(-.7deg); }
.zettel.z2 { background: #dcfce7; transform: rotate(.6deg); }
.zettel.z3 { background: #e0f2fe; transform: rotate(-.4deg); }
.zettel.z4 { background: #fce7f3; transform: rotate(.8deg); }
.zettel.z5 { background: #ffedd5; transform: rotate(-.9deg); }
[data-theme="dark"] .zettel { color: #1a2330; }
.z-thema { margin: 0; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; opacity: .65; }
.z-text { margin: .25rem 0 .4rem; font-size: .98rem; line-height: 1.5; }
.z-fuss { margin: 0; font-size: .78rem; opacity: .65; }
.z-plus {
  position: absolute; right: .6rem; bottom: .5rem; text-decoration: none; font-weight: 800; font-size: .9rem;
  color: #1a2330; background: rgba(255,255,255,.72); border-radius: 7px; padding: .15rem .55rem; border: 1px solid rgba(0,0,0,.15);
}
.z-plus:hover { background: #fff; }
[data-contrast="high"] .zettel { transform: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.wz-konfetti {
  position: fixed; top: -12px; width: 10px; height: 16px; z-index: 200; pointer-events: none;
  animation: konfettiFall 2.6s ease-in forwards;
}
@keyframes konfettiFall { to { transform: translateY(105vh) rotate(560deg); opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .wz-konfetti { display: none; } .zettel { transform: none; } }

/* hidden-Attribut darf nie von Display-Klassen überstimmt werden */
.btn[hidden], .np-chip[hidden], .wz-kachel[hidden] { display: none !important; }

/* =====================================================================
   Neues Seiten-Erlebnis: Seitenkopf, Kapitel-Chips, Gliederung, Top-Knopf
   ===================================================================== */
.seitenkopf {
  position: relative; overflow: hidden;
  border-radius: calc(var(--radius) + 6px); padding: 1.8rem 1.6rem 1.5rem;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
  border: 1px solid var(--line); margin: .4rem 0 1rem;
}
.seitenkopf > *:not(.hero-lines) { position: relative; z-index: 1; }
.seitenkopf h1 { margin: 0 0 .35rem; }
.seitenkopf .lead { margin: .3rem 0 .2rem; }
.seitenkopf .datenstand { margin: .5rem 0 0; }

/* Kapitel-Chips: „Auf dieser Seite“ */
.kapitel {
  display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
  margin: 0 0 1.2rem; padding: .55rem .7rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
}
.kap-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-right: .2rem; }
.kapitel a {
  display: inline-block; padding: .25rem .65rem; border-radius: 7px; text-decoration: none;
  font-size: .85rem; font-weight: 700; color: var(--ink-2); background: var(--surface-2);
  transition: background .15s, color .15s, transform .15s;
}
.kapitel a:hover { background: var(--accent-soft); color: var(--ink); transform: translateY(-1px); }

/* Abschnitts-Gliederung: Trenner + Akzent-Überschriften */
main > .section + .section, main > section.section + section.section { border-top: 1px solid var(--line); padding-top: 1.6rem; }
main h2 { position: relative; padding-left: .85rem; }
main h2::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 5px;
  border-radius: 3px; background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 40%, transparent));
}
main .seitenkopf h2, .acc h2 { padding-left: 0; }
main .seitenkopf h2::before { display: none; }

/* Gestaffelte Karten-Einblendung */
.reveal.visible .card { animation: none; }
.grid > .card { transition: opacity .45s ease, transform .45s ease; }
.reveal:not(.visible) .grid > .card { opacity: 0; transform: translateY(10px); }
.reveal.visible .grid > .card:nth-child(2) { transition-delay: .06s; }
.reveal.visible .grid > .card:nth-child(3) { transition-delay: .12s; }
.reveal.visible .grid > .card:nth-child(4) { transition-delay: .18s; }
@media (prefers-reduced-motion: reduce) { .reveal:not(.visible) .grid > .card { opacity: 1; transform: none; } }

/* Nach-oben-Knopf */
#top-btn {
  position: fixed; right: 1.1rem; bottom: 6.4rem; z-index: 79;
  width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--accent); font-size: 1.3rem; font-weight: 800;
  cursor: pointer; box-shadow: var(--shadow);
}
#top-btn:hover { background: var(--accent-soft); }
#top-btn[hidden] { display: none !important; }
@media (max-width: 920px) {
  #top-btn { bottom: calc(140px + env(safe-area-inset-bottom)); right: .8rem; width: 42px; height: 42px; }
  .seitenkopf { padding: 1.2rem 1rem 1rem; }
  .kapitel { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .kapitel a { white-space: nowrap; }
}
@media print { #top-btn, .kapitel { display: none !important; } }

/* Stimmungs-Balken (eine Farbe = eine Größe, Werte direkt beschriftet) */
.sbalken-liste { display: grid; gap: .55rem; margin: .6rem 0; }
.sbalken { display: grid; grid-template-columns: minmax(150px, 2fr) 3fr auto; gap: .6rem; align-items: center; }
.sb-label { font-size: .92rem; font-weight: 600; }
.sb-track { height: 18px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.sb-track i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--accent); transition: width 1s ease; }
.sb-track i.los { width: var(--w); }
.sb-wert { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 3.2rem; text-align: right; }
@media (max-width: 560px) { .sbalken { grid-template-columns: 1fr auto; } .sb-label { grid-column: 1 / -1; margin-bottom: -.3rem; } }
@media (prefers-reduced-motion: reduce) { .sb-track i { transition: none; width: var(--w); } }
html.no-anim .sb-track i { transition: none; width: var(--w); }
