/*
 * zinsrechner.css — gemeinsames Stylesheet der modern-banking Zinsrechner.
 * Alles unter dem Wrapper-Scope .zr (kein Konflikt mit style.css).
 * Der Rechner sitzt in #information auf dem Blauverlauf der Site.
 * Markt-neutral: keine AT-Hardcodes.
 */

.zr {
  --zr-primary: #0070C0;
  --zr-primary-dark: #005a9e;
  --zr-primary-darker: #004578;
  --zr-accent: #A9F6DB;
  --zr-accent-light: #DFFDF2;

  --zr-weiss: #ffffff;
  --zr-text: #F1F6FC;
  --zr-text-70: rgba(255, 255, 255, .88);
  --zr-text-50: rgba(255, 255, 255, .74);
  --zr-fehler: #ffd0d0;
  --zr-ok: #A9F6DB;
  /* Zweitfarbe = Apricot, unsere zweite Akzentfarbe neben dem Mint. Traegt alles,
     was vom Ertrag abgeht: Gebuehren, Kapitalertragsteuer, Rueckschritte im
     Kapitalverlauf. Anwender-Entscheid 2026-07-25: bewusst Apricot statt des
     Marken-Ambers #E8A33D — es harmoniert besser mit dem Mint-Erstakzent
     (und hat auf dem Blauverlauf mehr Kontrastreserve: 3,0:1 statt 2,4:1). */
  --zr-kosten: #ffb59e;

  --zr-feld-bg: #ffffff;
  --zr-feld-text: #063a63;

  --zr-r-s: 8px;
  --zr-r-m: 12px;
  --zr-r-l: 16px;

  --zr-sp-1: 4px;
  --zr-sp-2: 8px;
  --zr-sp-3: 16px;
  --zr-sp-4: 24px;
  --zr-sp-5: 32px;

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--zr-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;

  /* Layout richtet sich nach der CONTAINER-Breite, nicht nach dem Viewport
     (der Rechner sitzt live in #information mit width:60%; float).
     Benannter Container "zr" — die Grid-/Kennzahlen-Regeln koppeln explizit hieran. */
  container: zr / inline-size;

  /* Luft zum einleitenden Text bzw. zur Fehlerbox oberhalb des Rechners */
  margin-top: var(--zr-sp-5);
}

.zr *,
.zr *::before,
.zr *::after { box-sizing: border-box; }

/* Bedingt eingeblendete Felder (JS setzt/entfernt hidden) — greift auch dort,
   wo eine .zr-Regel display setzen wuerde. */
.zr [hidden] { display: none; }

/* Fieldsets (Eingabe-Karte + Segmented-/Kosten-Gruppen) muessen in der Grid-Spalte
   schrumpfen koennen — der UA-Default min-inline-size:min-content wuerde sie sonst
   ueber die Spalte hinaustreiben und den Ergebnisbereich ueberlagern. */
.zr fieldset { min-width: 0; }

/* ---- Layout ----------------------------------------------------
 * Zwei Spalten erst, wenn der CONTAINER wirklich Platz hat (nicht der Viewport).
 * Browser ohne @container-Support bleiben dauerhaft EINSPALTIG (sicherer Fallback,
 * Eingabe oben / Ergebnis darunter) — keine parallele @media-Kruecke. */
.zr-grid {
  display: grid;
  /* Deutlicher Abstand zwischen Eingabe-Panel und Ergebnis (einspaltig wie zweispaltig) */
  gap: var(--zr-sp-5);
  /* Einspaltig (Mobil/schmaler Container) stehen Angaben-Panel und Ergebnis UNTEREINANDER:
     dort zusaetzliche 5em Zaesur, damit klar ist, wo die Eingabe endet und das Ergebnis
     beginnt. Zweispaltig wird der Wert unten wieder zurueckgesetzt (dort trennt die Spalte). */
  row-gap: calc(var(--zr-sp-5) + 5em);
  grid-template-columns: 1fr;
}
/* min-width:0 an den Grid-Kindern: sonst erzwingen nowrap-Detailtabelle und Chart
   ihre Inhalts-Mindestbreite -> Grid-Blowout, Bereiche ueberlagern sich. */
