/* Fahrschule Berlin – Gestaltung nach design/briefing.md (Vorbild twentythree.de) */

@font-face {
  font-family: "Rubik";
  src: url("/assets/schriften/rubik-latin-wght-normal.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/schriften/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --grund: #fdfaf9;
  --grund-tief: #f4ede7;
  --karte: #ffffff;
  --tinte: #212c2f;
  --tinte-leise: #4f5d60;
  --marke: #ff9001;          /* Markenorange: nur als Fläche oder auf Dunkel, als Schrift auf Hell zu schwach (2,2:1) */
  --auf-marke: var(--tinte); /* Schrift auf Orange, 6,3:1 */
  --akzent: #a65800;         /* Links, Symbole, Fokus: 5,0:1 auf dem Grund */
  --akzent-tief: #8f4b00;
  --akzent-hell: #ffe3bd;
  --akzent-linie: #ffc16b;
  --akzent-auf-dunkel: var(--marke);
  --linie: #e7ded7;
  --linie-kraeftig: #cfc5bd;
  --fuss-grund: #182124;
  --fuss-text: #e8e3de;
  --fuss-leise: #a9b4b5;

  --schrift-titel: "Rubik", system-ui, sans-serif;
  --schrift-text: "Inter", system-ui, sans-serif;

  --rund-karte: 16px;
  --rund-knopf: 10px;
  --schatten-karte: 0 1px 2px rgb(33 44 47 / 0.06), 0 14px 32px -14px rgb(33 44 47 / 0.22);
  --schatten-heben: 0 2px 4px rgb(33 44 47 / 0.06), 0 18px 36px -14px rgb(33 44 47 / 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--linie-kraeftig) var(--grund); }

body {
  margin: 0;
  min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--grund);
  color: var(--tinte);
  font: 400 1rem/1.6 var(--schrift-text);
  font-feature-settings: "cv11", "ss01";
  caret-color: var(--akzent);
  accent-color: var(--akzent);
}

