/* Städte per Zug: "Kursbuch und Zuglaufschild"
   Farben nur aus der CLAUDE.md, Schriften lokal. */

@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/schriften/barlow-condensed-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/schriften/barlow-condensed-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/schriften/barlow-condensed-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/schriften/barlow-condensed-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/schriften/literata-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/schriften/literata-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/schriften/literata-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(/schriften/literata-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/schriften/literata-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/schriften/literata-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --emaille: #F4F6F3;
  --graphit: #2B2F33;
  --wagenblau: #0E4A57;
  --signalgelb: #E9B824;
  --schotter: #D9DEDC;
  --weiss: #FFFFFF;
  --graphit-leise: #4F555A; /* Graphit aufgehellt, nur für Nebentext (Kontrast 7:1 auf Emaille) */

  --schild: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Literata", Georgia, serif;

  --s16: 1rem; --s18: 1.125rem; --s22: 1.375rem; --s28: 1.75rem; --s40: 2.5rem; --s56: 3.5rem;
  --spalte: 68ch;
  --breit: 62rem;
  --rand: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--emaille);
  color: var(--graphit);
  font-family: var(--text);
  font-size: var(--s18);
  line-height: 1.6;
}
img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--wagenblau); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--wagenblau); outline-offset: 3px; }

.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.springen { position: absolute; left: -999px; top: 0; background: var(--weiss); padding: 8px 12px; z-index: 5; }
.springen:focus { left: var(--rand); }

/* ---------- Kopf und Fuß ---------- */

.kopf { border-bottom: 2px solid var(--graphit); background: var(--emaille); }
.kopf__innen, .fuss__innen, .rahmen { max-width: var(--breit); margin: 0 auto; padding: 0 var(--rand); }
.kopf__innen { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; padding-top: 14px; padding-bottom: 12px; }
.marke { font-family: var(--schild); font-weight: 700; font-size: var(--s28); line-height: 1.1; color: var(--wagenblau); text-decoration: none; }
.kopf nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.kopf nav a { font-family: var(--schild); font-weight: 500; font-size: var(--s18); color: var(--graphit); }

.fuss { margin-top: 72px; border-top: 2px solid var(--graphit); padding: 24px 0 40px; font-size: var(--s16); }
.fuss ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--schild); font-size: var(--s18); }
.fuss a { color: var(--graphit); }
.fuss p { margin: 0 0 6px; color: var(--graphit-leise); max-width: var(--spalte); }

/* ---------- Grundtypografie ---------- */

main { display: block; }
.rahmen > * { max-width: var(--spalte); }
.rahmen > .breit, .rahmen > .tafel, .rahmen > .schild, .rahmen > .fahrkarte, .rahmen > section { max-width: none; }
section > * { max-width: var(--spalte); }
section > .tabelle-huelle, section > .knopfreihe { max-width: none; }

h1, h2, h3 { color: var(--wagenblau); font-family: var(--text); font-weight: 600; line-height: 1.25; }
h1 { font-size: var(--s28); margin: 28px 0 8px; }
h2 { font-size: var(--s22); margin: 56px 0 12px; }
h3 { font-size: var(--s18); margin: 32px 0 6px; }
@media (min-width: 640px) {
  h1 { font-size: var(--s40); }
  h2 { font-size: var(--s28); }
  h3 { font-size: var(--s22); }
}
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 1.4em; }
li { margin-bottom: 6px; }
li::marker { font-family: var(--schild); font-weight: 700; color: var(--wagenblau); }
strong { font-weight: 600; }

.brotkrumen { font-family: var(--schild); font-size: var(--s16); margin: 16px 0 0; }
.brotkrumen ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 6px; }
.brotkrumen li { margin: 0; }
.brotkrumen li + li::before { content: "/"; margin-right: 6px; color: var(--graphit-leise); }
.brotkrumen a { color: var(--graphit); }

.stand { font-family: var(--schild); font-size: var(--s18); color: var(--graphit-leise); margin: 0 0 20px; }

.werbehinweis { font-size: var(--s16); border-left: 3px solid var(--schotter); padding: 2px 0 2px 12px; color: var(--graphit-leise); margin: 0 0 32px; }
.werbehinweis p { margin: 0; }

/* ---------- Zuglaufschild (Routenseite) ---------- */

