/* =====================================================================
   „Die Strecke“ (25.11.2026, Branch landing/zug): Ein Gleis verbindet die Abschnitte der Seite.
   Beim Scrollen wird es verlegt, eine Rangierlok mit Kesselwagen fährt darauf (von oben gesehen,
   wie im Gleisplan der App), am Ende jedes Abschnitts schaltet ein Signal auf Fahrt. Im dunklen
   Abschluss hält der Zug am Prellbock, und das Prüfbuch bekommt seinen Stempel.
   Dazu Randnotizen in Handschrift wie im Papier-Prüfbuch. Gezeichnet von strecke.js;
   ohne JavaScript bleibt die Seite unverändert.
   ===================================================================== */
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/caveat-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/caveat-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --hand: "Caveat", "Segoe Print", cursive;
  --signal-halt: #B91C1C;
  --signal-fahrt: #3B7D0F;
}

/* ---- Gleisabschnitte ---- */
.strecke { display: none; }
.strecke-on .strecke {
  display: block; position: absolute; left: 0; right: 0; top: 28px; height: 120px; pointer-events: none;
  --ground: var(--bg); --rail: var(--ink);
  --sleeper: #B9C2CC; --loco: var(--ink); --cab: #4A5565; --wagon: #5F6B7A; --dome: #4A5565; --lamp: #F4F2EE;
}
.strecke-on .has-strecke { position: relative; padding-top: 184px; }
.strecke-on .section-wash .strecke { --ground: var(--wash); }
.strecke svg { display: block; width: 100%; height: 100%; overflow: visible; }

.strecke .sl { fill: none; stroke: var(--sleeper); stroke-width: 18; stroke-dasharray: 3.5 9; }
.strecke .ro { fill: none; stroke: var(--rail); stroke-width: 9; }
.strecke .ri { fill: none; stroke: var(--ground); stroke-width: 6; }
.strecke .mk { fill: none; stroke: #fff; stroke-width: 34; }
.strecke .loco-body { fill: var(--loco); }
.strecke .loco-cab { fill: var(--cab); }
.strecke .loco-grill { stroke: var(--ground); stroke-width: 1.2; opacity: .55; }
.strecke .loco-lamp { fill: var(--lamp); }
.strecke .wagon-body { fill: var(--wagon); }
.strecke .wagon-dome { fill: var(--dome); }
.strecke .wagon-walk { stroke: var(--ground); stroke-width: 1; opacity: .45; }
.strecke .mast { stroke: var(--rail); stroke-width: 2; }
.strecke .lamp { stroke: var(--rail); stroke-width: 2; fill: var(--signal-halt); transition: fill .35s var(--ease); }
.strecke .frei .lamp { fill: var(--signal-fahrt); }
.strecke .puffer { stroke: var(--rail); stroke-width: 5; stroke-linecap: round; }
.strecke .puffer-keil { fill: var(--rail); }

/* Abschluss: Gleis auf dunklem Grund am unteren Rand */
.strecke-on .cta { position: relative; padding-bottom: 200px; }
.strecke-on .cta .strecke {
  top: auto; bottom: 36px;
  --ground: var(--ink); --rail: #C9D0D8; --sleeper: rgba(255, 255, 255, .2);
  --loco: #E1E5EA; --cab: #AEB7C2; --wagon: #8A96A6; --dome: #6B7686; --lamp: #FDE68A;
}

/* Prüfstempel, erscheint, wenn der Zug am Prellbock steht */
.stempel {
  position: absolute; z-index: 1; display: none; padding: 10px 16px 8px; border: 3px double #9BDD1F; border-radius: 6px;
  color: #9BDD1F; text-align: center; line-height: 1.05; transform: rotate(-7deg) scale(1.35); opacity: 0;
  font: 600 1.05rem/1.1 var(--font); letter-spacing: .14em; text-transform: uppercase; pointer-events: none;
}
.stempel strong { display: block; font-size: 1.7rem; letter-spacing: .1em; }
.stempel small { display: block; margin-top: 4px; font-size: .8rem; letter-spacing: .08em; text-transform: none; font-weight: 500; }
.strecke-on .stempel { display: block; }
/* Wie ein Stempel: kommt von oben (größer) und sitzt mit einem kurzen Druck auf */
.angekommen .stempel { opacity: .92; transform: rotate(-7deg) scale(1); transition: transform .26s cubic-bezier(.5, 0, .75, 0), opacity .1s linear; }

/* ---- Unterstrich im Claim: ein Strich mit dem Stift, wie im Prüfbuch ---- */
.mark { position: relative; white-space: nowrap; }
.mark svg { position: absolute; left: -2%; bottom: -.16em; width: 104%; height: .32em; overflow: visible; pointer-events: none; }
/* Strichstärke in viewBox-Einheiten (kein non-scaling-stroke: das verträgt sich nicht mit pathLength-Strichen) */
.mark path { fill: none; stroke: #7FC412; stroke-width: 2.6; stroke-linecap: round; }
/* Lücke länger als der Strich, sonst bleibt vor dem Zeichnen ein Punkt der runden Strichenden stehen */
.strecke-on .mark path { stroke-dasharray: 1 1.3; stroke-dashoffset: 1.15; animation: strich .55s var(--ease) forwards; }
.strecke-on .mark path + path { animation-delay: .95s; }
.strecke-on .mark path:first-child { animation-delay: .55s; }
@keyframes strich { to { stroke-dashoffset: 0; } }

/* ---- Randnotizen in Handschrift (nur breite Bildschirme; sie wiederholen Angaben der Seite) ---- */
.randnotiz { display: none; }
@media (min-width: 1180px) {
  .randnotiz {
    display: block; position: absolute; margin: 0; width: max-content; max-width: 16ch;
    font: 600 1.55rem/1.05 var(--hand); color: var(--ink-2); transform: rotate(-3deg); pointer-events: none;
  }
  .randnotiz svg { display: block; width: 64px; height: 46px; margin-top: 6px; overflow: visible; }
  .randnotiz path { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .section-head { position: relative; }
  .notiz-mappe { display: flex; flex-direction: row-reverse; align-items: center; gap: 4px; left: 572px; top: calc(100% + 40px); transform: rotate(-2deg); }
  .notiz-mappe svg { margin-top: 0; }
  .notiz-preise { left: calc(100% + 24px); top: 64px; transform: rotate(3deg); }
  .phone-shot { position: relative; }
  .notiz-funkloch { right: calc(100% + 28px); top: 72px; text-align: right; }
  .notiz-funkloch svg { margin-left: auto; }
}

@media (max-width: 680px) {
  .strecke-on .strecke { top: 12px; height: 96px; }
  .strecke-on .has-strecke { padding-top: 128px; }
  .strecke-on .cta { padding-bottom: 210px; }
  .strecke-on .cta .strecke { bottom: 24px; }
  .stempel { padding: 8px 12px 6px; font-size: .9rem; }
  .stempel strong { font-size: 1.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  .strecke-on .mark path { animation: none; stroke-dashoffset: 0; }
  .strecke .lamp { transition: none; }
  .angekommen .stempel { transition: none; }
}
