/* ATLAS v6 — Designsprache „Liniennetz" (2026-10-08).
   ATLAS liest einen Lebenslauf wie einen Netzplan: Stationen, Linien,
   Umstiege, Richtung, Alternative. Vorbild sind die Netzpläne von Vignelli,
   BVG und Beck – flach, hell, streng geometrisch (nur 0°, 45°, 90°), runde
   Linienenden, Umsteigebahnhöfe als Kapseln, Liniensignale als Icons und eine
   Beschilderungsschrift (Barlow / Barlow Condensed, DIN-Verwandte).
   Jede Farbe hat genau EINE Aufgabe – wie in einer Zeichenerklärung:
   --red      Signalrot = DU: deine Linie, „Heute", deine Auswahl, Hauptaktion
   --l1…--l8  Linienfarben = Identität einer Kompetenz (fest, render.js
              LINE_COLORS); nie für Status, nie für Text
   --plan     Grau gestrichelt = in Planung: was der Lebenslauf nicht zeigt
   --warn-*   Gelb = Hinweis/Bedingung (wie ein Störungshinweis am Bahnsteig)
   --ink      Tinte = Inhalt, Stationen, Beschilderung
   Evidenz ist keine Farbe, sondern Ausbau: wie weit eine Linie fährt und ob
   sie in Betrieb (durchgezogen) oder im Bau (gestrichelt) ist.
   Kein Dark-Mode: der Plan liegt immer auf hellem Grund. Die einzige dunkle
   Fläche ist die Abfahrtstafel auf den Warte-Screens. */