.schild {
  background: var(--weiss);
  border: 2px solid var(--wagenblau);
  padding: 14px 16px 16px;
  margin-top: 20px;
  font-family: var(--schild);
  color: var(--graphit);
}
.schild__kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--schotter); padding-bottom: 8px; }
.schild__zug { font-weight: 700; font-size: var(--s22); color: var(--wagenblau); }
.schild__zeit { font-weight: 700; font-size: var(--s28); line-height: 1; }
.schild__zeit small { font-weight: 500; font-size: var(--s16); color: var(--graphit-leise); margin-right: 6px; }
.schild__halte { list-style: none; margin: 14px 0 4px; padding: 0; display: flex; justify-content: space-between; gap: 10px; }
.schild__halte li { margin: 0; font-weight: 700; font-size: var(--s22); line-height: 1.1; flex: 1 1 0; }
.schild__halte li:nth-child(n+2):not(:last-child) { text-align: center; }
.schild__halte li:last-child { text-align: right; }
.schild__halte li.umstieg { font-weight: 500; color: var(--graphit-leise); }
.schild__linie { width: calc(100% - 20px); height: 20px; margin: 6px 10px 0; overflow: visible; }
@media (min-width: 640px) {
  .schild { padding: 18px 24px 20px; }
  .schild__zug { font-size: var(--s28); }
  .schild__zeit { font-size: var(--s40); }
  .schild__halte li { font-size: var(--s40); }
}

/* ---------- Kurzantwort als Fahrkarte ---------- */