.zr-grid > form,
.zr-grid > .zr-ergebnis { min-width: 0; }
/* Die Formularspalte ist selbst ein Container ("zr-form"): die Feld-Regeln (3er-Segmented,
   Kosten-Zeile) koppeln an IHRE Breite (~21em in der 2-Spalten-Ansicht), nicht an den
   Viewport — so greifen sie einspaltig-schmal UND in der schmalen 2-Spalten-Spalte. */
.zr-grid > form { container: zr-form / inline-size; }
@container zr (min-width: 52em) {
  .zr-grid { grid-template-columns: minmax(280px, 340px) 1fr; align-items: start; row-gap: var(--zr-sp-5); }
}

/* ---- Eingabe-Karte --------------------------------------------- */
.zr-eingabe {
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--zr-r-l);
  padding: var(--zr-sp-3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.zr-eingabe legend,
.zr-titel {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 var(--zr-sp-3);
  color: var(--zr-weiss);
}

.zr-feld { border: 0; padding: 0; margin: 0 0 var(--zr-sp-3); min-width: 0; }
.zr-feld:last-child { margin-bottom: 0; }
.zr-feld > label,
.zr-feld > legend {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--zr-text);
  margin-bottom: var(--zr-sp-2);
  padding: 0;
}
.zr-feld-hint { font-size: 11px; color: var(--zr-text-50); margin-top: var(--zr-sp-1); }

/* ---- Zahlenfeld mit Einheiten-Suffix --------------------------- */
.zr-input-wrap {
  display: flex;
  align-items: center;
  background: var(--zr-feld-bg);
  border: 2px solid transparent;
  border-radius: var(--zr-r-m);
  padding: 0 var(--zr-sp-3);
  transition: border-color .15s, box-shadow .15s;
}
.zr-input-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--zr-feld-text);
  font: 700 16px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  padding: 10px 0; /* 16px Schrift + 20px Padding + 2x2px Rahmen des Wraps = 40px (Touch-Floor) */
  outline: 0;
}
.zr-input-wrap .zr-suffix {
  flex: 0 0 auto;
  color: #5a7793;
  font-size: 13px;
  font-weight: 600;
  padding-left: var(--zr-sp-2);
}
.zr-input-wrap:focus-within {
  border-color: var(--zr-accent);
  box-shadow: 0 0 0 3px rgba(169, 246, 219, .4);
}

/* ---- Range-Slider ---------------------------------------------- */
/* Betrags-/Zins-Slider sind reine Enhancements: ohne JS aus (Zahlenfeld genuegt). */
.zr-slider { margin-top: var(--zr-sp-2); display: none; }
.zr-js .zr-slider { display: block; }
.zr-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .25);
  outline: 0;
  cursor: pointer;
}
.zr-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--zr-weiss);
  border: 3px solid var(--zr-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  cursor: pointer;
}
.zr-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--zr-weiss);
  border: 3px solid var(--zr-accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
  cursor: pointer;
}
.zr-range:focus-visible {
  box-shadow: 0 0 0 3px rgba(169, 246, 219, .4);
}

/* ---- Dauer-Slider ---------------------------------------------- */
.zr-slider-dauer { display: flex; flex-direction: column; gap: var(--zr-sp-2); }
/* Wertanzeige traegt bewusst DASSELBE Blau wie die Segmented-Leiste (nicht das
   opake --zr-primary-darker) — beide sind Anzeige-/Auswahlflaechen im Eingabe-Panel. */
.zr-slider-dauer output {
  align-self: flex-start;
  background: rgba(0, 82, 141, .4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--zr-weiss);
  font-weight: 700;
  font-size: 15px;
  padding: 4px 12px;
  border-radius: var(--zr-r-s);
}
/* Ohne JS: Slider aus, natives Select sichtbar. Mit JS: umgekehrt. */
.zr-slider-dauer { display: none; }
.zr-js .zr-slider-dauer { display: flex; }
.zr-js .zr-select-dauer { display: none; }