:root {
  --paper: #f1f2f4; --paper-2: #e7e9ec; --paper-3: #d9dce1; --paper-4: #b4bac3; --sheet: #ffffff;
  --ink: #16181d; --ink-2: #474c55; --ink-3: #767c86;
  --red: #e2001a; --red-soft: #fde8ea; --red-ink: #b80016;
  --plan: #9aa1ab;
  --warn-line: #ffc20e; --warn-bg: #fff4cf; --warn-ink: #7a5600;
  --board: #0f1b33; --board-2: #1b2a49; --board-hi: #ffd23f;
  --l1: #1F5FD6; --l2: #EB7A00; --l3: #7B3FBF; --l4: #12A150; --l5: #D6247F; --l6: #0098A6; --l7: #9A5B2C; --l8: #7AA300;
  --font: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --head-h: 64px; --nav-h: 0px; --maxw: 1080px;   /* --nav-h: keine Fußleiste, der Viewport endet unten am Rand (Scrub rechnet damit) */
  --track: 8px;   /* Strichstärke deiner Linie */
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); background: var(--paper); color: var(--ink); overflow-x: hidden;
  min-height: 100vh; line-height: 1.5; font-size: 16.5px; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0;
}
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* ---------- Liniensignal (Kompetenz-Linie) ---------- */
.lb { display: inline-grid; place-items: center; min-width: 2.25em; height: 1.55em; padding: 0 .38em; border-radius: .36em; background: var(--lc, var(--ink));
  color: #fff; font: 700 13.5px/1 var(--cond); letter-spacing: .02em; vertical-align: .08em; flex: none; font-variant-numeric: tabular-nums; }
.lbs text { font: 700 14px var(--cond); fill: #fff; letter-spacing: .02em; }

/* ---------- Kopf: Marke, Linienband (Fortschritt), Status ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; height: var(--head-h); z-index: 10;
  display: flex; align-items: center; gap: 28px; padding: 0 28px;
  background: color-mix(in srgb, var(--sheet) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--paper-3);
}
/* Die Marke ist ein Liniensignal: ATLAS ist das Netz, „A" seine Linie in Rot */
.mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .1em; font-size: 17px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.mark::before { content: "A"; display: inline-grid; place-items: center; width: 30px; height: 23px; border-radius: 6px; background: var(--red); color: #fff; font: 700 16px/1 var(--cond); letter-spacing: 0; }
.mark .sub { font: 500 15px var(--cond); letter-spacing: .01em; color: var(--ink-3); }
/* Fortschritt als Linienband: fünf Stationen (Phasen), die Strecke dahinter
   rot gefahren, die aktuelle Station rot gefüllt („Sie sind hier"), die
   Strecke der aktuellen Phase füllt sich (Breite von i), am Ende die Endstation. */
.progress { flex: 1; display: flex; max-width: 560px; margin: 0 auto; position: relative; height: 44px; padding-right: 6px; }
.progress:empty { visibility: hidden; }
.progress::after { content: ""; position: absolute; right: 0; top: 7px; width: 7px; height: 22px; border-radius: 4px; background: var(--paper-4); }
.progress:has(.seg:last-child.done)::after, .progress:has(.seg:last-child.cur) .seg:last-child i[style*="100%"] { background: var(--red); }
.progress .seg { flex: 1; position: relative; height: 100%; }
.progress .seg::before { content: ""; position: absolute; left: 0; right: 0; top: 15px; height: 6px; background: var(--paper-3); }
.progress .seg i { position: absolute; left: 0; top: 15px; height: 6px; width: 0; background: var(--red); transition: width .5s cubic-bezier(.3,.7,.2,1); }
.progress .seg.done i { width: 100% !important; }
.progress .seg::after { content: ""; position: absolute; left: -2px; top: 9px; width: 18px; height: 18px; border-radius: 50%; background: var(--sheet); border: 4px solid var(--paper-4); box-sizing: border-box; z-index: 1; transition: border-color .3s, background .3s; }
.progress .seg.done::after { border-color: var(--ink); }
.progress .seg.cur::after { background: var(--red); border-color: var(--sheet); box-shadow: 0 0 0 3px var(--red); }
.progress .seg span { position: absolute; left: -4px; top: 27px; font: 600 12px/1.2 var(--cond); letter-spacing: .01em; color: var(--ink-3); white-space: nowrap; }
.progress .seg.cur span { color: var(--ink); }
.live { font: 500 14px var(--cond); color: var(--ink-2); white-space: nowrap; min-width: 140px; text-align: right; font-variant-numeric: tabular-nums; }
.live b { color: var(--ink); font-weight: 700; }
.live .glyph { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--red); font-size: 15px; display: inline-block; width: 1.1em; margin-right: 6px; vertical-align: -1px; }

.stage {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; padding: calc(var(--head-h) + 44px) 28px 72px;
  min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
}
.stage.top-align { justify-content: flex-start; }
.screen { animation: enter .5s cubic-bezier(.2,.7,.2,1) both; width: 100%; }
.screen.no-enter { animation: none; }
@keyframes enter { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }

/* ---------- Navigation im Fluss ---------- */
.backlink { align-self: flex-start; background: none; border: 0; padding: 0; margin: 0 0 22px; cursor: pointer; font: 600 16px var(--cond); color: var(--ink-3); }
.backlink:hover { color: var(--ink); }
.flownav { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 44px; }
.flownav .skip { background: none; border: 0; color: var(--ink-2); font: 500 16px var(--cond); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; padding: 0; }
.flownav .skip:hover { color: var(--ink); }
.flownav .hint { font: 500 15.5px var(--cond); color: var(--ink-3); }

/* Knöpfe wie ein Wegweiser: weiße Schrift auf Tinte, der Pfeil gehört dazu */
button.primary {
  display: inline-flex; align-items: center; gap: 14px;
  background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 14px 20px 14px 24px;
  font: 600 17.5px var(--font); letter-spacing: .005em; cursor: pointer; transition: background .15s, opacity .2s;
}
button.primary::after { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; transition: translate .2s cubic-bezier(.2,.7,.2,1);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h12.5M10.5 4.5 16 10l-5.5 5.5' fill='none' stroke='%23000' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 10h12.5M10.5 4.5 16 10l-5.5 5.5' fill='none' stroke='%23000' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
button.primary:hover:not(:disabled) { background: #000; }
button.primary:hover:not(:disabled)::after { translate: 3px 0; }
button.primary:disabled { background: var(--paper-3); color: var(--ink-3); cursor: default; }
button.secondary { background: var(--sheet); color: var(--ink); border: 2px solid var(--ink); border-radius: 10px; padding: 10px 18px; font: 600 16px var(--font); cursor: pointer; }
button.secondary:hover { background: var(--ink); color: #fff; }

/* ---------- Typografie ---------- */
/* Kennung über einem Titel: ein Stück deiner Linie, dann der Text */
.kicker { display: flex; align-items: center; gap: 12px; font: 600 18px var(--cond); letter-spacing: .01em; color: var(--ink-2); margin-bottom: 16px; }
.kicker::before { content: ""; width: 30px; height: var(--track); border-radius: 4px; background: var(--red); flex: none; }
h1.display { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.04; font-weight: 700; letter-spacing: -.018em; max-width: 19ch; margin-bottom: 20px; text-wrap: balance; }
h1.display.wide { max-width: 25ch; }
h1.display.long { font-size: clamp(27px, 3.3vw, 40px); max-width: 32ch; line-height: 1.12; }
h1.display.xlong { font-size: clamp(21px, 2.4vw, 29px); max-width: 46ch; line-height: 1.25; letter-spacing: -.008em; }
h2.title { font-size: clamp(28px, 3.3vw, 42px); line-height: 1.08; font-weight: 700; letter-spacing: -.015em; margin-bottom: 12px; max-width: 28ch; text-wrap: balance; }
.lead { font-size: 19px; color: var(--ink-2); max-width: 60ch; margin-bottom: 30px; line-height: 1.5; }
.small { font: 500 15px var(--cond); color: var(--ink-3); }
.empty { color: var(--ink-3); font-style: italic; }

/* ---------- Fragen ---------- */
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 820px; }
.options.single { grid-template-columns: 1fr; max-width: 640px; }
.options.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 920px; }
.options.compact .opt { padding: 17px 18px; }
.opt {
  display: flex; align-items: flex-start; gap: 14px; text-align: left; width: 100%;
  background: var(--sheet); border: 2px solid var(--paper-3); border-radius: 10px; padding: 19px 20px;
  font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; color: var(--ink);
}
.opt:hover { border-color: var(--ink-3); }
.opt.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
/* Auswahlknopf = Station: leer weiß mit Ring, gewählt rot gefüllt (Sie sind hier) */
.opt .box { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 3.5px solid var(--ink-3); background: var(--sheet); margin-top: 1px; transition: border-color .15s, background .15s; }
.opt.multi .box { border-radius: 6px; }
.opt.on .box { border-color: var(--red); background: var(--red); box-shadow: inset 0 0 0 3px var(--sheet); }
.opt .icon { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; background: var(--paper-2); display: grid; place-items: center; font-weight: 700; font-size: 18px; }
.opt .t { font-weight: 600; font-size: 18px; line-height: 1.28; }
.opt .d { font: 500 16px var(--cond); color: var(--ink-2); margin-top: 3px; }
.options.max .opt:not(.on) { opacity: .45; cursor: default; }
.ftext { width: 100%; max-width: 640px; font: inherit; font-size: 18px; padding: 15px 18px; border: 2px solid var(--paper-3); border-radius: 10px; background: var(--sheet); color: var(--ink); transition: border-color .15s; }
.ftext::placeholder { color: var(--ink-3); }
.ftext:focus { outline: none; border-color: var(--ink); }
.qmeta { font: 500 15px var(--cond); color: var(--ink-3); margin-top: 16px; }
.qwhy { margin-top: 22px; font: 500 16px var(--cond); color: var(--ink-2); max-width: 640px; }
.qwhy b { display: inline-block; margin-right: 8px; font-weight: 700; color: var(--ink); }

/* ---------- Start ---------- */
.start { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.start > div:first-child { padding-top: 34px; }
.start-right { display: grid; gap: 20px; }
/* Titelbild: ein kleiner Netzplan, der sich beim Laden zeichnet – die eine große Bewegung der Seite */
.hero-art { width: 100%; height: auto; display: block; overflow: visible; }
.hero-art .hl { fill: none; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s cubic-bezier(.45,0,.2,1) forwards; animation-delay: calc(.15s + var(--i, 0) * .14s); }
.hero-art .hst { fill: var(--sheet); stroke: var(--ink); stroke-width: 4; transform-box: fill-box; transform-origin: center; animation: pop .4s cubic-bezier(.2,.8,.3,1.4) backwards; animation-delay: calc(1s + var(--i, 0) * .1s); }
.hero-art .hub .cap { fill: var(--sheet); stroke: var(--red); stroke-width: 7; }
.hero-art .hub .halo { fill: none; stroke: var(--red); stroke-width: 2; opacity: 0; }
.hero-art .hub { transform-box: fill-box; transform-origin: center; animation: pop .5s cubic-bezier(.2,.8,.3,1.3) backwards 1.55s; }
.hero-art .hub .halo { transform-box: fill-box; transform-origin: center; animation: halo 2.6s ease-out 2.4s infinite; }
.hero-art .next { fill: none; stroke: var(--red); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 1 16; opacity: 0; animation: fade-in .8s ease forwards 2s; }
.hero-art .nextst circle { fill: var(--sheet); stroke: var(--plan); stroke-width: 4; stroke-dasharray: 6 5; }
.hero-art .nextst { opacity: 0; animation: fade-in .6s ease forwards 2.5s; }
.hero-art .hlab { font: 600 19px var(--cond); fill: var(--ink); opacity: 0; animation: fade-in .6s ease forwards 1.9s; }
.hero-art .nlab { fill: var(--ink-3); animation-delay: 2.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { opacity: 1; } }
@keyframes halo { 0% { scale: .7; opacity: .7; } 100% { scale: 1.5; opacity: 0; } }
.uploadbox {
  border: 2px dashed var(--paper-4); border-radius: 12px; padding: 24px; background: var(--sheet);
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start; transition: border-color .15s, background .15s;
}
.uploadbox.drag { border-color: var(--red); background: var(--red-soft); }
.uploadbox strong { font-size: 19px; font-weight: 600; }
.uploadbox .ok { font: 600 16px var(--cond); color: var(--ink); }
.uploadbox button:disabled { opacity: .5; cursor: default; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 2px solid var(--paper-3); background: var(--sheet); border-radius: 8px; padding: 7px 13px;
  font: 600 15.5px var(--cond); cursor: pointer; color: var(--ink); text-align: left; transition: border-color .15s, background .15s, color .15s;
}
.chip:hover { border-color: var(--ink-3); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:disabled { opacity: .5; cursor: default; }
.or { display: flex; align-items: center; gap: 12px; font: 500 15px var(--cond); color: var(--ink-3); margin: 22px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 2px; background: var(--paper-3); }
.cv-locked { font: 500 15.5px var(--cond); color: var(--ink-3); margin-top: 12px; }
/* Drei Schritte unter dem Titelbild: ein kurzer Linienverlauf mit drei Stationen */
.steps { display: grid; gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 15px; top: 22px; bottom: 22px; width: var(--track); border-radius: 4px; background: var(--ink); translate: -50% 0; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 14px; align-items: start; padding: 10px 0; position: relative; }
.step .n { width: 30px; height: 30px; border-radius: 50%; background: var(--sheet); border: 4px solid var(--ink); display: grid; place-items: center; font: 700 13px var(--cond); color: var(--ink); }
.step b { display: block; font-size: 17.5px; font-weight: 600; line-height: 1.25; margin-top: 3px; }
.step span { font: 500 16px var(--cond); color: var(--ink-2); }
.engine { display: grid; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--paper-3); max-width: 520px; }
.engine .lbl { font: 700 15px var(--cond); color: var(--ink-2); }
.rotator { display: flex; align-items: center; gap: 2px; margin: 0 0 26px; font-size: 22px; font-weight: 600; min-height: 1.6em; color: var(--ink); }
.rotator .line { white-space: pre-wrap; }
.rotator .cursor { display: inline-block; width: 3px; height: 1.1em; background: var(--red); margin-left: 3px; border-radius: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }

/* ---------- Kurzprofil: Fahrgastinformation ---------- */
.hero-card { background: var(--sheet); border: 2px solid var(--ink); border-radius: 12px; padding: 0 34px 30px; position: relative; overflow: hidden; }
.hero-card .k { margin: 0 -34px 26px; padding: 12px 34px; background: var(--ink); color: #fff; font: 600 17px var(--cond); letter-spacing: .01em; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.stat b { display: block; font-size: clamp(46px, 5vw, 64px); line-height: .95; font-weight: 700; color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat b::after { content: ""; display: block; width: 34px; height: var(--track); border-radius: 4px; background: var(--red); margin-top: 12px; }
.stat span { display: block; font: 600 17px var(--cond); color: var(--ink); margin-top: 10px; line-height: 1.25; }
.stat .beleg { display: block; font: 500 14.5px var(--cond); color: var(--ink-3); margin-top: 4px; }
.belege { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 8px; }
.belege li { position: relative; padding-left: 26px; font-size: 16px; color: var(--ink-2); }
.belege li::before { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 14px; border-radius: 50%; border: 3.5px solid var(--ink); box-sizing: border-box; }
.belege li.ctx::before { border-color: var(--warn-line); }
.check-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin: 36px 0 -10px; }
.check-k { font: 700 17px var(--cond); color: var(--ink-2); }
.korrektur { margin-top: 8px; display: grid; gap: 10px; max-width: 760px; }
.korrektur label { font-weight: 600; }
.korrektur textarea.ftext { resize: vertical; max-width: none; font-size: 16px; line-height: 1.45; }
.korrektur-body { display: grid; gap: 10px; }
.korrektur-body[hidden] { display: none; }

/* ---------- Stationen als Linienband (über der Tür der U-Bahn) ----------
   Deine Linie in Rot, jede Station ein Kreis, die letzte – heute – rot
   gefüllt: Sie sind hier. */
.timeline { position: relative; margin: 40px 0 26px; padding: 0 8px; }
.timeline .rail { position: absolute; top: 37px; height: var(--track); border-radius: 4px; background: var(--red);
  left: calc(8px + (100% - 16px - (var(--n, 1) - 1) * 12px) / var(--n, 1) / 2); right: calc(8px + (100% - 16px - (var(--n, 1) - 1) * 12px) / var(--n, 1) / 2); }
.timeline ol { list-style: none; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; position: relative; }
.timeline li { text-align: center; }
.timeline .when { font: 600 16px/22px var(--cond); color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.timeline .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--sheet); margin: 7px auto 10px; border: 5px solid var(--ink); position: relative; }
.timeline li:last-child .dot { background: var(--red); border-color: var(--sheet); box-shadow: 0 0 0 4px var(--red); }
.timeline .what { font-size: 15.5px; color: var(--ink-2); line-height: 1.35; }
.chg, .timeline .chg { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 5px; font: 700 13px var(--cond); color: var(--ink); background: var(--warn-line); vertical-align: 1px; }

/* Stationen-Korrektur */
.kin { width: 100%; font: inherit; font-size: 15.5px; padding: 8px 10px; border: 2px solid var(--paper-3); border-radius: 8px; background: var(--sheet); color: var(--ink); }
.kin:focus { outline: none; border-color: var(--ink); }
.mini { font: 600 15px var(--cond); padding: 6px 12px; border-radius: 8px; border: 2px solid var(--ink-3); background: transparent; color: var(--ink); cursor: pointer; }
.mini.go { background: var(--ink); border-color: var(--ink); color: #fff; }
.mini:disabled { opacity: .4; cursor: not-allowed; }
.timeline.editing ol { display: flex; flex-direction: column; gap: 14px; }
.timeline.editing .rail { display: none; }
.timeline.editing li { text-align: left; display: grid; grid-template-columns: 24px 1fr auto; column-gap: 12px; align-items: start; }
.timeline.editing .dot { grid-column: 1; grid-row: 1 / span 2; margin: 2px 0 0; width: 20px; height: 20px; border-width: 4px; box-shadow: none; }
.timeline.editing .when, .timeline.editing .what { grid-column: 2; }
.timeline.editing .xbtn { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.timeline .what .kin { margin-top: 8px; }
.xbtn { appearance: none; width: 30px; height: 30px; padding: 0; line-height: 1; font-size: 19px; cursor: pointer; border-radius: 8px; border: 2px solid var(--paper-3); background: var(--sheet); color: var(--ink-2); }
.xbtn:hover, .xbtn:focus-visible { outline: none; border-color: var(--red); color: var(--red); }
.st-editbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 20px; }
.st-editbar[hidden] { display: none; }
.st-add, .st-edit { font: 600 15px var(--cond); padding: 7px 13px; border-radius: 8px; border: 2px dashed var(--paper-4); background: transparent; color: var(--ink-2); cursor: pointer; }
.st-add:hover, .st-edit:hover, .st-edit:focus-visible { border-color: var(--ink); color: var(--ink); outline: none; }
.linkbtn { justify-self: start; font: 600 16px var(--cond); padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }

/* ---------- Hinweiskästen ---------- */
.callout { background: var(--sheet); border-left: 6px solid var(--ink); border-radius: 0 10px 10px 0; padding: 16px 20px; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; max-width: 900px; }
.callout .k { font: 700 16px var(--cond); color: var(--ink-2); padding-top: 2px; white-space: nowrap; }
.callout p { font-weight: 600; }
.callout + .callout { margin-top: 12px; }
.callout.answered { border-left-color: var(--red); }
.callout.warn { background: var(--warn-bg); border-left-color: var(--warn-line); }
.callout.warn .k { color: var(--warn-ink); }
.missing { background: var(--sheet); border: 2px dashed var(--plan); border-radius: 12px; padding: 18px 22px; max-width: 900px; overflow-wrap: anywhere; }
.missing .k { font: 700 16px var(--cond); color: var(--ink-2); margin-bottom: 8px; }
.missing ul { margin: 0 0 0 18px; font-weight: 600; }

/* ---------- Blatt 1: Kernthese ---------- */
.kern { margin: -4px 0 26px; max-width: 900px; }
.kchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.kchip { display: inline-flex; align-items: center; gap: 8px; font: 600 15.5px var(--cond); color: var(--ink); padding: 5px 12px 5px 9px; border: 2px solid var(--paper-3); background: var(--sheet); border-radius: 8px; }
.kchip::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 3px solid var(--ink); box-sizing: border-box; flex: none; }
.kwhy { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: baseline; border-left: var(--track) solid var(--red); border-radius: 4px; padding: 6px 0 6px 18px; }
.kwhy .k { font: 700 16px var(--cond); color: var(--ink-2); white-space: nowrap; }
.kwhy p { font-size: 18px; font-weight: 600; }
.kfit { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-top: 14px; font-size: 15.5px; color: var(--ink-2); padding: 10px 14px; border-radius: 8px; }
.kfit .k { font: 700 15.5px var(--cond); white-space: nowrap; color: var(--ink); }
.kfit.offen { background: var(--sheet); border: 2px dashed var(--plan); }
.kfit.teilweise { background: var(--warn-bg); border-left: 6px solid var(--warn-line); }
.refs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 22px; font-size: 15.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.refs .k { font: 700 16px var(--cond); color: var(--ink); }

/* ---------- Blatt 2: Standort + Tarifzonen-Netz ---------- */
.standort { margin: 2px 0 16px; max-width: 900px; }
.standort .srow { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; }
.standort .sp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.standort .sp .k { font: 600 15px var(--cond); color: var(--ink-3); }
.standort .sp b { font-size: 20px; font-weight: 700; }
.standort .sp .d { font: 500 15px var(--cond); color: var(--ink-3); }
.standort .sv { flex: 1 1 100%; font-weight: 600; font-size: 15.5px; padding: 7px 14px; border-left: 6px solid var(--ink); background: var(--sheet); border-radius: 0 8px 8px 0; }
.standort .sv.up { border-left-color: var(--red); }
.standort .sv.open { border-left: 0; border: 2px dashed var(--plan); border-radius: 8px; }
.standort .sb { font-size: 15px; color: var(--ink-2); margin-top: 8px; max-width: 80ch; }
/* Beleg-Zeile: Evidenz der gewählten Linie oder der Satz zur Lücke */
.fp-beleg { background: var(--sheet); border: 2px solid var(--paper-3); border-left: 6px solid var(--ink); border-radius: 0 10px 10px 0; padding: 11px 16px; margin-top: 14px; }
.fp-beleg .k { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 600 15px var(--cond); color: var(--ink-2); margin-bottom: 3px; }
.fp-beleg .k.gap { color: var(--ink-3); }
.fp-beleg h4 { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
.fp-beleg p { color: var(--ink-2); font-size: 15.5px; }
.fp { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.radar { width: 100%; max-width: 720px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.radar .zone { fill: var(--sheet); stroke: var(--paper-4); stroke-width: 1.5; stroke-dasharray: 5 6; }
.radar .zone.odd { fill: #f5f6f8; }
.radar .zl-letter { font: 700 16px var(--cond); fill: var(--ink-3); }
.radar .zl { transition: opacity .3s; }
.radar.picked .zl:not(.on) { opacity: .3; }
.radar .trasse { stroke: var(--paper-4); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: .1 9; }
.radar .ln { stroke-width: 14; stroke-linecap: round; transform-box: view-box; }
.radar .zl.bau .ln { stroke-dasharray: 5 21; }
.radar .pt { fill: var(--sheet); stroke: var(--ink); stroke-width: 4.5; }
.radar .hub circle { fill: var(--sheet); stroke: var(--red); stroke-width: 8; }
.radar .hub text { font: 700 19px var(--font); fill: var(--ink); }
.radar .rlab { overflow: visible; }
.rlabel { width: 100%; height: 100%; display: flex; flex-direction: column; gap: 4px; font-size: calc(17.5px * var(--fs, 1)); font-weight: 700; line-height: 1.12; color: var(--ink); overflow-wrap: normal; hyphens: manual; }
.rlabel.l { align-items: flex-start; text-align: left; } .rlabel.r { align-items: flex-end; text-align: right; } .rlabel.c { align-items: center; text-align: center; }
.rlabel.t { justify-content: flex-end; } .rlabel.b { justify-content: flex-start; } .rlabel.m { justify-content: center; }
.rlabel .lb { font-size: .78em; }
.rlabel .lv { font: 500 .8em var(--cond); color: var(--ink-3); }
.rlabel.pickable { cursor: pointer; pointer-events: all; }
.rlabel.pickable:hover .t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.rlabel.pickable.on .t { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; text-underline-offset: 3px; }
/* Zeichenerklärung der Tarifzonen unter dem Netz */
.zones-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; max-width: 760px; margin: 10px auto 0; }
.zones-legend .zk { font: 700 15px var(--cond); color: var(--ink); }
.zscale { display: flex; flex-wrap: wrap; gap: 4px; }
.zs { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 7px; background: var(--sheet); border: 1.5px dashed var(--paper-4); font: 500 14px var(--cond); color: var(--ink-2); }
.zs:nth-child(odd) { background: #f5f6f8; }
.zs b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--ink); color: #fff; font: 700 13px var(--cond); }
.zones-legend .zn { flex: 1 1 260px; font: 500 14px/1.35 var(--cond); color: var(--ink-3); }
.fp-legende { border-top: 2px solid var(--paper-3); margin-top: 24px; padding-top: 16px; }
.fp-legende > h3 { font: 700 16px var(--cond); color: var(--ink-2); margin-bottom: 12px; }
.reads { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.read { padding: 0 18px; border-left: 2px solid var(--paper-3); }
.read:nth-child(4n + 1) { padding-left: 0; border-left: 0; }
.read .k { display: flex; align-items: center; gap: 9px; font: 700 16px var(--cond); color: var(--ink); margin-bottom: 8px; }
.read .k::before { content: ""; flex: none; }
.read .k.strong::before { width: 26px; height: 8px; border-radius: 4px; background: var(--ink); }
.read .k.diff::before { width: 12px; height: 20px; border-radius: 7px; border: 3px solid var(--ink); box-sizing: border-box; }
.read .k.grow::before { width: 26px; height: 8px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--ink) 0 7px, transparent 7px 11px); }
.read .k.open::before { width: 16px; height: 16px; border-radius: 50%; border: 2.5px dashed var(--plan); box-sizing: border-box; }
.read p { color: var(--ink-2); font-size: 15.5px; line-height: 1.5; }
.pick { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px 4px 0; cursor: pointer; color: var(--ink); }
.pick .pt { border-bottom: 2px dotted var(--paper-4); }
.pick:hover .pt, .pick:focus-visible .pt { border-bottom-color: var(--red); }
.pick.gap .pt { color: var(--ink-2); }
.pick.gap::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px dashed var(--plan); flex: none; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--paper-3); }
.dots i.on { background: var(--ink); }

/* ---------- Karten ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 22px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 8px 0 22px; }
.ucard { background: var(--sheet); border: 2px solid var(--paper-3); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.ucard .n { font: 700 15px var(--cond); color: var(--ink-3); }
.ucard .claim { font-size: 16px; line-height: 1.5; }
.ucard .claim b { font-weight: 700; }
.ucard .claim .cond { font-weight: 500; color: var(--warn-ink); background: var(--warn-bg); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 3px; border-radius: 3px; }
.ucard .diff { display: grid; gap: 8px; }
.ucard .diff .v { background: var(--paper); border-radius: 8px; padding: 10px 12px; font-size: 15.5px; }
.ucard .diff .v.before { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--plan); }
.ucard .diff .v.after { font-weight: 600; border-left: 6px solid var(--red); border-radius: 0 8px 8px 0; background: var(--sheet); }
.ucard .cond { font: 600 14.5px var(--cond); color: var(--warn-ink); }

/* ---------- Zielrollen / Route ---------- */
.roles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 8px 0 22px; }
.role { background: var(--sheet); border: 2px solid var(--paper-3); border-radius: 12px; padding: 22px 24px; }
.role.strong { border-color: var(--ink); }
.role .h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.role h4 { font-size: 20px; line-height: 1.2; min-width: 0; flex: 1; font-weight: 700; }
.fit { display: inline-flex; align-items: center; gap: 8px; font: 600 15px var(--cond); color: var(--ink-2); white-space: nowrap; }
.fit.neutral { color: var(--ink-3); }
.role p { color: var(--ink-2); font-size: 15.5px; }
.role ul { margin: 8px 0 0 18px; color: var(--ink-2); font-size: 15.5px; }
.role .clar { margin-top: 10px; font-size: 14.5px; font-weight: 600; color: var(--warn-ink); background: var(--warn-bg); border-radius: 6px; padding: 6px 10px; }
.role .hint { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); border-top: 2px dashed var(--paper-3); padding-top: 9px; }
.groupk { font: 700 16px var(--cond); color: var(--ink-2); margin: 18px 0 8px; }
.role.detail { margin-bottom: 22px; border-left: 6px solid var(--red); border-radius: 0 12px 12px 0; }
.role.detail .dir { font: 500 15px var(--cond); color: var(--ink-3); margin-bottom: 8px; }

/* ---------- Vertiefung ---------- */
.ledger { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin: 8px 0 22px; }
.lcard { background: var(--sheet); border: 2px solid var(--paper-3); border-radius: 12px; padding: 20px; }
.lcard h4 { margin-bottom: 6px; font-size: 18.5px; }
.lcard .b { color: var(--ink-3); font-size: 15.5px; }
.lcard .a { font-weight: 600; margin-top: 6px; border-left: 6px solid var(--red); border-radius: 3px; padding-left: 10px; }
.lcard.open { border: 2px dashed var(--plan); }
.lcard.open ul { margin-left: 18px; font-size: 15.5px; }
/* 90-Tage-Plan als Linienverlauf: Zeitraum = Fahrplanzeit, Schritt = Station */
.roadmap { list-style: none; padding: 0; display: grid; gap: 0; margin: 8px 0 22px; position: relative; }
.roadmap::before { content: ""; position: absolute; left: 13px; top: 24px; bottom: 24px; width: var(--track); border-radius: 4px; background: var(--red); translate: -50% 0; }
.rstep { display: grid; grid-template-columns: 26px 120px 1fr; gap: 16px; padding: 14px 0; position: relative; }
.rstep::before { content: ""; width: 26px; height: 26px; border-radius: 50%; background: var(--sheet); border: 5px solid var(--ink); box-sizing: border-box; position: relative; }
.rstep .p { font: 700 16px var(--cond); color: var(--ink); padding-top: 2px; }
.rstep b { display: block; margin-bottom: 4px; font-weight: 600; font-size: 17.5px; }
.rstep span { color: var(--ink-2); font-size: 15.5px; }

/* Überlauf-Sicherheit */
.fp > *, .ledger > *, .grid2 > *, .grid3 > *, .roles > *, .options > *, .start > *, .wft > *, .read > *, .callout > * { min-width: 0; }
.card, .ucard, .role, .lcard, .rstep, .opt, .hero-card, .callout, .errbox, .wft, .step, .action-card { overflow-wrap: anywhere; }
h1.display, h2.title, .lead { overflow-wrap: anywhere; }

/* ---------- Warte-Screens: die Abfahrtstafel ----------
   Ein Schirm: Kopfzeile, Tafel, Zitatstreifen. Die Tafel ist die einzige
   dunkle Fläche des Atlas – sie ist ein Gerät am Bahnsteig, kein Blatt. */
.stage:has(> .warten) { padding-top: calc(var(--head-h) + 22px); padding-bottom: 28px; }
.qloader { display: flex; flex-direction: column; gap: 18px; margin: 0; min-width: 0; }
.qtitle { font-size: clamp(22px, 2.1vw, 28px); font-weight: 700; line-height: 1.2; color: var(--ink); }
.qhint { margin-top: 5px; font: 500 16.5px var(--cond); color: var(--ink-3); }
.board { background: var(--board); color: #eef2fa; border-radius: 14px; padding: 18px 24px 8px; font-family: var(--cond); box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 24px 50px -28px rgba(15,27,51,.6); max-width: 920px; width: 100%; }
.bhead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--board-2); }
.bhead .bt { font: 600 18px var(--cond); color: rgba(238,242,250,.75); }
.bhead .bclock { font: 700 28px/1 var(--cond); color: var(--board-hi); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.blist { display: grid; }
.brow { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--board-2); font: 600 21px/1.15 var(--cond); color: #eef2fa; font-variant-numeric: tabular-nums; }
.brow.bcols { font: 500 14px var(--cond); color: rgba(238,242,250,.5); padding: 7px 0 5px; }
.brow .bl { display: inline-grid; place-items: center; width: 42px; height: 26px; border-radius: 6px; border: 2px solid currentColor; font: 700 15px/1 var(--cond); }
.brow .bs { text-align: right; white-space: nowrap; }
.brow.ok { color: rgba(238,242,250,.5); }
.brow.ok .bs::before { content: "✓ "; }
.brow.run { color: var(--board-hi); }
.brow.run .bl { background: var(--board-hi); color: var(--board); border-color: var(--board-hi); }
.brow.run .bs::after { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--board-hi); margin-left: 10px; vertical-align: 2px; animation: blink 1s steps(1) infinite; }
.brow.err { color: #fff; }
.brow.err .bs { background: var(--red); padding: 2px 10px; border-radius: 6px; }
.brow.idle { color: rgba(238,242,250,.82); }
.brow:last-child { border-bottom: 0; }
.bstrip { padding: 18px 12px 30px; }
.btrack { position: relative; height: 6px; border-radius: 3px; background: var(--board-2); }
.bfill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: var(--board-hi); }
.bstop { position: absolute; top: 50%; translate: -50% -50%; }
.bstop i { display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--board); border: 3.5px solid rgba(238,242,250,.45); box-sizing: border-box; }
.bstop.done i { border-color: var(--board-hi); }
.bstop em { position: absolute; left: 50%; top: 18px; translate: -50% 0; font: 500 13.5px var(--cond); font-style: normal; color: rgba(238,242,250,.6); white-space: nowrap; }
.bstop.done em { color: rgba(238,242,250,.9); }
.btrain { position: absolute; top: 50%; left: 0; width: 30px; height: 16px; border-radius: 8px; background: #fff; translate: -50% -50%; box-shadow: 0 0 0 3px var(--board), 0 0 18px rgba(255,210,63,.65); }
.board.err .btrain { background: var(--red); box-shadow: 0 0 0 3px var(--board); }
.qstrip { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.qcard { position: relative; will-change: transform, opacity; }
.qcard.in { animation: qin .55s cubic-bezier(.2,.7,.2,1) both; }
.qcard.out { animation: qout .42s cubic-bezier(.6,0,.8,.4) both; }
@keyframes qin { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
@keyframes qout { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -8px; } }
.qcard .qtext { font-size: clamp(17px, 1.4vw, 19.5px); line-height: 1.38; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.qcard .qnum { color: var(--red); font-weight: 700; font-variant-numeric: tabular-nums; }
.qcard .qby { margin-top: 5px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; font-family: var(--cond); }
.qcard .qby b { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.qcard .qby span { font-size: 15px; color: var(--ink-3); }
.qbar { height: 4px; border-radius: 2px; background: var(--paper-3); overflow: hidden; max-width: 420px; }
.qbar i { display: block; height: 100%; width: 0; background: var(--ink); }
@media (max-height: 700px) { .qstrip, .qhint { display: none; } .brow { padding: 5px 0; font-size: 19px; } }
@media (prefers-reduced-motion: reduce) { .qcard.in, .qcard.out { animation-duration: .01s; } .brow.run .bs::after { animation: none; } }

/* ---------- Fehler (Störung) / Zugang ---------- */
.errbox { background: var(--sheet); border: 2px solid var(--red); border-top-width: 10px; border-radius: 10px; padding: 16px 22px; color: var(--ink); max-width: 760px; }
.errbox details { margin-top: 10px; }
.errbox summary { font: 600 15.5px var(--cond); cursor: pointer; }
.errbox pre { white-space: pre-wrap; font-size: 12px; max-height: 260px; overflow: auto; background: var(--paper); padding: 10px; border-radius: 6px; }
.gate { max-width: 520px; }
.gate input { width: 100%; font: inherit; font-size: 18px; padding: 14px 16px; border: 2px solid var(--paper-3); background: var(--sheet); border-radius: 10px; margin: 12px 0 20px; color: var(--ink); }
.gate input:focus { outline: none; border-color: var(--ink); }

/* ---------- Bewegung auf den Blättern (Reihenfolge = Leserichtung) ----------
   Nur Eintritts-Animationen; Linien fahren aus, Stationen setzen sich, dann
   Text. `translate`/`scale` statt `transform`, damit nichts mit bestehenden
   Transforms kollidiert; `backwards` hält den Startzustand bis zum Delay.
   Re-Render (.no-enter) und reduced-motion springen in den Endzustand. */
.screen.anim:not(.no-enter) { animation: enter-soft .4s ease both; }
@keyframes enter-soft { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; translate: 0 12px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; scale: .4; } }
@keyframes grow { from { scale: 0; } }
@keyframes grow-y { from { scale: 1 0; } }
@keyframes grow-x { from { scale: 0 1; } }
.anim > .kicker, .anim > .title, .anim > .lead, .anim > .rs-head > .kicker, .anim > .rs-head > .title, .anim > .rs-head > .lead { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards; }
.anim > .title, .anim > .rs-head > .title { animation-delay: .07s; }
.anim > .lead, .anim > .rs-head > .lead { animation-delay: .14s; }

/* Blatt 2: Zonen von innen nach außen, Linien fahren aus der Mitte, Endstationen setzen sich, Namen erscheinen */
.s-fingerprint .radar .zone { animation: fade .5s ease backwards; animation-delay: calc(.1s + var(--i, 0) * .09s); }
.s-fingerprint .radar .zl-letter { animation: fade .4s ease backwards; animation-delay: calc(.3s + var(--i, 0) * .09s); }
.s-fingerprint .radar .hub { transform-box: fill-box; transform-origin: center; animation: pop .5s cubic-bezier(.2,.8,.3,1.3) backwards .5s; }
.s-fingerprint .radar .trasse { animation: fade .5s ease backwards .7s; }
.s-fingerprint .radar .ln { animation: grow .8s cubic-bezier(.5,0,.2,1) backwards; animation-delay: calc(.75s + var(--i, 0) * .14s); }
.s-fingerprint .radar .pt { transform-box: fill-box; transform-origin: center; animation: pop .4s cubic-bezier(.2,.8,.3,1.4) backwards; animation-delay: calc(1.45s + var(--i, 0) * .14s); }
.s-fingerprint .radar .rlab { animation: fade .5s ease backwards; animation-delay: calc(1.55s + var(--i, 0) * .14s); }
.s-fingerprint .zones-legend { animation: fade .5s ease backwards 2.3s; }
.s-fingerprint .aside { animation: rise .7s cubic-bezier(.2,.7,.2,1) backwards 1.7s; }
.s-fingerprint .read { animation: rise .5s ease backwards; animation-delay: calc(2s + var(--i, 0) * .1s); }

/* Blatt 5: deine Linie fährt von oben nach unten durch, Station für Station */
.s-luecken .lz-key { animation: fade .5s ease backwards .1s; }
.s-luecken .wft .trk { transform-origin: 50% 0; animation: grow-y .22s linear backwards; animation-delay: calc(.2s + var(--i, 0) * .16s); }
.s-luecken .wft .lab { animation: rise .4s ease backwards; animation-delay: calc(.32s + var(--i, 0) * .16s); }
.s-luecken .wf-beleg { animation: rise .5s ease backwards 2s; }
.s-unterwert .refs { animation: fade .5s ease backwards .15s; }

.screen.no-enter.anim *, .screen.no-enter.anim *::after { animation-duration: 0s !important; animation-delay: 0s !important; }
@media (prefers-reduced-motion: reduce) {
  .screen.anim, .screen.anim *, .screen.anim *::after, .hero-art * { animation: none !important; }
  .hero-art .hl { stroke-dashoffset: 0; }
  .hero-art .next, .hero-art .nextst, .hero-art .hlab { opacity: 1; }
}

/* ---------- Blatt 3: Aha – Gemeinschaftsstrecke ---------- */
.aha { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; margin-top: 4px; }
.aha-map { min-width: 0; }
.aha svg.confluence { display: block; width: 100%; height: auto; overflow: visible; }
.confluence .flow { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: opacity .3s; }
.confluence .main { fill: none; stroke-linecap: butt; stroke-dasharray: 1; stroke-dashoffset: 1; transition: opacity .3s; }
.confluence .hit { fill: none; stroke: transparent; stroke-width: 40; }
.confluence .trib { cursor: pointer; outline: none; }
.confluence.picked .trib:not(.on) .flow { opacity: .35; }
.confluence .src { fill: var(--sheet); stroke: var(--ink); stroke-width: 4.5; }
.confluence .trib.on .src, .confluence .trib:focus-visible .src { stroke: var(--red); }
.confluence .join { fill: var(--sheet); stroke: var(--ink); stroke-width: 5; }
.confluence .tname { font-family: var(--font); font-size: calc(16.5px * var(--rs, 1)); font-weight: 700; fill: var(--ink); }
.confluence .trib.on .tname { text-decoration: underline; text-decoration-color: var(--red); }
.confluence .tcontrib { font-family: var(--cond); font-size: calc(14px * var(--rs, 1)); font-weight: 500; fill: var(--ink-3); }
.aha-text { min-width: 0; }
.aha-text > .k { font: 700 16px var(--cond); color: var(--ink-2); margin-bottom: 8px; }
.aha-these { font-size: 27px; line-height: 1.18; font-weight: 700; letter-spacing: -.012em; margin: 0 0 16px; }
.aha-these .w { display: inline-block; }
.aha-why .k { display: block; font: 600 15px var(--cond); color: var(--ink-3); margin-bottom: 4px; }
.aha-why p { color: var(--ink-2); font-size: 16px; line-height: 1.45; }
.aha-beleg { margin-top: 16px; }
.rs:has(.aha-none) { min-height: 0; }
.aha-none h4 { font-size: 21px; line-height: 1.25; margin: 0 0 8px; }
.aha-none p { color: var(--ink-2); font-size: 16px; }
@media (min-width: 861px) { .aha { grid-template-columns: 3fr 2fr; gap: 28px; } }
.s-aha .confluence .src { transform-box: fill-box; transform-origin: center; animation: pop .4s cubic-bezier(.2,.8,.3,1.4) backwards; animation-delay: calc(.15s + var(--i, 0) * .3s); }
.s-aha .confluence .tname, .s-aha .confluence .tcontrib, .s-aha .confluence .lbs { animation: fade .5s ease backwards; animation-delay: calc(.25s + var(--i, 0) * .3s); }
.s-aha .confluence .flow { animation: draw 1s cubic-bezier(.45,0,.2,1) forwards; animation-delay: calc(.35s + var(--i, 0) * .3s); }
.s-aha .confluence .join { transform-box: fill-box; transform-origin: center; animation: pop .45s cubic-bezier(.2,.8,.3,1.35) backwards; animation-delay: calc(.6s + var(--n, 3) * .3s); }
.s-aha .confluence .main { animation: draw .8s cubic-bezier(.4,0,.2,1) forwards; animation-delay: calc(.85s + var(--n, 3) * .3s + var(--i, 0) * .06s); }
.s-aha .aha-text > .k { animation: fade .5s ease backwards; animation-delay: calc(1.3s + var(--n, 3) * .3s); }
.s-aha .aha-these .w { animation: rise .45s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(1.4s + var(--n, 3) * .3s + var(--w, 0) * .06s); }
.s-aha .aha-why { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(2.6s + var(--n, 3) * .3s); }
.s-aha .aha-beleg { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(3s + var(--n, 3) * .3s); }
.s-aha .aha-none { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards .3s; }

/* ---------- Blatt 4: Unter Wert – Bahnhofsschnitt ---------- */
.uw { margin-top: 4px; }
.uw-map { min-width: 0; }
.uw svg.massif { display: block; width: 100%; height: auto; overflow: hidden; }
.massif .under { fill: #f7f8f9; }
.massif .lvl line { stroke: var(--paper-3); stroke-width: 1.5; stroke-dasharray: 4 6; }
.massif .lvl text { font-family: var(--cond); font-size: calc(14px * var(--rs, 1)); font-weight: 600; fill: var(--ink-3); white-space: pre; }
.massif .shaft { stroke-width: 6; stroke-linecap: butt; }
.massif .plat { stroke-width: 15; stroke-linecap: round; }
.massif .col.bau .plat, .massif .col.bau .shaft { stroke-dasharray: 6 9; stroke-linecap: butt; }
.massif .pring { stroke: var(--red); stroke-width: 27; stroke-linecap: round; }
.massif .pname { font-family: var(--font); font-size: calc(14px * var(--rs, 1)); font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: #f7f8f9; stroke-width: calc(5px * var(--rs, 1)); stroke-linejoin: round; }
.massif .earth-bg { fill: #dfe2e6; }
.massif .earth-ln { stroke: #c9ced5; stroke-width: 4; }
.massif .sea { transform: translateY(var(--y1)); }
.massif .wline line { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.massif .wcap { font-family: var(--cond); font-size: calc(14px * var(--rs, 1)); font-weight: 600; fill: var(--ink-3); }
.massif .wtitle { font-family: var(--font); font-size: calc(17.5px * var(--rs, 1)); font-weight: 700; fill: var(--ink); }
.massif .flag { cursor: pointer; outline: none; }
.massif .cloth { fill: var(--red); }
.massif .fnum { font: 700 calc(15px * var(--rs, 1)) var(--cond); fill: #fff; pointer-events: none; }
.massif .flag.on .cloth, .massif .flag:hover .cloth { stroke: var(--ink); stroke-width: calc(3px * var(--rs, 1)); }
/* Schilderleiste: die drei Namen zu den nummerierten Schildern am Schacht */
.uw-signs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.usign { display: flex; align-items: flex-start; gap: 10px; text-align: left; background: var(--sheet); border: 2px solid var(--paper-3); border-radius: 10px; padding: 9px 12px; font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s; min-width: 0; }
.usign:hover { border-color: var(--ink-3); }
.usign.on { border-color: var(--red); }
.usign .unum { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 5px; background: var(--red); color: #fff; font: 700 15px var(--cond); }
.usign .un { display: grid; gap: 2px; min-width: 0; }
.usign .un b { font-size: 17px; font-weight: 700; line-height: 1.2; }
.usign .ul { display: inline-flex; align-items: center; gap: 6px; font: 500 14.5px var(--cond); color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 640px) { .uw-signs { grid-template-columns: 1fr; gap: 6px; } }
.uw-beleg { margin-top: 14px; }
.uw-beleg p .heute { font: 600 15.5px var(--cond); color: var(--ink-3); }
.lines-legend { display: none; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.lines-legend .ll { display: inline-flex; align-items: center; gap: 6px; }
.uw-karten { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--paper-3); }
.uw-karten > .k { font: 700 16px var(--cond); color: var(--ink-2); margin-bottom: 10px; }
.uw-karten .grid3 { margin: 0; }
.uw-karten .ucard { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: start; }
.uw-karten .ucard .n { line-height: 1.5; }
.uw-karten .claim.wartet { font: 500 15.5px var(--cond); color: var(--ink-3); }
@media (max-width: 640px) { .massif .pname { display: none; } .lines-legend { display: flex; } }
/* Ablauf: Straße mit Titel, das Erdreich wird abgetragen, Schächte fahren hinunter, Bahnsteige erscheinen, Namen, dann die drei Schilder */
.s-unterwert .wline, .s-unterwert .ents { animation: fade .5s ease backwards .1s; }
.s-unterwert .sea { animation: sea-fall 1.2s cubic-bezier(.5,0,.2,1) both .4s; }
@keyframes sea-fall { from { transform: translateY(var(--y0)); } to { transform: translateY(var(--y1)); } }
.s-unterwert .lvl { animation: fade .5s ease backwards; animation-delay: calc(.9s + var(--i, 0) * .06s); }
.s-unterwert .shaft { transform-box: fill-box; transform-origin: 50% 0; animation: grow-y .6s cubic-bezier(.5,0,.2,1) backwards; animation-delay: calc(1.1s + var(--i, 0) * .09s); }
.s-unterwert .plat, .s-unterwert .pring { transform-box: fill-box; transform-origin: center; animation: grow-x .4s cubic-bezier(.2,.8,.3,1.2) backwards; animation-delay: calc(1.6s + var(--i, 0) * .09s); }
.s-unterwert .pname { animation: fade .5s ease backwards; animation-delay: calc(1.9s + var(--i, 0) * .06s); }
.s-unterwert .flag { transform-box: fill-box; transform-origin: center; animation: pop .35s cubic-bezier(.2,.8,.3,1.4) backwards; animation-delay: calc(2.4s + var(--i, 0) * .3s); }
.s-unterwert .usign { animation: rise .45s ease backwards; animation-delay: calc(2.5s + var(--i, 0) * .3s); }
.s-unterwert .uw-beleg { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards 3.6s; }
.s-unterwert .uw-karten > .k { animation: fade .5s ease backwards 3.8s; }
.s-unterwert .uw-karten .ucard { animation: rise .55s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: calc(3.9s + var(--i, 0) * .12s); }

/* ---------- Blatt 5: Lückenschluss ---------- */
.wf { margin: 6px 0 22px; display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
@media (min-width: 861px) { .wf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; } .wf-beleg { margin-top: 44px; } }
.lz-key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 12px; font: 500 15px var(--cond); color: var(--ink-2); }
.lz-key .kk { display: inline-flex; align-items: center; gap: 8px; }
.lz-key .kk i { width: 18px; height: 18px; border-radius: 50%; background: var(--sheet); border: 4px solid var(--ink); box-sizing: border-box; }
.lz-key .kk.ev i { border: 3px dashed var(--ink); }
.lz-key .kk.sk i { border: 3px dashed var(--plan); }
ol.lz { list-style: none; padding: 0; margin: 0; }
.wft { display: grid; grid-template-columns: 40px 1fr; align-items: stretch; min-height: 48px; position: relative; border-radius: 10px; }
.wft .trk { position: relative; }
.wft .trk::before { content: ""; position: absolute; left: 50%; translate: -50% 0; top: 0; bottom: 0; width: var(--track); background: var(--red); }
.wft:first-child .trk::before { top: 50%; border-radius: 4px 4px 0 0; }
.wft:last-child .trk::before { bottom: 50%; border-radius: 0 0 4px 4px; }
.wft .trk::after { content: ""; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 22px; height: 22px; border-radius: 50%; background: var(--sheet); border: 5px solid var(--ink); box-sizing: border-box; }
.wft.ev .trk::after { border: 3.5px dashed var(--ink); width: 26px; height: 26px; }
.wft.sk .trk::before { background: repeating-linear-gradient(to bottom, var(--plan) 0 7px, transparent 7px 13px); }
.wft.sk .trk::after { border: 3.5px dashed var(--plan); width: 26px; height: 26px; }
.wft .lab { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 10px 8px 8px; min-width: 0; }
.wft.map .th { font-size: 16px; color: var(--ink-2); font-weight: 500; }
.wft.ev .th, .wft.sk .th { font-size: 17.5px; font-weight: 700; color: var(--ink); line-height: 1.22; }
.wft .wf-top { display: inline-flex; align-items: center; gap: 8px; font: 600 14.5px var(--cond); }
.wft.ev .wf-top .art { color: var(--ink-2); border: 1.5px dashed var(--ink-2); border-radius: 5px; padding: 0 6px; }
.wft.sk .wf-top .art { color: var(--ink-3); border: 1.5px dashed var(--plan); border-radius: 5px; padding: 0 6px; }
.wft .bel { display: inline-flex; gap: 3px; }
.wft .bel i { width: 10px; height: 10px; border: 2px solid var(--ink-3); border-radius: 2px; }
.wft.ev, .wft.sk { cursor: pointer; outline: none; transition: background .2s; }
.wft.ev:hover, .wft.sk:hover, .wft.ev:focus-visible, .wft.sk:focus-visible { background: var(--sheet); }
.wft.on { background: var(--sheet); box-shadow: inset 0 0 0 2px var(--ink); }
.wft.on .trk::after { border-color: var(--red); border-style: solid; background: var(--red); box-shadow: inset 0 0 0 4px var(--sheet); }
.wf-beleg { border-left-color: var(--red); }
.wf-beleg .k.ev, .wf-beleg .k.sk { color: var(--ink-2); }
.wf-belege { margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--paper-3); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.wf-belege .k { font: 700 15px var(--cond); color: var(--ink-2); }
.wf-belege ul { list-style: none; margin: 0; padding: 0; flex: 1 0 100%; display: grid; gap: 4px; font-size: 15px; color: var(--ink-2); line-height: 1.38; }
.wf-belege li { position: relative; padding-left: 18px; overflow-wrap: anywhere; }
.wf-belege li::before { content: ""; position: absolute; left: 0; top: .38em; width: 10px; height: 10px; border: 2px solid var(--ink-3); border-radius: 2px; }

/* ---------- Blatt 6: Opportunity Map als Netzplan ---------- */
.omap-wrap { overflow-x: auto; margin: 6px 0 18px; padding: 4px 0; }
.omap-frame { display: grid; grid-template-columns: 24px minmax(680px, 1fr) 24px; grid-template-rows: auto auto auto; column-gap: 10px; row-gap: 8px; align-items: center; }
.omap-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; font: 500 15px var(--cond); line-height: 1.3; color: var(--ink-2); }
.omap-legend > i { width: 18px; height: 18px; border-radius: 50%; background: var(--sheet); border: 5px solid var(--red); box-sizing: border-box; flex: none; }
.omap-legend > b { color: var(--ink); font-weight: 700; }
.omap-legend .wkey { display: inline-flex; align-items: center; gap: 8px; margin-left: 12px; color: var(--ink-3); }
.omap-legend .wkey i { width: 30px; height: 12px; background: linear-gradient(var(--ink-2), var(--ink-2)) 0 50% / 9px 3px no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) 11px 50% / 9px 6px no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) 22px 50% / 8px 10px no-repeat; }
.omap-frame .axl { font: 600 15px var(--cond); color: var(--ink-2); white-space: nowrap; justify-self: center; }
.omap-frame .axl.t { grid-column: 2; grid-row: 1; }
.omap-frame .axl.b { grid-column: 2; grid-row: 3; }
.omap-frame .axl.l { grid-column: 1; grid-row: 2; writing-mode: vertical-rl; rotate: 180deg; }
.omap-frame .axl.r { grid-column: 3; grid-row: 2; writing-mode: vertical-rl; }
@media (max-width: 860px) { .omap-frame .axl.t, .omap-frame .axl.b { justify-self: start; } }
.omap { grid-column: 2; grid-row: 2; position: relative; height: 560px; background: var(--sheet); border-radius: 12px; border: 2px solid var(--paper-3); }
.omap .ax { position: absolute; background: var(--paper-2); }
.omap .ax.x { left: 0; right: 0; top: 50%; height: 2px; translate: 0 -50%; }
.omap .ax.y { top: 0; bottom: 0; left: 5%; width: 2px; translate: -50% 0; }
.omap-lines { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.omap-lines .rl { fill: none; stroke: var(--ink-2); stroke-linecap: round; stroke-linejoin: round; opacity: .75; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke .3s, opacity .3s; }
.omap-lines .rl.lang { stroke-dasharray: .015 .03; }
.omap-lines .rl.on { stroke: var(--red); opacity: 1; }
.omap .heute { position: absolute; left: 5%; top: 50%; width: 0; height: 0; z-index: 3; pointer-events: none; }
.omap .heute i { position: absolute; left: 0; top: 0; translate: -50% -50%; width: 30px; height: 30px; border-radius: 50%; background: var(--sheet); border: 8px solid var(--red); box-sizing: border-box; }
.omap .heute b { position: absolute; left: 0; top: 20px; translate: -50% 0; font: 700 15px var(--cond); color: var(--ink); white-space: nowrap; background: var(--sheet); padding: 0 6px; border-radius: 4px; }
.omap .pin { position: absolute; translate: -50% -50%; width: 0; height: 0; display: grid; justify-items: center; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; outline: none; z-index: 1; }
.omap .pin.on, .omap .pin:hover, .omap .pin:focus-visible { z-index: 4; }
.omap .pin .dot { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--sheet); border: 5px solid var(--ink); box-sizing: border-box; translate: 0 -50%; transition: scale .25s cubic-bezier(.2,.7,.2,1), border-color .25s; }
.omap .pin .name { position: absolute; bottom: 16px; width: 184px; text-wrap: balance; text-align: center; font-size: 14.5px; font-weight: 700; line-height: 1.18; color: var(--ink); text-shadow: 0 0 5px var(--sheet), 0 0 3px var(--sheet), 0 0 2px var(--sheet); }
.omap .pin .pfit { position: absolute; top: 16px; font: 600 13.5px var(--cond); padding: 1px 8px; border-radius: 6px; background: var(--sheet); color: var(--ink-2); border: 1.5px solid var(--paper-3); white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.omap .pin .pfit.hi { color: var(--ink); border-color: var(--ink-3); }
.omap .pin.flip .name { bottom: auto; top: 16px; }
.omap .pin.flip .pfit { top: auto; bottom: 16px; }
.omap .pin:hover .dot, .omap .pin:focus-visible .dot { scale: 1.15; }
.omap .pin.on .dot { scale: 1.25; border-color: var(--red); }
.omap .pin.on .pfit { background: var(--red); color: #fff; border-color: var(--red); }
.s-roles .omap { animation: fade .5s ease backwards .1s; }
.s-roles .omap .ax.x { animation: grow-x .7s cubic-bezier(.3,.1,.3,1) backwards .2s; }
.s-roles .omap .ax.y { animation: grow-y .7s cubic-bezier(.3,.1,.3,1) backwards .2s; }
.s-roles .omap-frame .axl, .s-roles .omap-legend { animation: fade .5s ease backwards .8s; }
.s-roles .omap .heute { animation: pop .5s cubic-bezier(.2,.8,.3,1.3) backwards .45s; }
.s-roles .omap-lines .rl { animation: rl-draw .8s cubic-bezier(.45,0,.2,1) backwards; animation-delay: calc(.7s + var(--i, 0) * .14s); }
.s-roles .omap-lines .rl.lang { animation-name: fade; }
@keyframes rl-draw { from { stroke-dashoffset: 1; } }
.s-roles .omap .pin { animation: pop .45s cubic-bezier(.2,.8,.3,1.3) backwards; animation-delay: calc(1.3s + var(--i, 0) * .14s); }
.s-roles .role.detail { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards 1.8s; }

/* ---------- Scroll-Seite: die Blätter als Stationen deiner Linie ----------
   Links läuft deine Linie die ganze Analyse hinunter; jedes Blatt ist eine
   Station, die gerade gelesene ist rot gefüllt (Sie sind hier), die schon
   gelesenen sind geschlossene Ringe. */
.scrollflow { display: block; position: relative; padding-left: 64px; }
.scrollflow::before { content: ""; position: absolute; left: 20px; top: 40px; bottom: 60px; width: var(--track); border-radius: 4px; background: var(--red); translate: -50% 0; }
.rs { position: relative; min-height: 70vh; padding: 28px 0 52px; scroll-margin-top: 84px; }
.rs::before { content: ""; position: absolute; left: -44px; top: 34px; width: 28px; height: 28px; translate: -50% 0; border-radius: 50%; background: var(--sheet); border: 6px solid var(--paper-4); box-sizing: border-box; transition: border-color .3s, background .3s, box-shadow .3s; z-index: 1; }
.rs.past::before { border-color: var(--ink); }
.rs.here::before { background: var(--red); border-color: var(--sheet); box-shadow: 0 0 0 4px var(--red); }
.rs.text { min-height: 0; }
.rs:not(.on) { pointer-events: none; }
.rs > .screen, .rs-pin > .screen { width: 100%; margin: 0; }
.rs-pin > .screen { display: flex; flex-direction: column; }
.rs-head { display: contents; }
.rs-body { order: 1; }
.rs-head > .aside { order: 2; margin-top: 26px; }
.rs.wait { display: flex; flex-direction: column; justify-content: center; }
.scrollflow .rs:last-child { padding-bottom: calc(var(--nav-h) + 24px); }
.scrollhint { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 10px; font: 600 15.5px var(--cond); color: var(--ink-3); transition: opacity .4s; }
.scrollhint.off { opacity: 0; }
.scrollhint i { width: 12px; height: 12px; border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; rotate: 45deg; animation: sh-bounce 1.6s ease-in-out infinite; }
@keyframes sh-bounce { 0%, 100% { translate: 0 -3px; opacity: .45; } 50% { translate: 0 4px; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scrollhint i { animation: none; } }

/* ---- Scrubben (breite Schirme, siehe app.js SCRUB) ---- */
@media (min-width: 1100px) {
  .rs.scrub { padding-top: 0; padding-bottom: 0; }
  .rs.scrub::before { top: 26px; }
  .scrollflow .rs.scrub:last-child { padding-bottom: 0; }
  .rs.scrub .rs-pin { padding: 24px 0 22px; }
  .rs.scrub .rs-head h1.display, .rs.scrub .rs-head h2.title { font-size: clamp(25px, 2.3vw, 32px); line-height: 1.1; margin-bottom: 6px; }
  .rs.scrub .rs-head .lead { font-size: 16.5px; line-height: 1.42; margin-bottom: 12px; max-width: 72ch; }
  .rs.scrub .radar { max-width: 720px; }
  .rs.scrub .rlabel { font-size: calc(16px * var(--rs, 1) * var(--fs, 1)); gap: calc(3px * var(--rs, 1)); }
  .rs.scrub .zones-legend { margin-top: 6px; }
  .rs.scrub .rs-head > .aside { margin-top: 12px; padding-top: 11px; }
  .rs.scrub .standort { margin-bottom: 10px; } .rs.scrub .standort .sp b { font-size: 17px; } .rs.scrub .standort .sv { font-size: 14.5px; padding: 4px 12px; } .rs.scrub .standort .sb { font-size: 14px; margin-top: 5px; }
  .rs.scrub .fp-beleg { margin-top: 10px; padding: 8px 14px; } .rs.scrub .fp-beleg h4 { font-size: 16px; } .rs.scrub .fp-beleg p { font-size: 14.5px; }
  .rs.scrub .rs-head > .aside h3 { margin-bottom: 8px; }
  .rs.scrub .read .k { margin-bottom: 5px; }
  .rs.scrub .read p { font-size: 14.5px; }
  .rs.scrub .aha { margin-top: 0; }
  .rs.scrub .aha svg.confluence { max-width: 100%; }
  .rs.scrub .aha-these { font-size: 23px; margin-bottom: 10px; }
  .rs.scrub .aha-why p { font-size: 15px; }
  .rs.scrub .aha-beleg { margin-top: 10px; }
  .rs.scrub .uw { margin-top: 0; }
  .rs.scrub .uw svg.massif { max-width: 100%; }
  .rs.scrub .uw-beleg { margin-top: 8px; }
  .rs.scrub .uw-karten { margin-top: 8px; padding-top: 8px; }
  .rs.scrub .uw-karten > .k { margin-bottom: 6px; }
  .rs.scrub .uw-karten .grid3 { gap: 12px; }
  .rs.scrub .uw-karten .ucard { padding: 12px 14px; gap: 2px 8px; }
  .rs.scrub .uw-karten .ucard .claim { font-size: 15px; line-height: 1.42; }
  .rs.scrub .omap-frame { grid-template-columns: 24px minmax(0, 1fr) 24px; }
  .rs.scrub .omap-wrap { margin-top: 0; }
  .rs.scrub .role.detail { padding: 12px 20px; margin-bottom: 0; }
  .rs.scrub .role.detail h4 { font-size: 18px; }
  .rs.scrub .role.detail p, .rs.scrub .role.detail .clar { font-size: 14.5px; margin-top: 4px; }
  .rs.scrub .wf { margin: 0 0 14px; }
  .rs.scrub .wft { min-height: 44px; }
  .rs.scrub .wf-belege ul { font-size: 14.5px; }
  .rs.scrub .callout { padding: 10px 18px; }
  .rs.scrub .missing { padding: 12px 18px; }
}
@media (min-width: 1100px) and (max-height: 800px) {
  .rs.scrub .rs-pin { padding-top: 16px; }
  .rs.scrub::before { top: 18px; }
  .rs.scrub .rs-head h1.display, .rs.scrub .rs-head h2.title { font-size: 26px; margin-bottom: 4px; }
  .rs.scrub .rs-head .lead { font-size: 15.5px; margin-bottom: 8px; line-height: 1.35; }
  .rs.scrub .rs-head > .aside { margin-top: 8px; padding-top: 9px; }
  .rs.scrub .read p { font-size: 14px; line-height: 1.35; }
  .rs.scrub .uw-karten .ucard { padding: 10px 12px; }
  .rs.scrub .uw-karten .ucard .claim { font-size: 14px; }
  .rs.scrub .role.detail { padding: 10px 18px; }
  .rs.scrub .role.detail p, .rs.scrub .role.detail .clar { font-size: 14px; margin-top: 3px; }
  .rs.scrub .wft { min-height: 40px; }
}

/* ---------- 04 Richtung: der Abzweig ---------- */
.fork { display: grid; grid-template-columns: 96px minmax(0, 1fr); max-width: 900px; margin: -6px 0 26px; }
.fork-svg { width: 96px; height: 100%; overflow: visible; display: block; }
.fork .f-main { fill: none; stroke: var(--red); stroke-width: 10; stroke-linecap: round; }
.fork .f-alt { fill: none; stroke: var(--ink-3); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.fork .f-hub { fill: var(--sheet); stroke: var(--red); stroke-width: 6; }
.fork-rows { display: grid; gap: 12px; }
.fr { background: var(--sheet); border: 2px solid var(--paper-3); border-radius: 10px; padding: 10px 16px 12px; }
.fr.main { border-color: var(--ink); }
.fr .fm { font: 500 15px var(--cond); color: var(--ink-3); display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.fr .ft { font: 700 14px var(--cond); color: #fff; background: var(--red); border-radius: 5px; padding: 0 7px; }
.fr.alt .ft { background: var(--ink-3); }
.fr .fn { font-size: 19px; font-weight: 700; line-height: 1.22; margin-top: 3px; }
/* Abzweig: erst fährt deine Linie aus, dann zweigt die Alternative ab */
.s-richtung .fork .f-main, .s-richtung .fork .f-alt { stroke-dasharray: 1; animation: undraw .9s cubic-bezier(.45,0,.2,1) backwards .3s; }
.s-richtung .fork .f-alt { animation-duration: .8s; animation-delay: .7s; }
@keyframes undraw { from { stroke-dashoffset: 1; } }
.s-richtung .fr { animation: rise .5s ease backwards .5s; }
.s-richtung .fr.alt { animation-delay: .9s; }
.s-richtung .role.detail.richtung { padding: 26px 30px; max-width: 900px; }
.s-richtung .role.detail .h h4 { font: 700 16px var(--cond); color: var(--ink-2); }
.rgrid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px 32px; margin-top: 14px; }
.rgrid > * { min-width: 0; }
.rgrid .rk { font: 700 16px var(--cond); color: var(--ink-2); margin-bottom: 6px; }
.rgrid ul { margin: 0 0 0 18px; color: var(--ink-2); font-size: 16px; }
.rgrid li + li { margin-top: 4px; }
.rgrid .open ul { list-style: none; margin-left: 0; }
.rgrid .open li { position: relative; padding-left: 22px; }
.rgrid .open li::before { content: ""; position: absolute; left: 0; top: .3em; width: 13px; height: 13px; border-radius: 50%; border: 2.5px dashed var(--plan); }
.s-richtung .role.detail { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards 1.1s; }
.role.rc { padding: 24px 26px; }
.role.rc.strong { border-left: 6px solid var(--red); }
.rc-tag { font: 700 15px var(--cond); color: var(--ink-3); margin-bottom: 8px; }
.role.rc.strong .rc-tag { color: var(--red-ink); }
.role.rc .h h4 { font-size: 22px; }
.role.rc .dir { font: 500 15px var(--cond); color: var(--ink-3); margin-bottom: 6px; }
.rc-refs { margin-top: 16px; border-top: 2px solid var(--paper-3); padding-top: 14px; }
.rc-refs .rk { font: 700 16px var(--cond); color: var(--ink-2); margin-bottom: 10px; }
.rc-refs .ref { padding: 8px 0 8px 16px; border-left: 4px solid var(--paper-3); }
.rc-refs .ref + .ref { margin-top: 8px; }
.role.detail .rc-refs .ref { border-left-color: var(--ink); }
.rc-refs .src { font: 500 14.5px var(--cond); color: var(--ink-3); margin-bottom: 3px; }
.rc-refs .src b { color: var(--ink); font-weight: 700; }
.rc-refs .bf { font-size: 15.5px; color: var(--ink-2); }
.rc-refs .bd { font-size: 15.5px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.s-richtung .role.detail .rc-refs { margin-top: 18px; }
.s-richtung .alt { max-width: 900px; margin-top: 26px; animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards 1.3s; }
.s-richtung .alt-lead { color: var(--ink-2); font-size: 16.5px; margin-bottom: 12px; max-width: 70ch; }

/* ---------- 05 Aktion: drei Stationen bis „Erledigt" ---------- */
.action-card { max-width: 900px; background: var(--sheet); border: 2px solid var(--ink); border-radius: 12px; padding: 0 30px 28px; overflow: hidden; }
.action-label { margin: 0 -30px 10px; padding: 12px 30px; background: var(--ink); color: #fff; font: 600 17px var(--cond); }
.action-steps { list-style: none; padding: 0; counter-reset: action; position: relative; }
.action-steps::before { content: ""; position: absolute; left: 16px; top: 30px; bottom: -30px; width: var(--track); background: var(--red); translate: -50% 0; }
.action-steps li { counter-increment: action; display: grid; grid-template-columns: 32px 1fr; gap: 16px; align-items: start; padding: 14px 0; font-size: 17.5px; font-weight: 600; position: relative; }
.action-steps li::before { content: counter(action); width: 32px; height: 32px; display: grid; place-items: center; border: 5px solid var(--ink); background: var(--sheet); border-radius: 50%; box-sizing: border-box; color: var(--ink); font: 700 14px var(--cond); position: relative; }
.action-done { position: relative; margin-top: 12px; display: grid; grid-template-columns: 32px 1fr; gap: 16px; }
.action-done::before { content: ""; width: 32px; height: 32px; border-radius: 50%; background: var(--red); box-shadow: inset 0 0 0 6px var(--sheet), 0 0 0 4px var(--red); position: relative; z-index: 1; margin-top: 4px; }
.action-done .k { grid-column: 2; font: 700 16px var(--cond); color: var(--ink-2); }
.action-done p { grid-column: 2; font-size: 17.5px; font-weight: 600; margin-top: -10px; }
.action-done { grid-template-rows: auto auto; }
.action-done::before { grid-row: 1 / span 2; }
.s-aktion .action-card { animation: rise .6s cubic-bezier(.2,.7,.2,1) backwards .35s; }

/* ---------- Entwickler-Pille (Replay / Aufzeichnen) ---------- */
.devpill { position: fixed; left: 14px; bottom: 14px; z-index: 50; display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 28px);
  padding: 8px 12px; border-radius: 999px; background: var(--ink); color: #fff; font: 500 13.5px/1.2 var(--cond); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.devpill b { color: var(--warn-line); white-space: nowrap; }
.devpill.rec b { color: #ff6b7a; }
.devpill a, .devpill button { color: inherit; background: rgba(255,255,255,.14); border: 0; border-radius: 999px; padding: 5px 10px; font: inherit; cursor: pointer; text-decoration: none; white-space: nowrap; }
.devpill a:hover, .devpill button:hover { background: rgba(255,255,255,.26); }
.devpill .msg:empty { display: none; }

/* ---------- Schmale Schirme ---------- */
@media (max-width: 860px) {
  :root { --head-h: 58px; }
  .top { padding: 0 16px; gap: 14px; }
  .mark .sub { display: none; }
  .progress { height: 30px; }
  .progress .seg span { display: none; }
  .progress .seg::before, .progress .seg i { top: 12px; }
  .progress .seg::after { top: 6px; }
  .progress::after { top: 5px; }
  .live { min-width: 0; font-size: 13px; }
  .stage { padding-left: 16px; padding-right: 16px; padding-top: calc(var(--head-h) + 32px); }
  .flownav button.primary { width: 100%; justify-content: space-between; }
  .flownav { margin-top: 32px; }
  .start, .fp, .ledger { grid-template-columns: 1fr; }
  .start { gap: 28px; }
  .start > div:first-child { padding-top: 0; }
  .hero-art { max-width: 460px; margin: 0 auto; }
  .options, .grid2, .grid3, .roles { grid-template-columns: 1fr; }
  .options.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { margin: 22px 0; padding: 0; }
  .timeline ol { display: flex; flex-direction: column; gap: 16px; }
  .timeline .rail { left: 11px; right: auto; top: 14px; bottom: 14px; width: var(--track); height: auto; translate: -50% 0; }
  .timeline li { text-align: left; display: grid; grid-template-columns: 24px 1fr; column-gap: 14px; align-items: start; }
  .timeline .dot { grid-column: 1; grid-row: 1 / span 2; margin: 1px 0 0; }
  .timeline .when, .timeline .what { grid-column: 2; }
  .callout { grid-template-columns: 1fr; gap: 6px; }
  .callout .k { white-space: normal; }
  .role .h { flex-direction: column; align-items: flex-start; }
  .fit { white-space: normal; }
  .hero-card { padding: 0 20px 24px; }
  .hero-card .k { margin: 0 -20px 22px; padding: 11px 20px; }
  .stat-row { grid-template-columns: 1fr; gap: 20px; }
  .stat b { font-size: 46px; }
  .qloader { gap: 14px; }
  .board { padding: 14px 14px 4px; border-radius: 12px; }
  .brow { grid-template-columns: 46px 1fr auto; gap: 10px; font-size: 17.5px; }
  .brow .bl { width: 36px; height: 23px; font-size: 13.5px; }
  .bhead .bclock { font-size: 23px; }
  .bstop em { display: none; }
  .bstop:first-child em, .bstop:last-of-type em { display: block; }
  .bstrip { padding: 16px 8px 30px; }
  .stage:has(> .warten) { padding-bottom: 20px; justify-content: flex-start; }
  .qhint { margin-top: 3px; font-size: 15px; }
  .rstep { grid-template-columns: 26px 1fr; }
  .rstep .p { grid-column: 2; }
  .rstep > div { grid-column: 2; }
  .reads { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .read:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
  .rlabel { font-size: calc(23px * var(--fs, 1)); }
  .scrollflow { padding-left: 34px; }
  .scrollflow::before { left: 9px; width: 6px; }
  .rs::before { left: -25px; width: 22px; height: 22px; border-width: 5px; top: 33px; }
  .fork { grid-template-columns: 70px minmax(0, 1fr); }
  .fork-svg { width: 70px; }
}
@media (max-width: 720px) {
  .reads { grid-template-columns: 1fr; row-gap: 16px; }
  .read { padding: 0; border-left: 0; }
  .rgrid { grid-template-columns: 1fr; }
  .action-card { padding: 0 18px 22px; }
  .action-label { margin: 0 -18px 10px; padding: 11px 18px; }
  .kwhy { grid-template-columns: 1fr; gap: 4px; }
  .kwhy .k, .callout .k { white-space: normal; }
  .omap-legend .wkey { margin-left: 0; }
}
@media (max-width: 480px) {
  .options.compact { grid-template-columns: 1fr; }
  .brow .bz { overflow-wrap: anywhere; }
}
/* Schmal: am Netz stehen nur die Liniensignale (groß), die Namen trägt die Linienübersicht darunter */
@media (max-width: 640px) {
  .rlabel .t, .rlabel .lv { display: none; }
  .rlabel .lb { font-size: 46px; }
  .fp .lines-legend { margin: 6px 0 4px; }
}

/* Opportunity Map hochkant (Telefon): Heute oben links, deine Linie fährt
   hinunter, jede Rolle eine Zeile, Name rechts der Endstation – kein Wischen */
@media (max-width: 640px) {
  .omap-wrap { overflow-x: visible; }
  .omap-frame.hoch { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .omap-frame.hoch .axl.t { grid-column: 1; grid-row: 1; justify-self: start; }
  .omap-frame.hoch .axl.l { grid-column: 1; grid-row: 2; writing-mode: horizontal-tb; rotate: none; justify-self: start; }
  .omap-frame.hoch .axl.r, .omap-frame.hoch .axl.b { display: none; }
  .omap-frame.hoch .omap { grid-column: 1; grid-row: 3; margin-top: 6px; }
  .omap-frame.hoch .omap .ax { display: none; }
  .omap-frame.hoch .omap .heute { left: 22px; top: 34px; }
  .omap-frame.hoch .omap .heute b { left: 20px; top: 0; translate: 0 -50%; }
}
/* Endstation mit Beschriftung rechts (Netzplan breit und hochkant) */
.omap .pin.side { translate: -11px -11px; width: calc(var(--lw) + 22px); height: auto; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 8px; row-gap: 3px; justify-items: start; text-align: left; }
.omap .pin.side .dot { grid-column: 1; grid-row: 1 / span 2; translate: none; }
.omap .pin.side .name { position: static; grid-column: 2; grid-row: 1; width: auto; max-width: 100%; text-align: left; font-size: 14px; overflow-wrap: anywhere; hyphens: auto; }
.omap .pin.side .pfit { position: static; grid-column: 2; grid-row: 2; }
.omap .pin.side.up { translate: -11px calc(-100% + 11px); }
.omap .pin.side.up .dot { align-self: end; }
.omap .pin.side.up .name { align-self: end; }
