/* FDL Ausbildung: Lernpfad (lernpfad.js). Übersicht als Strecke mit Halten, Themenseiten mit Skizzen,
   Kasten nach dem Quiz und Einstiegskarten auf „Lernen“ und „Start“. Nur Farben aus fdl.css. */

/* ------------------------------------------------------------ Fritz */
.lp-fritz { width: 64px; height: 64px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35)); }
.lp-fritz.big { width: 112px; height: 112px; }
.lp-small { display: block; color: var(--faint); font-size: 12px; letter-spacing: .02em; }
.ic.flipx { transform: scaleX(-1); }

/* ------------------------------------------------------------ Einstiegskarten */
/* Beide Behälter haben die Klasse "grid", damit der Abstand zu den Kacheln davor und danach aus fdl.css kommt. */
#lernen-wege:empty, #start-wege:empty { display: none; }
#lernen-wege { margin-bottom: 14px; }
.lp-card { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer;
  border-color: rgba(var(--accent-rgb), .35); }
.lp-card:hover { border-color: rgba(var(--accent-rgb), .6); }
.lp-cardtext { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; flex: 1; }
.lp-cardtext b { font: 600 17px/1.25 var(--display); }
.lp-cardtext .bar { width: 100%; max-width: 320px; margin-top: 6px; }

/* ------------------------------------------------------------ Übersicht */
.lp-hero { display: flex; align-items: center; gap: 20px; }
.lp-herotext { min-width: 0; flex: 1; }
.lp-herotext h3 { font: 600 18px var(--display); }
.lp-prog { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
.lp-prog .bar { flex: 1 1 180px; height: 8px; }
.lp-prog .hint { margin: 0; }
.lp-herotext .actions { margin-top: 16px; }

/* Die Strecke: senkrechte Linie, jedes Thema ist ein Halt */
.lp-line { list-style: none; margin: 16px 0 0; padding: 0; }
.lp-stop { position: relative; }
.lp-stop::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 4px; border-radius: 2px; background: rgba(255, 255, 255, .1); }
.lp-stop:first-child::before { top: 26px; }
.lp-stop:last-child::before { bottom: calc(100% - 26px); }
.lp-stop.bestanden::before { background: var(--ok); opacity: .55; }
.lp-stopbtn { position: relative; display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 8px 8px 14px 0; border: 0; border-radius: 12px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lp-stopbtn > .chip { margin-top: 12px; }
.lp-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .18); background: var(--base-flat); color: var(--dim); font: 600 16px var(--display); }
.lp-dot .ic { font-size: 20px; }
.lp-stop.bestanden .lp-dot { border-color: var(--ok); background: rgba(108, 203, 95, .18); color: var(--ok); }
.lp-stop.offen .lp-dot, .lp-stop.gelesen .lp-dot { border-color: var(--accent); color: var(--accent); }
.lp-stop.now .lp-dot { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 6px rgba(var(--accent-rgb), .2), 0 0 22px rgba(var(--accent-rgb), .55); }
.lp-stop.gesperrt .lp-stoptext { opacity: .6; }
.lp-stoptext { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; padding-top: 2px; }
.lp-stoptext b { font: 600 16px/1.25 var(--display); }
.lp-ziel { color: var(--dim); font-size: 13.5px; }
.lp-stoptext .hint { margin-top: 2px; }
@media (hover: hover) {
  .lp-stopbtn:hover { background: rgba(255, 255, 255, .04); }
}
.lp-tip { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.lp-extra:empty { display: none; }

/* ------------------------------------------------------------ Themenseite */
.lp-kicker { margin: 0 0 4px; color: var(--accent); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.lp-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -8px 0 14px; }
.lp-pdot { width: 30px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .14); cursor: pointer; transition: background .2s, width .25s var(--ease); }
.lp-pdot.done { background: rgba(var(--accent-rgb), .5); }
.lp-pdot.on { width: 46px; background: var(--accent); }
.lp-pdot.quiz { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; cursor: default; font: 700 12px var(--display); color: var(--dim); }
.lp-pdot.quiz.done { background: var(--ok); color: var(--on-accent); }
/* Klickfläche auf Touch größer, ohne dass die Punkte dicker aussehen */
.lp-pdot:not(.quiz) { position: relative; }
.lp-pdot:not(.quiz)::after { content: ""; position: absolute; inset: -12px -4px; }