/* ---- Segmented Pills (Radio-Gruppe) ---------------------------- */
.zr-segmented {
  display: flex;
  gap: var(--zr-sp-1);
  background: rgba(0, 82, 141, .4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  /* Aussenradius 12px, Pille innen 8px: 12 - 4px Padding = buendige Kurven. */
  border-radius: var(--zr-r-m);
  padding: 4px;
}
.zr-segmented .zr-pill { position: relative; flex: 1 1 0; min-width: 0; }
.zr-segmented input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.zr-segmented label {
  display: block;
  text-align: center;
  padding: 7px var(--zr-sp-2);
  border-radius: var(--zr-r-s);
  font-size: 13px;
  font-weight: 600;
  color: var(--zr-text);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.zr-segmented input:hover + label { background: rgba(169, 246, 219, .18); }
.zr-segmented input:checked + label {
  background: var(--zr-weiss);
  color: var(--zr-primary-darker);
  font-weight: 700;
}
.zr-segmented input:focus-visible + label {
  box-shadow: 0 0 0 3px rgba(169, 246, 219, .5);
}

/* ---- Natives Select (Fallback) --------------------------------- */
.zr-select {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: var(--zr-feld-bg);
  color: var(--zr-feld-text);
  border: 2px solid transparent;
  border-radius: var(--zr-r-m);
  padding: 10px var(--zr-sp-3);
  font: 600 15px/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23063a63' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--zr-sp-3) center;
  padding-right: 34px;
}
.zr-select:focus-visible {
  border-color: var(--zr-accent);
  box-shadow: 0 0 0 3px rgba(169, 246, 219, .4);
  outline: 0;
}

/* ---- Validierungszustaende ------------------------------------- */
.zr-feld-fehler {
  display: none;
  font-size: 13px;
  color: var(--zr-fehler);
  margin-top: var(--zr-sp-2);
  /* flex-start statt center: zweizeilige Meldungen haengten das Symbol sonst
     mittig ZWISCHEN die Zeilen — es gehoert an die erste. */
  align-items: flex-start;
  gap: 6px;
}
/* Feine Kontur in der Farbe des Meldungstexts (v=7, 31.7.26). Die fruehere Fassung
   war ein vollflaechig gefuellter Kreis mit rotem Ausrufezeichen; der sass als
   heller Klecks auf dem Blauverlauf und brach mit der uebrigen Icon-Sprache, die
   durchweg mit duennen Konturen arbeitet (Chevron, Kopier-Symbol).
   margin-top hebt das Symbol optisch auf die Mittelachse der ersten Textzeile. */
.zr-feld-fehler::before {
  content: "";
  flex: 0 0 auto;
  width: 16px; height: 16px;
  margin-top: 2px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffd0d0' stroke-width='1.5'%3E%3Ccircle cx='8' cy='8' r='6.25'/%3E%3Cpath d='M8 4.9v3.6' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='11.25' r='.95' fill='%23ffd0d0' stroke='none'/%3E%3C/svg%3E");
}
.zr-feld--fehler .zr-feld-fehler { display: flex; }
.zr-feld--fehler .zr-input-wrap,
.zr-feld--fehler .zr-select { border-color: var(--zr-fehler); }
.zr-feld--fehler .zr-segmented { box-shadow: 0 0 0 2px var(--zr-fehler); }
.zr-feld--ok .zr-input-wrap { border-color: rgba(169, 246, 219, .55); }

/* ---- Button (modernisierter Site-Btn) -------------------------- */
.zr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--zr-sp-2);
  background: linear-gradient(180deg, var(--zr-accent-light), var(--zr-accent));
  color: var(--zr-primary-darker);
  border: 0;
  border-radius: var(--zr-r-m);
  padding: 14px var(--zr-sp-5);
  font: 700 15px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s, filter .15s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
}
.zr-btn:hover { filter: brightness(1.03); box-shadow: 0 6px 16px rgba(0, 0, 0, .24); }
.zr-btn:active { transform: translateY(1px); }
.zr-btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(169, 246, 219, .55); }
/* Button steht in ALLEN Rechnern rechtsbuendig am Ende der Eingabekarte
   (Anwender-Entscheid 2026-07-25) — Spalten-Flex, damit der Hinweistext darunter
   buendig mit dem Button abschliesst; ohne JS bleibt nur der Button uebrig. */
.zr-submit-zeile { display: flex; flex-direction: column; align-items: flex-end; }
/* Mit JS ist kein Submit noetig -> Button als Sekundaeraktion dezenter. */
.zr-js .zr-submit-zeile { margin-top: var(--zr-sp-3); }
.zr-js .zr-submit-hinweis { display: block; }
.zr-submit-hinweis { display: none; font-size: 11px; color: var(--zr-text-50); margin-top: var(--zr-sp-2); text-align: right; }

