/* immonum.de · Richtung „Kontobuch“ (richtung/richtungsvertrag.md)
   Farben aus dem Programm (immonum.de/anmelden, gemessen 2026-10-19). */

:root {
  --bg: #f6f7f9;
  --flaeche: #ffffff;
  --flaeche-2: #eef1f5;
  --text: #1d2330;
  --leise: #5b6475;
  --linie: #dde1e8;
  --marke: #203d5d;
  --petrol: #35b2a2;          /* Logo, Flächen, Linie */
  --akzent: #1f6f5c;          /* Text, Knöpfe, Ergebnisse: Kontrast auf Weiß über 5:1 */
  --akzent-hover: #185a4a;
  --akzent-text: #ffffff;
  --ton: #eef1f5;             /* getönter Grund, kühl grau (nicht Petrol) */
  --negativ: #b42318;
  --raster: rgba(32, 61, 93, .075);
  --punkt: rgba(32, 61, 93, .17);
  --band: #203d5d;            /* dunkle Abschnitte */
  --band-flaeche: #2a4a6d;
  --band-text: #ffffff;
  --band-leise: #c3d1e2;
  --band-linie: rgba(255, 255, 255, .16);
  --band-akzent: #6fd3c2;
  --offen-bg: #fff4d6;
  --offen-text: #7a5300;
  --st-frei-bg: #e3f3ea; --st-frei-text: #1c6b43;
  --st-res-bg: #fdf0d3;  --st-res-text: #7a5300;
  --st-verk-bg: #e5ebf8; --st-verk-text: #2c4f8f;
  --s-ek: #203d5d; --s-miete: #35b2a2; --s-steuer: #8fb3dc; --s-zu: #e0a12a; --s-rest: #c9d3dc;
  --schatten: 0 1px 2px rgb(22 32 56 / .05), 0 4px 16px rgb(22 32 56 / .06);
  --schatten-hoch: 0 2px 6px rgb(22 32 56 / .07), 0 18px 40px rgb(22 32 56 / .13);
  --rund: 14px;
  --rund-klein: 8px;

  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Größen und Abstände (Regler-Panel in Phase 6) */
  --breite: 1180px;
  --rand: 16px;
  --abschnitt: clamp(64px, 9vw, 120px);
  --h1: clamp(34px, 5.4vw, 60px);
  --h2: clamp(26px, 3.4vw, 40px);
  --h3: 19px;
  --text-gross: clamp(17px, 1.5vw, 19px);
  --einstieg-oben: clamp(40px, 7vw, 96px);
  --karte-versatz: 0px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161d; --flaeche: #1b2029; --flaeche-2: #222834; --text: #e6e9ef; --leise: #a3acbb; --linie: #2c3442;
    --marke: #dbe7f6; --petrol: #4cb39a; --akzent: #4cb39a; --akzent-hover: #5fc6ad; --akzent-text: #0d1512;
    --ton: #1b2029; --negativ: #f08a7e; --raster: rgba(219, 231, 246, .06); --punkt: rgba(219, 231, 246, .15);
    --band: #17263a; --band-flaeche: #1f3049; --band-text: #e6e9ef; --band-leise: #a3acbb; --band-linie: rgba(255,255,255,.1); --band-akzent: #4cb39a;
    --offen-bg: #3a2f12; --offen-text: #f0c060;
    --st-frei-bg: #16302a; --st-frei-text: #8fdcb1; --st-res-bg: #3a2f12; --st-res-text: #f3c969; --st-verk-bg: #1d2a44; --st-verk-text: #a9c3f2;
    --s-ek: #8fb3dc; --s-miete: #4cb39a; --s-steuer: #4f78a8; --s-zu: #e0a12a; --s-rest: #3b4754;
    --schatten: 0 1px 2px rgb(0 0 0 / .35), 0 4px 16px rgb(0 0 0 / .3);
    --schatten-hoch: 0 2px 6px rgb(0 0 0 / .4), 0 18px 40px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12161d; --flaeche: #1b2029; --flaeche-2: #222834; --text: #e6e9ef; --leise: #a3acbb; --linie: #2c3442;
  --marke: #dbe7f6; --petrol: #4cb39a; --akzent: #4cb39a; --akzent-hover: #5fc6ad; --akzent-text: #0d1512;
  --ton: #1b2029; --negativ: #f08a7e; --raster: rgba(219, 231, 246, .06); --punkt: rgba(219, 231, 246, .15);
  --band: #17263a; --band-flaeche: #1f3049; --band-text: #e6e9ef; --band-leise: #a3acbb; --band-linie: rgba(255,255,255,.1); --band-akzent: #4cb39a;
  --offen-bg: #3a2f12; --offen-text: #f0c060;
  --st-frei-bg: #16302a; --st-frei-text: #8fdcb1; --st-res-bg: #3a2f12; --st-res-text: #f3c969; --st-verk-bg: #1d2a44; --st-verk-text: #a9c3f2;
  --s-ek: #8fb3dc; --s-miete: #4cb39a; --s-steuer: #4f78a8; --s-zu: #e0a12a; --s-rest: #3b4754;
  --schatten: 0 1px 2px rgb(0 0 0 / .35), 0 4px 16px rgb(0 0 0 / .3);
  --schatten-hoch: 0 2px 6px rgb(0 0 0 / .4), 0 18px 40px rgb(0 0 0 / .5);
  color-scheme: dark;
}

/* Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--schrift); }
img, svg, video { max-width: 100%; display: block; }
a { color: var(--akzent); text-underline-offset: .18em; }
a:hover { color: var(--akzent-hover); }
h1, h2, h3 { margin: 0; color: var(--marke); text-wrap: balance; line-height: 1.12; letter-spacing: -.02em; }
h1 { font-size: var(--h1); font-weight: 760; line-height: 1.04; }
h2 { font-size: var(--h2); font-weight: 740; }
h3 { font-size: var(--h3); font-weight: 680; letter-spacing: -.01em; line-height: 1.3; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.zahl, td, .betrag { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }
.huelle { max-width: var(--breite); margin: 0 auto; padding-inline: max(var(--rand), env(safe-area-inset-left)) max(var(--rand), env(safe-area-inset-right)); }
.abschnitt { padding-block: var(--abschnitt); position: relative; }
.kopf-abschnitt { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.kopf-abschnitt p { color: var(--leise); font-size: var(--text-gross); margin-top: 16px; }
.leise { color: var(--leise); }
.fein { font-size: 14px; color: var(--leise); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: 4px; }
.sprung { position: absolute; left: 12px; top: -60px; background: var(--flaeche); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.sprung:focus { top: 12px; }

/* Offene Stellen: vor dem Livegang ersetzen */
.offen { display: inline-block; background: var(--offen-bg); color: var(--offen-text); font: 600 13px/1.4 var(--mono); padding: 2px 8px; border-radius: 6px; border: 1px dashed currentColor; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 20px; border-radius: 10px; font: 650 16px/1.2 var(--schrift); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s; }
.knopf.haupt { background: var(--akzent); color: var(--akzent-text); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.knopf.haupt:hover { background: var(--akzent-hover); color: var(--akzent-text); transform: translateY(-1px); }
.knopf.kontur { background: var(--flaeche); color: var(--text); border-color: var(--linie); }
.knopf.kontur:hover { border-color: var(--leise); color: var(--text); }
.knopf.klein { min-height: 38px; padding: 7px 14px; font-size: 15px; border-radius: 9px; }
.knopf .pfeil { transition: transform .15s; }
.knopf:hover .pfeil { transform: translateX(3px); }
.knopf[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }

/* Kopfzeile */
.kopfzeile { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.kopfzeile.gescrollt { border-bottom-color: var(--linie); }
.kopfzeile .huelle { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo-link img { height: 34px; width: auto; }
.logo-link .wort { font: 700 23px/1 var(--schrift); color: var(--marke); letter-spacing: -.01em; }
.logo-link .wort span { color: var(--petrol); }
.logo-dunkel { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-hell { display: none !important; } :root:not([data-theme="light"]) .logo-dunkel { display: block !important; } }
:root[data-theme="dark"] .logo-hell { display: none !important; }
:root[data-theme="dark"] .logo-dunkel { display: block !important; }
.menue { display: flex; gap: 4px; }
.menue a { color: var(--leise); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 520; font-size: 15px; }
.menue a:hover { color: var(--text); background: var(--flaeche-2); }
.kopf-rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.anmelden { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 10px; border-radius: 8px; }
.anmelden:hover { background: var(--flaeche-2); color: var(--text); }
.thema-knopf, .menue-knopf { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); cursor: pointer; }
.thema-knopf:hover, .menue-knopf:hover { border-color: var(--leise); }
.thema-knopf svg, .menue-knopf svg { width: 20px; height: 20px; }
.thema-knopf .mond { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .thema-knopf .sonne { display: none; } :root:not([data-theme="light"]) .thema-knopf .mond { display: block; } }
:root[data-theme="dark"] .thema-knopf .sonne { display: none; }
:root[data-theme="dark"] .thema-knopf .mond { display: block; }
:root[data-theme="light"] .thema-knopf .mond { display: none; }
.menue-knopf { display: none; }
.mobil-menue { display: none; }

@media (max-width: 960px) {
  .menue { display: none; }
  .menue-knopf { display: inline-grid; }
  .kopf-rechts .knopf { display: none; }
  .mobil-menue { position: fixed; inset: 68px 0 auto 0; background: var(--flaeche); border-bottom: 1px solid var(--linie); box-shadow: var(--schatten-hoch); padding: 12px var(--rand) 20px; display: grid; gap: 4px; z-index: 49; }
  .mobil-menue[hidden] { display: none; }
  .mobil-menue a:not(.knopf) { padding: 12px 8px; color: var(--text); text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--linie); }
  .mobil-menue .knopf { margin-top: 12px; }
}
@media (max-width: 420px) { .anmelden { padding: 8px 6px; font-size: 14.5px; } .kopfzeile .huelle { gap: 12px; } .kopf-rechts { gap: 6px; } .logo-link .wort { font-size: 20px; } }
@media (max-width: 360px) { .logo-link .wort { display: none; } }

/* Einstieg */
.einstieg { position: relative; padding: var(--einstieg-oben) 0 clamp(56px, 8vw, 104px); overflow: clip; }
.einstieg::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, var(--punkt) 1.1px, transparent 1.4px) 0 0 / 18px 18px; -webkit-mask: radial-gradient(52% 62% at 74% 50%, #000 0, transparent 100%); mask: radial-gradient(52% 62% at 74% 50%, #000 0, transparent 100%); pointer-events: none; }
.einstieg .huelle { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, var(--karte-anteil, .88fr)); gap: clamp(32px, 5vw, 72px); align-items: center; }
.einstieg h1 { max-width: var(--h1-breite, none); }
.einstieg .unter { font-size: var(--text-gross); color: var(--leise); margin: var(--unter-abstand, 22px) 0 30px; max-width: 54ch; }
.einstieg .fein { margin-top: 16px; }