.lp-page { outline: none; animation: lpIn .35s var(--ease); }
.lp-page h2 { margin: 4px 0 12px; font: 600 21px/1.25 var(--display); }
.lp-p { margin: 0 0 12px; font-size: 15.5px; line-height: 1.6; max-width: 70ch; }
.lp-list { margin: 4px 0 14px; padding-left: 22px; font-size: 15px; line-height: 1.55; max-width: 70ch; }
.lp-list li { font-weight: 400; }
.lp-list li + li { margin-top: 6px; }
.lp-list.num { padding-left: 0; list-style: none; counter-reset: lp; }
.lp-list.num li { position: relative; padding-left: 36px; counter-increment: lp; }
.lp-list.num li::before { content: counter(lp); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ice); color: var(--on-accent); font: 700 12.5px var(--display); }
.lp-merk { display: flex; align-items: center; gap: 14px; margin: 16px 0; padding: 14px 16px; border-radius: var(--r-inner);
  background: rgba(var(--accent-rgb), .12); border: 1px solid rgba(var(--accent-rgb), .35); }
.lp-merk .lp-fritz { width: 56px; height: 56px; }
.lp-merk b { display: block; margin-top: 2px; font: 600 16px/1.4 var(--display); }
.lp-merk .lp-small { color: var(--accent); font-weight: 600; }
.lp-terms { margin: 14px 0 0; border-radius: var(--r-inner); background: rgba(255, 255, 255, .04); border: 1px solid var(--edge); }
.lp-terms summary { padding: 11px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ice); }
.lp-terms dl { margin: 0; padding: 0 14px 12px; display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: 8px 16px; }
.lp-terms dt { font-weight: 600; font-size: 14px; }
.lp-terms dd { margin: 0; color: var(--dim); font-size: 14px; line-height: 1.5; }
.lp-src { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.45; }
.lp-src .ic { font-size: 15px; margin-top: 1px; }
.lp-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.lp-nav .grow { flex: 1; }
@keyframes lpIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ Ergebnis nach dem Quiz */
.lp-result { display: flex; align-items: flex-start; gap: 16px; border-color: rgba(var(--accent-rgb), .4); }
.lp-result h3 { margin-top: 2px; font: 600 17px var(--display); }
.lp-result .actions { margin-top: 12px; }

