:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --text: #1a2330;
  --muted: #5b6676;
  --line: #e4e8ed;
  --field-line: #c5ced8;
  --subtle: #f6f8f9;
  /* eine Akzentfarbe: das dunkle Grün der Ergebnis-Karte */
  --accent: #0b4a46;
  --accent-dark: #073532;
  --accent-soft: #e8f1f0;
  --accent-soft-2: #b9d6d3;
  --card: #0b4a46;
  --card-text: #ffffff;
  --card-muted: #b7d6d3;
  --card-line: rgba(255, 255, 255, .16);
  --warn-soft: #fdf5e6;
  --warn-text: #5c3d00;
  --error: #b42318;
  --error-soft: #fdeceb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
  --topbar-h: 60px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0; color: var(--text); }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.25rem); font-weight: 750; letter-spacing: -.02em; }
h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.1875rem; font-weight: 700; margin-bottom: .75rem; }
h4 { font-size: 1.0625rem; font-weight: 700; }
h2:focus, h2:focus-visible { outline: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.ico { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }

/* Text-Links als Knöpfe */
.linkbtn {
  font: inherit; color: var(--accent); background: none; border: 0; padding: 4px 2px; margin: 0;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center;
}
.linkbtn:hover { color: var(--accent-dark); text-decoration-thickness: 2px; }
.linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Kopfzeile ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--topbar-h); }
.wordmark {
  display: inline-flex; align-items: center; gap: 9px; text-decoration: none;
  font-weight: 800; font-size: 1.0625rem; letter-spacing: -.01em; color: var(--accent);
}
.wordmark-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--accent); box-shadow: 4px 4px 0 var(--accent-soft-2); }
.top-preview { display: none; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.top-preview-label { font-size: .8125rem; color: var(--muted); font-weight: 600; }
.top-preview-value { font-size: 1.25rem; font-weight: 800; color: var(--accent); white-space: nowrap; }
.top-preview.has-error .top-preview-value { color: var(--error); font-size: 1rem; }

.intro { padding-top: 28px; }
.lead { margin: .5rem 0 0; color: var(--muted); max-width: 60ch; font-size: 1.0625rem; }

/* ---------- Fortschritt ---------- */
.steps-nav { padding-top: 24px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.steps li { position: relative; padding-top: 12px; }
.steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 3px; background: var(--line); }
.steps li.is-reached::before { background: var(--accent); }
.step-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 6px 0 0;
  font: inherit; font-size: 1rem; color: var(--muted); background: none; border: 0; cursor: pointer; text-align: left;
}
.step-num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--field-line); font-weight: 700; font-size: .9375rem; background: #fff;
}
.step-link.is-done { color: var(--accent); }
.step-link.is-done .step-num { border-color: var(--accent); color: var(--accent); }
.step-link.is-done:not(:disabled) .step-lbl { text-decoration: underline; text-underline-offset: 3px; }
.step-link.is-current { color: var(--text); font-weight: 700; }
.step-link.is-current .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-link:disabled { cursor: default; }
.step-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Vertrauenszeile */
.trustbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 16px; padding-top: 6px; padding-bottom: 6px; }
.trust { margin: 0; display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9375rem; }
.trust .ico { color: var(--accent); }
.mode-toggle { font-size: .9375rem; }

/* ---------- Layout ---------- */
.layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); padding-top: 12px; padding-bottom: 32px; }
.form { display: grid; gap: 20px; min-width: 0; align-content: start; }
.results { display: grid; gap: 16px; min-width: 0; align-content: start; }

.card, .panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px;
}
@media (max-width: 599px) { .card, .panel { padding: 20px 16px; } }

