@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/source-sans-3-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/source-sans-3-latin-700-normal.woff2") format("woff2"); }
:root {
  --papier: #F4F6F6; --flaeche: #FFFFFF; --tinte: #17242E; --grau: #5E6B73; --hell: #8A969D; --linie: #E2E7E7; --linie2: #EEF1F1;
  --petrol: #01234B; --petrol-hell: #E9EEF5; --blau: #4195D2; --gold: #C1A75D; --gold-hell: #F8F2E2; --rot: #A3362B; --rot-hell: #F8E6E3; --gruen: #2B6E4F; --gruen-hell: #E3F1E9;
  --c-ruerup: #01234B; --c-bav: #75508F; --c-avd: #2C8360; --c-police: #B07A22; --c-depot_ziel: #4195D2; --c-depot_flex: #95A8B5; --c-reserve: #B9C3C9; --c-lebensziel: #8C8A55; --c-bestand: #E3E8E8;
  --schrift: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--schrift); font-size: 15px; line-height: 1.5; color: var(--tinte); background: var(--papier); font-feature-settings: "tnum" 1; padding-bottom: 3.2rem; }
h2 { font-size: 1.3rem; font-weight: 600; margin: 0 0 .2rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; font-weight: 600; margin: 1.2rem 0 .5rem; }
.hilfe { color: var(--grau); font-size: .86rem; margin: 0 0 .8rem; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--petrol); outline-offset: 2px; }
code { font-size: .88em; background: var(--linie2); padding: .05rem .3rem; border-radius: 4px; }
.versteckt { display: none !important; }

