/*
  NEXURA Startseite, Entwurf.
  Aus der CI übernommen: Farben (Brand Guide 04/2025) und Logos. Alles andere ist frei.
  Formsprache: Bedienelemente sind Pillen, Flächen haben 10 px Radius.
  Ebenen (z-index): Bühne 1, Bühnen-Overlays 2, Kopf 50, Menü 60, Sprunglink 70.
*/

:root {
  --blauschwarz: #121824;
  --anthrazit: #1f2532;
  --blaugrau: #646771;
  --hellgrau: #f4f4f5;
  --weiss: #ffffff;
  --signalgelb: #fcff71;
  --gruen: #00d392;
  --blau: #31a7ff;

  /* Skala nach Primärenergiebedarf, sieben Stufen von sehr gut bis sehr schlecht. */
  --sk-0: #0b8a4d;
  --sk-1: #3bb25e;
  --sk-2: #a3cf4f;
  --sk-3: #f0d43a;
  --sk-4: #f5a03a;
  --sk-5: #e5582f;
  --sk-6: #b0232c;

  --rand: clamp(16px, 4vw, 48px);
  --breite: 1440px;
  --kopf-h: 72px;
  --radius: 10px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  font-family: "Archivo", system-ui, sans-serif;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

:root[data-theme="light"] {
  --grund: var(--hellgrau);
  --flaeche: var(--weiss);
  --flaeche-2: #e9e9ec;
  --text: var(--blauschwarz);
  --text-2: var(--blaugrau);
  --linie: rgb(18 24 36 / 0.12);
  --linie-stark: rgb(18 24 36 / 0.28);
  --buehne: #e8e8eb;
  --tafel: var(--blauschwarz);
  --tafel-text: var(--hellgrau);
  --fokus: var(--blauschwarz);
  --schatten: 0 24px 60px -28px rgb(18 24 36 / 0.35);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --grund: var(--blauschwarz);
  --flaeche: var(--anthrazit);
  --flaeche-2: #283042;
  --text: var(--hellgrau);
  --text-2: #a3a6af;
  --linie: rgb(244 244 245 / 0.12);
  --linie-stark: rgb(244 244 245 / 0.3);
  --buehne: #171d2a;
  --tafel: #0c111b;
  --tafel-text: var(--hellgrau);
  --fokus: var(--signalgelb);
  --schatten: 0 24px 60px -28px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--kopf-h); }

@media (prefers-reduced-motion: reduce) {
  html:not([data-bewegung="an"]) { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  font-variation-settings: normal;
  overflow-x: hidden;
  transition: background-color 240ms ease, color 240ms ease;
}

img, svg, canvas { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 { margin: 0; text-wrap: balance; }

h2 {
  font-size: clamp(2rem, 3.3vw, 3.15rem);
  font-weight: 780;
  font-stretch: 118%;
  line-height: 1.03;
  letter-spacing: -0.025em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 700;
  font-stretch: 108%;
  line-height: 1.25;
}

p { margin: 0; text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprung {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 70;
  padding: 10px 16px;
  background: var(--signalgelb);
  color: var(--blauschwarz);
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  transition: top 160ms var(--ease-out);
}
.sprung:focus { top: 12px; }

/* ---------- Bedienelemente ---------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 48px;
  padding: 0 1.4em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  font-stretch: 106%;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.knopf:active { transform: scale(0.97); }

.knopf--primaer { background: var(--signalgelb); color: var(--blauschwarz); }
.knopf--sekundaer { border-color: var(--linie-stark); color: var(--text); background: transparent; }
.knopf--klein { min-height: 40px; padding: 0 1.1em; font-size: 0.9375rem; }
.knopf--gross { min-height: 60px; padding: 0 2em; font-size: 1.125rem; }
.knopf--voll { width: 100%; }

@media (hover: hover) and (pointer: fine) {
  .knopf--primaer:hover { background: #eef25c; }
  .knopf--sekundaer:hover { background: var(--flaeche-2); border-color: var(--text-2); }
}

.knopf-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1.5px solid var(--linie);
  background: transparent;
  color: var(--text);
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.knopf-icon:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) {
  .knopf-icon:hover { background: var(--flaeche-2); }
}

.segment {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--flaeche-2);
  border: 1px solid var(--linie);
}
.segment button {
  min-height: 34px;
  padding: 0 0.95em;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.segment button[aria-checked="true"] { background: var(--flaeche); color: var(--text); box-shadow: 0 1px 2px rgb(18 24 36 / 0.15); }

.werkzeug {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 40px;
  padding: 0 0.95em;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: var(--flaeche);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease;
}
.werkzeug i { font-size: 1.1rem; }
.werkzeug:active { transform: scale(0.97); }
.werkzeug[aria-pressed="true"] { background: var(--signalgelb); color: var(--blauschwarz); border-color: transparent; }

.demo-marke {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1.5px dashed currentColor;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1;
}
.demo-marke[hidden] { display: none; }

/* ---------- Kopf ---------- */

.kopf {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: color-mix(in srgb, var(--grund) 84%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background-color 240ms ease;
}
.kopf[data-gescrollt] { border-bottom-color: var(--linie); }

.kopf__innen {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--breite);
  height: var(--kopf-h);
  margin: 0 auto;
  padding: 0 var(--rand);
}

.kopf__marke {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}
.kopf__signet { width: 44px; height: 44px; border-radius: 6px; }

.wortmarke { width: 124px; height: auto; aspect-ratio: 813.7 / 156.8; }

.kopf__nav { display: flex; gap: 4px; margin-left: auto; }
.kopf__nav a,
.menue a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 560;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}
.kopf__nav a[aria-current="true"] { color: var(--text); background: var(--flaeche-2); }
@media (hover: hover) and (pointer: fine) {
  .kopf__nav a:hover { color: var(--text); }
}

.kopf__aktionen { display: flex; align-items: center; gap: 10px; }
.kopf__menue { display: none; }

.menue {
  display: grid;
  gap: 2px;
  padding: 8px var(--rand) 20px;
  border-top: 1px solid var(--linie);
}
.menue[hidden] { display: none; }
.menue a { font-size: 1.125rem; padding: 12px 8px; color: var(--text); }

@media (max-width: 1023px) {
  .kopf__nav { display: none; }
  .kopf__aktionen { margin-left: auto; }
  .kopf__menue { display: inline-grid; }
}
@media (max-width: 479px) {
  .kopf__aktionen .knopf--klein { display: none; }
}

/* ---------- Effizienzpfad (Hero + Kapitel + Bühne) ---------- */

.pfad {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: var(--breite);
  margin: 0 auto;
}

.pfad__text { padding: 0 clamp(16px, 3vw, 56px) 0 var(--rand); }

.pfad__anker { height: 0; }

.kapitel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 92vh;
  min-height: 92dvh;
  padding: 12vh 0;
}

.kapitel--hero {
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(var(--kopf-h) + 4vh) 0 8vh;
}

.hero__titel {
  font-size: clamp(2.1rem, 3.6vw, 3.5rem);
  font-weight: 830;
  font-stretch: 112%;
  line-height: 0.98;
  letter-spacing: -0.032em;
}
.hero__titel .zeile { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__titel .zeile > span { display: inline-block; }

.hero__text {
  max-width: 34ch;
  margin-top: 28px;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1.25vw, 1.25rem);
  line-height: 1.5;
}

.hero__aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.kapitel__marke {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-2);
  font-size: 0.9375rem;
  font-weight: 560;
}