/* ---- Fehlerbox (PHP-Fallback, Nachfolger .rueckmeldung) -------- */
.zr-fehlerbox {
  background: rgba(255, 208, 208, .14);
  border: 1px solid var(--zr-fehler);
  border-radius: var(--zr-r-m);
  padding: var(--zr-sp-3) var(--zr-sp-4);
  margin-bottom: var(--zr-sp-4);
}
.zr-fehlerbox b { color: var(--zr-fehler); }
.zr-fehlerbox ul { margin: var(--zr-sp-2) 0 0; padding-left: 1.2em; }
.zr-fehlerbox li { margin: var(--zr-sp-1) 0; }

/* ---- Ergebnis: Kennzahl-Karten --------------------------------- */
.zr-ergebnis[hidden] { display: none; }
.zr-kennzahlen {
  display: grid;
  gap: var(--zr-sp-3);
  grid-template-columns: 1fr;
  margin-bottom: var(--zr-sp-4);
}
@container zr (min-width: 26em) {
  .zr-kennzahlen { grid-template-columns: repeat(2, 1fr); }
}
.zr-kpi {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--zr-r-l);
  padding: var(--zr-sp-3);
}
.zr-kpi-label {
  display: block;
  font-size: 13px;
  color: var(--zr-text-70);
  margin-bottom: var(--zr-sp-2);
}
.zr-kpi-wert {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--zr-weiss);
  font-variant-numeric: tabular-nums;
}
@container zr (min-width: 26em) { .zr-kpi-wert { font-size: 28px; } }
.zr-kpi--haupt {
  background: linear-gradient(150deg, var(--zr-accent-light), var(--zr-accent));
  border-color: transparent;
}
.zr-kpi--haupt .zr-kpi-label { color: rgba(0, 69, 120, .8); }
.zr-kpi--haupt .zr-kpi-wert { color: var(--zr-primary-darker); }

.zr-zusammenfassung { font-size: 13px; color: var(--zr-text-70); margin: 0 0 var(--zr-sp-4); }

/* ---- Chart ----------------------------------------------------- */
.zr-chart { margin: 0 0 var(--zr-sp-4); }
.zr-chart-titel { font-size: 13px; font-weight: 600; color: var(--zr-text-70); margin-bottom: var(--zr-sp-2); }
.zr-chart-plot { height: 180px; }
.zr-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.zr-bar-sockel { fill: rgba(255, 255, 255, .32); }
.zr-bar-zins { fill: var(--zr-accent); }
.zr-bar {
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: bottom;
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.zr-bar--an { transform: scaleY(1); }
.zr-chart-xachse {
  display: flex;
  margin-top: 6px;
}
.zr-chart-xachse span {
  flex: 1 1 0;
  text-align: center;
  font-size: 11px;
  color: var(--zr-text-50);
}
.zr-chart-legende {
  display: flex;
  flex-wrap: wrap;
  gap: var(--zr-sp-3);
  margin-top: var(--zr-sp-2);
  font-size: 11px;
  color: var(--zr-text-70);
}
.zr-chart-legende span { display: inline-flex; align-items: center; gap: 6px; }
.zr-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.zr-swatch--sockel { background: rgba(255, 255, 255, .32); }
.zr-swatch--zins { background: var(--zr-accent); }

/* ---- Detailtabelle --------------------------------------------- */
.zr-details {
  background: rgba(0, 0, 0, .08);
  border-radius: var(--zr-r-m);
  padding: 0 var(--zr-sp-3);
  margin-bottom: var(--zr-sp-4);
}
.zr-details > summary {
  cursor: pointer;
  padding: var(--zr-sp-3) 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--zr-text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--zr-sp-2);
}
.zr-details > summary::-webkit-details-marker { display: none; }
.zr-details > summary::before {
  content: "";
  width: 8px; height: 8px;
  border-right: 2px solid var(--zr-text-70);
  border-bottom: 2px solid var(--zr-text-70);
  transform: rotate(-45deg);
  transition: transform .2s;
}
.zr-details[open] > summary::before { transform: rotate(45deg); }
.zr-details > summary:focus-visible { outline: 2px solid var(--zr-accent); outline-offset: 2px; border-radius: 4px; }
.zr-tabelle-wrap { overflow-x: auto; padding-bottom: var(--zr-sp-3); }
.zr-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.zr-tabelle th,
.zr-tabelle td { padding: 8px 10px; text-align: right; white-space: nowrap; }
.zr-tabelle th:first-child,
.zr-tabelle td:first-child { text-align: center; }
.zr-tabelle thead th {
  color: var(--zr-text-70);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
}
.zr-tabelle tbody tr:nth-child(even) { background: rgba(255, 255, 255, .05); }