/* Geführter Ablauf: schmale Spalte, nur der aktuelle Schritt sichtbar */
.mode-wizard .wrap { max-width: 792px; }
.mode-wizard[data-step="3"] .wrap { max-width: 912px; }
.mode-wizard .top-preview { display: flex; }
.mode-wizard .topbar { position: sticky; top: 0; z-index: 30; }
.mode-wizard .layout { display: block; }
.mode-wizard .step-card, .mode-wizard .results { display: none; }
.mode-wizard[data-step="1"] .step-card[data-step="1"],
.mode-wizard[data-step="2"] .step-card[data-step="2"] { display: block; }
.mode-wizard[data-step="3"] .form { display: none; }
.mode-wizard[data-step="3"] .results { display: grid; }
.mode-wizard:not([data-step="1"]) .intro { display: none; }
.mode-wizard .mbar, .mode-wizard .pin-mini { display: none !important; }

/* Einseiten-Ansicht: Eingaben links, Ergebnis rechts (wie bisher) */
.mode-single .steps-nav, .mode-single .step-actions, .mode-single .step-kicker,
.mode-single .inputs-summary, .mode-single .step3-head, .mode-single .step3-back { display: none; }
@media (min-width: 960px) {
  .mode-single .layout { grid-template-columns: minmax(380px, 5fr) minmax(0, 6fr); align-items: start; gap: 24px; }
}

/* Ergebnis-Karte fixieren (Pin): nur die Karte fährt mit, alles darunter scrollt mit der Seite. */
@media (min-width: 960px) {
  .pin-on .result-sticky { position: sticky; top: var(--sticky-top, 0px); z-index: 5; padding-top: 12px; margin-top: -12px; padding-bottom: 4px; background: var(--bg); }
}
@media (max-width: 959px) {
  /* Volle Karte nur, wenn sie höchstens 35 % der Höhe braucht – sonst übernimmt .pin-mini */
  .pin-on:not(.pin-compact) .result-sticky { position: sticky; top: var(--sticky-top, 0px); z-index: 5; padding-top: 8px; margin-top: -8px; background: var(--bg); }
  .pin-on:not(.pin-compact) .results.sheet-open .result-sticky { top: var(--mini-top, 0px); }
  .mode-single.pin-compact { scroll-padding-top: 76px; }
}

/* ---------- Schritt-Karten ---------- */
.step-kicker { margin: 0 0 4px; font-size: .875rem; font-weight: 700; color: var(--accent); letter-spacing: .02em; }
.step-intro { margin: 6px 0 22px; color: var(--muted); }
.mode-single .step-intro { margin-bottom: 18px; }
.step-actions {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line);
}
.step-actions .btn-next { margin-left: auto; }
.step-msg { flex: 1 0 100%; margin: 0; color: var(--error); font-weight: 600; text-align: right; }
.step-msg:empty { display: none; }
.step3-back { border-top: 0; margin-top: 0; padding-top: 0; }
@media (max-width: 599px) {
  .step-actions { flex-direction: column-reverse; align-items: stretch; }
  .step-actions .btn-next { width: 100%; margin-left: 0; }
  .step-actions .back { align-self: center; }
  .step-msg { text-align: center; }
  .step3-back { align-items: center; }
}
.step3-head { padding-top: 4px; }

/* ---------- Felder ---------- */
.field { position: relative; margin-bottom: 18px; min-width: 0; }
.field > label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); font-size: .9375rem; }

/* Grosse Eingabefelder mit Einheit im Feld */
.affix {
  display: flex; align-items: center; min-width: 0; flex: 1 1 auto;
  border: 1.5px solid var(--field-line); border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.affix:hover { border-color: #a9b4c0; }
.affix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.affix input {
  flex: 1 1 auto; min-width: 0; width: 100%; border: 0; outline: 0; background: transparent;
  font: 600 1.125rem/1.2 var(--font); color: inherit; padding: 14px 4px 14px 14px; min-height: 52px;
  font-variant-numeric: tabular-nums;
}
.affix input::placeholder { font-weight: 400; color: #8d97a3; font-size: 1rem; }
.sfx { flex: 0 0 auto; padding: 0 14px 0 6px; color: var(--muted); font-size: .9375rem; white-space: nowrap; }
select, input[type=date] {
  width: 100%; min-width: 0; font: 600 1rem var(--font); color: inherit; padding: 12px 14px; min-height: 52px;
  border: 1.5px solid var(--field-line); border-radius: 10px; background: #fff;
}
select:focus, input[type=date]:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.input-row { display: flex; gap: 8px; }
.input-row select { flex: 0 0 auto; width: auto; }

.grid2, .grid3 { display: grid; gap: 0 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 559px) { .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); } }

.check { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin: 10px 0 4px; cursor: pointer; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); margin: 0; flex: 0 0 auto; }
.check-tight { margin: -8px 0 12px; }