::selection { background: var(--akzent); color: #fff; }

h1, h2, h3 {
  font-family: var(--schrift-titel);
  color: var(--tinte);
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

a { color: var(--akzent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--akzent-tief); }

:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

.rahmen { width: min(100%, 1180px); margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }

.sprunglink {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--tinte); color: #fff; padding: 0.6rem 1rem; border-radius: var(--rund-knopf);
}
.sprunglink:focus { top: 12px; }
.sprunglink:hover { color: #fff; }

.ikon {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* Vertrauensleiste und Kopf */

.vertrauen {
  margin: 0; padding: 0.45rem 16px;
  background: var(--marke); color: var(--auf-marke);
  font-size: 0.8125rem; font-weight: 600; text-align: center; letter-spacing: 0.01em;
}

.kopf { border-bottom: 1px solid var(--linie); background: var(--grund); }
.kopf__innen {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.25rem 2rem; padding-block: 1rem;
}

.wortmarke { display: block; line-height: 0; }
.wortmarke img { display: block; width: auto; height: 3.25rem; } /* die dünne Logo-Schrift braucht etwas Größe */
@media (max-width: 599px) { .wortmarke img { height: 2.5rem; } }

.hauptnav { display: flex; gap: 1.5rem; }
.hauptnav a { color: var(--tinte); font-weight: 600; font-size: 0.9375rem; text-decoration: none; padding-block: 0.5rem; }
.hauptnav a:hover { color: var(--akzent); text-decoration: underline; }

@media (max-width: 600px) {
  .vertrauen { font-size: 0.75rem; letter-spacing: 0; }
  .kopf__innen { padding-block: 0.875rem 0.25rem; }
  .hauptnav { width: 100%; gap: 1.25rem; }
}

/* Brotkrumen */

.brotkrumen ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem;
  list-style: none; margin: 0; padding: 1.25rem 0 1rem;
  font-size: 0.875rem; color: var(--tinte-leise);
}
.brotkrumen li { display: inline-flex; align-items: center; gap: 0.25rem; min-width: 0; }
.brotkrumen .ikon { width: 1rem; height: 1rem; color: var(--linie-kraeftig); }
.brotkrumen a { color: var(--tinte-leise); }
.brotkrumen [aria-current] { color: var(--tinte); overflow-wrap: anywhere; }

/* Profil */

.profil { display: grid; gap: 1.5rem; padding-bottom: 3rem; }

@media (min-width: 900px) {
  .profil { grid-template-columns: minmax(0, 1fr) 380px; gap: 2.5rem; align-items: start; }
  .infokarte { grid-column: 2; grid-row: 1; position: sticky; top: 1.5rem; }
  .profil__inhalt { grid-column: 1; grid-row: 1; }
}

.infokarte {
  background: var(--karte); border-radius: var(--rund-karte); box-shadow: var(--schatten-karte);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.infokarte h1 {
  font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.125rem); line-height: 1.15; font-weight: 700;
  margin: 0 0 1rem; overflow-wrap: anywhere;
}
.infokarte .chips { margin: 1rem 0 0; }

.adresse, .kontakt, .pruefhinweis, .geschlossen {
  display: flex; gap: 0.625rem; align-items: flex-start; margin: 0;
}
.adresse { font-size: 1.0625rem; line-height: 1.45; }
.adresse .ikon, .kontakt .ikon { color: var(--akzent); margin-top: 0.1em; }

.aktionen { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; margin-top: 1.5rem; }
.aktionen .knopf:first-child { grid-column: 1 / -1; }
.aktionen .knopf:last-child:nth-child(2) { grid-column: 1 / -1; }

.kontakt { margin-top: 1.25rem; font-size: 0.9375rem; overflow-wrap: anywhere; }

.pruefhinweis {
  margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--linie);
  font-size: 0.8125rem; color: var(--tinte-leise);
}
.pruefhinweis .ikon { width: 1.05rem; height: 1.05rem; margin-top: 0.1em; }

.geschlossen {
  margin-top: 0.25rem; padding: 1rem; border-radius: 12px;
  background: var(--grund-tief); line-height: 1.5;
}
.geschlossen .ikon { color: var(--akzent); margin-top: 0.1em; }

/* Knöpfe und Chips */

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0 1.125rem; border-radius: var(--rund-knopf);
  font: 600 1rem/1 var(--schrift-text); letter-spacing: 0.01em; text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.knopf--haupt { background: var(--marke); color: var(--auf-marke); }
.knopf--haupt:hover { background: var(--tinte); color: #fff; }
.knopf--neben { background: var(--karte); color: var(--tinte); box-shadow: inset 0 0 0 1.5px var(--linie-kraeftig); }
.knopf--neben:hover { color: var(--tinte); box-shadow: inset 0 0 0 1.5px var(--tinte); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; }
.chip {
  display: inline-flex; align-items: center; padding: 0.3rem 0.75rem; border-radius: 999px;
  background: var(--akzent-hell); color: var(--akzent-tief);
  font-size: 0.8125rem; font-weight: 600; line-height: 1.3; text-decoration: none;
}
a.chip:hover { background: var(--akzent-linie); color: var(--tinte); } /* Tief-Orange wäre hier nur 4,1:1 */
.chip--neutral { background: var(--karte); color: var(--tinte); box-shadow: inset 0 0 0 1px var(--linie-kraeftig); }

/* Klassen-Leiste: angelehnt an die Klassentabelle auf der Rückseite des Führerscheins */

.fuehrerschein {
  background: var(--akzent-hell); border-radius: var(--rund-karte);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.fuehrerschein__kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.fuehrerschein__kopf h2 { font-size: 1.375rem; font-weight: 700; line-height: 1.2; }
.fuehrerschein__kopf span { font-size: 0.875rem; font-weight: 600; color: var(--akzent-tief); white-space: nowrap; }

.fuehrerschein__liste { list-style: none; margin: 1rem 0 0; padding: 0; }
.fuehrerschein__liste li { border-top: 1px solid var(--akzent-linie); }
/* Jede Zeile ist ein Link zur Klassen-Seite (seo/verlinkung.md, Maßnahme 2) */
.fuehrerschein__liste a {
  display: grid; grid-template-columns: 3.5rem 3.75rem minmax(0, 1fr); align-items: center; gap: 0.875rem;
  padding: 0.75rem 0; color: inherit; text-decoration: none; border-radius: 10px;
}
.fuehrerschein__liste a:hover .fuehrerschein__code { color: var(--akzent-tief); text-decoration: underline; text-underline-offset: 0.2em; }
.fuehrerschein__liste a:hover .fuehrerschein__bild { box-shadow: inset 0 0 0 1.5px var(--akzent); }
.fuehrerschein__bild {
  display: grid; place-items: center; width: 3.5rem; height: 2.625rem;
  background: var(--karte); border-radius: 10px; color: var(--akzent);
}
.piktogramm {
  width: 2.5rem; height: 1.875rem;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.fuehrerschein__code { font: 700 1.25rem/1 var(--schrift-titel); letter-spacing: -0.01em; }
.fuehrerschein__text { font-size: 0.9375rem; line-height: 1.4; color: var(--tinte); hyphens: auto; overflow-wrap: break-word; }
.fuehrerschein__quelle { margin: 1rem 0 0; font-size: 0.8125rem; color: var(--tinte-leise); }
.fuehrerschein__quelle a { color: var(--akzent-tief); }

.fuehrerschein { container-type: inline-size; }
@container (min-width: 560px) {
  .fuehrerschein__liste { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.75rem; }
}

/* Zeiten und Sprachen */

.profil__inhalt { display: grid; gap: 1.5rem; }

.zeiten, .sprachen {
  background: var(--karte); border-radius: var(--rund-karte); box-shadow: inset 0 0 0 1px var(--linie);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}
.zeiten h2, .sprachen h2 {
  display: flex; align-items: center; gap: 0.5rem; font-size: 1.125rem; font-weight: 600;
}
.zeiten h2 .ikon, .sprachen h2 .ikon { color: var(--akzent); }
.zeiten__spalten { display: grid; gap: 1.25rem; margin-top: 1rem; }
@media (min-width: 640px) { .zeiten__spalten { grid-template-columns: 1fr 1fr; } }
.zeiten h3 { font: 600 0.875rem/1.3 var(--schrift-text); color: var(--tinte-leise); letter-spacing: 0; margin-bottom: 0.375rem; }
.zeiten__tabelle {
  display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1.25rem; margin: 0;
  font-variant-numeric: tabular-nums;
}
.zeiten__tabelle dt { color: var(--tinte-leise); }
.zeiten__tabelle dt:empty { display: none; }
.zeiten__tabelle dt:empty + dd { grid-column: 1 / -1; }
.zeiten__tabelle dd { margin: 0; }
.sprachen .chips { margin: 1rem 0 0; }

/* Fahrschulen in der Nähe */

.naehe { background: var(--grund-tief); padding-block: 2.5rem 3.5rem; }
.naehe h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); font-weight: 700; margin: 0 0 1.25rem; }
.naehe__liste {
  display: grid; gap: 0.875rem; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.naehe__karte a {
  position: relative; display: flex; flex-direction: column; gap: 0.375rem; height: 100%;
  padding: 1.125rem 2.75rem 1.125rem 1.25rem;
  background: var(--karte); border-radius: var(--rund-karte); box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte); text-decoration: none;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.naehe__karte a:hover { box-shadow: var(--schatten-heben); transform: translateY(-2px); }
.naehe__name { font: 600 1.0625rem/1.3 var(--schrift-titel); overflow-wrap: anywhere; }
.naehe__klassen { font-size: 0.875rem; color: var(--tinte-leise); }
.naehe__pfeil { position: absolute; right: 1rem; top: 50%; translate: 0 -50%; color: var(--akzent); }

/* Feste Kontaktleiste am Handy */

.leiste {
  position: fixed; inset: auto 0 0 0; z-index: 5;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0.625rem;
  padding: 0.75rem 16px calc(0.75rem + env(safe-area-inset-bottom));
  background: rgb(253 250 249 / 0.97); border-top: 1px solid var(--linie);
}
/* Platz unter dem Fuß, damit die feste Leiste nichts verdeckt */
body:has(.leiste) .fuss { padding-bottom: calc(3rem + 4.75rem + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .leiste { display: none; }
  body:has(.leiste) .fuss { padding-bottom: 3rem; }
}

/* Bezirksseite: Banner, Filter-Spalte, Karten */

[hidden] { display: none !important; }

.banner {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.5rem 2rem;
  min-height: clamp(150px, 18vw, 240px); padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--rund-karte); color: #fff;
  background: linear-gradient(120deg, var(--akzent-tief), var(--akzent));
}
.banner h1 { color: #fff; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.05; font-weight: 700; }
.banner p { margin: 0; font-weight: 600; font-size: 1.0625rem; }

/* Banner mit Bezirksfoto: Verlauf unten, damit die weiße Schrift auf jedem Foto lesbar bleibt */
.banner--foto {
  position: relative; isolation: isolate; overflow: hidden; background: var(--akzent-tief);
  min-height: clamp(200px, 22vw, 300px); padding-top: 3rem; /* Abstand zum Bildnachweis oben rechts */
}
.banner--foto::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(24 33 36 / 0.82) 0%, rgb(24 33 36 / 0.35) 45%, rgb(24 33 36 / 0) 75%);
}
.banner__bild { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.banner--foto h1, .banner--foto p { text-shadow: 0 1px 12px rgb(0 0 0 / 0.35); }
.banner__nachweis {
  position: absolute; top: 0.75rem; right: 0.875rem;
  padding: 0.2rem 0.5rem; border-radius: 6px; background: rgb(24 33 36 / 0.55);
  color: #fff; font-size: 0.75rem; text-decoration: none;
}
.banner__nachweis:hover { color: #fff; text-decoration: underline; }

.katalog { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 1.75rem 3.5rem; }
.katalog > * { min-width: 0; } /* sonst macht die wischbare Filterzeile die Seite am Handy breiter */
@media (min-width: 900px) {
  .katalog--mit-filter { grid-template-columns: 270px minmax(0, 1fr); gap: 2rem; align-items: start; }
  .filter { position: sticky; top: 1.5rem; }
}

.filter {
  background: var(--karte); border-radius: var(--rund-karte); box-shadow: inset 0 0 0 1px var(--linie);
  padding: 1.25rem 1.375rem;
}
.filter fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filter fieldset + fieldset { margin-top: 1.5rem; }
.filter legend { font: 600 1rem/1.3 var(--schrift-titel); padding: 0; margin-bottom: 0.5rem; }
.filter__option {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 0.625rem;
  padding: 0.55rem 0; border-top: 1px solid var(--linie); cursor: pointer; font-size: 0.9375rem;
}
.filter__reihe > .filter__option:first-child { border-top: 0; }
.filter__option input { width: 1.125rem; height: 1.125rem; margin: 0; }
.filter__option .piktogramm { width: 1.75rem; height: 1.3rem; color: var(--akzent); }
.filter fieldset:last-of-type .filter__option { grid-template-columns: auto 1fr auto; }
.filter__zahl { font-weight: 600; color: var(--akzent-tief); font-variant-numeric: tabular-nums; }
.filter__option:has(input:checked) .filter__name { font-weight: 600; }
.filter__zurueck {
  margin-top: 1rem; padding: 0.5rem 0; border: 0; background: none; cursor: pointer;
  font: 600 0.9375rem var(--schrift-text); color: var(--akzent-tief); text-decoration: underline; text-underline-offset: 0.2em;
}

/* Am Handy: Filter als wischbare Chip-Zeilen */
@media (max-width: 899px) {
  .filter { padding: 1rem; }
  .filter__reihe {
    display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1rem + 1px); padding: 0.125rem calc(1rem - 1px) 0.25rem; /* wischt bis an die Innenlinie der Karte */
  }
  .filter fieldset + fieldset { margin-top: 0.875rem; }
  .filter legend { margin-bottom: 0.5rem; font-size: 0.9375rem; }
  .filter__option, .filter fieldset:last-of-type .filter__option {
    position: relative; display: inline-flex; flex: none; gap: 0.4rem; padding: 0.45rem 0.85rem; border: 0; border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--linie-kraeftig); white-space: nowrap;
  }
  .filter__option input { position: absolute; opacity: 0; pointer-events: none; }
  .filter__option .piktogramm { width: 1.4rem; height: 1.05rem; }
  .filter__option:has(input:checked) { background: var(--marke); color: var(--auf-marke); box-shadow: none; }
  .filter__option:has(input:checked) .piktogramm, .filter__option:has(input:checked) .filter__zahl { color: var(--auf-marke); }
  .filter__option:has(input:focus-visible) { outline: 3px solid var(--akzent); outline-offset: 2px; }
}

.treffer__zeile { font: 600 0.9375rem/1.4 var(--schrift-text); color: var(--tinte-leise); letter-spacing: 0; margin: 0 0 0.875rem; }
.karten {
  display: grid; gap: 0.875rem; list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.karte a {
  position: relative; display: flex; flex-direction: column; gap: 0.3rem; height: 100%;
  padding: 1.125rem 2.75rem 1.125rem 1.25rem;
  background: var(--karte); border-radius: var(--rund-karte); box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte); text-decoration: none;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.karte a:hover { box-shadow: var(--schatten-heben); transform: translateY(-2px); }
.karte__name { font: 600 1.0625rem/1.3 var(--schrift-titel); overflow-wrap: anywhere; }
.karte__adresse { font-size: 0.875rem; color: var(--tinte-leise); }
.karte__klassen { font: 700 0.875rem/1.4 var(--schrift-titel); letter-spacing: 0.01em; color: var(--akzent-tief); margin-top: 0.25rem; }
.karte__pfeil { position: absolute; right: 1rem; top: 50%; translate: 0 -50%; color: var(--akzent); }
/* Ratgeber-Übersicht (/tipps/): breitere Karten, weil der Anrisstext länger ist als eine Adresse */
.karten--ratgeber { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 1.75rem; }
.karte__anriss { font-size: 0.9375rem; line-height: 1.5; color: var(--tinte-leise); }
/* Fahrschul-Liste auf Bezirks-, Ortsteil- und Klassen-Seiten: eine Zeile je Fahrschule (Wunsch des Nutzers, 03.11.2026).
   Die Trennlinien entstehen aus dem 1-px-Abstand auf Linienfarbe, damit sie auch stimmen, wenn der Filter Zeilen ausblendet. */
.karten--liste {
  grid-template-columns: 1fr; gap: 1px; overflow: hidden;
  background: var(--linie); border: 1px solid var(--linie); border-radius: var(--rund-karte);
}
.karten--liste .karte a {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.125rem 1.25rem; align-items: baseline;
  padding: 0.875rem 2.75rem 0.875rem 1.125rem; border-radius: 0; box-shadow: none;
  transition: background-color 0.2s var(--ease);
}
.karten--liste .karte a:hover { background: var(--grund-tief); box-shadow: none; transform: none; }
.karten--liste .karte__name { font-size: 1rem; }
.karten--liste .karte__klassen { margin-top: 0; font-size: 0.8125rem; }
@media (min-width: 760px) {
  .karten--liste .karte a { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); }
  .karten--liste .karte__adresse { grid-column: 2; }
  .karten--liste .karte__klassen { grid-column: 3; }
}
.karten--alle { margin-top: 1.5rem; }
.karte__bezirk { font-size: 0.875rem; color: var(--tinte-leise); }
@media (min-width: 760px) {
  .karten--liste .karte__bezirk { grid-column: 3; }
}

.leer {
  padding: 1.5rem; border-radius: var(--rund-karte); background: var(--grund-tief); line-height: 1.6;
}
.leer__titel { margin: 0; font-weight: 600; }
.leer__anderswo { margin: 0.75rem 0 0; }
.leer__bezirke { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; margin: 0.5rem 0 0; padding: 0; }

.alle-bezirke { background: var(--grund-tief); padding-block: 2.5rem 3rem; }
.alle-bezirke h2 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); font-weight: 700; margin-bottom: 1rem; }
.alle-bezirke .chips { margin: 0; }
.chip--aktuell { background: var(--marke); color: var(--auf-marke); }