.qp-chip {
  display: inline-grid;
  place-items: center;
  min-width: 2.6em;
  height: 1.75em;
  padding: 0 0.45em;
  border-radius: 6px;
  background: var(--k);
  color: var(--weiss);
  font-weight: 800;
  font-stretch: 112%;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.kapitel__titel { margin-top: 18px; max-width: 16ch; }

.kapitel__text { max-width: 40ch; margin-top: 18px; color: var(--text-2); font-size: 1.125rem; }

.kapitel__zahlen {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 32px 0 0;
}
.kapitel__zahlen dt { color: var(--text-2); font-size: 0.875rem; }
.kapitel__zahlen dd {
  margin: 2px 0 0;
  font-size: 1.5rem;
  font-weight: 720;
  font-stretch: 112%;
  font-variant-numeric: tabular-nums;
}

.kapitel--ergebnis .kapitel__titel { max-width: 14ch; }
.kapitel--ergebnis .kapitel__zahlen dd { font-size: 2rem; }
.kapitel--ergebnis .knopf { align-self: flex-start; margin-top: 36px; }

.pfad__buehne {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  padding: calc(var(--kopf-h) + 12px) var(--rand) 20px 0;
  z-index: 1;
}

.buehne {
  position: relative;
  height: 100%;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 80% at 50% 36%, color-mix(in srgb, var(--buehne) 60%, var(--flaeche)) 0%, var(--buehne) 62%);
  overflow: hidden;
  isolation: isolate;
}

.buehne__canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }

.buehne__laden {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--text-2);
  font-size: 0.9375rem;
  transition: opacity 300ms ease;
}
.buehne__laden[data-fertig] { opacity: 0; pointer-events: none; }
.buehne__laden[data-fehler] .laden-balken { display: none; }
.buehne__laden[data-fehler] > span:last-child { max-width: 38ch; padding: 0 24px; text-align: center; }

.laden-balken {
  position: relative;
  width: 160px;
  height: 3px;
  border-radius: 3px;
  background: var(--linie);
  overflow: hidden;
}
.laden-balken span {
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--text);
  border-radius: 3px;
  animation: laden 1.1s var(--ease-in-out) infinite;
}
@keyframes laden {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}

.kennzahlen {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 86px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0 20px;
}
.kennzahlen div { padding-top: 10px; border-top: 1px solid var(--linie-stark); }
.kennzahlen dt { color: var(--text-2); font-size: 0.8125rem; font-weight: 560; }
.kennzahlen dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 2px 0 0; }
.kennzahlen dd > span {
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  font-weight: 760;
  font-stretch: 114%;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.kennzahlen small { color: var(--text-2); font-size: 0.75rem; }
.kennzahlen .kennzahlen__spanne { flex-basis: 100%; }
.kennzahlen .kennzahlen__spanne:empty { display: none; }

.spur {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.spur::before,
.spur::after {
  content: "";
  position: absolute;
  left: calc(100% / (2 * var(--n, 6)));
  right: calc(100% / (2 * var(--n, 6)));
  top: 17px;
  height: 2px;
  border-radius: 2px;
  background: var(--linie-stark);
}
.spur::after {
  background: var(--text);
  transform-origin: left center;
  transform: scaleX(var(--fortschritt, 0));
  transition: transform 500ms var(--ease-out);
}
.spur button {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.spur__haus {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--buehne);
  border: 1.5px solid var(--linie-stark);
  transition: transform 200ms var(--ease-out), border-color 200ms ease, background-color 200ms ease;
}
.spur__haus svg { width: 15px; height: 18px; color: var(--k); filter: drop-shadow(0 0 0.5px rgb(18 24 36 / 0.6)); }
.spur button[aria-current="step"] { color: var(--text); }
.spur button[aria-current="step"] .spur__haus { transform: scale(1.12); border-color: var(--text); background: var(--flaeche); }
@media (hover: hover) and (pointer: fine) {
  .spur button:hover { color: var(--text); }
}

@media (max-width: 1023px) {
  .pfad { grid-template-columns: minmax(0, 1fr); }
  .pfad__buehne {
    order: -1;
    top: var(--kopf-h);
    height: 54vh;
    height: 54dvh;
    margin-top: var(--kopf-h);
    padding: 8px var(--rand) 10px;
    background: var(--grund);
  }
  .pfad__text { padding: 0 var(--rand); }
  .kapitel { min-height: 68dvh; padding: 8vh 0; }
  .kapitel--hero { min-height: auto; padding: 28px 0 9vh; }
  .hero__titel { font-size: clamp(2.2rem, 8.4vw, 3.4rem); }
  .hero__text { margin-top: 16px; }
  .hero__aktionen { margin-top: 22px; }
  .kennzahlen { bottom: 68px; padding: 0 14px; gap: 8px; }
  .kennzahlen dd > span { font-size: clamp(1.15rem, 5vw, 1.6rem); }
  .kennzahlen small { display: none; }
  .spur { left: 10px; right: 10px; bottom: 10px; }
  .spur__haus { width: 30px; height: 30px; }
  .spur::before, .spur::after { top: 14px; }
  .spur__jahr { display: none; }
  .kennzahlen dt { font-size: 0.6875rem; line-height: 1.25; }
}

/* ---------- Vollbild-Einstieg (js/einstieg.js) ---------- */

/* Die Scrollleiste behält ihren Platz, damit die Seite beim Sperren im Einstieg nicht springt. */
html { scrollbar-gutter: stable; }
/* Ganz oben nach unten ziehen holt den Startscreen zurück; das Neuladen des Browsers soll dabei nicht greifen. */
html { overscroll-behavior-y: none; }
html[data-einstieg] { overflow: hidden; }
html[data-einstieg] .buehne { position: fixed; inset: 0; z-index: 40; border-radius: 0; }
@media (min-width: 1024px) {
  /* Der Einstiegstext bleibt an seinem Platz und liegt über dem Vollbild. */
  html[data-einstieg] .kapitel--hero { position: relative; z-index: 41; }
}

.buehne > :is(.buehne__label, .buehne__bauteile-knopf, .kennzahlen, .spur) { transition: opacity 500ms ease 500ms, visibility 0s linear 0s; }
html[data-einstieg] .buehne > :is(.buehne__label, .buehne__bauteile-knopf, .bauteile, .kennzahlen, .spur) {
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
}

.buehne__schleier {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--grund) 0%, var(--grund) 40%, color-mix(in srgb, var(--grund) 78%, transparent) 50%, transparent 68%),
    linear-gradient(0deg, color-mix(in srgb, var(--grund) 60%, transparent) 0%, transparent 24%);
  transition: opacity 700ms ease;
}
html[data-einstieg="vollbild"] .buehne__schleier { opacity: 1; }
/* Im Übergang blendet der Schleier im selben Maß aus wie die Umgebung. */
html[data-einstieg="wechsel"] .buehne__schleier { opacity: var(--einstieg-anteil, 0); transition: none; }

/* ---------- Ladeintro: Anflug aus 100 km Höhe (js/anflug.js) ---------- */

