/* =====================================================================================================
   fdlonline – Design-System [Entscheidungen 21.11.2026]
   Modern, clean, eckig (4 px Buttons, 6 px Flächen), Hell und Dunkel, Farbe aus Marke und Signalwesen:
   Schieferblau der Marke, Signalrot (Hauptaktion), Fahrstraßengelb (Lernen, Hervorhebung), Fahrtgrün (frei).
   Farbe trägt nie allein Information: Besetzung und Zustände stehen immer auch als Text daneben.
   ===================================================================================================== */

@font-face { font-family: 'Instrument Sans'; src: url('/fonts/InstrumentSans-Regular.ttf') format('truetype'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/InstrumentSans-Bold.ttf') format('truetype'); font-weight: 600 800; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/fonts/InstrumentSans-Italic.ttf') format('truetype'); font-style: italic; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/GeistMono-Regular.ttf') format('truetype'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/GeistMono-Bold.ttf') format('truetype'); font-weight: 600 800; font-display: swap; }

:root {
  /* Marke (FDL-OMedia) */
  --brand: #1b2430; --brand-2: #22272c; --brand-line: #2f3a47; --brand-text: #eef1f4; --brand-muted: #a9b3bd;
  --sig-red: #c8161d; --sig-red-hover: #a81218; --sig-yellow: #f2c14e; --sig-yellow-ink: #1b2430; --sig-green: #1f8a4c; --sig-amber: #b06e00;
  /* Fläche und Text, hell */
  --bg: #f5f6f8; --panel: #ffffff; --panel-2: #eef1f4; --ink: #14191f; --muted: #57616b; --line: #e1e5e9; --line-2: #c7ced5;
  --link: #14191f; --focus: #f2c14e; --accent: var(--sig-red);
  --ok: #1f7a43; --bad: #b3141a; --w-free: #1f7a43; --w-busy: #b3141a; --w-res: #8f5a00;
  --head-bg: rgba(255, 255, 255, .92); --shadow: 0 1px 0 var(--line);
  /* Stelltischgrund bleibt in beiden Modi dunkel */
  --gb-bg: #121a1f; --gb-track: #8c979f; --gb-route: #f2c14e; --gb-occ: #ff5a4f; --gb-text: #dfe6ea; --gb-dim: #5f6a72;
  --w-melder: #f6f1d6;
  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--bg);
}
:root[data-theme="dark"] {
  --bg: #0e1318; --panel: #151c23; --panel-2: #1b242c; --ink: #edf0f3; --muted: #9aa5af; --line: #25303a; --line-2: #36424e;
  --link: #edf0f3; --sig-red: #e5322d; --sig-red-hover: #f04a44; --sig-green: #3fbf7a; --sig-amber: #f2c14e;
  --ok: #4cc38a; --bad: #ff6b62; --w-free: #4cc38a; --w-busy: #ff7a70; --w-res: #f2c14e;
  --head-bg: rgba(14, 19, 24, .92); --brand: #151d27;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--sig-red); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--panel); color: var(--ink); padding: 8px 12px; z-index: 20; }
main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 24px 56px; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -0.015em; margin: 6px 0 14px; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; margin: 28px 0 12px; }
h3 { font-size: 17px; margin: 0 0 8px; }
.muted { color: var(--muted); } .small { font-size: 14px; }
code, kbd, .simclock, .bigclock, td.w-num { font-family: var(--mono); }

/* ---------------------------------------------------------------- Bedienelemente: eckig, ruhig */
button, .btnlink { font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; padding: 9px 16px; min-height: 40px; border-radius: 4px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
button:hover, .btnlink:hover { filter: brightness(1.12); }
button:disabled { opacity: .5; cursor: not-allowed; filter: none; }
button.ghost, .btnlink.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
button.ghost:hover, .btnlink.ghost:hover { border-color: var(--ink); filter: none; }
button.small, .btnlink.small { padding: 4px 10px; min-height: 32px; font-size: 14px; }
.btn-main { background: var(--sig-red); border-color: var(--sig-red); color: #fff; }
.btn-main:hover { background: var(--sig-red-hover); border-color: var(--sig-red-hover); filter: none; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--ink); background: var(--panel); padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--ink); }
table { background: var(--panel); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }

/* ---------------------------------------------------------------- Kopf */
.top { position: sticky; top: 0; z-index: 10; background: var(--head-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); color: var(--ink); }
.top-in { max-width: 1280px; margin: 0 auto; padding: 0 24px; min-height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; flex: none; padding: 6px 0; }
.brand img { height: 38px; width: auto; display: block; }
.brand .brand-d { display: none; }
[data-theme="dark"] .brand .brand-l { display: none; } [data-theme="dark"] .brand .brand-d { display: block; }
.top nav#nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.top nav#nav > a, .nav-more > summary { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; padding: 21px 10px 19px; border-bottom: 2px solid transparent; cursor: pointer; list-style: none; }
.nav-more > summary { display: inline-flex; align-items: center; }
.nav-more > summary::-webkit-details-marker { display: none; }
.top nav#nav > a:hover, .nav-more > summary:hover { color: var(--ink); }
.top nav#nav > a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--sig-red); }
.nav-more { position: relative; margin: 0; }
.nav-more > summary::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); }
.nav-more[open] > summary { color: var(--ink); }
.nav-more-list { position: absolute; top: calc(100% - 4px); left: 0; min-width: 200px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 6px; display: flex; flex-direction: column; box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .35); }
.nav-more-list a { color: var(--ink); text-decoration: none; padding: 9px 12px; border-radius: 4px; }
.nav-more-list a:hover, .nav-more-list a[aria-current="page"] { background: var(--panel-2); }
.top-search { display: flex; }
.top-search input { width: 180px; padding: 7px 10px; font-size: 14px; background: var(--panel-2); border-color: transparent; }
.top-search input:focus-visible { background: var(--panel); }
.who { display: flex; gap: 8px; align-items: center; font-size: 15px; flex: none; }
.who .user { font-weight: 600; text-decoration: none; padding: 0 4px; }
.icon-btn { background: transparent; border: 1px solid var(--line-2); color: var(--ink); width: 40px; padding: 0; }
.icon-btn:hover { border-color: var(--ink); filter: none; }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

/* ---------------------------------------------------------------- Meldungen */
.notice { max-width: 1232px; margin: 14px auto 0; padding: 11px 16px; border-radius: 6px; border: 1px solid; width: calc(100% - 48px); font-weight: 500; }
.notice.ok { background: color-mix(in srgb, var(--ok) 10%, var(--panel)); border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.notice.err { background: color-mix(in srgb, var(--bad) 9%, var(--panel)); border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }

/* ---------------------------------------------------------------- Fuß */
.foot { border-top: 1px solid var(--line); background: var(--panel); }
.foot-in { max-width: 1280px; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 40px; align-items: start; font-size: 14px; color: var(--muted); }
.foot-brand img { height: 30px; width: auto; display: block; margin-bottom: 10px; }
.foot-brand .brand-d { display: none; }
[data-theme="dark"] .foot-brand .brand-l { display: none; } [data-theme="dark"] .foot-brand .brand-d { display: block; }
.footnav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--muted); } .foot a:hover { color: var(--ink); }
.foot-theme { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 18px; }
.foot-theme button { font-size: 14px; min-height: 32px; padding: 4px 10px; }
.foot-theme button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------------------------------------------------------------- Status nach Signalfarben (immer mit Text) */
.w-occ { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.w-occ::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.w-occ-free { color: var(--w-free); } .w-occ-free::before { background: var(--sig-green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sig-green) 22%, transparent); }
.w-occ-busy { color: var(--w-busy); } .w-occ-busy::before { background: var(--sig-red); }
.w-occ-res { color: var(--w-res); } .w-occ-res::before { background: var(--sig-yellow); border: 1px solid var(--sig-amber); }
.w-short { display: inline-block; margin-left: 8px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 3px; font: 600 12px/1.6 var(--mono); color: var(--muted); }
.w-short-lg { font-size: 15px; vertical-align: middle; margin-left: 12px; padding: 1px 8px; }

