/* ═══════════════════════════════════════════════════════════════
   Immobilien-Steuervorteils-Rechner — Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8f9fa;
}

/* v2.3: Verhindert horizontales Scrollen der gesamten Seite (Mobile) */
.page-wrapper {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* ─── Szenario-Speicherleiste ──────────────────────────────── */
.szenario-bar {
  background: #edf2f7;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.6rem 0;
}

.szenario-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.szenario-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.szenario-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  white-space: nowrap;
}

.szenario-select {
  flex: 1;
  max-width: 350px;
  padding: 0.4rem 0.6rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #fff;
  color: #1a1a1a;
  cursor: pointer;
}

.szenario-bar-right {
  display: flex;
  gap: 0.4rem;
}

.szenario-btn {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.szenario-btn-primary {
  background: #1a365d;
  color: #fff;
}
.szenario-btn-primary:hover {
  background: #2a4a7f;
}

.szenario-btn-secondary {
  background: #fff;
  color: #1a365d;
  border: 1px solid #cbd5e0;
}
.szenario-btn-secondary:hover {
  background: #edf2f7;
}

.szenario-btn-danger {
  background: #fff;
  color: #c53030;
  border: 1px solid #feb2b2;
}
.szenario-btn-danger:hover {
  background: #fff5f5;
}

.szenario-trenner {
  width: 1px;
  height: 1.4rem;
  background: #cbd5e0;
  margin: 0 0.2rem;
}

.szenario-bar-bottom {
  border-top: 1px solid #e2e8f0;
  border-bottom: none;
  margin-top: 0;
}

/* ─── Container ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  overflow-x: hidden;
  width: 100%;
}

/* ─── Header ────────────────────────────────────────────────── */
.app-header {
  background-color: #1a365d;
  color: #fff;
  padding: 1.5rem 0;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.app-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-header .subtitle {
  font-size: 0.93rem;
  opacity: 0.85;
  margin-top: 0.25rem;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
}

/* ─── Footer ────────────────────────────────────────────────── */
.app-footer {
  background-color: #1a365d;
  color: rgba(255, 255, 255, 0.7);
  padding: 1rem 0;
  margin-top: 3rem;
  text-align: center;
  font-size: 0.8rem;
}

/* ─── Section ───────────────────────────────────────────────── */
.section {
  background: #fff;
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  border-bottom: 3px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  max-width: 100%;
}

.section h2 {
  color: #1a365d;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.section-intro {
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.section-intro-hinweis {
  background: #f0f7ff;
  border-left: 3px solid #3182ce;
  padding: 0.6rem 0.85rem;
  border-radius: 0 4px 4px 0;
  font-size: 0.82rem;
  color: #4a5568;
  margin-bottom: 1.5rem;
}

.block-erklaerung {
  color: #718096;
  font-size: 0.82rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ─── Form Layout ───────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  flex: 1;
  min-width: 0;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.3rem;
}

.form-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.form-row > .form-group {
  flex: 1 1 200px;
}

.display-row {
  background-color: #fafbfc;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid #edf2f7;
}

/* ─── Input Fields ──────────────────────────────────────────── */
input[type="text"],
input[type="number"],
select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
}

/* Suffix wrapper */
.input-suffix {
  display: flex;
  align-items: stretch;
  position: relative;
}

.input-suffix input,
.input-suffix select {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  min-width: 0;
}

.input-suffix .suffix {
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  background: #edf2f7;
  border: 1px solid #cbd5e0;
  border-left: none;
  border-radius: 0 4px 4px 0;
  font-size: 0.85rem;
  color: #718096;
  white-space: nowrap;
  user-select: none;
}

/* ─── Input Variants ────────────────────────────────────────── */
.input-orange {
  background-color: #FFF3E0 !important;
  border-left: 3px solid #FF9800 !important;
}

.input-orange:focus {
  border-color: #FF9800 !important;
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.15) !important;
  border-left-color: #FF9800 !important;
}

.input-blue {
  background-color: #E3F2FD !important;
  border-left: 3px solid #2196F3 !important;
  color: #1565c0;
}

.input-gray,
input[readonly] {
  background-color: #F5F5F5 !important;
  border-left: 3px solid #9E9E9E !important;
  color: #555;
  cursor: default;
}

/* select with orange */
select.input-orange {
  background-color: #FFF3E0;
  border-left: 3px solid #FF9800;
}

/* ─── Help Text ─────────────────────────────────────────────── */
.help-text {
  font-size: 0.78rem;
  color: #718096;
  margin-top: 0.2rem;
  line-height: 1.4;
}

/* ─── Slider / Range ────────────────────────────────────────── */
.slider-group {
  max-width: 500px;
}

.slider-group label {
  margin-bottom: 0.5rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  outline: none;
  margin: 0.5rem 0;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FF9800;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FF9800;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #718096;
}

/* ─── Darlehen Block ────────────────────────────────────────── */
.darlehen-block {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0;
  margin-bottom: 1.25rem;
  overflow: hidden;
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

.darlehen-header {
  background: #f7fafc;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.darlehen-body {
  padding: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1a365d;
  cursor: pointer;
}

/* Inactive darlehen block */
.darlehen-block.darlehen-inaktiv {
  opacity: 0.5;
  background-color: #f7fafc;
}

.darlehen-block.darlehen-inaktiv .darlehen-body {
  pointer-events: none;
}

/* v2.3: KfW bei Bestand komplett ausgegraut */
.darlehen-block.darlehen-disabled {
  opacity: 0.4;
  pointer-events: none;
  background-color: #f0f0f0;
}

.darlehen-block.darlehen-disabled .darlehen-header {
  cursor: not-allowed;
}

.finanzierung-summary {
  margin-top: 1rem;
  background-color: #edf2f7;
  border: 1px solid #cbd5e0;
}

/* ─── AfA Section ───────────────────────────────────────────── */
.afa-szenario-auswahl {
  margin: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s, border-color 0.2s;
}

.radio-label:hover {
  background-color: #f7fafc;
}

.radio-label.empfohlen {
  border-color: #38a169;
  background-color: #f0fff4;
  font-weight: 600;
}

.radio-label input[type="radio"] {
  accent-color: #1a365d;
}

.afa-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow-x: auto;
}

.afa-tabelle th {
  background: #1a365d;
  color: #fff;
  padding: 0.5rem 0.6rem;
  text-align: right;
  font-weight: 600;
  font-size: 0.78rem;
}

.afa-tabelle th:first-child {
  text-align: left;
}

.afa-tabelle td {
  padding: 0.45rem 0.6rem;
  text-align: right;
  border-bottom: 1px solid #edf2f7;
  font-variant-numeric: tabular-nums;
}

.afa-tabelle td:first-child {
  text-align: left;
  font-weight: 600;
}

.afa-tabelle tr:nth-child(even) {
  background-color: #f7fafc;
}

.afa-tabelle tr.afa-empfehlung {
  background-color: #f0fff4 !important;
  border-left: 3px solid #38a169;
}

.afa-tabelle tr.afa-empfehlung td {
  font-weight: 600;
  color: #22543d;
}

.afa-badge {
  display: inline-block;
  background: #38a169;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15em 0.5em;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
  margin-left: 0.4em;
}

#afa-empfehlung {
  background-color: #e6ffed;
  border: 2px solid #38a169;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #22543d;
}