.beleg { position: relative; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); box-shadow: var(--schatten-hoch); padding: 22px 24px 18px; transform: translateY(var(--karte-versatz)); }
.beleg::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: -9px; height: 9px; border-radius: 0 0 var(--rund) var(--rund); background: var(--flaeche); border: 1px solid var(--linie); border-top: 0; opacity: .6; z-index: -1; }
.beleg-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.beleg-kopf strong { font-size: 15px; color: var(--marke); }
.etikett { font: 600 12px/1 var(--mono); color: var(--akzent); background: color-mix(in srgb, var(--petrol) 14%, transparent); padding: 5px 8px; border-radius: 6px; letter-spacing: .02em; }
.posten { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--linie); font-size: 15px; }
.posten span:last-child, .saldo span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.saldo { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 4px; padding-top: 12px; border-top: 3px double var(--marke); font-weight: 700; }
.saldo span:last-child { font-size: clamp(28px, 3vw, 36px); color: var(--akzent); letter-spacing: -.02em; }
.saldo span:last-child.negativ { color: var(--marke); }
.beleg-fuss { font-size: 13px; color: var(--leise); margin-top: 12px; }

@media (max-width: 860px) {
  .einstieg .huelle { grid-template-columns: 1fr; }
  .einstieg::before { -webkit-mask: radial-gradient(70% 40% at 50% 78%, #000 0, transparent 100%); mask: radial-gradient(70% 40% at 50% 78%, #000 0, transparent 100%); }
}

/* Dunkle Bänder */
.band { background: var(--band); color: var(--band-text); }
.band h2, .band h3 { color: var(--band-text); }
.band .kopf-abschnitt p, .band .leise { color: var(--band-leise); }
.band a { color: var(--band-akzent); }

/* Rechner */
#rechner { padding-bottom: calc(var(--abschnitt) * .8); }
.rechner { background: var(--flaeche); color: var(--text); border-radius: calc(var(--rund) + 4px); box-shadow: var(--schatten-hoch); display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--linie); }
.rechner h3 { color: var(--marke); }
.eingaben { background: var(--flaeche-2); padding: 24px 22px; display: grid; gap: 22px; align-content: start; border-right: 1px solid var(--linie); }
.gruppe { display: grid; gap: 12px; border: 0; padding: 0; margin: 0; min-width: 0; }
.gruppe legend { font-weight: 700; color: var(--marke); font-size: 15px; padding: 0; margin-bottom: 4px; }
.feld-zeile { display: grid; gap: 4px; }
.feld-zeile label, .feld-zeile .label { font-size: 13.5px; font-weight: 600; color: var(--leise); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.eingabe { display: flex; align-items: stretch; border: 1px solid var(--linie); border-radius: var(--rund-klein); background: var(--flaeche); overflow: hidden; transition: border-color .15s; }
.eingabe:focus-within { border-color: var(--akzent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 18%, transparent); }
.eingabe input, .eingabe select { border: 0; background: none; color: var(--text); font: 600 16px var(--schrift); padding: 9px 10px; width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.eingabe select { text-align: left; cursor: pointer; }
.eingabe input:focus, .eingabe select:focus { outline: none; }
.eingabe .einheit { padding: 9px 10px; color: var(--leise); font-size: 13px; border-left: 1px solid var(--linie); display: grid; place-items: center; white-space: nowrap; background: var(--flaeche-2); }
.paar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wahl { display: grid; grid-template-columns: 1fr 1fr; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund-klein); padding: 3px; gap: 3px; }
.wahl label { display: block; }
.wahl input { position: absolute; opacity: 0; pointer-events: none; }
.wahl span { display: block; text-align: center; padding: 7px 6px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--leise); cursor: pointer; }
.wahl input:checked + span { background: var(--marke); color: var(--flaeche); }
.wahl input:focus-visible + span { outline: 2px solid var(--akzent); outline-offset: 1px; }
.regler { display: grid; gap: 6px; }
.regler .kopf { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 600; color: var(--leise); }
.regler output { color: var(--akzent); font-variant-numeric: tabular-nums; font-weight: 700; }
input[type="range"] { width: 100%; accent-color: var(--akzent); }
.schalter { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; }
.schalter input { width: 42px; height: 24px; accent-color: var(--akzent); flex: none; }
.info { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--linie); background: var(--flaeche); color: var(--leise); font: 700 11px/1 var(--schrift); cursor: help; padding: 0; flex: none; }
.info:hover { border-color: var(--akzent); color: var(--akzent); }
.tipp { font-size: 12.5px; font-weight: 500; color: var(--leise); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: 8px 10px; margin-top: 2px; }

