/**
 * assets/spargesetz-rechner.css — Spargesetz-Rechner (/spargesetz-rechner/).
 * Additiv zum Design-System. Nutzt ausschliesslich die vorhandenen CSS-Variablen
 * aus assets/kredus.css, damit der Rechner exakt zum Theme passt. Beruehrt
 * Marke/Logo/Tokens NICHT. Wird nur auf der Rechner-Seite geladen.
 * Erstellt 2026-09-17, Machart analog assets/rentenluecke-rechner.css.
 *
 * Einzige eigene Farbe: --sgr-neg fuer negative Betraege. Das Design-System
 * kennt keinen Verlust-Ton, ein Rot aus dem Nichts waere hier falsch, deshalb
 * ein gedecktes Backstein-Rot, das zur warmen Neutralen passt.
 */

.sgr { --sgr-neg:#8C2F24; }

/* == Rechner-Karte: Eingaben links, Ergebnis rechts ======================= */
.sgr-sec { padding-top: clamp(8px, 2vw, 20px); }
.sgr-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: clamp(20px, 3.2vw, 34px);
}
@media (min-width: 900px) {
  .sgr-card { grid-template-columns: 380px 1fr; gap: var(--s-8); align-items: start; }
}

/* == Eingaben ============================================================= */
.sgr-form { margin: 0; min-width: 0; }
.sgr-block + .sgr-block { margin-top: var(--s-7); }
.sgr-legend {
  font-family: var(--font-serif); font-weight: 500; font-size: 1.16rem; color: var(--ink);
  margin: 0 0 var(--s-5); padding-bottom: var(--s-3); border-bottom: 1px solid var(--line);
  letter-spacing: -.01em;
}
.sgr-field { margin-bottom: var(--s-5); }
.sgr-field:last-child { margin-bottom: 0; }
.sgr-field > label {
  display: block; font-size: .82rem; font-weight: 700; color: var(--ink);
  margin: 0 0 6px; letter-spacing: .01em;
}
.sgr-field select,
.sgr-field input[type="number"] {
  width: 100%; min-height: 50px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px 14px; font-family: var(--font); font-size: 1rem;
  background: var(--surface-2); color: var(--ink); -moz-appearance: textfield;
}
.sgr-field input[type="number"] { font-family: var(--font-num); font-size: 1.05rem; }
.sgr-field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6A5E' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.sgr-field input::-webkit-outer-spin-button,
.sgr-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sgr-field select:focus, .sgr-field input:focus {
  outline: 3px solid var(--brand-200); outline-offset: 1px; border-color: var(--brand-400);
}
.sgr-hint { color: var(--muted); font-size: var(--fs-xs); margin: 6px 0 0; line-height: 1.45; }
.sgr-hint.sgr-treffer { color: var(--brand-700); font-weight: 600; }
.sgr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.sgr-grid2 > div > label {
  display: block; font-size: .82rem; font-weight: 700; color: var(--ink); margin: 0 0 6px;
}

/* Umschalter Honorar / Fallwert */
.sgr-toggle {
  display: flex; border: 1px solid var(--line); border-radius: var(--r-sm);
  overflow: hidden; background: var(--surface-2);
}
.sgr-toggle button {
  flex: 1; font-family: var(--font); font-size: .84rem; font-weight: 600;
  min-height: 44px; padding: 10px 8px; background: transparent; border: 0;
  color: var(--muted); cursor: pointer; transition: background .18s var(--ease), color .18s var(--ease);
}
.sgr-toggle button.on { background: var(--brand-700); color: #fff; }
.sgr-toggle button:not(.on):hover { background: var(--brand-050); color: var(--brand-800); }

.sgr-linkish {
  background: none; border: 0; padding: 0; font-family: var(--font); font-size: var(--fs-xs);
  font-weight: 600; color: var(--brand-700); text-decoration: underline; cursor: pointer;
}
.sgr-linkish:hover { color: var(--brand-800); }

/* == Ergebnis: Kennzahlen-Panel ========================================== */
.sgr-results { min-width: 0; }
.sgr-hero {
  background: var(--brand-900); color: var(--ground);
  border-radius: var(--r); padding: clamp(20px, 2.8vw, 28px);
}
.sgr-hero-top {
  display: flex; flex-wrap: wrap; gap: var(--s-5) var(--s-8);
  align-items: flex-end; justify-content: space-between; margin-bottom: var(--s-6);
}
.sgr-big {
  font-family: var(--font-serif); font-weight: 400; font-size: clamp(2.2rem, 6vw, 3.3rem);
  line-height: 1; letter-spacing: -.02em; color: #fff; display: block;
}
.sgr-big-lab { font-size: .8rem; color: rgba(245,242,234,.72); margin-bottom: 6px; }
.sgr-side { text-align: right; }
.sgr-side .sgr-v {
  font-family: var(--font-serif); font-size: 1.55rem; color: var(--brand-300);
  display: block; line-height: 1.15;
}
.sgr-side .sgr-l { font-size: .76rem; color: rgba(245,242,234,.68); }

.sgr-bar-cap, .sgr-bar-foot, .sgr-bar-meta {
  display: flex; justify-content: space-between; gap: var(--s-4); font-size: .76rem;
}
.sgr-bar-cap  { color: rgba(245,242,234,.75); margin-bottom: 8px; }
.sgr-bar-foot { color: rgba(245,242,234,.62); margin-top: 8px; }
.sgr-bar-meta { color: rgba(245,242,234,.6); margin-top: var(--s-4); }
.sgr-bar { width: 100%; height: 56px; display: block; }
.sgr-fin  { color: #F5F2EA; }
.sgr-offen { color: var(--brand-300); }

/* Kennzahlen-Karten */
.sgr-cards {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: var(--s-4);
}
.sgr-kpi {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: var(--s-4); box-shadow: var(--sh-1);
}
.sgr-kpi .sgr-v {
  font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.1;
  color: var(--ink); display: block;
}
.sgr-kpi .sgr-v.sgr-neg { color: var(--sgr-neg); }
.sgr-kpi .sgr-l { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; line-height: 1.35; }

/* == Erklaerung, Tabelle, Hinweise ======================================= */
.sgr-h2 {
  font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-h3);
  color: var(--ink); margin: var(--s-8) 0 var(--s-4);
}
.sgr-p { max-width: var(--maxw-text); margin: 0 0 var(--s-4); }

.sgr-scroll {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm);
  margin-top: var(--s-4); background: var(--surface-2); -webkit-overflow-scrolling: touch;
}
.sgr-scroll table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); min-width: 520px; }
.sgr-scroll th, .sgr-scroll td {
  padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line);
  font-family: var(--font-num); font-size: .86rem; white-space: nowrap;
}
.sgr-scroll th:first-child, .sgr-scroll td:first-child { text-align: left; }
.sgr-scroll thead th {
  font-family: var(--font); font-size: var(--fs-xs); font-weight: 700;
  color: var(--brand-800); background: var(--surface); white-space: normal;
}
.sgr-scroll tbody tr:last-child td { border-bottom: 0; }
.sgr-scroll td.sgr-neg { color: var(--sgr-neg); font-weight: 600; }