html[data-anflug] { overflow: hidden; }
.anflug { position: fixed; inset: 0; z-index: 70; overflow: hidden; background: var(--blauschwarz); color: var(--weiss); }
.anflug__karte { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease; }
.anflug[data-bereit] .anflug__karte { opacity: 1; }
.anflug__schleier {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(130% 95% at 50% 50%, transparent 52%, rgb(8 12 20 / 0.55) 100%),
    linear-gradient(0deg, rgb(8 12 20 / 0.55) 0%, transparent 32%);
}
.anflug__logo {
  position: absolute;
  top: clamp(16px, 3.6vh, 44px);
  left: max(var(--rand), calc((100% - var(--breite)) / 2 + var(--rand)));
  width: clamp(88px, 14vh, 168px);
  height: auto;
  border-radius: 12px;
  box-shadow: 0 24px 60px -24px rgb(0 0 0 / 0.6);
}
.anflug__hud {
  position: absolute;
  left: max(var(--rand), calc((100% - var(--breite)) / 2 + var(--rand)));
  bottom: max(clamp(24px, 6vh, 64px), env(safe-area-inset-bottom));
  display: grid;
  gap: 4px;
  text-shadow: 0 2px 18px rgb(0 0 0 / 0.55);
}
.anflug__hoehe-titel { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.anflug__hoehe { font-size: clamp(2.8rem, 7vw, 5.5rem); font-weight: 830; font-stretch: 112%; letter-spacing: -0.03em; line-height: 0.95; font-variant-numeric: tabular-nums; }
.anflug__ort { font-size: clamp(0.9375rem, 1.4vw, 1.125rem); font-weight: 600; opacity: 0.92; }
.anflug__weiter {
  position: absolute;
  right: max(var(--rand), calc((100% - var(--breite)) / 2 + var(--rand)));
  bottom: max(clamp(24px, 6vh, 64px), env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid rgb(255 255 255 / 0.35); border-radius: 999px;
  background: rgb(18 24 36 / 0.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--weiss); font: inherit; font-size: 0.875rem; font-weight: 650; cursor: pointer;
}
@media (hover: hover) and (pointer: fine) { .anflug__weiter:hover { background: rgb(18 24 36 / 0.7); } }
.anflug__quelle { position: absolute; top: 14px; right: var(--rand); margin: 0; font-size: 0.6875rem; color: rgb(255 255 255 / 0.75); text-shadow: 0 1px 6px rgb(0 0 0 / 0.6); }
.anflug[data-ende] { pointer-events: none; }
@media (max-width: 599px) {
  /* Auf dem Telefon „Überspringen“ oben rechts, die Quelle unten: unten steht die Höhe mit Adresse. */
  .anflug__weiter { top: clamp(16px, 3.6vh, 44px); bottom: auto; min-height: 40px; padding: 0 14px; }
  .anflug__quelle { top: auto; bottom: 8px; left: var(--rand); right: var(--rand); text-align: right; }
  .anflug__hud { bottom: 34px; right: var(--rand); }
}

/* Im Startscreen gibt es weder Kopf noch Menü; sie kommen mit dem Übergang von oben herein. */
.kopf { transition: border-color 200ms ease, background-color 240ms ease, transform 600ms var(--ease-out), opacity 400ms ease, visibility 0s linear 0s; }
html[data-einstieg] .kopf { transform: translateY(-100%); opacity: 0; visibility: hidden; pointer-events: none; transition: transform 300ms ease, opacity 200ms ease, visibility 0s linear 300ms; }

/* Großes Logo oben links, bündig mit dem Einstiegstext. */
.einstieg__logo {
  position: absolute;
  top: clamp(16px, 3.6vh, 44px);
  left: max(var(--rand), calc((100% - var(--breite)) / 2 + var(--rand)));
  z-index: 4;
  width: clamp(88px, 14vh, 168px);
  height: auto;
  border-radius: 12px;
  box-shadow: var(--schatten);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top left;
  transition: opacity 300ms ease, transform 300ms ease, visibility 0s linear 300ms;
}
html[data-einstieg="vollbild"] .einstieg__logo { opacity: 1; visibility: visible; transform: none; transition: opacity 700ms ease 150ms, transform 900ms var(--ease-out) 150ms; }
html[data-einstieg="wechsel"] .einstieg__logo { opacity: var(--einstieg-anteil, 0); visibility: visible; transform: none; transition: none; }

/* Knopf zurück zum Startscreen: überall außer im Startscreen selbst. */
.zum-start {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 14px;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: color-mix(in srgb, var(--flaeche) 90%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--schatten);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
  transition: opacity 300ms ease, transform 400ms var(--ease-out), visibility 0s linear 0s;
}
.zum-start i { font-size: 1.1rem; }
html[data-einstieg] .zum-start { opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms; }
@media (hover: hover) and (pointer: fine) { .zum-start:hover { background: var(--flaeche); } }
@media (max-width: 599px) {
  /* Auf dem Telefon nur das Symbol. */
  .zum-start { width: 48px; height: 48px; padding: 0; justify-content: center; }
  .zum-start span { display: none; }
}
/* Auf breiten Bildschirmen sitzt „Start“ im Kopf; der schwebende Knopf läge über der Schrittleiste. */
.kopf__start { min-height: 38px; font-size: 0.875rem; }
@media (min-width: 1024px) { .zum-start { display: none; } }
@media (max-width: 1023px) { .kopf__start { display: none; } }

.einstieg {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 0 var(--rand) 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 300ms ease, visibility 0s linear 300ms;
}
html[data-einstieg="vollbild"] .einstieg { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 600ms ease 250ms; }
.einstieg p { margin: 0; }
.einstieg__projekt, .einstieg__titel, .einstieg__ort { display: none; }
.einstieg__weiter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: color-mix(in srgb, var(--flaeche) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--schatten);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
}
.einstieg__maus { position: relative; flex: none; width: 18px; height: 28px; border: 2px solid currentColor; border-radius: 10px; }
.einstieg__maus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 5px;
  width: 4px;
  height: 6px;
  margin-left: -2px;
  border-radius: 2px;
  background: currentColor;
  animation: einstieg-rad 1.6s var(--ease-in-out) infinite;
}
@keyframes einstieg-rad {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(8px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}
.einstieg__pfeil { display: none; font-size: 1.2rem; }
@media (hover: none) {
  .einstieg__maus { display: none; }
  .einstieg__pfeil { display: block; }
}
.einstieg__quelle {
  position: absolute;
  right: var(--rand);
  bottom: 30px;
  max-width: 34ch;
  color: var(--text-2);
  font-size: 0.6875rem;
  line-height: 1.4;
  text-align: right;
}
.einstieg__quelle[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-bewegung="an"]) .einstieg__maus::after { animation: none; }
}

@media (max-width: 1023px) {
  /* Auf schmalen Bildschirmen liegt der Einstiegstext unter der Bühne: im Vollbild steht der
     Projektname deshalb unten auf dem Bild. */
  .buehne__schleier { background: linear-gradient(0deg, var(--grund) 0%, color-mix(in srgb, var(--grund) 82%, transparent) 34%, transparent 62%); }
  .einstieg { justify-items: start; gap: 6px; padding-bottom: 18px; }
  .einstieg__projekt, .einstieg__titel, .einstieg__ort { display: block; }
  .einstieg__projekt { color: var(--text-2); font-size: 0.875rem; font-weight: 600; }
  .einstieg__titel { max-width: 18ch; font-size: clamp(1.9rem, 7.6vw, 3rem); font-weight: 830; font-stretch: 112%; line-height: 1; letter-spacing: -0.03em; }
  .einstieg__ort { color: var(--text-2); font-size: 0.9375rem; }
  .einstieg__weiter { justify-self: center; margin-top: 14px; }
  .einstieg__quelle { position: static; justify-self: center; max-width: none; text-align: center; }
}

/* ---------- Abschnitte allgemein ---------- */

.abschnitt { max-width: var(--breite); margin: 0 auto; padding: clamp(96px, 14vw, 180px) var(--rand) 0; }

.abschnitt__kopf { max-width: 760px; }
.abschnitt__kopf p { max-width: 58ch; margin-top: 20px; color: var(--text-2); font-size: 1.125rem; }

/* ---------- Gebäudemodell ---------- */

.bim__arbeitsflaeche {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 300px;
  gap: 12px;
  height: min(80vh, 780px);
  min-height: 560px;
  margin-top: 48px;
}

.bim__seite {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  overflow: auto;
}
.bim__seite h3 { color: var(--text-2); font-size: 0.8125rem; font-weight: 640; font-stretch: 100%; }