.zr-haftung { font-size: 11px; color: var(--zr-text-50); margin: 0; }

/* ---- Motion-Reset ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .zr *,
  .zr *::before,
  .zr *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .zr-bar { transform: scaleY(1); }
}

/* ================================================================
 * Tagesgeld-spezifisch  (gemergt aus css-ergaenzung-tagesgeld.css;
 * Selektoren auf die flache .zr-*-Namensgebung angeglichen)
 * ================================================================ */

/* Segmented mit drei Optionen (Zinsgutschrift). Breite Spalte: horizontal.
   Schmale Formspalte (2-Spalten ~340px oder Mobil): VERTIKAL stapeln — lange Labels
   wie "quartalsweise" passen horizontal nicht in ~97px-Pills (Umbruch/Ueberlauf; eine
   reine Font-Verkleinerung muesste bis ~10px gehen). An die FORMSPALTEN-Breite gekoppelt
   (Container zr-form). Hinweis: em bezieht sich in Container-Queries auf die Font-Size
   des Containers (hier 15px) -> 24em = 360px > 340px greift; 22em (=330px) haette NICHT. */
.zr-segmented--drei label { padding-left: 4px; padding-right: 4px; }
/* Schwelle 27em (= 405px bei 15px Container-Font): darunter passt "quartalsweise" mit
   Radio-Marker NICHT mehr neben die beiden anderen Pills — es bricht innerhalb der Pille
   um, die aktive Pille wird hoeher und die Beschriftungen stehen versetzt. Gemessen:
   bei 390px-Viewport ist die Formularspalte 370px breit (24em/360px haette dort NICHT
   gegriffen), horizontal braucht die Dreier-Leiste rund 400px. */
@container zr-form (max-width: 27em) {
  .zr-segmented--drei { flex-direction: column; border-radius: var(--zr-r-m); gap: 4px; }
  /* Gestapelt beginnen alle drei Optionen auf DERSELBEN Anfangslinie (linksbuendig);
     zentrierte Labels haetten je nach Wortlaenge einen anderen Startpunkt. */
  .zr-segmented--drei label { padding: 9px 14px; text-align: left; }
}

/* Zwei Felder nebeneinander (Jahre/Tage, Kosten/Turnus) */
.zr-two-fields { display: flex; gap: var(--zr-sp-3); }
.zr-two-fields .zr-teilfeld { flex: 1 1 0; min-width: 0; }
.zr-two-fields--kosten .zr-teilfeld:first-child { flex: 0 1 40%; }
.zr-two-fields--kosten .zr-teilfeld:last-child { flex: 1 1 60%; }
/* An die FORMSPALTEN-Breite gekoppelt: stapelt auch in der schmalen 2-Spalten-Formspalte,
   sonst wird "vierteljährlich" im Turnus-Segmented abgeschnitten. */
@container zr-form (max-width: 26em) {
  .zr-two-fields--kosten { flex-direction: column; }
}

/* Optional-Hinweis am Feld-Label (geteilt Tagesgeld/Ratenkredit — hier EINMAL definiert) */
.zr-optional { font-weight: 400; color: var(--zr-text-50); font-size: 12px; }