.fahrkarte {
  position: relative;
  background: var(--weiss);
  margin: 40px 0 8px;
  display: grid;
  grid-template-columns: 1fr;
}
.fahrkarte::before { /* perforierte Kante oben */
  content: "";
  position: absolute; left: 0; right: 0; top: -6px; height: 12px;
  background: radial-gradient(circle at 8px 6px, var(--emaille) 5px, transparent 5.5px) 0 0 / 16px 12px repeat-x;
}
.fahrkarte__text { padding: 26px 18px 14px; }
.fahrkarte__text h2 { margin-top: 0; }
.fahrkarte__text p:last-child { margin-bottom: 0; }
.fahrkarte__abschnitt {
  padding: 16px 18px 20px;
  border-top: 2px dashed var(--schotter);
  font-family: var(--schild);
}
.fahrkarte__abschnitt dl { margin: 0 0 14px; display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: baseline; }
.fahrkarte__abschnitt dt { font-weight: 500; font-size: var(--s16); color: var(--graphit-leise); }
.fahrkarte__abschnitt dd { margin: 0; font-weight: 700; font-size: var(--s22); text-align: right; font-variant-numeric: tabular-nums; }
.fahrkarte__abschnitt dd.preis { box-shadow: inset 0 -0.35em 0 var(--signalgelb); justify-self: end; padding: 0 2px; }
.fahrkarte__abschnitt .knopf { width: 100%; }
@media (min-width: 760px) {
  .fahrkarte { grid-template-columns: 1fr 17rem; }
  .fahrkarte__text { padding: 30px 28px 24px; }
  .fahrkarte__abschnitt { border-top: 0; border-left: 2px dashed var(--schotter); padding: 30px 22px 24px; }
}

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 10px 20px;
  font-family: var(--schild); font-weight: 700; font-size: var(--s22); line-height: 1.15; text-align: center;
  color: var(--graphit); background: var(--signalgelb);
  border: 2px solid var(--graphit); border-radius: 2px;
  text-decoration: none;
}
a.knopf:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.knopf--neben { background: var(--weiss); font-size: var(--s18); min-height: 44px; padding: 8px 14px; }
.knopf--wartet { background: transparent; border-style: dashed; border-color: var(--graphit-leise); color: var(--graphit-leise); cursor: default; }
.knopf__hinweis { font-weight: 500; font-size: var(--s16); }
.stern { font-weight: 500; }
.knopfabsatz { margin: 20px 0 8px; }
.knopfreihe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 8px; }
@media (min-width: 640px) { .knopfreihe { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.link-wartet { border-bottom: 1px dashed var(--graphit-leise); }
.link-wartet small { font-family: var(--schild); font-size: var(--s16); color: var(--graphit-leise); white-space: nowrap; }

/* ---------- Partner-Blöcke ---------- */

.partner { border: 2px solid var(--graphit); background: var(--weiss); padding: 16px 18px 18px; margin: 24px 0; max-width: var(--spalte); }
.partner h3, .partner h2 { margin: 0 0 6px; font-size: var(--s22); color: var(--graphit); }
.partner p:last-of-type { margin-bottom: 14px; }
.partner .knopfabsatz { margin: 0; }
section.partner-abschnitt { border: 2px solid var(--graphit); background: var(--weiss); padding: 4px 18px 20px; margin-top: 56px; max-width: var(--spalte); }
section.partner-abschnitt h2 { margin-top: 16px; color: var(--graphit); }

/* ---------- Tabellen wie im Kursbuch ---------- */

.tabelle-huelle { margin: 20px 0 16px; }
table { width: 100%; border-collapse: collapse; font-family: var(--schild); font-size: var(--s18); line-height: 1.3; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 700; border-bottom: 2px solid var(--graphit); padding: 6px 10px 6px 0; vertical-align: bottom; }
td { border-bottom: 1px solid var(--schotter); padding: 9px 10px 9px 0; vertical-align: top; font-weight: 500; }
td:first-child { font-weight: 700; }
th.zahl, td.zahl { text-align: right; padding-right: 0; padding-left: 10px; }
.tabelle-huelle + p, .tabelle-huelle + .knopfabsatz { margin-top: 0; }
.anmerkung { font-size: var(--s16); color: var(--graphit-leise); }

@media (max-width: 639px) {
  .tabelle-huelle table, .tabelle-huelle tbody, .tabelle-huelle tr, .tabelle-huelle td { display: block; }
  .tabelle-huelle thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tabelle-huelle tr { border-bottom: 1px solid var(--schotter); padding: 10px 0; }
  .tabelle-huelle tr:first-child { border-top: 2px solid var(--graphit); }
  .tabelle-huelle td { border: 0; padding: 1px 0; display: grid; grid-template-columns: 9.5rem 1fr; gap: 10px; text-align: left; }
  .tabelle-huelle td.zahl { text-align: left; padding-left: 0; }
  .tabelle-huelle td::before { content: attr(data-label); font-weight: 500; color: var(--graphit-leise); }
  .tabelle-huelle td:first-child { display: block; font-size: var(--s22); padding-bottom: 4px; }
  .tabelle-huelle td:first-child::before { content: none; }
}

/* ---------- Häufige Fragen, Autor, Quellen ---------- */

.fragen h3 { font-family: var(--text); font-weight: 600; font-size: var(--s18); color: var(--graphit); margin: 28px 0 4px; }
@media (min-width: 640px) { .fragen h3 { font-size: var(--s22); } }

.autor { border-top: 2px solid var(--graphit); border-bottom: 2px solid var(--graphit); padding: 4px 0 8px; margin-top: 56px; }
.autor h2 { font-size: var(--s22); margin-top: 16px; }

.quellen { font-size: var(--s16); }
.quellen h2 { font-size: var(--s22); }
.quellen li { overflow-wrap: anywhere; }

.nachbarn { margin-top: 56px; }
.liste-kursbuch { list-style: none; padding: 0; margin: 12px 0 0; font-family: var(--schild); font-size: var(--s22); max-width: 36rem; }
.liste-kursbuch li { display: flex; align-items: baseline; gap: 8px; margin: 0; padding: 7px 0; border-bottom: 1px solid var(--schotter); }
.liste-kursbuch li a { font-weight: 700; }
.liste-kursbuch .punkte { flex: 1; border-bottom: 2px dotted var(--schotter); transform: translateY(-5px); min-width: 20px; }
.liste-kursbuch .wert { font-weight: 500; white-space: nowrap; font-variant-numeric: tabular-nums; }

.stand-ende { font-family: var(--schild); font-size: var(--s18); color: var(--graphit-leise); margin-top: 40px; }

/* ---------- Abfahrtstafel (Startseite) ---------- */

.tafel {
  background: var(--wagenblau);
  color: var(--signalgelb);
  padding: 16px 14px 18px;
  margin: 24px 0 12px;
  border-radius: 3px;
}
.tafel :focus-visible { outline-color: var(--signalgelb); }
.tafel__wahl-titel { font-family: var(--schild); font-weight: 500; font-size: var(--s18); color: var(--emaille); margin: 0 0 8px; }
.tafel > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tafel__wahl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 14px; }
.tafel__wahl label {
  font-family: var(--schild); font-weight: 700; font-size: var(--s18);
  text-align: center; padding: 8px 4px; cursor: pointer;
  color: var(--emaille); border: 1px solid var(--schotter); border-radius: 2px;
}
.tafel__anzeige table { display: none; }
.tafel__ueberschrift { display: none; font-family: var(--schild); font-weight: 500; font-size: var(--s18); color: var(--emaille); margin: 0 0 4px; }
.tafel table { font-size: var(--s22); color: var(--signalgelb); }
.tafel th { color: var(--schotter); font-weight: 500; font-size: var(--s16); border-bottom: 1px solid var(--schotter); padding-right: 6px; }
.tafel td { border-bottom: 1px solid rgba(217, 222, 220, 0.28); font-weight: 700; padding: 8px 6px 8px 0; vertical-align: baseline; }
.tafel td.zahl, .tafel th.zahl { padding-left: 6px; padding-right: 0; }
.tafel td a { color: var(--signalgelb); text-decoration: none; }
.tafel td a:hover, .tafel td a:focus-visible { text-decoration: underline; }
.tafel .fb { display: inline-block; white-space: nowrap; }
@media (min-width: 640px) {
  .tafel { padding: 22px 26px 24px; }
  .tafel__wahl { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .tafel table { font-size: var(--s28); }
  .tafel th { font-size: var(--s18); }
}
.tafel-fuss { font-size: var(--s16); color: var(--graphit-leise); max-width: var(--spalte); }

/* Auswahl des Abfahrtsorts ohne JavaScript */
#ab-hamburg:checked ~ .tafel__anzeige .t-hamburg { display: table; }
#ab-hamburg:checked ~ .tafel__wahl label[for="ab-hamburg"] { background: var(--signalgelb); color: var(--wagenblau); border-color: var(--signalgelb); }
#ab-hamburg:focus-visible ~ .tafel__wahl label[for="ab-hamburg"] { outline: 3px solid var(--signalgelb); outline-offset: 2px; }
#ab-berlin:checked ~ .tafel__anzeige .t-berlin { display: table; }
#ab-berlin:checked ~ .tafel__wahl label[for="ab-berlin"] { background: var(--signalgelb); color: var(--wagenblau); border-color: var(--signalgelb); }
#ab-berlin:focus-visible ~ .tafel__wahl label[for="ab-berlin"] { outline: 3px solid var(--signalgelb); outline-offset: 2px; }
#ab-hannover:checked ~ .tafel__anzeige .t-hannover { display: table; }
#ab-hannover:checked ~ .tafel__wahl label[for="ab-hannover"] { background: var(--signalgelb); color: var(--wagenblau); border-color: var(--signalgelb); }
#ab-hannover:focus-visible ~ .tafel__wahl label[for="ab-hannover"] { outline: 3px solid var(--signalgelb); outline-offset: 2px; }
#ab-koeln:checked ~ .tafel__anzeige .t-koeln { display: table; }
#ab-koeln:checked ~ .tafel__wahl label[for="ab-koeln"] { background: var(--signalgelb); color: var(--wagenblau); border-color: var(--signalgelb); }
#ab-koeln:focus-visible ~ .tafel__wahl label[for="ab-koeln"] { outline: 3px solid var(--signalgelb); outline-offset: 2px; }
#ab-frankfurt:checked ~ .tafel__anzeige .t-frankfurt { display: table; }
#ab-frankfurt:checked ~ .tafel__wahl label[for="ab-frankfurt"] { background: var(--signalgelb); color: var(--wagenblau); border-color: var(--signalgelb); }
#ab-frankfurt:focus-visible ~ .tafel__wahl label[for="ab-frankfurt"] { outline: 3px solid var(--signalgelb); outline-offset: 2px; }
#ab-muenchen:checked ~ .tafel__anzeige .t-muenchen { display: table; }
#ab-muenchen:checked ~ .tafel__wahl label[for="ab-muenchen"] { background: var(--signalgelb); color: var(--wagenblau); border-color: var(--signalgelb); }
#ab-muenchen:focus-visible ~ .tafel__wahl label[for="ab-muenchen"] { outline: 3px solid var(--signalgelb); outline-offset: 2px; }