/* Klassen-Seite: Bezirks-Spalte links, Fahrschulen nach Bezirk rechts */

.verzeichnis {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 0.75rem 3.5rem;
  grid-template-areas: "kopf" "spalte" "klassen" "gruppen"; /* am Handy: Bezirke vor der langen Klassen-Leiste */
}
.verzeichnis > * { min-width: 0; }
.verzeichnis__kopf { grid-area: kopf; }
.verzeichnis__kopf h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.05; }
.verzeichnis__kopf p { margin: 0.625rem 0 0; color: var(--tinte-leise); font-size: 1.0625rem; max-width: 60ch; }
.verzeichnis__klassen { grid-area: klassen; }
.bezirksspalte { grid-area: spalte; }
.verzeichnis__gruppen { grid-area: gruppen; }

/* Unterklassen ohne Link, mit Anzahl unter der Erklärung */
.fuehrerschein__zeile {
  display: grid; grid-template-columns: 3.5rem 3.75rem minmax(0, 1fr); align-items: center; gap: 0.875rem;
  padding: 0.75rem 0;
}
.fuehrerschein__anzahl { display: block; margin-top: 0.125rem; font-size: 0.8125rem; font-weight: 600; color: var(--akzent-tief); font-variant-numeric: tabular-nums; }

.bezirksspalte__liste { list-style: none; margin: 0; padding: 0; }
.bezirksspalte a { color: var(--tinte); text-decoration: none; transition: background-color 0.2s var(--ease), color 0.2s var(--ease); }
.bezirksspalte__zahl { font-weight: 600; color: var(--akzent-tief); font-variant-numeric: tabular-nums; }
.bezirksspalte a.ist-aktuell { background: var(--marke); color: var(--auf-marke); box-shadow: none; }
.bezirksspalte a.ist-aktuell .bezirksspalte__zahl { color: var(--auf-marke); }

.gruppe { scroll-margin-top: 4.75rem; }
.gruppe + .gruppe { margin-top: 2.5rem; }
.gruppe__titel {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin-bottom: 1rem;
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); font-weight: 700; line-height: 1.2;
}
.gruppe__titel a { color: var(--akzent-tief); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 0.18em; }
.gruppe__titel a:hover { color: var(--akzent); }
.gruppe__titel span { font: 600 0.9375rem/1.4 var(--schrift-text); color: var(--tinte-leise); letter-spacing: 0; }

.verzeichnis__luecke { margin: 2.5rem 0 0; color: var(--tinte-leise); font-size: 0.9375rem; max-width: 65ch; }
/* Wissenswertes auf Bezirks- und Ortsteil-Seiten in Bausteinen (makros.html, wissen_bausteine) */
.wissen { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--linie); }
.wissen h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.15; }
.wissen h3 { font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); line-height: 1.25; }
.wissen p { margin: 0.625rem 0 0; max-width: 66ch; }
.wissen__einstieg { margin-top: 1.5rem; }
.wissen__einstieg > ul:not(.chips) { margin: 0.75rem 0 0; padding-left: 1.25rem; }
.wissen__orte { margin-top: 1rem; }
.wissen__karten { display: grid; gap: 0.875rem; margin-top: 1.75rem; }
@media (min-width: 900px) { .wissen__karten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wissen__karte {
  display: flex; flex-direction: column; padding: 1.375rem;
  background: var(--karte); border-radius: var(--rund-karte); box-shadow: inset 0 0 0 1px var(--linie);
}
.wissen__karte p { font-size: 0.9375rem; line-height: 1.55; color: var(--tinte-leise); }
.wissen__bild { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 0.75rem; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-tief); }
.wissen__bild .ikon { width: 1.25rem; height: 1.25rem; }
.wissen__orteliste { display: grid; gap: 0.5rem; list-style: none; margin: 1rem 0 0; padding: 0.875rem 1rem; border-radius: var(--rund-knopf); background: var(--grund); }
.wissen__orteliste li { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.9375rem; line-height: 1.4; }
.wissen__orteliste .ikon { flex-shrink: 0; width: 0.9rem; height: 0.9rem; color: var(--akzent); translate: 0 0.12em; }
.wissen__link { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: auto; padding-top: 1rem; font-weight: 600; color: var(--akzent-tief); }
.wissen__link .ikon { width: 1rem; height: 1rem; }
.wissen__quellen { margin-top: 1.5rem; font-size: 0.875rem; color: var(--tinte-leise); }
.wissen__quellen summary { cursor: pointer; width: fit-content; }
.wissen__quellen ul { margin: 0.625rem 0 0; padding-left: 1.25rem; }
.wissen__quellen li + li { margin-top: 0.25rem; }
.wissen__stand { margin-top: 1.5rem; font-size: 0.875rem; color: var(--tinte-leise); }

