/* Onkel Immo Rechner (Eric 06.11.2026, marketing/rechner/v2/BAUPLAN.md, DESIGN.md Rechner). Seitenkopf flach, die
   Rechnerkarte liegt halb im dunklen Kopf, damit der Rechner auch im niedrigen Laptopfenster sofort zu sehen ist.
   Farben der Posten ohne Ampel: Tinte, Pink, Lila, zwei Grau (DESIGN.md, keine Wertung über Farbe). */

.rr-kopf { padding: 32px 0 120px; }
.rr-kopf .seitenkopf-titel { margin-top: 16px; }
.rr-kopf .seitenkopf-text { max-width: 640px; }
@media (min-width: 768px) { .rr-kopf { padding: 40px 0 136px; } }

.rr { position: relative; margin-top: -88px; }
.rr-rechner { display: grid; gap: 12px; }
@media (min-width: 1024px) {
  .rr-rechner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
}

/* Eingaben: weiße Karte, Felder als Pillen wie der Mini-Rechner im Lexikon */
.rr-eingaben, .rr-ergebnis { min-width: 0; padding: 24px; border-radius: 32px; background: var(--karte); box-shadow: inset 0 0 0 1px var(--hauch-2), 0 24px 60px -32px rgba(0, 0, 60, .28); }
@media (min-width: 768px) { .rr-eingaben, .rr-ergebnis { padding: 32px; } }
.rr-eingaben { display: grid; gap: 18px; align-content: start; }
.rr-feld { display: grid; gap: 6px; min-width: 0; }
.rr-feld label { font-size: 14px; line-height: 20px; color: var(--neben); }
.rr-eingabe { display: flex; align-items: center; gap: 8px; min-width: 0; height: 52px; padding: 0 20px; border: 1px solid var(--linie); border-radius: 999px; background: var(--grund); transition: border-color .15s var(--kurve-schnell); }
.rr-eingabe:focus-within { border-color: var(--tinte); }
.rr-eingabe input, .rr-eingabe select { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; color: var(--tinte); font: inherit; font-size: 16px; font-variant-numeric: tabular-nums; outline: none; }
.rr-eingabe span { color: var(--leise); }
.rr-wahl { position: relative; padding-right: 44px; }
.rr-wahl select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.rr-wahl::after { content: ""; position: absolute; right: 22px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border: solid var(--tinte); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.rr-hilfe { margin: 0; font-size: 13px; line-height: 18px; color: var(--leise); }
.rr-mehr { border-top: 1px solid var(--linie); padding-top: 14px; }
.rr-mehr > summary, .rr-weg > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; cursor: pointer; list-style: none; font-size: 15px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; }
.rr-mehr > summary::-webkit-details-marker, .rr-weg > summary::-webkit-details-marker { display: none; }
.rr-mehr > summary::after, .rr-weg > summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--flaeche); font-size: 18px; line-height: 1; transition: transform .2s var(--kurve); }
.rr-mehr[open] > summary::after, .rr-weg[open] > summary::after { transform: rotate(45deg); }
.rr-mehr[open] { display: grid; gap: 18px; }
.rr-schalter { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 20px; color: var(--neben); cursor: pointer; }
.rr-schalter input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--tinte); }
.rr-zurueck { margin: 0; }
.rr-textknopf { padding: 8px 0; border: 0; background: none; color: var(--neben); font-size: 14px; text-decoration: underline; text-decoration-color: var(--hauch-2); text-underline-offset: 3px; cursor: pointer; touch-action: manipulation; }