.ausgabe { padding: 24px clamp(18px, 3vw, 32px) 28px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
.ausgabe > * { min-width: 0; }
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--linie); border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; }
.kachel { background: var(--flaeche); padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.kachel .t { font-size: 13px; color: var(--leise); }
.kachel .w { font: 700 21px/1.2 var(--schrift); letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--marke); }
.kachel .u { font-size: 12px; color: var(--leise); }
.kachel .w.positiv { color: var(--akzent); }
.kachel .w.negativ { color: var(--marke); }

.monatsbeleg { margin-top: 12px; max-width: 560px; }
.monatsbeleg .saldo span:last-child { font-size: clamp(26px, 2.6vw, 32px); }

.saeule-teil h3 { font-size: clamp(21px, 2vw, 26px); }
.bezahlt-meter { height: 8px; border-radius: 4px; margin: 14px 0 22px; background: repeating-linear-gradient(-45deg, var(--linie) 0 6px, transparent 6px 12px), var(--flaeche-2); box-shadow: inset 0 0 0 1px var(--linie); overflow: hidden; }
.bezahlt-meter span { display: block; height: 100%; background: var(--marke); transition: width .3s ease; }
.saeule-block { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: stretch; }
.saeule { display: flex; flex-direction: column-reverse; height: clamp(320px, 34vw, 440px); border-radius: 14px 14px 8px 8px; overflow: hidden; background: var(--flaeche-2); box-shadow: inset 0 0 0 1px var(--linie), var(--schatten); }
.saeule span { display: block; width: 100%; transition: height .3s ease; min-height: 0; }
.saeule span + span { box-shadow: inset 0 -2px 0 var(--flaeche); }
.legende { display: grid; gap: 0; align-content: center; margin: 0; padding: 0; list-style: none; }
.legende li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; font-size: 15.5px; padding: 12px 0; border-bottom: 1px dashed var(--linie); }
.legende li.offen-rest { border-bottom: 0; border-top: 3px double var(--marke); margin-top: 6px; color: var(--leise); }
.legende li.offen-rest b { background: repeating-linear-gradient(-45deg, var(--leise) 0 2px, transparent 2px 5px) !important; box-shadow: inset 0 0 0 1px var(--leise); }
.legende b { width: 14px; height: 14px; border-radius: 4px; display: inline-block; transform: translateY(2px); }
.legende .p { color: var(--leise); font-size: 13px; margin-left: 8px; font-weight: 500; }

details.mehr { border-top: 1px solid var(--linie); padding-top: 18px; }
details.mehr summary { cursor: pointer; font-weight: 650; color: var(--akzent); list-style: none; display: inline-flex; align-items: center; gap: 10px; }
details.mehr summary::-webkit-details-marker { display: none; }
details.mehr summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--linie); font-weight: 700; }
details.mehr[open] summary::before { content: "−"; }

