/* bauffy Mainz – [bauffy_marktdaten]: Kacheln, Umschalter, Karte, Detailfeld, Legende, Tabelle, Verlaufsgrafik (KONZEPT E.1–E.11).
   Nur auf Zielseiten geladen, von LiteSpeed nicht kombiniert/entfernt (data-no-optimize, Kern/Assets.php) – jede Zustandsregel steht
   deshalb hier und ist schon im Ausgangs-HTML wirksam (Radios :checked, [open], [hidden]); keine Klasse entsteht erst per JavaScript.
   Tokens --bf-* kommen aus basis.css; die Kartenfarben (--bfz-k1…k5) sind die Werte aus KONZEPT E.4 (farbfehlsichtig unterscheidbar,
   Beschriftung AA). Breakpoints per Container-Query auf dem Baustein selbst (die Seite hat wechselnde Spaltenbreiten). */

.bfz-marktdaten {
  --bfz-k1: #f6e4ea;
  --bfz-k2: #e9a8ba;
  --bfz-k3: #d65a7c;
  --bfz-k4: #9b1a42;
  --bfz-k5: #430122;
  --bfz-kx: #e7e4e5;
  --bfz-rand: #8a8486;
  --bfz-tief: #1f0010;
  --bfz-text-leise: #5f5b5e;
  --bfz-flaeche: var(--bf-color-surface-alt, #fbf9fa);
  --bfz-linie: #e6e1e3;
  color: var(--bf-color-text, #404041);
  font-family: var(--bf-font-light, system-ui, sans-serif);
  font-size: 18px;
  line-height: var(--bf-lh-body, 1.6);
  text-align: left;
}

/* Container-Query-Bezug (19.11.2026): jeder Block im Container (oben die Karte, unten das Preisband) ist ein eigener Container „bfz-md“; der Wrapper .bfz-marktdaten
   trägt nur Tokens und den :has()-Bezug der Schalter (er umschließt beide Blöcke und das Bottom Sheet, das als position: fixed keinen Container über sich haben darf). */
.bfz-md {
  container-type: inline-size;
  container-name: bfz-md;
}

.bfz-marktdaten *,
.bfz-marktdaten *::before,
.bfz-marktdaten *::after {
  box-sizing: border-box;
}

/* ---- Überschriften, Einleitung, Quellen ---------------------------------------------------- */

.bfz-marktdaten__titel,
.bfz-marktdaten__h {
  font-family: var(--bf-font-bold, system-ui, sans-serif);
  font-weight: 400;
  color: var(--bf-color-burgundy, #430122);
  letter-spacing: var(--bf-ls-heading, 1px);
  line-height: var(--bf-lh-heading, 1.2);
  margin: 0 0 var(--bf-h2-mb, 20px);
  padding: 0;
  text-wrap: balance;
}

.bfz-marktdaten__titel {
  font-size: var(--bf-fs-h2, 35px);
}

.bfz-marktdaten__h {
  font-size: 26px;
  margin-top: 32px;
  letter-spacing: var(--bf-ls-heading, 1px);
}

.bfz-marktdaten__kopf { display: block; }
/* 04.11.2026 (F-S1): das Paar-Foto neben dem Intro entfällt */

/* 05.11.2026 (Kundin, Foto „Block 1“): rechts neben dem 760 px schmalen Intro blieb eine leere Fläche, und der Text klebte an der H2
   (die gemeinsame Regel .bfz-bereich .bfz-kopf__titel setzt margin: 0). Jetzt wie Schritt 2 und 3: H2 → 20 px → erster Absatz als Lead
   (22 px, bis 1000 px breit, wie .bfz-kopf__lead), die Daten-Sätze und der Bedienhinweis darunter in zwei Spalten über die volle Breite. */
.bfz-marktdaten__einleitung {
  max-width: none;
  margin: 20px 0 36px;
  columns: 2;
  column-gap: 48px;
}

.bfz-marktdaten__einleitung p {
  margin: 0 0 12px;
  padding: 0;
  font-size: var(--bf-fs-body, 18px);
  break-inside: avoid;
}

.bfz-marktdaten__einleitung p:first-child {
  column-span: all;
  max-width: 1000px;
  margin: 0 0 24px;
  font-size: var(--bfz-fs-lead, 22px);
  line-height: 1.5;
}

@container bfz-md (max-width: 760px) {
  .bfz-marktdaten__einleitung { columns: 1; margin-bottom: 28px; }
  .bfz-marktdaten__einleitung p:first-child { margin-bottom: 16px; }
}

.bfz-marktdaten__veraltet {
  margin: 0 0 24px;
  padding: 14px 18px;
  background: #fff4e5;
  border-left: 4px solid #8a5200;
  color: #4a2c00;
  font-size: 16px;
}

.bfz-marktdaten__quelle,
.bfz-karte__quellen {
  margin: 16px 0 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--bfz-text-leise);
}

.bfz-karte__quellen a,
.bfz-marktdaten__link {
  color: var(--bf-color-accent, #cf214c);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bfz-marktdaten__cta {
  margin: 40px 0 0;
  padding: 0;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
}

.bfz-marktdaten__cta .bfz-marktdaten__link {
  text-decoration: none;
}

.bfz-marktdaten__cta .bfz-marktdaten__link::after {
  content: " →";
}

/* ---- Kennzahlen als Werte-Karten (Kanon §4 Nr. 2): vier graue Karten (Ecken 0 30 30 30, Innen 30, kein Rand) – Name 18 Semibold → Wert 48 Bold + Einheit → Median 16 → Trend 16 Semibold ---- */

.bfz-marktdaten__kacheln {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  border: 0;
}

.bfz-kachel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 24px 28px 22px;
  border: 0;
  border-radius: 0 30px 30px 30px;
  background: var(--bfz-flaeche);
}

@container bfz-md (min-width: 860px) {
  .bfz-marktdaten__kacheln {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}

.bfz-kachel dt,
.bfz-kachel dd {
  margin: 0;
  padding: 0;
}

.bfz-kachel__name {
  margin-bottom: 8px;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 18px;
  line-height: 1.3;
  color: var(--bf-color-burgundy, #430122);
}

.bfz-kachel__wert {
  font-family: var(--bf-font-bold, system-ui, sans-serif);
  font-size: clamp(36px, 4.2cqi, 48px);
  line-height: 1;
  letter-spacing: .5px;
  color: var(--bf-color-burgundy, #430122);
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
}

.bfz-kachel__einheit {
  display: block;
  margin-top: 4px;
  font-family: var(--bf-font-light, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--bfz-text-leise);
  white-space: normal;
}

.bfz-kachel__zeile {
  font-size: 16px;
  line-height: 1.45;
}

.bfz-kachel__trend {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px !important;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.4;
  color: var(--bf-color-burgundy, #430122);
}

.bfz-kachel__pfeil {
  flex: none;
  margin-top: 3px;
}

.bfz-kachel__kurz { display: none; }

/* Handy: eine Karte je Zeile ab 481 px zwei nebeneinander; die Zeilenhöhen gleichen sich selbst an */
@media (max-width: 767px) {
  .bfz-kachel { padding: 22px 20px 20px; }
  .bfz-kachel__wert { font-size: 34px; }
  .bfz-kachel__lang { display: none; }
  .bfz-kachel__kurz { display: inline; }
}

@media (max-width: 480px) {
  .bfz-marktdaten__kacheln { gap: 12px; }
  .bfz-kachel { padding: 18px 16px 16px; }
  .bfz-kachel__name { font-size: 16px; }
  .bfz-kachel__wert { font-size: 32px; }
}

.bfz-marktdaten__neubau-hinweis {
  margin: 14px 0 24px;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
  color: var(--bfz-text-leise);
}

/* ---- Umschalter (E.2) ----------------------------------------------------------------------- */

.bfz-umschalter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin: 0 0 18px;
}

.bfz-umschalter__gruppe {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.bfz-umschalter__legende {
  float: left;
  padding: 0;
  margin: 0 12px 0 0;
  line-height: 44px;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 16px;
  color: var(--bfz-text-leise);
}

.bfz-umschalter__segmente {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--bf-color-burgundy, #430122);
  border-radius: var(--bf-radius-btn, 0 15px 15px 15px);
}

.bfz-umschalter__radio {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.bfz-umschalter__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--bf-color-burgundy, #430122);
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--bf-transition, 300ms ease), color var(--bf-transition, 300ms ease), border-color var(--bf-transition, 300ms ease);
}

.bfz-umschalter__label:hover {
  background: var(--bfz-flaeche);
}

.bfz-umschalter__radio:checked + .bfz-umschalter__label {
  background: var(--bf-color-burgundy, #430122);
  color: #fff;
}

.bfz-umschalter__radio:focus-visible + .bfz-umschalter__label {
  outline: 3px solid var(--bf-color-accent, #cf214c);
  outline-offset: -3px;
}

@media (max-width: 480px) {
  .bfz-umschalter {
    gap: 14px;
  }

  .bfz-umschalter__legende {
    float: none;
    margin: 0 0 8px;
    line-height: inherit;
  }

  .bfz-umschalter__gruppe,
  .bfz-umschalter__segmente {
    width: 100%;
  }

  .bfz-umschalter__label {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 12px;
  }
}

/* ---- Karte v2: große Karte über die ganze Breite, heller Straßenhintergrund, Zoom (E.5–E.7) ------------------------------------ */
/* Die Bühne (SVG-viewBox −580 0 1815 1100) enthält die Stadt (0…1015) und Seitenraum; das Hintergrundbild liegt in denselben
   Koordinaten darunter. Der Rahmen ist ~62 % so hoch wie breit (≈ 1152 × 714 px am Desktop, 440 px am Handy) und schneidet zu. Breit (≥ 960 px):
   die Bühne füllt den Rahmen, die Stadt sitzt rechts der Mitte, links ist Platz für Detailfeld und Legende. Schmal: die ganze Stadt
   wird eingepasst und mittig gezeigt, Detailfeld und Legende folgen unter der Karte. */

.bfz-karte__buehne {
  position: relative;
}

.bfz-karte__skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.bfz-karte__skip:focus {
  position: static;
  display: inline-block;
  margin: 0 0 10px;
  padding: 10px 16px;
  background: var(--bf-color-burgundy, #430122);
  color: #fff;
  font-size: 16px;
}

.bfz-karte__rahmen {
  container-type: inline-size;
  container-name: bfz-karte;
  position: relative;
  width: 100%;
  aspect-ratio: 1075 / 1125; /* wie die Bühne (Geometrie::BUEHNE_*): der Rahmen zeigt ganz Mainz, nichts wird abgeschnitten */
  overflow: hidden;
  isolation: isolate;
  background: #efedec;
  border-radius: var(--bf-radius-lg, 0 30px 30px 30px);
}

.bfz-karte__svg {
  --bfz-z: 1;
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.bfz-karte--gezoomt .bfz-karte__svg {
  cursor: grab;
}

/* Touch: ab Zoom 1,6 verschiebt EIN Finger die Karte in alle Richtungen (kein Browser-Wischen). Damit man nicht in der Karte hängen bleibt,
   bleiben ein Streifen rechts und einer unten (28 px) für das Scrollen der Seite frei (transparente Felder, nur pan-y). */
.bfz-karte--zoom .bfz-karte__svg {
  touch-action: none;
}

.bfz-karte__rahmen::before,
.bfz-karte__rahmen::after {
  content: none;
  position: absolute;
  z-index: 2;
  touch-action: pan-y;
}

.bfz-karte__rahmen.bfz-karte--zoom::before {
  content: "";
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
}

.bfz-karte__rahmen.bfz-karte--zoom::after {
  content: "";
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
}

.bfz-karte--zieht .bfz-karte__svg,
.bfz-karte--zieht .bfz-st {
  cursor: grabbing;
}

.bfz-wasser {
  pointer-events: none;
}

.bfz-hg {
  pointer-events: none;
}

.bfz-stadtteile {
  stroke: #fff;
}

.bfz-st {
  cursor: pointer;
  outline: none;
  /* Standardwerte je Ansicht (überschrieben von den Zellcodes unten) */
  --kb: var(--bfz-kx); --kn: var(--bfz-kx); --mb: var(--bfz-kx); --mn: var(--bfz-kx); --hkb: var(--bfz-kx); --hkn: var(--bfz-kx); --hmb: var(--bfz-kx); --hmn: var(--bfz-kx);
  --kbt: #430122; --knt: #430122; --mbt: #430122; --mnt: #430122; --hkbt: #430122; --hknt: #430122; --hmbt: #430122; --hmnt: #430122;
  --kbh: none; --knh: none; --mbh: none; --mnh: none; --hkbh: none; --hknh: none; --hmbh: none; --hmnh: none;
  --kbs: #fff; --kns: #fff; --mbs: #fff; --mns: #fff; --hkbs: #fff; --hkns: #fff; --hmbs: #fff; --hmns: #fff;
  --kbd: none; --knd: none; --mbd: none; --mnd: none; --hkbd: none; --hknd: none; --hmbd: none; --hmnd: none;
}

/* Flächen halbdurchsichtig: die Straßen darunter bleiben als feine Linien erkennbar, die Abstufung bleibt lesbar */
.bfz-st path {
  fill-opacity: .86;
  stroke-width: 1.3px;
  vector-effect: non-scaling-stroke;
  transition: fill var(--bf-transition, 300ms ease), fill-opacity 160ms ease;
}

.bfz-st:hover path,
.bfz-st:focus-visible path {
  fill-opacity: 1;
  stroke: var(--bfz-tief);
  stroke-width: 2.4px;
  stroke-dasharray: none;
}

/* Beschriftung: die Schrift bleibt beim Zoomen gleich groß auf dem Bildschirm (Einheiten ÷ Zoom). Breite Karte: Profil d, sonst m. */
.bfz-lbl {
  --bfz-fs: 32px;
  display: none;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: calc(var(--bfz-fs) / var(--bfz-z, 1));
  fill: #430122;
  stroke-width: calc(4px / var(--bfz-z, 1));
  stroke-linejoin: round;
  paint-order: stroke;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.bfz-lbl--d {
  --bfz-fs: 23px;
}

.bfz-lbl--aussen {
  fill: #33172a;
  stroke: #fff;
  stroke-width: calc(5px / var(--bfz-z, 1));
}

.bfz-fuehr {
  display: none;
}

.bfz-fuehr .bfz-lbl {
  display: inline;
}

.bfz-fuehr__linie {
  stroke: #6a4d5e;
  stroke-width: 1.2px;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.bfz-fuehr__punkt {
  fill: #430122;
  stroke: #fff;
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
  r: calc(3.4px / var(--bfz-z, 1));
}

.bfz-lbl--m:not(.bfz-lbl--z),
.bfz-fuehr--m,
.bfz-karte--zoom .bfz-lbl--m.bfz-lbl--z {
  display: inline;
}

@container bfz-karte (min-width: 960px) {
  .bfz-lbl--m:not(.bfz-lbl--z),
  .bfz-lbl--m.bfz-lbl--z,
  .bfz-fuehr--m,
  .bfz-karte--zoom .bfz-lbl--m.bfz-lbl--z {
    display: none;
  }

  .bfz-lbl--d:not(.bfz-lbl--z),
  .bfz-fuehr--d,
  .bfz-karte--zoom .bfz-lbl--d.bfz-lbl--z {
    display: inline;
  }
}

.bfz-hl {
  pointer-events: none;
  stroke: var(--bfz-tief);
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.bfz-hl--hover {
  stroke-width: 2.4px;
  filter: drop-shadow(0 0 3px #fff);
}

.bfz-hl--auswahl {
  stroke-width: 3.6px;
  filter: drop-shadow(0 0 3px #fff);
}

/* Zoom-Knöpfe: erst mit JavaScript sichtbar (ohne läge kein Zweck vor) */
.bfz-zoom {
  position: absolute;
  z-index: 3;
  bottom: 12px;
  left: 12px;
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

html[data-bfz-js] .bfz-zoom {
  display: flex; /* Spalte unten links: dort liegt auf der Bühne kein Stadtteil */
}

.bfz-zoom__knopf {
  appearance: none;
  -webkit-appearance: none;
  min-width: 44px;
  height: 44px;
  margin: 0;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--bf-color-burgundy, #430122);
  border: 1px solid var(--bfz-linie);
  border-radius: 0 10px 10px 10px;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1;
  letter-spacing: .2px;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.bfz-zoom__knopf--plus,
.bfz-zoom__knopf--minus {
  padding: 0;
  font-size: 26px;
  font-family: var(--bf-font-light, system-ui, sans-serif);
}

.bfz-zoom__knopf--plus > span,
.bfz-zoom__knopf--minus > span {
  display: none;
}

.bfz-zoom__knopf--plus,
.bfz-zoom__knopf--minus {
  position: relative;
}

.bfz-zoom__knopf--plus::before,
.bfz-zoom__knopf--minus::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  background: currentColor;
}

.bfz-zoom__knopf--plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 14px;
  margin: -7px 0 0 -1px;
  background: currentColor;
}

.bfz-zoom__knopf:hover:not(:disabled) {
  background: var(--bfz-flaeche);
}

.bfz-zoom__knopf:focus-visible {
  outline: 3px solid var(--bf-color-burgundy, #430122);
  outline-offset: 2px;
}

/* deaktiviert: Hintergrund bleibt deckend (die Kartenbeschriftung darf nicht durchscheinen), nur Schrift und Linie verblassen */
.bfz-zoom__knopf:disabled {
  background: #fff;
  color: #9b8f95;
  border-color: #efe8eb;
  cursor: default;
}

/* Hinweis „Strg + Scrollen“: nur bei Mausrad ohne Strg, nur mit Maus (hover), nie klickbar */
.bfz-karte__hinweis {
  display: none;
}

@media (hover: hover) {
  .bfz-karte__hinweis {
    display: block;
    position: absolute;
    z-index: 3;
    left: 72px;
    bottom: 12px;
    max-width: min(220px, calc(100% - 84px));
    margin: 0;
    padding: 9px 16px;
    background: rgba(43, 18, 32, .9);
    color: #fff;
    border-radius: 0 12px 12px 12px;
    font-size: 16px;
    line-height: 1.3;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .bfz-karte--hinweis .bfz-karte__hinweis {
    opacity: 1;
  }
}

/* ---- Stadtteil-Kasten (Kundenfeedback 19.11.2026, Teil 2 Punkt 1) ------------------------------------------------------------------------------------- */
/* Schmal (unter 816 px Modulbreite): der Kasten steht unter der Karte; mit Skript übernimmt dort das Bottom Sheet (unten). Breit: neben der Karte, oben bündig.
   22.11.2026 (Kundin: „etwas harmonischer … fixe Kastengröße … ca. 1/3 bleibt tote rote Fläche“): der Kasten ist so hoch wie sein Inhalt, der Knopf folgt
   direkt (vorher: Kasten = Kartenhöhe, Knopf unten bündig, Lücke dazwischen). Schrift neben der Karte in festen px (vorher cqi + dichter Satz unter 420 px
   Kastenbreite – beim Hineinzoomen im Browser wird das Modul schmaler, die Schrift wurde dadurch KLEINER). */
.bfz-karte__seite {
  margin-top: 16px;
}

@container bfz-md (min-width: 816px) {
  .bfz-karte__buehne {
    display: grid;
    grid-template-columns: minmax(0, min(560px, 55%)) minmax(320px, 1fr); /* Karte höchstens 560 px und höchstens 55 % – bei 125 % Browser-Zoom bekommt der Kasten mehr Breite */
    gap: 32px;
    align-items: start;
  }

  .bfz-karte__seite {
    margin-top: 0;
    min-width: 0;
  }

  .bfz-karte__seite .bfz-detail {
    padding: 28px 32px 30px;
  }

  .bfz-karte__seite .bfz-detail .bfz-detail__name { font-size: 30px; }
  .bfz-karte__seite .bfz-detail .bfz-detail__wert { font-size: 52px; }

  .bfz-marktdaten .bfz-karte__seite .bfz-detail a.bfz-detail__knopf {
    margin-top: 24px;
  }
}

.bfz-detail {
  --bfz-d-leise: #f0d6df;
  container-type: inline-size;
  container-name: bfz-box;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: 20px 30px 24px;
  background: var(--bf-color-burgundy, #430122);
  color: #fff;
  border-radius: var(--bf-radius-card, 0 20px 20px 20px);
}

.bfz-detail [hidden] {
  display: none !important;
}

:is(.bfz-detail, .bfz-sheet__inhalt) p {
  margin: 0;
  padding: 0;
  font-size: 18px;
  line-height: 1.45;
}

.bfz-detail__panel {
  flex: 1 1 auto;
  min-height: 0;
}

/* Zustand „Mainz insgesamt“: alle acht Ansichten im HTML, CSS zeigt die Ausgangsansicht (die :has()-Regeln unten wählen die gewählte). Nach einer
   Stadtteilwahl (mit Skript) tritt die Fläche zurück. */
.bfz-detail__gesamt {
  display: none;
}

.bfz-detail__gesamt--start {
  display: block;
}

html[data-bfz-js] .bfz-detail.bfz-detail--auswahl .bfz-detail__gesamt {
  display: none !important;
}

/* Rücklink: gleiche Bezeichnung wie der Kartenknopf; nur mit Skript und nur nach einer Stadtteilwahl (setzt Wahl UND Zoom zurück) */
.bfz-marktdaten .bfz-detail__zurueck {
  display: none;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  min-height: 36px;
  margin: -6px 0 0 -6px;
  padding: 6px;
  border: 0;
  background: none;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.3;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

.bfz-marktdaten .bfz-detail__zurueck:hover {
  color: var(--bfz-d-leise);
}

.bfz-marktdaten .bfz-detail__zurueck:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

html[data-bfz-js] .bfz-marktdaten .bfz-detail.bfz-detail--auswahl .bfz-detail__zurueck {
  display: inline-flex;
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__name {
  font-family: var(--bf-font-bold, system-ui, sans-serif);
  font-size: clamp(22px, 7.4cqi, 30px);
  line-height: 1.15;
  letter-spacing: .5px;
  color: #fff;
  text-wrap: balance;
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__label {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--bfz-d-leise);
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__wert {
  margin-top: 2px;
  font-family: var(--bf-font-bold, system-ui, sans-serif);
  font-size: clamp(32px, 12.5cqi, 52px);
  line-height: 1.08;
  letter-spacing: .3px;
  color: #fff;
}

/* Pinkes Badge: Vergleich mit Mainz insgesamt (Mainz insgesamt: Veränderung zum Vorjahr) */
:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__badge {
  display: inline-block;
  max-width: 100%;
  margin-top: 10px;
  padding: 3px 14px 4px;
  border-radius: 0 14px 14px 14px;
  background: var(--bf-color-accent, #cf214c);
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.35;
  color: #fff;
  text-wrap: balance;
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__wenig {
  margin-top: 14px;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 22px;
  line-height: 1.3;
  color: #fff;
  text-wrap: balance;
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__hinweis,
:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__zeitraum,
:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__zusatz,
:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__faktor,
:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__rang {
  font-size: 16px;
  line-height: 1.4;
  color: var(--bfz-d-leise);
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__hinweis {
  margin-top: 10px;
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__spanne {
  margin-top: 14px;
  font-size: 18px;
  line-height: 1.35;
  color: #fff;
  text-wrap: pretty;
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__zeitraum {
  margin-top: 12px;
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__zusatz {
  margin-top: 2px;
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__faktor {
  margin-top: 6px;
}

:is(.bfz-detail, .bfz-sheet__inhalt) .bfz-detail__rang {
  margin-top: 12px;
}

/* Balken: Strecke P25–P75 mit Median-Punkt auf FESTER Skala der Reihe (Skalenenden klein darunter) */
.bfz-balken {
  position: relative;
  height: 36px;
  margin-top: 8px;
}

.bfz-balken__spur,
.bfz-balken__spanne,
.bfz-balken__punkt {
  position: absolute;
  display: block;
}

.bfz-balken__spur {
  left: 0;
  right: 0;
  top: 7px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .28);
}

.bfz-balken__spanne {
  top: 4px;
  left: var(--von, 0%);
  width: calc(var(--bis, 100%) - var(--von, 0%));
  min-width: 6px;
  height: 10px;
  border-radius: 5px;
  background: #f6c7d5;
}

.bfz-balken__punkt {
  top: 1px;
  left: var(--med, 50%);
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--bf-color-accent, #cf214c);
}

.bfz-balken__ende {
  position: absolute;
  top: 20px;
  font-size: 14px;
  line-height: 16px;
  white-space: nowrap;
  color: var(--bfz-d-leise);
}

.bfz-balken__ende--a { left: 0; }
.bfz-balken__ende--e { right: 0; }

/* Schmaler Kasten: dichtere Schrift und Abstände. Seit 22.11.2026 nur noch, wenn der Kasten UNTER der Karte steht (Handy ohne Skript, Tablet hoch) – neben der
   Karte muss nichts mehr in die Kartenhöhe passen, und beim Hineinzoomen soll die Schrift wachsen, nicht schrumpfen. */
@container bfz-md (max-width: 815px) {
@container bfz-box (max-width: 419px) {
  .bfz-detail {
    padding: 14px 22px 18px;
  }

  .bfz-detail .bfz-detail__label,
  .bfz-detail .bfz-detail__badge,
  .bfz-detail .bfz-detail__hinweis,
  .bfz-detail .bfz-detail__zeitraum,
  .bfz-detail .bfz-detail__zusatz,
  .bfz-detail .bfz-detail__faktor,
  .bfz-detail .bfz-detail__rang {
    font-size: 15px;
    line-height: 1.35;
  }

  .bfz-detail .bfz-detail__spanne {
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.35;
  }

  .bfz-detail .bfz-detail__label { margin-top: 8px; }
  .bfz-detail .bfz-detail__badge { margin-top: 8px; padding: 2px 12px 3px; }
  .bfz-detail .bfz-detail__hinweis { margin-top: 8px; }
  .bfz-detail .bfz-detail__zeitraum { margin-top: 8px; }
  .bfz-detail .bfz-detail__faktor { margin-top: 4px; }
  .bfz-detail .bfz-detail__wert { font-size: clamp(30px, 11cqi, 40px); }

  .bfz-marktdaten .bfz-detail a.bfz-detail__knopf {
    margin-top: 10px;
    min-height: 46px;
    padding: 6px 16px;
    font-size: 16px;
  }
}
}

/* Knopf am Ende des Kastens */
.bfz-marktdaten .bfz-detail a.bfz-detail__knopf {
  flex: none;
  margin-top: 16px;
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  text-wrap: balance;
}

.bfz-detail__stadtteil[hidden] {
  display: none;
}

/* Handy/Tablet mit Skript (22.11.2026, Kundin: „Können wir nur das Pop-up anzeigen lassen? Ansonsten doppelt sich der Kasten … Ggf. mit einem Hinweis, dass man
   auf die Stadtteile klicken kann“): unter der Karte kein Kasten mehr – der Stadtteil erscheint nur im Bottom Sheet; ohne Auswahl steht dort ein Hinweis.
   Die Ansage-Zeile des Kastens (role=status) bleibt im Baum, damit Screenreader die Wahl weiter hören. Ohne Skript bleibt der Kasten (dann gibt es kein Sheet). */
.bfz-karte__tipp {
  display: none;
}

@container bfz-md (max-width: 815px) {
  html[data-bfz-js] .bfz-karte__seite .bfz-detail {
    padding: 0;
    background: none;
    border-radius: 0;
  }

  html[data-bfz-js] .bfz-karte__seite .bfz-detail > :not([data-bfz-ansage]) {
    display: none !important;
  }

  html[data-bfz-js] .bfz-marktdaten .bfz-karte__tipp {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 12px 16px;
    background: var(--bfz-flaeche);
    border-radius: var(--bf-radius-card, 0 20px 20px 20px);
    font-size: 16px;
    line-height: 1.4;
    color: var(--bf-color-burgundy, #430122);
  }

  html[data-bfz-js] .bfz-karte__tipp::before {
    content: "";
    flex: none;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    border: 5px solid rgba(207, 33, 76, .18);
    border-radius: 50%;
    background: var(--bf-color-accent, #cf214c);
    background-clip: padding-box;
  }

  html[data-bfz-js] .bfz-karte__seite:has(.bfz-detail--auswahl) .bfz-karte__tipp {
    display: none;
  }
}

/* ---- Legende (19.11.2026, Teil 2 Punkt 2): horizontale Farbskala unter Karte und Kasten, volle Breite --------------------------------------------------- */

.bfz-legende {
  margin: 24px 0 0;
}

.bfz-legende__ansicht {
  display: none;
}

.bfz-legende__ansicht--start {
  display: block;
}

.bfz-legende__titel {
  margin: 0 0 12px;
  padding: 0;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1.3;
  color: var(--bf-color-burgundy, #430122);
}

.bfz-legende__zeile {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 44px;
}

.bfz-marktdaten ul.bfz-legende__liste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

/* Kunde 19.11.: Farbskala „über die volle Breite“ → eigene Zeile; die beiden Schraffur-Einträge darunter. */
.bfz-marktdaten ul.bfz-legende__liste--skala {
  flex: 1 1 100%;
  min-width: 0;
}

.bfz-marktdaten ul.bfz-legende__liste--extra {
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px 28px;
  padding-top: 0;
}

.bfz-marktdaten .bfz-legende__eintrag {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 15px;
  line-height: 1.35;
}

.bfz-marktdaten .bfz-legende__liste--skala .bfz-legende__eintrag {
  flex: 1 1 0;
  min-width: 0;
}

.bfz-marktdaten .bfz-legende__liste--extra .bfz-legende__eintrag {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bfz-legende__farbe {
  display: block;
  flex: none;
  box-sizing: border-box;
  border: 1px solid var(--bfz-rand);
}

.bfz-legende__liste--skala .bfz-legende__farbe {
  width: 100%;
  height: 16px;
  border: 0;
}

.bfz-legende__liste--skala .bfz-legende__eintrag:first-child .bfz-legende__farbe { border-radius: 8px 0 0 8px; }
.bfz-legende__liste--skala .bfz-legende__eintrag:last-child .bfz-legende__farbe { border-radius: 0 8px 8px 0; }

.bfz-legende__liste--extra .bfz-legende__farbe {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.bfz-legende__text {
  display: block;
}

.bfz-legende__liste--skala .bfz-legende__text {
  margin-top: 8px;
  padding-right: 12px;
}

.bfz-legende__klasse {
  display: block;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  color: var(--bf-color-burgundy, #430122);
}

.bfz-legende__liste--extra .bfz-legende__klasse {
  font-family: var(--bf-font-light, system-ui, sans-serif);
  color: var(--bf-color-text, #404041);
}

.bfz-legende__grenze {
  display: block;
  color: var(--bfz-text-leise);
}

.bfz-legende__farbe--1 { background: var(--bfz-k1); }
.bfz-legende__farbe--2 { background: var(--bfz-k2); }
.bfz-legende__farbe--3 { background: var(--bfz-k3); }
.bfz-legende__farbe--4 { background: var(--bfz-k4); }
.bfz-legende__farbe--5 { background: var(--bfz-k5); }
.bfz-legende__farbe--n { background: var(--bfz-k2); }
.bfz-legende__farbe--g { background: repeating-linear-gradient(45deg, #fff 0 4px, #d9a3b3 4px 7px); }
.bfz-legende__farbe--z { background: repeating-linear-gradient(45deg, #e7e4e5 0 4px, #8a8486 4px 7px); }

.bfz-legende__zusatz {
  margin: 16px 0 0 !important;
  padding: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bfz-text-leise);
}

/* Handy (19.11. nach Live-Prüfung): fünf schmale Spalten liefen ineinander („3.787–4.232 €/m²“ ist breiter als 70 px). Die Farbskala bleibt
   eine durchgehende horizontale Leiste; die Beschriftungen stehen darunter als Liste – je Zeile Farbpunkt, Klasse, €-Grenzen rechts.
   Die li werden zu display:contents, damit Leiste (Zeile 1) und Beschriftungen (Zeilen 2–6) im selben Raster liegen.
   Grenze 760 px: darunter sind fünf Spalten schmaler als die längste €-Spanne (Chromium bei 653 px gemessen). */
@container bfz-md (max-width: 760px) {
  .bfz-marktdaten ul.bfz-legende__liste--skala { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .bfz-marktdaten .bfz-legende__liste--skala .bfz-legende__eintrag { display: contents; }
  .bfz-legende__liste--skala .bfz-legende__farbe { grid-row: 1; margin-bottom: 6px; }
  .bfz-legende__liste--skala .bfz-legende__text {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 10px;
    margin-top: 0;
    padding: 8px 0 0;
    font-size: 15px;
    line-height: 1.35;
  }
  .bfz-legende__liste--skala .bfz-legende__text::before {
    content: "";
    width: 14px;
    height: 14px;
    align-self: center;
    border-radius: 3px;
    box-sizing: border-box;
    border: 1px solid var(--bfz-rand);
    background: var(--bfz-k1);
  }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(n+2) .bfz-legende__text::before { border: 0; }
  .bfz-legende__liste--skala .bfz-legende__grenze { text-align: right; white-space: nowrap; }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(1) .bfz-legende__text { grid-row: 2; }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(2) .bfz-legende__text { grid-row: 3; }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(2) .bfz-legende__text::before { background: var(--bfz-k2); }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(3) .bfz-legende__text { grid-row: 4; }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(3) .bfz-legende__text::before { background: var(--bfz-k3); }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(4) .bfz-legende__text { grid-row: 5; }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(4) .bfz-legende__text::before { background: var(--bfz-k4); }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(5) .bfz-legende__text { grid-row: 6; }
  .bfz-legende__liste--skala .bfz-legende__eintrag:nth-child(5) .bfz-legende__text::before { background: var(--bfz-k5); }
  .bfz-marktdaten .bfz-legende__liste--extra .bfz-legende__eintrag { font-size: 14px; line-height: 1.3; }
}


/* Zellcodes je Ansicht: Farbe, Beschriftungsfarbe, Halo (--kb = Kaufen·Wohnung·Bestand, --kn, --mb, --mn; Häuser mit h: --hkb …) */
.bfz-kb-1{--kb:var(--bfz-k1);--kbt:#430122;--kbh:none;}
.bfz-kb-2{--kb:var(--bfz-k2);--kbt:#430122;--kbh:none;}
.bfz-kb-3{--kb:var(--bfz-k3);--kbt:#1f0010;--kbh:none;}
.bfz-kb-4{--kb:var(--bfz-k4);--kbt:#ffffff;--kbh:none;}
.bfz-kb-5{--kb:var(--bfz-k5);--kbt:#ffffff;--kbh:none;}
.bfz-kb-n{--kb:var(--bfz-k2);--kbt:#430122;--kbh:none;}
.bfz-kb-g{--kb:url(#bfz-muster-g);--kbt:#430122;--kbh:#fff;}
.bfz-kb-f{--kb:url(#bfz-muster-g);--kbt:#430122;--kbh:#fff;--kbs:#5e585b;--kbd:5 3;}
.bfz-kb-z{--kb:url(#bfz-muster-z);--kbt:#430122;--kbh:#fff;}
.bfz-kn-1{--kn:var(--bfz-k1);--knt:#430122;--knh:none;}
.bfz-kn-2{--kn:var(--bfz-k2);--knt:#430122;--knh:none;}
.bfz-kn-3{--kn:var(--bfz-k3);--knt:#1f0010;--knh:none;}
.bfz-kn-4{--kn:var(--bfz-k4);--knt:#ffffff;--knh:none;}
.bfz-kn-5{--kn:var(--bfz-k5);--knt:#ffffff;--knh:none;}
.bfz-kn-n{--kn:var(--bfz-k2);--knt:#430122;--knh:none;}
.bfz-kn-g{--kn:url(#bfz-muster-g);--knt:#430122;--knh:#fff;}
.bfz-kn-f{--kn:url(#bfz-muster-g);--knt:#430122;--knh:#fff;--kns:#5e585b;--knd:5 3;}
.bfz-kn-z{--kn:url(#bfz-muster-z);--knt:#430122;--knh:#fff;}
.bfz-mb-1{--mb:var(--bfz-k1);--mbt:#430122;--mbh:none;}
.bfz-mb-2{--mb:var(--bfz-k2);--mbt:#430122;--mbh:none;}
.bfz-mb-3{--mb:var(--bfz-k3);--mbt:#1f0010;--mbh:none;}
.bfz-mb-4{--mb:var(--bfz-k4);--mbt:#ffffff;--mbh:none;}
.bfz-mb-5{--mb:var(--bfz-k5);--mbt:#ffffff;--mbh:none;}
.bfz-mb-n{--mb:var(--bfz-k2);--mbt:#430122;--mbh:none;}
.bfz-mb-g{--mb:url(#bfz-muster-g);--mbt:#430122;--mbh:#fff;}
.bfz-mb-f{--mb:url(#bfz-muster-g);--mbt:#430122;--mbh:#fff;--mbs:#5e585b;--mbd:5 3;}
.bfz-mb-z{--mb:url(#bfz-muster-z);--mbt:#430122;--mbh:#fff;}
.bfz-mn-1{--mn:var(--bfz-k1);--mnt:#430122;--mnh:none;}
.bfz-mn-2{--mn:var(--bfz-k2);--mnt:#430122;--mnh:none;}
.bfz-mn-3{--mn:var(--bfz-k3);--mnt:#1f0010;--mnh:none;}
.bfz-mn-4{--mn:var(--bfz-k4);--mnt:#ffffff;--mnh:none;}
.bfz-mn-5{--mn:var(--bfz-k5);--mnt:#ffffff;--mnh:none;}
.bfz-mn-n{--mn:var(--bfz-k2);--mnt:#430122;--mnh:none;}
.bfz-mn-g{--mn:url(#bfz-muster-g);--mnt:#430122;--mnh:#fff;}
.bfz-mn-f{--mn:url(#bfz-muster-g);--mnt:#430122;--mnh:#fff;--mns:#5e585b;--mnd:5 3;}
.bfz-mn-z{--mn:url(#bfz-muster-z);--mnt:#430122;--mnh:#fff;}
.bfz-hkb-1{--hkb:var(--bfz-k1);--hkbt:#430122;--hkbh:none;}
.bfz-hkb-2{--hkb:var(--bfz-k2);--hkbt:#430122;--hkbh:none;}
.bfz-hkb-3{--hkb:var(--bfz-k3);--hkbt:#1f0010;--hkbh:none;}
.bfz-hkb-4{--hkb:var(--bfz-k4);--hkbt:#ffffff;--hkbh:none;}
.bfz-hkb-5{--hkb:var(--bfz-k5);--hkbt:#ffffff;--hkbh:none;}
.bfz-hkb-n{--hkb:var(--bfz-k2);--hkbt:#430122;--hkbh:none;}
.bfz-hkb-g{--hkb:url(#bfz-muster-g);--hkbt:#430122;--hkbh:#fff;}
.bfz-hkb-f{--hkb:url(#bfz-muster-g);--hkbt:#430122;--hkbh:#fff;--hkbs:#5e585b;--hkbd:5 3;}
.bfz-hkb-z{--hkb:url(#bfz-muster-z);--hkbt:#430122;--hkbh:#fff;}
.bfz-hkn-1{--hkn:var(--bfz-k1);--hknt:#430122;--hknh:none;}
.bfz-hkn-2{--hkn:var(--bfz-k2);--hknt:#430122;--hknh:none;}
.bfz-hkn-3{--hkn:var(--bfz-k3);--hknt:#1f0010;--hknh:none;}
.bfz-hkn-4{--hkn:var(--bfz-k4);--hknt:#ffffff;--hknh:none;}
.bfz-hkn-5{--hkn:var(--bfz-k5);--hknt:#ffffff;--hknh:none;}
.bfz-hkn-n{--hkn:var(--bfz-k2);--hknt:#430122;--hknh:none;}
.bfz-hkn-g{--hkn:url(#bfz-muster-g);--hknt:#430122;--hknh:#fff;}
.bfz-hkn-f{--hkn:url(#bfz-muster-g);--hknt:#430122;--hknh:#fff;--hkns:#5e585b;--hknd:5 3;}
.bfz-hkn-z{--hkn:url(#bfz-muster-z);--hknt:#430122;--hknh:#fff;}
.bfz-hmb-1{--hmb:var(--bfz-k1);--hmbt:#430122;--hmbh:none;}
.bfz-hmb-2{--hmb:var(--bfz-k2);--hmbt:#430122;--hmbh:none;}
.bfz-hmb-3{--hmb:var(--bfz-k3);--hmbt:#1f0010;--hmbh:none;}
.bfz-hmb-4{--hmb:var(--bfz-k4);--hmbt:#ffffff;--hmbh:none;}
.bfz-hmb-5{--hmb:var(--bfz-k5);--hmbt:#ffffff;--hmbh:none;}
.bfz-hmb-n{--hmb:var(--bfz-k2);--hmbt:#430122;--hmbh:none;}
.bfz-hmb-g{--hmb:url(#bfz-muster-g);--hmbt:#430122;--hmbh:#fff;}
.bfz-hmb-f{--hmb:url(#bfz-muster-g);--hmbt:#430122;--hmbh:#fff;--hmbs:#5e585b;--hmbd:5 3;}
.bfz-hmb-z{--hmb:url(#bfz-muster-z);--hmbt:#430122;--hmbh:#fff;}
.bfz-hmn-1{--hmn:var(--bfz-k1);--hmnt:#430122;--hmnh:none;}
.bfz-hmn-2{--hmn:var(--bfz-k2);--hmnt:#430122;--hmnh:none;}
.bfz-hmn-3{--hmn:var(--bfz-k3);--hmnt:#1f0010;--hmnh:none;}
.bfz-hmn-4{--hmn:var(--bfz-k4);--hmnt:#ffffff;--hmnh:none;}
.bfz-hmn-5{--hmn:var(--bfz-k5);--hmnt:#ffffff;--hmnh:none;}
.bfz-hmn-n{--hmn:var(--bfz-k2);--hmnt:#430122;--hmnh:none;}
.bfz-hmn-g{--hmn:url(#bfz-muster-g);--hmnt:#430122;--hmnh:#fff;}
.bfz-hmn-f{--hmn:url(#bfz-muster-g);--hmnt:#430122;--hmnh:#fff;--hmns:#5e585b;--hmnd:5 3;}
.bfz-hmn-z{--hmn:url(#bfz-muster-z);--hmnt:#430122;--hmnh:#fff;}

/* Ansichtswechsel: :has() auf den Radios (Angebot × Objekt × Baualter). Die Ausgangsansicht (Kaufen · Haus · Bestand) steht als fill-Attribut und als …--start im HTML. */
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-st path{fill:var(--kb);stroke:var(--kbs);stroke-dasharray:var(--kbd)}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-st .bfz-lbl{fill:var(--kbt);stroke:var(--kbh)}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-legende__ansicht:not(.bfz-legende__ansicht--kb){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-legende__ansicht--kb{display:block}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-detail__gesamt:not(.bfz-detail__gesamt--kb){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-detail__gesamt--kb{display:block}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-grafik:not(.bfz-grafik--kauf-wohnung){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-grafik--kauf-wohnung{display:block}

.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-st path{fill:var(--kn);stroke:var(--kns);stroke-dasharray:var(--knd)}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-st .bfz-lbl{fill:var(--knt);stroke:var(--knh)}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-legende__ansicht:not(.bfz-legende__ansicht--kn){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-legende__ansicht--kn{display:block}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-detail__gesamt:not(.bfz-detail__gesamt--kn){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-detail__gesamt--kn{display:block}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-grafik:not(.bfz-grafik--kauf-wohnung){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-grafik--kauf-wohnung{display:block}

.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-st path{fill:var(--mb);stroke:var(--mbs);stroke-dasharray:var(--mbd)}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-st .bfz-lbl{fill:var(--mbt);stroke:var(--mbh)}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-legende__ansicht:not(.bfz-legende__ansicht--mb){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-legende__ansicht--mb{display:block}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-detail__gesamt:not(.bfz-detail__gesamt--mb){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-detail__gesamt--mb{display:block}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-grafik:not(.bfz-grafik--miete-wohnung){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-bestand:checked) .bfz-grafik--miete-wohnung{display:block}

.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-st path{fill:var(--mn);stroke:var(--mns);stroke-dasharray:var(--mnd)}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-st .bfz-lbl{fill:var(--mnt);stroke:var(--mnh)}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-legende__ansicht:not(.bfz-legende__ansicht--mn){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-legende__ansicht--mn{display:block}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-detail__gesamt:not(.bfz-detail__gesamt--mn){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-detail__gesamt--mn{display:block}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-grafik:not(.bfz-grafik--miete-wohnung){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-wohnung:checked):has(#bfz-md-alter-neubau:checked) .bfz-grafik--miete-wohnung{display:block}

.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-st path{fill:var(--hkb);stroke:var(--hkbs);stroke-dasharray:var(--hkbd)}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-st .bfz-lbl{fill:var(--hkbt);stroke:var(--hkbh)}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-legende__ansicht:not(.bfz-legende__ansicht--hkb){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-legende__ansicht--hkb{display:block}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-detail__gesamt:not(.bfz-detail__gesamt--hkb){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-detail__gesamt--hkb{display:block}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-grafik:not(.bfz-grafik--kauf-haus){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-grafik--kauf-haus{display:block}

.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-st path{fill:var(--hkn);stroke:var(--hkns);stroke-dasharray:var(--hknd)}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-st .bfz-lbl{fill:var(--hknt);stroke:var(--hknh)}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-legende__ansicht:not(.bfz-legende__ansicht--hkn){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-legende__ansicht--hkn{display:block}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-detail__gesamt:not(.bfz-detail__gesamt--hkn){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-detail__gesamt--hkn{display:block}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-grafik:not(.bfz-grafik--kauf-haus){display:none}
.bfz-marktdaten:has(#bfz-md-art-kaufen:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-grafik--kauf-haus{display:block}

.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-st path{fill:var(--hmb);stroke:var(--hmbs);stroke-dasharray:var(--hmbd)}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-st .bfz-lbl{fill:var(--hmbt);stroke:var(--hmbh)}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-legende__ansicht:not(.bfz-legende__ansicht--hmb){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-legende__ansicht--hmb{display:block}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-detail__gesamt:not(.bfz-detail__gesamt--hmb){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-detail__gesamt--hmb{display:block}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-grafik:not(.bfz-grafik--miete-haus){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-bestand:checked) .bfz-grafik--miete-haus{display:block}

.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-st path{fill:var(--hmn);stroke:var(--hmns);stroke-dasharray:var(--hmnd)}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-st .bfz-lbl{fill:var(--hmnt);stroke:var(--hmnh)}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-legende__ansicht:not(.bfz-legende__ansicht--hmn){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-legende__ansicht--hmn{display:block}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-detail__gesamt:not(.bfz-detail__gesamt--hmn){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-detail__gesamt--hmn{display:block}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-grafik:not(.bfz-grafik--miete-haus){display:none}
.bfz-marktdaten:has(#bfz-md-art-mieten:checked):has(#bfz-md-obj-haus:checked):has(#bfz-md-alter-neubau:checked) .bfz-grafik--miete-haus{display:block}

/* ---- Tabelle in <details> (E.8) -------------------------------------------------------------- */

.bfz-marktdaten__tabelle {
  margin: 24px 0 0;
  border-bottom: 1px solid var(--bfz-linie);
}

.bfz-marktdaten__tabelle--werte {
  margin-top: 0;
}

.bfz-tabelle__summary {
  position: relative;
  display: block;
  min-height: 52px;
  padding: 14px 40px 14px 0;
  border-top: 1px solid var(--bfz-linie);
  color: var(--bf-color-burgundy, #430122);
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 18px;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

.bfz-tabelle__summary::-webkit-details-marker {
  display: none;
}

/* Plus/Minus der Tabelle: Regel in bausteine.css (gemeinsam mit allen Aufklappern) */

.bfz-tabelle__rahmen {
  margin-top: 16px;
  overflow-x: auto;
  background: #fff;
}

.bfz-tabelle__rahmen:focus-visible {
  outline: 3px solid var(--bf-color-accent, #cf214c);
  outline-offset: 2px;
}

.bfz-tabelle {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 16px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.bfz-tabelle__caption {
  padding: 16px 18px 12px;
  text-align: left;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 16px;
  color: var(--bf-color-burgundy, #430122);
  caption-side: top;
}

.bfz-marktdaten .bfz-tabelle th,
.bfz-marktdaten .bfz-tabelle td {
  padding: 11px 18px;
  text-align: left !important; /* Divi setzt Tabellenzellen per ID-Regel rechtsbündig */
  line-height: 1.4;
  vertical-align: top;
  border-top: 1px solid var(--bfz-linie);
  background: #fff;
}

.bfz-tabelle thead th {
  position: sticky;
  top: 0;
  background: var(--bfz-flaeche);
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-weight: 400;
  font-size: 16px;
  letter-spacing: .3px;
  color: var(--bf-color-burgundy, #430122);
  border-top: 1px solid var(--bfz-linie);
}

.bfz-tabelle tbody tr:nth-child(even) th,
.bfz-tabelle tbody tr:nth-child(even) td {
  background: #fdfbfc;
}

.bfz-tabelle__ort {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 170px;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-weight: 400;
  color: var(--bf-color-burgundy, #430122);
  border-right: 1px solid var(--bfz-linie);
}

.bfz-tabelle tfoot th,
.bfz-tabelle tfoot td {
  background: var(--bfz-flaeche);
  border-top: 2px solid var(--bf-color-burgundy, #430122);
}

.bfz-tabelle__wert {
  display: inline;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  color: var(--bf-color-burgundy, #430122);
}

.bfz-tabelle__marke {
  margin-left: 3px;
  font-size: 14px;
  line-height: 0;
  vertical-align: baseline;
  position: relative;
  top: -.45em;
  color: var(--bf-color-accent, #cf214c);
  cursor: help;
}

.bfz-tabelle__n,
.bfz-tabelle__veraenderung {
  display: block;
  font-size: 16px;
  color: var(--bfz-text-leise);
}

.bfz-tabelle__n {
  white-space: nowrap;
}

@media (max-width: 767px) {
  .bfz-tabelle__caption {
    max-width: calc(100vw - 2 * var(--bfz-seitenrand, 16px));
    white-space: normal;
  }
}

.bfz-tabelle__veraenderung {
  margin-top: 2px;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
}

.bfz-tabelle__zelle--leer {
  color: var(--bfz-text-leise);
  font-size: 16px;
}

.bfz-tabelle__vorlaeufig {
  font-family: var(--bf-font-light, system-ui, sans-serif);
  font-size: 16px;
  color: var(--bfz-text-leise);
}

.bfz-tabelle tr:target th,
.bfz-tabelle tr:target td {
  background: #fdeef2;
}

.bfz-marktdaten ul.bfz-tabelle__fussnoten,
.bfz-marktdaten ul.bfz-marktdaten__fussnoten,
.bfz-marktdaten ul.bfz-marktdaten__hinweise {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  line-height: 1.5;
  color: var(--bfz-text-leise);
}

.bfz-marktdaten .bfz-tabelle__fussnoten li,
.bfz-marktdaten .bfz-marktdaten__fussnoten li,
.bfz-marktdaten .bfz-marktdaten__hinweise li {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
}

.bfz-marktdaten ul.bfz-marktdaten__hinweise {
  margin-top: 28px;
}

/* Kernsatz unter der H3 der Verlaufsgrafik: sichtbarer, zitierbarer Satz mit Zahl, Zeitraum und Quelle */
.bfz-marktdaten .bfz-marktdaten__kernsatz {
  max-width: 980px;
  margin: 0 0 16px;
  font-size: 18px;
  line-height: 1.55;
}

/* ---- Verlaufsgrafik (E.9) -------------------------------------------------------------------- */

/* Kanon §4 Nr. 2: beide Diagramme ohne Haarlinie darüber in EINER grauen Tafel nebeneinander (Innen 40) */
.bfz-verlauf {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1fr);
  padding: 24px 32px;
  border-radius: 0 30px 30px 30px;
  background: var(--bfz-flaeche);
}

@media (max-width: 767px) {
  .bfz-verlauf {
    padding: 24px 20px;
  }
}

.bfz-grafik {
  display: none;
  container-type: inline-size;
  container-name: bfz-g;
  margin: 0;
  padding: 0;
}

.bfz-grafik--start { display: block; }

.bfz-grafik__titel {
  margin: 0 0 8px;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 18px;
  line-height: 1.35;
  color: var(--bf-color-burgundy, #430122);
}

.bfz-grafik__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.bfz-grafik__svg--breit {
  display: none;
}

@container bfz-g (min-width: 520px) {
  .bfz-grafik__svg--breit {
    display: block;
  }

  .bfz-grafik__svg--schmal {
    display: none;
  }
}

.bfz-grafik__gitter line {
  stroke: #e7e4e5;
  stroke-width: 1;
}

.bfz-grafik__gitter line.bfz-grafik__achse {
  stroke: var(--bfz-rand);
}

.bfz-grafik__gitter text,
.bfz-grafik__enden text {
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
}

.bfz-grafik__gitter text {
  fill: #404041;
}

/* ---- „So lesen Sie die Marktdaten“ ------------------------------------------------------------ */

/* Runde 3: Werkzeugzeile – Tabelle, Werte der Grafik und Begriffe/Methode als eine Reihe von Schaltern mit Haarlinien; aufgeklappt nimmt ein Block die volle Breite. */
.bfz-marktdaten__nachschlag {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 48px;
  align-items: start;
  margin-top: 28px;
}

.bfz-marktdaten__nachschlag > .bfz-marktdaten__h {
  margin: 0;
}

.bfz-marktdaten__nachschlag > details {
  margin: 0;
  border-bottom: 1px solid var(--bfz-linie);
}

.bfz-marktdaten__nachschlag > details > summary {
  position: relative;
  display: block;
  min-height: 52px;
  padding: 14px 40px 14px 0;
  border-top: 1px solid var(--bfz-linie);
  color: var(--bf-color-burgundy, #430122);
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 18px;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}

@container bfz-md (min-width: 760px) {
  .bfz-marktdaten__nachschlag {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bfz-marktdaten__nachschlag > details[open] {
    grid-column: 1 / -1;
  }
}

.bfz-lesen__zusatz {
  margin: 14px 0 6px;
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--bfz-text-leise);
}

.bfz-marktdaten__nachschlag .bfz-marktdaten__lesen {
  grid-template-columns: minmax(0, 1fr);
}

@container bfz-md (min-width: 860px) {
  .bfz-marktdaten__nachschlag > details[open] .bfz-marktdaten__lesen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bfz-marktdaten__tabelle--werte .bfz-marktdaten__fussnoten {
  margin: 12px 0 8px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--bfz-text-leise);
}

.bfz-marktdaten__lesen {
  display: grid;
  column-gap: 40px;
  margin: 0;
  padding: 0;
}

@container bfz-md (min-width: 860px) {
  .bfz-marktdaten__lesen {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.bfz-lesen__eintrag {
  padding: 14px 0 12px;
  border-top: 1px solid var(--bfz-linie);
}

.bfz-marktdaten__lesen dt {
  margin: 0 0 4px;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 16px;
  color: var(--bf-color-burgundy, #430122);
}

.bfz-marktdaten__lesen dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

/* Administratoren: nicht aufgelöster Platzhalter (Kern\Texte) */
.bfz-marktdaten .bfz-platzhalter-fehlt {
  background: #ffd7de;
  color: #7a0019;
}

/* Divi stapelt Tabellenzellen auf schmalen Bildschirmen (display:block) – unsere Tabelle bleibt eine Tabelle (scrollt im Rahmen, E.7) */
.bfz-marktdaten table.bfz-tabelle { display: table !important; width: 100%; }
.bfz-marktdaten .bfz-tabelle thead { display: table-header-group !important; }
.bfz-marktdaten .bfz-tabelle tbody { display: table-row-group !important; }
.bfz-marktdaten .bfz-tabelle tfoot { display: table-footer-group !important; }
.bfz-marktdaten .bfz-tabelle tr { display: table-row !important; }
.bfz-marktdaten .bfz-tabelle th,
.bfz-marktdaten .bfz-tabelle td { display: table-cell !important; width: auto; }
.bfz-marktdaten .bfz-tabelle caption { display: table-caption !important; }

/* Sprungziele nicht unter dem festen Header (WCAG 2.4.11) */
#bfz-tabelle,
.bfz-tabelle tbody tr[id] {
  scroll-margin-top: calc(var(--bf-header-h, 110px) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  .bfz-umschalter__label,
  .bfz-st path,
  .bfz-zoom__knopf,
  .bfz-karte__hinweis,
  .bfz-tabelle__summary,
  .bfz-tabelle__summary::after {
    transition: none !important;
  }
}

/* ---- Kanon (09.10.2026): Bedienelemente wie die Karussell-Pfeile der Startseite --------------------------------------------------------------------------------- */

/* Zoom: weiße runde Flächen 40 px ohne Rand, Symbol Burgund; „Zurücksetzen“ bleibt ein Textknopf mit der Markenecke */
.bfz-zoom__knopf {
  border: 0;
  background: #fff;
}

.bfz-zoom__knopf--plus,
.bfz-zoom__knopf--minus {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
}

.bfz-zoom__knopf:disabled {
  border: 0;
}

/* Umschalter: Höhe 48, Schrift 18 Semibold */
.bfz-umschalter__label {
  min-height: 48px;
}

.bfz-umschalter__legende {
  line-height: 48px;
}

.bfz-marktdaten__nachschlag > details > summary {
  min-height: 56px;
}

/* ---- Kompakt 17.10.2026 (Kunden-Mockup als Maß für die Dichte) ------------------------------------------------ */
/* Desktop: Karte höchstens 560 px breit – seit 19.11.2026 in „Stadtteil-Kasten“ (unten). */
/* Handy: beide Umschalter nebeneinander, Beschriftung klein darüber; Legende enger */
@media (max-width: 480px) {
  .bfz-umschalter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
  .bfz-umschalter__legende { margin: 0 0 4px; font-size: 16px; }
  .bfz-umschalter__segmente { display: flex; }
  .bfz-umschalter__label { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 16px; }
  .bfz-verlauf { gap: 20px; padding: 20px 16px; }
}
/* Preisentwicklung kompakt: links Überschrift und Kernsatz, rechts die Grafik zur gewählten Ansicht (Angebot × Objekt, zwei Linien) */
@container bfz-md (min-width: 1100px) {
  .bfz-verlauf__bereich { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 36px; align-items: start; margin-top: 44px; }
  .bfz-verlauf__bereich .bfz-verlauf { padding: 24px 28px; }
  .bfz-verlauf__kopf .bfz-marktdaten__h { margin-top: 0; }
}

/* ---- Gesamtfeedback 04.11.2026 (F-S1): drei Schalter (Angebot · Objekt · Baualter), Haus unter Mieten, zwei Tabellen --------------------------------- */
.bfz-umschalter { gap: 12px 28px; }
.bfz-umschalter__label { min-width: 104px; padding: 0 20px; }
.bfz-umschalter__label[aria-disabled="true"] { color: var(--bfz-text-leise); background: var(--bfz-flaeche); cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1px; }
.bfz-umschalter__radio:checked + .bfz-umschalter__label[aria-disabled="true"] { background: var(--bfz-flaeche); color: var(--bfz-text-leise); }
.bfz-marktdaten .bfz-umschalter__hinweis { max-width: 760px; margin: -6px 0 16px; padding: 10px 14px; border-left: 3px solid var(--bf-color-accent, #cf214c); background: var(--bfz-flaeche); font-size: 16px; line-height: 1.5; color: var(--bf-color-text, #404041); }
.bfz-marktdaten .bfz-umschalter__hinweis[hidden] { display: none; }
/* Handy: Beschriftung links neben den Knöpfen, drei Zeilen à 44 px (22.11.2026: Kundin „Die Auswahl nimmt fast den kompletten Bildschirm ein“ – in Safari stand
   die Beschriftung über den Knöpfen, siehe Karte::umschalter; jetzt 3 × 44 + 2 × 8 px in allen Browsern) */
@media (max-width: 480px) {
  .bfz-umschalter { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bfz-umschalter__legende { flex: none; float: none; margin: 0 10px 0 0; line-height: 44px; width: 72px; }
  .bfz-umschalter__gruppe { display: flex; align-items: center; }
  .bfz-umschalter__gruppe,
  .bfz-umschalter__segmente { width: 100%; }
  .bfz-umschalter__gruppe .bfz-umschalter__segmente { flex: 1 1 auto; width: auto; }
  .bfz-umschalter__label { min-height: 44px; font-size: 17px; }
}
.bfz-tabelle__objekt { margin: 0 0 24px; }
.bfz-tabelle__titel { margin: 20px 0 8px; font-family: var(--bf-font-semibold, system-ui, sans-serif); font-size: 18px; color: var(--bf-color-burgundy, #430122); }
.bfz-tabelle__spalte--faktor, .bfz-tabelle__zelle--faktor { white-space: nowrap; }

/* Einordnung, Karte 1 (F-E): zwei große Zahlen nebeneinander (Wohnung, Haus), unter 480 px untereinander */
.bfz-einordnung .bfz-kennzahlen { display: flex; flex-wrap: wrap; gap: 20px 36px; }
.bfz-einordnung .bfz-kennzahlen .bfz-kennzahl { flex: 1 1 150px; min-width: 0; }

/* ---- Feinschliff 10.11.2026 (Kundenfeedback Christina) ------------------------------------------------------------------------------------ */

/* Knopf „Ganz Mainz“ in der Karte: aktiv, sobald gezoomt ODER ein Stadtteil gewählt ist (marktdaten.js); gesperrt deutlich leiser */
.bfz-marktdaten .bfz-zoom__knopf--reset:disabled { opacity: .55; }

/* Preisentwicklung: Achsenbeschriftung leicht und grau statt halbfett-dunkel (die Zahlen konkurrierten mit Überschrift und Linien), Linienenden bleiben
   halbfett in Linienfarbe; Text und Tafel oben bündig, die Tafel so hoch wie ihr Inhalt. */
.bfz-marktdaten .bfz-grafik__gitter text { font-family: var(--bf-font-light, system-ui, sans-serif); fill: #6f6a6c; font-size: 14px; }
.bfz-marktdaten .bfz-grafik__svg--schmal .bfz-grafik__gitter text { font-size: 13px; }
.bfz-marktdaten .bfz-grafik__enden text { font-size: 15px; }
.bfz-marktdaten .bfz-grafik__gitter line { stroke: #ece9ea; }
@container bfz-md (min-width: 1100px) {
  .bfz-verlauf__bereich { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
  .bfz-verlauf__kopf .bfz-marktdaten__kernsatz { margin-bottom: 0; }
}

/* ---- Preisband (19.11.2026, Teil 2 Punkt 4): Preisentwicklung, Akkordeons und Quellenzeile im vollflächigen Bordeaux-Band ------------------------------------ */
/* Das Band ist ein Kind der Sektion (volle Sektionsbreite, kein Ausbruch über die Fensterbreite → keine Querleiste durch die Scrollbarbreite). Tokens und Fokusfarben wie der
   dunkle Förder-Abschnitt (.bfz-bereich--dunkel: Fläche --bf-color-burgundy, Text weiß, Fokus weiß, Linien rgba(255,255,255,.22), Akzentfarbe rosa #f6e4ea). */
.bfz-bereich--marktdaten:has(.bfz-preisband) {
  padding-bottom: 0;
}

.bfz-preisband {
  --bfz-p-linie: rgba(255, 255, 255, .24);
  --bfz-p-leise: rgba(255, 255, 255, .82);
  --bfz-p-rosa: #f6e4ea;
  margin-top: 40px;
  padding: 64px 0;
  background: var(--bf-color-burgundy, #430122);
  color: var(--bf-color-on-dark, #fff);
}

.bfz-preisband .bfz-md > :first-child {
  margin-top: 0;
}

@media (max-width: 767px) {
  .bfz-preisband {
    margin-top: 32px;
    padding: 48px 0;
  }
}

.bfz-preisband .bfz-marktdaten__h,
.bfz-preisband .bfz-grafik__titel {
  margin-top: 0;
  color: #fff;
}

.bfz-preisband .bfz-marktdaten__kernsatz {
  color: rgba(255, 255, 255, .92);
}

.bfz-preisband .bfz-verlauf {
  background: rgba(255, 255, 255, .07);
}

/* Grafik auf dunklem Grund: helle Linien und Beschriftungen (Kontrast ≥ 4,5 : 1 für Text, ≥ 3 : 1 für Linien) */
.bfz-preisband .bfz-grafik__gitter line { stroke: rgba(255, 255, 255, .2); }
.bfz-preisband .bfz-grafik__gitter line.bfz-grafik__achse { stroke: rgba(255, 255, 255, .6); }
.bfz-preisband .bfz-grafik__gitter text { fill: #ecdbe2; }
.bfz-preisband .bfz-grafik__linie--bestand { stroke: #fff; }
.bfz-preisband .bfz-grafik__linie--neubau { stroke: #f7a8bf; }
.bfz-preisband .bfz-grafik__linie circle { fill: #4d1a38; }
.bfz-preisband .bfz-grafik__ende--bestand { fill: #fff; }
.bfz-preisband .bfz-grafik__ende--neubau { fill: #f7a8bf; }

/* Preisentwicklung je Stadtteil (22.11.2026, marktdaten-verlauf.js): ist ein Stadtteil gewählt, trägt das SVG die Klasse --stadtteil. Die statischen Elemente des Servers
   bleiben, werden aber zur dünnen, gedämpften Vergleichslinie „Mainz“ (nur Bestand): Mainzer Neubau, Mainzer Beschriftungen und Fühlflächen sind aus. Die Linien des
   Stadtteils liegen in .bfz-grafik__stadt (Kinder des Skripts) und behalten die Farben und Strichstärken von oben. */
.bfz-grafik__svg--stadtteil > .bfz-grafik__linie--neubau,
.bfz-grafik__svg--stadtteil > .bfz-grafik__enden,
.bfz-grafik__svg--stadtteil > .bfz-grafik__punkte,
.bfz-grafik__svg--stadtteil > .bfz-grafik__linie--bestand circle { display: none; }
.bfz-grafik__svg--stadtteil > .bfz-grafik__linie--bestand { opacity: .6; }
.bfz-grafik__svg--stadtteil > .bfz-grafik__linie--bestand path { stroke-width: 1.5px; }
.bfz-preisband .bfz-grafik__svg--stadtteil > .bfz-grafik__linie--bestand { opacity: .55; }
.bfz-grafik__ende--mainz { fill: #6f6a6c; }
.bfz-preisband .bfz-grafik__ende--mainz { fill: #d9c3cd; }
.bfz-grafik__hinweis {
  margin: 0 0 10px;
  font-family: var(--bf-font-light, system-ui, sans-serif);
  font-size: 15px;
  line-height: 1.45;
  color: #404041;
}
.bfz-preisband .bfz-grafik__hinweis { color: #ecdbe2; }

/* Akkordeons: Linien, Schrift und Plus/Minus hell */
.bfz-preisband .bfz-marktdaten__tabelle,
.bfz-preisband .bfz-marktdaten__nachschlag > details {
  border-bottom-color: var(--bfz-p-linie);
}

.bfz-preisband .bfz-tabelle__summary,
.bfz-preisband .bfz-marktdaten__nachschlag > details > summary {
  border-top-color: var(--bfz-p-linie);
  color: #fff;
}

.bfz-preisband .bfz-tabelle__summary::before,
.bfz-preisband .bfz-tabelle__summary::after,
.bfz-preisband .bfz-marktdaten__lesen-details > summary::before,
.bfz-preisband .bfz-marktdaten__lesen-details > summary::after {
  background: var(--bfz-p-rosa);
}

.bfz-preisband .bfz-marktdaten__lesen-details > summary {
  color: #fff;
}

.bfz-preisband summary:focus-visible,
.bfz-preisband .bfz-tabelle__rahmen:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.bfz-preisband .bfz-lesen__eintrag {
  border-top-color: var(--bfz-p-linie);
}

.bfz-preisband .bfz-marktdaten__lesen dt,
.bfz-preisband .bfz-tabelle__titel {
  color: var(--bfz-p-rosa);
}

.bfz-preisband .bfz-marktdaten__lesen dd {
  color: #fff;
}

.bfz-preisband .bfz-lesen__zusatz,
.bfz-preisband .bfz-marktdaten__fussnoten,
.bfz-preisband .bfz-karte__quellen,
.bfz-preisband .bfz-notiz {
  color: var(--bfz-p-leise);
}

.bfz-preisband .bfz-karte__quellen a {
  color: #fff;
}

/* Die Tabellen bleiben helle Flächen im Band: Zellentext zurück auf die Textfarbe (das Band vererbt Weiß) */
.bfz-preisband .bfz-tabelle__rahmen {
  border-radius: 0 20px 20px 20px;
}

.bfz-preisband .bfz-tabelle td,
.bfz-preisband .bfz-tabelle tfoot th {
  color: var(--bf-color-text, #404041);
}

/* ---- Bottom Sheet (19.11.2026, Teil 2 Punkt 5): nur Handy, nur mit Skript --------------------------------------------------------------------------- */
.bfz-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  max-height: 80vh;
  max-height: 80svh;
  padding: 8px 0 env(safe-area-inset-bottom, 0px);
  background: var(--bf-color-burgundy, #430122);
  color: #fff;
  border-radius: 0 28px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .28);
  transform: translateY(105%);
  transition: transform 260ms cubic-bezier(.2, .8, .2, 1);
  font-family: var(--bf-font-light, system-ui, sans-serif);
}

.bfz-sheet:not([hidden]) {
  display: flex;
}

.bfz-sheet.bfz-sheet--sichtbar {
  transform: none;
}

.bfz-sheet *,
.bfz-sheet *::before,
.bfz-sheet *::after {
  box-sizing: border-box;
}

.bfz-sheet p {
  margin: 0;
  padding: 0;
}

.bfz-sheet__griff {
  align-self: center;
  flex: none;
  width: 44px;
  height: 4px;
  margin: 0 0 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .4);
}

.bfz-sheet__kopf {
  flex: none;
  padding: 0 12px 12px 20px;
}

.bfz-sheet__zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bfz-sheet__zahlen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 12px;
  padding-right: 8px;
}

.bfz-sheet__name {
  min-width: 0;
  font-family: var(--bf-font-bold, system-ui, sans-serif);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: .4px;
  color: #fff;
}

.bfz-sheet__wert {
  font-family: var(--bf-font-bold, system-ui, sans-serif);
  font-size: 30px;
  line-height: 1.15;
  color: #fff;
}

.bfz-sheet__wert--text {
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 17px;
  line-height: 1.3;
}

.bfz-sheet .bfz-sheet__badge {
  flex: 0 1 auto;
  padding: 3px 12px 4px;
  border-radius: 0 12px 12px 12px;
  background: var(--bf-color-accent, #cf214c);
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 15px;
  line-height: 1.3;
  color: #fff;
}

.bfz-sheet [hidden] {
  display: none !important;
}

.bfz-sheet__aktionen {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bfz-sheet button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 0 14px 14px 14px;
  background: transparent;
  color: #fff;
  font-family: var(--bf-font-semibold, system-ui, sans-serif);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.bfz-sheet button:hover {
  border-color: #fff;
}

.bfz-sheet button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.bfz-sheet__details::after {
  content: "";
  width: 8px;
  height: 8px;
  margin: -3px 0 0 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 200ms ease;
}

.bfz-sheet__details[aria-expanded="true"]::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.bfz-sheet__zu {
  border-color: transparent !important;
  border-radius: 50% !important;
  padding: 0 !important;
  font-size: 30px !important;
  font-family: var(--bf-font-light, system-ui, sans-serif) !important;
}

.bfz-sheet__inhalt {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}

/* In der aufgezogenen Fassung stehen Name, Kennzahl und Badge schon im Kopf des Sheets */
.bfz-sheet__inhalt .bfz-detail__name,
.bfz-sheet__inhalt .bfz-detail__wert,
.bfz-sheet__inhalt .bfz-detail__badge,
.bfz-sheet__inhalt .bfz-detail__wenig {
  display: none;
}

.bfz-sheet__inhalt .bfz-detail__label {
  margin-top: 14px;
}

.bfz-sheet__inhalt p {
  font-size: 16px;
  line-height: 1.4;
}

.bfz-sheet__inhalt .bfz-detail__spanne {
  font-size: 18px;
}

.bfz-sheet__inhalt .bfz-detail__hinweis,
.bfz-sheet__inhalt .bfz-detail__zeitraum,
.bfz-sheet__inhalt .bfz-detail__zusatz,
.bfz-sheet__inhalt .bfz-detail__faktor {
  color: #f0d6df;
}

.bfz-sheet__inhalt .bfz-detail__hinweis { margin-top: 12px; }
.bfz-sheet__inhalt .bfz-detail__spanne { margin-top: 18px; }
.bfz-sheet__inhalt .bfz-detail__zeitraum { margin-top: 16px; }
.bfz-sheet__inhalt .bfz-detail__zusatz { margin-top: 2px; }
.bfz-sheet__inhalt .bfz-detail__faktor { margin-top: 8px; }
.bfz-sheet__inhalt .bfz-detail__stadtteil { display: block; }
.bfz-sheet__inhalt a.bfz-detail__knopf {
  display: inline-flex;
  width: 100%;
  margin-top: 20px;
}

/* „Nach oben“ liegt unten rechts: solange das Sheet offen ist, wird sie nicht gebraucht und läge darüber */
body:has(.bfz-sheet.bfz-sheet--sichtbar) .bfz-nachoben {
  display: none !important;
}

@media (min-width: 800px), (prefers-reduced-motion: reduce) {
  .bfz-sheet,
  .bfz-sheet__details::after {
    transition: none;
  }
}

@media print {
  .bfz-sheet {
    display: none !important;
  }
}