.bim__modellkopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bim__modellname { font-weight: 700; font-stretch: 108%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bim__klassen { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.bim__klassen label {
  display: grid;
  grid-template-columns: 18px 12px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.9375rem;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .bim__klassen label:hover { background: var(--flaeche-2); }
}
.bim__klassen input { width: 16px; height: 16px; margin: 0; accent-color: var(--blauschwarz); }
:root[data-theme="dark"] .bim__klassen input { accent-color: var(--signalgelb); }
.bim__klassen .farbe { width: 12px; height: 12px; border-radius: 3px; background: var(--f); }
.bim__klassen .anzahl { color: var(--text-2); font-size: 0.8125rem; font-variant-numeric: tabular-nums; }

.bim__geschosse { display: flex; flex-wrap: wrap; gap: 6px; }
.bim__geschosse button {
  min-height: 32px;
  padding: 0 0.8em;
  border-radius: 999px;
  border: 1px solid var(--linie);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.bim__geschosse button[aria-pressed="true"] { background: var(--text); color: var(--grund); border-color: transparent; }

.bim__ansicht {
  position: relative;
  min-height: 0;
  border-radius: var(--radius);
  background: radial-gradient(120% 90% at 50% 30%, var(--flaeche) 0%, var(--buehne) 70%);
  border: 1px solid var(--linie);
  overflow: hidden;
}
.bim__canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }

.bim__werkzeuge {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bim__schnitt {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  font-size: 0.8125rem;
  font-weight: 600;
}
.bim__schnitt input { width: clamp(100px, 14vw, 200px); accent-color: var(--blauschwarz); }
:root[data-theme="dark"] .bim__schnitt input { accent-color: var(--signalgelb); }
.bim__schnitt output { min-width: 4.5ch; color: var(--text-2); font-variant-numeric: tabular-nums; }

.bim__legende {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  gap: 6px;
  width: 200px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  font-size: 0.75rem;
  color: var(--text-2);
}
.bim__legende[hidden] { display: none; }
.bim__legende-balken { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--sk-0), var(--sk-2) 30%, var(--sk-3) 50%, var(--sk-5) 75%, var(--sk-6)); }
.bim__legende-skala { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }

.bim__zustand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: min(420px, 86%);
  color: var(--text-2);
  font-size: 0.9375rem;
  text-align: center;
  pointer-events: none;
}
.bim__zustand:empty { display: none; }
.bim__zustand[data-art="fehler"],
.bim__zustand[data-art="hinweis"] { padding: 14px 18px; border-radius: var(--radius); background: var(--flaeche); color: var(--text); border: 1px solid var(--linie-stark); }

.bim__leer { color: var(--text-2); font-size: 0.9375rem; }

.bim__auswahl-kopf { display: grid; gap: 4px; }
.bim__auswahl-kopf strong { font-size: 1.125rem; font-stretch: 108%; line-height: 1.25; }
.bim__auswahl-kopf span { color: var(--text-2); font-size: 0.8125rem; }

.bim__pset { display: grid; gap: 6px; }
.bim__pset h4 { margin: 0; font-size: 0.8125rem; font-weight: 650; color: var(--text-2); }
.bim__pset dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; margin: 0; font-size: 0.875rem; }
.bim__pset dt { color: var(--text-2); overflow-wrap: anywhere; }
.bim__pset dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .bim__arbeitsflaeche { grid-template-columns: 220px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; height: auto; }
  .bim__ansicht { min-height: 520px; }
  .bim__eigenschaften { grid-column: 1 / -1; max-height: 340px; }
}
@media (max-width: 767px) {
  .bim__arbeitsflaeche { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .bim__ansicht { order: -1; min-height: 62vh; }
  .bim__werkzeuge .werkzeug span { display: none; }
  .bim__werkzeuge .werkzeug { width: 40px; padding: 0; justify-content: center; }
  .bim__legende { width: 160px; bottom: 64px; }
  .bim__eigenschaften { max-height: none; }
}

/* ---------- Luftbild ---------- */

.luftbild {
  position: relative;
  height: clamp(640px, 92vh, 980px);
  margin-top: clamp(96px, 14vw, 180px);
  overflow: hidden;
  background: var(--buehne);
}
.luftbild__karte { position: absolute; inset: 0; }

.luftbild__tafel {
  position: absolute;
  top: 50%;
  left: max(var(--rand), calc((100% - var(--breite)) / 2 + var(--rand)));
  transform: translateY(-50%);
  display: grid;
  gap: 18px;
  width: min(460px, calc(100% - 2 * var(--rand)));
  padding: 28px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--flaeche) 94%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--linie);
  box-shadow: var(--schatten);
}
.luftbild__tafel > p { color: var(--text-2); }

.werte { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; }
.werte[hidden] { display: none; }
.werte div { padding-top: 10px; border-top: 1px solid var(--linie); }
.werte dt { color: var(--text-2); font-size: 0.8125rem; }
.werte dd { margin: 2px 0 0; font-size: 1.25rem; font-weight: 720; font-stretch: 110%; font-variant-numeric: tabular-nums; }

.luftbild__quelle { color: var(--text-2); font-size: 0.75rem; }
.luftbild__schalter { display: flex; flex-wrap: wrap; gap: 8px; }

.maplibregl-ctrl-attrib { font-family: inherit; font-size: 11px; }
.maplibregl-ctrl-group { border-radius: 999px !important; overflow: hidden; }

@media (max-width: 767px) {
  .luftbild { height: auto; overflow: visible; background: none; }
  .luftbild__karte { position: relative; height: 58vh; }
  .luftbild__tafel {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: auto;
    margin: -48px var(--rand) 0;
    padding: 22px;
  }
  .werte dd { font-size: 1.0625rem; }
}

/* ---------- Schluss und Fuß ---------- */

.schluss {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: calc(var(--breite) - 2 * var(--rand));
  margin: clamp(96px, 14vw, 180px) auto 0;
  padding: clamp(36px, 6vw, 88px);
  border-radius: var(--radius);
  background: var(--tafel);
  color: var(--tafel-text);
  overflow: hidden;
}
@media (max-width: 1488px) {
  .schluss { margin-left: var(--rand); margin-right: var(--rand); }
}
.schluss__logo { width: min(100%, 300px); height: auto; aspect-ratio: 1; border-radius: var(--radius); justify-self: center; }
.schluss__inhalt { display: grid; gap: 22px; justify-items: start; }
.schluss h2 { font-size: clamp(2.2rem, 4.4vw, 4.2rem); font-stretch: 122%; max-width: 13ch; }
.schluss p { max-width: 44ch; color: color-mix(in srgb, var(--tafel-text) 72%, transparent); font-size: 1.125rem; }

@media (max-width: 767px) {
  .schluss { grid-template-columns: minmax(0, 1fr); }
  .schluss__logo { width: 140px; justify-self: start; }
}

.fuss { margin-top: 64px; border-top: 1px solid var(--linie); }
.fuss__innen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 32px;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 32px var(--rand) 48px;
}
.fuss__signet { width: 36px; height: 36px; border-radius: 5px; }
.fuss__marke { width: 104px; color: var(--text); margin-left: -20px; }
.fuss__grundlage { flex-basis: 100%; color: var(--text-2); font-size: 0.8125rem; }
.fuss nav { display: flex; gap: 20px; }
.fuss nav a { color: var(--text-2); text-decoration: none; font-size: 0.9375rem; }
@media (hover: hover) and (pointer: fine) {
  .fuss nav a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 4px; }
}
.fuss__hinweis { flex-basis: 100%; color: var(--text-2); font-size: 0.8125rem; }

/* ---------- Projektzeile im Einstieg ---------- */

.hero__projekt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--text-2);
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- Primärenergiebedarf auf der Bühne ---------- */

.qp {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 2;
  display: grid;
  justify-items: end;
  gap: 6px;
  pointer-events: none;
}
.qp__titel { color: var(--text-2); font-size: 0.8125rem; font-weight: 600; }
.qp__titel sub { font-size: 0.7em; }
.qp__wert { display: flex; align-items: baseline; gap: 8px; }
.qp__wert > span {
  font-size: clamp(3.4rem, 9vh, 6rem);
  font-weight: 880;
  font-stretch: 122%;
  letter-spacing: -0.035em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
  color: var(--qp-farbe, var(--sk-6));
  transition: color 500ms ease;
}
.qp__wert small { color: var(--text-2); font-size: 0.8125rem; font-weight: 600; }
.qp__skala { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; width: 168px; }
.qp__skala span {
  height: 8px;
  border-radius: 2px;
  background: var(--f);
  opacity: 0.32;
  transform-origin: center bottom;
  transition: opacity 300ms ease, transform 300ms var(--ease-out);
}
.qp__skala span[data-aktiv] { opacity: 1; transform: scaleY(1.75); }
.qp__eh {
  margin-top: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--signalgelb);
  color: var(--blauschwarz);
  font-size: 0.8125rem;
  font-weight: 700;
}
.qp__eh[hidden] { display: none; }

