/* Ruhig, klinisch, lesbar. Farben als Variablen - config.js ueberschreibt sie. */
:root {
  --akzent: #1f5f8b; --merke: #1f5f8b; --merke-grund: #eaf2f8;
  --achtung: #b8471c; --achtung-grund: #fcefe8; --fall: #4b5d67; --fall-grund: #f1f4f5;
  --richtig: #23703f; --falsch: #a3261e; --text: #1c2326; --grund: #ffffff; --flaeche: #f6f7f8;
  --linie: #d5dadd; --leise: #4f5b61;
  --uebung: #5a4a9c; --uebung-grund: #f2effa; --richtig-grund: #eaf5ee; --falsch-grund: #fbeceb;
  --schrift: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* hidden gilt auch fuer Elemente mit eigener display-Regel */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--kopf-h, 3.5rem) + .5rem); scroll-padding-bottom: calc(var(--leiste-h, 6rem) + .5rem); }
body { margin: 0; font-family: var(--schrift); font-size: 17px; line-height: 1.6; color: var(--text); background: var(--grund); }
a { color: var(--akzent); }
.inhalt { overflow-wrap: break-word; }
.inhalt a { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
/* Programmatischer Fokus nach Seitenwechsel (Screenreader) - ohne Rahmen */
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprunglink { position: absolute; left: -999px; top: 0; background: var(--akzent); color: #fff; padding: .5rem 1rem; z-index: 10; }
.sprunglink:focus { left: .5rem; }
.klein { font-size: .9rem; color: var(--leise); }

/* Kopf, Rahmen, Navigation */
.kopf { display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem; border-bottom: 1px solid var(--linie); background: var(--grund); position: sticky; top: 0; z-index: 5; }
.kurstitel { margin: 0; font-weight: 600; flex: 1; font-size: 1rem; }
.fortschritt-box { display: flex; align-items: center; gap: .5rem; }
progress { width: 8rem; height: .6rem; accent-color: var(--akzent); }
.nav-knopf { display: none; }
.demo-hinweis { margin: 0; padding: .5rem 1rem; background: #fff7d6; border-bottom: 1px solid #e6d58a; font-size: .9rem; }
.rahmen { display: flex; max-width: 78rem; margin: 0 auto; }
.navigation { width: 18rem; flex: none; border-right: 1px solid var(--linie); padding: 1rem .5rem; position: sticky; top: 3.2rem; align-self: flex-start; max-height: calc(100vh - 3.2rem); overflow-y: auto; }
.nav-liste { list-style: none; margin: 0; padding: 0; }
.nav-liste a { display: flex; gap: .4rem; padding: .35rem .5rem; border-radius: 4px; text-decoration: none; color: var(--text); font-size: .95rem; }
.nav-liste a:hover { background: var(--flaeche); }
.nav-liste a[aria-current="page"] { background: var(--merke-grund); font-weight: 600; }
.nav-liste a[aria-disabled="true"] { color: var(--leise); }
.nav-marke { width: 1rem; flex: none; color: var(--richtig); font-weight: 700; }
.nav-schloss { font-size: .8rem; color: var(--leise); }
.nav-teil { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--akzent); margin: .9rem .5rem .2rem; }
.inhalt { flex: 1; min-width: 0; padding: 1.5rem 2rem 3rem; max-width: 50rem; overflow-x: clip; }  /* Blatt-Animation erzeugt keinen Querlauf */
.fuss { border-top: 1px solid var(--linie); padding: .8rem 1rem; font-size: .85rem; color: var(--leise); text-align: center; }

/* Typografie */
h1 { font-size: 1.7rem; line-height: 1.25; margin: .2rem 0 1rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
h3 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; }
.ueberzeile { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--leise); margin: 0; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .95rem; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--linie); padding: .45rem .6rem; text-align: left; vertical-align: top; }
th { background: var(--flaeche); }
sup.fn a { text-decoration: none; font-size: .75em; padding: 0 .1em; }
.eckdaten { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; }
.eckdaten dt { font-weight: 600; }
.eckdaten dd { margin: 0; }