/* Ergebnis: alter Stand bleibt stehen, beim Wechsel kurz weich (nur Deckkraft, CSS-Übergang ist unterbrechbar) */
/* Beim Neurechnen blendet nur das Ergebnis, der Aufruf daneben bleibt ruhig stehen */
.rr-ergebnis > :not(.rr-oben), .rr-oben-zahl { transition: opacity .18s var(--kurve-schnell); }
.rr-ergebnis.rr-wechsel > :not(.rr-oben), .rr-ergebnis.rr-wechsel .rr-oben-zahl { opacity: .35; }
.rr-ergebnis[data-rechnet] .rr-haupt b { opacity: .55; transition: opacity .2s .25s; }
.rr-ergebnis[data-hinweis]::before { content: attr(data-hinweis); display: block; margin-bottom: 16px; padding: 10px 16px; border-radius: 16px; background: var(--pink-hauch); color: #000; font-size: 14px; line-height: 20px; }
@media (prefers-reduced-motion: reduce) { .rr-ergebnis > *, .rr-oben-zahl, .rr-ergebnis[data-rechnet] .rr-haupt b { transition: none; } }

/* Hauptzahl und Aufruf nebeneinander, sobald die Ergebniskarte breit genug ist (Kartenbreite, nicht Fensterbreite) */
.rr-ergebnis { container-type: inline-size; }
.rr-oben { display: grid; gap: 16px; align-items: start; }
.rr-oben-zahl { min-width: 0; }
@container (min-width: 600px) { .rr-oben { grid-template-columns: minmax(0, 1fr) minmax(220px, 280px); column-gap: 24px; } }
.rr-oben .rr-weiter { padding: 20px 22px; border-radius: 24px; gap: 8px; }
.rr-oben .rr-weiter-titel { font-size: 20px; line-height: 1.2; }
.rr-oben .rr-weiter-satz { font-size: 14px; line-height: 20px; margin-bottom: 4px; }

.rr-stufe { margin: 0; display: inline-flex; padding: 6px 14px; border-radius: 999px; background: var(--flaeche); font-size: 14px; line-height: 20px; }
.rr-haupt { margin: 16px 0 0; display: grid; gap: 8px; }
.rr-haupt b { font-family: var(--titel); font-weight: var(--titel-gewicht); letter-spacing: var(--titel-spur); font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-haupt span { color: var(--neben); }
@media (min-width: 768px) { .rr-haupt b { font-size: 72px; } }

.rr-band { width: 100%; height: 14px; margin: 24px 0 8px; border-radius: 999px; overflow: hidden; }
.rr-satz { margin: 12px 0 0; font-size: 14px; line-height: 20px; color: var(--neben); }
.rr-laender { margin: 8px 0 12px; padding: 0; list-style: none; display: grid; gap: 2px; }
.rr-laender li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 10px; border-radius: 12px; font-size: 14px; line-height: 20px; }
.rr-laender small { margin-left: 8px; font-size: 13px; color: var(--leise); }
.rr-laender svg { width: 100%; height: 8px; border-radius: 999px; overflow: hidden; }
.rr-laender b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-land-grund { fill: var(--flaeche); }
.rr-land-wert { fill: #8d8b86; }
.rr-hier { background: var(--flaeche); }
.rr-hier .rr-land-grund { fill: var(--karte); }
.rr-hier .rr-land-wert { fill: var(--tinte); }
@media (max-width: 479px) {
  .rr-laender li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .rr-laender svg { grid-column: 1 / -1; grid-row: 2; }
}
.rr-seg-a { fill: var(--tinte); background: var(--tinte); }
.rr-seg-b { fill: var(--pink); background: var(--pink); }
.rr-seg-c { fill: var(--lila); background: var(--lila); }
.rr-seg-d { fill: #8d8b86; background: #8d8b86; }
.rr-seg-e { fill: #cfccc4; background: #cfccc4; }

.rr-posten { margin: 0; padding: 0; list-style: none; }
.rr-posten li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.rr-punkt { width: 10px; height: 10px; border-radius: 50%; transform: translateY(-1px); }
.rr-posten small { display: block; font-size: 13px; line-height: 18px; color: var(--leise); }
.rr-posten b, .rr-summe b { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-summe { display: flex; justify-content: space-between; gap: 16px; margin: 16px 0 0; padding: 14px 18px; border-radius: 20px; background: var(--flaeche); }
.rr-schatten { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; line-height: 20px; color: var(--neben); }
.rr-schatten:empty { display: none; }
.rr-schatten li { padding-left: 18px; position: relative; }
.rr-schatten li::before { content: "→"; position: absolute; left: 0; color: var(--leise); }

.rr-weg { margin-top: 20px; border-top: 1px solid var(--linie); padding-top: 8px; }
.rr-weg p { font-size: 14px; line-height: 20px; color: var(--neben); }
.rr-tabelle { overflow-x: auto; overscroll-behavior-x: contain; margin: 12px 0; }
.rr-tabelle table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13px; line-height: 18px; font-variant-numeric: tabular-nums; }
.rr-tabelle th { text-align: left; font-weight: 500; color: var(--leise); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--linie); }
.rr-tabelle td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--hauch); vertical-align: top; }
.rr-tabelle td:nth-child(n+3), .rr-tabelle th:nth-child(n+3) { text-align: right; white-space: nowrap; }
.rr-fein { font-size: 13px !important; line-height: 18px !important; color: var(--leise) !important; }

.rr-vertrauen { margin: 16px 0 0; font-size: 14px; line-height: 20px; color: var(--leise); }
.rr-folge { margin-top: 40px; margin-bottom: 64px; }

/* Hub */
/* padding-block statt padding: .rahmen hält den seitlichen Rand, die Kurzform hätte ihn auf 0 gesetzt */
.rr-hub { padding-block: 48px 64px; display: grid; gap: 48px; }
.rr-kapitel h2 { margin: 0; font-family: var(--titel); font-weight: var(--titel-gewicht); letter-spacing: var(--titel-spur); font-size: 32px; line-height: 1.1; }
.rr-kapitel > p { margin: 8px 0 0; }
.rr-kapitel .kachel { min-height: 180px; }
.rr-kapitel ul { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
@media (min-width: 768px) { .rr-kapitel ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rr-kapitel h3 { font-size: 18px; line-height: 24px; font-weight: 500; }

/* Handy: Chip mit der Hauptzahl, nur wenn das Ergebnis oberhalb aus dem Bild ist */
.rr-chip { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; transform: translateX(-50%); padding: 10px 18px; border: 0; border-radius: 999px; background: var(--tinte); color: var(--grund); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .35); cursor: pointer; touch-action: manipulation; user-select: none; transition: transform .12s var(--kurve); }
.rr-chip:active { transform: translateX(-50%) scale(.97); }
.rr-chip { max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.rr-chip[hidden] { display: none; }
@media (min-width: 1024px) { .rr-chip { display: none; } }

/* Ratgeberteil unter dem Rechner: Bausteine aus lexikon-v2.css, hier nur Abstand und Sprungmarken auf weißem Grund */
.rr-ratgeber { margin-top: 72px; }
.rr-ratgeber .lp-frage:first-of-type { margin-top: 48px; }
.rr-sprung a { background: var(--flaeche); }
@media (hover: hover) and (pointer: fine) { .rr-sprung a:hover { background: var(--flaeche-tief); } }

/* Ergebnis und Aufruf als eine Spalte: der Aufruf steht immer direkt unter dem Ergebnis (Eric 06.11.2026) */
.rr-spalte { display: grid; gap: 12px; min-width: 0; align-content: start; }
.rr-weiter { display: grid; gap: 10px; justify-items: start; padding: 24px; border-radius: 32px; background: var(--karte); color: var(--tinte); }
@media (min-width: 768px) { .rr-weiter { padding: 28px 32px; } }
.rr-weiter-titel { margin: 0; font-family: var(--titel); font-weight: var(--titel-gewicht); letter-spacing: var(--titel-spur); font-size: 26px; line-height: 1.15; }
.rr-weiter-satz { margin: 0 0 6px; font-size: 15px; line-height: 22px; color: var(--neben); max-width: 52ch; }
.rr-details { min-width: 0; padding: 8px 24px 16px; border-radius: 32px; background: var(--karte); box-shadow: inset 0 0 0 1px var(--hauch-2); }
.rr-details:empty { display: none; }
.rr-details .rr-weg:first-child { margin-top: 0; border-top: 0; }
@media (min-width: 768px) { .rr-details { padding: 8px 32px 20px; } }

/* Grafiken der Rechner: Linien in festen Einheiten, Beschriftung als HTML (schrumpft am Handy nicht mit). Farben ohne Ampel. */
.rr-grafik { margin: 8px 0 12px; }
.rr-grafik figcaption { font-size: 13px; line-height: 18px; color: var(--leise); margin-bottom: 8px; }
.rr-grafik svg { width: 100%; height: auto; overflow: visible; }
.rr-achse { stroke: var(--linie); stroke-width: 1; }
.rr-linie { fill: none; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rr-l-a { stroke: var(--tinte); background: var(--tinte); }
.rr-l-b { stroke: var(--lila); background: var(--lila); }
.rr-l-c { stroke: var(--pink); stroke-dasharray: 6 6; background: var(--pink); }
.rr-linie-punkt { fill: var(--pink); stroke: var(--karte); stroke-width: 3; }
.rr-grafik-achse { display: flex; justify-content: space-between; margin: 4px 0 0; font-size: 12px; color: var(--leise); }
.rr-legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 18px; color: var(--neben); }
.rr-legende i { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.rr-tabelle .rr-zeile-hier td { background: var(--flaeche); font-weight: 500; }
.rr-posten li > i:not(.rr-punkt) { width: 10px; }
.rr-gruppe { display: grid; gap: 18px; }
.rr-gruppe[hidden] { display: none; }
.rr-ergebnis > .rr-tabelle { margin-top: 16px; }