/* Kapitalverlauf: Flaechen-/Linienchart (viewBox 100x32 => uniform, keine Verzerrung) */
.zr-chart-plot--linie { height: auto; aspect-ratio: 100 / 32; }
@supports not (aspect-ratio: 1) { .zr-chart-plot--linie { height: 170px; } }
.zr-area { fill: var(--zr-accent); opacity: .26; }
/* Flaechenanteil UNTER dem Anlagebetrag: Kapital ist hinter den Start zurueckgefallen */
.zr-area--minus { fill: var(--zr-kosten); }
.zr-linie { fill: none; stroke: var(--zr-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
/* Rueckschritte (Stufen durch die Kostenbelastung) in der Zweitfarbe. Etwas kraeftiger
   als die Ertragslinie: die Stufe ist bei kleinen Gebuehren nur wenige Pixel hoch. */
.zr-linie--kosten { stroke: var(--zr-kosten); stroke-width: 3; }
.zr-punkt { fill: var(--zr-weiss); stroke: var(--zr-accent); stroke-width: .5; }
.zr-baseline { stroke: rgba(255, 255, 255, .4); stroke-width: .4; stroke-dasharray: 2 2; }
.zr-swatch--basis { background: rgba(255, 255, 255, .4); }
.zr-swatch--kosten { background: var(--zr-kosten); }

/* Ertrag/Gebuehren-Vergleich (nur bei Kosten) */
.zr-chart-plot--vergleich { height: 120px; }
.zr-bar-gebuehr { fill: var(--zr-kosten); }
.zr-chart-xachse--vergleich span { font-weight: 600; color: var(--zr-text-70); }

/* ================================================================
 * Ratenkredit-spezifisch  (gemergt aus css-ergaenzung-ratenkredit.css)
 * .zr-optional siehe Tagesgeld-Abschnitt oben (dedupliziert).
 * ================================================================ */

/* Modus-Umschalter: nur mit JS sichtbar */
.zr-modus-wahl { display: none; margin: 0 0 var(--zr-sp-4); }
.zr-js .zr-modus-wahl { display: block; }
.zr-modus-legende {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--zr-text);
  margin-bottom: var(--zr-sp-2);
}

/* "oder"-Trenner: nur ohne JS (dann sind beide Felder sichtbar) */
.zr-oder {
  text-align: center;
  color: var(--zr-text-50);
  font-size: 13px;
  margin: 0 0 var(--zr-sp-4);
}
.zr-js .zr-oder { display: none; }

/* Feld-Sichtbarkeit je Modus (nur mit JS; ohne JS bleiben n- und r-Feld beide sichtbar) */
.zr-js.zr-modus-rate .zr-feld[data-feld="r"] { display: none; }
.zr-js.zr-modus-laufzeit .zr-feld[data-feld="n"] { display: none; }

/* Kompakte KPI-Werte (Effektivzins, "> 96", Zusatztext) */
.zr-kpi-wert--klein { font-size: 20px !important; line-height: 1.25; }
@container zr (min-width: 26em) { .zr-kpi-wert--klein { font-size: 22px !important; } }
.zr-kpi-sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  margin-top: var(--zr-sp-2);
  color: rgba(0, 69, 120, .82);
}

/* Chart: Tilgung unten (Mint), Zinsen oben (weiss-transparent), Restschuld als Linie */
.zr-bar-tilgung { fill: var(--zr-accent); }
.zr-bar-zinsen { fill: rgba(255, 255, 255, .32); }
.zr-rest-linie {
  stroke: var(--zr-weiss);
  stroke-width: 2px;
  stroke-linejoin: round;
  stroke-linecap: round;
  opacity: .9;
}
.zr-rest-pt { fill: var(--zr-weiss); }
.zr-swatch--tilgung { background: var(--zr-accent); }
.zr-swatch--zinsen { background: rgba(255, 255, 255, .32); }
.zr-swatch--rest { background: var(--zr-weiss); border-radius: 999px; }

/* ================================================================
 * Festzinsanlage-spezifisch
 * ================================================================ */

/* Steuersatz-Feld unter dem Segmented "Kapitalertragsteuer" (mit JS nur sichtbar,
   wenn der Abzug aktiv ist — ohne JS immer, siehe data-zeigen-wenn). */
.zr-steuersatz { margin-top: var(--zr-sp-2); max-width: 12em; }

/* Kirchensteuer-Auswahl ueber dem Steuersatz (nur DE; belegt den Satz vor, siehe data-setzt).
   Keine Breitenbegrenzung — die Dreier-Leiste braucht die volle Feldbreite. */
.zr-kirchensteuer { margin-top: var(--zr-sp-2); }

.zr-steuersatz > label,
.zr-kirchensteuer > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--zr-text);
  margin-bottom: var(--zr-sp-1);
}

/* Einbehaltene Kapitalertragsteuer als oberstes Balkensegment (Zweitfarbe wie Kosten) */
.zr-bar-steuer { fill: var(--zr-kosten); }