.sgr-disc {
  background: var(--brand-050); border: 1px solid var(--brand-100); border-radius: var(--r-sm);
  padding: var(--s-4) var(--s-5); font-size: var(--fs-sm); color: var(--ink-soft); margin-top: var(--s-4);
}
.sgr-disc strong { color: var(--brand-800); }

/* == Empfehlungen ======================================================== */
.sgr-rec {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--brand-500); border-radius: var(--r-sm);
  padding: var(--s-4) var(--s-5); margin-bottom: var(--s-3);
}
.sgr-rec h3 {
  font-family: var(--font-serif); font-weight: 500; font-size: 1.05rem;
  color: var(--ink); margin: 0 0 6px; line-height: 1.3;
}
.sgr-rec p { margin: 0; font-size: var(--fs-sm); color: var(--ink-soft); }
.sgr-rec p a { color: var(--brand-700); font-weight: 600; text-decoration: underline; }
.sgr-tag {
  display: inline-block; font-family: var(--font); font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--brand-800);
  background: var(--brand-050); border: 1px solid var(--brand-100);
  border-radius: var(--r-pill); padding: 2px 9px; margin-left: 8px; vertical-align: middle;
}

/* == Fachlicher Ansprechpartner ========================================== */
.sgr-profil {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--brand-500); border-radius: var(--r-sm);
  padding: clamp(18px, 2.4vw, 26px);
}
.sgr-profil .sgr-n {
  font-family: var(--font-serif); font-size: 1.28rem; color: var(--ink);
  display: block; line-height: 1.2;
}
.sgr-profil .sgr-r {
  font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-700); font-weight: 700; margin: 4px 0 var(--s-4);
}
.sgr-profil p { margin: 0 0 var(--s-3); font-size: var(--fs-sm); max-width: 68ch; }
.sgr-profil p:last-of-type { margin-bottom: 0; }
.sgr-quali {
  font-size: var(--fs-xs); color: var(--muted); line-height: 1.6;
  border-top: 1px solid var(--line); padding-top: var(--s-3); margin-top: var(--s-4);
}

.sgr-pillars { display: grid; gap: 0 var(--s-8); grid-template-columns: 1fr; margin-top: var(--s-5); }
@media (min-width: 680px) { .sgr-pillars { grid-template-columns: 1fr 1fr; } }
.sgr-pil { padding: var(--s-4) 0; border-top: 1px solid var(--line); }
.sgr-pil b { display: block; font-weight: 700; font-size: .92rem; color: var(--ink); margin-bottom: 2px; }
.sgr-pil b::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand-500); margin-right: 10px; vertical-align: middle;
}
.sgr-pil span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.55; display: block; padding-left: 16px; }
.sgr-pil a { color: var(--brand-700); font-weight: 600; text-decoration: underline; }