@media (max-width: 1023px) {
  .qp { top: 10px; right: 12px; gap: 3px; }
  .qp__titel { font-size: 0.6875rem; }
  .qp__wert > span { font-size: clamp(1.75rem, 4.5vh, 2.6rem); }
  .qp__wert small { font-size: 0.6875rem; }
  .qp__skala { width: 96px; }
  .qp__skala span { height: 6px; }
  .qp__eh { padding: 3px 8px; font-size: 0.6875rem; }
}

/* ---------- Energieeffizienzlabel (Energieausweis, Klassen A+ bis H) ---------- */

.klassenpfeil {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 13px 0 7px;
  background: var(--f);
  color: var(--weiss);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%);
  font-size: 0.8125rem;
  font-weight: 850;
  font-stretch: 112%;
  line-height: 1;
  vertical-align: middle;
}
.klassenpfeil[data-dunkel] { color: var(--blauschwarz); }
.klassenpfeil--gross { height: 30px; padding: 0 16px 0 9px; font-size: 1.05rem; }

.buehne__label { position: absolute; top: 16px; right: 16px; z-index: 2; display: grid; justify-items: end; gap: 8px; }
.label {
  width: 236px;
  margin: 0;
  padding: 12px 14px 10px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--flaeche) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--linie);
  box-shadow: var(--schatten);
}
.label__titel { display: grid; font-size: 0.8125rem; font-weight: 750; font-stretch: 106%; line-height: 1.25; }
.label__titel small { color: var(--text-2); font-size: 0.6875rem; font-weight: 500; font-stretch: 100%; }
.label__koerper { position: relative; margin-top: 10px; padding-right: 62px; }
.label__klassen { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.label__klasse {
  display: flex;
  align-items: center;
  width: calc(36% + var(--i) * 8%);
  height: 19px;
  padding-left: 7px;
  background: var(--f);
  color: var(--weiss);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%);
  font-size: 0.8125rem;
  font-weight: 850;
  font-stretch: 112%;
  line-height: 1;
  cursor: default;
  outline: none;
  transition: filter 160ms ease;
}
.label__klasse[data-dunkel] { color: var(--blauschwarz); }
.label__klasse:hover, .label__klasse:focus-visible { filter: brightness(1.08) saturate(1.1); }
.label__zeiger,
.label__geist {
  position: absolute;
  top: -5.5px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 30px;
  padding-left: 10px;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
  transform: translateY(calc(var(--zeile, 0) * 22px));
  transition: transform 450ms var(--ease-out);
}
.label__zeiger { background: var(--blauschwarz); color: var(--weiss); font-size: 1.15rem; font-weight: 900; font-stretch: 116%; z-index: 1; }
.label__geist { right: 4px; background: var(--linie-stark); color: var(--text); font-size: 0.6875rem; font-weight: 700; }
.label__geist[hidden] { display: none; }
:root[data-theme="dark"] .label__zeiger { background: var(--hellgrau); color: var(--blauschwarz); }
.label__wert { margin-top: 10px; color: var(--text-2); font-size: 0.75rem; }
.label__wert b { color: var(--text); font-size: 1.25rem; font-weight: 800; font-stretch: 112%; font-variant-numeric: tabular-nums; }
.label__qp { margin-top: 2px; color: var(--text-2); font-size: 0.75rem; }
.label__qp b { color: var(--text); font-variant-numeric: tabular-nums; }
.label__zusatz { display: inline-block; margin-top: 6px; padding: 3px 9px; border-radius: 999px; background: var(--signalgelb); color: var(--blauschwarz); font-size: 0.75rem; font-weight: 700; }
.label__zusatz[hidden] { display: none; }
.label__info { min-height: 1.3em; margin-top: 4px; color: var(--text-2); font-size: 0.6875rem; }

@media (max-width: 1279px) {
  /* Auf schmalen Bühnen (Telefon, Tablet hoch und quer) als Band: Klassen nebeneinander, Zeiger darüber. */
  .buehne__label { top: 10px; right: 10px; }
  .label { width: min(228px, calc(100vw - 150px)); padding: 8px 10px; }
  .label__titel small, .label__qp, .label__info { display: none; }
  .label__koerper { margin-top: 30px; padding-right: 0; }
  .label__klassen { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 2px; }
  .label__klasse { width: auto; height: 16px; padding: 0; justify-content: center; clip-path: none; border-radius: 2px; font-size: 0.5625rem; }
  .label__zeiger, .label__geist {
    top: -28px;
    left: 0;
    right: auto;
    width: calc((100% - 16px) / 9);
    height: 24px;
    padding: 0 0 5px;
    clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%);
    transform: translateX(calc(var(--zeile, 0) * 100% * 1));
    font-size: 0.8125rem;
  }
  .label__geist { font-size: 0.5rem; }
  .label__wert { margin-top: 6px; }
  .label__wert b { font-size: 1rem; }
}