/* Eingabegruppen zum Aufklappen */
.klappe { border-bottom: 1px solid var(--linie); padding-bottom: 18px; }
.klappe:last-child { border-bottom: 0; padding-bottom: 0; }
.klappe > summary { list-style: none; cursor: pointer; font-weight: 700; color: var(--marke); font-size: 15px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.klappe > summary::-webkit-details-marker { display: none; }
.klappe > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--leise); border-bottom: 2px solid var(--leise); transform: rotate(45deg) translateY(-3px); transition: transform .2s; }
.klappe:not([open]) > summary { margin-bottom: 0; }
.klappe:not([open]) > summary::after { transform: rotate(-45deg); }
.eingaben { gap: 18px; }

/* Ergebnisleiste nur auf schmalen Bildschirmen */
.ergebnis-leiste { display: none; }
@media (max-width: 980px) {
  .ergebnis-leiste { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; position: sticky; top: 68px; z-index: 5; margin: 0; padding: 12px 18px; background: var(--band); color: var(--band-text); border-bottom: 1px solid var(--band-linie); font-weight: 600; font-size: 15px; }
  .ergebnis-leiste b { font-size: 22px; font-variant-numeric: tabular-nums; }
  .rechner { overflow: clip; }
}

.kurve svg { width: 100%; height: auto; }
.kurve text { fill: var(--leise); font: 12px var(--schrift); }
.mini-legende { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--leise); margin-top: 8px; }
.mini-legende b { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; transform: translateY(-3px); }

details.tabelle summary { cursor: pointer; font-weight: 650; color: var(--akzent); list-style: none; display: inline-flex; align-items: center; gap: 8px; }
details.tabelle summary::-webkit-details-marker { display: none; }
details.tabelle summary::before { content: "+"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--linie); font-weight: 700; }
details.tabelle[open] summary::before { content: "−"; }
.tabelle-huelle { overflow-x: auto; margin-top: 14px; border: 1px solid var(--linie); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--linie); }
th:first-child, td:first-child { text-align: left; position: sticky; left: 0; background: var(--flaeche); }
thead th { font-size: 12px; color: var(--leise); font-weight: 650; background: var(--flaeche-2); }
thead th:first-child { background: var(--flaeche-2); }
tr.summe td { font-weight: 700; border-top: 3px double var(--marke); }
td.negativ { color: inherit; }

.rechner-fuss { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; margin-top: 22px; }
.rechner-fuss p { color: var(--band-leise); font-size: 14px; max-width: 76ch; margin: 0; }

@media (max-width: 980px) {
  .rechner { grid-template-columns: 1fr; }
  .eingaben { border-right: 0; border-bottom: 1px solid var(--linie); grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
}
@media (max-width: 620px) { .kacheln { grid-template-columns: 1fr; } .kachel { grid-template-columns: minmax(0,1fr) auto; align-items: baseline; } .kachel .t { grid-column: 1; } .kachel .w { grid-column: 2; grid-row: 1 / span 2; align-self: center; } .kachel .u { grid-column: 1; } }
@media (max-width: 620px) {
  .monat { grid-template-columns: 1fr; }
  .saeule-block { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; }
  .saeule { height: 300px; }
  .legende li { grid-template-columns: 12px minmax(0, 1fr); }
  .legende li .w { grid-column: 2; }
}

/* Rechenweise auf Karopapier */
.karopapier { background:
  linear-gradient(var(--raster) 1px, transparent 1px) 0 0 / 24px 24px,
  linear-gradient(90deg, var(--raster) 1px, transparent 1px) 0 0 / 24px 24px,
  var(--flaeche); border-block: 1px solid var(--linie); }
.zwei-spalten { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.fliess p { font-size: 17px; }
.schriftlich { position: sticky; top: 100px; font: 600 clamp(20px, 2.2vw, 26px)/56px var(--schrift); font-variant-numeric: tabular-nums; color: var(--text); padding: 0 8px; }
.schriftlich .zeile { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; height: 56px; align-items: center; }
.schriftlich .op { color: var(--leise); text-align: center; }
.schriftlich .was { font: 500 15px/1.3 var(--schrift); color: var(--leise); }
.schriftlich .strich { border-bottom: 2px solid var(--text); }
.schriftlich .ergebnis { font-weight: 700; color: var(--akzent); border-bottom: 5px double var(--akzent); }
.schriftlich .ergebnis .was { color: var(--akzent); font-weight: 650; }
.schriftlich .notiz { font: 500 13px/1.5 var(--schrift); color: var(--leise); margin-top: 18px; }
.hinweis-kasten { border-left: 3px solid var(--marke); padding: 4px 0 4px 16px; color: var(--leise); margin-top: 28px; }
@media (max-width: 860px) {
  .zwei-spalten { grid-template-columns: 1fr; gap: 24px; }
  #rechenweise .fliess { display: contents; }
  #rechenweise .fliess > * { order: 2; margin: 0; }
  #rechenweise .fliess > h2 { order: 0; }
  .schriftlich { position: static; order: 1; }
}

/* Karten */
.karten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 22px 22px 24px; display: grid; gap: 8px; align-content: start; transition: border-color .15s, transform .15s, box-shadow .15s; }
.karte:hover { border-color: color-mix(in srgb, var(--akzent) 45%, var(--linie)); box-shadow: var(--schatten); }
.karte p { color: var(--leise); margin: 0; font-size: 15.5px; }
.karte .symbol { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--ton); color: var(--akzent); margin-bottom: 6px; }
.karte .symbol svg { width: 22px; height: 22px; }
@media (max-width: 900px) { .karten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .karten { grid-template-columns: 1fr; } }