/* =====================================================================================================
   Startseite
   ===================================================================================================== */
main:has(.w-home) { padding-top: 0; max-width: none; padding-inline: 0; }
.w-wrap { max-width: 1280px; margin: 0 auto; padding-inline: 24px; }
.w-num, .w-clock, .w-clock-sm { font-variant-numeric: tabular-nums; }

/* --- Bühne: Schieferblau der Marke, in beiden Modi */
.w-hero { background: var(--brand); color: var(--brand-text); position: relative; overflow: hidden; }
.w-hero-in { max-width: 1280px; margin: 0 auto; padding: 72px 24px 0; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.w-hero h1 { font-size: clamp(42px, 6.2vw, 84px); line-height: .98; letter-spacing: -0.03em; font-weight: 700; margin: 0; color: #fff; }
.w-hero h1 span { display: block; }
.w-hero h1 .w-h1-2 { color: var(--sig-yellow); }
.w-lede { font-size: 19px; line-height: 1.55; max-width: 34em; margin: 24px 0 30px; color: var(--brand-muted); }
.w-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.w-cta .btnlink, .w-cta button { min-height: 50px; padding: 0 22px; font-size: 16px; }
.w-hero .btn-quiet { background: transparent; border: 1px solid #5b6774; color: #fff; }
.w-hero .btn-quiet:hover { border-color: #fff; filter: none; }
.w-hero-art { align-self: end; margin-bottom: -2px; }
.w-hero-art svg { width: 100%; height: auto; display: block; }
.w-hero-art .lit { animation: w-licht .5s ease-out both; animation-delay: calc(var(--i) * 90ms + 300ms); }
@keyframes w-licht { from { fill: #3d454c; } to { fill: #f2c14e; } }
@media (prefers-reduced-motion: reduce) { .w-hero-art .lit { animation: none; } }
.w-hero-rail { height: 6px; background: repeating-linear-gradient(90deg, #3d454c 0 26px, transparent 26px 40px); }
.w-insts { background: var(--brand-2); border-top: 1px solid var(--brand-line); }
.w-insts-in { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.w-inst { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 18px; padding: 18px 24px 18px 0; color: var(--brand-text); text-decoration: none; border-right: 1px solid var(--brand-line); }
.w-inst + .w-inst { padding-left: 24px; }
.w-inst:last-child { border-right: 0; }
.w-inst:hover .w-clock { color: var(--sig-yellow); }
.w-clock { grid-row: 1 / 3; font: 600 34px/1 var(--mono); color: #fff; align-self: center; letter-spacing: -0.02em; }
.w-inst-name { font-weight: 600; font-size: 15px; }
.w-inst-meta { font-size: 14px; color: var(--brand-muted); }

/* --- Live-Netzkarte */
.w-live { padding-top: 64px; }
.w-sechead { display: flex; justify-content: space-between; align-items: end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 20px; }
.w-sechead h2 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.02em; margin: 0; }
.w-sechead p { margin: 6px 0 0; color: var(--muted); max-width: 40em; }
.w-segs { display: inline-flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; }
.w-seg { background: transparent; color: var(--muted); border: 0; border-radius: 0; min-height: 36px; padding: 0 14px; font-size: 14px; }
.w-seg + .w-seg { border-left: 1px solid var(--line-2); }
.w-seg[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.w-seg:hover { filter: none; color: var(--ink); } .w-seg[aria-pressed="true"]:hover { color: var(--bg); }
.w-stage { margin: 0; background: var(--gb-bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.w-stage-bar { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #222c33; color: #8d989f; font: 13px var(--mono); }
.w-stage-bar .w-live-dot { display: inline-flex; align-items: center; gap: 8px; color: #dfe6ea; }
.w-live-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; }
.w-stage-gb .gleisbild { height: 360px; cursor: default; }
.w-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 11px 16px; border-top: 1px solid #222c33; color: #8d989f; font-size: 13px; }
.w-legend span::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: 8px; vertical-align: middle; background: var(--gb-track); }
.w-legend .lg-route::before { background: var(--gb-route); } .w-legend .lg-occ::before { background: var(--gb-occ); }

/* --- Was du im Spiel machst */
.w-feats { padding-top: 88px; }
.w-feats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 8px; }
.w-feat { border-top: 3px solid var(--line-2); padding-top: 18px; }
.w-feat:nth-child(1) { border-top-color: var(--sig-yellow); } .w-feat:nth-child(2) { border-top-color: var(--sig-green); } .w-feat:nth-child(3) { border-top-color: var(--sig-red); }
.w-feat h3 { font-size: 19px; margin-bottom: 8px; }
.w-feat p { margin: 0; color: var(--muted); }

/* --- Farbiges Band: Lernsystem (Fahrstraßengelb) */
.w-band { margin-top: 88px; background: var(--sig-yellow); color: var(--sig-yellow-ink); }
.w-band-in { max-width: 1280px; margin: 0 auto; padding: 48px 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: center; }
.w-band h2 { font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.02em; margin: 0 0 8px; }
.w-band p { margin: 0; font-size: 17px; max-width: 42em; }
.w-band .btnlink, .w-band button { background: var(--sig-yellow-ink); border-color: var(--sig-yellow-ink); color: #fff; min-height: 50px; padding: 0 22px; font-size: 16px; }
.w-band-steps { display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 16px; padding: 0; list-style: none; font-weight: 600; }
.w-band-steps li::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 8px; border: 2px solid currentColor; border-radius: 50%; vertical-align: -1px; }
.w-band-steps li.done::before { background: currentColor; }

/* --- Spalten und Kästen */
.w-two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; padding-top: 88px; }
.w-box { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 24px; min-width: 0; }
.w-box-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.w-box-head h2 { margin: 0; font-size: 22px; }
.w-box-head a { font-weight: 600; font-size: 15px; }
.w-scroll { overflow-x: auto; }
.w-table { width: 100%; border-collapse: collapse; background: transparent; font-size: 15px; }
.w-table th, .w-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.w-table thead th { font-size: 13px; font-weight: 600; color: var(--muted); border-bottom-color: var(--line-2); }
.w-table tbody th { font-weight: 600; white-space: nowrap; }
.w-table tbody tr:last-child > * { border-bottom: 0; }
.w-table tbody tr:hover { background: var(--panel-2); }
.w-box > .w-scroll .w-table th:first-child, .w-box > .w-scroll .w-table td:first-child { padding-left: 0; }
.w-empty { padding: 22px 12px !important; color: var(--muted); }
.w-evs { list-style: none; padding: 0; margin: 0; }
.w-evs li { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.w-evs li:first-child { border-top: 0; padding-top: 4px; }
.w-evs p { margin: 3px 0 0; }
.w-evs time { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line-2); border-top: 4px solid var(--sig-red); border-radius: 4px; padding: 4px 0 5px; background: var(--panel); }
.w-ev-day { font: 600 22px/1.1 var(--mono); }
.w-ev-mon { font-size: 12px; color: var(--muted); }
.w-ev-title { font-weight: 600; }
.w-evs-sm li { grid-template-columns: minmax(0, 1fr); padding: 10px 0; }
.w-bottom { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; padding-top: 24px; padding-bottom: 96px; }

/* --- Neuigkeiten */
.w-news { list-style: none; margin: 0; padding: 0; }
.w-news li { padding: 14px 0; border-top: 1px solid var(--line); }
.w-news li:first-child { border-top: 0; padding-top: 2px; }
.w-news time { font: 13px var(--mono); color: var(--muted); }
.w-news h3 { margin: 2px 0 4px; font-size: 17px; }
.w-news h3 a { text-decoration: none; } .w-news h3 a:hover { text-decoration: underline; }
.w-news p { margin: 0; color: var(--muted); }
.w-tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 3px; background: var(--panel-2); color: var(--muted); margin-left: 8px; vertical-align: 2px; }
.w-tag-update { background: color-mix(in srgb, var(--sig-yellow) 30%, var(--panel)); color: var(--ink); }
.w-tag-stellwerk { background: color-mix(in srgb, var(--sig-green) 18%, var(--panel)); color: var(--ink); }
.w-tag-wartung { background: color-mix(in srgb, var(--sig-red) 14%, var(--panel)); color: var(--ink); }

/* --- Discord */
.w-discord { background: #5865f2; color: #fff; border-color: #5865f2; }
.w-discord h2 { color: #fff; }
.w-discord p { margin: 0 0 16px; color: #e3e6ff; }
.w-discord .w-online { font: 600 34px/1 var(--mono); color: #fff; display: block; margin: 6px 0 4px; }
.w-discord .btnlink { background: #fff; color: #2a2f8c; border-color: #fff; }
.w-discord-names { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; }
.w-discord-names li { background: rgba(255, 255, 255, .16); border-radius: 3px; padding: 2px 8px; font-size: 13px; }

/* =====================================================================================================
   Unterseiten
   ===================================================================================================== */
.w-page { max-width: 1180px; }
.w-page > h1, .w-pagehead h1 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -0.025em; margin: 10px 0 10px; }
.w-pagehead { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.w-intro { max-width: 46em; color: var(--muted); font-size: 17px; margin: 0 0 8px; }
.w-note { background: var(--panel-2); border-left: 3px solid var(--sig-yellow); padding: 10px 14px; max-width: 46em; border-radius: 0 4px 4px 0; }
.w-note-warn { border-left-color: var(--sig-red); }
.w-filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin: 20px 0 10px; }
.w-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.w-field input { min-width: 260px; }
.w-count { font-size: 14px; color: var(--muted); margin: 10px 0; }
.w-crumbs { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.w-crumbs a { color: var(--muted); }
.w-catalog-box { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 4px 16px; }

/* --- Netzkarte */
.w-mapwrap { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
.w-map { width: 100%; height: auto; max-height: 560px; display: block; }
.w-map-link { stroke: var(--ink); stroke-width: 3; }
.w-map-ilk rect:first-of-type { stroke-width: 1.5; }
.w-map-ilk:hover rect:first-of-type { stroke: var(--ink); stroke-width: 3; }
.w-map-ilk:focus-visible { outline: none; } .w-map-ilk:focus-visible rect:first-of-type { stroke: var(--focus); stroke-width: 4; }
.w-map-name { font-size: 17px; font-weight: 650; fill: var(--ink); font-family: var(--font); }
.w-map-sub { font-size: 12px; fill: var(--muted); font-family: var(--font); }
.w-map-occ text { font-size: 10px; font-weight: 600; font-family: var(--font); }
.w-map-occ.is-free rect { fill: var(--panel); stroke: var(--w-free); } .w-map-occ.is-free text { fill: var(--w-free); }
.w-map-occ.is-busy rect { fill: var(--sig-red); stroke: var(--sig-red); } .w-map-occ.is-busy text { fill: #fff; }
.w-r0 { --tone: #fbeec9; --tone-line: #c99a2e; } .w-r1 { --tone: #e2ecfb; --tone-line: #5b7fc0; } .w-r2 { --tone: #dff1e6; --tone-line: #3f9a63; }
.w-r3 { --tone: #f6e0e0; --tone-line: #c0504d; } .w-r4 { --tone: #ebe3f6; --tone-line: #8063b5; } .w-r5 { --tone: #dcf0f1; --tone-line: #3c9aa0; }
.w-rnone { --tone: var(--panel-2); --tone-line: var(--line-2); }
[data-theme="dark"] .w-r0 { --tone: #3a3220; } [data-theme="dark"] .w-r1 { --tone: #1f2b3d; } [data-theme="dark"] .w-r2 { --tone: #1d3326; }
[data-theme="dark"] .w-r3 { --tone: #3a2324; } [data-theme="dark"] .w-r4 { --tone: #2c2439; } [data-theme="dark"] .w-r5 { --tone: #1c3335; }
.w-map-ilk rect:first-of-type { fill: var(--tone); stroke: var(--tone-line); }
.w-regions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.w-region { border: 1px solid var(--line); border-top: 4px solid var(--tone-line); background: var(--panel); border-radius: 4px; padding: 12px 16px; }
.w-region ul { padding-left: 18px; margin: 0; }

/* --- Steckbrief */
.w-prof-head h1 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.025em; margin: 8px 0 6px; }
.w-prof-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.w-preview { border-radius: 6px; }
.w-preview .gleisbild { height: 300px; cursor: default; }
.w-facts { display: grid; grid-template-columns: 160px 1fr; margin: 0; border-top: 1px solid var(--line); }
.w-facts dt, .w-facts dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.w-facts dt { color: var(--muted); font-size: 14px; }
.w-facts ul { margin: 0; padding: 0; list-style: none; }
.w-prof-side { position: sticky; top: 84px; }
.w-takes { list-style: none; padding: 0; margin: 0 0 10px; }
.w-take { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.w-take-head { display: flex; justify-content: space-between; width: 100%; }
.w-clock-sm { font: 600 15px var(--mono); }
.w-joins { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.w-joins button { width: 100%; }
.w-take p { margin: 0; }
.w-watch { margin-top: 4px; }

/* --- Kalender */
.w-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.w-cal-nav h2 { margin: 0; font-size: 22px; }
.w-cal-head, .w-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.w-cal-head span { font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 8px; }
.w-cal { border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--panel); border-radius: 4px; overflow: hidden; }
.w-cal > div { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px 8px; }
.w-cal-pad { background: var(--panel-2); }
.w-cal-day { display: flex; flex-direction: column; gap: 4px; }
.w-cal-day.is-today { box-shadow: inset 0 3px 0 var(--sig-red); }
.w-cal-num { font: 14px var(--mono); color: var(--muted); display: flex; justify-content: space-between; }
.is-today .w-cal-num { color: var(--ink); font-weight: 600; }
.w-cal-today { font-family: var(--font); font-size: 12px; }
.w-cal-ev { display: block; font-size: 13px; line-height: 1.3; text-decoration: none; color: var(--ink); background: color-mix(in srgb, var(--sig-yellow) 28%, var(--panel)); border-left: 3px solid var(--sig-yellow); padding: 4px 6px; border-radius: 2px; }
.w-cal-ev:hover { background: color-mix(in srgb, var(--sig-yellow) 45%, var(--panel)); }
.w-cal-ev.is-cancelled { text-decoration: line-through; color: var(--muted); border-left-color: var(--line-2); background: var(--panel-2); }

/* --- Hilfe, Rechtliches, Suche */
.w-help { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 22px; }
.w-help-col { border-top: 3px solid var(--ink); padding-top: 4px; }
.w-help-col:nth-child(1) { border-top-color: var(--sig-green); } .w-help-col:nth-child(2) { border-top-color: var(--sig-yellow); } .w-help-col:nth-child(3) { border-top-color: var(--sig-red); }
.w-help-col h2 { margin-top: 12px; }
.w-help-col ul { list-style: none; padding: 0; margin: 0 0 14px; }
.w-help-col li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.w-help-col li p { margin: 2px 0 0; }
.w-legal { max-width: 760px; }
.w-ph { background: color-mix(in srgb, var(--sig-yellow) 30%, var(--panel)); border: 1px dashed var(--sig-amber); padding: 0 5px; border-radius: 2px; }
.w-searchform { display: flex; gap: 10px; margin: 18px 0 8px; max-width: 640px; }
.w-searchform input { flex: 1; font-size: 17px; padding: 10px 14px; }
.w-results { display: grid; gap: 28px; margin-top: 22px; }
.w-results section h2 { margin: 0 0 8px; font-size: 18px; }
.w-results ul { list-style: none; padding: 0; margin: 0; }
.w-results li { padding: 10px 0; border-top: 1px solid var(--line); }
.w-results li p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.w-external { display: flex; flex-wrap: wrap; gap: 10px; }
mark { background: color-mix(in srgb, var(--sig-yellow) 55%, transparent); color: inherit; padding: 0 1px; border-radius: 2px; }

/* --- Persönliche Übersicht und Dienstbuch */
.w-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-top: 20px; }
.w-dash .w-box h2 { font-size: 20px; }
.w-kv { display: flex; gap: 28px; flex-wrap: wrap; margin: 6px 0 14px; }
.w-kv div { display: flex; flex-direction: column; }
.w-kv strong { font: 600 28px/1.1 var(--mono); }
.w-kv span { font-size: 13px; color: var(--muted); }
.w-progress { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; margin: 8px 0 6px; }
.w-progress span { display: block; height: 100%; background: var(--sig-green); }
.w-shifts .w-table td.w-num, .w-shifts .w-table th.w-num { text-align: right; }
.w-plain { list-style: none; padding: 0; margin: 0; }
.w-plain li { padding: 10px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.w-plain li:first-child { border-top: 0; }
.w-switch { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.w-switch input { width: 18px; height: 18px; accent-color: var(--sig-red); }

.w-fs { border: 1px solid var(--line); border-radius: 6px; padding: 10px 16px 12px; margin: 0; }
.w-fs legend { font-weight: 600; font-size: 14px; padding: 0 6px; color: var(--muted); }
.w-res { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.w-res select { padding: 5px 8px; font-size: 14px; max-width: 160px; }
.w-evs-sm li { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }

/* --- Neuigkeiten (Seite) */
.w-article { max-width: 720px; }
.w-article .w-article-body { font-size: 17px; line-height: 1.65; }
.w-article .w-article-body p { margin: 0 0 1em; }
.w-newsform textarea { width: 100%; min-height: 220px; }
.w-newsform input[type="text"] { width: 100%; }

/* =====================================================================================================
   Dunkelmodus für die Arbeitsseiten (Stellwerk, Editoren, Verwaltung im Spiel): helle Hilfsflächen anpassen
   ===================================================================================================== */
[data-theme="dark"] .afk, [data-theme="dark"] .review { background: #3a2f12; border-color: #7a6223; color: var(--ink); }
[data-theme="dark"] .melder, [data-theme="dark"] .strecken { background: var(--panel-2); color: var(--ink); }
[data-theme="dark"] .tgrp { border-color: var(--line-2); } [data-theme="dark"] .tgrp legend { color: var(--muted); }
[data-theme="dark"] .st, [data-theme="dark"] .tag { background: var(--panel-2); color: var(--ink); }
[data-theme="dark"] .st-submitted { background: #3a3215; } [data-theme="dark"] .st-rejected { background: #3c1d1d; } [data-theme="dark"] .st-published { background: #183223; } [data-theme="dark"] .st-approved { background: #1b2a40; }
[data-theme="dark"] .report.ok { background: #183223; border-color: #2f6b47; } [data-theme="dark"] .report.bad { background: #3c1d1d; border-color: #7a3434; }
[data-theme="dark"] .tool { background: var(--panel); color: var(--ink); border-right-color: var(--line-2); }
[data-theme="dark"] .trains tr.sel td, [data-theme="dark"] .ft-regions tr.sel { background: #2a3340; }
[data-theme="dark"] .phone .convo, [data-theme="dark"] .telfenster, [data-theme="dark"] .schluesselwand { background: var(--panel-2); color: var(--ink); }
[data-theme="dark"] .evlist li { background: var(--panel); border-color: var(--line); }
[data-theme="dark"] .wetterbox { color: var(--muted); }
[data-theme="dark"] .mode-event { background: #2c2439; color: #d9ccff; }
[data-theme="dark"] .lesson, [data-theme="dark"] .lesson::before { background: #16261b; }
[data-theme="dark"] .lesson-fb.ok { background: #183223; color: #9fe0b6; } [data-theme="dark"] .lesson-fb.hint { background: #3a2f12; color: #f2d48a; }
[data-theme="dark"] .lektionen li { border-bottom-color: var(--line); }
[data-theme="dark"] .lektionen li.done strong, [data-theme="dark"] .kursstand.ok { color: var(--ok); }
[data-theme="dark"] .te-pitem { background: var(--panel-2); border-color: var(--line-2); }
[data-theme="dark"] th { color: var(--muted); }

/* =====================================================================================================
   Schmal
   ===================================================================================================== */
@media (max-width: 1100px) {
  .top-search { display: none; }
}
@media (max-width: 960px) {
  .w-hero-in { grid-template-columns: minmax(0, 1fr); padding-top: 48px; }
  .w-hero-art { max-width: 560px; margin-top: 8px; }
  .w-two, .w-bottom, .w-prof-grid { grid-template-columns: minmax(0, 1fr); }
  .w-feats-grid, .w-help { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .w-band-in { grid-template-columns: minmax(0, 1fr); }
  .w-prof-side { position: static; }
  .w-stage-gb .gleisbild { height: 260px; }
  /* Menü statt umbrechender Links */
  .top-in { flex-wrap: wrap; gap: 0 12px; }
  .menu-btn { display: inline-flex; order: 3; }
  .who { order: 2; margin-left: auto; }
  .top nav#nav { display: none; order: 4; flex: 1 1 100%; flex-direction: column; align-items: stretch; padding: 6px 0 14px; border-top: 1px solid var(--line); }
  .top.open nav#nav { display: flex; }
  .top nav#nav > a, .nav-more > summary { padding: 12px 4px; border-bottom: 0; }
  .top nav#nav > a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--sig-red); padding-left: 12px; }
  .nav-more-list { position: static; box-shadow: none; border: 0; padding: 0 0 0 12px; }
  .top.open .top-search { display: flex; order: 5; flex: 1 1 100%; padding-bottom: 14px; }
  .top.open .top-search input { width: 100%; }
  .who .who-name { display: inline-block; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
.nav-mobile { display: none; }
@media (max-width: 640px) {
  main { padding: 20px 16px 44px; }
  .top-in, .w-wrap, .w-hero-in, .w-insts-in, .w-band-in, .foot-in { padding-inline: 16px; }
  .brand img { height: 28px; }
  .top-in { gap: 0 8px; }
  .who { gap: 6px; }
  .who .btn-main, .who .who-logout { display: none; }
  .top.open nav#nav .nav-mobile { display: block; }
  .w-stage-gb { overflow-x: auto; }
  .w-stage-gb .gleisbild { min-width: 860px; height: 250px; }
  ul.w-evs.w-evs-sm li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .w-res { justify-content: flex-start; }
  .w-inst { border-right: 0; border-bottom: 1px solid var(--brand-line); padding: 14px 0 !important; }
  .w-inst:last-child { border-bottom: 0; }
  .w-clock { font-size: 28px; }
  .w-evs li { grid-template-columns: 52px minmax(0, 1fr); }
  .w-evs li > :nth-child(3) { grid-column: 2; }
  .w-cal-head { display: none; }
  .w-cal { grid-template-columns: 1fr; }
  .w-cal-pad, .w-cal-day:not(.has-ev):not(.is-today) { display: none; }
  .w-cal > div { min-height: 0; }
  .w-field, .w-field input { min-width: 0; width: 100%; }
  .w-facts { grid-template-columns: 1fr; } .w-facts dt { border-bottom: 0; padding-bottom: 0; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
  .w-box { padding: 18px; }
}
.w-sub { font-weight: 400; }