.band { position: relative; padding: 56px 0 50px; }
.band__zeiger { position: absolute; inset: 0; pointer-events: none; }
.band__marke {
  position: absolute;
  left: var(--x, 0%);
  width: 0;
  transition: left 600ms var(--ease-out);
  white-space: nowrap;
}
.band__marke::after { content: ""; position: absolute; left: -8px; width: 0; height: 0; border: 8px solid transparent; }
.band__marke-box { position: absolute; display: grid; justify-items: center; gap: 2px; transform: translateX(-50%); }
.band__marke[data-rand="links"] .band__marke-box { justify-items: start; transform: translateX(-12px); }
.band__marke[data-rand="rechts"] .band__marke-box { justify-items: end; transform: translateX(calc(-100% + 12px)); }
.band__marke--voll { top: 0; height: 56px; }
.band__marke--voll::after { bottom: 0; border-top: 10px solid var(--text); border-bottom: 0; }
.band__marke--voll .band__marke-box { bottom: 12px; }
.band__marke--umriss { bottom: 0; height: 50px; }
.band__marke--umriss::after { top: 0; border-bottom: 10px solid var(--text-2); border-top: 0; }
.band__marke--umriss .band__marke-box { top: 12px; }
.band__marke-text { color: var(--text-2); font-size: 0.75rem; font-weight: 600; }
.band__marke-wert { font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.band__marke-wert b { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 3px; background: var(--f); color: var(--weiss); font-weight: 850; }
.band__marke--umriss .band__marke-wert { color: var(--text-2); font-weight: 600; }
.band__balken { height: 22px; border-radius: 4px; }
.band__skala, .band__klassen { position: relative; height: 16px; margin-top: 4px; }
.band__skala span, .band__klassen span { position: absolute; transform: translateX(-50%); }
.band__skala { color: var(--text-2); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.band__skala span:first-child { transform: none; }
.band__skala span:last-child { transform: translateX(-100%); }
.band__klassen { font-size: 0.75rem; font-weight: 850; }
@media (max-width: 599px) {
  .band__skala span[data-neben] { display: none; }
}

.massnahmen__label { max-width: 760px; margin: 40px 0 0; padding: 18px 22px 8px; border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--linie); }
.massnahmen__label figcaption { color: var(--text-2); font-size: 0.8125rem; font-weight: 600; }
.kapitel__band { max-width: 520px; margin: 26px 0 0; }
.summe__klasse dd { display: flex; align-items: center; }

/* ---------- Nicht erhobene Werte ---------- */

.ne { color: var(--text-2); font-size: 0.9em; font-weight: 600; font-stretch: 100%; font-style: normal; white-space: nowrap; }
.kapitel__zahlen .ne { font-size: 1.0625rem; }
.label[data-offen] .label__zeiger { display: none; }
.label[data-offen] .label__klasse { opacity: 0.45; }
.label[data-offen] .label__wert b { color: var(--text-2); font-size: 0.9375rem; font-weight: 650; font-stretch: 100%; }
.band__offen { position: absolute; top: 20px; left: 0; right: 0; margin: 0; color: var(--text-2); font-size: 0.8125rem; font-weight: 600; text-align: center; }
.band__offen[hidden] { display: none; }
.band:has(.band__offen:not([hidden])) .band__balken { opacity: 0.45; }
.kennzahlen dd[data-offen] > span { color: var(--text-2); font-size: 0.9375rem; font-weight: 650; font-stretch: 100%; }
.kennzahlen dd[data-offen] small { display: none; }
.bauteil[data-offen] .bauteil__icon,
.komponente[data-offen] .komponente__icon { background: var(--flaeche-2); color: var(--text-2); }
.komponente__befund { margin-top: 4px; color: var(--text); font-size: 0.8125rem; font-weight: 500; font-stretch: 100%; }
.komponente__skala .komponente__offen { grid-column: 1 / -1; height: auto; margin-top: 2px; background: none; color: var(--text-2); font-size: 0.8125rem; font-weight: 600; }

/* ---------- Kapitel des Effizienzpfads ---------- */

.kapitel__massnahmen { display: grid; gap: 6px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 1.0625rem; font-weight: 560; }
.kapitel__massnahmen li { display: flex; gap: 10px; max-width: 44ch; }
.kapitel__massnahmen li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 0.55em; border-radius: 2px; background: var(--text); }
.kapitel__preis { margin-left: auto; padding-left: 16px; color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Maßnahme im Modell zeigen: Die Kamera fährt auf den Bereich, der Punkt wird gelb wie die
   Bauteile in der Bühne. */
.kapitel__massnahmen li::before { transition: background-color 300ms ease, transform 300ms var(--ease-out), box-shadow 300ms ease; }
.kapitel__massnahmen li[data-im-blick]::before { background: var(--signalgelb); box-shadow: 0 0 0 1.5px var(--text); transform: scale(1.3); }
.kapitel__zeigen {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.kapitel__zeigen span { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; transition: text-decoration-color 160ms ease; }
.kapitel__zeigen i { flex: none; color: var(--text-2); font-size: 0.95rem; transform: translateY(2px); transition: color 160ms ease; }
.kapitel__massnahmen li[data-im-blick] .kapitel__zeigen i { color: var(--text); }
@media (hover: hover) and (pointer: fine) {
  .kapitel__zeigen:hover span { text-decoration-color: var(--linie-stark); }
  .kapitel__zeigen:hover i { color: var(--text); }
}

/* ---------- Kennwerte im Einstieg ---------- */

.hero__fakten {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  max-width: 34rem;
  margin: 30px 0 0;
}
.hero__fakten div { padding-top: 10px; border-top: 1px solid var(--linie-stark); }
.hero__fakten dt { color: var(--text-2); font-size: 0.875rem; }
.hero__fakten dd { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 1.125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero__fakten dd small { color: var(--text-2); font-weight: 500; }

/* ---------- Bauteile in der Bühne ---------- */

.buehne__bauteile-knopf { position: absolute; top: 16px; left: 16px; z-index: 3; }
.bauteile {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 150px;
  z-index: 3;
  padding: 12px 14px;
  overflow: auto;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--flaeche) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--linie);
  box-shadow: var(--schatten);
}
.bauteile[hidden] { display: none; }
.bauteile__titel { margin: 0 0 8px; color: var(--text-2); font-size: 0.8125rem; font-weight: 600; }
.bauteile__liste { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 16px; margin: 0; padding: 0; list-style: none; }
.bauteil {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.bauteil__icon { grid-row: span 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--f); color: var(--weiss); font-size: 0.95rem; transition: background-color 400ms ease; }
.bauteil__name { grid-row: 1; grid-column: 2 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; }
.bauteil__skala { grid-row: 2; grid-column: 2; }
.bauteil__delta { grid-row: 2; grid-column: 3; }
.bauteil[data-hell] .bauteil__icon { color: var(--blauschwarz); }
.bauteil__skala { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.bauteil__skala span { height: 6px; border-radius: 2px; background: var(--linie); transition: background-color 400ms ease; }
.bauteil__skala span[data-an] { background: var(--f); }
.bauteil__delta { color: var(--text-2); font-size: 0.8125rem; font-variant-numeric: tabular-nums; text-align: right; }
.bauteil[data-verbessert] .bauteil__delta { color: var(--sk-0); font-weight: 800; }
:root[data-theme="dark"] .bauteil[data-verbessert] .bauteil__delta { color: var(--sk-1); }
.bauteil[data-verbessert] .bauteil__name { color: var(--text); }

@media (max-width: 1023px) {
  .buehne__bauteile-knopf { top: 10px; left: 10px; width: 36px; min-height: 36px; padding: 0; justify-content: center; }
  .buehne__bauteile-knopf span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bauteile { left: 10px; right: 10px; bottom: 130px; padding: 8px 10px; }
  .bauteile__titel { margin-bottom: 6px; font-size: 0.6875rem; }
  .bauteile__liste { gap: 8px 10px; }
  .bauteil { grid-template-columns: 22px minmax(0, 1fr); }
  .bauteil__icon { width: 22px; height: 22px; font-size: 0.8rem; }
  .bauteil__name { display: none; }
  .bauteil__delta { grid-row: 1; grid-column: 2; text-align: left; font-size: 0.75rem; }
  .bauteil__skala { grid-row: 2; grid-column: 2; }
}

/* ---------- Einzelmaßnahmen ---------- */

.massnahmen__liste { display: grid; gap: 36px; margin-top: 44px; }
.mgruppe__titel { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; font-size: 1.125rem; }
.mgruppe__titel small { color: var(--text-2); font-size: 0.875rem; font-weight: 500; font-stretch: 100%; }
.mgruppe__kopf,
.massnahme {
  display: grid;
  grid-template-columns: 52px minmax(0, 2.6fr) repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 16px;
}
.mgruppe__kopf { padding: 0 18px 8px; color: var(--text-2); font-size: 0.75rem; font-weight: 640; }
.mgruppe__kopf span:nth-child(n+3) { text-align: right; }
.massnahme {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  cursor: pointer;
  transition: opacity 200ms ease, border-color 200ms ease;
}
.massnahme + .massnahme { margin-top: 8px; }
.massnahme[data-aus] { opacity: 0.62; }
.massnahme:has(input:focus-visible) { outline: 3px solid var(--fokus); outline-offset: 2px; }
.massnahme__text { display: grid; gap: 3px; }
.massnahme__text strong { font-size: 1rem; font-stretch: 106%; line-height: 1.3; }
.massnahme__text small { color: var(--text-2); font-size: 0.8125rem; line-height: 1.4; }
.massnahme__wert { display: grid; justify-items: end; gap: 1px; font-variant-numeric: tabular-nums; text-align: right; }
.massnahme__wert b { font-size: 1rem; font-weight: 720; white-space: nowrap; }
.massnahme__wert small { color: var(--text-2); font-size: 0.75rem; white-space: nowrap; }
.wirkbalken { display: block; width: var(--w); min-width: 2px; height: 4px; margin-top: 4px; border-radius: 2px; background: var(--sk-0); }
.massnahmen__hinweis { max-width: 80ch; margin-top: 18px; color: var(--text-2); font-size: 0.8125rem; }

/* ---------- Energieberatung ---------- */

.beratung__tabelle th[scope="row"] small { display: block; margin-top: 2px; color: var(--text-2); font-size: 0.75rem; font-weight: 500; }
/* Doppelte Klasse: die Regeln der Kostentabelle stehen weiter unten und hätten sonst Vorrang. */
.kosten__tabelle.beratung__tabelle--text table { min-width: 880px; table-layout: fixed; }
.kosten__tabelle.beratung__tabelle--text td { white-space: normal; text-align: left; vertical-align: top; font-weight: 550; }
.kosten__tabelle.beratung__tabelle--text th { text-align: left; vertical-align: top; }
.kosten__tabelle.beratung__tabelle--text th, .kosten__tabelle.beratung__tabelle--text td { width: 25%; }
.beratung__hinweis[hidden], .beratung__grundlage[hidden], .beratung__empfehlung[hidden], .beratung__block[hidden] { display: none; }
.beratung__hinweis { max-width: 80ch; margin-top: 18px; padding: 14px 18px; border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--linie-stark); font-size: 0.9375rem; }
.beratung__grundlage { max-width: 80ch; margin-top: 14px; color: var(--text-2); font-size: 0.8125rem; line-height: 1.5; }
.beratung__titel { margin-top: 56px; font-size: 1.375rem; }
.beratung__titel + .kosten__tabelle { margin-top: 20px; }
.beratung__raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); margin-top: 40px; }
.beratung__block { padding: 24px; border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--linie); }
.beratung__block h3 { font-size: 1.125rem; }
.beratung__block h4 { margin-top: 22px; font-size: 0.9375rem; }
.beratung__boni { display: grid; gap: 16px; margin: 14px 0 0; padding: 0; list-style: none; }
.beratung__bonus p + p { margin-top: 4px; color: var(--text-2); font-size: 0.875rem; line-height: 1.5; }
.beratung__bonus p:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.beratung__status { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--linie-stark); color: var(--text-2); font-size: 0.75rem; font-weight: 640; }
.beratung__auflagen, .beratung__fotos { display: grid; gap: 8px; margin: 14px 0 0; padding-left: 1.2em; font-size: 0.875rem; line-height: 1.5; }
.beratung__fotos { gap: 4px; color: var(--text-2); }
.beratung__empfehlung { max-width: 80ch; margin-top: 32px; padding: 18px 22px; border-radius: var(--radius); background: var(--tafel); color: var(--tafel-text); font-weight: 600; }