/* Berechnung: PDF und Kunden-Link */
.paar-bloecke { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 26px; display: grid; gap: 10px; align-content: start; }
.block p { color: var(--leise); margin: 0; }
.block .knoepfe { margin-top: 8px; }
.pdf-stapel { position: relative; height: 150px; margin-bottom: 8px; }
.pdf-stapel span { position: absolute; width: 104px; height: 140px; border-radius: 6px; background: var(--flaeche); border: 1px solid var(--linie); box-shadow: var(--schatten); }
.pdf-stapel span:nth-child(1) { left: 0; top: 10px; transform: rotate(-5deg); }
.pdf-stapel span:nth-child(2) { left: 40px; top: 4px; transform: rotate(2deg); }
.pdf-stapel span:nth-child(3) { left: 84px; top: 0; padding: 12px 10px; display: grid; gap: 6px; align-content: start; }
.pdf-stapel i { display: block; height: 6px; border-radius: 3px; background: var(--linie); }
.pdf-stapel i.kopf { height: 14px; background: var(--marke); width: 60%; }
.pdf-stapel i.akz { background: var(--petrol); width: 40%; }
.link-zeile { font: 500 14px var(--mono); background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 8px; padding: 10px 12px; color: var(--leise); display: flex; justify-content: space-between; gap: 8px; overflow: hidden; }
.link-zeile span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12.5px; font-weight: 650; padding: 3px 10px; border-radius: 99px; background: var(--flaeche-2); color: var(--leise); border: 1px solid var(--linie); }
@media (max-width: 760px) { .paar-bloecke { grid-template-columns: 1fr; } }

/* Vertrieb: Linie */
.linie-wrap { position: relative; margin: 8px 0 clamp(40px, 5vw, 56px); }
.linie { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); position: relative; }
.linie::before, .linie::after { content: ""; position: absolute; left: calc(100% / 12); right: calc(100% / 12); top: 15px; height: 8px; border-radius: 4px; }
.linie::before { background: var(--band-linie); }
.linie::after { background: var(--band-akzent); right: calc(100% / 12 + (100% - 100% / 6) * (1 - var(--fortschritt, 1))); transition: right 1.2s cubic-bezier(.2, .7, .2, 1); }
.linie li { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; gap: 10px; padding: 0 4px; }
.linie .punkt { width: 38px; height: 38px; border-radius: 50%; background: var(--band); border: 6px solid var(--band-akzent); display: grid; place-items: center; font: 700 12px var(--mono); color: var(--band-text); }
.linie li:last-child .punkt { background: var(--band-akzent); border-color: var(--band-text); }
.linie .name { font-weight: 650; font-size: 15px; color: var(--band-text); line-height: 1.3; }
.status-reihe { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.status { font: 650 12.5px/1 var(--schrift); padding: 6px 10px; border-radius: 99px; }
.st-frei { background: var(--st-frei-bg); color: var(--st-frei-text); }
.st-res { background: var(--st-res-bg); color: var(--st-res-text); }
.st-verk { background: var(--st-verk-bg); color: var(--st-verk-text); }
.band .karte { background: var(--band-flaeche); border-color: var(--band-linie); }
.band .karte p { color: var(--band-leise); }
.band .karte:hover { border-color: color-mix(in srgb, var(--band-akzent) 50%, transparent); box-shadow: none; }
.band .karte .symbol { background: color-mix(in srgb, var(--band-akzent) 16%, transparent); color: var(--band-akzent); }
.karten.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .linie { grid-template-columns: 1fr; gap: 18px; }
  .linie::before, .linie::after { left: 15px; right: auto; top: 19px; bottom: 19px; width: 8px; height: auto; }
  .linie::after { bottom: calc(19px + (100% - 38px) * (1 - var(--fortschritt, 1))); right: auto; transition: bottom 1.2s cubic-bezier(.2, .7, .2, 1); }
  .linie li { grid-template-columns: 38px minmax(0, 1fr); justify-items: start; text-align: left; align-items: center; gap: 14px; }
  .karten.zwei { grid-template-columns: 1fr; }
}