.affix:has(.is-invalid), select.is-invalid, input[type=date].is-invalid { border-color: var(--error); background: var(--error-soft); }
.err { color: var(--error); font-size: .9375rem; font-weight: 600; margin: 6px 0 0; }
.err:empty { display: none; }
.hint { color: var(--muted); font-size: .875rem; margin: 6px 0 0; }
.is-disabled { opacity: .45; pointer-events: none; }

/* ---------- Gruppen zum Aufklappen ---------- */
.group { border: 1px solid var(--line); border-radius: 10px; margin: 6px 0 12px; background: #fff; }
.group > summary {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; list-style: none; min-height: 56px; border-radius: 10px;
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary::after {
  content: ""; flex: 0 0 auto; width: 9px; height: 9px; margin-left: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px); transition: transform .15s;
}
.group[open] > summary::after { transform: rotate(-135deg) translateY(-3px); }
.group > summary:hover .sec-title { color: var(--accent); }
.group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sec-text { flex: 1 1 auto; min-width: 0; }
.sec-title { font-weight: 700; }
.sec-benefit { color: var(--muted); }
.sec-benefit::before { content: " – "; }
.sec-value { flex: 0 0 auto; font-size: .875rem; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.sec-value:empty { display: none; }
.sec-body { padding: 16px 16px 4px; border-top: 1px solid var(--line); }
@media (max-width: 480px) {
  .group > summary { flex-wrap: wrap; row-gap: 4px; }
  .sec-text { flex: 1 1 60%; }
  .sec-value { order: 3; }
  .group > summary::after { order: 2; }
  .sec-benefit { display: block; font-size: .875rem; }
  .sec-benefit::before { content: ""; }
  .actions .btn { flex: 1 1 100%; }
  .actions .reset { margin-left: 0; }
}
.group-warranty { margin-top: 4px; }

/* ---------- Tooltip ---------- */
.tip {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid #b9c2cc; background: #fff;
  color: var(--muted); font: italic 700 12px/1 Georgia, serif; padding: 0; cursor: help; flex: 0 0 auto;
}
.tip:hover, .tip:focus { border-color: var(--accent); color: var(--accent); outline: none; }
.tip-text {
  display: none; position: absolute; z-index: 10; left: 0; right: 0; top: 30px;
  background: var(--text); color: #fff; font-size: .9375rem; font-weight: 400; line-height: 1.5;
  padding: 10px 12px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.15);
}
.field:has(.tip:hover) .tip-text, .field:has(.tip:focus) .tip-text { display: block; }

/* ---------- Deine Eingaben (Schritt 3) ---------- */
.inputs-summary { padding-top: 22px; padding-bottom: 18px; }
.inputs-summary > h3 { margin-bottom: 8px; }
.summary { display: grid; gap: 8px 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sum-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.sum-list { margin: 6px 0 0; display: grid; gap: 2px; }
.sum-list > div { display: flex; justify-content: space-between; gap: 16px; font-size: .9375rem; padding: 2px 0; }
.sum-list dt { color: var(--muted); flex: 0 0 auto; }
.sum-list dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- Ergebnis ---------- */
.error-banner { background: var(--error-soft); color: var(--error); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 1rem; }
.error-banner .linkbtn { color: var(--error); min-height: 0; padding: 0 2px; }
.results.stale .result-card, .results.stale .result-body { opacity: .35; pointer-events: none; }

.result-card {
  position: relative;
  background: var(--card); color: var(--card-text); border-radius: var(--radius);
  padding: 24px 24px 20px; box-shadow: 0 8px 24px rgba(11, 74, 70, .18);
}
.hero-label { margin: 0; padding-right: 48px; color: var(--card-muted); font-weight: 600; font-size: 1rem; }

/* Pin-Knopf (44 × 44 px Touch-Fläche); aktiv = gefüllter, aufrechter Pin */
.pin-btn {
  position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--card-muted); cursor: pointer;
}
.pin-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.pin-btn:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
.pin-ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(45deg); }
.pin-btn[aria-pressed="true"] { color: #fff; background: rgba(255, 255, 255, .18); }
.pin-btn[aria-pressed="true"] .pin-ico { transform: none; }
.pin-btn[aria-pressed="true"] .pin-head { fill: currentColor; }

/* Schalter */
.switch { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 8px 0 0; font-size: 1rem; cursor: pointer; }
.switch input {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; position: relative; margin: 0; cursor: pointer;
  width: 46px; height: 28px; border-radius: 14px; background: #c3ccd5;
}
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.switch input:checked { background: var(--accent); }
.switch input:checked::after { left: 21px; }
.switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#down-hint { margin-top: 2px; }
.hero-value { margin: 2px 0 6px; font-size: clamp(2.75rem, 11vw, 4.2rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--card-text); white-space: nowrap; }
.hero-value .cur { font-size: .36em; font-weight: 600; color: var(--card-muted); letter-spacing: 0; vertical-align: .55em; margin-right: 2px; }
.hero-full { margin: 0 0 6px; color: var(--card-muted); font-size: .9375rem; }
.hero-full strong { color: var(--card-text); white-space: nowrap; }
.hero-sub { margin: 0; color: var(--card-muted); font-size: .9375rem; }
.card-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--card-line); }
@media (min-width: 640px) { .card-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) and (max-width: 1200px) { .mode-single .card-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ck p { margin: 0; }
.ck-label { font-size: .8125rem; color: var(--card-muted); font-weight: 600; }
.ck-value { font-size: 1.1875rem; font-weight: 700; white-space: nowrap; }
.ck-sub { font-size: .8125rem; color: var(--card-muted); }
.privacy { margin: 10px 4px 0; font-size: .875rem; color: var(--muted); display: flex; align-items: flex-start; gap: 8px; }
.privacy .ico { color: var(--accent); margin-top: 1px; }

.result-body { padding-top: 6px; padding-bottom: 6px; }
.block-first { padding-top: 18px; }

.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 12em 1fr 6.5em; align-items: center; gap: 12px; font-size: .9375rem; }
.bar-track, .bar-fill { display: block; }
.bar-track { height: 10px; background: #edf0f3; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 5px; min-width: 2px; transition: width .2s; }
.bar-fill.zero { background: transparent; }
.bar-val { text-align: right; font-weight: 600; }
.bar.is-zero { color: #8d97a3; }
.bar-sum { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; }
@media (max-width: 480px) { .bar { grid-template-columns: 9.5em 1fr 5.6em; gap: 8px; font-size: .875rem; } }

.block { padding: 22px 0; border-bottom: 1px solid var(--line); }
.block:last-child { border-bottom: 0; }

/* Schieberegler: nur der Griff ist ziehbar; Leiste reagiert nicht. */
.sensitivity > .hint { margin: -6px 0 14px; }
.slider { margin-bottom: 16px; }
.slider-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slider-head label { font-size: 1rem; font-weight: 600; }
.slider output { font-weight: 600; font-size: .875rem; color: var(--muted); margin-left: 4px; }
.slider-num { width: 9.5em; flex: 0 0 auto; }
.slider-num input { text-align: right; min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
.slider-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.step-btn {
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border-radius: 10px;
  border: 1.5px solid var(--field-line); background: var(--panel); color: var(--accent);
  font: inherit; font-size: 1.4rem; font-weight: 700; line-height: 1; cursor: pointer;
  touch-action: manipulation;
}
.step-btn:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.step-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.step-btn:disabled { cursor: default; opacity: .45; }
.track { position: relative; flex: 1 1 auto; min-width: 0; height: 6px; margin: 0 22px; background: #dde3e9; border-radius: 3px; }
.track-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 3px; }
/* Griff: 44 × 44 px Touch-Fläche, sichtbarer Kreis 28 px. Nur hier touch-action: none. */
.thumb {
  position: absolute; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; cursor: grab; touch-action: none; outline: none;
}
.thumb::before {
  content: ""; position: absolute; left: 8px; top: 8px; width: 28px; height: 28px; box-sizing: border-box;
  border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
  transition: transform .1s;
}
.thumb:hover::before, .slider.is-dragging .thumb::before { transform: scale(1.08); }
.slider.is-dragging .thumb { cursor: grabbing; }
.thumb:focus-visible::before { box-shadow: 0 0 0 3px var(--accent-soft-2); }
.slider.is-disabled .track-fill { background: #b8c1ca; }
.slider.is-disabled .thumb { cursor: default; }
.slider.is-disabled .thumb::before { border-color: #b8c1ca; box-shadow: none; }

/* Einmalig beim Start */
.once-list { margin: 0; display: grid; gap: 4px; }
.once-list > div { display: flex; justify-content: space-between; gap: 12px; font-size: 1rem; }
.once-list dt { color: var(--text); }
.once-list dd { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.once-list .once-sum { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 2px; }
.once-list .once-sum dt, .once-list .once-sum dd { font-weight: 700; }
.once-list .once-credit dt, .once-list .once-credit dd, .once-list .once-empty dt { color: var(--muted); }
.once .note.muted { margin: 10px 0 0; }

/* Vergleich: unter 600 px drei Karten statt Tabelle */
.compare-cards { display: none; }
@media (max-width: 599px) {
  .table-wrap { display: none; }
  .compare-cards { display: grid; gap: 10px; }
}
.ccard { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--panel); min-width: 0; }
.ccard.is-best { border-color: var(--accent); background: var(--accent-soft); }
.ccard.is-na { color: var(--muted); }
.ccard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.badge-best { font-size: .8125rem; font-weight: 700; color: #fff; background: var(--accent); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ccard dl { margin: 0; display: grid; gap: 4px; }
.ccard dl > div { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; }
.ccard dt { color: var(--muted); }
.ccard dd { margin: 0; font-weight: 700; text-align: right; }
.ccard dl > div:first-child dd { font-size: 1.0625rem; }
.ccard-na { margin: 0; font-size: .9375rem; }

.table-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: .9375rem; min-width: 440px; }
.compare th, .compare td { padding: 9px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.compare th:first-child { text-align: left; font-weight: 500; color: var(--muted); }
.compare thead th { font-weight: 700; color: var(--text); }
.compare tr.strong td { font-weight: 700; }
.compare td.best { color: var(--accent); }
.compare td.na { color: #8d97a3; }
.note { font-size: .9375rem; margin: 12px 0 0; }
.muted { color: var(--muted); font-size: .875rem; }
.block .group:first-of-type { margin-top: 16px; }

.flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flags li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: .9375rem; background: var(--accent-soft); color: var(--text); }
.flags li .ico { margin-top: 2px; color: var(--accent); }
.flags li.warn { background: var(--warn-soft); color: var(--warn-text); }
.flags li.warn .ico { color: #b26b00; }
.flags li.ok { color: var(--accent); }

.checklist summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; list-style: none; min-height: 44px; }
.checklist summary::-webkit-details-marker { display: none; }
.checklist summary h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.checklist summary h3::before {
  content: ""; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg); transition: transform .15s;
}
.checklist[open] summary h3::before { transform: rotate(45deg); }
.count { font-size: .875rem; color: var(--muted); white-space: nowrap; }
.checklist ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 2px; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; cursor: pointer; font-size: 1rem; }
.checklist input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.checklist label:has(input:checked) { color: var(--muted); text-decoration: line-through; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 22px; }
.actions .reset { margin-left: auto; font-size: .9375rem; }
.btn {
  font: inherit; font-weight: 600; padding: 10px 18px; border-radius: 10px; border: 1.5px solid var(--field-line);
  background: #fff; color: var(--text); cursor: pointer; min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn:disabled, .btn:disabled:hover { opacity: .4; cursor: default; background: #fff; border-color: var(--field-line); color: var(--muted); }
.btn-primary:disabled, .btn-primary:disabled:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-next { min-height: 56px; padding: 0 32px; font-size: 1.0625rem; font-weight: 700; }
.copy-msg { font-size: .9375rem; color: var(--accent); }

.print-only { display: none; }

/* ---------- Feldkopf mit Aktion (z. B. «Berechnen») ---------- */
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.field-head > label { display: flex; align-items: center; gap: 6px; font-size: 1rem; font-weight: 600; margin: 0; }
.field-action { min-height: 32px; padding: 0 2px; font-weight: 600; }
.tax-applied { color: var(--accent); font-weight: 600; }
.tax-applied:empty { display: none; }

/* ---------- Dialog Verkehrssteuer ---------- */
.dialog {
  border: 0; padding: 0; border-radius: var(--radius); color: var(--text); background: #fff;
  width: min(600px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  box-shadow: 0 20px 60px rgba(16, 24, 40, .25);
}
.dialog::backdrop { background: rgba(16, 24, 40, .45); }
.dialog-inner { padding: 24px 28px 20px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { font-size: 1.375rem; }
.dialog-close {
  flex: 0 0 auto; width: 44px; height: 44px; margin-right: -10px; border: 0; border-radius: 10px;
  background: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.dialog-close:hover { background: var(--subtle); color: var(--text); }
.dialog-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dialog-intro { margin: 4px 0 18px; color: var(--muted); }
.dialog .field { margin-bottom: 14px; }
.tax-result { margin-top: 4px; padding: 16px; border-radius: 10px; background: var(--subtle); border: 1px solid var(--line); }
.tax-empty { margin: 0; color: var(--muted); }
.tax-amount { display: flex; flex-direction: column; gap: 2px; }
.tax-label { font-size: .9375rem; color: var(--muted); font-weight: 600; }
.tax-value { font-size: 1.75rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.tax-value small { font-size: 1rem; font-weight: 600; color: var(--muted); }
.tax-badge { align-self: flex-start; margin-top: 4px; font-size: .8125rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.tax-badge.is-rw { background: var(--warn-soft); color: var(--warn-text); }
.tax-note { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn-text); font-size: .9375rem; font-weight: 600; }
.tax-note .ico { margin-top: 2px; }
.tax-note a { color: inherit; }
.tax-meta { margin: 10px 0 0; font-size: .9375rem; }
.tax-source { margin: 10px 0 0; font-size: .875rem; color: var(--muted); }
.dialog-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 20px; }
.dialog-actions .btn { min-height: 52px; padding: 0 28px; }
@media (max-width: 599px) {
  .dialog {
    width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: var(--radius) var(--radius) 0 0;
    max-height: 92dvh;
  }
  .dialog-inner { padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
  .dialog .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-actions { flex-direction: column-reverse; align-items: stretch; gap: 4px; }
  .dialog-actions .btn { width: 100%; }
  .dialog-actions .linkbtn { align-self: center; }
}

/* ---------- Fusszeile ---------- */
.site-footer { margin-top: 24px; padding: 28px 0 40px; border-top: 1px solid var(--line); background: var(--subtle); color: var(--muted); font-size: .9375rem; }
.site-footer p { max-width: 80ch; margin: 0 0 10px; }
.site-footer strong { color: var(--text); }
.placeholder-note { font-style: italic; }

/* ---------- Handy, Einseiten-Ansicht: feste Ergebnisleiste + Ergebnis als Vollbild ---------- */
.mbar, .sheet-head, .pin-mini { display: none; }
@media (max-width: 959px) {
  .mode-single body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .mbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--panel); border: 0; border-top: 1px solid var(--line);
    box-shadow: 0 -6px 24px rgba(23, 32, 43, .12);
    font: inherit; color: inherit; text-align: left; cursor: pointer;
    transition: transform .2s ease;
  }
  .mbar.is-hidden { transform: translateY(110%); }
  .mbar-text { display: flex; flex-direction: column; min-width: 0; }
  .mbar-label { font-size: .875rem; color: var(--muted); font-weight: 600; }
  .mbar-value { font-size: 1.5rem; font-weight: 750; color: var(--accent); line-height: 1.15; white-space: nowrap; }
  .mbar.has-error .mbar-value { color: var(--error); font-size: 1rem; }
  .mbar-cta {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 16px; border-radius: 10px;
    background: var(--accent); color: #fff; font-weight: 700; font-size: 1rem;
  }

  .results.sheet-open {
    position: fixed; inset: 0; z-index: 50; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg); padding: 0 12px calc(16px + env(safe-area-inset-bottom));
  }
  .results.sheet-open .sheet-head {
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 2; background: var(--bg);
    padding: 10px 4px; font-weight: 700; font-size: 1.0625rem;
  }
  body.sheet-lock { overflow: hidden; }

  /* Kompakte fixierte Karte: nur die Monatszahl, ca. 60 px hoch (weit unter 35 % der Höhe) */
  .pin-mini {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; top: var(--mini-top, 0px); z-index: 55;
    padding: 6px 8px 6px 16px; background: var(--card); color: var(--card-text);
    box-shadow: 0 6px 18px rgba(11, 74, 70, .28);
    visibility: hidden; transform: translateY(-120%);
  }
  .pin-mini.is-shown { visibility: visible; transform: none; }
  .pin-mini-text { display: flex; flex-direction: column; min-width: 0; }
  .pin-mini-label { font-size: .8125rem; font-weight: 600; color: var(--card-muted); }
  .pin-mini-value { font-size: 1.35rem; font-weight: 800; line-height: 1.15; white-space: nowrap; }
  .pin-mini .pin-btn { position: static; flex: 0 0 auto; }
}

/* ---------- Netlify-Badge ----------
   Netlify fügt online unten rechts ein «Powered by Netlify»-iFrame ein (#nl-badge-frame).
   Es bleibt sichtbar, wird aber so verschoben, dass es keine Bedienelemente verdeckt. */
@media (max-width: 959px) {
  /* Solange die Ergebnisleiste sichtbar ist, sitzt das Badge direkt darüber. */
  .mbar-visible #nl-badge-frame { bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
  .mode-single body:has(#nl-badge-frame) { padding-bottom: calc(140px + env(safe-area-inset-bottom)); }
  body:has(#nl-badge-frame) .results.sheet-open { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
body:has(#nl-badge-frame) .site-footer { padding-bottom: 96px; }

/* ---------- Druck / PDF ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 10.5pt; padding: 0 !important; }
  .privacy, .form, .no-print, .lead, .mbar, .sheet-head, #nl-badge-frame, .pin-btn, .pin-mini,
  .topbar, .steps-nav, .trustbar, .inputs-summary, .step3-head, .step-actions, .actions, .group { display: none !important; }
  .intro { padding: 0 0 8px; display: block !important; }
  .layout, .mode-wizard .layout { display: block; padding: 0; }
  .results, .mode-wizard .results, .results.sheet-open { display: block !important; position: static; max-height: none; overflow: visible; padding: 0; }
  .card, .panel { border: 0; padding: 0; box-shadow: none; }
  .print-only { display: block; }
  .result-sticky { position: static !important; background: none; }
  .result-card { background: #fff; color: var(--text); box-shadow: none; border: 1.5pt solid var(--accent); }
  .hero-label, .hero-sub, .hero-full, .hero-full strong, .hero-value .cur, .ck-label, .ck-sub { color: var(--muted); }
  .hero-value { color: var(--accent); }
  .card-kpis { border-top-color: var(--line); }
  .compare-cards { display: none !important; }
  .table-wrap { display: block !important; }
  .bar-fill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .checklist summary h3::before { content: none; }
  .block, .table-wrap { break-inside: avoid; }
  .compare { min-width: 0; }
  .site-footer { background: none; border: 0; padding: 8px 0 0; }
  .impressum { display: none; }
  .print-summary table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .print-summary td { padding: 3px 4px; border-bottom: 1px solid var(--line); }
  .print-summary td:nth-child(even) { text-align: right; font-weight: 600; }
}