/* Kaesten im Buchlayout */
.merke, .achtung, .fall { border-left: 5px solid; padding: .8rem 1rem; margin: 1.2rem 0; border-radius: 0 6px 6px 0; }
.merke { border-color: var(--merke); background: var(--merke-grund); }
.achtung { border-color: var(--achtung); background: var(--achtung-grund); }
.fall { border-color: var(--fall); background: var(--fall-grund); }
.fall-etikett { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--fall); margin: 0 0 .3rem; }
.haus-eigen { margin-top: .8rem; padding-top: .6rem; border-top: 1px dashed var(--achtung); }
.haus-eigen dl { margin: 0; } .haus-eigen dt { font-weight: 600; } .haus-eigen dd { margin: 0 0 .4rem; }
.prompt { font-family: Consolas, "Courier New", monospace; font-size: .92rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; padding: .7rem .9rem; margin: .8rem 0; white-space: pre-wrap; }
.prompt.bad { border-left: 5px solid var(--falsch); } .prompt.good { border-left: 5px solid var(--richtig); }
.pl, .material-etikett { display: block; font-family: var(--schrift); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3rem; }
.haftung { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; padding: .6rem 1rem; }
.hinweis-voraussetzung { background: var(--merke-grund); padding: .5rem .8rem; border-radius: 6px; }