/* Team, Umstieg, Sicherheit */
.trenner { height: 1px; background: var(--linie); margin: clamp(56px, 7vw, 88px) 0; }
.umstieg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.formate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.format { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 16px 14px; display: grid; gap: 4px; }
.format b { font: 700 18px var(--mono); color: var(--marke); }
.format span { font-size: 13px; color: var(--leise); }
.format.ziel { background: var(--marke); border-color: var(--marke); grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.format.ziel b, .format.ziel span { color: var(--flaeche); }
@media (max-width: 860px) { .umstieg { grid-template-columns: 1fr; } }
.ton { background: var(--ton); }

/* Videos und Demo */
.videos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.video-karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); overflow: hidden; display: grid; }
.video-karte video { width: 100%; height: auto; aspect-ratio: 16 / 9; background: #0c1016; }
.video-karte .text { padding: 18px 20px 20px; display: grid; gap: 4px; }
.video-karte .text p { margin: 0; color: var(--leise); font-size: 15px; }
.video-karte .dauer { font: 600 13px var(--mono); color: var(--leise); }
@media (max-width: 760px) { .videos { grid-template-columns: 1fr; } }

.demo { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 0; border-radius: calc(var(--rund) + 4px); overflow: hidden; box-shadow: var(--schatten-hoch); }
.demo .links { background: var(--band); color: var(--band-text); padding: clamp(28px, 4vw, 44px); display: grid; gap: 14px; align-content: center; }
.demo .links h2 { color: var(--band-text); }
.demo .links p { color: var(--band-leise); margin: 0; }
.demo .rechts { background: var(--flaeche); padding: clamp(28px, 4vw, 44px); display: grid; gap: 14px; align-content: center; }
.zugang { display: grid; gap: 10px; }
.zugang .zeile { display: grid; grid-template-columns: 120px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 10px; }
.zugang .zeile span:first-child { font-size: 13px; color: var(--leise); font-weight: 600; }
.warn { font-size: 14px; color: var(--offen-text); background: var(--offen-bg); border-radius: 10px; padding: 10px 12px; }
@media (max-width: 820px) { .demo { grid-template-columns: 1fr; } .zugang .zeile { grid-template-columns: 1fr; gap: 4px; } }

/* Preis */
.preis { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.preis-zahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: calc(var(--rund) + 4px); box-shadow: var(--schatten-hoch); padding: clamp(28px, 4vw, 40px); display: grid; gap: 6px; justify-items: start; }
.preis-zahl .betrag { font: 780 clamp(64px, 9vw, 112px)/.95 var(--schrift); letter-spacing: -.04em; color: var(--marke); }
.preis-zahl .betrag small { font-size: .32em; letter-spacing: -.01em; color: var(--leise); font-weight: 600; margin-left: 6px; }
.preis-zahl .unterstrich { width: 100%; border-top: 3px double var(--marke); margin-top: 10px; padding-top: 12px; font-size: 14px; color: var(--leise); }
.preis .fliess p { font-size: var(--text-gross); }
@media (max-width: 820px) { .preis { grid-template-columns: 1fr; } }

/* Fragen */
.fragen { max-width: 860px; }
.frage { border-bottom: 1px solid var(--linie); }
.frage summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-weight: 650; font-size: 17.5px; color: var(--marke); }
.frage summary::-webkit-details-marker { display: none; }
.frage summary::after { content: ""; flex: none; width: 12px; height: 12px; margin-top: 7px; border-right: 2px solid var(--leise); border-bottom: 2px solid var(--leise); transform: rotate(45deg); transition: transform .2s; }
.frage[open] summary::after { transform: rotate(-135deg); margin-top: 12px; }
.frage summary:hover { color: var(--akzent); }
.frage .antwort { padding: 0 0 22px; color: var(--leise); max-width: 70ch; }

