/* schulung.css - eigenes Erscheinungsbild der FluidMonitor-Schulung.
   Dokumentations-Optik: ruhig, lesbar, mobil zuerst. Orange bleibt der Akzent. */
:root {
    --orange: #ea580c; --orange-dunkel: #c2410c; --orange-hell: #fff1e8;
    --ink: #1e293b; --text: #334155; --muted: #64748b; --line: #e2e8f0;
    --bg: #f8fafc; --karte: #ffffff; --gruen: #16a34a; --rot: #dc2626; --gelb: #d97706; --blau: #2563eb;
    --radius: 12px; --schatten: 0 1px 3px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .05);
    --kopf: 58px; --nav: 290px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--orange-dunkel); }
img { max-width: 100%; }
button { font: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { font-size: 1.85rem; margin-top: .2em; }
h2 { font-size: 1.35rem; padding-top: .4em; border-top: 1px solid var(--line); }
h3 { font-size: 1.1rem; }
code { background: #f1f5f9; padding: .1em .35em; border-radius: 4px; font-size: .92em; }
pre { background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 8px; overflow: auto; }
pre code { background: none; color: inherit; padding: 0; }
.klein { font-size: .85rem; color: var(--muted); }
.versteckt { display: none !important; }

/* ── Kopfzeile ─────────────────────────────────────────────────────────────── */
.kopf { position: sticky; top: 0; z-index: 50; height: var(--kopf); background: var(--karte); border-bottom: 1px solid var(--line);
        display: flex; align-items: center; gap: 14px; padding: 0 16px; }
.kopf .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
.kopf .logo img { height: 30px; }
.kopf .logo span { font-size: .95rem; }
.kopf .logo em { font-style: normal; color: var(--orange); }
.kopf .rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.kopf .stufe { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); padding: 6px 10px; border-radius: 999px; background: var(--orange-hell); font-size: .9rem; white-space: nowrap; }
.kopf .stufe b { color: var(--orange-dunkel); }
.kopf .hamma img { height: 34px; display: block; }
.kopf .menue-knopf { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.btn { display: inline-block; border: 1px solid var(--line); background: var(--karte); color: var(--ink); padding: 9px 16px; border-radius: 8px; cursor: pointer; text-decoration: none; font-weight: 600; }
.btn:hover { border-color: #cbd5e1; }
.btn.primaer { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn.primaer:hover { background: var(--orange-dunkel); }
.btn.klein { padding: 5px 10px; font-size: .85rem; }
.btn[disabled] { opacity: .5; cursor: default; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.seite { display: grid; grid-template-columns: var(--nav) minmax(0, 1fr); min-height: calc(100vh - var(--kopf)); }
.nav { border-right: 1px solid var(--line); background: var(--karte); padding: 18px 12px 40px; position: sticky; top: var(--kopf); height: calc(100vh - var(--kopf)); overflow-y: auto; }
.nav .suche { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; font: inherit; }
.nav .pfad-titel { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 8px 6px; font-weight: 700; }
.nav a.kap { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .93rem; }
.nav a.kap:hover { background: #f1f5f9; }
.nav a.kap.aktiv { background: var(--orange-hell); color: var(--orange-dunkel); font-weight: 600; }
.nav a.kap .stand { margin-left: auto; font-size: .75rem; color: var(--muted); }
.nav a.kap .stand.fertig { color: var(--gruen); }
.nav .treffer { padding: 6px 10px; }
.nav .treffer a { display: block; padding: 6px 8px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: .9rem; }
.nav .treffer a:hover { background: #f1f5f9; }
.nav .treffer small { display: block; color: var(--muted); }
.inhalt { padding: 28px 24px 80px; max-width: 820px; width: 100%; }
.inhalt.breit { max-width: 1080px; }
.brotkrumen { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.brotkrumen a { color: var(--muted); text-decoration: none; }
.brotkrumen a:hover { text-decoration: underline; }

/* ── Karten und Fortschritt ────────────────────────────────────────────────── */
.karte { background: var(--karte); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--schatten); }
.pfade { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin: 18px 0 30px; }
.pfad { display: block; text-decoration: none; color: inherit; position: relative; }
.pfad .icon { font-size: 1.8rem; }
.pfad h3 { margin: 6px 0 4px; }
.pfad p { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.pfad.gesperrt { opacity: .55; }
.balken { height: 8px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--orange); border-radius: 999px; transition: width .4s; }
.balken.gruen > span { background: var(--gruen); }
.pfad .zahl { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.kapitel-liste { list-style: none; padding: 0; margin: 0; }
.kapitel-liste li { border-bottom: 1px solid var(--line); padding: 12px 0; }
.kapitel-liste li:last-child { border-bottom: none; }
.kapitel-liste .titel { font-weight: 600; color: var(--ink); }
.module { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.modul-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--karte); text-decoration: none; color: var(--text); font-size: .85rem; }
.modul-chip:hover { border-color: var(--orange); color: var(--orange-dunkel); }
.modul-chip.fertig { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.modul-chip.laufend { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.modul-chip.abgelaufen { border-color: #fecaca; background: #fef2f2; color: #991b1b; }

/* ── Artikel ──────────────────────────────────────────────────────────────── */
.artikel figure { margin: 20px 0; }
.artikel figure img { border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--schatten); }
.artikel figure.fehlt img { display: none; }
.artikel figure.fehlt figcaption::before { content: "Bild folgt: "; color: var(--gelb); }
.artikel figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }
.artikel .tabelle { overflow-x: auto; margin: 16px 0; }
.artikel table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.artikel th, .artikel td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.artikel th { background: #f8fafc; }
.artikel ul, .artikel ol { padding-left: 1.4em; }
.artikel li { margin: .25em 0; }
.kasten { border-left: 4px solid; border-radius: 8px; padding: 12px 16px; margin: 18px 0; background: #f8fafc; overflow: hidden; /* nicht unter das schwebende Inhaltsverzeichnis laufen */ }
.kasten p { margin: 4px 0 0; }
.kasten-titel { font-weight: 700; font-size: .9rem; }
.kasten.tipp { border-color: var(--blau); background: #eff6ff; }
.kasten.achtung { border-color: var(--rot); background: #fef2f2; }
.kasten.merke { border-color: var(--orange); background: var(--orange-hell); }
.artikel-toc { float: right; width: 220px; margin: 0 0 16px 24px; font-size: .85rem; border-left: 2px solid var(--line); padding-left: 12px; }
.artikel-toc a { display: block; color: var(--muted); text-decoration: none; padding: 2px 0; }
.artikel-toc a.l3 { padding-left: 12px; }
.artikel-toc a:hover { color: var(--orange-dunkel); }
.modul-fuss { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.modul-fuss .weiter { margin-left: auto; }

/* ── Video ─────────────────────────────────────────────────────────────────── */
.video-rahmen { background: #0f172a; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: #cbd5e1; }
.video-rahmen video { width: 100%; height: 100%; }
.video-platzhalter { text-align: center; padding: 20px; }
.video-platzhalter .gross { font-size: 2.6rem; }

/* ── Training ──────────────────────────────────────────────────────────────── */
.training-kopf { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.training-kopf .balken { flex: 1; }
.frage { animation: rein .25s ease; }
@keyframes rein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.frage h2 { border: none; padding: 0; margin-top: .4em; font-size: 1.2rem; }
.optionen { display: grid; gap: 10px; margin: 16px 0; }
.option { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 10px; background: var(--karte); cursor: pointer; text-align: left; width: 100%; color: var(--ink); transition: border-color .15s, background .15s; }
.option:hover { border-color: #cbd5e1; }
.option.gewaehlt { border-color: var(--orange); background: var(--orange-hell); }
.option.richtig { border-color: var(--gruen); background: #f0fdf4; }
.option.falsch { border-color: var(--rot); background: #fef2f2; }
.option .mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #cbd5e1; flex: none; display: grid; place-items: center; font-size: .8rem; }
.option.gewaehlt .mark { border-color: var(--orange); background: var(--orange); color: #fff; }
.option.mehrfach .mark { border-radius: 6px; }
.sortier { display: grid; gap: 8px; margin: 16px 0; }
.sortier .option { cursor: grab; }
.sortier .griff { color: var(--muted); }
.sortier .pfeile { margin-left: auto; display: flex; gap: 4px; }
.sortier .pfeile button { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 32px; height: 32px; cursor: pointer; }
.zahl-eingabe { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.zahl-eingabe input { font: inherit; font-size: 1.2rem; padding: 10px 12px; border: 2px solid var(--line); border-radius: 8px; width: 160px; }
.luecke-text { font-size: 1.1rem; line-height: 2.2; }
.luecke-text select { font: inherit; padding: 4px 8px; border: 2px solid var(--orange); border-radius: 6px; background: var(--orange-hell); }
.hotspot { position: relative; display: inline-block; cursor: crosshair; margin: 12px 0; }
.hotspot img { display: block; border: 1px solid var(--line); border-radius: 8px; }
.hotspot .punkt { position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--orange); background: rgba(234, 88, 12, .35); transform: translate(-50%, -50%); pointer-events: none; }
.hotspot .zielbox { position: absolute; border: 3px dashed var(--gruen); background: rgba(22, 163, 74, .15); pointer-events: none; }
.feedback { border-radius: 10px; padding: 14px 16px; margin: 14px 0; border: 1px solid; }
.feedback.richtig { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.feedback.falsch { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.feedback b { display: block; margin-bottom: 4px; }
.ergebnis { text-align: center; padding: 24px 12px; }
.ergebnis .quote { font-size: 3rem; font-weight: 800; color: var(--orange); line-height: 1; }
.ergebnis.bestanden .quote { color: var(--gruen); }
.ergebnis .punkte { font-size: 1.1rem; margin: 10px 0; }
.abzeichen-neu { display: inline-flex; align-items: center; gap: 10px; background: var(--orange-hell); border: 1px solid #fed7aa; border-radius: 999px; padding: 8px 16px; margin: 6px; }

/* ── Uebung ────────────────────────────────────────────────────────────────── */
.schritte { list-style: none; padding: 0; margin: 16px 0; counter-reset: s; }
.schritte li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.schritte li::before { counter-increment: s; content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 50%; background: #f1f5f9; color: var(--ink); font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
.schritte li.erledigt::before { background: var(--gruen); color: #fff; content: "✓"; }
.schritte label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; flex: 1; }
.schritte input { margin-top: 5px; width: 18px; height: 18px; }
.schritte .tipp { display: block; color: var(--muted); font-size: .88rem; margin-top: 3px; }

/* ── Profil ────────────────────────────────────────────────────────────────── */
.profil-kopf { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profil-kopf .gross { font-size: 3rem; }
.profil-kopf .punkte { font-size: 1.6rem; font-weight: 800; color: var(--orange); }
.abzeichen-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.abzeichen { text-align: center; padding: 16px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--karte); }
.abzeichen .icon { font-size: 2.2rem; }
.abzeichen .name { font-weight: 700; color: var(--ink); font-size: .92rem; margin-top: 6px; }
.abzeichen .text { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.abzeichen.offen { opacity: .45; filter: grayscale(1); }
.rangliste table { width: 100%; border-collapse: collapse; }
.rangliste td, .rangliste th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.rangliste tr.ich td { background: var(--orange-hell); font-weight: 700; }
.schalter { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.stufen-leiste { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.stufen-leiste span { padding: 4px 10px; border-radius: 999px; background: #f1f5f9; font-size: .8rem; color: var(--muted); }
.stufen-leiste span.erreicht { background: var(--orange-hell); color: var(--orange-dunkel); font-weight: 600; }

/* ── Meldungen ─────────────────────────────────────────────────────────────── */
.toast-ecke { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: var(--schatten); animation: rein .2s ease; max-width: 340px; }
.toast.gut { background: var(--gruen); }
.toast.abzeichen { background: var(--orange); font-weight: 600; }
.hinweis { padding: 10px 14px; border-radius: 8px; background: #f1f5f9; }
.hinweis.achtung { background: #fef2f2; color: #991b1b; }
.leer { text-align: center; color: var(--muted); padding: 40px 10px; }
.leer .gross { font-size: 2.5rem; }

/* ── Einstiegsseite ────────────────────────────────────────────────────────── */
body.einstieg { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.einstieg-karte { background: var(--karte); border: 1px solid var(--line); border-radius: 16px; padding: 36px 32px; max-width: 480px; text-align: center; box-shadow: var(--schatten); }
.einstieg-logo { height: 44px; margin-bottom: 8px; }
.portal-liste { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }

/* ── Zertifikat ────────────────────────────────────────────────────────────── */
.zertifikat { background: #fff; border: 10px double var(--orange); padding: 48px 56px; max-width: 840px; margin: 30px auto; color: var(--ink); }
.zertifikat .kopfzeile { display: flex; justify-content: space-between; align-items: center; }
.zertifikat h1 { text-align: center; margin: 30px 0 6px; font-size: 2rem; letter-spacing: .04em; }
.zertifikat .unter { text-align: center; color: var(--muted); margin-bottom: 30px; }
.zertifikat .name { text-align: center; font-size: 1.7rem; font-weight: 800; margin: 12px 0 4px; }
.zertifikat .firma { text-align: center; color: var(--muted); margin-bottom: 26px; }
.zertifikat ol { columns: 2; gap: 30px; font-size: .92rem; }
.zertifikat .fuss { display: flex; justify-content: space-between; margin-top: 40px; font-size: .85rem; color: var(--muted); }
.zertifikat .hinweis-klein { font-size: .78rem; color: var(--muted); margin-top: 26px; line-height: 1.4; }
@media print {
    .kopf, .nav, .druck-aus { display: none !important; }
    body { background: #fff; }
    .zertifikat { margin: 0; border-width: 8px; page-break-inside: avoid; }
}

/* ── Mobil ─────────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .seite { grid-template-columns: 1fr; }
    .nav { position: fixed; left: 0; top: var(--kopf); width: min(86vw, 340px); height: calc(100vh - var(--kopf)); transform: translateX(-105%); transition: transform .2s; z-index: 60; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
    .nav.offen { transform: none; }
    .kopf .menue-knopf { display: inline-block; }
    .kopf .stufe span.text { display: none; }
    .inhalt { padding: 18px 16px 70px; }
    .artikel-toc { display: none; }
    .zertifikat { padding: 24px 18px; }
    .zertifikat ol { columns: 1; }
}

/* Sprachwahl (seit 07.09.2026, 14 Sprachen wie das Portal) */
.lang-switcher { font: inherit; font-size: .85rem; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--karte); color: var(--ink); cursor: pointer; max-width: 150px; }
.einstieg-sprache { margin-top: 18px; }
.einstieg-sprache label { margin-right: 6px; }
@media (max-width: 900px) { .kopf .lang-switcher { max-width: 64px; } }