/* ------------------------------------------------------------ Skizzen: gemeinsam */
.lp-fig { margin: 6px 0 16px; padding: 14px; border-radius: var(--r-inner); background: rgba(0, 0, 0, .22); border: 1px solid var(--edge); }
.lp-fig figcaption { margin-top: 10px; color: var(--faint); font-size: 12.5px; line-height: 1.45; }
.lp-svg { display: block; width: 100%; height: auto; overflow: visible; }
.lp-img { display: block; max-width: 100%; max-height: 360px; margin: 0 auto; border-radius: 8px; background: #fff; }
.lp-t { fill: var(--dim); font: 500 14px var(--body); }
.lp-ts { fill: var(--faint); font: 500 12.5px var(--body); }
.lp-mt { fill: var(--on-accent); font: 700 12.5px var(--display); }

.lp-track .rail { stroke: #8a8f99; stroke-width: 4; stroke-linecap: round; }
.lp-track.main .rail { stroke: #c4c8cf; stroke-width: 5; }
.lp-rail2 { fill: none; stroke: #8a8f99; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.lp-loco rect { fill: #6d737e; stroke: rgba(255, 255, 255, .35); stroke-width: 1.5; }
.lp-loco.accent rect, .lp-wagon.accent rect { fill: var(--accent); stroke: rgba(255, 255, 255, .4); }
.lp-loco circle, .lp-wagon circle { fill: #2a2c33; stroke: #c4c8cf; stroke-width: 2; }
.lp-wagon rect { fill: #4f5560; stroke: rgba(255, 255, 255, .3); stroke-width: 1.5; }
.lp-wagon.dim { opacity: .45; }
.lp-wagon.move rect { fill: var(--ice); }
.lp-wagon.tilt { transform-box: fill-box; transform-origin: center; transform: rotate(-22deg); }
.lp-wagon.tiltd { transform-box: fill-box; transform-origin: center; transform: rotate(14deg); }
.lp-arrow line, .lp-arrow path { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.lp-person circle { fill: var(--dim); }
.lp-person path { fill: none; stroke: var(--dim); stroke-width: 3; stroke-linecap: round; }
.lp-person.accent circle { fill: var(--ice); }
.lp-person.accent path { stroke: var(--ice); }
.lp-mark circle { fill: var(--ice); stroke: var(--base-flat); stroke-width: 2.5; }
.lp-hump { fill: rgba(255, 255, 255, .05); stroke: #8a8f99; stroke-width: 4; stroke-linejoin: round; }
.lp-stop { stroke: var(--bad); stroke-width: 4; stroke-linecap: round; }
.lp-line .lp-stop { stroke: none; }
.lp-ring { fill: none; stroke: var(--ok); stroke-width: 3; }
.lp-zone { fill: rgba(94, 200, 255, .07); stroke: var(--ice); stroke-width: 1.5; stroke-dasharray: 6 5; }
.lp-coach { fill: #4f5560; stroke: rgba(255, 255, 255, .3); stroke-width: 1.5; }
.lp-win { fill: rgba(94, 200, 255, .3); }
.lp-door { fill: #3c414a; stroke: rgba(255, 255, 255, .35); stroke-width: 1.2; }
.lp-wheel { fill: #2a2c33; stroke: #c4c8cf; stroke-width: 2; }
.lp-coupler { stroke: #c4c8cf; stroke-width: 5; stroke-linecap: round; }
.lp-shoe { fill: var(--gold); }
.lp-ol { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 10 6; }
.lp-grenz rect { fill: var(--bad); }
.lp-grenz rect.w { fill: #fff; }
.lp-road { fill: rgba(255, 255, 255, .07); }
.lp-lane { stroke: rgba(255, 255, 255, .35); stroke-width: 2; stroke-dasharray: 12 10; }
.lp-x { fill: none; stroke: var(--bad); stroke-width: 4; stroke-linecap: round; }
.lp-dim line { stroke: var(--ice); stroke-width: 2; }
.lp-car { fill: #3c414a; stroke: rgba(255, 255, 255, .4); stroke-width: 1.5; }
.lp-time line { stroke: var(--ice); stroke-width: 2; }
.lp-zielsp { fill: rgba(var(--accent-rgb), .3); stroke: var(--accent); stroke-width: 1.5; }
.lp-tones circle, .lp-tones rect { fill: var(--accent); }
.lp-circ { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-dasharray: 60 12; }

/* Bewegungsarten: sechs kleine Bilder */
.lp-minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 10px; margin: 6px 0 16px; }
.lp-mini { margin: 0; padding: 10px 10px 8px; border-radius: var(--r-inner); background: rgba(0, 0, 0, .22); border: 1px solid var(--edge); }
.lp-mini figcaption { margin-top: 4px; font: 600 14px var(--display); text-align: center; }

/* Teilbereiche und Fahrauftrag: Schritte mit Pfeil dazwischen */
.lp-steps, .lp-flow { display: flex; align-items: stretch; gap: 8px; margin: 6px 0 16px; }
.lp-step { flex: 1; min-width: 0; padding: 14px; border-radius: var(--r-inner); background: rgba(255, 255, 255, .05); border: 1px solid var(--edge); border-top: 4px solid var(--ice); }
.lp-step.b { border-top-color: var(--accent); }
.lp-step.c { border-top-color: var(--ok); }
.lp-step b { display: block; font: 600 15px var(--display); }
.lp-step ul { margin: 8px 0 0; padding-left: 18px; color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.lp-stepn { display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: 8px; border-radius: 50%; background: rgba(255, 255, 255, .1); font: 700 13px var(--display); }
.lp-steparrow { flex: none; align-self: center; width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 12px solid var(--faint); }
.lp-flow .lp-step { display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.lp-checks { flex: 1; min-width: 0; margin: 0; padding: 12px 14px; list-style: none; border-radius: var(--r-inner); background: rgba(255, 255, 255, .05); border: 1px solid var(--edge); }
.lp-checks li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.lp-checks li + li { margin-top: 8px; }
.lp-checks .ic { color: var(--ok); font-size: 18px; }

/* Mitarbeiter, ZZB, Verständigen: Kärtchen nebeneinander */
.lp-roles, .lp-zzbs, .lp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; margin: 6px 0 16px; }
.lp-zzbs { margin: 0; }
.lp-role, .lp-zzb, .lp-col { padding: 14px; border-radius: var(--r-inner); background: rgba(255, 255, 255, .05); border: 1px solid var(--edge); }
.lp-role b, .lp-zzb b { display: block; margin-top: 8px; font: 600 15px var(--display); }
.lp-role p { margin: 6px 0 0; color: var(--dim); font-size: 13.5px; line-height: 1.5; }
.lp-badge { display: inline-block; padding: 3px 9px; border-radius: 7px; background: rgba(94, 200, 255, .16); color: var(--ice); font: 700 13px var(--display); }
.lp-zzb { text-align: center; }
.lp-big { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto; border-radius: 50%; background: var(--accent); color: var(--on-accent); font: 700 26px var(--display); }
.lp-arrows { margin: 10px 0 0; padding: 0; list-style: none; }
.lp-arrows li { position: relative; padding-left: 20px; color: var(--dim); font-size: 14px; line-height: 1.5; }
.lp-arrows li + li { margin-top: 6px; }
.lp-arrows li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Geschwindigkeiten als Schilder */
.lp-speeds { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 6px 0 16px; }
.lp-speed { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 12px; border-radius: var(--r-inner); background: rgba(255, 255, 255, .05); border: 1px solid var(--edge); text-align: center; }
.lp-speedv { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 50%; border: 6px solid var(--bad); background: #fff; color: #111; font: 700 28px var(--display); }
.lp-speed.c .lp-speedv { border-color: var(--ice); }
.lp-speed b { margin-top: 4px; font-size: 13.5px; font-weight: 600; line-height: 1.35; }

/* Gespräche als Sprechblasen */
.lp-bubbles { display: flex; flex-direction: column; gap: 10px; }
.lp-bubble { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; }
.lp-bubble.a { align-self: flex-start; background: rgba(94, 200, 255, .14); border-bottom-left-radius: 4px; }
.lp-bubble.b { align-self: flex-end; background: rgba(var(--accent-rgb), .16); border-bottom-right-radius: 4px; }
.lp-bubble .lp-small { margin-bottom: 2px; font-weight: 600; }

/* Rangiersignale Ra 1 bis Ra 5 */
.lp-ras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; margin: 6px 0 16px; }
.lp-ra { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--r-inner); background: rgba(0, 0, 0, .22); border: 1px solid var(--edge); }
.lp-rah { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-rah b { font: 600 14.5px var(--display); }
.lp-ra .lp-svg { max-width: 150px; margin: 4px auto; }

/* ------------------------------------------------------------ Handy */
@media (max-width: 640px) {
  .lp-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .lp-fritz.big { width: 76px; height: 76px; }
  .lp-mini figcaption { font-size: 13px; }
  .lp-card .lp-fritz { width: 52px; height: 52px; }
  .lp-stopbtn { flex-wrap: wrap; gap: 12px; }
  .lp-stoptext { flex: 1 1 calc(100% - 60px); }
  .lp-stopbtn > .chip { margin: 0 0 0 54px; }
  .lp-stop::before { left: 19px; }
  .lp-dot { width: 42px; height: 42px; }
  .lp-steps, .lp-flow { flex-direction: column; }
  .lp-steparrow { border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 12px solid var(--faint); border-bottom: 0; }
  .lp-terms dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lp-terms dd + dt { margin-top: 8px; }
  .lp-p { font-size: 15px; }
  .lp-fig { padding: 10px; }
  /* Große Skizzen werden auf dem Handy stark verkleinert: Beschriftung und Nummern darin größer */
  .lp-fig > .lp-svg .lp-t { font-size: 25px; }
  .lp-fig > .lp-svg .lp-ts { font-size: 23px; }
  .lp-fig > .lp-svg .lp-mark { transform-box: fill-box; transform-origin: center; transform: scale(1.7); }
  .lp-bubble { max-width: 94%; }
  .lp-nav .btn { flex: 1 1 auto; justify-content: center; }
  .lp-nav .grow { display: none; }
  .lp-result, .lp-tip { flex-direction: column; align-items: flex-start; }
  .lp-merk { gap: 10px; padding: 12px; }
  .lp-merk .lp-fritz { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-page { animation: none; }
  .lp-pdot { transition: none; }
}