/* Saldo: Betreiber und Formular */
.saldo-raster { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.betreiber p { color: var(--band-leise); }
.betreiber address { font-style: normal; color: var(--band-text); line-height: 1.7; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--band-linie); }
.formular-karte { background: var(--flaeche); color: var(--text); border-radius: calc(var(--rund) + 4px); padding: clamp(24px, 3.5vw, 40px); box-shadow: var(--schatten-hoch); }
.formular-karte h2 { color: var(--marke); }
.formular-karte > p { color: var(--leise); margin: 12px 0 24px; }
.formular { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.formular .voll { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 650; color: var(--text); }
.field label .opt { font-weight: 500; color: var(--leise); }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; font: 16px var(--schrift); color: var(--text); background: var(--bg); border: 1px solid var(--linie); border-radius: 10px; padding: 11px 12px; transition: border-color .15s; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 18%, transparent); }
.field .hinweis { font-size: 13px; color: var(--leise); margin: 0; }
.field-error { display: none; font-size: 13.5px; color: var(--negativ); margin: 0; font-weight: 600; }
.field.has-error .field-error { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--negativ); }
.einwilligung label { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; font-weight: 500; font-size: 14.5px; color: var(--leise); align-items: start; }
.einwilligung input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--akzent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.form-status { margin: 0; font-size: 14.5px; }
.form-status.is-error { color: var(--negativ); }
#form-wrap.is-sent form { display: none; }
#form-success { padding: 24px; border-radius: 12px; background: var(--ton); }
#form-success h3 { color: var(--akzent); }
@media (max-width: 900px) { .saldo-raster { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .formular { grid-template-columns: 1fr; } }

/* Fußzeile als Schriftfeld */
.fusszeile { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); }
.schriftfeld { display: grid; grid-template-columns: 1.4fr 1fr 1fr; border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; background: var(--flaeche); }
.schriftfeld > div { padding: 18px 20px; border-right: 1px solid var(--linie); display: grid; gap: 6px; align-content: start; font-size: 14px; color: var(--leise); }
.schriftfeld > div:last-child { border-right: 0; }
.schriftfeld .titel { font: 600 12px var(--mono); color: var(--leise); letter-spacing: .03em; }
.schriftfeld nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.schriftfeld nav a { color: var(--text); text-decoration: none; }
.schriftfeld nav a:hover { color: var(--akzent); text-decoration: underline; }
@media (max-width: 760px) { .schriftfeld { grid-template-columns: 1fr; } .schriftfeld > div { border-right: 0; border-bottom: 1px solid var(--linie); } .schriftfeld > div:last-child { border-bottom: 0; } }

/* Einblenden beim Scrollen */
.einblenden { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.einblenden.sichtbar { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .einblenden { opacity: 1; transform: none; }
}

/* Rechtsseiten */
.rechtstext { max-width: 760px; padding-block: clamp(40px, 6vw, 80px); }
.rechtstext h1 { font-size: clamp(30px, 4vw, 44px); margin-bottom: 24px; }
.rechtstext h2 { font-size: 21px; margin: 32px 0 10px; }

/* Links auf weißen Karten innerhalb dunkler Bänder */
.band .formular-karte a, .band .rechner a { color: var(--akzent); }
@media (max-width: 620px) { .kurve text { font-size: 22px; } }

/* Kontobuch-Zeilen statt Kartenraster (nach Abnahme 1) */
.zeilen { margin: 0; border-top: 2px solid var(--marke); }
.zeile-k { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: 8px clamp(20px, 4vw, 56px); padding: 20px 0; border-bottom: 1px solid var(--linie); align-items: baseline; }
.zeile-k dt { font-weight: 680; font-size: 18px; color: var(--marke); letter-spacing: -.01em; }
.zeile-k dd { margin: 0; color: var(--leise); font-size: 16.5px; max-width: 64ch; }
.zeile-k dd .status-reihe { justify-content: flex-start; margin-top: 10px; }
.zeilen .zeile-k:last-child { border-bottom: 3px double var(--marke); }
.band .zeilen { border-top-color: var(--band-text); }
.band .zeile-k { border-bottom-color: var(--band-linie); }
.band .zeile-k dt { color: var(--band-text); }
.band .zeile-k dd { color: var(--band-leise); }
.band .zeilen .zeile-k:last-child { border-bottom-color: var(--band-text); }
@media (max-width: 700px) { .zeile-k { grid-template-columns: 1fr; padding: 16px 0; } .zeile-k dt { font-size: 17px; } }
.demo-abschnitt { padding-top: 0; }
#rechenweise + .demo-abschnitt { padding-top: var(--abschnitt); }

.band .rechner .leise, .band .rechner .fein { color: var(--leise); }

/* SPEC-111: Sprachumschalter (Deutsch | English) */
.kopf-sprache { color: var(--leise); text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 8px 8px; border-radius: 8px; }
.kopf-sprache:hover { color: var(--text); background: var(--flaeche-2); }
@media (max-width: 960px) { .kopf-sprache { display: none; } }
.sprachwahl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sprachwahl a { color: var(--text); }
.sprachwahl [aria-current] { font-weight: 600; color: var(--text); }
.sprachwahl .trenner { color: var(--linie); }