@media (max-width: 1023px) {
  .beratung__raster { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Herleitung der Investition ---------- */

.herleitung-knopf {
  min-height: 24px;
  margin-top: 2px;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 640;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.herleitung-knopf:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: 2px; }
.herleitung {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
  color: var(--text);
  box-shadow: var(--schatten);
}
.herleitung::backdrop { background: rgb(18 24 36 / 0.55); }
.herleitung__innen { padding: clamp(18px, 3vw, 32px); }
.herleitung__kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.herleitung__ueber { color: var(--text-2); font-size: 0.75rem; font-weight: 640; }
.herleitung__kopf h2 { font-size: 1.375rem; line-height: 1.25; }
.herleitung__zu {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--linie);
  border-radius: 999px;
  background: none;
  color: var(--text);
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
}
.herleitung__zu:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
.herleitung__wert { display: grid; gap: 2px; margin-top: 14px; font-size: 1.75rem; font-weight: 760; font-variant-numeric: tabular-nums; }
.herleitung__wert small { color: var(--text-2); font-size: 0.8125rem; font-weight: 500; }
.herleitung__spalten,
.herleitung__pos { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(3, minmax(0, 1fr)); gap: 14px; }
.herleitung__spalten { margin-top: 22px; padding-bottom: 8px; border-bottom: 1px solid var(--linie-stark); color: var(--text-2); font-size: 0.75rem; font-weight: 640; }
.herleitung__spalten span:nth-child(n+2) { text-align: right; }
.herleitung__liste,
.herleitung__liste ul { margin: 0; padding: 0; list-style: none; }
.herleitung__gewerk h3,
.herleitung__gewerk h4 { margin-top: 16px; font-size: 0.8125rem; font-weight: 700; }
.herleitung__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.herleitung__pos { padding: 10px 0; border-bottom: 1px solid var(--linie); align-items: start; }
.herleitung__text { display: grid; gap: 2px; }
.herleitung__text b { font-size: 0.9375rem; font-weight: 640; }
.herleitung__text small { color: var(--text-2); font-size: 0.75rem; line-height: 1.4; }
.herleitung__zahl { display: grid; justify-items: end; gap: 1px; font-size: 0.875rem; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.herleitung__zahl small { color: var(--text-2); font-size: 0.6875rem; }
.herleitung__rechnung { display: grid; gap: 6px; margin-top: 18px; padding: 14px 16px; border-radius: var(--radius); background: var(--grund); font-variant-numeric: tabular-nums; }
.herleitung__rechnung div { display: flex; justify-content: space-between; gap: 16px; font-size: 0.875rem; }
.herleitung__rechnung dt { color: var(--text-2); }
.herleitung__rechnung dd { margin: 0; white-space: nowrap; }
.herleitung__zusatz { margin-top: 22px; }
.herleitung__zusatz > h3 { font-size: 0.9375rem; }
.herleitung__zusatz > p { margin-top: 4px; color: var(--text-2); font-size: 0.8125rem; }
.herleitung__hinweis,
.herleitung__quelle { margin-top: 12px; color: var(--text-2); font-size: 0.75rem; line-height: 1.5; }

@media (max-width: 767px) {
  .herleitung__spalten { display: none; }
  .herleitung__pos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
  .herleitung__text { grid-column: 1 / -1; }
  .herleitung__zahl { justify-items: start; text-align: left; white-space: normal; }
  .herleitung__zahl::before { content: attr(data-label); color: var(--text-2); font-size: 0.6875rem; font-weight: 600; }
  .herleitung__rechnung div { flex-direction: column; gap: 0; }
}

.schalter {
  appearance: none;
  position: relative;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 999px;
  background: var(--linie-stark);
  cursor: pointer;
  transition: background-color 160ms ease;
}
.schalter::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--weiss);
  box-shadow: 0 1px 2px rgb(18 24 36 / 0.3);
  transition: transform 160ms var(--ease-out);
}
.schalter:checked { background: var(--blauschwarz); }
:root[data-theme="dark"] .schalter:checked { background: var(--signalgelb); }
:root[data-theme="dark"] .schalter:checked::after { background: var(--blauschwarz); }
.schalter:checked::after { transform: translateX(18px); }
.schalter:focus-visible { outline: none; }

@media (max-width: 1023px) {
  .mgruppe__kopf { display: none; }
  .massnahme { grid-template-columns: 52px repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
  .massnahme__text { grid-column: 2 / -1; }
  .massnahme__wert { justify-items: start; text-align: left; }
  .massnahme__wert::before { content: attr(data-label); color: var(--text-2); font-size: 0.6875rem; font-weight: 600; }
  /* Werte sind span 2 bis 6 (span 1 ist der Text): abwechselnd in Spalte 2 und 3. */
  .massnahme__wert:nth-of-type(even) { grid-column: 2; }
  .massnahme__wert:nth-of-type(odd) { grid-column: 3; }
}

/* ---------- Summenleiste ---------- */

.summe {
  position: fixed;
  top: var(--kopf-h);
  left: 0;
  right: 0;
  z-index: 49;
  background: color-mix(in srgb, var(--flaeche) 96%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--linie);
  box-shadow: 0 10px 30px -24px rgb(18 24 36 / 0.5);
}
.summe[hidden] { display: none; }
.summe__innen {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 10px var(--rand);
}
.summe__auswahl { font-size: 0.875rem; font-weight: 700; white-space: nowrap; text-decoration: none; }
.summe__auswahl span { font-variant-numeric: tabular-nums; }
.summe__werte { display: flex; flex: 1; gap: 22px; margin: 0; overflow-x: auto; scrollbar-width: none; }
.summe__werte div { display: grid; gap: 1px; }
.summe__werte dt { color: var(--text-2); font-size: 0.6875rem; font-weight: 600; white-space: nowrap; }
.summe__werte dd { margin: 0; font-size: 0.9375rem; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summe__werte dd small { display: block; color: var(--text-2); font-size: 0.6875rem; font-weight: 550; }
.kapitel__preis small { display: block; color: var(--text-2); font-size: 0.75rem; font-weight: 500; }
.summe__werte .qp-chip { font-size: 0.8125rem; }
.summe__zurueck { flex: none; min-height: 34px; font-size: 0.8125rem; }
html { scroll-padding-top: calc(var(--kopf-h) + 64px); }

.summe__zurueck i { display: none; }
@media (max-width: 767px) {
  /* Eine Zeile: Anzahl, die wichtigsten Werte zuerst (weitere seitlich rollbar), Knopf als Symbol. */
  .summe__innen { gap: 12px; padding: 8px var(--rand); }
  .summe__auswahl { max-width: 5.6em; white-space: normal; font-size: 0.8125rem; line-height: 1.2; }
  .summe__werte { gap: 16px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); padding-right: 44px; }
  .summe__klasse { order: -2; }
  .summe__ersparnis { order: -1; }
  .summe__zurueck { width: 36px; min-height: 36px; padding: 0; justify-content: center; }
  .summe__zurueck i { display: block; font-size: 1.05rem; }
  .summe__zurueck span { display: none; }
}
.kapitel__zahlen dd small { font-size: 0.875rem; font-weight: 600; color: var(--text-2); }
.kapitel__zahlen--ziel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 28px; }
.kapitel__zahlen--ziel dd,
.kapitel--ergebnis .kapitel__zahlen--ziel dd { font-size: clamp(1.25rem, 2vw, 2rem); white-space: nowrap; }
/* Auf schmalen Telefonen passt „ca. 27.800 kWh/a“ nicht in die halbe Spalte: Einheit darf umbrechen. */
@media (max-width: 479px), (min-width: 1024px) and (max-width: 1199px) { .kapitel__zahlen--ziel dd, .kapitel--ergebnis .kapitel__zahlen--ziel dd { white-space: normal; } }
.kapitel__zahlen--ziel dd.minus { margin-top: 0; font-size: 1rem; font-weight: 700; color: var(--sk-0); }
:root[data-theme="dark"] .kapitel__zahlen--ziel dd.minus { color: var(--sk-1); }
.kapitel__heute { max-width: 44ch; margin-top: 22px; color: var(--text-2); font-size: 0.9375rem; }

