/* Fahrplan b "Netzplan": die Seite als Liniennetz-Heft. Hell, feine Linien,
   Linienfarben als Leitsystem: L Orange, W Anthrazit, R hohl (S-Bahn-Art). */
:root {
  --schwarz: #1c1c1b;
  --text: #1c1c1b;
  --anthrazit: #585856;
  --grau: #f3f4f4;
  --papier: #f5f6f6;
  --linie: #dadad6;
  --linie-dunkel: #33332f;
  --hell: #f4f4f1;
  --hell-2: #bdbdb8;
  --L: var(--ec-orange);
  --W: #585856;
  --R: #1c1c1b;
  --F: #c0c0c0;
  --rand: clamp(20px, 4.5vw, 64px);
  --max: 1320px;
  --kopf-hoehe: 76px;
}

html { scroll-padding-top: calc(var(--kopf-hoehe) + 12px); }
body { background: #fff; color: var(--text); font-size: 18px; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
figure { margin: 0; }
img { width: 100%; }
[hidden] { display: none !important; }

.rahmen { width: 100%; max-width: calc(var(--max) + 2 * var(--rand)); margin-inline: auto; padding-inline: var(--rand); }
.sprung { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--schwarz); color: #fff; padding: 12px 16px; text-decoration: none; }
.sprung:focus { top: 12px; }

/* Knoepfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 14px 28px; background: var(--L); color: var(--schwarz); font-weight: 600; font-size: 18px; line-height: 1.2; text-decoration: none; border: 2px solid var(--L); border-radius: 999px; transition: background-color .15s, border-color .15s, color .15s; text-align: center; }
.knopf:hover { background: #ffb81c; border-color: #ffb81c; }
.knopf-linie { background: transparent; border-color: var(--schwarz); color: var(--schwarz); }
.knopf-linie:hover { background: var(--schwarz); border-color: var(--schwarz); color: #fff; }
.knopf-klein { min-height: 46px; padding: 10px 20px; font-size: 17px; }
.knopf-gross { min-height: 64px; font-size: 20px; width: 100%; }
.textlink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--schwarz); text-decoration: underline; text-decoration-color: var(--L); text-decoration-thickness: 3px; text-underline-offset: 0.3em; }
.textlink:hover { text-decoration-color: var(--schwarz); }

/* Linien-Badges wie an der Haltestelle */
.badge { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 36px; height: 30px; padding: 0 8px; border-radius: 7px; font-size: 17px; font-weight: 700; line-height: 1; letter-spacing: 0.02em; }
.badge-L { background: var(--L); color: var(--schwarz); }
.badge-W { background: var(--W); color: #fff; }
.badge-R { background: #fff; color: var(--schwarz); box-shadow: inset 0 0 0 3px var(--R); }
.badge-LT { background: #fff; color: var(--schwarz); box-shadow: inset 0 0 0 3px var(--L); }
.badge-F { background: var(--F); color: var(--schwarz); }
.badge-gross { min-width: 58px; height: 50px; border-radius: 10px; font-size: 28px; }
.badge-mini { min-width: 26px; height: 22px; font-size: 13px; border-radius: 5px; padding: 0 5px; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: calc(var(--max) + 2 * var(--rand)); margin-inline: auto; padding-inline: var(--rand); height: var(--kopf-hoehe); display: flex; align-items: center; gap: 32px; }
.kopf-logo { display: block; flex: none; }
.kopf-logo img { width: 150px; height: auto; }
.hauptnav { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hauptnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.hauptnav ul a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-weight: 500; font-size: 17px; }
.hauptnav ul a:hover { text-decoration: underline; text-decoration-color: var(--L); text-decoration-thickness: 3px; text-underline-offset: 0.4em; }
.kopf-aktion { display: flex; align-items: center; gap: 20px; }
.kopf-telefon { font-weight: 600; text-decoration: none; white-space: nowrap; display: flex; align-items: center; min-height: 44px; font-variant-numeric: tabular-nums; }
.menue-knopf { display: none; }
@media (max-width: 1240px) { .kopf-telefon { display: none; } }
@media (max-width: 1060px) {
  .kopf-innen { justify-content: space-between; }
  .kopf-logo img { width: 128px; }
  .menue-knopf { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; margin-right: -8px; background: none; border: 0; font: inherit; font-weight: 600; color: var(--schwarz); cursor: pointer; }
  .menue-striche { position: relative; width: 22px; height: 2px; background: currentColor; }
  .menue-striche::before, .menue-striche::after { content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: currentColor; transition: transform .2s; }
  .menue-striche::before { top: -7px; }
  .menue-striche::after { top: 7px; }
  .menue-knopf[aria-expanded="true"] .menue-striche { background: transparent; }
  .menue-knopf[aria-expanded="true"] .menue-striche::before { transform: translateY(7px) rotate(45deg); }
  .menue-knopf[aria-expanded="true"] .menue-striche::after { transform: translateY(-7px) rotate(-45deg); }
  .hauptnav { display: none; position: absolute; left: 0; right: 0; top: var(--kopf-hoehe); background: #fff; border-bottom: 1px solid var(--linie); padding: 8px var(--rand) 24px; flex-direction: column; align-items: stretch; gap: 16px; max-height: calc(100vh - var(--kopf-hoehe)); overflow-y: auto; }
  .hauptnav.offen { display: flex; }
  .hauptnav ul { flex-direction: column; gap: 0; }
  .hauptnav ul a { min-height: 56px; padding: 0; font-size: 22px; border-bottom: 1px solid var(--linie); }
  .kopf-aktion { flex-direction: column; align-items: stretch; gap: 8px; }
  .kopf-telefon { display: flex; font-size: 20px; }
  .kopf-aktion .knopf { min-height: 56px; }
}
@media (max-width: 699px) { :root { --kopf-hoehe: 64px; } .kopf-logo img { width: 116px; } }

/* ---------- Hero: der Netzplan ---------- */
.hero {
  display: grid;
  grid-template-columns: [voll-start] minmax(var(--rand), 1fr) [text-start] minmax(0, calc(var(--max) * .39)) [karte-start] minmax(0, calc(var(--max) * .61)) minmax(var(--rand), 1fr) [voll-ende];
  grid-template-rows: 1fr auto auto 1fr;
  min-height: min(calc(100vh - var(--kopf-hoehe)), 880px);
  border-bottom: 1px solid var(--linie);
}
.hero-titel { grid-column: text-start / karte-start; grid-row: 2; padding: 40px clamp(28px, 3.4vw, 56px) 0 0; }
.hero-rest { grid-column: text-start / karte-start; grid-row: 3; padding: 26px clamp(28px, 3.4vw, 56px) 48px 0; }
.hero h1 { font-size: clamp(2.9rem, 4.7vw, 4.9rem); font-weight: 600; line-height: .98; letter-spacing: -0.035em; }
.hero-lead { font-size: clamp(1.15rem, 1.4vw, 1.35rem); line-height: 1.45; color: var(--anthrazit); max-width: 32em; }
.hero-info { margin: 28px 0 0; border-top: 2px solid var(--schwarz); }
.hero-info > div { display: grid; grid-template-columns: 128px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--linie); align-items: baseline; }
.hero-info dt { color: var(--anthrazit); font-size: 17px; }
.hero-info dd { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.35; }
.hero-naechster dd { font-weight: 600; display: flex; align-items: baseline; gap: 10px; }
.hero-naechster dd::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--L); transform: translateY(-2px); }
.hero-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-hinweis { margin-top: 14px; font-size: 17px; color: var(--anthrazit); }

.hero-karte { grid-column: karte-start / voll-ende; grid-row: 1 / -1; position: relative; display: flex; flex-direction: column; background-color: var(--papier); background-image: radial-gradient(circle at 1px 1px, #d9dbdb 1.2px, transparent 1.3px); background-size: 28px 28px; border-left: 1px solid var(--linie); }
.karte-flaeche { flex: 1; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 2vw, 28px) clamp(16px, 2.4vw, 40px) clamp(20px, 2.4vw, 32px) clamp(20px, 2.4vw, 36px); }
.netz { display: block; width: 100%; height: auto; overflow: visible; }
.netz-quer { max-width: 980px; max-height: calc(min(100vh - var(--kopf-hoehe), 880px) - 110px); }
.netz-hoch { display: none; }
.legende { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 16px clamp(24px, 3vw, 48px); border-bottom: 1px solid var(--linie); background: rgba(255,255,255,.72); font-size: 17px; font-weight: 500; }
.legende-titel { font-weight: 600; margin-right: 4px; }
.legende-eintrag { display: inline-flex; align-items: center; gap: 10px; }

/* Netz: Linien, Stationen, Beschriftung */
.lin { fill: none; stroke-linejoin: round; stroke-linecap: butt; }
.netz-quer .lin { stroke-width: 9px; }
.netz-hoch .lin { stroke-width: 8px; }
.lin-L { stroke: var(--L); }
.lin-W { stroke: var(--W); }
.lin-R { stroke: var(--R); }
.netz .lin-R-innen { stroke: #fff; stroke-width: 3.4px; }
.st { fill: #fff; stroke: var(--schwarz); stroke-width: 4px; }
.st-stadt { stroke-width: 5px; }
.st-halt { stroke-width: 3.5px; }
.ziel-ring { fill: var(--L); stroke: var(--schwarz); stroke-width: 6px; }
.ziel-kern { fill: var(--schwarz); }
.ziel-puls { fill: none; stroke: var(--L); stroke-width: 4px; opacity: 0; }
.bs { font-family: "Jost", system-ui, sans-serif; font-size: 17px; font-weight: 600; fill: var(--schwarz); paint-order: stroke; stroke: var(--papier); stroke-width: 6px; stroke-linejoin: round; }
.bs-stadt { font-size: 23px; font-weight: 700; letter-spacing: -0.01em; }
.bs-klein { font-size: 14px; font-weight: 500; fill: #4a4a48; }
.bs-ziel { font-size: 27px; font-weight: 700; letter-spacing: -0.01em; }
.netz-hoch .bs { font-size: 15px; }
.netz-hoch .bs-stadt { font-size: 16.5px; }
.netz-hoch .bs-klein { font-size: 13px; }
.netz-hoch .bs-ziel { font-size: 21px; }
.fahrweg { fill: none; stroke: none; }
.zug { opacity: 0; transition: opacity .4s; }
.zug.faehrt { opacity: 1; }
.zug rect { stroke-width: 2.5px; }
.zug-L rect { fill: var(--L); stroke: var(--schwarz); }
.zug-L .zug-fenster, .zug-R .zug-fenster { fill: var(--schwarz); stroke: none; }
.zug-W rect { fill: var(--W); stroke: #fff; }
.zug-W .zug-fenster { fill: #fff; stroke: none; }
.zug-R rect { fill: #fff; stroke: var(--schwarz); }

/* Aufbau des Netzes beim Laden: Linien zeichnen, Stationen springen auf */
.js .netz .lin { stroke-dasharray: 1 1; animation: zeichnen var(--d) cubic-bezier(.55,0,.35,1) var(--t) both; }
.js .netz .st { transform-box: fill-box; transform-origin: center; animation: auftauchen .45s cubic-bezier(.3,1.5,.5,1) var(--t) both; }
.js .netz .bs { animation: einblenden .5s ease var(--t) both; }
.ziel-puls { transform-box: fill-box; transform-origin: center; animation: puls 2.4s ease-out 3.4s infinite; }
@keyframes zeichnen { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes auftauchen { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
@keyframes puls { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(2.2); } }

@media (max-width: 959px) {
  .hero { grid-template-columns: var(--rand) minmax(0, 1fr) var(--rand); grid-template-rows: auto auto auto; min-height: 0; }
  .hero-titel { grid-column: 2; grid-row: 1; padding: 26px 0 18px; }
  .hero h1 { font-size: clamp(2.5rem, 11.4vw, 4.4rem); }
  .hero-karte { grid-column: 1 / -1; grid-row: 2; border-left: 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
  .karte-flaeche { padding: 14px 12px 10px; }
  .legende { order: 2; justify-content: center; gap: 6px 14px; padding: 10px var(--rand) 12px; font-size: 15px; border-bottom: 0; border-top: 1px solid var(--linie); }
  .legende-titel { display: none; }
  .legende .badge { min-width: 30px; height: 26px; font-size: 15px; }
  .legende-eintrag { gap: 7px; }
  .hero-rest { grid-column: 2; grid-row: 3; padding: 26px 0 44px; }
  .hero-info > div { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
  .hero-knoepfe { flex-direction: column; }
  .hero-knoepfe .knopf { width: 100%; }
}
@media (min-width: 600px) and (max-width: 959px) { .hero-info > div { grid-template-columns: 150px 1fr; gap: 16px; } .netz-quer { max-height: none; } }
@media (max-width: 599px) {
  .netz-quer { display: none; }
  .netz-hoch { display: block; max-width: 420px; max-height: min(500px, calc(100svh - 318px)); min-height: 400px; }
}

/* Kennzahlen */
.kennzahlen { border-bottom: 1px solid var(--linie); }
.kennzahlen ul { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.kennzahlen li { padding: 32px 28px 36px; border-left: 1px solid var(--linie); display: flex; flex-direction: column; gap: 8px; }
.kennzahlen li:first-child { border-left: 0; padding-left: 0; }
.kennzahlen strong { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.kennzahlen li > span { font-size: 17px; color: var(--anthrazit); line-height: 1.4; max-width: 18em; hyphens: auto; -webkit-hyphens: auto; }
.zahl { display: inline-block; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 959px) {
  .kennzahlen ul { grid-template-columns: 1fr 1fr; }
  .kennzahlen li { padding: 24px 0 26px 18px; border-bottom: 1px solid var(--linie); }
  .kennzahlen li:nth-child(odd) { border-left: 0; padding-left: 0; }
  .kennzahlen li:nth-last-child(-n+2) { border-bottom: 0; }
}

/* Abschnitte und Kopfzeilen mit Linienbuendel */
.abschnitt { padding-block: clamp(72px, 9vw, 128px); }
.abschnitt-grau { background: var(--grau); }
.kopfzeile { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px 64px; align-items: end; border-top: 2px solid var(--schwarz); padding-top: 40px; margin-bottom: clamp(40px, 5vw, 64px); }
.kopfzeile::before { content: ""; position: absolute; left: 0; top: -2px; width: 120px; height: 21px; background:
  linear-gradient(var(--L), var(--L)) 0 0 / 100% 5px no-repeat,
  linear-gradient(var(--W), var(--W)) 0 8px / 100% 5px no-repeat,
  linear-gradient(var(--R), var(--R)) 0 16px / 100% 5px no-repeat; }
.kopfzeile h2 { font-size: clamp(2.4rem, 4.8vw, 4.4rem); font-weight: 500; }
.kopfzeile p { font-size: 19px; color: var(--anthrazit); line-height: 1.5; max-width: 30em; }
.kopfzeile-eng { grid-template-columns: 1fr; margin-bottom: 28px; }
@media (max-width: 959px) { .kopfzeile { grid-template-columns: 1fr; gap: 14px; padding-top: 34px; } .kopfzeile h2 { font-size: clamp(2.2rem, 9.6vw, 3.2rem); } .kopfzeile p { font-size: 18px; } }

/* Gleich hohe Zweispalter */
.paar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3.4vw, 48px); align-items: stretch; }
.kasten { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linie); }
.kasten-text { flex: 1; display: flex; flex-direction: column; padding: clamp(24px, 2.8vw, 40px); }
.kasten-text h3 { font-size: clamp(1.6rem, 2.3vw, 2.1rem); font-weight: 500; }
.kasten-text p { margin-top: 14px; font-size: 18px; line-height: 1.55; color: var(--anthrazit); max-width: 34em; }
.kasten-text .textlink { margin-top: auto; padding-top: 14px; align-self: flex-start; }
@media (max-width: 899px) { .paar, .paar-faq, .paar-orte { grid-template-columns: 1fr; } }

/* ---------- Weiterbildungen als Linien ---------- */
.linie-karte { position: relative; background: #fff; border: 1px solid var(--linie); }
.linie-karte::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 8px; background: var(--linienfarbe, var(--L)); }
.lk-L { --linienfarbe: var(--L); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px clamp(32px, 5vw, 80px); padding: clamp(32px, 4vw, 56px); }
.lk-L .lk-kopf { grid-column: 1 / -1; }
.lk-W { --linienfarbe: var(--W); }
.lk-R::before { background: var(--R); box-shadow: inset 0 0 0 0 transparent; }
.lk-R::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 3px; background: #fff; }
.lk-LT::before { background: repeating-linear-gradient(90deg, var(--L) 0 22px, transparent 22px 30px); }
.lk-kopf { display: flex; align-items: flex-start; gap: 18px; }
.lk-L h3 { font-size: clamp(2rem, 3.4vw, 3.1rem); font-weight: 600; }
.lk-unter { margin-top: 8px; font-size: 19px; }
.lk-fakten { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--schwarz); align-self: start; }
.lk-fakten > div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--linie); }
.lk-fakten > div + div { padding-left: 16px; border-left: 1px solid var(--linie); }
.lk-fakten dt { font-size: 16px; color: var(--anthrazit); }
.lk-fakten dd { margin: 4px 0 0; font-size: 22px; font-weight: 600; line-height: 1.25; }
.lk-mehr { display: contents; }
.lk-mehr > p { grid-column: 1; grid-row: 2; }
.lk-L .lk-fakten { grid-column: 2; grid-row: 2; }
.lk-abschluesse { grid-column: 1 / -1; margin-top: 8px; }
.lk-mehr > p { font-size: 19px; line-height: 1.55; max-width: 32em; }
.lk-abschluesse h4 { font-size: 17px; font-weight: 500; color: var(--anthrazit); letter-spacing: 0; margin-bottom: 10px; }
.mini-linie { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mini-linie::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 8px; background: var(--L); transform-origin: 0 50%; }
.mini-linie li { position: relative; padding: 42px 14px 0 0; font-size: 17px; font-weight: 500; line-height: 1.3; }
.mini-linie li::before { content: ""; position: absolute; left: 0; top: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 5px solid var(--schwarz); box-sizing: border-box; }

.lk-raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); margin-top: clamp(16px, 2vw, 28px); align-items: stretch; }
.lk-raster .linie-karte { display: flex; flex-direction: column; padding: 34px 28px 28px; }
.lk-raster .lk-kopf { align-items: center; gap: 14px; }
.lk-raster h3 { font-size: clamp(1.4rem, 1.8vw, 1.7rem); font-weight: 600; line-height: 1.15; }
.lk-text { margin-top: 16px; font-size: 18px; line-height: 1.5; color: var(--anthrazit); }
.lk-fakten-klein { margin-top: auto; padding-top: 0; grid-template-columns: 1fr; border-top: 0; align-self: stretch; }
.lk-raster .lk-text { margin-bottom: 24px; }
.lk-fakten-klein > div, .lk-fakten-klein > div + div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-left: 0; border-bottom: 1px solid var(--linie); }
.lk-fakten-klein > div:first-child { border-top: 2px solid var(--schwarz); }
.lk-fakten-klein dd { margin: 0; font-size: 18px; text-align: right; }

.wb-bilder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); margin-top: clamp(40px, 5vw, 72px); }
.wb-bilder img { aspect-ratio: 3 / 2; object-fit: cover; }
.wb-bilder figure:last-child img { object-position: 50% 58%; }
.wb-bilder figcaption { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 17px; color: var(--anthrazit); }

@media (max-width: 1099px) { .mini-linie { grid-template-columns: 1fr 1fr; row-gap: 18px; } .mini-linie::before { display: none; } .mini-linie li::before { width: 22px; height: 22px; border-width: 4px; } .mini-linie li { padding-top: 34px; } }
@media (max-width: 959px) {
  .lk-L { grid-template-columns: 1fr; padding: 32px 22px 28px; }
  .lk-mehr > p, .lk-L .lk-fakten, .lk-abschluesse { grid-column: 1; grid-row: auto; }
  .lk-L h3 { font-size: clamp(1.75rem, 7.6vw, 2.4rem); }
  .lk-raster { grid-template-columns: 1fr; }
  .wb-bilder { grid-template-columns: 1fr; }
  .wb-bilder figure:last-child { display: none; }
}
@media (max-width: 599px) {
  .lk-kopf { gap: 14px; }
  .badge-gross { min-width: 46px; height: 42px; font-size: 23px; }
  .lk-L .lk-fakten { grid-template-columns: 1fr 1fr; }
  .lk-L .lk-fakten > div:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
  .lk-L .lk-fakten dd { font-size: 20px; }
  .mini-linie { grid-template-columns: 1fr; row-gap: 0; }
  .mini-linie::before { display: block; left: 9px; right: auto; top: 12px; bottom: 12px; width: 6px; height: auto; }
  .mini-linie li { padding: 8px 0 12px 40px; }
  .mini-linie li::before { top: 8px; }
}

/* ---------- Fahrplan je Linie ---------- */
.naechste-abfahrt { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; font-size: 19px; }
.na-punkt { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--L); box-shadow: 0 0 0 0 rgba(247,166,0,.6); animation: atmen 2s ease-out infinite; }
.na-tage { margin-left: 8px; color: var(--anthrazit); }
@keyframes atmen { 0% { box-shadow: 0 0 0 0 rgba(247,166,0,.55); } 100% { box-shadow: 0 0 0 14px rgba(247,166,0,0); } }
.fahrplan { background: #fff; border: 1px solid var(--linie); padding: 8px clamp(16px, 3vw, 40px) 4px; }
.ks-tabelle { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ks-tabelle thead th { padding: 22px 12px 18px 0; text-align: left; font-size: 19px; font-weight: 600; border-bottom: 2px solid var(--schwarz); vertical-align: bottom; }
.ks-tabelle thead th:first-child { width: 24%; color: var(--anthrazit); font-weight: 500; font-size: 17px; }
.ks-tabelle thead th:not(:first-child)::before { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 28px; padding: 0 7px; margin-right: 12px; border-radius: 7px; font-size: 16px; font-weight: 700; vertical-align: 2px; }
.ks-tabelle thead th:nth-child(2)::before { content: "L"; background: var(--L); }
.ks-tabelle thead th:nth-child(3)::before { content: "W"; background: var(--W); color: #fff; }
.ks-tabelle thead th:nth-child(4)::before { content: "R"; background: #fff; box-shadow: inset 0 0 0 3px var(--R); }
.ks-tabelle tbody tr { border-bottom: 1px solid var(--linie); }
.ks-tabelle tbody tr:last-child { border-bottom: 0; }
.ks-tabelle tbody th { padding: 26px 12px 26px 0; text-align: left; font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 600; letter-spacing: -0.02em; vertical-align: top; }
.ks-tabelle td { position: relative; padding: 24px 12px 24px 44px; vertical-align: top; font-size: 18px; color: var(--anthrazit); }
.ks-tabelle td::before { content: ""; position: absolute; left: 13px; top: 0; bottom: -1px; width: 8px; background: var(--L); }
.ks-tabelle td:nth-child(3)::before { background: var(--W); }
.ks-tabelle td:nth-child(4)::before { background: var(--R); box-shadow: inset 0 0 0 2.5px var(--R), inset 0 0 0 10px #fff; width: 9px; background: linear-gradient(90deg, var(--R) 0 3px, #fff 3px 6px, var(--R) 6px); }
.ks-tabelle tbody tr:first-child td::before { top: -1px; }
.ks-tabelle time { position: relative; display: block; padding: 3px 0; font-size: 22px; font-weight: 600; color: var(--schwarz); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.ks-tabelle time::before { content: ""; position: absolute; left: -39px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #fff; border: 4px solid var(--schwarz); box-sizing: border-box; }
.ks-tabelle time.naechst { color: #8a5a00; }
.ks-tabelle time.naechst::before { background: var(--L); animation: atmen 2s ease-out infinite; }
.ks-tabelle time.naechst-erste::after { content: "nächste Abfahrt"; display: inline-block; margin-left: 10px; padding: 2px 8px; background: var(--schwarz); color: #fff; font-size: 13px; font-weight: 600; border-radius: 4px; vertical-align: 3px; letter-spacing: 0; }
.ks-tabelle br { display: none; }
.fahrplan-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; margin-top: 32px; }
.fahrplan-fuss p { font-size: 19px; max-width: 44em; }

/* Fahrplan erscheint Zeile fuer Zeile, Halte klappen auf */
.fp-wartet .ks-tabelle tbody tr { opacity: 0; transform: translateY(16px); }
.fp-wartet .ks-tabelle td::before { transform: scaleY(0); }
.fp-laeuft .ks-tabelle tbody tr { animation: zeile .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 160ms); }
.fp-laeuft .ks-tabelle td::before { transform-origin: 50% 0; animation: senkrecht .7s cubic-bezier(.5,0,.3,1) both; animation-delay: calc(var(--i, 0) * 160ms + 120ms); }
@keyframes zeile { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes senkrecht { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (max-width: 1099px) and (min-width: 760px) {
  .ks-tabelle time { font-size: 19px; }
  .ks-tabelle time.naechst-erste::after { display: block; width: max-content; margin: 4px 0 0; }
  .ks-tabelle thead th { font-size: 17px; }
  .ks-tabelle thead th:not(:first-child)::before { display: flex; width: 34px; margin-bottom: 8px; }
}
@media (max-width: 759px) {
  .fahrplan { padding: 0; border: 0; background: transparent; }
  .ks-tabelle, .ks-tabelle tbody, .ks-tabelle tr { display: block; width: 100%; }
  .ks-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ks-tabelle tbody tr { background: #fff; border: 1px solid var(--linie); margin-bottom: 14px; padding: 4px 18px 10px; }
  .ks-tabelle tbody tr:last-child { border-bottom: 1px solid var(--linie); }
  .ks-tabelle tbody th { display: block; padding: 16px 0 10px; font-size: 26px; border-bottom: 2px solid var(--schwarz); }
  .ks-tabelle td { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 14px 0 14px; border-bottom: 1px solid var(--linie); color: var(--anthrazit); }
  .ks-tabelle td:last-child { border-bottom: 0; }
  .ks-tabelle td::before { position: static; order: -2; display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 32px; height: 26px; padding: 0 6px; border-radius: 6px; font-size: 15px; font-weight: 700; color: var(--schwarz); box-shadow: none; transform: none !important; animation: none !important; }
  .ks-tabelle td:nth-child(2)::before { content: "L"; background: var(--L); }
  .ks-tabelle td:nth-child(3)::before { content: "W"; background: var(--W); color: #fff; }
  .ks-tabelle td:nth-child(4)::before { content: "R"; background: #fff; box-shadow: inset 0 0 0 3px var(--R); }
  .ks-tabelle td::after { order: -1; flex: 1 1 60%; font-size: 17px; font-weight: 600; color: var(--schwarz); }
  .ks-tabelle td:nth-child(2)::after { content: "Lokführer*in"; }
  .ks-tabelle td:nth-child(3)::after { content: "Wagenmeister*in"; }
  .ks-tabelle td:nth-child(4)::after { content: "Rangierbegleiter*in"; }
  .ks-tabelle time { flex: none; width: calc(50% - 5px); padding: 2px 0 2px 26px; font-size: 20px; }
  .ks-tabelle time::before { left: 0; width: 16px; height: 16px; margin-top: -8px; }
  .ks-tabelle time.naechst-erste::after { display: block; margin: 2px 0 0; width: max-content; }
  .naechste-abfahrt { align-items: flex-start; font-size: 18px; }
  .na-punkt { margin-top: 6px; }
  .na-tage { display: block; margin-left: 0; }
  .fahrplan-fuss { flex-direction: column; align-items: stretch; }
  .fahrplan-fuss .knopf { width: 100%; }
}

/* ---------- Tarif ---------- */
.tarif-raster { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 3.4vw, 48px); align-items: stretch; }
.tarif { position: relative; display: flex; flex-direction: column; background: #fff; border: 2px solid var(--schwarz); border-radius: 10px; overflow: hidden; }
.tarif::before, .tarif::after { content: ""; position: absolute; top: 96px; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--schwarz); z-index: 1; }
.tarif::before { left: -16px; }
.tarif::after { right: -16px; }
.tarif-kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; padding: 26px clamp(22px, 3vw, 40px) 24px; background: var(--schwarz); color: #fff; min-height: 110px; align-content: center; }
.tarif-titel { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.tarif-gilt { font-size: 17px; color: var(--hell-2); }
.tarif-tabelle { width: calc(100% - 2 * clamp(22px, 3vw, 40px)); margin: 18px clamp(22px, 3vw, 40px) 0; border-collapse: collapse; }
.tarif-tabelle thead th { padding: 8px 0; text-align: left; font-size: 16px; font-weight: 500; color: var(--anthrazit); border-bottom: 2px solid var(--schwarz); }
.tarif-tabelle thead th:last-child, .tarif-tabelle td { text-align: right; }
.tarif-tabelle tbody th { padding: 14px 12px 14px 0; text-align: left; font-size: 19px; font-weight: 500; border-bottom: 1px dashed #b5b5b0; }
.tarif-tabelle td { padding: 14px 0; font-size: 18px; font-weight: 600; border-bottom: 1px dashed #b5b5b0; white-space: nowrap; }
.tarif-tabelle tbody tr:last-child th, .tarif-tabelle tbody tr:last-child td { border-bottom: 0; }
.tarif-fuss { margin-top: auto; padding: 18px clamp(22px, 3vw, 40px) 24px; border-top: 2px solid var(--schwarz); font-size: 18px; font-weight: 500; }
.stempel { position: absolute; right: clamp(20px, 3vw, 44px); bottom: 84px; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 118px; height: 118px; border-radius: 50%; border: 4px solid var(--L); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 6px var(--L); background: rgba(255,255,255,.88); color: var(--schwarz); transform: rotate(-12deg); pointer-events: none; }
.stempel span { font-size: 26px; font-weight: 700; letter-spacing: 0.06em; line-height: 1; }
.stempel .stempel-klein { margin-top: 4px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; }
.stempel-wartet .stempel { opacity: 0; transform: rotate(-30deg) scale(2.4); }
.stempel-da .stempel { animation: stempeln .5s cubic-bezier(.5,0,.6,1.3) both; }
@keyframes stempeln { 0% { opacity: 0; transform: rotate(-30deg) scale(2.4); } 70% { opacity: 1; transform: rotate(-10deg) scale(.94); } 100% { opacity: 1; transform: rotate(-12deg) scale(1); } }

.enthalten { display: flex; flex-direction: column; background: var(--grau); border-radius: 10px; padding: clamp(26px, 3vw, 40px); }
.enthalten h3 { font-size: clamp(1.6rem, 2.3vw, 2.1rem); font-weight: 600; padding-bottom: 18px; border-bottom: 2px solid var(--schwarz); }
.enthalten-liste { margin: 0; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.enthalten-liste > div { position: relative; padding: 16px 0 16px 40px; border-bottom: 1px solid var(--linie); }
.enthalten-liste > div:last-child { border-bottom: 0; padding-bottom: 0; }
.enthalten-liste > div::before { content: ""; position: absolute; left: 0; top: 20px; width: 22px; height: 22px; border-radius: 50%; background: var(--L); border: 4px solid var(--schwarz); box-sizing: border-box; }
.enthalten-liste dt { font-size: 20px; font-weight: 600; line-height: 1.25; }
.enthalten-liste dd { margin: 6px 0 0; font-size: 17px; line-height: 1.5; color: #4a4a48; }
@media (max-width: 959px) {
  .tarif-raster { grid-template-columns: 1fr; }
  .stempel { width: 96px; height: 96px; bottom: 76px; right: 16px; }
  .stempel span { font-size: 21px; }
  .stempel .stempel-klein { font-size: 12px; }
}
@media (max-width: 599px) {
  .tarif-tabelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tarif-tabelle, .tarif-tabelle tbody, .tarif-tabelle tr { display: block; width: auto; }
  .tarif-tabelle tr { display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px dashed #b5b5b0; }
  .tarif-tabelle tbody th, .tarif-tabelle td { padding: 0; border: 0; text-align: left; }
  .tarif-tabelle td { font-size: 16px; font-weight: 500; color: var(--anthrazit); white-space: normal; }
  .tarif::before, .tarif::after { top: 84px; }
  .tarif-kopf { min-height: 98px; }
  .stempel { right: 14px; bottom: 80px; width: 84px; height: 84px; }
  .stempel span { font-size: 18px; }
  .stempel .stempel-klein { font-size: 11px; }
}

/* ---------- Deine Linie zum Job ---------- */
.band { position: relative; }
.band-strecken { display: grid; grid-template-columns: 3fr 3fr 1fr; margin-bottom: 18px; font-size: 16px; font-weight: 600; }
.band-strecken span { padding: 0 12px 10px 0; border-bottom: 1px solid var(--anthrazit); margin-right: 18px; }
.band-strecken .bst-kurs { border-bottom: 3px solid var(--L); padding-bottom: 8px; }
.band-strecken .bst-ziel { margin-right: 0; border-bottom-color: transparent; }
.halte { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.halt { position: relative; padding: 60px 16px 0 0; }
.halt::before { content: ""; position: absolute; top: 18px; left: 0; right: 0; height: 10px; background: var(--W); }
.halt-kurs::before { background: var(--L); }
.halt-ziel::before { display: none; }
.halt-marke { position: absolute; top: 4px; left: -4px; z-index: 1; width: 22px; height: 38px; border-radius: 11px; background: #fff; border: 5px solid var(--schwarz); box-sizing: border-box; transition: background-color .3s; }
.halt.erreicht .halt-marke { background: var(--L); }
.halt-ziel .halt-marke { width: 48px; height: 48px; top: -1px; left: -10px; border-radius: 50%; border-width: 7px; background: var(--L); }
.halt-ziel .halt-marke::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--schwarz); }
.halt h3 { font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; hyphens: manual; }
.halt p { margin-top: 10px; font-size: 17px; line-height: 1.45; color: var(--anthrazit); }
.halt-ziel h3 { font-size: 24px; }
.halt-ziel p { color: var(--schwarz); font-weight: 500; }
.band-zug { position: absolute; left: 0; top: 0; z-index: 3; width: 40px; height: 20px; border-radius: 10px; background: var(--L); border: 3px solid var(--schwarz); box-sizing: border-box; opacity: 0; pointer-events: none; transition: transform .65s cubic-bezier(.45,0,.25,1), opacity .3s; }
.band-zug::after { content: ""; position: absolute; right: 6px; top: 4px; width: 6px; height: 6px; border-radius: 2px; background: var(--schwarz); }
.band-zug.faehrt { opacity: 1; }
@media (max-width: 1099px) {
  .band-strecken { display: none; }
  .halte { grid-template-columns: 1fr; }
  .halt { padding: 0 0 34px 60px; }
  .halt::before { top: 10px; bottom: -10px; left: 14px; right: auto; width: 10px; height: auto; }
  .halt-marke { top: 0; left: 4px; width: 30px; height: 22px; }
  .halt-ziel .halt-marke { top: -8px; left: -5px; }
  .halt h3 { font-size: 22px; }
  .halt p { margin-top: 6px; max-width: 34em; }
  .halt:nth-child(4) h3::after { content: "13 Monate"; display: inline-block; margin-left: 12px; padding: 2px 10px; background: var(--L); color: var(--schwarz); font-size: 16px; font-weight: 600; letter-spacing: 0; border-radius: 4px; vertical-align: 3px; }
  .band-zug { width: 22px; height: 38px; }
  .band-zug::after { right: 4px; top: auto; bottom: 5px; }
}

/* Bildband */
.bildband img { width: 100%; height: clamp(260px, 42vw, 620px); object-fit: cover; object-position: 50% 62%; }

/* ---------- Fortbildungen ---------- */
.fb-block { padding: clamp(24px, 2.8vw, 40px); }
.fb-kopf { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 2px solid var(--schwarz); }
.fb-kopf h3 { font-size: clamp(1.6rem, 2.3vw, 2.1rem); font-weight: 500; }
.fb-linie { list-style: none; margin: 0; padding: 8px 0 0; position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.fb-linie::before { content: ""; position: absolute; left: 9px; top: 26px; bottom: 26px; width: 8px; background: var(--F); }
.fb-linie li { position: relative; padding: 14px 0 14px 44px; font-size: 19px; font-weight: 500; line-height: 1.35; }
.fb-linie li::before { content: ""; position: absolute; left: 1px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%; background: #fff; border: 5px solid var(--schwarz); box-sizing: border-box; }
.kasten-bild { position: relative; flex: 1 1 auto; min-height: 240px; overflow: hidden; }
.kasten-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.fb-auftrag .kasten-text { flex: none; }
.fb-auftrag .textlink { margin-top: 10px; padding-top: 0; font-size: 20px; }

/* Karriere */
.karte img { aspect-ratio: 3 / 2; object-fit: cover; }
#karriere .kasten { border-color: transparent; }

/* ---------- FAQ ---------- */
.paar-faq { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.faq-kopf { display: flex; flex-direction: column; }
.auskunft { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; background: var(--grau); border-radius: 10px; }
.auskunft-zeichen { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 8px; background: var(--schwarz); color: #fff; font-size: 24px; font-weight: 700; font-style: italic; line-height: 1; }
.auskunft p { font-size: 18px; color: var(--anthrazit); line-height: 1.5; }
.auskunft a { color: var(--schwarz); font-weight: 600; white-space: nowrap; }
.faq-bild { position: relative; flex: 1 1 auto; min-height: 120px; margin-top: 20px; overflow: hidden; }
.faq-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.faq { border-top: 2px solid var(--schwarz); align-self: start; }
.faq-eintrag { border-bottom: 1px solid var(--linie); }
.faq-eintrag summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 30px 1fr 28px; gap: 18px; align-items: center; min-height: 44px; padding: 24px 0; font-size: clamp(1.2rem, 1.7vw, 1.45rem); font-weight: 500; line-height: 1.3; }
.faq-eintrag summary::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 5px solid var(--schwarz); box-sizing: border-box; background: #fff; transition: background-color .2s; }
.faq-eintrag[open] summary::before { background: var(--L); }
.faq-eintrag summary::-webkit-details-marker { display: none; }
.faq-eintrag summary::after { content: ""; width: 28px; height: 28px; background: linear-gradient(var(--schwarz), var(--schwarz)) center / 18px 2px no-repeat, linear-gradient(var(--schwarz), var(--schwarz)) center / 2px 18px no-repeat; border-radius: 50%; transition: transform .2s; }
.faq-eintrag[open] summary::after { transform: rotate(45deg); }
.faq-eintrag summary:hover { text-decoration: underline; text-decoration-color: var(--L); text-decoration-thickness: 3px; text-underline-offset: 0.3em; }
.faq-eintrag p { padding: 0 46px 26px 48px; font-size: 18px; line-height: 1.6; color: var(--anthrazit); max-width: 42em; }
@media (max-width: 899px) { .faq-bild { display: none; } .faq-eintrag p { padding-right: 0; padding-left: 0; } .faq-eintrag summary { grid-template-columns: 22px 1fr 28px; gap: 14px; } }

/* ---------- Anmeldung ---------- */
.anmeldung { background: var(--grau); padding-block: clamp(72px, 9vw, 128px); }
.anmeldung-text { display: flex; flex-direction: column; background: var(--schwarz); color: var(--hell); padding: clamp(28px, 3.4vw, 48px); border-radius: 10px; overflow: hidden; }
.anmeldung-text h2 { font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 600; letter-spacing: -0.03em; color: #fff; }
.anmeldung-lead { margin-top: 22px; font-size: 19px; line-height: 1.55; color: #d6d6d2; max-width: 30em; }
.anmeldung-telefon { margin-top: 24px; font-size: 18px; color: #d6d6d2; }
.anmeldung-telefon a { display: inline-flex; align-items: center; min-height: 44px; font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 600; color: #fff; text-decoration-color: var(--L); text-decoration-thickness: 3px; text-underline-offset: .2em; font-variant-numeric: tabular-nums; }
.anmeldung-bild { position: relative; flex: 1 1 auto; min-height: 200px; margin: 28px calc(-1 * clamp(28px, 3.4vw, 48px)) calc(-1 * clamp(28px, 3.4vw, 48px)); }
.anmeldung-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.formular { background: #fff; border-top: 8px solid var(--L); border-radius: 10px; padding: clamp(24px, 3.4vw, 48px); box-shadow: 0 1px 0 var(--linie); }
.formular h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); font-weight: 600; margin-bottom: 28px; }
.feld { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.feld-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.feld label { font-size: 17px; font-weight: 500; }
.feld input, .feld select { width: 100%; min-height: 58px; padding: 12px 16px; font: inherit; font-size: 19px; color: var(--schwarz); background: #fff; border: 1px solid #8a8a86; border-radius: 6px; appearance: none; }
.feld select { background-image: linear-gradient(45deg, transparent 50%, var(--schwarz) 50%), linear-gradient(135deg, var(--schwarz) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.feld input:focus, .feld select:focus { outline: 3px solid var(--L); outline-offset: 0; border-color: var(--schwarz); }
.feld [aria-invalid="true"] { border-color: #b3261e; border-width: 2px; }
.formular .knopf-gross { margin-top: 8px; cursor: pointer; font-family: inherit; }
.formular-hinweis { margin-top: 16px; font-size: 16px; color: var(--anthrazit); line-height: 1.5; }
.formular-fehler { margin-bottom: 12px; color: #b3261e; font-weight: 500; }
.danke-titel { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 14px; }
.formular-danke p:not(.danke-titel) { font-size: 19px; color: var(--anthrazit); }
@media (max-width: 899px) {
  .anmeldung-bild { display: none; }
  .anmeldung-text h2 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .feld-paar { grid-template-columns: 1fr; }
  .formular { margin-inline: calc(-1 * var(--rand)); border-radius: 0; padding: 28px var(--rand) 32px; }
  .anmeldung-text { margin-inline: calc(-1 * var(--rand)); border-radius: 0; padding: 32px var(--rand); }
  .anmeldung .paar { gap: 0; }
}

/* ---------- Standorte als Netzkarte ---------- */
.standorte { border-top: 1px solid var(--linie); }
.paar-orte { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.nordkarte { display: flex; align-items: center; justify-content: center; padding: clamp(16px, 2.4vw, 32px); background-color: var(--papier); background-image: radial-gradient(circle at 1px 1px, #d9dbdb 1.2px, transparent 1.3px); background-size: 28px 28px; border: 1px solid var(--linie); }
.nordkarte svg { width: 100%; max-width: 460px; height: auto; display: block; overflow: visible; }
.nk-meer { font-size: 20px; font-style: italic; font-weight: 500; fill: #6b6b68; }
.nk-fluss { font-size: 15px; font-style: italic; fill: #6b6b68; }
.nk-elbe, .nk-weser { fill: none; stroke: #d3d6d6; stroke-width: 7px; stroke-linecap: round; }
.nk-strecke { fill: none; stroke-width: 10px; stroke-linejoin: round; }
.nk-s1 { stroke: var(--L); }
.nk-s2 { stroke: var(--W); }
.nk-s3 { stroke: var(--R); }
.nk-punkt { fill: #fff; stroke: var(--schwarz); stroke-width: 6px; transition: fill .2s; }
.nk-puls { fill: none; stroke: var(--L); stroke-width: 4px; opacity: 0; transform-box: fill-box; transform-origin: center; }
.nk-ort text { font-size: 24px; font-weight: 700; fill: var(--schwarz); paint-order: stroke; stroke: var(--papier); stroke-width: 6px; stroke-linejoin: round; }
.nk-ort.aktiv .nk-punkt { fill: var(--L); }
.nk-ort.aktiv .nk-puls { animation: puls 1.6s ease-out infinite; }
.nk-wartet .nk-strecke { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.nk-wartet .nk-ort { opacity: 0; }
.nk-laeuft .nk-strecke { stroke-dasharray: 1 1; animation: zeichnen .9s cubic-bezier(.55,0,.35,1) both; }
.nk-laeuft .nk-s2 { animation-delay: .35s; }
.nk-laeuft .nk-s3 { animation-delay: .7s; }
.nk-laeuft .nk-ort { animation: einblenden .4s ease both; }
.nk-laeuft .nk-ort[data-ort="bremen"] { animation-delay: .1s; }
.nk-laeuft .nk-ort[data-ort="hamburg"] { animation-delay: .5s; }
.nk-laeuft .nk-ort[data-ort="hannover"] { animation-delay: .9s; }

.so-raster { display: flex; flex-direction: column; gap: 16px; }
.so-karte { flex: 1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto 1fr; gap: 6px 28px; padding: 24px 28px; background: #fff; border: 1px solid var(--linie); border-left: 8px solid var(--schwarz); transition: border-color .2s; }
.so-karte:hover, .so-karte.aktiv { border-left-color: var(--L); }
.so-name { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 12px; font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 600; }
.so-name::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 5px solid var(--schwarz); box-sizing: border-box; background: #fff; }
.so-start { grid-column: 1; grid-row: 2 / span 3; align-self: end; font-size: 17px; color: var(--anthrazit); }
.so-start time { display: block; color: var(--schwarz); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.so-adresse { grid-column: 2; grid-row: 1; font-size: 18px; line-height: 1.45; }
.so-kontakt { grid-column: 2; grid-row: 2; font-size: 17px; line-height: 1.4; }
.so-kontakt a { display: inline-flex; align-items: center; min-height: 40px; color: var(--schwarz); text-decoration-color: var(--L); text-decoration-thickness: 2px; font-variant-numeric: tabular-nums; }
.so-zeiten { grid-column: 2; grid-row: 3; font-size: 16px; color: var(--anthrazit); }
@media (max-width: 899px) {
  .nordkarte svg { max-width: 360px; }
  .so-karte { grid-template-columns: 1fr; grid-template-rows: none; padding: 22px 20px; }
  .so-name, .so-start, .so-adresse, .so-kontakt, .so-zeiten { grid-column: 1; grid-row: auto; }
  .so-start { order: 5; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--linie); }
}

/* ---------- Fuss ---------- */
.fuss { background: var(--schwarz); color: var(--hell-2); padding: 56px 0 150px; font-size: 17px; }
.fuss-raster { display: grid; grid-template-columns: 2fr 1.4fr 1fr 1fr; gap: 32px; }
.fuss-marke img { width: 190px; }
.fuss-marke p { margin-top: 14px; }
.fuss-linien { display: flex; gap: 8px; }
.fuss-linien .badge-R { background: var(--schwarz); color: #fff; box-shadow: inset 0 0 0 3px #fff; }
.fuss-titel { color: #fff; font-weight: 600; margin-bottom: 8px; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss a { color: var(--hell); display: inline-flex; align-items: center; min-height: 44px; }
.fuss-unten { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--linie-dunkel); font-size: 16px; }
@media (max-width: 959px) { .fuss-raster { grid-template-columns: 1fr 1fr; } .fuss-marke { grid-column: 1 / -1; } }

/* Gestaffeltes Erscheinen */
.warten { opacity: 0; transform: translateY(18px); }
.da { transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 110ms); }

@media (prefers-reduced-motion: reduce) {
  .warten, .fp-wartet .ks-tabelle tbody tr, .nk-wartet .nk-ort { opacity: 1; transform: none; }
  .fp-wartet .ks-tabelle td::before { transform: none; }
  .nk-wartet .nk-strecke { stroke-dashoffset: 0; }
  .stempel-wartet .stempel { opacity: 1; transform: rotate(-12deg); }
  .zug, .band-zug { display: none; }
}

.nw { white-space: nowrap; }
@media (max-width: 899px) { .paar-faq, .paar-orte { grid-template-columns: minmax(0, 1fr); } .nordkarte { padding: 20px 12px; } }
@media (min-width: 960px) and (max-width: 1199px) {
  .netz-quer { display: none; }
  .netz-hoch { display: block; max-width: 440px; max-height: calc(min(100vh - var(--kopf-hoehe), 880px) - 200px); }
}

/* ---------- Navigation mit Untermenues und Fuss mit Seitenlinks (Startseite und Unterseiten) ---------- */
.nav-gruppe { position: relative; display: flex; align-items: center; }
.nav-auf { display: inline-flex; align-items: center; justify-content: center; width: 30px; min-height: 44px; margin-left: -8px; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; }
.nav-auf::before { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
.nav-auf[aria-expanded="true"]::before { transform: translateY(2px) rotate(-135deg); }
.hauptnav .nav-unter { display: none; position: absolute; top: calc(100% + 16px); left: -12px; z-index: 5; flex-direction: column; gap: 0; min-width: 320px; padding: 14px 0 10px; background: #fff; border: 1px solid var(--linie); border-radius: 10px; box-shadow: 0 24px 48px -24px rgba(28,28,27,.35); overflow: hidden; }
.hauptnav .nav-unter::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--L); }
.hauptnav .nav-unter-f::after { background: var(--F); }
.hauptnav .nav-unter::before { content: ""; position: absolute; left: 0; right: 0; top: -19px; height: 19px; }
.hauptnav .nav-unter a { gap: 12px; min-height: 44px; padding: 0 20px; font-size: 17px; font-weight: 500; white-space: nowrap; }
.hauptnav .nav-unter .badge-mini { min-width: 30px; display: inline-flex; text-decoration: none; }
.hauptnav .nav-unter li:first-child a { font-weight: 600; }
.hauptnav .nav-unter a:hover, .hauptnav .nav-unter a[aria-current="page"] { background: var(--grau); text-decoration: underline; text-decoration-color: var(--L); text-decoration-thickness: 3px; text-underline-offset: .35em; }
@media (min-width: 1061px) {
  .nav-gruppe:hover > .nav-unter, .nav-gruppe.auf > .nav-unter { display: flex; }
  .nav-gruppe:hover > .nav-auf::before { transform: translateY(2px) rotate(-135deg); }
}
@media (min-width: 1061px) and (max-width: 1240px) {
  .kopf-innen { gap: 20px; }
  .hauptnav ul a { padding: 0 9px; font-size: 16px; }
  .nav-auf { width: 24px; margin-left: -6px; }
}
@media (max-width: 1060px) {
  .nav-gruppe { display: grid; grid-template-columns: minmax(0, 1fr) 56px; align-items: stretch; }
  .nav-auf { width: 56px; min-height: 56px; margin: 0; border-bottom: 1px solid var(--linie); }
  .nav-auf::before { width: 9px; height: 9px; }
  .hauptnav .nav-unter { position: static; grid-column: 1 / -1; min-width: 0; padding: 6px 0 12px 4px; background: none; border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; box-shadow: none; }
  .hauptnav .nav-unter::before, .hauptnav .nav-unter::after { display: none; }
  .nav-gruppe.auf > .nav-unter { display: flex; }
  .hauptnav .nav-unter a { min-height: 48px; padding: 0; font-size: 18px; border-bottom: 0; white-space: normal; }
  .hauptnav .nav-unter a:hover, .hauptnav .nav-unter a[aria-current="page"] { background: none; }
}
.fuss-raster-voll { grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
.fuss-raster-voll .fuss-marke p { line-height: 1.6; }
.fuss-raster-voll .fuss-linien { margin-top: 18px; }
.fuss-titel-folgen { margin-top: 20px; }
.fuss-halte a { gap: 10px; }
.fuss-halte a::before { content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--schwarz); box-shadow: inset 0 0 0 3.5px #f4f4f1; }
.fuss-unten-voll { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 32px; }
.fuss-recht { display: flex; flex-wrap: wrap; gap: 0 24px; }
@media (max-width: 959px) { .fuss-raster-voll { grid-template-columns: 1fr 1fr; } }
@media (max-width: 479px) { .fuss-raster-voll { gap: 28px 20px; } .fuss-raster-voll .fuss-spalte:last-child { grid-column: 1 / -1; } }

/* Links der Startseite auf die Unterseiten */
.lk-link { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 3px; text-underline-offset: .2em; transition: text-decoration-color .2s; }
.lk-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.linie-karte:hover .lk-link, .lk-link:focus-visible { text-decoration-color: var(--L); }
.linie-karte:focus-within { outline: 3px solid var(--L); outline-offset: 3px; }
.lk-link:focus-visible { outline: none; }
.lk-weiter { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--L); text-decoration-thickness: 3px; text-underline-offset: .3em; }
.lk-weiter::after { content: ""; width: 9px; height: 9px; border: solid currentColor; border-width: 2px 2px 0 0; transform: rotate(45deg); transition: transform .2s; }
.linie-karte:hover .lk-weiter::after { transform: translateX(4px) rotate(45deg); }
.lk-L .lk-weiter { grid-column: 1 / -1; margin-top: 0; justify-self: start; }
.lk-raster .lk-weiter { margin-top: 20px; align-self: flex-start; }
.abschnitt-link { margin-top: 28px; }
.fb-linie a { color: inherit; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 3px; text-underline-offset: .3em; display: inline-flex; align-items: center; min-height: 44px; margin: -10px 0; }
.fb-linie a:hover, .fb-linie a:focus-visible { text-decoration-color: var(--L); }
.fb-alle { margin-top: 10px; align-self: flex-start; }
.textlinks { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 10px; }
.textlinks .textlink { margin-top: 0; padding-top: 0; font-size: 20px; }
.fahrplan-knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 699px) { .fahrplan-knoepfe { flex-direction: column; } .fahrplan-knoepfe .knopf { width: 100%; } }
.so-links { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 32px; }
.so-links a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--L); text-decoration-thickness: 3px; text-underline-offset: .3em; }
.so-links a::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4.5px var(--schwarz); }
.orte-spalte { display: flex; flex-direction: column; min-width: 0; }
.orte-spalte .so-raster { flex: 1; }
/* Unterstreichung nur unter dem Namen, nicht unter dem Linien-Badge */
.hauptnav .nav-unter a:has(.nav-name):hover, .hauptnav .nav-unter a:has(.nav-name)[aria-current="page"] { text-decoration: none; }
.hauptnav .nav-unter a:hover .nav-name, .hauptnav .nav-unter a[aria-current="page"] .nav-name { text-decoration: underline; text-decoration-color: var(--L); text-decoration-thickness: 3px; text-underline-offset: .35em; }