.sgr-foerder {
  background: var(--brand-700); color: #fff; border-radius: var(--r);
  padding: clamp(20px, 2.6vw, 28px); margin-top: var(--s-6);
}
.sgr-foerder h3 {
  font-family: var(--font-serif); font-weight: 400; font-size: 1.28rem; margin: 0 0 8px; color: #fff;
}
.sgr-foerder p { margin: 0; font-size: var(--fs-sm); color: rgba(255,255,255,.88); max-width: 60ch; }
.sgr-zahlen {
  display: flex; flex-wrap: wrap; gap: var(--s-7); margin-top: var(--s-5);
  padding-top: var(--s-4); border-top: 1px solid rgba(245,242,234,.25);
}
.sgr-zahlen > div { min-width: 96px; }
.sgr-zahlen .sgr-z {
  font-family: var(--font-serif); font-size: 1.7rem; color: var(--brand-200);
  display: block; line-height: 1.1;
}
.sgr-zahlen .sgr-zl {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(245,242,234,.72); margin-top: 2px;
}
.sgr-proof { font-size: var(--fs-xs); color: var(--muted); margin-top: var(--s-4); line-height: 1.6; }
.sgr-proof b { color: var(--brand-800); font-weight: 700; }

/* == Abschluss-Band ====================================================== */
.sgr-cta {
  background: var(--brand-900); color: #fff; border-radius: var(--r);
  padding: clamp(22px, 3vw, 34px); margin-top: var(--s-8);
}
.sgr-cta h2 {
  font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-h3);
  margin: 0 0 8px; color: #fff;
}
.sgr-cta > p { margin: 0 0 var(--s-5); max-width: 60ch; color: rgba(255,255,255,.85); font-size: var(--fs-sm); }
.sgr-btns { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.sgr-btns .btn { min-height: 46px; padding: 11px 20px; font-size: var(--fs-sm); }
.sgr-kontakt {
  display: grid; gap: var(--s-3); grid-template-columns: 1fr;
  margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid rgba(245,242,234,.25);
}
@media (min-width: 620px) { .sgr-kontakt { grid-template-columns: 1fr 1fr; } }
.sgr-kp { border: 1px solid rgba(245,242,234,.28); border-radius: var(--r-sm); padding: var(--s-4); }
.sgr-kp .sgr-n { font-family: var(--font-serif); font-size: 1.12rem; color: #fff; display: block; line-height: 1.25; }
.sgr-kp .sgr-r {
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-300); font-weight: 700; margin: 2px 0 8px;
}
.sgr-kp a { display: block; color: rgba(255,255,255,.9); text-decoration: none; font-size: var(--fs-sm); line-height: 1.8; }
.sgr-kp a:hover { color: var(--brand-200); text-decoration: underline; }

/* == Quellen und Grenzen ================================================= */
.sgr-note {
  font-size: var(--fs-xs); color: var(--muted); line-height: 1.62; margin-top: var(--s-8);
  border-top: 1px solid var(--line); padding-top: var(--s-4); max-width: 82ch;
}
.sgr-note strong { color: var(--brand-800); }
.sgr-note p { margin: 0 0 var(--s-3); }
.sgr-note p:last-child { margin-bottom: 0; }

/* == Fliesstext-Teil (Erklaerstrecke) ==================================== */
.sgr .prose h2 {
  font-family: var(--font-serif); font-weight: 500; font-size: var(--fs-h2);
  color: var(--ink); margin: var(--s-8) 0 var(--s-4); letter-spacing: -.012em;
}
.sgr .prose h2:first-child { margin-top: 0; }
.sgr .prose h3 {
  font-size: var(--fs-h3); font-weight: 700; color: var(--ink); margin: var(--s-6) 0 var(--s-3);
}
.sgr .prose p { margin: 0 0 var(--s-4); line-height: var(--lh-read); }
.sgr .prose ul { margin: 0 0 var(--s-4); padding-left: 22px; }
.sgr .prose li { margin-bottom: 10px; line-height: 1.6; }
.sgr .prose a { color: var(--brand-700); font-weight: 600; text-decoration: underline; }
.sgr .prose a:hover { color: var(--brand-800); }

/* Autorenbox, analog den anderen Rechnern, hier auf .prose statt .article */
.sgr .k-authorbox {
  display: flex; gap: var(--s-4); align-items: flex-start; margin: var(--s-7) 0 var(--s-5);
  padding: var(--s-5); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.sgr .k-authorbox-ic {
  flex: none; width: 42px; height: 42px; border-radius: var(--r-sm);
  display: grid; place-items: center; background: var(--brand-050);
  border: 1px solid var(--brand-100); color: var(--brand-700);
}
.sgr .k-authorbox-ic svg { width: 24px; height: 24px; }
.sgr .k-authorbox-name { margin: 0 0 4px; font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.sgr .k-authorbox-role { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }

/* Nur fuer Screenreader (Tabellen-Beschriftung) */
.sgr .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* == Druck =============================================================== */
@media print {
  .sgr-toggle, .sgr-btns, .sgr-linkish { display: none; }
  .sgr-card { box-shadow: none; grid-template-columns: 1fr; }
  .sgr-hero, .sgr-cta, .sgr-foerder { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sgr-scroll { overflow: visible; }
  .sgr-scroll table { min-width: 0; }
}