#afa-empfehlung:empty {
  display: none;
}

/* ─── Result Table ──────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.ergebnis-tabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  white-space: nowrap;
  table-layout: fixed;
}

.ergebnis-tabelle .sticky-col {
  width: 180px;
}

.ergebnis-tabelle thead th {
  background: #1a365d;
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  text-align: right;
  position: sticky;
  top: 0;
  z-index: 2;
}

.ergebnis-tabelle thead th:first-child {
  text-align: left;
  z-index: 3;
}

.ergebnis-tabelle tbody td {
  padding: 0.5rem 0.75rem;
  text-align: right;
  border-bottom: 1px solid #edf2f7;
  font-variant-numeric: tabular-nums;
}

.ergebnis-tabelle tbody tr:nth-child(even) {
  background-color: #f7fafc;
}

.ergebnis-tabelle tbody tr:hover {
  background-color: #ebf4ff;
}

/* Sticky first column */
.sticky-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  text-align: left !important;
  border-right: 2px solid #e2e8f0;
  min-width: 180px;
}

.ergebnis-tabelle thead th.sticky-col {
  background: #1a365d;
  z-index: 3;
}

.ergebnis-tabelle tbody tr:nth-child(even) .sticky-col {
  background-color: #f7fafc;
}

.ergebnis-tabelle tbody tr:hover .sticky-col {
  background-color: #ebf4ff;
}

.row-label {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.83rem;
}

/* Special row styles */
.row-summe {
  font-weight: 700;
}

.row-summe td {
  border-top: 2px solid #cbd5e0;
  border-bottom: 2px solid #cbd5e0;
}

.row-separator td {
  border-top: 3px solid #e2e8f0;
}

.row-highlight td {
  background-color: #ebf8ff !important;
  font-weight: 600;
  color: #2b6cb0;
}

.row-highlight .sticky-col {
  background-color: #ebf8ff !important;
}

.row-highlight-primary td {
  background-color: #e6ffed !important;
  font-weight: 700;
  color: #22543d;
  font-size: 0.9rem;
}

.row-highlight-primary .sticky-col {
  background-color: #e6ffed !important;
}

