/*
 * moser, Vorsorge-Check – Gestaltung
 * Farben aus dem Auftritt von moser, (Blau #0050A0, Marineblau #002C58), aufgefrischt:
 * helles, kühles Papier, tiefes Marineblau für Flächen, ein klares Blau für Aktionen.
 * Das Komma aus dem Logo ist das wiederkehrende Formelement (schräge Parallelogramme).
 */
:root {
  --ink: #0A1F3C;
  --ink-2: #3D5170;
  --muted: #6A7B93;
  --line: #DDE5EF;
  --line-2: #C9D5E4;
  --bg: #F3F6FA;
  --card: #FFFFFF;
  --navy: #0B2E5B;
  --navy-2: #0F3B73;
  --blue: #0057B8;
  --blue-brand: #0050A0;
  --blue-soft: #E7F0FB;
  --sky: #CFE2F7;
  --good: #0B8A74;
  --good-soft: #E3F5F0;
  --gold: #F2B33D;
  --gold-soft: #FFF4DC;
  /* Produkte (validiert: Lichtband, Chroma, Farbsehschwächen) */
  --c-riester: #E0892B;
  --c-avd: #0057B8;
  --c-kombi: #0E9F86;
  --radius: 14px;
  /* Diagrammfarben wie in der Vorsorgebilanz */
  --s-eigen: #3987E5;
  --s-eigen-b: #8FBCF3;
  --s-zul: #D95926;
  --s-steuer: #199E70;
  --s-rente: #3987E5;
  --s-guthaben: #1E3A66;
  --shadow: 0 1px 2px rgba(10, 31, 60, .05), 0 4px 16px -6px rgba(10, 31, 60, .10);
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font: 16px/1.55 var(--font); color: var(--ink);
  background: var(--bg);
}
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.012em; line-height: 1.18; margin: 0; }
b, strong { font-weight: 600; }
.zahl input { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }

/* ------------------------------------------------------------ Kopf & Fuß */
.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px max(16px, env(safe-area-inset-left)); padding-top: max(14px, env(safe-area-inset-top));
  background: rgba(243, 246, 250, .82); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid rgba(201, 213, 228, .6);
}
.kopf-logo img { height: 26px; width: auto; }
.kopf-titel {
  font: 600 13px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--navy);
  padding: 8px 12px; border-radius: 6px; background: var(--blue-soft);
}
#app { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 20px 16px 48px; }
.fuss {
  text-align: center; padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 13px;
  border-top: 1px solid var(--line); background: #fff;
}
.fuss img { margin: 0 auto 10px; height: 20px; width: auto; opacity: .9; }
.fuss p { margin: 0 0 8px; }
.fuss nav { display: flex; gap: 18px; justify-content: center; }
.fuss a { color: var(--ink-2); }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 10px; border: 0; cursor: pointer;
  font: 600 16px/1 var(--font); background: var(--blue); color: #fff; text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 40, 90, .25);
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: #004A9E; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-gross { min-height: 60px; font-size: 18px; padding: 0 28px; border-radius: 12px; }
.btn-hell { background: #fff; color: var(--navy); box-shadow: none; border: 1.5px solid var(--line-2); }
.btn-hell:hover { background: var(--blue-soft); }
.btn-leise { background: transparent; color: var(--ink-2); box-shadow: none; padding: 0 12px; }
.btn-leise:hover { background: rgba(10, 31, 60, .05); }
.btn-weiss { background: #fff; color: var(--navy); box-shadow: none; }
.btn-weiss:hover { background: var(--blue-soft); }
.btn-gruen { background: #1A7F4B; box-shadow: none; }
.btn-gruen:hover { background: #0E7A40; }

/* ------------------------------------------------------------ Start */
.start {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 20px; padding: 40px 24px 28px; color: #fff;
  background: linear-gradient(160deg, var(--navy-2) 0%, var(--navy) 55%, #08234A 100%);
  box-shadow: var(--shadow);
}
.start-deko { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.start-deko i {
  position: absolute; display: block; background: var(--blue);
  clip-path: polygon(34% 0, 100% 0, 100% 9%, 49% 100%, 0 100%);
}
.start-deko i:nth-child(1) { width: 180px; height: 250px; right: -40px; top: -40px; opacity: .35; }
.start-deko i:nth-child(2) { width: 110px; height: 150px; right: 110px; top: 120px; opacity: .12; background: #4C9BEA; }
.start-deko i:nth-child(3) { display: none; }
.kicker { margin: 0 0 12px; font: 600 13px/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #9CC6F3; }
.start h1 { font-size: clamp(30px, 7.4vw, 46px); font-weight: 600; max-width: 18ch; }
.komma { color: #6FB1F5; }
.start-text { font-size: 17px; color: #D3E3F6; max-width: 46ch; margin: 18px 0 24px; }
.start-punkte { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0 0 28px; flex-wrap: wrap; }
.start-punkte li {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
}
.start-punkte svg { width: 18px; height: 18px; fill: none; stroke: #9CC6F3; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.start-punkte span { font-size: 14px; color: #DCE8F6; }
.start .btn { background: #fff; color: var(--navy); box-shadow: none; }
.start .btn:hover { background: var(--blue-soft); }
.start-fuss { margin: 16px 0 0; font-size: 13px; color: #9FB7D3; }

/* ------------------------------------------------------------ Fragen */
.fortschritt { display: flex; align-items: center; gap: 12px; margin: 4px 4px 16px; }
.fortschritt-balken { flex: 1; height: 8px; border-radius: 99px; background: #DCE5F0; overflow: hidden; }
.fortschritt-balken i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--blue), #3A8EE6); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
#fortschritt-text { font: 600 13px/1 var(--display); color: var(--muted); white-space: nowrap; }
.frage {
  background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 28px 22px 22px;
  border: 1px solid rgba(201, 213, 228, .5);
}
.frage.rein { animation: rein .38s cubic-bezier(.2, .8, .2, 1); }
.frage.rein-zurueck { animation: reinZurueck .38s cubic-bezier(.2, .8, .2, 1); }
@keyframes rein { from { opacity: 0; transform: translateX(24px); } }
@keyframes reinZurueck { from { opacity: 0; transform: translateX(-24px); } }
.frage-kapitel { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font: 600 12px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.frage-kapitel::before { content: ''; width: 16px; height: 2px; background: currentColor; }
.frage h2 { font-size: clamp(25px, 6.4vw, 32px); font-weight: 600; color: var(--navy); }
.frage-hinweis { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.frage-feld { margin-top: 24px; }
.frage-fehler { min-height: 22px; margin: 10px 0 0; color: #B42318; font-size: 14px; font-weight: 600; }
.frage-aktionen { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.frage-aktionen .btn:last-child { margin-left: auto; min-width: 140px; }

/* Auswahl-Kacheln */
.wahl { display: grid; gap: 10px; }
.wahl.zwei { grid-template-columns: 1fr 1fr; }
.wahl-option {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  min-height: 64px; padding: 14px 16px; border-radius: 12px; cursor: pointer;
  background: #F7FAFD; border: 1.5px solid var(--line); transition: border-color .15s, background .15s, transform .12s;
}
.wahl-option:hover { border-color: #9EBFE6; background: #fff; }
.wahl-option:active { transform: scale(.99); }
.wahl-option[aria-checked=true] { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.wahl-option { transition: border-color .2s var(--ease), background .2s var(--ease), transform .12s var(--ease); }
.wahl-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.wahl-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--navy); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.wahl-option[aria-checked=true] .wahl-icon { background: var(--blue); border-color: var(--blue); }
.wahl-option[aria-checked=true] .wahl-icon svg { stroke: #fff; }
.wahl-text b { display: block; font-weight: 600; font-size: 16px; }
.wahl-text small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

/* Große Zahleneingabe */
.zahl { display: flex; align-items: baseline; justify-content: center; gap: 8px; padding: 18px 16px; border-radius: 12px; background: #F7FAFD; border: 1.5px solid var(--line); transition: border-color .15s, box-shadow .15s; }
.zahl:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 87, 184, .12); background: #fff; }
.zahl input { width: 100%; min-width: 0; border: 0; background: transparent; outline: 0; text-align: center; font: 600 clamp(36px, 10vw, 46px)/1.1 var(--display); color: var(--navy); letter-spacing: -.02em; }
.zahl input::placeholder { color: #B9C7D8; }
.zahl span { font: 600 20px/1 var(--display); color: var(--muted); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.chip {
  min-height: 40px; padding: 0 14px; border-radius: 8px; border: 1.5px solid var(--line-2); background: #fff; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--ink-2); transition: all .15s;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip[aria-pressed=true] { background: var(--navy); border-color: var(--navy); color: #fff; }
.zahl-zusatz { text-align: center; margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* Kinder */
.kinder { display: grid; gap: 10px; }
.kind { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 10px; background: #F7FAFD; border: 1.5px solid var(--line); }
.kind label { flex: 1; font-weight: 600; color: var(--ink-2); }
.kind input { width: 110px; height: 46px; border-radius: 12px; border: 1.5px solid var(--line-2); text-align: center; font: 600 20px/1 var(--display); color: var(--navy); background: #fff; }
.kind input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 87, 184, .12); }
.kind button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.kind button:hover { background: #FDECEC; color: #B42318; }
.kind button svg { width: 18px; height: 18px; margin: auto; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.kind-plus { justify-self: start; }

/* Rechnen-Zwischenschritt */
.rechnet { text-align: center; padding: 56px 20px; }
.rechnet h2 { color: var(--navy); font-size: 26px; margin-top: 22px; }
.rechnet p { color: var(--muted); margin: 8px 0 0; }
.rechnet-komma { display: flex; gap: 8px; justify-content: center; }
.rechnet-komma i { width: 18px; height: 26px; background: var(--blue); clip-path: polygon(34% 0, 100% 0, 100% 9%, 49% 100%, 0 100%); animation: hupf .9s ease-in-out infinite; }
.rechnet-komma i:nth-child(2) { animation-delay: .12s; background: #3A8EE6; }
.rechnet-komma i:nth-child(3) { animation-delay: .24s; background: var(--c-kombi); }
@keyframes hupf { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-10px); opacity: 1; } }

/* ------------------------------------------------------------ Auswertung */
/* Jede Stufe ist eine Seite, die in den Bildschirm passt. Einheitlicher Aufbau:
   Titel → Kennzahlen → gleich hohe Karten → Hinweis → Knopfleiste.
   Nur wenn es gar nicht passt, scrollt der Inhalt der Seite selbst. */
body.ergebnis-modus #app {
  flex: none; display: flex; flex-direction: column;
  height: calc(100vh - var(--kopf-h, 57px)); height: calc(100dvh - var(--kopf-h, 57px)); min-height: 520px;
  padding-top: 12px; padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.auswertung { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#kapitel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.auswertung > .kapitel.rechnet { margin: auto 0; }
.kapitel.seite { --px: 18px; flex: 1; min-height: 0; display: flex; flex-direction: column; margin: 0; padding-left: var(--px); padding-right: var(--px); }
.seite-inhalt {
  flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; margin: -4px; padding: 4px;
}
.seite-inhalt > * { flex: none; }

/* Kopfzeile: Schritte + Personenwahl */
.a-kopf { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 2px 12px; }
.schritte ol { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.schritte li { display: flex; align-items: center; gap: 4px; }
.schritte li + li::before { content: ''; width: 18px; height: 1.5px; background: var(--line-2); }
.schritte li.fertig + li::before, .schritte li.jetzt::before { background: var(--blue); }
.schritte button, .schritte .schritt {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 10px 4px 4px; border: 0; border-radius: 99px;
  background: transparent; font: 600 13px/1 var(--font); color: var(--muted); white-space: nowrap;
}
.schritte button { cursor: pointer; color: var(--ink-2); }
.schritte button:hover { background: rgba(10, 31, 60, .05); }
.schritte b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 700 12px/1 var(--display); background: #fff; border: 1.5px solid var(--line-2); color: var(--muted); }
.schritte .fertig b { background: var(--blue-soft); border-color: var(--blue-soft); color: var(--blue); }
.schritte .jetzt .schritt { color: var(--navy); background: #fff; box-shadow: 0 1px 3px rgba(10, 31, 60, .1); }
.schritte .jetzt b { background: var(--navy); border-color: var(--navy); color: #fff; }
.person-wahl { display: inline-flex; padding: 4px; border-radius: 10px; background: #E4EBF4; gap: 2px; }
.person-wahl button { border: 0; background: transparent; min-height: 36px; padding: 0 14px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.person-wahl button[aria-pressed=true] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(10, 31, 60, .12); }

/* Seite */
.kapitel {
  position: relative; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); border: 1px solid rgba(201, 213, 228, .5);
  padding: 20px 18px 16px; margin-bottom: 18px;
}
.kapitel.neu, .kapitel.neu-zurueck { animation: blende .35s var(--ease); }
@keyframes blende { from { opacity: 0; } }
.auftauchen { animation: auftauchen .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 60ms); }
@keyframes auftauchen { from { opacity: 0; transform: translateY(8px); } }
.seite-kopf h2 { font-size: clamp(22px, 5.2vw, 28px); color: var(--navy); font-weight: 600; text-wrap: balance; }
.seite-kopf h2 em { font-style: normal; color: var(--blue); }
.kapitel-unter { margin: 6px 0 0; max-width: 72ch; color: var(--ink-2); font-size: 15px; line-height: 1.5; }

/* Knopfleiste: zurück links, weiter rechts */
.kapitel-weiter { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.kapitel-weiter .btn-gross { min-height: 52px; font-size: 16px; padding: 0 22px; line-height: 1.2; text-align: center; }
.btn-zurueck { margin-right: auto; min-height: 52px; padding: 0 16px 0 12px; }

/* Kennzahlen-Reihe */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; margin: 0; }
.kpi { min-width: 0; padding: 12px 16px; border-radius: 12px; background: #F5F8FC; border: 1px solid var(--line); }
.kpi dt { font-size: 13px; font-weight: 600; color: var(--ink-2); line-height: 1.3; hyphens: auto; overflow-wrap: anywhere; }
.kpi dd { margin: 4px 0 0; }
.kpi dd b { display: block; font: 700 clamp(20px, 2.4vw, 26px)/1.15 var(--display); color: var(--navy); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi dd small { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.3; }
.kpi.haupt { background: var(--navy); border-color: var(--navy); }
.kpi.haupt dt, .kpi.haupt dd small { color: #B9CDE6; }
.kpi.haupt dd b { color: #fff; }
.kpi.gut { background: var(--good-soft); border-color: #BFE6DC; transition: box-shadow .8s var(--ease); }
.kpi.gut dd b { color: var(--good); }
.kpi.gut.betont { box-shadow: 0 0 0 4px rgba(11, 138, 116, .1); }
.kpi.warn { background: #FFF4E8; border-color: #F3D9B8; }
.kpi.warn dd b { color: #A04E0C; }

/* Karten: nebeneinander, immer gleich hoch */
.karten { flex: 1 1 auto !important; min-height: 280px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.karte { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.karte-kopf { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; list-style: none; }
.karte-titel { font: 600 16px/1.3 var(--display); color: var(--navy); }
.karte-unter { font-size: 13px; color: var(--muted); line-height: 1.35; }
.karte-inhalt { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.karte-notiz { margin: auto 0 0; padding-top: 12px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.karte-notiz b { color: var(--navy); }
.klapp-karte > summary { cursor: pointer; position: relative; padding-right: 24px; margin-bottom: 0; }
.klapp-karte > summary::-webkit-details-marker { display: none; }
.klapp-karte > summary::after { content: ''; position: absolute; right: 4px; top: 6px; width: 8px; height: 8px; border: solid var(--blue); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.klapp-karte[open] > summary { margin-bottom: 8px; }
.klapp-karte[open] > summary::after { transform: rotate(-135deg); top: 10px; }
.klapp-karte.fest > summary { cursor: default; pointer-events: none; padding-right: 0; }
.klapp-karte.fest > summary::after { display: none; }
.klapp-karte:not([open]) { flex: none; }
.klapp-karte[open]::details-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* „Mehr erfahren“ und Hinweise */
.klapp-box { border-radius: 10px; border: 1px solid var(--line); background: #F7FAFD; }
.klapp-box summary {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; color: var(--navy);
}
.klapp-box summary::-webkit-details-marker { display: none; }
.klapp-box summary svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.klapp-box summary span { flex: 1; }
.klapp-box summary::after { content: ''; width: 8px; height: 8px; margin-top: -4px; border: solid var(--blue); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.klapp-box[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.klapp-inhalt { padding: 0 14px 14px; }
.klapp-inhalt .vorteile { margin: 0; }
.hinweis-box { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; background: var(--blue-soft); color: var(--navy); font-size: 14px; line-height: 1.5; }
.hinweis-box svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }
.hinweis-box p { margin: 0; }
.hinweis-box.warm { background: #FFF4E8; color: #5C3A10; }
.hinweis-box.warm svg { stroke: #C26A12; }
.vorteile { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.vorteile li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.vorteile li::before { content: ''; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 7px; background: var(--blue-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.5' fill='none' stroke='%230057B8' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.vorteile b { color: var(--ink); }

/* Säulendiagramm (Monatsrente) */
.saeulen-box { flex: 1 1 0; min-height: 190px; max-height: 480px; display: flex; flex-direction: column; margin-top: 18px; }
.saeulen { position: relative; flex: 1 1 0; min-height: 110px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: end; padding: 0 2px; border-bottom: 1.5px solid var(--line-2); }
.saeule { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.saeule-wert { font: 700 19px/1.1 var(--display); color: var(--navy); margin-bottom: 8px; text-align: center; transition: opacity .3s; white-space: nowrap; font-variant-numeric: tabular-nums; }
.saeule-wert small { display: block; font: 500 11px/1.2 var(--font); color: var(--muted); margin-top: 2px; }
.saeule-balken { position: relative; width: min(100%, 84px); height: 0; display: flex; flex-direction: column-reverse; gap: 2px; border-radius: 6px 6px 0 0; transition: height 1s var(--ease), box-shadow .6s var(--ease); cursor: default; }
.saeule-balken i { display: flex; align-items: center; justify-content: center; overflow: hidden; width: 100%; min-height: 2px; border-radius: 4px; font: 600 12px/1 var(--font); font-style: normal; color: #fff; white-space: nowrap; }
.saeule-balken i:last-child { border-radius: 8px 8px 4px 4px; }
.saeule-balken i.eng span { visibility: hidden; }
.saeule-balken .s-eigen-b { color: var(--navy); }
.saeule-balken .s-guthaben, .legende i.s-guthaben, .tip-farbe.s-guthaben, .rechnung .s-guthaben { background: var(--s-guthaben); }
.saeule-balken .s-eigen, .tip-farbe.s-eigen { background: var(--s-eigen); }
.saeule-balken .s-eigen-b, .tip-farbe.s-eigen-b { background: var(--s-eigen-b); }
.saeule-balken .s-zul, .tip-farbe.s-zul { background: var(--s-zul); }
.saeule-balken .s-steuer, .tip-farbe.s-steuer { background: var(--s-steuer); }
.tip-farbe { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.saeule.top.betont .saeule-balken { box-shadow: 0 0 0 4px rgba(57, 135, 229, .16); }
.saeule.gesperrt .saeule-balken { border: 2px dashed #C3D1E1; border-bottom: 0; border-radius: 10px 10px 0 0; background: repeating-linear-gradient(135deg, #F4F7FB 0 6px, #fff 6px 12px); }
.saeule.gesperrt .saeule-wert, .saeule.gesperrt .saeule-name { color: #A2B3C8; }
.saeule-name { position: absolute; top: calc(100% + 10px); left: 0; right: 0; text-align: center; font-weight: 600; font-size: 14px; line-height: 1.2; color: var(--ink); }
.saeulen-platz { flex: none; height: 44px; }
.legende { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 0; margin: 0; font-size: 12.5px; color: var(--ink-2); }
.legende li { display: flex; align-items: center; gap: 7px; }
.legende i { width: 12px; height: 12px; border-radius: 3px; background: #8EA3BD; }
.legende .legende-titel { color: var(--muted); font-weight: 600; }
.legende i.s-eigen, .einz-spur .s-eigen, .rechnung .s-eigen { background: var(--s-eigen); }
.legende i.s-eigen-b, .einz-spur .s-eigen-b { background: var(--s-eigen-b); }
.legende i.s-zul, .einz-spur .s-zul, .rechnung .s-zul { background: var(--s-zul); }
.legende i.s-steuer, .einz-spur .s-steuer, .rechnung .s-steuer { background: var(--s-steuer); }

/* Einzahlung pro Jahr: gestapelte Balken + Förderung */
.einz { display: grid; gap: 10px; }
.einz-kopf, .einz-zeile { display: grid; grid-template-columns: 86px minmax(0, 1fr) 112px; gap: 12px; align-items: center; }
.einz-kopf { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.einz-kopf span:first-child { grid-column: 1 / 3; }
.einz-name { font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.2; }
.einz-spur { display: flex; gap: 2px; height: 30px; min-width: 0; overflow: hidden; }
.einz-spur i {
  flex: 0 1 auto; min-width: 3px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-radius: 4px; font: 600 12px/1 var(--font); font-style: normal; color: #fff; white-space: nowrap; cursor: default;
}
.einz-spur .s-eigen-b { color: var(--navy); }
.einz-spur i.eng span { visibility: hidden; }
.einz-spur.wachsen { animation: wachsen .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms + 120ms); }
@keyframes wachsen { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.einz-wert { line-height: 1.15; }
.einz-wert b { display: block; font-size: 16px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; transition: color .6s var(--ease); }
.einz-wert small { font-size: 12px; color: var(--muted); }
.einz-zeile.beste.betont .einz-wert b { color: var(--good); }
.einz .legende { margin-top: 4px; }

/* Rechnung (ein Produkt): Balken + Posten + Summe */
.rechnung { flex: 1; display: flex; flex-direction: column; }
.rechnung-balken { display: flex; gap: 2px; height: 14px; margin: 6px 0 14px; }
.rechnung-balken i { border-radius: 4px; }
.rechnung dl { margin: 0; }
.rechnung dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.rechnung dt { display: flex; align-items: center; gap: 10px; color: var(--ink-2); }
.rechnung dt i { flex: none; width: 12px; height: 12px; border-radius: 3px; }
.rechnung dd { margin: 0; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rechnung dl > .summe { border-bottom: 0; border-top: 1.5px solid var(--line-2); margin-top: -1px; }
.rechnung .summe dt { font-weight: 600; color: var(--ink); }
.rechnung .summe dd { font: 700 18px/1 var(--display); }

/* Tooltip */
.tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 260px;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.45;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .5); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.tip.an { opacity: 1; transform: none; }
.tip b { font-family: var(--display); font-size: 14px; }
.tip .z { display: flex; justify-content: space-between; gap: 14px; }
.tip .z span { color: #B9CBE2; }

/* Verlauf */
.verlauf-karte .karte-inhalt { gap: 10px; }
.verlauf-leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.reiter { display: inline-flex; padding: 4px; border-radius: 10px; background: #E4EBF4; gap: 2px; max-width: 100%; overflow-x: auto; }
.reiter button { flex: none; border: 0; background: transparent; min-height: 36px; padding: 0 14px; border-radius: 7px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.reiter button[aria-selected=true] { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(10, 31, 60, .12); }
.linien { position: relative; flex: 1 1 0; min-height: 180px; touch-action: pan-y; }
.linien svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.linien .gitter line { stroke: #E6ECF3; stroke-width: 1; }
.linien .achse text { fill: var(--muted); font: 500 11px var(--font); }
.linien .linie { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.linien .marker line { stroke: #9AAEC6; stroke-dasharray: 4 4; }
.linien .marker text { fill: var(--ink-2); font: 600 11px var(--font); }
.linien .kreuz { stroke: var(--navy); stroke-width: 1; opacity: 0; }
.linien .punkt { stroke: #fff; stroke-width: 2; opacity: 0; }
.linien.aktiv .kreuz, .linien.aktiv .punkt { opacity: 1; }
.verlauf-aussage { margin: 0; padding: 10px 14px; border-radius: 10px; background: #F5F8FC; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.verlauf-aussage b { color: var(--navy); }

/* Ergebnis: Varianten nebeneinander + Beratung */
.produkte { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.produkt {
  position: relative; display: flex; flex-direction: column; padding: 16px 18px 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--farbe); transition: box-shadow .8s var(--ease);
}
.produkt.bestes { border-color: var(--blue); border-top-color: var(--farbe); box-shadow: 0 0 0 1px var(--blue); }
.produkt.bestes.betont { box-shadow: 0 0 0 1px var(--blue), 0 8px 24px -10px rgba(0, 87, 184, .35); }
.produkt-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 24px; }
.produkt-name { font-weight: 600; font-size: 15px; color: var(--ink); }
.produkt-badge { flex: none; padding: 4px 8px; border-radius: 6px; background: var(--blue-soft); color: var(--blue); font: 600 12px/1 var(--display); }
.produkt.bestes .produkt-badge { background: var(--blue); color: #fff; }
.produkt-rente { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.produkt-rente b { font: 700 clamp(30px, 3.4vw, 40px)/1 var(--display); color: var(--navy); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.produkt-rente span { font-size: 14px; color: var(--muted); font-weight: 600; }
.produkt-diff { margin: 6px 0 0; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.produkt.bestes .produkt-diff { color: var(--good); }
.produkt-balken { height: 8px; margin: 14px 0; border-radius: 99px; background: #EEF2F7; overflow: hidden; }
.produkt-balken i { display: block; height: 100%; border-radius: 99px; background: var(--farbe); }
.produkt dl { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.produkt dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.produkt dt { color: var(--muted); }
.produkt dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.beratung {
  position: relative; overflow: hidden; isolation: isolate; display: grid; gap: 14px; align-items: center;
  padding: 18px 20px; border-radius: 14px; background: var(--navy); color: #fff;
}
.beratung::after { content: ''; position: absolute; z-index: -1; right: -20px; top: -30px; width: 120px; height: 170px; background: var(--blue); opacity: .3; clip-path: polygon(34% 0, 100% 0, 100% 9%, 49% 100%, 0 100%); }
.beratung-text b { display: block; font: 600 18px/1.3 var(--display); }
.beratung-text p { margin: 4px 0 0; color: #C9DAEE; font-size: 14px; line-height: 1.5; max-width: 60ch; }
.kontakt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kontakt .btn { width: 100%; min-height: 48px; padding: 0 12px; gap: 8px; font-size: 15px; white-space: nowrap; }
.btn-rand { background: transparent; color: #fff; box-shadow: none; border: 1.5px solid rgba(255, 255, 255, .4); }
.btn-rand:hover { background: rgba(255, 255, 255, .1); }
.kleingedrucktes { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
/* Ergebnis-Seite: Inhalt als Block senkrecht mittig, falls Platz übrig ist */
.fazit .seite-inhalt > :first-child { margin-top: auto; }
.fazit .seite-inhalt > :last-child { margin-bottom: auto; }
.fazit-aktionen { display: flex; gap: 4px; }
.fazit-unten .btn-leise { min-height: 48px; }

/* ------------------------------------------------------------ Rechtliches */
.recht { background: #fff; border-radius: 28px; box-shadow: var(--shadow); padding: 28px 22px; }
.recht h1 { font-size: 32px; color: var(--navy); margin-bottom: 18px; }
.recht h2 { font-size: 20px; color: var(--navy); margin: 26px 0 8px; }
.recht p, .recht li { color: var(--ink-2); }
.recht address { font-style: normal; }

@media (min-width: 640px) {
  #app { padding-top: 32px; }
  .start { padding: 56px 48px 40px; }
  .frage { padding: 36px 36px 28px; }
  body.ergebnis-modus #app { padding-top: 16px; }
  .kapitel { padding: 24px 28px 18px; }
  .kapitel.seite { --px: 28px; }
  .saeulen { gap: 28px; }
}
/* Breite Bildschirme: zwei gleich hohe Karten, Varianten nebeneinander */
@media (min-width: 980px) and (min-height: 600px) {
  body.ergebnis-modus #app { max-width: 1120px; }
  .kapitel.seite { --px: 32px; padding-top: 26px; padding-bottom: 20px; }
  .karten.zwei { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .produkte.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .produkte.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .beratung { grid-template-columns: minmax(0, 1fr) auto; gap: 28px; padding: 22px 26px; }
  .kontakt .btn { min-width: 132px; }
}
/* Niedrige Bildschirme (Laptops): etwas enger, damit die Seiten ganz passen */
@media (max-height: 800px) {
  body.ergebnis-modus #app { padding-top: 10px; }
  .a-kopf { margin-bottom: 8px; }
  .seite-inhalt { gap: 12px; }
  .kapitel.seite { padding-top: 18px; padding-bottom: 14px; }
  .kpi { padding: 10px 14px; }
  .karte { padding: 12px 16px; }
  .karten { min-height: 240px; }
  .saeulen-box { min-height: 160px; margin-top: 12px; }
  .saeulen-platz { height: 40px; }
  .kapitel-weiter { margin-top: 10px; padding-top: 10px; }
  .produkt { padding: 12px 16px 12px; }
  .produkt dl { padding-top: 8px; }
  .produkt-balken { margin: 10px 0 10px; }
  .beratung { padding: 14px 18px; }
}
/* Schmale oder niedrige Bildschirme: statt Einpassen eine normale Seite zum Scrollen, Knopfleiste klebt unten */
@media (max-width: 979px), (max-height: 759px) {
  body.ergebnis-modus #app { height: auto; min-height: calc(100dvh - var(--kopf-h, 57px)); }
  .kapitel.seite { flex: 1 0 auto; padding-bottom: 0; }
  .seite-inhalt { flex: none; overflow: visible; }
  .karten { flex: none !important; min-height: 0; }
  .saeulen-box { flex: none; height: 270px; max-height: none; }
  .linien { flex: none; height: 300px; }
  .kapitel-weiter {
    position: sticky; bottom: 0; z-index: 5; margin: auto calc(-1 * var(--px)) 0; padding: 10px var(--px) max(12px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 0 0 16px 16px;
  }
  .fazit .seite-inhalt > :first-child { margin-top: 0; }
  .fazit .kleingedrucktes { margin-bottom: 12px; }
}
/* Schmale Bildschirme (Handys, Tablets hochkant) */
@media (max-width: 979px) {
  body.ergebnis-modus #app { padding-top: 10px; }
  .kapitel.seite { --px: 14px; padding-top: 16px; }
  .seite-inhalt { gap: 12px; }
  .schritte li + li::before { width: 8px; }
  .schritte li:not(.jetzt) b + span { display: none; }
  .schritte button, .schritte .schritt { padding-right: 4px; }
  .schritte .jetzt .schritt { padding-right: 12px; }
  .seite-kopf h2 { font-size: clamp(20px, 5.6vw, 26px); }
  .kapitel-unter { font-size: 14px; }
  .kpis { gap: 6px; }
  .kpi { padding: 8px 10px; border-radius: 10px; }
  .kpi dt { font-size: 11.5px; }
  .kpi dd b { font-size: 17px; }
  .kpi dd small { font-size: 11.5px; }
  .karten { gap: 10px; }
  .karte { padding: 12px 14px; }
  .karte-unter { display: none; }
  .saeulen-box { min-height: 0; margin-top: 10px; }
  .saeulen-box .legende { font-size: 12px; gap: 2px 12px; }
  .saeulen-box .legende-titel { display: none; }
  .saeule-wert { font-size: 17px; margin-bottom: 6px; }
  .einz-kopf, .einz-zeile { grid-template-columns: 64px minmax(0, 1fr) 96px; gap: 8px; }
  .einz-name { font-size: 13px; }
  .einz-spur { height: 24px; }
  .hinweis-box { font-size: 13px; padding: 10px 12px; gap: 10px; }
  .hinweis-box svg { width: 18px; height: 18px; }
  .kapitel-weiter .btn-gross { flex: 1; min-width: 0; font-size: 15px; padding: 0 14px; }
  .btn-zurueck { flex: none; width: 52px; padding: 0; }
  .btn-zurueck span { display: none; }
  .verlauf-aussage { font-size: 13px; padding: 8px 12px; }
  /* Ergebnis: Varianten als kompakte Zeilen */
  .produkte { gap: 8px; }
  .produkt { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px; padding: 10px 14px; border-top-width: 1px; border-left: 4px solid var(--farbe); }
  .produkt.bestes { border-left-color: var(--farbe); }
  .produkt-kopf { grid-column: 1; justify-content: flex-start; flex-wrap: wrap; }
  .produkt-name { font-size: 14px; }
  .produkt-badge { font-size: 11px; padding: 3px 6px; }
  .produkt-rente { grid-column: 2; grid-row: 1 / span 2; margin: 0; flex-direction: column; align-items: flex-end; gap: 2px; }
  .produkt-rente b { font-size: 22px; }
  .produkt-rente span { font-size: 12px; }
  .produkt-diff { grid-column: 1; margin: 0; font-size: 12.5px; }
  .produkt dl, .produkt-balken { display: none; }
  .beratung { padding: 14px; gap: 12px; }
  .beratung-text b { font-size: 16px; }
  .beratung-text p { font-size: 13px; }
  .kontakt { gap: 6px; }
  .kontakt .btn { font-size: 14px; padding: 0 6px; gap: 6px; }
  .kontakt .btn svg { width: 16px; height: 16px; }
  .fazit-aktionen .btn { padding: 0 10px; font-size: 14px; white-space: nowrap; }
  .kleingedrucktes { font-size: 10.5px; }
}
@media (max-width: 380px) {
  .saeule-wert { font-size: 16px; }
  .wahl.zwei { grid-template-columns: 1fr; }
  .kpi dd small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