/* ---------- Komponenten heute und in Zukunft ---------- */

.komponenten__flaeche {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 4vw, 64px);
  margin-top: 48px;
}
.komponenten__kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.skala-legende { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 0.8125rem; }
.skala-legende__balken { display: grid; grid-template-columns: repeat(7, 18px); gap: 2px; }
.skala-legende__balken span { height: 8px; border-radius: 2px; background: var(--f); }

.komponenten__liste {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.komponente {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 10px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--flaeche);
  border: 1px solid var(--linie);
  transition: border-color 400ms ease;
}
.komponente[data-verbessert] { border-color: color-mix(in srgb, var(--f) 70%, transparent); }
.komponente__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--f);
  color: var(--weiss);
  font-size: 1.5rem;
  transition: background-color 500ms ease;
}
.komponente__name { display: grid; font-weight: 700; font-stretch: 106%; line-height: 1.2; }
.komponente__name small { color: var(--text-2); font-size: 0.8125rem; font-weight: 500; font-stretch: 100%; }
.komponente__skala { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.komponente__skala span { height: 6px; border-radius: 2px; background: var(--linie); transition: background-color 400ms ease; }
.komponente__skala span[data-an] { background: var(--f); }
.komponenten__erneuerbar { margin-top: 18px; color: var(--text-2); font-size: 0.9375rem; }
.komponenten__erneuerbar[hidden] { display: none; }

.komponenten__bestand { padding: 24px; border-radius: var(--radius); background: var(--flaeche); border: 1px solid var(--linie); align-self: start; }
.komponenten__bestand h3 { display: flex; align-items: center; gap: 10px; }
.bestand { display: grid; margin: 16px 0 0; }
.bestand div { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--linie); font-size: 0.9375rem; }
.bestand div:last-child { border-bottom: 0; }
.bestand dt { color: var(--text-2); }
.bestand dd { margin: 0; font-weight: 600; hyphens: auto; overflow-wrap: anywhere; }
.komponente[data-hell] .komponente__icon,
.qp-chip[data-hell] { color: var(--blauschwarz); }
.bestand__text { margin-top: 16px; color: var(--text-2); font-size: 0.9375rem; }

@media (max-width: 1023px) {
  .komponenten__flaeche { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
  .komponenten__liste { grid-template-columns: minmax(0, 1fr); }
  .bestand div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- Kosten und Förderung ---------- */

.kosten__tabelle { margin-top: 44px; overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--linie); background: var(--flaeche); }
.kosten__tabelle table { width: 100%; min-width: 760px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.kosten__tabelle th, .kosten__tabelle td { padding: 16px 18px; text-align: right; vertical-align: middle; }
.kosten__tabelle thead th { color: var(--text-2); font-size: 0.8125rem; font-weight: 640; border-bottom: 1px solid var(--linie-stark); }
.kosten__tabelle th[scope="row"], .kosten__tabelle thead th:first-child { text-align: left; }
.kosten__tabelle tbody tr + tr { border-top: 1px solid var(--linie); }
.kosten__tabelle tbody th { font-weight: 650; }
.kosten__tabelle td { font-weight: 600; white-space: nowrap; }
.kosten__tabelle td small { display: block; margin-top: 2px; color: var(--text-2); font-size: 0.75rem; font-weight: 500; }
.kosten__ist th, .kosten__ist td { color: var(--text-2); }
.kosten__nr { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 12px; border-radius: 999px; background: var(--text); color: var(--grund); font-size: 0.8125rem; font-weight: 800; }
.kosten__tabelle tfoot th, .kosten__tabelle tfoot td { border-top: 1px solid var(--linie-stark); font-weight: 800; font-size: 1.0625rem; }
.kosten__tabelle td:last-child { width: 24%; }
.kosten__wert { display: block; }
.kostenbalken { display: block; width: var(--w); height: 6px; margin: 8px 0 0 auto; border-radius: 3px; background: var(--f); }

.kosten__unten { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); margin-top: 28px; }
.fussnoten { display: grid; align-content: start; gap: 8px; margin: 0; padding-left: 1.2em; color: var(--text-2); font-size: 0.8125rem; }
.energiepreise { display: grid; gap: 12px; }
.energiepreise h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; }
.preise { width: 100%; border-collapse: collapse; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.preise caption { text-align: left; color: var(--text-2); font-size: 0.8125rem; font-weight: 640; padding-bottom: 4px; }
.preise th, .preise td { padding: 6px 0; text-align: right; border-bottom: 1px solid var(--linie); }
.preise th[scope="row"], .preise thead th:first-child { text-align: left; }
.preise thead th { color: var(--text-2); font-weight: 600; font-size: 0.75rem; }
.preise__hinweis { color: var(--text-2); font-size: 0.75rem; }

@media (max-width: 899px) {
  .kosten__unten { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Lage: Standort und Wärmenetz ---------- */

.luftbild__ort { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-2); }
.werte--netz dd { font-size: 1rem; }
.luftbild__hinweis { color: var(--text); font-size: 0.875rem; padding: 10px 14px; border-radius: 8px; background: color-mix(in srgb, var(--sk-4) 22%, transparent); }
.luftbild__hinweis[hidden] { display: none; }

/* ---------- Vorteile ---------- */

.vorteile__liste {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 32px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}
.vorteile__liste li { display: grid; gap: 12px; align-content: start; }
.vorteile__liste i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--signalgelb); color: var(--blauschwarz); font-size: 1.35rem; }
.vorteile__liste span { display: grid; gap: 4px; color: var(--text-2); font-size: 0.9375rem; }
.vorteile__liste strong { color: var(--text); font-size: 1.0625rem; font-stretch: 106%; }
@media (max-width: 1023px) { .vorteile__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .vorteile__liste { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Fragen und Antworten ---------- */

.fragen__raster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.fragen__liste { border-top: 1px solid var(--linie-stark); }
.frage { border-bottom: 1px solid var(--linie); }
.frage summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 0;
  font-size: 1.125rem;
  font-weight: 680;
  font-stretch: 106%;
  cursor: pointer;
  list-style: none;
}
.frage summary::-webkit-details-marker { display: none; }
.frage summary i { flex: none; font-size: 1.25rem; transition: transform 200ms var(--ease-out); }
.frage[open] summary i { transform: rotate(45deg); }
.frage p { max-width: 62ch; margin: 0; padding: 0 0 22px; color: var(--text-2); }
@media (hover: hover) and (pointer: fine) { .frage summary:hover { color: var(--text-2); } }
@media (max-width: 899px) { .fragen__raster { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  :root:not([data-bewegung="an"]) *,
  :root:not([data-bewegung="an"]) *::before,
  :root:not([data-bewegung="an"]) *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}