/* Testmodus: sichtbar, aber ruhig */
.testband { position: sticky; top: 0; z-index: 20; display: flex; gap: .8rem; align-items: center; padding: .35rem 1.5rem; background: var(--gold-hell); border-bottom: 1px solid #EEDFB0; color: #5C4600; font-size: .85rem; }
.testband strong { letter-spacing: .08em; font-size: .75rem; background: #5C4600; color: var(--gold-hell); padding: .08rem .45rem; border-radius: 3px; }
.linkbtn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; color: inherit; }
.testband .linkbtn { margin-left: auto; }

/* Kopf */
.kopf { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem 1.5rem; background: var(--petrol); border-bottom: 3px solid var(--gold); }
.marke { display: flex; flex-direction: column; gap: .15rem; }
.logo { height: 50px; width: auto; display: block; }
.marke-sub { color: #C9D3E0; font-size: .82rem; padding-left: .15rem; letter-spacing: .02em; }
.kopf .zweit { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.kopf .zweit:hover { border-color: var(--gold); color: var(--gold); }
.kopf .beispiel { color: #AFBCCB; }
.kopf .beispiel select { background: #0B2F5C; color: #fff; border-color: rgba(255,255,255,.3); }
.kopf-aktionen { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.beispiel { display: flex; flex-direction: column; font-size: .75rem; color: var(--hell); gap: .1rem; }
.beispiel select { min-width: 13rem; padding: .4rem .5rem; border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche); color: var(--grau); font-size: .85rem; }
.zweit { padding: .45rem .8rem; border: 1px solid var(--linie); border-radius: 6px; background: var(--flaeche); color: var(--petrol); font-weight: 600; cursor: pointer; font-size: .9rem; }
.zweit:hover { border-color: var(--petrol); }
.zweit.klein { padding: .2rem .5rem; font-size: .8rem; font-weight: 500; }
.zweit:disabled, .primaer:disabled { opacity: .5; cursor: not-allowed; }
.primaer { padding: .65rem 1rem; border: 0; border-radius: 7px; background: var(--petrol); color: #fff; font-weight: 600; cursor: pointer; }
.primaer:hover { background: #0B2F5C; }

/* Raster */
.raster { display: grid; grid-template-columns: minmax(320px, 380px) 1fr; gap: 1.5rem; padding: 1.5rem; max-width: 1560px; margin: 0 auto; }
@media (max-width: 1000px) { .raster { grid-template-columns: 1fr; } }

/* Eingabe */
.eingabe { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 1.2rem 1.2rem 1.4rem; align-self: start; position: sticky; top: 2.6rem; max-height: calc(100vh - 6.5rem); overflow: auto; }
@media (max-width: 1000px) { .eingabe { position: static; max-height: none; } }
.eingabe .primaer { width: 100%; margin-top: 1rem; }
fieldset { border: 0; border-top: 1px solid var(--linie2); margin: 0; padding: .75rem 0 .35rem; }
legend { font-weight: 600; padding: 0; cursor: pointer; display: flex; align-items: center; width: 100%; font-size: .95rem; }
legend::after { content: "–"; margin-left: auto; color: var(--hell); font-weight: 400; }
fieldset.zu legend::after { content: "+"; }
fieldset.zu > *:not(legend) { display: none; }
.zeile { display: grid; gap: .55rem; margin: .5rem 0; }
.zeile.zwei { grid-template-columns: 1fr 1fr; }
.zeile.drei { grid-template-columns: repeat(3, 1fr); }
label { display: flex; flex-direction: column; font-size: .8rem; color: var(--grau); gap: .15rem; }
label em { font-style: normal; font-size: .74rem; color: var(--hell); }
input, select { padding: .42rem .5rem; border: 1px solid var(--linie); border-radius: 6px; background: #FBFCFC; color: var(--tinte); width: 100%; font-size: .95rem; }
input::placeholder { color: #A9B3B8; }
input:focus, select:focus { border-color: var(--petrol); background: #fff; }
.unterzeile { font-size: .8rem; color: var(--grau); margin: .6rem 0 0; }
.lz { display: grid; grid-template-columns: 1.3fr 1fr .8fr 1fr; gap: .4rem; margin: .45rem 0; }

/* Ergebnis */
.ergebnis { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.ergebnis.laedt { opacity: .6; transition: opacity .15s; }
.leer { padding: 3rem 2rem; text-align: center; color: var(--grau); border: 1px dashed var(--linie); border-radius: 12px; background: var(--flaeche); }
.leer small { color: var(--hell); }
.leer ul { list-style: none; padding: 0; margin: .9rem auto .6rem; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.leer li { background: var(--linie2); border-radius: 999px; padding: .2rem .7rem; font-size: .85rem; color: var(--tinte); }
.leer b { font-size: 1.05rem; color: var(--tinte); }
.block { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 1.3rem 1.5rem; }
.block-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .7rem; }
.block-kopf p { margin: 0; color: var(--grau); font-size: .86rem; }
.fehler { border-color: var(--rot); }
.fehler h3 { color: var(--rot); margin-top: 0; }
.info { border-color: #BCD7D7; background: var(--petrol-hell); }
.info p { margin: .15rem 0; }
.schalter { display: inline-flex; align-items: center; gap: .45rem; font-size: .85rem; color: var(--grau); cursor: pointer; }
.schalter input { width: auto; accent-color: var(--petrol); }
.einheit { font-size: .78rem; color: var(--hell); }

/* Zielband */
.ziel-satz { font-size: 1.2rem; line-height: 1.4; margin: 0 0 1.3rem; max-width: 62ch; }
.band { position: relative; height: 104px; margin: 0 1.5rem .8rem; }
.band-schiene { position: absolute; left: 0; right: 0; top: 44px; height: 12px; border-radius: 6px; background: var(--linie2); }
.band-ziel { position: absolute; top: 36px; height: 38px; border-left: 2px solid var(--tinte); }
.band-ziel span { position: absolute; top: 40px; left: -3.5rem; width: 7rem; text-align: center; font-size: .78rem; font-weight: 600; }
.band-puffer { position: absolute; top: 44px; height: 12px; background: var(--petrol-hell); }
.band-sq { position: absolute; top: 44px; height: 12px; border-radius: 6px; background: #A7B3B9; }
.band-st { position: absolute; top: 58px; height: 8px; border-radius: 4px; background: var(--petrol); transition: width .5s ease; }
.band-st.manuell { background: var(--gold); }
.band-marke { position: absolute; transform: translateX(-50%); font-size: .8rem; white-space: nowrap; line-height: 1.2; }
.band-marke b { display: block; font-size: 1rem; }
.band-marke.sq { top: 0; color: #5F6E78; }
.band-marke.st { top: 70px; color: var(--petrol); }
.band-marke.st.manuell { color: #8A6A10; }
.kennzahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem 1.2rem; margin-top: .8rem; }
@media (max-width: 720px) { .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kz { border-left: 2px solid var(--linie); padding-left: .7rem; }
.kz span { display: block; color: var(--grau); font-size: .78rem; }
.kz b { font-size: 1.1rem; font-weight: 600; }
.status { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.status.erreicht, .status.ausreichend { background: var(--gruen-hell); color: var(--gruen); }
.status.knapp, .status.offen { background: var(--gold-hell); color: #7A5A00; }
.status.Lücke, .status.unterdeckung { background: var(--rot-hell); color: var(--rot); }

/* Kompass */
.kompass { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 2rem; }
@media (max-width: 720px) { .kompass { grid-template-columns: 1fr; } }
.regler-name { display: flex; justify-content: space-between; font-size: .82rem; color: var(--grau); margin-bottom: .3rem; }
.stufen { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; }
.stufen button { border: 0; border-right: 1px solid var(--linie); background: #FBFCFC; padding: .5rem 0; cursor: pointer; font-weight: 600; color: var(--grau); }
.stufen button:last-child { border-right: 0; }
.stufen button[aria-pressed="true"] { background: var(--petrol); color: #fff; }
.kompass-wirkung { grid-column: 1 / -1; margin: 0; padding: .65rem .9rem; background: var(--petrol-hell); border-radius: 8px; font-size: .9rem; }

/* Strategie */
.budgetband { display: flex; height: 40px; border-radius: 8px; overflow: hidden; margin: .3rem 0 .5rem; background: var(--linie2); }
.budgetband div { display: flex; align-items: center; justify-content: center; color: #fff; font-size: .78rem; font-weight: 600; min-width: 0; overflow: hidden; white-space: nowrap; transition: flex-basis .4s ease; }
.budgetband .bestand, .budgetband .frei { color: var(--grau); }
.budgetband .frei { background: repeating-linear-gradient(135deg, #F4F6F6 0 6px, #E9EDED 6px 12px); }
.budgetband .ueber { background: var(--rot); }
.legende { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .78rem; color: var(--grau); margin-bottom: .9rem; }
.legende i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.budgetstatus { font-size: .88rem; margin: .2rem 0 .8rem; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--linie2); vertical-align: top; }
th { font-weight: 600; font-size: .76rem; color: var(--grau); text-transform: none; }
td.zahl, th.zahl { text-align: right; white-space: nowrap; }
td.zahl small { display: block; font-weight: 400; color: var(--hell); font-size: .75rem; }
.tabelle-scroll { overflow-x: auto; }
.baustein { display: flex; gap: .6rem; align-items: flex-start; }
.baustein i { flex: none; width: 11px; height: 11px; border-radius: 3px; margin-top: .35rem; }
.baustein small { display: block; color: var(--grau); font-size: .78rem; }
tr.null td { color: var(--hell); }
tr.aus td { color: var(--hell); }
input.betrag { width: 6.5rem; text-align: right; padding: .3rem .45rem; }
tr.angepasst td { background: var(--gold-hell); }
tr.angepasst td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
input.betrag.angepasst { border-color: var(--gold); background: #fff; font-weight: 600; }
.marke-manuell { display: inline-block; font-size: .7rem; font-weight: 600; color: #7A5A00; background: #F4E3AE; padding: 0 .35rem; border-radius: 4px; margin-left: .3rem; }
.grauzone { display: inline-block; font-size: .7rem; padding: 0 .35rem; border-radius: 4px; background: var(--gold-hell); color: #7A5A00; margin-left: .3rem; }
.mehr { background: none; border: 1px solid var(--linie); border-radius: 6px; padding: .15rem .5rem; font-size: .78rem; cursor: pointer; color: var(--petrol); white-space: nowrap; }
tr.detail td { background: #F8FAFA; font-size: .88rem; padding: .7rem .9rem .9rem 2.3rem; }
.detail ul { margin: 0; padding-left: 1rem; }
.detail li { margin: .2rem 0; }
.pruefungen { list-style: none; padding: 0; margin: .6rem 0 0; }
.pruefungen li { padding: .45rem .7rem; border-radius: 6px; margin: .3rem 0; font-size: .88rem; }
.pruefungen li.verletzt { background: var(--rot-hell); color: var(--rot); }
.pruefungen li.hinweis { background: var(--gold-hell); color: #6B4F00; }
.pruefungen li b { margin-right: .35rem; }
.einmal-liste { margin: .3rem 0 0; padding-left: 1.1rem; }

/* Vergleich, Rechenkette, NE */
.vergleich td.plus { color: var(--gruen); }
.vergleich td.minus { color: var(--rot); }
th.angepasst, td.angepasst-spalte { background: var(--gold-hell); }
details.aufklapp { border-top: 1px solid var(--linie2); margin-top: .8rem; padding-top: .6rem; }
details.aufklapp summary { cursor: pointer; color: var(--petrol); font-weight: 600; font-size: .92rem; }
.reiter { display: flex; gap: .3rem; margin: .6rem 0; flex-wrap: wrap; }
.reiter button { border: 1px solid var(--linie); background: #FBFCFC; padding: .3rem .7rem; border-radius: 999px; font-size: .82rem; cursor: pointer; color: var(--grau); }
.reiter button[aria-pressed="true"] { background: var(--petrol); border-color: var(--petrol); color: #fff; }
table.kette th:first-child, table.kette td:first-child { position: sticky; left: 0; background: var(--flaeche); min-width: 14rem; }
table.kette td.gruppe { font-weight: 600; color: var(--petrol); background: #F8FAFA; }
table.kette td.summe { font-weight: 600; }
.formel { font-size: .8rem; color: var(--grau); margin: .6rem 0 0; }
.ne-zeile td:nth-child(3) b { font-size: 1.05rem; }
.ne-rechnung { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: .2rem 1rem; font-size: .88rem; }
.ne-rechnung span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.ne-rechnung .kopfz { font-weight: 600; color: var(--grau); font-size: .78rem; }

/* Liquidität */
.liq-balken { position: relative; height: 34px; background: var(--linie2); border-radius: 8px; overflow: hidden; margin: .6rem 0 .4rem; display: flex; }
.liq-balken div { height: 100%; display: flex; align-items: center; justify-content: center; font-size: .76rem; color: #fff; font-weight: 600; white-space: nowrap; overflow: hidden; }
.liq-balken .reserve { background: var(--c-depot_ziel); }
.liq-balken .ziele { background: var(--c-lebensziel); }
.liq-balken .frei { background: var(--c-avd); }
.liq-balken .fehlt { background: var(--rot); }

/* Annahmen */
.annahmen td.manuell { color: #7A5A00; font-weight: 600; }
.hinweise li { margin: .25rem 0; }
.fuss { color: var(--hell); font-size: .78rem; }
.selbsttest { margin-top: .5rem; }

/* Rechtlicher Hinweis */
.rechtlich { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--linie); padding: .45rem 1.5rem; font-size: .78rem; color: var(--grau); }
.rechtlich p { margin: 0; max-width: 1560px; }
.rechtlich .linkbtn { color: var(--petrol); margin-left: .4rem; }

dialog { border: 1px solid var(--linie); border-radius: 12px; max-width: 36rem; padding: 1.4rem; color: var(--tinte); }
dialog.breit { max-width: 60rem; width: 92vw; }
dialog::backdrop { background: rgba(23, 36, 46, .35); }
dialog h3 { margin-top: 0; }
dialog label { margin: .55rem 0; }
dialog label.check { flex-direction: row; align-items: flex-start; gap: .5rem; color: var(--tinte); font-size: .85rem; }
dialog label.check input { width: auto; margin-top: .2rem; }
.knoepfe { display: flex; gap: .6rem; justify-content: flex-end; margin-top: 1rem; }
.meldung { color: var(--rot); font-size: .86rem; min-height: 1.2em; margin: .3rem 0 0; }
#nachweisInhalt { max-height: 55vh; overflow: auto; font-size: .85rem; }
#nachweisInhalt table td { font-size: .82rem; }
@media (max-width: 600px) {
  .testband span { display: none; }
  .kopf-aktionen { width: 100%; }
  .rechtlich { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Runde 08: Effizienz */
.umschalter { display: inline-flex; border: 1px solid var(--linie); border-radius: 999px; overflow: hidden; }
.umschalter button { border: 0; background: #FBFCFC; padding: .35rem .9rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em; color: var(--grau); cursor: pointer; }
.umschalter button[aria-pressed="true"] { background: var(--petrol); color: #fff; }
.ef-gesamt { display: flex; gap: 1.5rem; align-items: baseline; flex-wrap: wrap; padding: .9rem 1.1rem; background: var(--petrol-hell); border-radius: 10px; margin: .4rem 0 1rem; }
.ef-gesamt .ef-gross { font-size: 1.9rem; font-weight: 700; color: var(--petrol); }
.ef-gesamt .ef-satz { font-size: 1rem; }
.ef-satz b { color: var(--petrol); }
.ef-zahl { font-size: 1.15rem; font-weight: 700; color: var(--petrol); }
.vorteil.plus { color: var(--gruen); font-weight: 600; }
.vorteil.minus { color: var(--rot); font-weight: 600; }
.herleitung { display: grid; grid-template-columns: minmax(16rem, 2fr) 1fr 1fr; gap: .15rem 1rem; font-size: .86rem; }
.herleitung .v { text-align: right; font-variant-numeric: tabular-nums; }
.herleitung .kopfz { font-weight: 600; color: var(--grau); font-size: .76rem; }
.herleitung .gruppe { grid-column: 1 / -1; font-weight: 600; color: var(--petrol); margin-top: .5rem; border-top: 1px solid var(--linie2); padding-top: .3rem; }
.herleitung .ergebnis-z { font-weight: 700; }
.kompass-zusatz { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 2rem; }
@media (max-width: 720px) { .kompass-zusatz { grid-template-columns: 1fr; } }
.kompass-zusatz select { margin-top: .3rem; }
table.erst td.aktiv { background: var(--petrol-hell); font-weight: 600; }