.verzeichnis__wissen { margin-top: 3.5rem; padding-top: 2.5rem; border-top: 1px solid var(--linie); }
.verzeichnis__wissen h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.15; }
.verzeichnis__wissen h3 { margin-top: 2rem; font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.375rem); line-height: 1.25; }
.verzeichnis__wissen p, .verzeichnis__wissen li { max-width: 66ch; }
.verzeichnis__wissen p { margin: 0.75rem 0 0; }
.verzeichnis__wissen ul { margin: 0.75rem 0 0; padding-left: 1.25rem; }
.verzeichnis__wissen li + li { margin-top: 0.375rem; }
.verzeichnis__wissen li::marker { color: var(--akzent); }
.verzeichnis__wissen .verzeichnis__fuss { margin-top: 2rem; font-size: 0.875rem; color: var(--tinte-leise); }
.verzeichnis__wissen .verzeichnis__fuss + .verzeichnis__fuss { margin-top: 0.25rem; }
/* Startseite: Text unter der Bezirkskarte in drei Bausteinen (Schritte, Tipps, Fragen) */
.start-wissen { padding-block: 3.5rem 0; }
.start-wissen h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.15; }
.start-wissen__kopf p { max-width: 60ch; margin: 0.625rem 0 0; color: var(--tinte-leise); }
.start-wissen__titel { margin-top: 3rem; }
.start-wissen h3 { font-size: 1.0625rem; line-height: 1.3; }
.start-wissen__link { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: auto; padding-top: 0.75rem; font-weight: 600; color: var(--akzent-tief); }
.start-wissen__link .ikon { width: 1rem; height: 1rem; }
.start-schritte, .start-tipps { display: grid; gap: 0.875rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
@media (min-width: 720px) { .start-schritte { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 560px) { .start-tipps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .start-tipps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.start-schritt, .start-tipp {
  display: flex; flex-direction: column; gap: 0.375rem; padding: 1.25rem;
  background: var(--karte); border-radius: var(--rund-karte); box-shadow: inset 0 0 0 1px var(--linie);
}
.start-schritt p, .start-tipp p { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--tinte-leise); }
.start-schritt__nr {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: 0.375rem; border-radius: 50%;
  background: var(--marke); color: var(--auf-marke); font: 700 1.0625rem/1 var(--schrift-titel);
}
.start-tipp__bild { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 0.375rem; border-radius: 10px; background: var(--akzent-hell); color: var(--akzent-tief); }
.start-tipp__bild .ikon { width: 1.25rem; height: 1.25rem; }
/* Handy: Piktogramm links neben dem Text, damit die sechs Tipps nicht so lang untereinander stehen */
@media (max-width: 559px) {
  .start-tipp { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.875rem; row-gap: 0.25rem; padding: 1rem; }
  .start-tipp__bild { grid-row: span 2; margin-bottom: 0; }
}
.start-fragen { margin-top: 1.5rem; border-top: 1px solid var(--linie); max-width: 50rem; }
.start-frage { border-bottom: 1px solid var(--linie); }
.start-frage summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 0; cursor: pointer; list-style: none; }
.start-frage summary::-webkit-details-marker { display: none; }
.start-frage summary h3 { margin: 0; }
.start-frage__pfeil { flex-shrink: 0; width: 1.125rem; height: 1.125rem; color: var(--akzent); rotate: 90deg; transition: rotate 0.2s var(--ease); }
.start-frage[open] .start-frage__pfeil { rotate: -90deg; }
.start-frage p { margin: 0; max-width: 65ch; color: var(--tinte-leise); }
.start-frage .start-wissen__link { padding-top: 0.5rem; }
.start-frage[open] { padding-bottom: 1.25rem; }
.start-wissen__stand { margin: 1.5rem 0 0; font-size: 0.875rem; color: var(--tinte-leise); }
.verzeichnis__ratgeber { margin-top: 2.5rem; }
.verzeichnis__ratgeber h2 { font-size: 1.375rem; font-weight: 700; margin-bottom: 1rem; }
.verzeichnis__ratgeber .chips { margin: 0; }

/* Handy: die Spalte wird eine wischbare Chip-Zeile, die oben haftet */
@media (max-width: 899px) {
  .bezirksspalte {
    position: sticky; top: 0; z-index: 2;
    margin-inline: calc(-1 * clamp(16px, 4vw, 40px)); padding-inline: clamp(16px, 4vw, 40px);
    background: var(--grund); box-shadow: 0 1px 0 var(--linie);
  }
  .bezirksspalte h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bezirksspalte__liste {
    display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; padding-block: 0.625rem;
    margin-inline: calc(-1 * clamp(16px, 4vw, 40px)); padding-inline: clamp(16px, 4vw, 40px);
  }
  .bezirksspalte li { flex: none; }
  .bezirksspalte a {
    display: inline-flex; gap: 0.4rem; padding: 0.45rem 0.85rem; border-radius: 999px; white-space: nowrap;
    background: var(--karte); box-shadow: inset 0 0 0 1px var(--linie-kraeftig); font-size: 0.9375rem;
  }
}

/* Desktop: stehende Spalte links, die beim Scrollen mitläuft */
@media (min-width: 900px) {
  .verzeichnis {
    grid-template-columns: 250px minmax(0, 1fr); column-gap: 2rem; row-gap: 1.5rem;
    grid-template-areas: "spalte kopf" "spalte klassen" "spalte gruppen";
  }
  .bezirksspalte {
    position: sticky; top: 1.5rem; align-self: start; display: flex; flex-direction: column;
    max-height: calc(100vh - 3rem); padding: 1.125rem 0.75rem;
    background: var(--karte); border-radius: var(--rund-karte); box-shadow: inset 0 0 0 1px var(--linie);
  }
  .bezirksspalte h2 { font: 600 1rem/1.3 var(--schrift-titel); padding-inline: 0.625rem; margin-bottom: 0.5rem; }
  .bezirksspalte__liste { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .bezirksspalte a {
    display: flex; justify-content: space-between; gap: 0.75rem;
    padding: 0.3rem 0.625rem; border-radius: var(--rund-knopf); font-size: 0.9375rem; /* 22 Bezirke passen bei 900 px Höhe ohne inneres Scrollen */
  }
  .bezirksspalte a:hover { background: var(--akzent-hell); }
  .bezirksspalte a.ist-aktuell:hover { background: var(--marke); }
  .gruppe { scroll-margin-top: 1.5rem; }

  /* Dünne Seiten (höchstens 2 Fahrschulen je Bezirk): Gruppen nebeneinander statt einer Treppe aus Einzelkarten */
  .verzeichnis__gruppen--kompakt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 2rem; align-items: start; }
  .verzeichnis__gruppen--kompakt .gruppe + .gruppe { margin-top: 0; }
  .verzeichnis__gruppen--kompakt .gruppe__titel { font-size: 1.25rem; } /* halbe Breite: Titel sonst schwerer als die Karte darunter */
  .verzeichnis__gruppen--kompakt .karten { grid-template-columns: minmax(0, 1fr); }
  .verzeichnis__gruppen--kompakt .verzeichnis__luecke,
  .verzeichnis__gruppen--kompakt .verzeichnis__wissen,
  .verzeichnis__gruppen--kompakt .verzeichnis__ratgeber { grid-column: 1 / -1; margin-top: 0; }
}

/* Startseite: erst das Fahrzeug, dann der Bezirk; zweiter Reiter „In deiner Nähe“ */

/* Kopf-Band: Standbild, darüber das Video (nur großer Bildschirm), darüber eine Abdunklung für die weiße Schrift.
   Das Standbild ist das erste Bild des Videos: Blendet das Video am Ende aus, beginnt es danach nahtlos von vorn. */
.start-band { position: relative; overflow: hidden; background: var(--fuss-grund); }
/* Ausschnitt unten: dort liegen Brücke und Gleise, oben nur Himmel */
.start-band__bild, .start-band__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%; }
.start-band__video { opacity: 0; transition: opacity 0.8s ease; }
.start-band__video.ist-sichtbar { opacity: 1; }
.start-band::after { content: ""; position: absolute; inset: 0; background: rgb(24 33 36 / 0.7); }
.start-band__text { position: relative; z-index: 1; padding-block: clamp(3.5rem, 12vw, 9rem); }
.start-band h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.05; max-width: 16ch; color: #fff; }
.start-band p { margin: 0.75rem 0 0; color: var(--fuss-text); font-size: 1.0625rem; max-width: 34ch; }
.start-band__pause { position: absolute; z-index: 2; right: 1rem; bottom: 1rem; min-height: 36px; padding: 0.5rem 0.875rem; border: 0; border-radius: var(--rund-knopf); background: rgb(24 33 36 / 0.75); color: #fff; font: 600 0.8125rem/1 var(--schrift-text); cursor: pointer; }
.start-band__pause:hover { background: var(--fuss-grund); }
.start-band :focus-visible { outline-color: var(--akzent-auf-dunkel); }
@media (min-width: 768px) {
  /* Links unter der Schrift kräftig (Kontrast mindestens 4,5:1 auch vor hellem Himmel), rechts bleibt das Bild hell */
  .start-band::after { background: linear-gradient(90deg, rgb(24 33 36 / 0.82) 0%, rgb(24 33 36 / 0.72) 50%, rgb(24 33 36 / 0.3) 100%); }
}

.start { padding-block: 0 3rem; }

.reiter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 1.75rem; }
@media (min-width: 720px) { .reiter { display: flex; } }
.reiter__knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; white-space: nowrap; padding: 0 1rem; border: 0; border-radius: 999px;
  background: var(--karte); color: var(--tinte); box-shadow: inset 0 0 0 1px var(--linie-kraeftig);
  font: 600 0.9375rem/1 var(--schrift-text); cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.reiter__knopf .piktogramm, .reiter__knopf .ikon { width: 1.5rem; height: 1.125rem; color: var(--akzent); }
.reiter__knopf .ikon { width: 1.125rem; }
.reiter__knopf:hover { box-shadow: inset 0 0 0 1px var(--tinte); }
.reiter__knopf[aria-selected="true"] { background: var(--marke); color: var(--auf-marke); box-shadow: none; }
.reiter__knopf[aria-selected="true"] .piktogramm, .reiter__knopf[aria-selected="true"] .ikon { color: var(--auf-marke); }

.tafel { margin-top: 1.5rem; }
.tafel__titel { font-size: 1.375rem; font-weight: 700; margin-bottom: 1rem; }
.tafel--im-reiter .tafel__titel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.tafel--im-reiter { margin-top: 1.25rem; }

/* Fahrzeug-Kacheln: gleiche Piktogramme wie in der Klassen-Leiste */
.fahrzeuge { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
@media (min-width: 720px) { .fahrzeuge { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.875rem; } }
.fahrzeuge li { display: flex; }
.fahrzeug {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "bild code" "name name" "anzahl anzahl";
  align-items: center; gap: 0.5rem 0.75rem; width: 100%; padding: 1rem 1.125rem 1.125rem;
  border: 0; border-radius: var(--rund-karte); background: var(--karte); box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte); text-align: left; text-decoration: none; font: inherit; cursor: pointer;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease), background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.fahrzeug:hover { color: var(--tinte); box-shadow: var(--schatten-heben); transform: translateY(-2px); }