/* ─── Summary / Zusammenfassung ─────────────────────────────── */
.summary-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.summary-group h3 {
  font-size: 1rem;
  color: #1a365d;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.highlight-box {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  border-left: 4px solid #4299e1;
}

.highlight-label {
  font-size: 0.8rem;
  color: #718096;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.highlight-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
}

.highlight-sub {
  font-size: 0.75rem;
  color: #a0aec0;
  margin-top: 0.3rem;
}

/* Primary highlight (monatlicher Aufwand) */
.highlight-primary {
  border-left: 5px solid #38a169;
  background: linear-gradient(135deg, #f0fff4 0%, #e6ffed 100%);
  padding: 1.5rem;
  text-align: center;
}

.highlight-value-big {
  font-size: 2.2rem;
  color: #22543d;
  line-height: 1.2;
}

/* v2.0: Aufwand/Überschuss Hero-Box — der entscheidende Wert für Kunden */
.summary-group-highlight {
  margin: 1rem 0;
}

.highlight-aufwand-hero {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  border: 2px solid #cbd5e0;
  background: #f7fafc;
  transition: all 0.3s ease;
}

.highlight-aufwand-hero--ueberschuss {
  border-color: #38a169;
  background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
}

.highlight-aufwand-hero--ueberschuss .highlight-hero-value {
  color: #22543d;
}

.highlight-aufwand-hero--aufwand {
  border-color: #e53e3e;
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

.highlight-aufwand-hero--aufwand .highlight-hero-value {
  color: #c53030;
}

.highlight-hero-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.highlight-hero-value {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.highlight-hero-sub {
  display: block;
  font-size: 0.85rem;
  color: #718096;
}

/* EK-Rendite */
.summary-cards-rendite {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.highlight-rendite {
  border-left: 4px solid #6b46c1;
  background: linear-gradient(135deg, #faf5ff 0%, #e9d8fd 100%);
}

.highlight-value-rendite {
  font-size: 1.6rem;
  font-weight: 700;
}

/* Gewinn highlight */
.highlight-gewinn {
  border-left-color: #1a365d;
  background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
}

.highlight-gewinn .highlight-value-big {
  color: #1a365d;
}

.summary-group-gewinn {
  margin-top: 0.5rem;
}

/* Value styling (applied via JS) */
.wert-negativ {
  color: #c53030 !important;
}

.wert-positiv {
  color: #22543d !important;
}

/* v2.0: Überschuss = positiv (grün, fett) statt rot */
.wert-ueberschuss {
  color: #276749 !important;
  font-weight: 700;
}

/* v2.0: Block-Header für 3-Block-Tabelle */
.block-header {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.75rem;
  margin: 1.5rem 0 0.5rem 0;
  border-left: 4px solid #ccc;
  border-radius: 2px;
}
.block-header:first-of-type {
  margin-top: 0;
}
.block-header-kosten {
  border-left-color: #e53e3e;
  color: #c53030;
}
.block-header-steuer {
  border-left-color: #4299e1;
  color: #2b6cb0;
}
.block-header-ergebnis {
  border-left-color: #38a169;
  color: #276749;
}

/* v2.0: Hilfetext-Hinweis (zvEK-Faustregel) */
.help-text-hint {
  display: block;
  margin-top: 0.25rem;
  color: #718096;
  font-style: italic;
}

/* ─── Steuervergleich Section ──────────────────────────────── */
.vergleich-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.vergleich-box {
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.vergleich-vorher {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-left: 4px solid #e53e3e;
}

.vergleich-nachher {
  background: #f0fff4;
  border: 1px solid #c6f6d5;
  border-left: 4px solid #38a169;
}

.vergleich-header {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.vergleich-vorher .vergleich-header {
  color: #c53030;
}

.vergleich-nachher .vergleich-header {
  color: #276749;
}

.vergleich-zeile {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.vergleich-label {
  font-size: 0.85rem;
  color: #4a5568;
}

.vergleich-wert {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.vergleich-zeile-betont {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

.vergleich-zeile-betont .vergleich-wert {
  font-size: 1.15rem;
}

.vergleich-vorher .vergleich-zeile-betont .vergleich-wert {
  color: #c53030;
}

.vergleich-nachher .vergleich-zeile-betont .vergleich-wert {
  color: #276749;
}

.vergleich-pfeil {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vergleich-pfeil-icon {
  font-size: 2rem;
  color: #a0aec0;
  font-weight: 300;
}

.vergleich-ersparnis {
  text-align: center;
  background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
  border: 2px solid #4299e1;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}

.vergleich-ersparnis-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2b6cb0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.3rem;
}

.vergleich-ersparnis-wert {
  font-size: 2rem;
  font-weight: 800;
  color: #1a365d;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.vergleich-ersparnis-monat {
  font-size: 0.9rem;
  color: #4a5568;
  margin-top: 0.3rem;
}

/* v2.0: 10-Jahres-Vergleich */
.vergleich-trenner {
  border: none;
  border-top: 2px dashed #e2e8f0;
  margin: 2rem 0;
}

.vergleich-10j-titel {
  text-align: center;
  font-size: 1.2rem;
  color: #1a365d;
  margin-bottom: 0.5rem;
}

.vergleich-ersparnis-10j {
  background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
  border: 2px solid #3182ce;
  border-radius: 12px;
  padding: 1.5rem;
}

.vergleich-ersparnis-wert-gross {
  font-size: 2.5rem;
}

/* v2.3: Toggle-Label für Checkbox */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.toggle-label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #1a365d;
}

/* v2.3: Durchschnittlicher Aufwand monatlich — unter der 10-Jahres-Tabelle */
.durchschnitt-aufwand-box {
  text-align: center;
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  background: #f0f4f8;
  font-size: 1.15em;
}

/* v2.3: Zwei Boxen nebeneinander (Jahr 1 + Durchschnitt) */
.vergleich-eigenaufwand-doppel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .vergleich-eigenaufwand-doppel {
    grid-template-columns: 1fr;
  }
}

/* Monatlicher Eigenaufwand — prominente Darstellung unter Vergleichsboxen */
.vergleich-eigenaufwand-box {
  text-align: center;
  margin-top: 2rem;
  padding: 1.5rem 2rem;
  border-radius: 12px;
  border: 2px solid #cbd5e0;
  background: #fff;
  transition: all 0.3s ease;
}

.vergleich-eigenaufwand-box--aufwand {
  border-color: #e53e3e;
  background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

.vergleich-eigenaufwand-box--ueberschuss {
  border-color: #38a169;
  background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
}

.vergleich-eigenaufwand-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.vergleich-eigenaufwand-wert {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.4rem;
  font-variant-numeric: tabular-nums;
}

.vergleich-eigenaufwand-box--aufwand .vergleich-eigenaufwand-wert {
  color: #c53030;
}

.vergleich-eigenaufwand-box--ueberschuss .vergleich-eigenaufwand-wert {
  color: #22543d;
}

.vergleich-eigenaufwand-sub {
  font-size: 0.85rem;
  color: #718096;
}

@media (max-width: 768px) {
  .vergleich-grid {
    grid-template-columns: 1fr;
  }

  .vergleich-pfeil {
    transform: rotate(90deg);
  }

  .vergleich-ersparnis-wert {
    font-size: 1.6rem;
  }

  .vergleich-ersparnis-wert-gross {
    font-size: 2rem;
  }
}

/* ─── Charts Section v2.0 ──────────────────────────────────── */
.charts-grid-v2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.chart-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1.5rem;
}

.chart-card h3 {
  font-size: 1.1rem;
  color: #1a365d;
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.chart-subtitle {
  font-size: 0.85rem;
  color: #718096;
  margin-bottom: 1rem;
}

.chart-card-wide {
  grid-column: 1 / -1;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}

/* Donut vergrößert (v2.0) */
.chart-container-donut-gross {
  height: 380px;
  max-width: 440px;
  margin: 0 auto;
}

.chart-card-donut-gross {
  max-width: 600px;
  margin: 0 auto;
}

/* Schere Chart (v2.0) — Custom Canvas, schematische Darstellung */
.chart-container-schere {
  height: 400px;
}

.chart-container-schere canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-legende {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #edf2f7;
  font-size: 0.85rem;
}

.chart-legende-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-legende-hinweis {
  font-size: 0.8rem;
  color: #a0aec0;
  font-style: italic;
}

.chart-legende-farbe {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.chart-legende-linie {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  flex-shrink: 0;
}

.chart-legende-linie-dashed {
  width: 24px;
  height: 0;
  border-top: 3px dashed;
  border-radius: 0;
  flex-shrink: 0;
}

.chart-legende-label {
  color: #4a5568;
}

.chart-legende-wert {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1a1a1a;
}

/* Schere Beispielrechnung — Vorlage NART */
.schere-beispiel {
  margin-top: 1.5rem;
}

.schere-rechnung {
  padding: 0.5rem 0;
}

.schere-rechnung-intro {
  font-size: 0.95rem;
  color: #1a1a1a;
  margin-bottom: 0.4rem;
}

.schere-rechnung-zeile {
  font-size: 0.9rem;
  color: #4a5568;
  margin-bottom: 0.25rem;
}

.schere-rechnung-ergebnis {
  font-size: 1.05rem;
  color: #1a1a1a;
  margin-top: 0.5rem;
}

.schere-rechnung-trennlinie {
  border-top: 1px solid #cbd5e0;
  padding-top: 0.5rem;
}

.schere-zeile-ueberschuss {
  color: #276749;
}

.schere-zeile-zuzahlung {
  color: #c53030;
}

.schere-rechnung-trennlinie-duenn {
  border-top: 1px dashed #cbd5e0;
  padding-top: 0.4rem;
  margin-top: 0.3rem;
}

.schere-gewinn-rot {
  color: #276749;
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .chart-container {
    height: 240px;
  }

  .chart-container-donut-gross {
    height: 300px;
    max-width: 340px;
  }

  .chart-container-schere {
    height: 320px;
  }
}

/* ─── PDF Section ───────────────────────────────────────────── */
#section-pdf input[type="text"] {
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
}

#section-pdf input[type="text"]:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15);
  outline: none;
}

.form-actions {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
}

/* ─── Button ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  user-select: none;
}

.btn-primary {
  background-color: #2b6cb0;
  color: #fff;
  box-shadow: 0 2px 4px rgba(43, 108, 176, 0.3);
}

.btn-primary:hover {
  background-color: #2c5282;
  box-shadow: 0 4px 8px rgba(43, 108, 176, 0.35);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(43, 108, 176, 0.3);
}

.btn-primary:focus-visible {
  outline: 3px solid rgba(66, 153, 225, 0.5);
  outline-offset: 2px;
}

.btn-secondary {
  background-color: #718096;
  color: #fff;
  box-shadow: 0 2px 4px rgba(113, 128, 150, 0.3);
}

.btn-secondary:hover {
  background-color: #4a5568;
}

.form-actions-pdf {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─── Utility ───────────────────────────────────────────────── */
.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;
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  /* Alles innerhalb der Viewport-Breite halten */
  .container {
    padding: 0 0.75rem;
    max-width: 100%;
  }

  .section {
    padding: 1.25rem 0.75rem;
    margin-bottom: 1.25rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Szenario-Leiste: Buttons umbrechen auf Mobile */
  .szenario-bar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .szenario-bar-left {
    flex-wrap: wrap;
  }

  .szenario-bar-right {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .szenario-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.6rem;
  }

  .szenario-label {
    font-size: 0.8rem;
  }

  .szenario-trenner {
    display: none;
  }

  /* Header kompakter */
  .app-header h1 {
    font-size: 1.3rem;
  }

  .header-row {
    flex-wrap: wrap;
  }

  .header-logo {
    height: 50px;
  }

  /* Formular */
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row > .form-group {
    flex: 1 1 100%;
  }

  .display-row {
    padding: 0.5rem 0.75rem;
  }

  .darlehen-body .form-row {
    flex-direction: column;
  }

  /* Tabellen: dürfen horizontal scrollen */
  .table-wrapper {
    margin: 0;
    border-radius: 0;
    overflow-x: auto;
  }

  /* Section overflow für Tabellen aufheben */
  .section:has(.table-wrapper) {
    overflow-x: visible;
  }

  .ergebnis-tabelle {
    font-size: 0.75rem;
    table-layout: auto;
  }

  .ergebnis-tabelle thead th,
  .ergebnis-tabelle tbody td {
    padding: 0.35rem 0.45rem;
  }

  .sticky-col {
    min-width: 110px;
    font-size: 0.7rem;
  }

  .ergebnis-tabelle .sticky-col {
    width: 110px;
  }

  .afa-tabelle {
    font-size: 0.7rem;
  }

  .afa-tabelle th,
  .afa-tabelle td {
    padding: 0.35rem 0.4rem;
  }

  /* Summary cards */
  .summary-cards {
    grid-template-columns: 1fr;
  }

  .highlight-value-big {
    font-size: 1.8rem;
  }

  .highlight-hero-value {
    font-size: 2.2rem;
  }

  .summary-cards-rendite {
    grid-template-columns: 1fr;
  }

  /* Charts */
  .chart-card {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }

  .section {
    padding: 1rem 0.5rem;
  }

  .app-header {
    padding: 1rem 0;
  }

  .app-header h1 {
    font-size: 1.1rem;
  }

  .highlight-value-big {
    font-size: 1.5rem;
  }

  .highlight-hero-value {
    font-size: 1.8rem;
  }

  .btn {
    width: 100%;
    padding: 0.8rem 1rem;
  }

  .sticky-col {
    min-width: 90px;
    font-size: 0.65rem;
  }

  .ergebnis-tabelle .sticky-col {
    width: 90px;
  }

  .ergebnis-tabelle {
    font-size: 0.7rem;
  }

  .ergebnis-tabelle thead th,
  .ergebnis-tabelle tbody td {
    padding: 0.3rem 0.35rem;
  }

  .durchschnitt-aufwand-box {
    font-size: 1rem;
    padding: 0.6rem 0.75rem;
  }

  .szenario-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }
}

/* ─── Alter Print-Block entfernt: siehe konsolidierter @media print unten ── */

/* ═══════════════════════════════════════════════════════════════
   PRINT-DECKBLATT (nur im PDF sichtbar)
   ═══════════════════════════════════════════════════════════════ */
#print-deckblatt {
  display: none;
}

.print-deckblatt-inner {
  padding: 60px 40px;
  min-height: 260mm;
  display: flex;
  flex-direction: column;
  justify-content: center;
  page-break-after: always;
  break-after: page;
}

.print-deckblatt-logo {
  width: 200px;
  height: auto;
  margin: 0 auto 40px auto;
  display: block;
}

.print-deckblatt-linie {
  height: 2px;
  width: 60%;
  margin: 0 auto 40px auto;
  background: linear-gradient(90deg, transparent, #1a1a1a, transparent);
}

.print-deckblatt-titel {
  font-size: 42pt;
  font-weight: 300;
  color: #1a365d;
  text-align: center;
  margin-bottom: 8pt;
  letter-spacing: 0.02em;
}

.print-deckblatt-untertitel {
  font-size: 16pt;
  font-weight: 400;
  color: #718096;
  text-align: center;
  margin-bottom: 60pt;
}

.print-deckblatt-meta {
  max-width: 400px;
  margin: 0 auto;
  font-size: 11pt;
  line-height: 2;
  color: #1a1a1a;
}

.print-deckblatt-meta > div {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding: 4pt 0;
}

.print-deckblatt-meta span {
  color: #718096;
}

.print-deckblatt-meta strong {
  color: #1a365d;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   RECHTLICHE HINWEISE — Bildschirm-Darstellung
   ═══════════════════════════════════════════════════════════════ */
#section-rechtliche-hinweise .hinweis-block {
  margin-bottom: 1.25rem;
}
#section-rechtliche-hinweise .hinweis-block h3 {
  font-size: 1rem;
  color: #1a365d;
  margin: 0 0 0.35rem 0;
  font-weight: 600;
}
#section-rechtliche-hinweise .hinweis-block p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #1a1a1a;
  margin: 0 0 0.4rem 0;
}
#section-rechtliche-hinweise .hinweis-block ul {
  margin: 0.4rem 0 0.4rem 1.25rem;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #1a1a1a;
}

/* ═══════════════════════════════════════════════════════════════
   PRINT MEDIA — Rechner als PDF drucken (@page + CSS)
   ═══════════════════════════════════════════════════════════════ */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 10mm 12mm 10mm;
  }

  /* Farben mitdrucken (sonst Chrome druckt nur Text) */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html, body {
    background: #fff !important;
    font-size: 9pt;
    line-height: 1.4;
  }

  /* ─── Elemente ausblenden ─── */
  #login-overlay,
  .szenario-bar,
  .app-header,
  .app-footer,
  #section-pdf,
  .btn,
  .form-actions,
  .form-actions-pdf,
  #btn-pdf-kunde,
  /* Inaktive Darlehen: kein Platz für leere Placeholder-Felder */
  .darlehen-block.darlehen-inaktiv,
  .darlehen-block.darlehen-disabled {
    display: none !important;
  }

  /* Sonder-AfA-Toggle-Row bei nicht-individuellen Modi vollständig weg */
  #afa-individuell-row[style*="display:none"],
  #afa-individuell-row[style*="display: none"] {
    display: none !important;
  }

  /* ─── Print-Deckblatt einblenden ─── */
  #print-deckblatt {
    display: block !important;
  }

  /* ─── Layout-Anpassungen ─── */
  .page-wrapper {
    overflow: visible !important;
    width: 100%;
    max-width: 100% !important;
  }

  main.container,
  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ─── Sektionen: kleine dürfen zusammen bleiben, große dürfen brechen ─── */
  .section {
    background: #fff !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
    padding: 12pt !important;
    margin-bottom: 12pt !important;
    /* page-break-inside: auto ist default — Section darf brechen wenn zu groß */
    border-radius: 4pt !important;
  }

  /* Kleine Sektionen sollten nicht brechen */
  #section-persoenlich,
  #section-vermietung,
  #section-kosten,
  #section-finanzierung,
  #afa-section {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Große Sektionen bekommen jeweils eine eigene Seite —
     dadurch keine krummen Brüche mitten in Tabellen/Cards.
     AfA folgt direkt auf Finanzierung (gleiche Seite falls Platz). */
  #section-finanzierung,
  #section-ergebnis,
  #section-zusammenfassung,
  #section-steuervergleich,
  #section-charts,
  #section-rechtliche-hinweise {
    page-break-before: always;
    break-before: page;
  }
  /* AfA-Section darf sich zu Finanzierung dazugesellen — kein Zwangs-Umbruch */
  #afa-section {
    page-break-before: auto;
    break-before: auto;
  }

  /* Ergebnis-Tabellen dürfen NICHT zwischen Block-Header und Tabelle brechen */
  .block-header {
    page-break-after: avoid !important;
    break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  /* Headings sollen nicht allein am Seitenende stehen */
  .section h2, .section h3 {
    page-break-after: avoid;
    break-after: avoid;
  }

  /* Innerhalb einer Section sollen Form-Rows/Darlehen-Blöcke atomar bleiben */
  .form-row,
  .darlehen-block,
  .darlehen-body,
  .highlight-box,
  .vergleich-box,
  .chart-card,
  .summary-group,
  .ergebnis-tabelle,
  .afa-tabelle,
  .table-wrapper,
  .durchschnitt-aufwand-box,
  .vergleich-ersparnis,
  .vergleich-eigenaufwand-box,
  .afa-empfehlung {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .section h2 {
    font-size: 14pt !important;
    color: #1a365d !important;
    margin-bottom: 8pt !important;
    padding-bottom: 4pt !important;
    border-bottom: 1px solid #1a1a1a !important;
  }

  .section h3,
  .block-header {
    font-size: 11pt !important;
    color: #1a365d !important;
    margin-top: 8pt !important;
    margin-bottom: 4pt !important;
  }

  /* Große Sektionen dürfen umbrechen */
  #section-ergebnis,
  #section-zusammenfassung,
  #section-steuervergleich,
  #section-charts,
  #afa-section,
  #section-rechtliche-hinweise {
    page-break-inside: auto;
    break-inside: auto;
  }

  /* Rechtliche Hinweise: Blöcke atomar halten, kompakte Typografie */
  #section-rechtliche-hinweise .hinweis-block {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 8pt;
  }
  #section-rechtliche-hinweise .hinweis-block h3 {
    font-size: 10pt !important;
    color: #1a365d !important;
    margin-top: 6pt !important;
    margin-bottom: 2pt !important;
  }
  #section-rechtliche-hinweise .hinweis-block p,
  #section-rechtliche-hinweise .hinweis-block li {
    font-size: 8.5pt !important;
    line-height: 1.4 !important;
    color: #1a1a1a !important;
    margin: 0 0 3pt 0 !important;
  }
  #section-rechtliche-hinweise .hinweis-block ul {
    margin: 3pt 0 3pt 14pt !important;
    padding: 0 !important;
  }

  /* Inputs: als reine Werte darstellen, Rahmen entfernen bei readonly */
  input, select, textarea {
    border: 1px solid #cbd5e0 !important;
    background: #fff !important;
    color: #1a1a1a !important;
    font-size: 9pt !important;
    padding: 2pt 4pt !important;
  }

  .input-gray,
  input[readonly],
  input[disabled] {
    background: #f7fafc !important;
    border: none !important;
    color: #1a1a1a !important;
  }

  input[type="range"] {
    display: none !important;
  }

  /* Slider-Anzeige (Wertetext) sichtbar */
  .slider-group {
    background: #f7fafc !important;
    padding: 6pt !important;
    border-radius: 4pt !important;
  }

  /* Help-Texte kleiner */
  .help-text, .help-text-hint {
    font-size: 7pt !important;
    color: #718096 !important;
  }

  /* Tabellen — table-layout fixed, damit alle 11 Spalten sicher passen */
  table.ergebnis-tabelle,
  table.afa-tabelle {
    font-size: 6.5pt !important;
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
  }

  table.ergebnis-tabelle th,
  table.ergebnis-tabelle td,
  table.afa-tabelle th,
  table.afa-tabelle td {
    padding: 1.5pt 2pt !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
  }

  /* Erste Spalte (Kennzahl-Label) breiter, Jahre gleich schmal */
  table.ergebnis-tabelle th:first-child,
  table.ergebnis-tabelle td:first-child,
  table.afa-tabelle th:first-child,
  table.afa-tabelle td:first-child {
    width: 22% !important;
    white-space: normal !important;
  }

  table.ergebnis-tabelle th:not(:first-child),
  table.ergebnis-tabelle td:not(:first-child),
  table.afa-tabelle th:not(:first-child),
  table.afa-tabelle td:not(:first-child) {
    width: 7.8% !important;
    text-align: right !important;
  }

  /* AfA-Tabelle: hat 12 Spalten (Label + 10 Jahre + Gesamt) */
  table.afa-tabelle th:first-child,
  table.afa-tabelle td:first-child {
    width: 20% !important;
  }
  table.afa-tabelle th:last-child,
  table.afa-tabelle td:last-child {
    width: 11% !important;
    font-weight: 600;
  }
  table.afa-tabelle th:not(:first-child):not(:last-child),
  table.afa-tabelle td:not(:first-child):not(:last-child) {
    width: 6.9% !important;
  }

  /* AfA-Badge in Empfehlungszeile: kein Overflow */
  .afa-badge {
    font-size: 5.5pt !important;
    padding: 1pt 3pt !important;
    display: inline-block;
    margin-left: 3pt;
    vertical-align: middle;
  }

  /* AfA-Empfehlungs-Zeile in Tabelle: Label darf umbrechen */
  .afa-tabelle tr.afa-empfehlung td:first-child {
    white-space: normal !important;
    line-height: 1.2 !important;
  }

  table.ergebnis-tabelle thead th {
    background: #edf2f7 !important;
    color: #1a365d !important;
    font-weight: 600;
  }

  .sticky-col {
    position: static !important;
    background: #f7fafc !important;
  }

  .table-wrapper {
    overflow: visible !important;
    max-height: none !important;
  }

  /* Highlight-Boxen bleiben farbig */
  .highlight-box,
  .vergleich-box,
  .vergleich-ersparnis,
  .vergleich-eigenaufwand-box,
  .durchschnitt-aufwand-box,
  .afa-empfehlung {
    box-shadow: none !important;
    border-radius: 4pt !important;
  }

  .highlight-primary,
  .highlight-aufwand-hero {
    padding: 8pt !important;
  }

  /* Charts kompakt damit beide (Donut + Schere) auf eine Seite passen */
  .chart-container {
    max-width: 100% !important;
    max-height: 65mm !important;
  }

  .chart-container-donut-gross {
    max-width: 65mm !important;
    max-height: 65mm !important;
    margin: 0 auto !important;
  }

  .chart-container-schere {
    height: 55mm !important;
  }

  .charts-grid-v2 {
    display: block !important;
  }

  .chart-card {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 6pt !important;
    padding: 6pt 8pt !important;
  }

  .chart-card h3 {
    font-size: 10pt !important;
    margin-bottom: 2pt !important;
  }

  .chart-subtitle {
    font-size: 7pt !important;
    margin-bottom: 4pt !important;
  }

  .chart-legende {
    font-size: 7pt !important;
    margin-top: 2pt !important;
  }

  .schere-beispiel {
    font-size: 7pt !important;
    margin-top: 4pt !important;
  }

  .schere-rechnung-zeile {
    padding: 1pt 0 !important;
  }

  /* Section-Intros knapper */
  .section-intro {
    font-size: 8pt !important;
    color: #718096 !important;
    margin-bottom: 6pt !important;
  }

  /* Form-Rows enger UND explicit mehrspaltig (Screen-Layout beibehalten).
     Override der Mobile-Query, die bei schmalen Viewports column setzt. */
  .form-row,
  .darlehen-body .form-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8pt !important;
    margin-bottom: 4pt !important;
    align-items: flex-start !important;
  }

  .form-row > .form-group {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  /* Section 2 (Objektdaten) hat viele Felder — kompakter */
  #section-objekt .form-row {
    margin-bottom: 2pt !important;
  }

  /* AfA-Section: Slider-Range weg damit min/max labels nicht überfordern */
  .slider-labels {
    display: none !important;
  }

  /* Summary-Cards mehrspaltig wie im Screen (3 Spalten) */
  .summary-cards {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6pt !important;
  }
  .summary-cards-rendite {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .highlight-box {
    padding: 6pt 8pt !important;
    border-radius: 3pt !important;
  }
  .highlight-label {
    font-size: 7pt !important;
    margin-bottom: 2pt !important;
  }
  .highlight-value {
    font-size: 11pt !important;
  }
  .highlight-value-big {
    font-size: 14pt !important;
  }
  .highlight-hero-label {
    font-size: 8pt !important;
  }
  .highlight-hero-value {
    font-size: 16pt !important;
  }
  .highlight-hero-sub, .highlight-sub {
    font-size: 6pt !important;
  }
  .summary-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 8pt !important;
  }
  .summary-group h3 {
    font-size: 10pt !important;
    margin-bottom: 3pt !important;
  }
  .summary-group-highlight {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6pt !important;
  }

  /* Steuervergleich-Boxen (Vorher/Nachher) mehrspaltig */
  .vergleich-grid {
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    gap: 6pt !important;
    align-items: center;
  }
  .vergleich-box {
    padding: 6pt 8pt !important;
  }
  .vergleich-eigenaufwand-doppel {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6pt !important;
  }

  .form-group label {
    font-size: 8pt !important;
    color: #4a5568 !important;
    margin-bottom: 1pt !important;
  }

  /* Checkbox-Labels */
  .checkbox-label {
    font-size: 9pt !important;
  }

  /* Wertfarben behalten */
  .wert-positiv { color: #276749 !important; }
  .wert-negativ { color: #c53030 !important; }
  .wert-ueberschuss { color: #276749 !important; font-weight: 600 !important; }

  /* Speicher-Bar unten weg */
  .szenario-bar-bottom { display: none !important; }
}