/* Glossar */
.gl { border-bottom: 1px dotted var(--akzent); cursor: help; }
.gl-tipp { position: absolute; z-index: 20; background: #fff; border: 1px solid var(--linie); box-shadow: 0 4px 16px rgba(0,0,0,.15); border-radius: 6px; padding: .6rem .8rem; font-size: .92rem; line-height: 1.45; }
.glossar dt { font-weight: 700; margin-top: .8rem; scroll-margin-top: 3.5rem; }  /* Platz fuer die A-Z-Leiste */ .glossar dd { margin: 0; }

/* Knoepfe, Formulare */
.knopf { font: inherit; background: var(--akzent); color: #fff; border: 2px solid var(--akzent); border-radius: 6px; padding: .5rem 1rem; cursor: pointer; margin: .4rem .4rem .4rem 0; }
.knopf:disabled { opacity: .5; cursor: default; }
.knopf-rand { background: var(--grund); color: var(--akzent); }
.blaettern { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: .5rem 1rem;
  margin-top: 1.2rem; padding: .6rem 0; border-top: 1px solid var(--linie); background: var(--grund); position: sticky; bottom: 0; z-index: 4; }
.blaettern > .knopf:first-child { justify-self: start; }
.blaettern > .knopf:last-child, .blaettern > .knopf[type="submit"] { justify-self: end; }
.blaettern .knopf { margin: 0; max-width: 100%; }
.test-leiste { position: static; }
.test-leiste > .knopf:not(:first-child) { justify-self: end; }
.blaettern-mitte { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.seitenzahl { font-size: .8rem; color: var(--leise); }
.knopf-link { font: inherit; font-size: .85rem; background: none; border: 0; color: var(--akzent); text-decoration: underline; cursor: pointer; padding: .2rem; }

/* Blaettern wie im Buch: ein Blatt als Papierseite, Kolumnentitel, Seitenpunkte */
.kolumne { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; letter-spacing: .04em; color: var(--leise);
  padding: 0 .2rem .5rem; }
.kolumne-seite { white-space: nowrap; }
.kolumne { align-items: center; }
/* Vorlesen: Schalter in der Kopfleiste, gut sichtbar; gruen und pulsierend, solange der Ton an ist */
.kopf .hoeren { flex: none; display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .95rem; font-weight: 700;
  color: #fff; background: var(--akzent); border: 2px solid var(--akzent); border-radius: 99px; padding: .35rem .95rem;
  cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.18); white-space: nowrap; }
.kopf .hoeren:hover:not(:disabled) { filter: brightness(1.1); }
.kopf .hoeren .hoeren-icon { font-size: 1.15rem; line-height: 1; }
.kopf .hoeren.an { background: var(--richtig); border-color: var(--richtig); }
.kopf .hoeren.an .hoeren-icon { animation: hoeren-puls 1.3s ease-in-out infinite; }
.kopf .hoeren:disabled { opacity: .45; cursor: default; box-shadow: none; }
@keyframes hoeren-puls { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22); } }
@media (prefers-reduced-motion: reduce) { .kopf .hoeren.an .hoeren-icon { animation: none; } }
.seite-modul > .blatt, .seite-text > .blatt { background: var(--grund); border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 10px 28px rgba(0,0,0,.07); padding: 1.4rem 2rem 2rem; min-height: 55vh; }
.blatt > :first-child { margin-top: 0; }
.blatt.von-rechts { animation: blatt-rechts .24s ease-out; }
.blatt.von-links { animation: blatt-links .24s ease-out; }
@keyframes blatt-rechts { from { opacity: 0; transform: translateX(32px); } to { opacity: 1; transform: none; } }
@keyframes blatt-links { from { opacity: 0; transform: translateX(-32px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .blatt.von-rechts, .blatt.von-links { animation: none; } }
.punkte { display: flex; flex-wrap: wrap; justify-content: center; max-width: 22rem; }
.punkt { width: 1.5rem; height: 1.5rem; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.punkt::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; border: 1.5px solid var(--akzent); box-sizing: border-box; transition: transform .15s; }
/* ungelesen: Ring; gelesen: gefuellt; aktuell: gefuellt, groesser, mit Hof */
.punkt.gelesen::before { background: var(--akzent); }
.punkt[aria-current="step"]::before { box-shadow: 0 0 0 2px var(--grund), 0 0 0 3.5px var(--akzent); }
.punkt[aria-current="step"]::before { background: var(--akzent); transform: scale(1.35); }
.punkt:hover::before { transform: scale(1.3); }
.nav-blaetter { list-style: none; margin: .1rem 0 .4rem 1.4rem; padding: 0 0 0 .4rem; border-left: 2px solid var(--linie); }
.nav-blaetter a { font-size: .85rem; padding: .2rem .4rem; }
.nav-blaetter a[aria-current="step"] { background: var(--flaeche); font-weight: 600; }
.bedienung { background: var(--flaeche); border-radius: 6px; padding: .5rem .8rem; }

/* Fussnote: Quelle als Fenster an der Textstelle */
.fn-popover { position: absolute; z-index: 25; background: #fff; border: 1px solid var(--linie); box-shadow: 0 6px 24px rgba(0,0,0,.18);
  border-radius: 8px; padding: .6rem .9rem .7rem; font-size: .9rem; line-height: 1.45; max-height: 60vh; overflow: auto; overflow-wrap: anywhere; }
.fn-kopf { display: flex; justify-content: space-between; align-items: center; margin-bottom: .3rem; }
.fn-zu { font: inherit; font-size: 1.3rem; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--leise); padding: .1rem .4rem; }
.fn-fuss { margin: .5rem 0 0; }

/* Glossar: Sprung nach Anfangsbuchstaben */
.abc { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 1rem; position: sticky; top: var(--kopf-h, 3.2rem); background: var(--grund); padding: .4rem 0; z-index: 3; }
.abc-knopf { font: inherit; font-size: .9rem; min-width: 2rem; padding: .2rem .4rem; border: 1px solid var(--linie); border-radius: 4px; background: var(--grund); color: var(--akzent); cursor: pointer; }
.weitermachen { background: var(--merke-grund); border-radius: 6px; padding: .8rem 1rem; margin-bottom: 1rem; }
fieldset { border: 0; padding: 0; margin: .8rem 0; }
legend { font-weight: 600; margin-bottom: .4rem; }
.option { display: flex; gap: .5rem; align-items: flex-start; padding: .35rem .5rem; border-radius: 6px; border: 1px solid transparent; }
.option input { margin-top: .35rem; flex: none; width: 1.1rem; height: 1.1rem; }
.option.ist-richtig { border-color: var(--richtig); background: var(--richtig-grund); }
.option.ist-falsch { border-color: var(--falsch); background: var(--falsch-grund); }
.optionen-reihe { display: flex; flex-wrap: wrap; gap: .5rem; }
.buchst { font-weight: 700; }
.feld label { display: block; font-size: .9rem; color: var(--leise); margin: .5rem 0 .2rem; }
textarea { width: 100%; font: inherit; padding: .5rem; border: 1px solid var(--linie); border-radius: 6px; }

/* Uebungen */
.uebungen { margin-top: 2.5rem; border-top: 2px solid var(--linie); }
.uebung { border: 1px solid var(--linie); border-radius: 8px; padding: 1rem 1.1rem; margin: 1.2rem 0; }
.ue-kopf { font-weight: 700; margin: 0 0 .4rem; }
.ue-loesung { background: var(--flaeche); border-radius: 6px; padding: .7rem .9rem; margin-top: .6rem; }
.ue-loesung-kopf { font-weight: 700; margin: 0 0 .3rem; }
.ue-meldung .ok, .testauswertung .ok b { color: var(--richtig); }
.ue-meldung .nok, .testauswertung .nok b { color: var(--falsch); }
.ue-material { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 6px; padding: .7rem .9rem; margin: .6rem 0; }
.markierbar { line-height: 2; }
.wort { font: inherit; background: none; border: 0; padding: 0 .05em; color: inherit; cursor: pointer; border-radius: 3px; }
.wort[aria-pressed="true"] { background: #ffe38a; }
.wort.fehlerstelle { box-shadow: inset 0 -3px 0 var(--falsch); }
.fs-punkt { font-weight: 700; white-space: nowrap; }
.fs-punkt.ok { color: var(--richtig); }
.fs-punkt.nok { color: var(--falsch); }
.selbstcheck ul { list-style: none; padding: 0; } .selbstcheck li { display: flex; gap: .5rem; margin: .3rem 0; }

/* Test */
.testfrage { border: 1px solid var(--linie); border-radius: 8px; padding: .8rem 1rem; }
.testfrage > legend { float: left; width: 100%; padding: 0; margin-bottom: .6rem; }  /* Frage innerhalb des Kastens */
.testfrage > legend + * { clear: both; }
.tf-nr { display: block; font-size: .85rem; color: var(--leise); font-weight: 400; }
.ergebnis { border-radius: 8px; padding: .8rem 1rem; }
.ergebnis-ok { background: var(--richtig-grund); border: 1px solid var(--richtig); }
.ergebnis-nok { background: var(--falsch-grund); border: 1px solid var(--falsch); }
.testauswertung li { margin: .5rem 0; }


/* ============================================================================
   Satz: deutsche Silbentrennung (weiche Trennstellen aus dem Bau + hyphens)
   und Blocksatz fuer Fliesstext - erst ab Tablet-Breite; auf dem Handy
   reisst Blocksatz trotz Trennung Loecher in die kurzen Zeilen.
   ========================================================================= */
.inhalt, .gl-tipp, .fn-popover { hyphens: auto; -webkit-hyphens: auto; hyphenate-limit-chars: 8 3 3; }
h1, h2, h3, .kolumne, .knopf, .ue-kopf, .nav-liste { hyphens: manual; -webkit-hyphens: manual; }
@media (min-width: 40rem) {
  .blatt > p, .blatt li, .blatt .merke, .blatt .achtung, .blatt .fall, .ue-stamm, .ue-loesung,
  .haftung, .glossar dd, .fn-text, .seite-start li { text-align: justify; }
}
.prompt, td, th, .markierbar, .option, .testfrage legend, .quellenliste, .selbstcheck, .ue-kopf { text-align: left; }

/* ============================================================================
   Kaesten und Farbflaechen
   ========================================================================= */
/* Kapitelanfang: das erste Blatt eines Moduls traegt einen Farbstreifen */
.seite-modul > .blatt:first-child, .seite-text > .blatt:first-child { border-top: 6px solid var(--akzent); }
.seite-modul .ueberzeile { display: inline-block; background: var(--akzent); color: #fff; padding: .15rem .6rem; border-radius: 99px; letter-spacing: .1em; }
.kolumne span:first-child { color: var(--akzent); font-weight: 600; }

/* Ueberschriften: Kapitel als Farbband, Abschnitt mit feiner Linie */
h3.kap { background: var(--merke-grund); color: var(--akzent); border-left: 5px solid var(--akzent); padding: .5rem .8rem;
  border-radius: 0 6px 6px 0; font-size: 1.05rem; }
h3.sub:not(.kap) { color: var(--akzent); padding-bottom: .25rem; border-bottom: 2px solid var(--merke-grund); }

/* MERKE / ACHTUNG / Fallanker: Etikett als farbiges Schild ueber dem Text */
.merke, .achtung, .fall { box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.merke > b:first-child, .achtung > b:first-child, .fall-etikett {
  display: table; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  padding: .12rem .55rem; border-radius: 4px; margin: 0 0 .45rem; }
.merke > b:first-child { background: var(--merke); }
.achtung > b:first-child { background: var(--achtung); }
.fall-etikett { background: var(--fall); }
.achtung.pflichtkasten { border: 2px solid var(--achtung); border-left-width: 6px; }
.haus-eigen { background: rgba(255,255,255,.7); border-radius: 6px; padding: .5rem .7rem; border-top: 0; }

/* Einleitungsabsatz und Schrittfolgen */
.lead { font-size: 1.08rem; color: var(--akzent); border-left: 4px solid var(--akzent); padding: .2rem 0 .2rem .9rem; }
ol.steps { list-style: none; counter-reset: schritt; padding: .8rem 1rem; margin: 1rem 0; background: var(--flaeche); border-radius: 8px; }
ol.steps > li { counter-increment: schritt; position: relative; padding-left: 2.5rem; margin: .55rem 0; }
ol.steps > li::before { content: counter(schritt); position: absolute; left: 0; top: .05rem; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; background: var(--akzent); color: #fff; font-weight: 700; font-size: .9rem; display: grid; place-items: center; }

/* Tabellen: Kopf eingefaerbt, Zeilen im Wechsel */
table.t th { background: var(--akzent); color: #fff; border-color: var(--akzent); }
table.t tbody tr:nth-child(even) td { background: var(--flaeche); }

/* Prompt-Beispiele: gut gruen, schlecht rot hinterlegt; Etikett als Schild */
.prompt.good { background: var(--richtig-grund); }
.prompt.bad { background: var(--falsch-grund); }
.prompt .pl { display: table; color: #fff; background: var(--fall); padding: .1rem .5rem; border-radius: 4px; font-size: .72rem; }
.prompt.good .pl { background: var(--richtig); }
.prompt.bad .pl { background: var(--falsch); }

/* Uebungen: farbiger Kopf je Art */
.uebung { --ue: var(--uebung); --ue-grund: var(--uebung-grund); border-color: var(--ue); border-width: 1px 1px 1px 5px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.ue-fehlersuche { --ue: var(--achtung); --ue-grund: var(--achtung-grund); }
.ue-kasuistik { --ue: var(--fall); --ue-grund: var(--fall-grund); }
.ue-freitext, .ue-prompt { --ue: var(--richtig); --ue-grund: var(--richtig-grund); }
.ue-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: -1rem -1.1rem .9rem; padding: .6rem 1.1rem;
  background: var(--ue-grund); border-bottom: 1px solid var(--linie); border-radius: 0 7px 0 0; }
.ue-nr { color: var(--ue); }
.ue-art { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--ue);
  padding: .1rem .5rem; border-radius: 4px; }
.ue-titel { flex-basis: 100%; font-size: .95rem; }
.ue-material { background: var(--grund); border-style: dashed; }
.ue-loesung { background: var(--richtig-grund); border-left: 4px solid var(--richtig); border-radius: 0 6px 6px 0; }
.ue-loesung-kopf { color: var(--richtig); text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; }
.selbstcheck { background: var(--grund); border-radius: 6px; padding: .5rem .7rem; margin-top: .6rem; }

/* Startseite */
.eckdaten { background: var(--merke-grund); border-radius: 8px; padding: .8rem 1rem; }
.seite-start h2 { color: var(--akzent); }
.seite-start ul { list-style: none; padding: .7rem 1rem; background: var(--flaeche); border-radius: 8px; }
.seite-start ul li { position: relative; padding-left: 1.6rem; margin: .35rem 0; }
.seite-start ul li::before { content: "✓"; position: absolute; left: 0; color: var(--richtig); font-weight: 700; }
.bedienung { border-left: 4px solid var(--uebung); background: var(--uebung-grund); color: var(--text); }

/* Quellen und Glossar */
.quellen h2 { color: var(--akzent); }
.quellenliste { font-size: .9rem; }
.quellenliste li { padding: .35rem .5rem; border-radius: 4px; }
.quellenliste li:nth-child(even) { background: var(--flaeche); }
.glossar dt { color: var(--akzent); }
.glossar dd { padding-bottom: .5rem; border-bottom: 1px solid var(--linie); }

/* Handy */
@media (max-width: 52rem) {
  .nav-knopf { display: inline-block; font: inherit; background: var(--grund); border: 1px solid var(--linie); border-radius: 6px; padding: .3rem .7rem; }
  .kopf { padding: .3rem .75rem; gap: .6rem; }
  .kurstitel { font-size: .95rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-knopf { padding: .2rem .6rem; }
  .navigation { display: none; position: fixed; inset: var(--kopf-h, 3.2rem) 0 0 0; width: auto; max-height: none; align-self: stretch;  /* sonst nur so hoch wie der Inhalt, nicht scrollbar */
    background: var(--grund); z-index: 6; border-right: 0;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 2rem; }
  body.nav-offen .navigation { display: block; }
  body.nav-offen { overflow: hidden; }  /* Wischen scrollt das Inhaltsverzeichnis, nicht die Seite dahinter */
  .inhalt { padding: 1rem 1rem 0; }
  .seite-modul > .blatt, .seite-text > .blatt { border: 0; box-shadow: none; padding: 0; min-height: 50vh; border-radius: 0; }
  .blaettern { gap: .3rem .5rem; margin-top: .8rem; padding: .3rem 0; }  /* eine Zeile: Zurück · 3 / 18 · Weiter */
  .blaettern > .knopf { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .test-leiste { grid-template-columns: 1fr 1fr; }
  .test-leiste .blaettern-mitte { grid-column: 1 / -1; grid-row: 1; }
  .blaettern:not(.test-leiste) .punkte { display: none; }  /* auf dem Handy reicht "3 / 18" */
  .blaettern .knopf { font-size: .88rem; padding: .35rem .6rem; }
  .kolumne span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .glossar dt { scroll-margin-top: 7.5rem; }  /* A-Z-Leiste bricht hier mehrzeilig um */
  .fortschritt-box span { display: none; }
  .kopf .hoeren { font-size: .85rem; padding: .25rem .65rem; gap: .3rem; }
  progress { width: 5rem; }
  h1 { font-size: 1.4rem; }
}
@media print { .kopf, .navigation, .blaettern { display: none; } }

/* ============================================================================
   Grafiken (SVG aus grafiken/, Farben aus den Kursvariablen)
   ========================================================================= */
.grafik { margin: 1.5rem 0; }
.grafik-svg { display: block; width: 100%; height: auto; max-width: 27rem; margin: 0 auto; font-family: var(--schrift); }
.grafik figcaption { max-width: 30rem; margin: .55rem auto 0; font-size: .88rem; line-height: 1.45; color: var(--leise); text-align: center; hyphens: manual; }
.grafik-beschreibung { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }  /* für Screenreader und Vorlesen */
.g-flaeche { fill: var(--flaeche); }
.g-weiss { fill: var(--grund); }
.g-rand { stroke: var(--linie); stroke-width: 1.5; }
.g-linie-f { fill: var(--linie); }
.g-akzent { fill: var(--akzent); }
.g-halb { opacity: .65; }
.g-viertel { opacity: .4; }
.g-akzent-t { fill: var(--akzent); }
.g-akzent-hell { fill: var(--merke-grund); }
.g-akzent-rand { stroke: var(--akzent); stroke-width: 1.5; }
.g-achtung { fill: var(--achtung); }
.g-achtung-t { fill: var(--achtung); }
.g-achtung-hell { fill: var(--achtung-grund); }
.g-achtung-rand { stroke: var(--achtung); stroke-width: 1.2; }
.g-richtig { fill: var(--richtig); }
.g-richtig-t { fill: var(--richtig); }
.g-richtig-hell { fill: var(--richtig-grund); }
.g-richtig-rand { stroke: var(--richtig); stroke-width: 1.5; }
.g-leise-t { fill: var(--leise); }
.g-gitter { stroke: var(--linie); stroke-width: 1; stroke-dasharray: 4 4; }
.g-achse { stroke: var(--leise); stroke-width: 1.5; }
.g-pfeil { fill: none; stroke: var(--leise); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.grafik-svg text { fill: var(--text); }
.grafik-svg text.g-akzent-t, .grafik-svg tspan.g-akzent-t { fill: var(--akzent); }
.grafik-svg text.g-achtung-t { fill: var(--achtung); }
.grafik-svg text.g-richtig-t { fill: var(--richtig); }
.grafik-svg text.g-leise-t, .grafik-svg .g-leise-t text { fill: var(--leise); }
.t-15 { font-size: 15px; } .t-17 { font-size: 17px; } .t-19 { font-size: 19px; } .t-21 { font-size: 21px; }
.t-22 { font-size: 22px; } .t-24 { font-size: 24px; } .t-fett { font-weight: 700; }

/* Intro (nur Kurse mit KURS.intro): vollflaechig ueber dem Kurs */
.intro-huelle { position: fixed; inset: 0; z-index: 100; background: #0a1724; }
.intro-rahmen { width: 100%; height: 100%; border: 0; display: block; }

/* ---------------------------------------------------------------------------
   Kompaktfassung: Szenen-Blaetter (Situation, Entscheidung, Aufloesung).
   Wird vom Bau hinter css/kurs.css gehaengt. Farben kommen aus config.js.
   Tippflaechen mindestens 44 px; Zustaende tragen Zeichen und Wort, nicht nur Farbe.
   --------------------------------------------------------------------------- */
.vorspann { font-size: 1.1rem; }
.figuren { margin: .6rem 0 1.2rem; padding-left: 1.2rem; }
.szene-ort { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--fall); margin: 1rem 0 0; }
.blatt-szene > .szene-ort:first-child { margin-top: 0; }
.szene-titel { margin: .1rem 0 .6rem; font-size: 1.35rem; }
.szene-lage { font-size: 1.02rem; }
.szene-lage p { margin: 0 0 .6rem; }
.szene-lage p:last-child { margin-bottom: 0; }

.entscheidung { margin: 1.4rem 0 0; }
.ent-frage { margin: 0 0 .6rem; font-size: 1.15rem; color: var(--uebung); }
.ent-optionen { display: grid; gap: .6rem; }
.ent-option { font: inherit; color: var(--text); text-align: left; display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; align-items: start;
  min-height: 44px; padding: .7rem .9rem; background: var(--grund); border: 2px solid var(--uebung); border-radius: 10px; cursor: pointer;
  hyphens: manual; -webkit-hyphens: manual; }
.ent-option:hover { background: var(--uebung-grund); }
.ent-buchst { grid-row: 1 / span 2; display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem;
  border-radius: 50%; background: var(--uebung); color: #fff; font-weight: 700; }
.ent-marke { grid-column: 2; font-size: .8rem; font-weight: 700; letter-spacing: .04em; }
.ent-marke:empty { display: none; }
.ent-option.ist-sicher { border-color: var(--richtig); background: var(--richtig-grund); }
.ent-option.ist-sicher .ent-buchst { background: var(--richtig); }
.ent-option.ist-sicher .ent-marke { color: var(--richtig); }
.ent-option.ist-riskant { border-color: var(--linie); border-style: dashed; }
.ent-option.ist-riskant .ent-buchst { background: var(--leise); }
.ent-option.ist-riskant .ent-marke { color: var(--falsch); }
.ent-option[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--uebung-grund), 0 0 0 4px var(--uebung); }
.ent-option.ist-riskant[aria-pressed="true"] { border-color: var(--falsch); border-style: solid; background: var(--falsch-grund); }

.ent-urteil { margin: 1.1rem 0 .4rem; font-size: 1.1rem; }
.ent-urteil .ok { color: var(--richtig); }
.ent-urteil .nok { color: var(--falsch); }
.ent-etikett { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--leise); margin: 0 0 .3rem; }
.ent-folge { border-left: 5px solid var(--fall); background: var(--fall-grund); border-radius: 0 6px 6px 0; padding: .7rem 1rem; margin: .6rem 0; }
.ent-folge p { margin: 0 0 .5rem; }
.ent-folge p:last-child { margin-bottom: 0; }
.ent-nochmal { margin: .3rem 0 0; }
.ent-aufloesung { margin-top: 1.2rem; padding-top: 1rem; border-top: 2px solid var(--linie); }
.ent-aufloesung ol, .ent-aufloesung ul { padding-left: 1.3rem; }
.ent-aufloesung li { margin-bottom: .3rem; }

/* Fehler antippen */
.fk-vorlage { border-style: solid; background: var(--flaeche); }
.fk-vorlage ul { margin: 0; padding-left: 1.2rem; }
.fk-text .markierbar { margin: 0 0 .3rem; line-height: 1.4; }
.fk-text .wort { display: inline-block; padding: .65em .1em; line-height: 1.4; }   /* 44 px hohe Tippflaeche je Wort */
.fk-text .wort:disabled { cursor: default; color: inherit; }
.fk-text .wort.fehlerstelle { font-weight: 700; background: var(--falsch-grund); box-shadow: inset 0 -3px 0 var(--falsch); }
.fk-text .wort.fk-gefunden { background: var(--richtig-grund); box-shadow: inset 0 -3px 0 var(--richtig); }
.fk-stand { margin: .8rem 0 .2rem; }
.fk-hinweis { min-height: 1.5em; margin: 0 0 .4rem; }
.fk-funde { padding-left: 0; list-style: none; margin: .6rem 0 0; }
.fk-funde li { border-left: 5px solid; padding: .5rem .8rem; margin: 0 0 .5rem; border-radius: 0 6px 6px 0; }
.fk-funde li.ok { border-color: var(--richtig); background: var(--richtig-grund); }
.fk-funde li.nok { border-color: var(--falsch); background: var(--falsch-grund); }
.fk-funde li.ok b { color: var(--richtig); }
.fk-funde li.nok b { color: var(--falsch); }

.belege { margin: 2rem 0 0; border-top: 1px solid var(--linie); padding-top: .6rem; }
.belege summary { cursor: pointer; font-weight: 600; color: var(--akzent); min-height: 44px; display: flex; align-items: center; gap: .4rem; }
.belege summary::before { content: "▸"; }
.belege[open] summary::before { content: "▾"; }
.belege summary::-webkit-details-marker { display: none; }
.bilanz { font-weight: 600; background: var(--richtig-grund); border-left: 5px solid var(--richtig); border-radius: 0 6px 6px 0; padding: .6rem 1rem; }
.merksaetze li { margin-bottom: .4rem; }
.ent-option, .fk-vorlage, .fk-text, .fk-funde, .ent-frage, .szene-titel { text-align: left; }
@media (max-width: 52rem) {
  .szene-titel { font-size: 1.2rem; }
  .ent-option { padding: .65rem .7rem; }
}
/* Figurenliste auf der Startseite: schlichte Punkte statt der Haken der Lernziele */
.seite-start ul.figuren { list-style: disc; background: none; padding: 0 0 0 1.3rem; }
.seite-start ul.figuren li { padding-left: 0; text-align: left; }
.seite-start ul.figuren li::before { content: none; }