.fahrzeug__bild {
  grid-area: bild; display: grid; place-items: center; width: 3.5rem; height: 2.625rem;
  background: var(--akzent-hell); border-radius: var(--rund-knopf); color: var(--akzent);
}
.fahrzeug__code { grid-area: code; font: 700 1.375rem/1 var(--schrift-titel); letter-spacing: -0.01em; justify-self: end; white-space: nowrap; }
.fahrzeug__name { grid-area: name; margin-top: 0.375rem; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.fahrzeug__anzahl { grid-area: anzahl; font-size: 0.8125rem; font-weight: 600; color: var(--akzent-tief); font-variant-numeric: tabular-nums; }
.fahrzeug[aria-pressed="true"] { background: var(--marke); color: var(--auf-marke); box-shadow: none; transform: none; }
.fahrzeug[aria-pressed="true"] .fahrzeug__bild { background: rgb(255 255 255 / 0.45); color: var(--auf-marke); }
.fahrzeug[aria-pressed="true"] .fahrzeug__anzahl { color: var(--auf-marke); }

/* Link „Zur Bezirksseite …“ in der Nahansicht der Bezirkskarte */
.schritt__alle {
  display: inline-flex; align-items: center; gap: 0.375rem; margin-top: 1.125rem;
  font-weight: 600; color: var(--akzent-tief); text-decoration: underline; text-decoration-thickness: 1.5px;
}
.schritt__alle .ikon { width: 1rem; height: 1rem; }

/* Bezirks-Chips mit Anzahl (Schritt und Band) */
.chip--bezirk { gap: 0.4rem; padding: 0.45rem 0.85rem; background: var(--karte); color: var(--tinte); box-shadow: inset 0 0 0 1px var(--linie-kraeftig); font-size: 0.9375rem; font-weight: 400; }
.chip--bezirk span { font-weight: 600; color: var(--akzent-tief); font-variant-numeric: tabular-nums; }
a.chip--bezirk:hover { background: var(--karte); color: var(--tinte); box-shadow: inset 0 0 0 1px var(--tinte); }

/* In deiner Nähe */
.naehe-start {
  padding: clamp(1.25rem, 3vw, 1.75rem); border-radius: var(--rund-karte); background: var(--karte); box-shadow: inset 0 0 0 1px var(--linie);
}
.naehe-start p { margin: 0 0 1.25rem; max-width: 62ch; }
.naehe-start .knopf { border: 0; cursor: pointer; }
.naehe-start .knopf:disabled { opacity: 0.6; cursor: progress; }
.naehe-start__hinweis { margin: 1.25rem 0 0 !important; font-size: 0.8125rem; color: var(--tinte-leise); }
[data-naehe-status]:not(:empty) { margin-top: 1.25rem; }
.wahl { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; margin: 0 0 1rem; padding: 0.125rem 0.125rem 0.25rem; }
.wahl__knopf {
  display: inline-flex; align-items: center; gap: 0.375rem; flex: none; min-height: 48px; padding: 0 0.85rem; border: 0; border-radius: 999px;
  background: var(--karte); color: var(--tinte); box-shadow: inset 0 0 0 1px var(--linie-kraeftig);
  font: 700 0.9375rem/1 var(--schrift-titel); cursor: pointer;
}
.wahl__knopf .piktogramm { width: 1.4rem; height: 1.05rem; color: var(--akzent); }
.wahl__knopf[aria-pressed="true"] { background: var(--marke); color: var(--auf-marke); box-shadow: none; }
.wahl__knopf[aria-pressed="true"] .piktogramm { color: var(--auf-marke); }
.karte__entfernung { font-size: 0.8125rem; font-weight: 600; color: var(--akzent-tief); font-variant-numeric: tabular-nums; margin-top: 0.25rem; }
.naehe__mehr { margin-top: 1rem; border: 0; cursor: pointer; }
.naehe__bezirke { margin: 0.75rem 0 0; }

/* Karte der Bezirke: echte Grenzen (ALKIS-Ortsteile, zu den alten Bezirken zusammengesetzt), darunter Wald, Grün,
   Wasser, Bahn und Hauptstraßen (ATKIS, Detailnetz); daneben dieselben Links als Liste */
.bezirkskarte, .ortsteilkarte {
  --karte-land: #f9f6f1;   /* etwas heller als der Grund des Bands, damit Berlin sich abhebt */
  --karte-umland: #fbfaf8; /* Fläche hinter den Nachbarbezirken in der Nahansicht */
  --karte-wald: #c4dfb3;
  --karte-gruen: #d3e9c4;
  --karte-wasser: #a9d2f0;
  --karte-grenze: #8f8a84; /* gestrichelte Grenzen, über Wald und Wasser noch sichtbar */
}
.bezirkskarte__innen { display: grid; gap: 1.5rem; align-items: center; }
.bezirkskarte__huelle { position: relative; min-width: 0; }
.bezirkskarte__karte { display: block; width: 100%; height: auto; overflow: hidden; border-radius: var(--rund-karte); } /* beim Hineinzoomen nicht über den Rahmen zeichnen */
.bezirkskarte__karte path { stroke-linejoin: round; vector-effect: non-scaling-stroke; } /* Linien bleiben beim Hineinzoomen gleich dünn */
/* Ganz Berlin steht frei auf dem Grund. Außenkante: Ränder aller Bezirke, darüber nochmals die Flächen (Vorlage) */
.bezirkskarte__land path, .bezirkskarte__land-rand path { fill: var(--karte-land); }
.bezirkskarte__land-rand path { stroke: var(--linie-kraeftig); stroke-width: 3px; }
.bezirkskarte__wald { fill: var(--karte-wald); }
.bezirkskarte__gruen { fill: var(--karte-gruen); }
.bezirkskarte__wasser { fill: var(--karte-wasser); }
.bezirkskarte__bahn, .bezirkskarte__strassenrand, .bezirkskarte__strasse { fill: none; stroke-linecap: round; }
.bezirkskarte__bahn { stroke: #bdb6ae; stroke-width: 1px; }
.bezirkskarte__strassenrand { stroke: #d8d0c5; stroke-width: 2.6px; }
.bezirkskarte__strasse { stroke: #fff; stroke-width: 1.4px; }
/* Bezirke durchsichtig mit gestrichelter Grenze, damit die Ebenen darunter sichtbar bleiben */
.bezirkskarte__karte > a path {
  fill: transparent; stroke: var(--karte-grenze); stroke-width: 1.2px; stroke-dasharray: 5 3;
  transition: fill 0.2s var(--ease);
}
/* Rand um die Schrift in der Landfarbe: Linien laufen nicht durch die Namen */
.bezirkskarte__karte text {
  font: 600 16px/1 var(--schrift-titel); fill: var(--tinte); text-anchor: middle;
  paint-order: stroke; stroke: var(--karte-land); stroke-width: 4px; stroke-linejoin: round;
  transition: fill 0.2s var(--ease), stroke 0.2s var(--ease);
}
.bezirkskarte__karte .bezirkskarte__zahl { font-family: var(--schrift-text); fill: var(--akzent-tief); font-variant-numeric: tabular-nums; }
/* Markiert ist Orange, wie überall auf der Seite; durchscheinend, damit Grün und Wasser sichtbar bleiben */
.bezirkskarte__karte:not(.ist-nah) > a:hover path, .bezirkskarte__karte:not(.ist-nah) > a.ist-hell path { fill: color-mix(in srgb, var(--marke) 35%, transparent); }
.bezirkskarte__karte a.ist-hell text { fill: var(--auf-marke); stroke: var(--marke); }
.bezirkskarte__karte a.ist-hell .bezirkskarte__zahl { fill: var(--auf-marke); }
/* Am Handy ist die Karte zu klein für Namen: sie stehen in der Liste darunter */
@media (max-width: 899px) { .bezirkskarte__namen { display: none; } }

/* Fahrschulen als Punkte: in der Übersicht nur zur Orientierung, nicht anklickbar */
.bezirkskarte__punkte a { pointer-events: none; }
/* Fahrzeug-Filter: unpassende Fahrschulen verschwinden, auch in der Nahansicht */
.bezirkskarte__karte .bezirkskarte__punkte a.ist-aus, .bezirkskarte__karte.ist-nah .bezirkskarte__punkte a.ist-aus { display: none; }
.bezirkskarte__zahl.ist-null { opacity: 0.45; }
.kartenfilter {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: -0.25rem 0 1.25rem;
  padding: 0.75rem 1rem; background: var(--karte); border-radius: var(--rund-knopf); box-shadow: inset 0 0 0 1px var(--linie);
}
.kartenfilter[hidden] { display: none; }
.kartenfilter__text { margin: 0; flex: 1 1 16rem; }
.kartenfilter__text span { color: var(--tinte-leise); }
.kartenfilter__alle { font-weight: 600; }
.kartenfilter__aus {
  min-height: 40px; padding: 0 0.875rem; border: 0; border-radius: var(--rund-knopf); cursor: pointer;
  background: var(--karte); color: var(--tinte); box-shadow: inset 0 0 0 1.5px var(--linie-kraeftig); font: 600 0.9375rem/1 var(--schrift-text);
}
.kartenfilter__aus:hover { box-shadow: inset 0 0 0 1.5px var(--tinte); }
.bezirkskarte__punkte circle { fill: var(--akzent-tief); stroke: var(--karte); stroke-width: 1px; vector-effect: non-scaling-stroke; }

/* Nahansicht eines Bezirks: die anderen treten zurück, die eigenen Fahrschulen werden anklickbar.
   Mit Skript liegt darüber die zoombare Karte; dieses Bild sieht man nur ohne WebGL oder während sie lädt. */
.bezirkskarte__karte.ist-nah { background: var(--karte-umland); }
.bezirkskarte__karte.ist-nah .bezirkskarte__namen { display: none; }
.bezirkskarte__karte.ist-nah > a path { fill: color-mix(in srgb, var(--karte-umland) 80%, transparent); cursor: pointer; }
.bezirkskarte__karte.ist-nah > a:hover path, .bezirkskarte__karte.ist-nah > a.ist-hell path { fill: color-mix(in srgb, var(--akzent-linie) 50%, transparent); }
.bezirkskarte__karte.ist-nah > a.ist-gewaehlt path { fill: transparent; stroke: var(--akzent-tief); stroke-width: 2.5px; stroke-dasharray: none; cursor: default; }
.bezirkskarte__karte.ist-nah .bezirkskarte__punkte a { display: none; }
.bezirkskarte__karte.ist-nah .bezirkskarte__punkte a.ist-im-bezirk { display: inline; pointer-events: auto; cursor: pointer; }
.bezirkskarte__karte.ist-nah .ist-im-bezirk circle { fill: var(--tinte); stroke-width: 2px; }
.bezirkskarte__karte.ist-nah .ist-im-bezirk.ist-hell circle, .bezirkskarte__karte.ist-nah .ist-im-bezirk:hover circle { fill: var(--karte); stroke: var(--tinte); stroke-width: 4px; }

/* Zoombare Karte (bezirkskarte-echt.js): liegt genau über dem Bild. Die Hülle davor, weil MapLibre sonst
   „position: relative“ setzt. */
.bezirkskarte__huelle > .bezirkskarte__echt {
  position: absolute; inset: 0; border-radius: var(--rund-karte); overflow: hidden;
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.bezirkskarte__huelle > .bezirkskarte__echt.ist-da { opacity: 1; }
.bezirkskarte__echt .maplibregl-ctrl-attrib { font-size: 0.6875rem; }
/* Handy: das Bild nimmt die Form des Bezirks an und wird oft flach; die zoombare Karte braucht mehr Höhe */
@media (max-width: 899px) { .bezirkskarte__huelle:has(> .bezirkskarte__echt:not([hidden])) { min-height: 62vh; } }
/* Klick auf einen Punkt: kleine Profil-Karte am Punkt, als Ganzes ein Link (wie die Fahrschul-Karten der Seite) */
.bezirkskarte__zettel .maplibregl-popup-content { padding: 0; border-radius: var(--rund-knopf); box-shadow: var(--schatten-heben); overflow: hidden; }
.bezirkskarte__profil {
  display: grid; grid-template-columns: 1fr auto; column-gap: 0.75rem; padding: 0.7rem 0.9rem;
  color: var(--tinte); text-decoration: none; font: 400 0.8125rem/1.4 var(--schrift-text);
  transition: background-color 0.2s var(--ease);
}
.bezirkskarte__profil strong { font: 600 0.9375rem/1.3 var(--schrift-titel); overflow-wrap: anywhere; }
.bezirkskarte__profil > span { grid-column: 1; color: var(--tinte-leise); }
.bezirkskarte__profil .bezirkskarte__los { margin-top: 0.25rem; font-weight: 600; color: var(--akzent); }
.bezirkskarte__profil .ikon { grid-column: 2; grid-row: 1 / span 3; align-self: center; color: var(--akzent); }
.bezirkskarte__profil:hover, .bezirkskarte__profil:focus-visible { background: var(--marke); }
.bezirkskarte__profil:hover > span, .bezirkskarte__profil:hover .ikon,
.bezirkskarte__profil:focus-visible > span, .bezirkskarte__profil:focus-visible .ikon { color: var(--auf-marke); }

.bezirkskarte__zurueck {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 0.9375rem var(--schrift-text); color: var(--akzent-tief); text-decoration: underline; text-underline-offset: 0.2em;
}
.bezirkskarte__bezirk h3 { font-size: 1.25rem; font-weight: 700; margin-top: 0.25rem; }
.bezirkskarte__bezirk h3:focus { outline: none; }
.bezirkskarte__stand { margin: 0.25rem 0 0.75rem; font-size: 0.875rem; color: var(--tinte-leise); }
.bezirkskarte__schulen { list-style: none; margin: 0 -0.75rem 1rem; padding: 0; } /* Text bündig mit der Überschrift, Markierung darf überstehen */
.bezirkskarte__schulen a {
  display: flex; flex-direction: column; gap: 0.1rem; padding: 0.5rem 0.75rem; border-radius: var(--rund-knopf);
  color: var(--tinte); text-decoration: none; transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.bezirkskarte__name { font: 600 0.9375rem/1.3 var(--schrift-titel); overflow-wrap: anywhere; }
.bezirkskarte__adresse { font-size: 0.8125rem; color: var(--tinte-leise); }
.bezirkskarte__schulen a:hover, .bezirkskarte__schulen a.ist-hell { background: var(--marke); color: var(--auf-marke); }
.bezirkskarte__schulen a:hover .bezirkskarte__adresse, .bezirkskarte__schulen a.ist-hell .bezirkskarte__adresse { color: var(--auf-marke); }

.bezirkskarte__liste {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 0.75rem; list-style: none; margin: 0; padding: 0;
}
.bezirkskarte__liste a {
  display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0 0.75rem;
  border-radius: var(--rund-knopf); color: var(--tinte); text-decoration: none; font-size: 0.9375rem;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.bezirkskarte__liste .bezirkskarte__zahl { font-weight: 600; color: var(--akzent-tief); font-variant-numeric: tabular-nums; }
.bezirkskarte__liste a:hover, .bezirkskarte__liste a.ist-hell, .bezirkskarte__liste a.ist-gewaehlt { background: var(--marke); color: var(--auf-marke); }
.bezirkskarte__liste a:hover .bezirkskarte__zahl, .bezirkskarte__liste a.ist-hell .bezirkskarte__zahl,
.bezirkskarte__liste a.ist-gewaehlt .bezirkskarte__zahl { color: var(--auf-marke); }
/* Handy: zwei Spalten, die von oben nach unten alphabetisch laufen */
@media (max-width: 899px) { .bezirkskarte__liste { grid-auto-flow: column; grid-template-rows: repeat(11, auto); margin-inline: -0.75rem; } }
.bezirkskarte__quelle { margin: 1.25rem 0 0; font-size: 0.8125rem; color: var(--tinte-leise); }

/* Bezirksseite: Ausschnitt der Stadtkarte mit den amtlichen Ortsteilen. Ebenen, Linien und Punkte wie die
   Karte der Startseite in der Nahansicht; daneben die Ortsteile als Liste mit denselben Zielen. */
.bezirk__einleitung { margin: 1.25rem 0 0; color: var(--tinte-leise); font-size: 1.0625rem; max-width: 65ch; }
.ortsteilkarte {
  margin-top: 1.75rem; padding: clamp(1rem, 0.5rem + 1.6vw, 1.75rem); background: var(--grund-tief); border-radius: var(--rund-karte);
}
.ortsteilkarte h2 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.ortsteilkarte__innen { display: grid; gap: 1.25rem; align-items: start; }
/* Feste Höhe, volle Breite: das Bild füllt den Rahmen (slice), der Ausschnitt ist dafür um den Bezirk erweitert */
.ortsteilkarte__karte { display: block; width: 100%; height: 24rem; border-radius: var(--rund-knopf); background: var(--karte-umland); }
.ortsteilkarte__karte path { stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* Nachbarn und Straßen kommen per <use>: die Farbe muss am <use> stehen, CSS erreicht die Kopie nicht direkt */
.ortsteilkarte__land path, .ortsteilkarte__land use { fill: var(--karte-land); }
/* Nachbarn treten zurück wie in der Nahansicht der Startseite; der Bezirk selbst trägt helles Orange */
.ortsteilkarte__nachbarn use { fill: color-mix(in srgb, var(--linie) 70%, transparent); }
/* Ortsteile durchscheinend mit gestrichelter Grenze, damit Wald und Wasser sichtbar bleiben; markiert wird Orange */
.ortsteilkarte__flaeche path {
  fill: color-mix(in srgb, var(--akzent-hell) 60%, transparent); stroke: var(--karte-grenze); stroke-width: 1.2px; stroke-dasharray: 5 3;
  cursor: pointer; transition: fill 0.2s var(--ease);
}
.ortsteilkarte__flaeche:hover path { fill: color-mix(in srgb, var(--marke) 45%, transparent); }
.ortsteilkarte__flaeche--allein path, .ortsteilkarte__flaeche--allein:hover path { cursor: default; fill: color-mix(in srgb, var(--akzent-hell) 60%, transparent); }
.ortsteilkarte__punkte circle { fill: var(--akzent-tief); stroke: var(--karte); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
/* Rand um die Schrift in der Landfarbe, im Verhältnis zur Schriftgröße (die Ausschnitte sind verschieden groß) */
.ortsteilkarte__namen text {
  font-family: var(--schrift-titel); font-weight: 600; fill: var(--tinte); text-anchor: middle;
  paint-order: stroke; stroke: color-mix(in srgb, var(--akzent-hell) 60%, var(--karte-land)); stroke-width: 0.25em; stroke-linejoin: round;
}
.ortsteilkarte__namen text.ist-klein { font-size: 0.8em; } /* enge Ortsteile mit Fahrschulen behalten so ihren Namen */
.ortsteilkarte__namen .ortsteilkarte__zahl { font-family: var(--schrift-text); font-size: 0.85em; fill: var(--akzent-tief); font-variant-numeric: tabular-nums; }
/* Am Handy ist die Karte zu klein für Namen: sie stehen in der Liste darunter */
@media (max-width: 899px) {
  .ortsteilkarte__namen { display: none; }
  .ortsteilkarte__karte { height: 40vh; }
}
.ortsteilkarte__liste {
  display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; list-style: none; margin: 0; padding: 0.125rem 0.125rem 0.25rem;
}
.ortsteilkarte__liste li { flex: none; }
.ortsteilkarte__liste a {
  display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; min-height: 48px; padding: 0 0.85rem;
  border-radius: 999px; background: var(--karte); box-shadow: inset 0 0 0 1px var(--linie-kraeftig); white-space: nowrap;
  color: var(--tinte); text-decoration: none; font-size: 0.9375rem;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.ortsteilkarte__liste .ortsteilkarte__zahl { font-weight: 600; color: var(--akzent-tief); font-variant-numeric: tabular-nums; }
.ortsteilkarte__liste .ortsteilkarte__zahl.ist-null { font-weight: 400; color: var(--tinte-leise); } /* Ortsteile mit Fahrschulen fallen zuerst ins Auge */
.ortsteilkarte__liste a:hover { background: var(--marke); color: var(--auf-marke); box-shadow: none; }
.ortsteilkarte__liste a:hover .ortsteilkarte__zahl { color: var(--auf-marke); }
.ortsteilkarte__lizenz { margin: 0 0 2rem; font-size: 0.8125rem; color: var(--tinte-leise); max-width: 75ch; }
.ortsteilkarte__quelle { margin: 1rem 0 0; font-size: 0.8125rem; color: var(--tinte-leise); max-width: 75ch; }
/* Nach dem Filtern ohne Treffer: Fläche, Name und Listenzeile treten zurück und sind nicht anklickbar */
.ortsteilkarte .ist-weggefiltert { pointer-events: none; opacity: 0.45; }
.ortsteil { scroll-margin-top: 1.5rem; }
/* Die Trefferzeile ist eine Statuszeile, keine Dachzeile über dem ersten Ortsteil */
.treffer__zeile + .ortsteil { margin-top: 1.75rem; }
/* Angesprungener Ortsteil: gewählt ist Orange */
.ortsteil:target > .gruppe__titel { background: var(--akzent-hell); border-radius: var(--rund-knopf); margin-inline: -0.5rem; padding: 0.25rem 0.5rem; }
.ortsteil__hinweis { margin: -0.5rem 0 1rem; font-size: 0.875rem; color: var(--tinte-leise); }
.treffer .verzeichnis__luecke :target { color: var(--tinte); font-weight: 600; }
.bezirk__wissen { margin-bottom: 3.5rem; }
@media (min-width: 900px) {
  .ortsteilkarte__innen { grid-template-columns: minmax(0, 1fr) 240px; gap: 2rem; }
  .ortsteilkarte__innen--allein { grid-template-columns: minmax(0, 1fr); }
  .ortsteilkarte__liste { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; overflow: visible; margin: 0; padding: 0; }
  .ortsteilkarte__liste a { min-height: 34px; padding: 0.125rem 0.75rem; border-radius: var(--rund-knopf); background: none; box-shadow: none; }
}
/* Desktop: die Karte bekommt fast die ganze Breite, die Liste eine schmale Spalte daneben */
@media (min-width: 900px) {
  .bezirkskarte__innen { grid-template-columns: minmax(0, 1fr) 260px; gap: 2.5rem; }
  /* Lange Bezirke (Neukölln: 27) scrollen in sich, damit die Liste nicht weit unter die Karte reicht */
  .bezirkskarte__schulen { max-height: 30rem; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .bezirkskarte__liste { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .bezirkskarte__liste a { min-height: 31px; padding-block: 0.125rem; }
}

.start__ratgeber { padding-block: 2.5rem 3.5rem; }
.start__ratgeber h2 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem); font-weight: 700; margin-bottom: 1rem; }
.start__ratgeber .chips { margin: 0; }
.start__ratgeber .chip--bezirk { min-height: 48px; padding-inline: 1rem; }

/* Einfache Seiten (Listen, Inhalt) bis zu ihrer eigenen Gestaltung */

.seite { padding-block: 2.5rem 4rem; }
.seite h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.15; margin-bottom: 1rem; }
.seite__einleitung { color: var(--tinte-leise); max-width: 65ch; }
.linkliste {
  display: grid; gap: 0.5rem; list-style: none; margin: 1.5rem 0 0; padding: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}
.linkliste a {
  display: block; padding: 0.875rem 1rem; border-radius: 12px;
  background: var(--karte); box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte); font-weight: 500; text-decoration: none; overflow-wrap: anywhere;
}
.linkliste a:hover { box-shadow: inset 0 0 0 1.5px var(--akzent); color: var(--akzent-tief); }

/* Übersichten mit Fotokacheln (Bezirke, Führerscheinklassen), Aufbau wie die Fahrzeug-Kacheln der Startseite */

.bildkacheln {
  display: grid; gap: 0.75rem; list-style: none; margin: 1.5rem 0 0; padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) { .bildkacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.875rem; } }
@media (min-width: 1000px) { .bildkacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.bildkacheln li { display: flex; }
.bildkachel {
  display: flex; flex-direction: column; width: 100%; overflow: hidden;
  border-radius: var(--rund-karte); background: var(--karte); box-shadow: inset 0 0 0 1px var(--linie);
  color: var(--tinte); text-decoration: none;
  transition: box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}
.bildkachel:hover { color: var(--tinte); box-shadow: var(--schatten-heben); transform: translateY(-2px); }
/* overflow: hidden hält das Seitenverhältnis, auch wenn ein Foto höher ist als 3:2 */
.bildkachel__bild { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--grund-tief); }
.bildkachel__bild img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bildkachel__name { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; padding: 0.75rem 1rem 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.bildkachel__code { font: 700 1.125rem/1 var(--schrift-titel); white-space: nowrap; }
.bildkachel__anzahl { padding: 0.125rem 1rem 0.875rem; font-size: 0.8125rem; font-weight: 600; color: var(--akzent-tief); font-variant-numeric: tabular-nums; }

.bildnachweis { margin-top: 2.5rem; font-size: 0.875rem; color: var(--tinte-leise); }
.bildnachweis summary { cursor: pointer; width: fit-content; }
.bildnachweis ul { margin: 0.75rem 0 0; padding: 0; list-style: none; columns: 16rem; column-gap: 2rem; }
.bildnachweis li { margin-bottom: 0.25rem; break-inside: avoid; }
.bildnachweis a { color: var(--akzent); }

/* Inhaltsseite: Ratgeber-Artikel als Strecke mit Haltepunkten an einer Fahrbahn; Rechtsseiten schlicht (inhalt.html) */

.artikel {
  --halt: 2.5rem; --bahn: 0.875rem; --einzug: 3rem; --station-abstand: 2.5rem;
  padding-block: 1.25rem 4rem;
}
.artikel__bild { position: relative; margin: 0 0 1.5rem; border-radius: var(--rund-karte); overflow: hidden; aspect-ratio: 3 / 2; background: var(--grund-tief); }
.artikel__bild img { display: block; width: 100%; height: 100%; object-fit: cover; }
.artikel__bild figcaption { position: absolute; right: 0.625rem; bottom: 0.625rem; }
.artikel__bild figcaption a {
  display: block; padding: 0.25rem 0.625rem; border-radius: 999px;
  background: color-mix(in srgb, var(--fuss-grund) 72%, transparent); color: var(--karte); font-size: 0.75rem; text-decoration: none;
}
.artikel__bild figcaption a:hover { background: var(--fuss-grund); color: var(--karte); text-decoration: underline; }
.artikel__raster { display: flex; flex-direction: column; gap: 1.5rem; }
.artikel__kopf h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); line-height: 1.05; max-width: 18ch; }
.artikel__einleitung { margin: 0.875rem 0 0; color: var(--tinte-leise); font-size: 1.0625rem; max-width: 60ch; }
.artikel__text > p, .station p, .station li { max-width: 66ch; }
.artikel__fuss { margin: 2.5rem 0 0; font-size: 0.875rem; color: var(--tinte-leise); }
.artikel__fuss + .artikel__fuss { margin-top: 0.25rem; }

/* Abschnitte; in Artikeln Haltepunkte an der Fahrbahn links vom Text */
.station { position: relative; scroll-margin-top: 1.5rem; }
.station + .station { margin-top: var(--station-abstand); }
.station h2 { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem); line-height: 1.2; }
.station p { margin: 0.75rem 0 0; }
.station ul { margin: 0.75rem 0 0; padding-left: 1.25rem; }
.station li + li { margin-top: 0.375rem; }
.station li::marker { color: var(--akzent); }
.strecke { padding-left: var(--einzug); }
.strecke .station { --halt-oben: 0rem; }
.strecke .station h2 { min-height: var(--halt); padding-top: calc((var(--halt) - 1.2em) / 2); }
.station__halt {
  position: absolute; z-index: 1; top: var(--halt-oben); left: calc(-1 * var(--einzug));
  display: grid; place-items: center; width: var(--halt); height: var(--halt); border-radius: 50%;
  /* Ring in der Fahrbahn-Farbe: Der Haltepunkt liegt auf der Straße, die Bahn läuft sichtbar bis an ihn heran */
  border: 3px solid var(--tinte); background: var(--marke); color: var(--auf-marke);
  font: 700 1.0625rem/1 var(--schrift-titel); font-variant-numeric: tabular-nums;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
/* Fahrbahn: je Abschnitt ein Stück vom eigenen Haltepunkt bis zum nächsten, mit gestrichelter Mittellinie */
.strecke .station:not(.station--ziel)::before,
.strecke .station:not(.station--ziel)::after {
  content: ""; position: absolute; top: calc(var(--halt-oben) + var(--halt) / 2);
  height: calc(100% - var(--halt) / 2 + var(--station-abstand) + var(--naechster-halt, 0rem) + var(--halt) / 2);
}
.strecke .station:not(.station--ziel)::before {
  left: calc(-1 * var(--einzug) + (var(--halt) - var(--bahn)) / 2); width: var(--bahn); background: var(--tinte);
}
.strecke .station:not(.station--ziel)::after {
  left: calc(-1 * var(--einzug) + var(--halt) / 2 - 1px); width: 2px;
  background: repeating-linear-gradient(to bottom, var(--grund) 0 0.625rem, transparent 0.625rem 1.25rem);
}
.strecke .station:has(+ .station--ziel) { --naechster-halt: 1.25rem; }
/* Mit Skript: noch nicht erreichte Haltepunkte sind weiß, erreichte orange (ohne Skript alle orange) */
.strecke--laeuft .station:not(.ist-erreicht) .station__halt { background: var(--karte); color: var(--tinte); }

/* Letzter Halt: das Ziel der Strecke */
.strecke .station--ziel { --halt-oben: 1.25rem; padding: 1.25rem clamp(1rem, 3vw, 1.75rem) 1.5rem; border-radius: var(--rund-karte); background: var(--akzent-hell); }
.station--ziel .knopf { margin-top: 1.125rem; text-align: left; text-wrap: balance; }
.station--ziel .knopf .ikon { width: 1.25rem; height: 1.25rem; }
.station__wege { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.station__wege .knopf { margin-top: 0.375rem; }

/* „Deine Strecke“: alle Stationen als Sprungliste; mit Skript ist die gerade gelesene Station orange */
.strecke-karte { border-radius: var(--rund-karte); background: var(--karte); box-shadow: inset 0 0 0 1px var(--linie); padding: 1.125rem 0.75rem 0.875rem; }
.strecke-karte h2 { font: 600 1rem/1.3 var(--schrift-titel); padding: 0 0.5rem; margin-bottom: 0.5rem; }
.strecke-karte ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.strecke-karte a {
  display: grid; grid-template-columns: 1.75rem 1fr; align-items: baseline; padding: 0.5rem 0.625rem; border-radius: var(--rund-knopf);
  color: var(--tinte); text-decoration: none; font-size: 0.9375rem; line-height: 1.35;
  transition: background-color 0.2s var(--ease);
}
.strecke-karte a:hover { background: var(--akzent-hell); color: var(--tinte); }
.strecke-karte__nr { font: 700 0.9375rem/1 var(--schrift-titel); color: var(--akzent-tief); font-variant-numeric: tabular-nums; }
.strecke-karte a.ist-aktuell { background: var(--marke); }
.strecke-karte a.ist-aktuell .strecke-karte__nr { color: var(--auf-marke); }

@media (min-width: 720px) {
  .artikel { --halt: 2.75rem; --bahn: 1.125rem; --einzug: 4.25rem; --station-abstand: 2.75rem; }
  .artikel__bild { aspect-ratio: 21 / 8; margin-bottom: 2.25rem; }
  .artikel__einleitung { font-size: 1.125rem; }
}
@media (min-width: 1000px) {
  /* Bild niedriger, damit die Strecke mit Haltepunkt 1 schon im ersten Bildschirm beginnt */
  .artikel__bild { aspect-ratio: 4 / 1; }
  /* Nur Artikel mit Strecke bekommen Fahrbahn-Rinne und Karten-Spalte; Rechts- und Platzhalterseiten bleiben eine Spalte */
  .artikel__raster--strecke {
    display: grid; grid-template-columns: var(--einzug) minmax(0, 42rem) minmax(2.5rem, 1fr) 16.25rem;
    grid-template-rows: auto 1fr; gap: 2.25rem 0; /* Luft zur Karte kommt aus der dritten Spalte */
  }
  .artikel__raster--strecke .artikel__kopf { grid-column: 2 / 4; grid-row: 1; }
  .artikel__raster--strecke .artikel__text { grid-column: 1 / 3; grid-row: 2; }
  .strecke-karte { grid-column: 4; grid-row: 1 / 3; align-self: start; position: sticky; top: 1.5rem; }
}

/* Fuß */

.fuss { background: var(--fuss-grund); color: var(--fuss-text); padding-block: 3rem; }
.fuss__innen { display: grid; gap: 2rem; }
@media (min-width: 760px) { .fuss__innen { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.fuss__marke p { color: var(--fuss-leise); font-size: 0.9375rem; max-width: 32ch; margin: 0.75rem 0 0; }
.fuss__spalte { display: flex; flex-direction: column; gap: 0.5rem; }
.fuss__spalte h2 { font: 600 0.875rem/1.3 var(--schrift-text); color: var(--fuss-leise); letter-spacing: 0; margin-bottom: 0.25rem; }
.fuss__spalte a { color: var(--fuss-text); text-decoration: none; font-size: 0.9375rem; }
.fuss__spalte a:hover { text-decoration: underline; color: #fff; }
.fuss :focus-visible { outline-color: var(--akzent-auf-dunkel); }
.fuss__knopf { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--fuss-text); font: inherit; font-size: 0.9375rem; text-align: left; cursor: pointer; }
.fuss__knopf:hover { text-decoration: underline; color: #fff; }
.fuss__knopf[hidden] { display: none; }

/* Einwilligung für Werbung: verdeckt die Seite bis zur Wahl, auf Rechtsseiten nur Leiste unten */
.einwilligung[hidden] { display: none; }
.einwilligung { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 16px; background: rgb(33 44 47 / 0.6); }
.einwilligung[data-modus="leiste"] { inset: auto 0 0 0; place-items: end center; background: none; pointer-events: none; }
.einwilligung__karte {
  pointer-events: auto; width: min(100%, 34rem); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: clamp(1.25rem, 4vw, 1.75rem); background: var(--karte); border-radius: var(--rund-karte); box-shadow: var(--schatten-heben);
}
.einwilligung[data-modus="leiste"] .einwilligung__karte { box-shadow: 0 0 0 1px var(--linie), var(--schatten-heben); }
.einwilligung__titel { font-size: 1.25rem; font-weight: 700; }
.einwilligung__titel:focus { outline: none; }
.einwilligung__text { margin: 0.625rem 0 1.25rem; color: var(--tinte-leise); font-size: 0.9375rem; line-height: 1.55; }
.einwilligung__knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
/* Beide Knöpfe gleich gestaltet: Ablehnen darf nicht schwerer zu finden sein als Zustimmen (DSK, OH Digitale Dienste, Rn. 58 f.) */
.einwilligung__knopf {
  min-height: 48px; padding: 0 1rem; border: 0; border-radius: var(--rund-knopf); cursor: pointer;
  background: var(--karte); color: var(--tinte); box-shadow: inset 0 0 0 1.5px var(--tinte);
  font: 600 1rem/1 var(--schrift-text); letter-spacing: 0.01em;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.einwilligung__knopf:hover { background: var(--tinte); color: #fff; }
.einwilligung__links { margin: 1rem 0 0; font-size: 0.875rem; color: var(--tinte-leise); }
html.einwilligung-offen { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Hauptbereich füllt die Höhe, damit der Fuß bei kurzen Seiten unten abschließt */
main { flex: 1 0 auto; }

.seite__zwischentitel { font-size: 1.375rem; font-weight: 700; margin: 2.5rem 0 0; }
.fuss__projekt a { color: var(--fuss-text); }
.fuss__projekt a:hover { color: #fff; }

/* Profil in Prüfung: nur Name, Hinweis und Wege weiter */
.infokarte--pruefung { max-width: 40rem; margin-bottom: 4rem; }
.pruefung__wege { display: grid; gap: 0.5rem; list-style: none; margin: 1.25rem 0 0; padding: 0; font-weight: 600; }
