/* C++ Kurs – Gestaltung „Liniennetz bei Nacht“ (DESIGN.md): Kapitel sind Linien im Farbcode für Widerstände,
   Lektionen sind Stationen, die Probeklausur ist die Endstation. Emaille-Grund in Mitternachtsblau, Tafeln eine Stufe tiefer
   mit 1px-Rand, Porzellanweiß für Text, aktive Stelle, Fokus und Hauptknopf. Linienfarben erscheinen nur als Linien,
   Linienpunkte und Stationen. Systemschriften, nichts wird zur Laufzeit geladen.
   Struktogramm und Druck bleiben ein weißer Aushang in Schwarz-Weiß. */
:root {
  --bg: #0f1e3a;
  --karte: #0a1630;
  --flaeche: #172a4c;
  --text: #f3f6f8;
  --leise: #a9b8cf;
  --matt: #7d8fae;
  --linie: #22375d;
  --kante: #34507f;
  --feld: #07112a;
  --feld-rand: #5872a3;
  --akzent: #f3f6f8;
  --akzent-hell: #1a2b4b;
  --akzent-mittel: #2b4170;
  --akzent-rand: #5872a3;
  --auswahl: rgba(140, 180, 255, 0.34);
  --gruen: #4fd18b;
  --gruen-hell: color-mix(in oklab, #4fd18b 14%, #0a1630);
  --gruen-rand: color-mix(in oklab, #4fd18b 45%, #0a1630);
  --rot: #ff7b72;
  --rot-hell: color-mix(in oklab, #ff7b72 15%, #0a1630);
  --rot-rand: color-mix(in oklab, #ff7b72 48%, #0a1630);
  --gelb: #f2b84b;
  --gelb-hell: color-mix(in oklab, #f2b84b 15%, #0a1630);
  --gelb-rand: color-mix(in oklab, #f2b84b 48%, #0a1630);
  --blitz: #ffb547;
  --eva-e: #2f6fd8;
  --eva-v: #b25a00;
  --eva-a: #18794e;
  --code-bg: #07112a;
  --konsole: #040a17;
  --konsole-text: #e6ecf4;
  /* Farben im Code für den dunklen Grund; der Druck bekommt die hellen Gegenstücke */
  --t-kw: #c9a6ff;
  --t-typ: #62c7f0;
  --t-str: #ffad7a;
  --t-num: #8be0a4;
  --t-com: #8394b3;
  --t-pp: #e39bf0;
  --t-bi: #8fb4ff;
  --t-fn: #f0d58c;
  --t-op: #b8c4d6;
  --radius: 14px;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", Menlo, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --zh: 22px; /* Zeilenhöhe im Editor – Rinne, Code und Textfeld müssen gleich bleiben */
  --kopf-h: 60px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* Ankunft: sofort in Bewegung, weich auslaufend */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* Bewegung über die Fläche: Umdrehen der Karteikarte */
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: 17px; scrollbar-color: #3a5583 transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); line-height: 1.55; -webkit-font-smoothing: antialiased; }
::selection { background: var(--auswahl); }
a { color: var(--text); text-decoration-color: var(--matt); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
input, textarea, select { caret-color: var(--text); accent-color: var(--text); }
code, kbd, pre { font-family: var(--mono); }
p code, li code, td code, .erk code, .hint code { background: var(--flaeche); padding: 0.05em 0.3em; border-radius: 5px; font-size: 0.92em; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
[hidden] { display: none !important; }
.versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-weight: 700; line-height: 1.25; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 1.95rem; line-height: 1.2; margin: 0.2rem 0 0.9rem; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; margin: 1.6rem 0 0.7rem; }
h3 { font-size: 1.1rem; margin: 1rem 0 0.4rem; }
.ikon { width: 1.2em; height: 1.2em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* ---------- Kopfleiste (schmal) und Seitenleiste (breit) ---------- */
.kopf { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.75rem; height: var(--kopf-h); padding: 0 1rem;
  background: var(--karte); border-bottom: 1px solid var(--linie); }
.logo { display: flex; align-items: center; gap: 0.5rem; flex: none; text-decoration: none; color: var(--text); white-space: nowrap;
  font: 700 1.2rem/1 var(--sans); letter-spacing: -0.01em; }
.logo-text span { color: var(--leise); }
.logo-led { width: 22px; height: 28px; flex: none; }
.kopf nav { display: flex; gap: 0.15rem; min-width: 0; padding: 5px; margin: -5px; overflow-x: auto; scrollbar-width: none; }
.kopf nav a { display: flex; flex: none; align-items: center; gap: 0.55rem; min-height: 40px; padding: 0.4rem 0.6rem; border-radius: 999px;
  text-decoration: none; color: var(--leise); white-space: nowrap; font: 600 0.95rem/1.2 var(--sans); }
.kopf nav a .ikon { width: 22px; height: 22px; }
.kopf nav a:hover { background: var(--flaeche); color: var(--text); }
.kopf nav a[aria-current="page"] { background: var(--text); color: var(--bg); }
.kopf nav a:not([aria-current]) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kopf .rechts { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; flex: none; }
.kopf .sichern span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kopf .sichern[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.serie { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.55rem; font: 700 1rem/1 var(--sans); color: var(--text);
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.serie .ikon { width: 22px; height: 22px; color: var(--matt); }
.serie.heute .ikon { color: var(--blitz); }
.serie .serie-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 1280px) {
  :root { --kopf-h: 0px; }
  body { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
  .kopf { height: 100vh; flex-direction: column; align-items: stretch; gap: 1.2rem; padding: 1.5rem 1rem 1.2rem;
    border-bottom: 0; border-right: 1px solid var(--linie); overflow-y: auto; }
  .logo { padding: 0 0.6rem 0.5rem; font-size: 1.35rem; }
  .logo-led { width: 26px; height: 33px; }
  .kopf nav { flex-direction: column; gap: 0.2rem; overflow: visible; }
  .kopf nav a { padding: 0.55rem 0.8rem; font-size: 1rem; }
  .kopf nav a:not([aria-current]) span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .kopf .rechts { margin: auto 0 0; flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .serie { padding: 0.6rem 0.8rem; border: 1px solid var(--linie); border-radius: 12px; gap: 0.5rem; }
  .serie .serie-text { position: static; width: auto; height: auto; overflow: visible; clip: auto; font: 400 0.92rem var(--sans); color: var(--leise); }
  .kopf .sichern span { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .kopf .rechts .btn { justify-content: flex-start; }
}
@media (max-width: 1000px) {
  .kopf .ki-knopf span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 760px) {
  .kopf { position: static; flex-wrap: wrap; height: auto; padding: 0.55rem 0.75rem 0.45rem; row-gap: 0.4rem; }
  .kopf nav { order: 3; width: calc(100% + 10px); justify-content: space-between; }
  .kopf nav a { padding: 0.35rem 0.5rem; }
}
@media (max-width: 420px) {
  .kopf nav a[aria-current] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

main { padding: 1.75rem 1.5rem 4rem; min-width: 0; overflow-x: clip; }
.breit { max-width: 1180px; margin: 0 auto; }
.schmal { max-width: 860px; margin: 0 auto; }
.breit .schmal { margin-left: 0; }
@media (max-width: 560px) { main { padding: 1.25rem 1rem 3rem; } }

/* ---------- Knöpfe: Pillen. Der Hauptknopf ist porzellanweiß, alle anderen tragen einen Rand ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 44px; padding: 0.5rem 1.1rem;
  border: 1.5px solid var(--feld-rand); border-radius: 999px; background: transparent; color: var(--text);
  font: 600 0.95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s var(--ease-out), background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
.btn:hover { border-color: var(--text); background: var(--flaeche); }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn.haupt { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 700; }
.btn.haupt:hover:not(:disabled) { background: #ffffff; border-color: #ffffff; }
.btn.gruen { background: var(--gruen); border-color: var(--gruen); color: var(--karte); font-weight: 700; }
.btn.gruen:hover:not(:disabled) { background: #74dea3; border-color: #74dea3; }
.btn.klein { min-height: 36px; padding: 0.25rem 0.8rem; font-size: 0.88rem; }
.btn.gross { min-height: 52px; padding: 0.75rem 1.5rem; font-size: 1.08rem; }
.btn:disabled { background: transparent; border-color: var(--linie); color: var(--matt); cursor: not-allowed; }
select.btn { padding-right: 0.6rem; }
.btn .ikon { width: 1.15em; height: 1.15em; }
.knoepfe { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }

/* ---------- Tafeln ---------- */
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.gitter { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.kapitel-karte { display: flex; flex-direction: column; gap: 0.35rem; text-decoration: none; color: var(--text);
  transition: border-color 0.15s ease, background-color 0.15s ease; }
.kapitel-karte:hover { border-color: var(--feld-rand); background: #0d1b38; }
.kapitel-karte .nr { font-size: 0.88rem; color: var(--leise); }
.kapitel-karte .titel { font-weight: 700; font-size: 1.08rem; line-height: 1.3; }
.kapitel-karte .kurz { color: var(--leise); font-size: 0.95rem; }
.kapitel-karte .erledigt { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--gruen); font-weight: 700; font-size: 0.9rem; margin-top: auto; }

/* Hinweis-Kästen: Rahmen und Fläche in einer Farbe, Symbol links */
.hinweis { --h-farbe: var(--text); --h-ikon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5'/%3E%3Ccircle cx='12' cy='7.8' r='1.1' fill='%23000' stroke='none'/%3E%3C/svg%3E");
  position: relative; margin: 0.9rem 0; padding: 0.7rem 1rem 0.7rem 2.85rem; background: var(--akzent-hell); border: 1px solid var(--kante); border-radius: 12px; }
.hinweis::before { content: ""; position: absolute; left: 0.85rem; top: 0.8rem; width: 1.3rem; height: 1.3rem; background: var(--h-farbe);
  -webkit-mask: var(--h-ikon) center / contain no-repeat; mask: var(--h-ikon) center / contain no-repeat; }
.hinweis.merke { --h-farbe: var(--gruen); background: var(--gruen-hell); border-color: var(--gruen-rand);
  --h-ikon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 18h5M10.5 21h3M12 3a6 6 0 0 0-3.6 10.8c.7.5 1.1 1.3 1.1 2.1V16h5v-.1c0-.8.4-1.6 1.1-2.1A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.hinweis.achtung { --h-farbe: var(--gelb); background: var(--gelb-hell); border-color: var(--gelb-rand);
  --h-ikon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.8L21 19.5H3z'/%3E%3Cpath d='M12 10v4.2'/%3E%3Ccircle cx='12' cy='16.9' r='1.1' fill='%23000' stroke='none'/%3E%3C/svg%3E"); }
.hinweis.fehler { --h-farbe: var(--rot); background: var(--rot-hell); border-color: var(--rot-rand);
  --h-ikon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8.8 8.8l6.4 6.4M15.2 8.8l-6.4 6.4'/%3E%3C/svg%3E"); }
.hinweis > :first-child { margin-top: 0; }
.hinweis > :last-child { margin-bottom: 0; }
.hinweis ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }

/* ---------- LED, der Begleiter: ein weißes Signallicht ---------- */
.led { display: block; overflow: visible; }
.led-glanz { fill: var(--text); fill-opacity: 0.1; }
.led-kuppel { fill: var(--text); }
.led-rand { fill: #b9c6d8; }
.led-licht { fill: none; stroke: #c9d4e3; stroke-width: 6; stroke-linecap: round; }
.led-bein { fill: none; stroke: var(--matt); stroke-width: 6; stroke-linecap: round; }
.led-auge, .led-mund-offen { fill: var(--bg); }
.led-funkel { fill: #fff; }
.led-mund { fill: none; stroke: var(--bg); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.led-wange { fill: #ff8fab; fill-opacity: 0.5; }
.led-strahlen { fill: none; stroke: var(--text); stroke-width: 5; stroke-linecap: round; }
.led-zzz { fill: none; stroke: var(--leise); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.led-jubel .led-glanz { fill-opacity: 0.18; }
.led-schlaf .led-kuppel { fill: #4a5d82; }
.led-schlaf .led-rand { fill: #34466a; }
.led-schlaf .led-licht { stroke: #5b6f96; }
.led-schlaf .led-glanz, .led-schlaf .led-wange { fill: none; }
/* Aus: wach, aber heute noch nicht eingeschaltet – eine dunkle Kuppel ohne Schein. Der erste Lernschritt des Tages schaltet sie an. */
.led-aus .led-kuppel { fill: #5a6d93; }
.led-aus .led-rand { fill: #42557c; }
.led-aus .led-licht { stroke: #6c80a6; }
.led-aus .led-glanz { fill: none; }
.led-aus .led-wange { fill-opacity: 0.3; }
.led.anschalten .led-kuppel { animation: kuppel-an 0.6s ease-out 0.25s both; }
.led.anschalten .led-rand { animation: rand-an 0.6s ease-out 0.25s both; }
@media (prefers-reduced-motion: no-preference) {
  .led.anschalten .led-glanz { transform-box: fill-box; transform-origin: center; animation: gluehen 1s ease-out 0.4s both; }
}
@keyframes kuppel-an { from { fill: #5a6d93; } }
@keyframes rand-an { from { fill: #42557c; } }

/* ---------- Startseite: Nächster Halt, Netzplan, Stand ---------- */
.startseite { display: grid; gap: 1.5rem; }
.start-rail { display: contents; }
.halt { order: 1; }
.start-netz { order: 2; }
.start-rail > * { order: 3; }
@media (min-width: 900px) {
  .startseite { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto 1fr; align-items: start; column-gap: 2.25rem; row-gap: 1.75rem; }
  .halt { grid-column: 1; grid-row: 1; }
  .start-netz { grid-column: 1; grid-row: 2; }
  .start-rail { display: flex; flex-direction: column; gap: 1.75rem; grid-column: 2; grid-row: 1 / span 2; }
}
.halt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.9rem 1.25rem; padding: 1.1rem 1.35rem;
  background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); }
.halt .led { width: 60px; height: 75px; }
.halt h2 { margin: 0; font-size: 1.6rem; line-height: 1.2; }
.halt h2 .linie-nr { width: 36px; height: 36px; margin-right: 0.55rem; font-size: 1rem; vertical-align: 0.05em; }
.halt-vor { font-weight: 400; color: var(--leise); }
.halt p { margin: 0.45rem 0 0; color: var(--leise); max-width: 40em; }
.halt p b { color: var(--text); font-weight: 600; }
@media (max-width: 640px) {
  .halt { grid-template-columns: auto minmax(0, 1fr); padding: 1rem; }
  .halt .led { width: 48px; height: 60px; }
  .halt h2 { font-size: 1.3rem; }
  .halt > .btn { grid-column: 1 / -1; }
}
.start-rail h2 { margin: 0 0 0.6rem; font-size: 1.1rem; }
.stand-liste { margin: 0; }
.stand-liste > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--linie); }
.stand-liste dt { color: var(--leise); }
.stand-liste dd { margin: 0; font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stand-liste dd small { font-size: 0.9rem; font-weight: 400; color: var(--leise); }
.karten-tafel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1rem; }
.start-rail .karten-tafel h2 { margin: 0 0 0.2rem; }
.karten-tafel p { margin: 0; color: var(--leise); }
.ueben-liste { list-style: none; margin: 0; padding: 0; }
.ueben-liste a { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.65rem 0; border-bottom: 1px solid var(--linie); color: var(--text); text-decoration: none; }
.ueben-liste li:first-child a { padding-top: 0.15rem; }
.ueben-liste .ikon { width: 22px; height: 22px; margin-top: 0.1rem; color: var(--leise); }
.ueben-liste b { display: block; font-weight: 600; line-height: 1.3; }
.ueben-liste small { display: block; color: var(--leise); font-size: 0.87rem; line-height: 1.4; }
@media (hover: hover) and (pointer: fine) { .ueben-liste a:hover b { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; } }
.tipps-liste { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.45rem; font-size: 0.93rem; color: var(--leise); }
.tipps-liste b { color: var(--text); font-weight: 600; }

/* Linienpunkt: die Kapitelnummer im Kreis der Linienfarbe, mit Porzellan-Einfassung */
.linie-nr { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  border: 3px solid var(--text); background: var(--k); color: var(--k-text); font-weight: 700; font-size: 1.05rem; line-height: 1; font-variant-numeric: tabular-nums; }
/* Kapitelfarben: --k kommt aus dem Farbcode. Noch nicht befahrene Strecke behält ihre echte Farbe als dünnen Kern in gedämpfter
   Einfassung, denn gemischt mit dem Grund würden Orange, Gelb, Gold, Grau und Weiß verwechselbar. */
.linie-abschnitt, .kapitel-farben { --k: var(--text); --k-text: var(--bg);
  --mantel-zu: color-mix(in oklab, var(--text) 32%, var(--bg));
  --k-hell-kante: color-mix(in oklab, var(--k) 45%, var(--karte)); }

/* Netzplan: alle Kapitel als eine Linie, die in Zeilen hin und her läuft. Befahrene Strecke breit mit Porzellan-Einfassung,
   der Rest als dünner Kern in gedämpfter Einfassung. */
.start-netz { container: netz / inline-size; min-width: 0; }
.netzplan { display: block; overflow: visible; }
.netzplan text { font-family: var(--sans); }
.np-mantel, .np-strich { fill: none; stroke-linejoin: round; }
.np-mantel { stroke: var(--text); stroke-width: 15; }
.np-mantel.zu { stroke: color-mix(in oklab, var(--text) 32%, var(--bg)); }
.np-strich { stroke: var(--k); stroke-width: 10; }
.np-strich.zu { stroke-width: 6; }
.np-anfang { stroke-linecap: round; }
.np-punkt { fill: var(--text); }
.np-station.offen .np-punkt { fill: color-mix(in oklab, var(--text) 50%, var(--bg)); }
.np-umstieg { fill: var(--text); stroke: var(--bg); stroke-width: 3; }
.np-ring { fill: var(--bg); stroke: var(--text); stroke-width: 5; }
.np-hof { fill: none; stroke: var(--text); stroke-width: 2; stroke-dasharray: 3 5; }
.np-ende-zeichen { fill: var(--bg); stroke: var(--text); stroke-width: 4; }
.np-fokus { fill: transparent; stroke: none; }
.netzplan a { outline: none; }
.netzplan a:focus-visible .np-fokus { stroke: var(--text); stroke-width: 2.5; }
@media (hover: hover) and (pointer: fine) {
  .netzplan a:hover .np-fokus { stroke: var(--leise); stroke-width: 1.5; }
  .netzplan a:hover text { text-decoration: underline; }
}
.np-name { fill: var(--leise); font-size: 13px; }
.np-nr { fill: var(--text); font-weight: 700; }
.np-hier { fill: var(--text); font-size: 15px; font-weight: 700; }
.np-hier-titel, .np-ende-name { fill: var(--leise); font-size: 13px; }
.netz-liste { display: grid; gap: 1.6rem; }
@container netz (width >= 560px) { .netz-liste { display: none; } }
/* Schmal: Stand und Übersicht rücken unter den Namen, damit der Name ganze Zeilen bekommt */
@container netz (width < 560px) {
  .netzplan-host { display: none; }
  .netz-liste .linie-kopf { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.35rem 0.9rem; }
  .netz-liste .linie-nr { grid-row: 1 / span 2; align-self: start; }
  .netz-liste .linie-kopf-text { grid-column: 2 / -1; }
  .netz-liste .linie-stand { grid-column: 2; padding-top: 0; }
  .netz-liste .linie-kopf .btn { grid-column: 3; margin-top: 0; }
}
.farbcode { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; align-items: center; margin: 1.1rem 0 0; font-size: 0.85rem; color: var(--leise); }
.farbcode .farbe { font-weight: inherit; white-space: nowrap; }
.farbcode i { display: inline-block; width: 1.5em; height: 0.6em; margin-right: 0.35rem; border-radius: 99px; background: var(--k); border: 1.5px solid var(--text); }

/* Linienverlauf: eine Linie senkrecht, jede Lektion eine Station mit Namen (schmale Startseite, Kapitelseite) */
.linie-abschnitt { --achse: 20px; }
.linie-kopf { position: relative; display: flex; align-items: flex-start; gap: 0.9rem; }
.linie-kopf::before { content: ""; box-sizing: border-box; position: absolute; left: calc(var(--achse) - 7px); top: 20px; bottom: 0; width: 14px;
  background: var(--k); border-inline: 4px solid var(--mantel-zu); }
.linie-kopf:not(:has(+ .linie))::before { display: none; }
.linie-kopf:has(+ .linie > li:is(.fertig, .aktuell):first-child)::before { border-inline: 2px solid var(--text); }
.linie-kopf-text { flex: 1; min-width: 0; padding-top: 0.35rem; }
.linie-kopf h1, .linie-kopf h2, .linie-kopf h3 { margin: 0; font-size: 1.15rem; }
.linie-kopf h1 { font-size: 1.6rem; }
.linie-kopf p { margin: 0.1rem 0 0; color: var(--leise); font-size: 0.93rem; }
.linie-kopf p.linie-stand-satz { margin-top: 0.3rem; color: var(--text); font-variant-numeric: tabular-nums; }
.linie-stand { padding-top: 0.45rem; color: var(--leise); font-variant-numeric: tabular-nums; white-space: nowrap; }
.linie-kopf .btn { margin-top: 0.2rem; }
.linie { list-style: none; margin: 0; padding: 0; }
.linie > li { position: relative; }
/* Jede Station trägt die halbe Strecke davor (::before) und dahinter (::after). Eine Strecke leuchtet, wenn ihr Ziel geschafft ist
   oder man dort steht, wie im Netzplan und im Lektionskopf. */
.linie > li::before, .linie > li::after { content: ""; box-sizing: border-box; position: absolute; left: calc(var(--achse) - 7px); width: 14px;
  background: var(--k); border-inline: 4px solid var(--mantel-zu); }
.linie > li::before { top: 0; bottom: 50%; }
.linie > li::after { top: 50%; bottom: 0; }
.linie > li:is(.fertig, .aktuell)::before, .linie > li:has(+ li:is(.fertig, .aktuell))::after { border-inline: 2px solid var(--text); }
.linie > li:first-child::before, .linie > li:last-child::after { display: none; }
.linie-kopf + .linie > li:first-child::before { display: block; }
.station { position: relative; z-index: 1; display: flex; align-items: center; min-height: 60px; padding: 0.55rem 0 0.55rem calc(var(--achse) * 2 + 0.9rem);
  color: var(--text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.halt-punkt { position: absolute; left: calc(var(--achse) - 9px); top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--mantel-zu); }
.linie .fertig .halt-punkt { background: var(--text); border-color: var(--bg); }
.linie .aktuell .halt-punkt { left: calc(var(--achse) - 14px); width: 28px; height: 28px; margin-top: -14px; border: 5px solid var(--text); }
.linie .aktuell .halt-punkt::after { content: ""; position: absolute; inset: -11px; border: 2px dashed var(--text); border-radius: 50%; }
.station-text { min-width: 0; display: flex; flex-direction: column; }
.station-text b { font-weight: 600; line-height: 1.3; }
.linie .aktuell .station-text b { font-weight: 700; }
.station-text span { font-size: 0.88rem; color: var(--leise); }
@media (hover: hover) and (pointer: fine) { .station:hover .station-text b { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; } }
.station:focus-visible { outline: none; }
.station:focus-visible .halt-punkt { outline: 3px solid var(--text); outline-offset: 4px; }
.kapitel-einleitung { margin: 1rem 0 0.4rem; }
/* Die einzige ruhende Bewegung: der Ring „Du bist hier“ atmet langsam */
@media (prefers-reduced-motion: no-preference) {
  .linie .aktuell .halt-punkt::after { animation: atmen 3.6s ease-in-out infinite; }
  .np-hof { transform-box: fill-box; transform-origin: center; animation: atmen 3.6s ease-in-out infinite; }
}
@keyframes atmen { 0%, 100% { transform: scale(0.88); opacity: 0.45; } 50% { transform: scale(1.06); opacity: 1; } }

/* ---------- Lektion: die Schritte laufen als Stationen auf der Linie des Kapitels ---------- */
.lektion-kopf { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.fortschritt { --f: 0; position: relative; flex: 1; display: flex; justify-content: space-between; align-items: center; min-width: 0; height: 28px; }
.fortschritt::before, .fortschritt::after { content: ""; box-sizing: border-box; position: absolute; left: 10px; top: 50%; height: 12px; margin-top: -6px; border-block: 2px solid; }
.fortschritt::before { right: 10px; background: var(--k); border-color: var(--mantel-zu); border-block-width: 3px; }
.fortschritt::after { width: calc((100% - 20px) * var(--f)); background: var(--k); border-color: var(--text); }
.fortschritt > i { position: relative; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; flex: none; }
.fortschritt > i::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2.5px solid var(--mantel-zu); }
.fortschritt > i.fertig::before { background: var(--text); border-color: var(--bg); }
.fortschritt > i.hier::before { width: 20px; height: 20px; border: 4px solid var(--text); }
.lektion-kopf .klein-text { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.kap-punkt { display: inline-block; width: 0.95em; height: 0.95em; flex: none; border-radius: 50%; background: var(--k); border: 2px solid var(--text); }
@media (max-width: 560px) {
  .lektion-kopf { flex-wrap: wrap; row-gap: 0.6rem; }
  .lektion-kopf .fortschritt { order: 3; flex-basis: 100%; }
  .lektion-kopf .klein-text { margin-left: auto; }
}
.schritt { min-height: 220px; }
@media (prefers-reduced-motion: no-preference) {
  .schritt.rein-vor { animation: schritt-vor 0.28s var(--ease-out); }
  .schritt.rein-zurueck { animation: schritt-zurueck 0.28s var(--ease-out); }
}
@keyframes schritt-vor { from { opacity: 0; transform: translateX(22px); } }
@keyframes schritt-zurueck { from { opacity: 0; transform: translateX(-22px); } }
.schritt-text p { margin: 0.6rem 0; }
.schritt-text p:not(.hinweis), .schritt-text li { max-width: 34em; }
.lektion-fuss { position: sticky; bottom: 0.75rem; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.6rem;
  padding: 0.7rem 0.9rem; background: var(--karte); border: 1px solid var(--kante); border-radius: var(--radius); }
.lektion-fuss .weiter { margin-left: auto; }
/* Am Handy passen drei Knöpfe nur nebeneinander, wenn „Zurück“ nur seinen Pfeil zeigt; der Name bleibt für Screenreader */
@media (max-width: 480px) {
  .lektion-fuss { gap: 0.5rem; padding: 0.55rem; }
  .lektion-fuss .zurueck { padding-inline: 0.75rem; }
  .lektion-fuss .zurueck .knopf-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.antworten { display: grid; gap: 0.65rem; margin: 0.9rem 0; }
.antwort { position: relative; text-align: left; padding: 0.75rem 1rem; border: 1px solid var(--kante); border-radius: 12px; background: var(--karte); color: var(--text);
  cursor: pointer; transition: transform 0.12s var(--ease-out), border-color 0.15s ease, background-color 0.15s ease; }
.antwort:hover:not(:disabled) { border-color: var(--text); background: var(--akzent-hell); }
.antwort:active:not(:disabled) { transform: scale(0.99); }
.antwort:disabled { cursor: default; color: var(--text); opacity: 1; }
.antwort.richtig { border-color: var(--gruen); background: var(--gruen-hell); }
.antwort.falsch { border-color: var(--rot); background: var(--rot-hell); }
.antwort code { background: transparent; }
.antwort.richtig, .antwort.falsch { padding-right: 3rem; }
.antwort-marke { position: absolute; right: 0.8rem; top: 50%; display: grid; place-items: center; width: 1.65rem; height: 1.65rem; margin-top: -0.825rem;
  border-radius: 50%; color: var(--karte); }
.richtig .antwort-marke { background: var(--gruen); }
.falsch .antwort-marke { background: var(--rot); }
.antwort-marke .ikon { width: 1rem; height: 1rem; stroke-width: 3.2; }
/* Rückmeldung: Zeichen springt an, falsche Wahl schüttelt kurz, Erklärung taucht auf, Prüfliste baut sich Punkt für Punkt auf */
@media (prefers-reduced-motion: no-preference) {
  .antwort-marke { animation: marke-rein 0.26s var(--ease-out) both; }
  .antwort.falsch.gewaehlt { animation: wackeln 0.36s var(--ease-out); }
  .rueck > *, .tipps > .hinweis:last-of-type { animation: auftauchen 0.24s var(--ease-out) both; }
  .pruefliste li { animation: auftauchen 0.26s var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 8) * 45ms); }
  .btn.bereit { animation: bereit 0.42s var(--ease-out); }
}
@keyframes marke-rein { from { opacity: 0; transform: scale(0.5); } }
@keyframes wackeln { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes auftauchen { from { opacity: 0; transform: translateY(8px); } }
@keyframes einblenden { from { opacity: 0; } }
@keyframes bereit { 0% { transform: scale(0.96); } 45% { transform: scale(1.05); } 100% { transform: none; } }
.code-kasten { padding: 0.5rem 0.8rem; overflow: auto; background: var(--code-bg); border: 1px solid var(--linie); border-radius: 10px; }

/* Lektion geschafft: die LED leuchtet auf */
.feier { text-align: center; }
.naechster-halt .linie-nr { width: 26px; height: 26px; margin-right: 0.4rem; border-width: 2px; font-size: 0.78rem; vertical-align: middle; }
.feier-buehne { position: relative; height: 220px; margin: 0.5rem auto 0.5rem; max-width: 520px; }
.feier .led { width: 150px; height: 188px; margin: 1rem auto 0; }
.feier h1 { font-size: 2.2rem; margin: 0.4rem 0 0.3rem; }
.feier > p { margin: 0 auto 1.4rem; max-width: 34rem; color: var(--leise); }
.feier .stand-liste { max-width: 440px; margin: 0 auto 1.6rem; text-align: left; }
.feier .knoepfe { justify-content: center; }
.konfetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.konfetti i { position: absolute; top: 30%; left: var(--l); width: 10px; height: 14px; border-radius: 3px; background: var(--f); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .feier .led { animation: aufleuchten 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .feier .led-glanz { transform-box: fill-box; transform-origin: center; animation: gluehen 1.1s ease-out 0.15s both; }
  .konfetti i { animation: fallen var(--d) cubic-bezier(0.2, 0.6, 0.4, 1) var(--w) both; }
  .feier .stand-liste, .feier .knoepfe { animation: auftauchen 0.32s var(--ease-out) 0.5s both; }
}
@keyframes aufleuchten { 0% { transform: scale(0.6) translateY(20px); } 100% { transform: none; } }
@keyframes gluehen { 0% { transform: scale(0.3); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fallen { 0% { opacity: 1; transform: translate(0, -60px) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), 190px) rotate(var(--r)); } }

/* ---------- Arbeitsbereich: Editor | Erklärung ---------- */
.werkbank { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1rem; align-items: start; }
.werkbank.ohne-panel { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 980px) { .werkbank { grid-template-columns: minmax(0, 1fr); } .panel { position: static; max-height: none; } }
.links { display: flex; flex-direction: column; gap: 0.65rem; min-width: 0; }
.werkzeuge { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.werkzeuge .status { margin-left: auto; font-size: 0.92rem; color: var(--leise); display: inline-flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; }
.werkzeuge .status span { display: inline-flex; gap: 0.25rem; align-items: center; }

/* Editor: Textfeld liegt genau über dem eingefärbten Code */
.editor { position: relative; border: 1px solid var(--kante); border-radius: 12px; background: var(--code-bg); overflow: auto;
  max-height: 70vh; min-height: 120px; }
.editor-innen { position: relative; display: flex; min-width: 100%; width: max-content; }
.rinne { position: sticky; left: 0; z-index: 2; flex: none; padding: 10px 0; background: var(--karte); border-right: 1px solid var(--linie);
  color: var(--matt); font: 15px/var(--zh) var(--mono); text-align: right; user-select: none; min-width: 3.2em; }
.rinne div { padding: 0 0.6em 0 0.4em; height: var(--zh); position: relative; }
.rinne div.err { color: var(--rot); font-weight: 700; }
.rinne div.err::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--rot); }
.rinne div.warn::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--gelb); }
.rinne div.lauf { background: var(--gelb); color: var(--karte); }
.flaeche { position: relative; flex: 1; }
.flaeche pre, .flaeche textarea { margin: 0; padding: 10px 14px; border: 0; font: 15px/var(--zh) var(--mono); letter-spacing: 0; tab-size: 4;
  white-space: pre; overflow: hidden; }
.flaeche pre { position: relative; pointer-events: none; color: var(--text); min-width: 100%; }
.flaeche textarea { position: absolute; inset: 0; width: 100%; height: 100%; resize: none; background: transparent; color: transparent;
  caret-color: var(--text); outline: none; }
.flaeche textarea::selection { background: var(--auswahl); color: transparent; }
.editor.nur-lesen textarea { caret-color: transparent; cursor: pointer; }
.editor:focus-within { border-color: var(--text); }
.zl { min-height: var(--zh); }
.zl.akt { background: rgba(243, 246, 248, 0.06); }
.zl.lauf { background: rgba(242, 184, 75, 0.16); }
.zl.errz { background: rgba(255, 123, 114, 0.13); }

/* Farben im Code */
.t-kw { color: var(--t-kw); font-weight: 600; }
.t-typ { color: var(--t-typ); font-weight: 600; }
.t-str, .t-chr { color: var(--t-str); }
.t-num { color: var(--t-num); }
.t-com { color: var(--t-com); font-style: italic; }
.t-pp, .t-hdr { color: var(--t-pp); }
.t-var { color: var(--text); }
.t-bi { color: var(--t-bi); font-weight: 600; }
.t-fn { color: var(--t-fn); }
.t-io { color: var(--t-bi); font-weight: 700; }
.t-op { color: var(--t-op); }
.t-unk { color: var(--rot); }
.m-err { text-decoration: underline wavy var(--rot); text-decoration-skip-ink: none; text-underline-offset: 3px; }
.m-warn { text-decoration: underline wavy var(--gelb); text-decoration-skip-ink: none; text-underline-offset: 3px; }
.m-sel { background: var(--akzent-mittel); border-radius: 3px; outline: 1px solid var(--akzent-rand); }
.m-pfeil { position: relative; }
.m-pfeil::after { content: ""; position: absolute; left: calc(100% + 3px); top: 0.2em; width: 1em; height: 1em; background: var(--rot);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%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 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat; }

/* Meldungen unter dem Editor */
.meldungen { display: flex; flex-direction: column; gap: 0.4rem; }
.meldung { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 0.6rem; padding: 0.55rem 0.8rem; border: 1px solid; border-radius: 12px; text-align: left; cursor: pointer; background: var(--karte); }
.meldung .z { font-weight: 700; white-space: nowrap; }
.meldung .tipp { grid-column: 2; color: var(--leise); white-space: pre-wrap; font-family: var(--sans); font-size: 0.95rem; }
.meldung.fehler { border-color: var(--rot-rand); background: var(--rot-hell); }
.meldung.fehler .z { color: var(--rot); }
.meldung.warnung { border-color: var(--gelb-rand); background: var(--gelb-hell); }
.meldung.warnung .z { color: var(--gelb); }
.meldung.tipp-m { border-color: var(--kante); background: var(--akzent-hell); }
.meldung.tipp-m .z { color: var(--text); }
.alles-ok { color: var(--gruen); font-weight: 700; }

/* Konsole */
.konsole { background: var(--konsole); color: var(--konsole-text); border: 1px solid var(--linie); border-radius: 12px; font: 15px/1.45 var(--mono); padding: 0.75rem 0.95rem;
  min-height: 110px; max-height: 45vh; overflow: auto; white-space: pre-wrap; word-break: break-word; scrollbar-color: #2c3f63 transparent; }
.konsole ::selection { background: rgba(255, 255, 255, 0.25); }
.konsole .kopfzeile { color: var(--matt); font-family: var(--sans); font-size: 0.85rem; margin-bottom: 0.3rem; display: flex; gap: 0.6rem; align-items: center; }
.konsole .ein { color: #7ee787; }
.konsole .info { color: var(--matt); font-style: italic; }
.konsole .fehlerlauf { color: #ff8a80; }
.konsole input.eingabe { background: transparent; border: 0; border-bottom: 2px dashed #7ee787; color: #7ee787; font: inherit; outline: none; min-width: 8ch; width: 20ch; padding: 0; caret-color: #7ee787; }
.konsole .taste { color: #ffd479; }
.konsole button { font: 600 0.8rem var(--sans); padding: 0.15rem 0.65rem; border-radius: 999px; border: 1px solid var(--kante); background: var(--bg); color: var(--konsole-text); cursor: pointer; }
.konsole button:hover { background: var(--flaeche); }
/* Schrittmodus: Leiste, Hinweis und Variablentabelle unter dem Editor. Gelb gehört zur Laufzeile im Editor. */
.schritt-platz { display: grid; gap: 0.55rem; padding: 0.75rem 0.9rem; background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; }
.schritt-leiste { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.schritt-info { margin: 0; font-size: 0.95rem; }
.variablen { margin: 0; width: 100%; max-width: 34rem; font-variant-numeric: tabular-nums; }
.variablen caption { caption-side: top; text-align: left; font-size: 0.85rem; color: var(--leise); padding: 0 0 0.3rem; }
.variablen td:nth-child(2) { color: var(--leise); font-size: 0.9rem; }
.variablen tr.gruppe th { background: var(--karte); color: var(--leise); font-size: 0.85rem; font-weight: 600; }
.variablen tr.neu td { background: var(--gelb-hell); }
.variablen tr.neu td.wert code { color: var(--gelb); font-weight: 700; }
.variablen .leer { color: var(--matt); }
.notizen { display: flex; flex-direction: column; gap: 0.35rem; }
.notiz { background: var(--gelb-hell); border: 1px solid var(--gelb-rand); border-radius: 12px; padding: 0.45rem 0.75rem; font-size: 0.95rem; cursor: pointer; text-align: left; }

/* Erklär-Panel */
.panel { position: sticky; top: calc(var(--kopf-h) + 1rem); display: flex; flex-direction: column; gap: 0.6rem; max-height: calc(100vh - var(--kopf-h) - 2rem); overflow: auto; }
.erk { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 0.9rem 1.05rem; }
.erk h3 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.erk .kurz { font-weight: 600; margin: 0.2rem 0 0.4rem; }
.erk .abschnitt { margin-top: 0.75rem; padding-top: 0.65rem; border-top: 1px solid var(--linie); }
.erk .abschnitt > b { display: block; font-weight: 700; font-size: 0.92rem; line-height: 1.3; color: var(--text); margin-bottom: 0.25rem; }
.erk p { margin: 0.25rem 0; }
.erk pre { background: var(--code-bg); border: 1px solid var(--linie); border-radius: 10px; padding: 0.5rem 0.7rem; overflow: auto; font-size: 0.9rem; margin: 0.3rem 0; }
.listing { padding: 0.5rem 0.8rem; overflow: auto; font-size: 0.9rem; line-height: 1.45; }
.listing .nr { display: inline-block; width: 2.6em; color: var(--matt); user-select: none; }
.erk pre.aus { background: var(--konsole); color: var(--konsole-text); border-color: var(--linie); }
.erk details summary { cursor: pointer; color: var(--text); margin-top: 0.4rem; font-weight: 600; }
.erk ul { margin: 0.3rem 0; padding-left: 1.2rem; }
.erk .leer { color: var(--leise); }
.eva { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.05rem 0.5rem; border-radius: 999px; color: #fff; margin-right: 0.3rem; vertical-align: 0.1em; }
.eva.E { background: var(--eva-e); }
.eva.V { background: var(--eva-v); }
.eva.A { background: var(--eva-a); }
.eva.X { background: #56688c; }
.stat { display: flex; gap: 0.5rem; align-items: flex-start; margin: 0.2rem 0; }
.stat .sym { display: inline-flex; padding-top: 0.15rem; color: var(--text); }
.stat .sym .ikon { width: 1.15em; height: 1.15em; stroke-width: 2.6; }
.stat.ok .sym { color: var(--gruen); }
.stat.fehler .sym { color: var(--rot); }
.stat.warnung .sym { color: var(--gelb); }

/* Aufgaben */
.aufgabe-text { margin-bottom: 0.6rem; }
.pruefliste { list-style: none; padding: 0; margin: 0.5rem 0; display: grid; gap: 0.35rem; }
.pruefliste li { display: flex; gap: 0.5rem; align-items: baseline; }
.pruefliste li .sym { width: 1.25em; flex: none; display: inline-flex; align-self: flex-start; padding-top: 0.15rem; }
.pruefliste li .sym .ikon { stroke-width: 2.8; }
.pruefliste li.ok .sym { color: var(--gruen); }
.pruefliste li.nein .sym { color: var(--rot); }
.pruefliste li .det { color: var(--leise); font-size: 0.92rem; white-space: pre-wrap; }
.geschafft { display: flex; gap: 0.5rem; align-items: center; background: var(--gruen-hell); border: 1px solid var(--gruen-rand); border-radius: 12px;
  padding: 0.8rem 1rem; font-weight: 700; font-size: 1.02rem; line-height: 1.35; color: var(--gruen); }
.geschafft .ikon { stroke-width: 3; width: 1.4em; height: 1.4em; }

/* Puzzle und Lücken */
.puzzle { display: grid; gap: 0.45rem; margin: 0.6rem 0; }
.puzzle .zeile { display: flex; align-items: center; gap: 0.5rem; background: var(--karte); border: 1px solid var(--kante); border-radius: 12px; padding: 0.3rem 0.5rem 0.3rem 0.75rem; font-family: var(--mono); white-space: pre; }
.puzzle .zeile .pos { display: flex; gap: 0.3rem; margin-left: auto; font-family: var(--sans); }
.puzzle .ablage { border: 1.5px dashed var(--feld-rand); border-radius: 14px; padding: 0.55rem; min-height: 64px; display: grid; gap: 0.45rem; background: var(--feld); }
.luecken pre { background: var(--code-bg); border: 1px solid var(--linie); border-radius: 12px; padding: 0.75rem 0.95rem; line-height: 2.1; white-space: pre-wrap; }
.luecken input { font-family: var(--mono); font-size: 0.95rem; width: 6ch; padding: 0.05rem 0.35rem; border: 1.5px solid var(--feld-rand); border-radius: 7px; background: var(--karte); }
.luecken input:focus { border-color: var(--text); outline: none; }
.luecken input.ok { border-color: var(--gruen); background: var(--gruen-hell); }
.luecken input.nein { border-color: var(--rot); background: var(--rot-hell); }
/* Schreibtischtest: Tabelle zum Ausfüllen, Felder wie bei den Lücken */
.st-rahmen { overflow-x: auto; }
.schreibtisch { font-variant-numeric: tabular-nums; }
.schreibtisch th[scope="row"] { color: var(--leise); text-align: center; }
.schreibtisch td { padding: 0.35rem 0.45rem; }
.schreibtisch input, .schreibtisch select { min-height: 36px; padding: 0.15rem 0.45rem; border: 1.5px solid var(--feld-rand); border-radius: 7px; background: var(--feld); color: var(--text); }
.schreibtisch input { width: 8ch; font: 0.95rem var(--mono); }
.schreibtisch input:focus, .schreibtisch select:focus { border-color: var(--text); outline: none; }
.schreibtisch .ok { border-color: var(--gruen); background: var(--gruen-hell); }
.schreibtisch .nein { border-color: var(--rot); background: var(--rot-hell); }

/* Suchfelder, Spickzettel */
.spick-suche, .fm-suche { width: 100%; max-width: 420px; min-height: 44px; padding: 0.55rem 0.9rem; border: 1.5px solid var(--feld-rand); border-radius: 12px; background: var(--feld); }
.spick-suche:focus, .fm-suche:focus, .fm-text:focus { border-color: var(--text); outline: none; }
.spick-suche::placeholder, .fm-suche::placeholder, .fm-text::placeholder, textarea::placeholder { color: var(--matt); }
.spick-gruppe { margin-top: 1.4rem; }
.spick { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.spick .erk { break-inside: avoid; }

/* Struktogramm: bleibt ein weißer Aushang in Schwarz-Weiß wie in der Klausur */
.nsd { font-family: var(--sans); font-size: 0.92rem; color: #111; border: 2px solid #222; background: #fff; display: inline-block; min-width: 320px; max-width: 100%; }
.nsd .blk { border-top: 1px solid #222; padding: 0.35rem 0.6rem; }
.nsd .seq > :first-child { border-top: 0; }
.nsd .seq { display: flex; flex-direction: column; }
.nsd code { background: none; padding: 0; }
.nsd .ver { border-top: 1px solid #222; }
.nsd .ver-kopf { position: relative; padding: 0.3rem 0.6rem 1.5rem; text-align: center; }
.nsd .ver-kopf svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nsd .ver-kopf .bed { position: relative; display: inline-block; max-width: 70%; background: #fff; padding: 0 0.2rem; }
.nsd .ver-kopf .ja, .nsd .ver-kopf .nein { position: absolute; bottom: 0.1rem; font-size: 0.78rem; font-weight: 600; }
.nsd .ver-kopf .ja { left: 0.5rem; }
.nsd .ver-kopf .nein { right: 0.5rem; }
.nsd .fall-wert { text-align: center; font-weight: 600; background: #f5f4ef; }
.nsd .dekl { color: #555; }
.nsd .aufruf { border-left: 4px double #222; border-right: 4px double #222; }
.nsd [data-line] { cursor: pointer; }
.nsd .blk[data-line]:hover, .nsd .kopf-s:hover, .nsd .ver-kopf:hover .bed { background: #e4eaf5; }
.nsd-still .nsd [data-line] { cursor: default; }
.nsd-still .nsd .blk[data-line]:hover, .nsd-still .nsd .kopf-s:hover { background: transparent; }
.nsd-still .nsd .ver-kopf:hover .bed { background: #fff; }
.nsd-vorgabe { margin: 0.8rem 0; overflow-x: auto; }
.nsd-fig { margin: 0 0 1rem; }
.nsd-fig figcaption { font-weight: 700; margin-bottom: 0.3rem; }
.nsd .ver .zweige { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #222; }
.nsd .ver .zweige > div + div { border-left: 1px solid #222; }
.nsd .schleife { border-top: 1px solid #222; }
.nsd .schleife .kopf-s { padding: 0.35rem 0.6rem; }
.nsd .schleife .rumpf { margin-left: 1.6rem; border-left: 1px solid #222; border-top: 1px solid #222; }
.nsd .fuss .rumpf { border-top: 0; border-bottom: 1px solid #222; }
.nsd .leer { color: #666; }
.nsd .fall .zweige { grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-columns: none; }
.eva-tag { font-size: 0.72rem; font-weight: 700; color: #fff; padding: 0 0.35rem; border-radius: 999px; margin-right: 0.35rem; }
.eva-tag.E { background: var(--eva-e); }
.eva-tag.V { background: var(--eva-v); }
.eva-tag.A { background: var(--eva-a); }

/* Zeilen erklären, Bildschirmfotos, Selbstkontrolle */
.ez { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.3rem 0.8rem; padding: 0.45rem 0; border-bottom: 1px solid var(--linie); align-items: start; }
.ez-code { display: flex; gap: 0.5rem; font-family: var(--mono); font-size: 0.9rem; }
.ez-code pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ez-nr { color: var(--matt); min-width: 2.2em; text-align: right; flex: none; }
.ez textarea { width: 100%; min-height: 2.4em; font: inherit; padding: 0.35rem 0.55rem; border: 1.5px solid var(--feld-rand); border-radius: 10px; resize: vertical; background: var(--feld); }
.ez textarea:focus { border-color: var(--text); outline: none; }
.ez-muster { grid-column: 1 / -1; background: var(--gruen-hell); border: 1px solid var(--gruen-rand); border-radius: 10px; padding: 0.4rem 0.65rem; font-size: 0.93rem; }
/* Fachbegriffe einer Antwort: grün gefunden, ocker nicht gefunden (ein Hinweis, kein Fehler: vielleicht steht ein anderes Wort da) */
.ez-begriffe { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.15rem 1.1rem; font-size: 0.9rem; font-weight: 700; }
.ezb-ja { display: inline-flex; align-items: flex-start; gap: 0.3rem; color: var(--gruen); }
.ezb-ja .ikon { margin-top: 0.1em; }
.ezb-nein { color: var(--gelb); }
.ezb-leer { color: var(--leise); font-weight: 400; }
.klausur > .ez-begriffe { margin: 0.2rem 0 0.5rem; }
.rueck > .ez-begriffe, .rueck > .ez-muster { margin-top: 0.6rem; }
.fu-compiler { margin-top: 1rem; }
@media (max-width: 760px) { .ez { grid-template-columns: 1fr; } }
.bildschirm { background: var(--konsole); color: var(--konsole-text); font-family: var(--mono); font-size: 0.9rem; padding: 0.65rem 0.85rem; border: 1px solid var(--linie); border-radius: 12px; overflow-x: auto; line-height: 1.45; }
.bildschirm b { color: #ffd479; }
.tabelle { border-collapse: separate; border-spacing: 0; margin: 0.6rem 0; background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; overflow: hidden; }
.tabelle td, .tabelle th { border-bottom: 1px solid var(--linie); border-right: 1px solid var(--linie); padding: 0.4rem 0.65rem; text-align: left; vertical-align: top; }
.tabelle tr > :last-child { border-right: 0; }
.tabelle tr:last-child > * { border-bottom: 0; }
.tabelle th { background: var(--flaeche); }
.selbst { list-style: none; padding-left: 0; }
.selbst li { margin: 0.35rem 0; }
.selbst input { width: 1.1rem; height: 1.1rem; vertical-align: -0.15em; }

/* KI-Tutor */
.tutor { position: fixed; right: 1rem; bottom: 1rem; width: min(440px, calc(100vw - 2rem)); height: min(620px, calc(100vh - 6rem)); z-index: 40;
  background: var(--karte); border: 1px solid var(--feld-rand); border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; }
.tutor[hidden] { display: none; }
.tutor header { display: flex; align-items: center; gap: 0.4rem; padding: 0.65rem 0.8rem 0.5rem; border-bottom: 1px solid var(--linie); }
.tutor header b { flex: 1; font-weight: 700; font-size: 1.1rem; }
.tutor .verlauf { flex: 1; overflow: auto; padding: 0.85rem; display: flex; flex-direction: column; gap: 0.6rem; }
.tutor .msg { padding: 0.55rem 0.85rem; border-radius: 16px; max-width: 92%; white-space: pre-wrap; overflow-wrap: anywhere; }
.tutor .msg.ich { align-self: flex-end; background: var(--text); color: var(--bg); border-bottom-right-radius: 6px; }
.tutor .msg.ki { align-self: flex-start; background: var(--flaeche); border-bottom-left-radius: 6px; }
.tutor .msg.sys { align-self: center; color: var(--leise); font-size: 0.92rem; background: none; text-align: center; }
.tutor form { display: flex; gap: 0.45rem; padding: 0.65rem; border-top: 1px solid var(--linie); align-items: flex-end; }
.tutor textarea { flex: 1; resize: none; height: 3.3em; padding: 0.45rem 0.65rem; border: 1.5px solid var(--feld-rand); border-radius: 12px; background: var(--feld); }
.tutor textarea:focus { border-color: var(--text); outline: none; }
.tutor .schnell { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.45rem 0.65rem 0; }
.tutor .msg pre { white-space: pre; overflow: auto; background: var(--code-bg); border: 1px solid var(--linie); border-radius: 10px; padding: 0.4rem 0.6rem; margin: 0.3rem 0; font-size: 0.88rem; color: var(--text); }
.tutor .msg.fehler { align-self: stretch; background: var(--rot-hell); border: 1px solid var(--rot-rand); }
.ki-dialog h2 { margin-top: 0; }
.ki-dialog .zeile { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.ki-dialog .zeile select { flex: 1; min-width: 12rem; }
.ki-dialog label.zeile { flex-wrap: nowrap; align-items: flex-start; }
.ki-dialog label.zeile input { margin-top: 0.3rem; }
.ki-dialog .status { min-height: 1.4em; }
dialog { border: 1px solid var(--feld-rand); border-radius: 16px; padding: 1.3rem 1.5rem; max-width: 560px; width: calc(100vw - 2rem); background: var(--karte); color: var(--text); }
dialog::backdrop { background: rgba(2, 6, 16, 0.62); }
.feld { display: grid; gap: 0.25rem; margin: 0.7rem 0; font-weight: 600; }
.feld input, .feld select { min-height: 42px; padding: 0.45rem 0.65rem; border: 1.5px solid var(--feld-rand); border-radius: 12px; background: var(--feld); font-weight: 400; }
.feld input:focus, .feld select:focus { border-color: var(--text); outline: none; }
.klein-text { font-size: 0.9rem; color: var(--leise); }
.feld .klein-text { font-weight: 400; }

/* Konto, nur mit dem Kurs-Server: Anmeldeseite, Bereich „Dein Konto“, Hinweisleiste */
.anmelde-seite { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 2rem 1rem 3rem; }
.anmelde-rahmen { width: 100%; max-width: 26rem; }
.anmelde-logo { justify-content: center; margin: 0 0 1.25rem; font-size: 1.15rem; font-weight: 700; }
.anmelde-logo .logo-led { width: 26px; height: 33px; }
.anmelde-tafel { background: var(--karte); border: 1px solid var(--linie); border-radius: 14px; padding: 1.4rem 1.6rem 1.5rem; }
.farbcode-linie { display: flex; gap: 4px; margin: 0 0 1.3rem; }
.farbcode-linie i { flex: 1; height: 5px; border-radius: 999px; }
.farbcode-linie .schwarz { outline: 1px solid color-mix(in oklab, var(--text) 32%, var(--karte)); }
.anmelde-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.anmelde-wahl .wahl { justify-content: center; padding-inline: 0.6rem; white-space: nowrap; }
.anmelde-form h1 { margin: 1.2rem 0 0.35rem; }
.anmelde-text { margin: 0 0 0.5rem; color: var(--leise); }
.anmelde-form .hinweis { margin: 0.8rem 0 0.3rem; }
.anmelde-knopf { width: 100%; margin-top: 0.7rem; }
.anmelde-vergessen { margin: 1rem 0 0; text-align: center; }
.anmelde-daten { margin: 1.1rem 0.3rem 0; font-size: 0.9rem; color: var(--leise); }
.anmelde-daten summary { cursor: pointer; font-weight: 600; color: var(--text); }
.anmelde-daten ul { margin: 0.55rem 0 0; padding-left: 1.2rem; }
.anmelde-daten li + li { margin-top: 0.35rem; }
@media (max-width: 420px) {
  .anmelde-tafel { padding: 1.2rem 1.1rem 1.3rem; }
  .anmelde-wahl .wahl { gap: 0.4rem; padding-inline: 0.4rem; }
}
.konto-bereich { margin-top: 2.2rem; border-top: 1px solid var(--linie); }
.konto-bereich > p { max-width: 42em; color: var(--leise); }
.konto-loeschen { margin-top: 1.4rem; }
.konto-loeschen summary { cursor: pointer; font-weight: 600; }
.konto-loeschen .feld { max-width: 22rem; }
.konto-loeschen p { max-width: 42em; }
.konto-hinweis { position: fixed; z-index: 60; left: 50%; bottom: 1rem; width: min(40rem, calc(100vw - 2rem)); margin: 0; transform: translateX(-50%); }
.konto-hinweis p { margin: 0; }
.konto-hinweis .knoepfe { margin-top: 0.6rem; }

/* Fehlermeldungen verstehen */
.fm-box { margin: 1rem 0; }
.fm-box label { display: block; margin-bottom: 0.45rem; }
.fm-text { width: 100%; padding: 0.65rem 0.85rem; border: 1.5px solid var(--feld-rand); border-radius: 12px; font: 0.92rem/1.45 var(--mono); resize: vertical; background: var(--code-bg); }
.fm-ergebnis:not(:empty) { margin-top: 0.9rem; }
.fm-meldung { background: var(--konsole); color: var(--konsole-text); padding: 0.65rem 0.85rem; border: 1px solid var(--linie); border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.88rem; }
.fm-meldung b { color: #ffd479; }
.fm-eintrag { margin: 0.9rem 0; }
.fm-eintrag h3 { margin: 0 0 0.5rem; }
.fm-marke { font-weight: 700; font-size: 0.75rem; padding: 0.2rem 0.55rem; border-radius: 99px; background: var(--flaeche); color: var(--leise); vertical-align: middle; white-space: nowrap; }
.fm-marke.fehler, .fm-marke.linker { background: var(--rot-hell); color: var(--rot); }
.fm-marke.warnung { background: var(--gelb-hell); color: var(--gelb); }
.fm-vergleich { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.fm-vergleich b { display: inline-flex; gap: 0.3rem; align-items: center; }
.fm-code { background: var(--code-bg); border: 1px solid var(--linie); padding: 0.5rem 0.7rem; border-radius: 10px; overflow: auto; font-size: 0.88rem; margin: 0.3rem 0 0; }
.fm-falsch { color: var(--rot); }
.fm-richtig { color: var(--gruen); }
.fm-lesen summary { cursor: pointer; }
@media (max-width: 760px) { .fm-vergleich { grid-template-columns: 1fr; } }

/* Karteikarten: Vorderseite als Tafel, Rückseite in der gedämpften Farbe ihres Kapitels; Umdrehen um die senkrechte Achse.
   Die fünf Striche sind die Kästen nach Leitner: je mehr gefüllt, desto fester sitzt die Karte. */
.kk-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin-bottom: 0.8rem; }
.kk-kapitel { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.kasten { display: inline-flex; gap: 4px; margin-left: auto; }
.kasten i { width: 18px; height: 8px; border-radius: 99px; background: var(--linie); }
.kasten i.voll { background: var(--text); }
.karteikarte { display: block; width: 100%; padding: 0; border: 0; background: none; color: var(--text); text-align: center; cursor: pointer;
  perspective: 1400px; -webkit-tap-highlight-color: transparent; }
.kk-innen { display: grid; transform-style: preserve-3d; transition: transform 0.5s var(--ease-in-out); }
.kk-seite { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.7rem; min-height: 220px; padding: 1.4rem 1.6rem;
  background: var(--karte); border: 1px solid var(--kante); border-radius: var(--radius); font-size: 1.25rem;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.kk-seite .klein-text { font-size: 0.9rem; }
.kk-hinten { transform: rotateY(180deg); background: var(--flaeche); border-color: var(--k-hell-kante); }
.karteikarte.umgedreht { cursor: default; }
.karteikarte.umgedreht .kk-innen { transform: rotateY(180deg); }
.karteikarte:focus-visible { outline: none; }
.karteikarte:focus-visible .kk-seite { outline: 3px solid var(--text); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .karteikarte:not(.umgedreht):hover .kk-vorne { border-color: var(--feld-rand); } }
.kk-wertung { margin-top: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .karteikarte { animation: karte-rein 0.32s var(--ease-out); }
  .kk-wertung:not([hidden]) { animation: auftauchen 0.24s var(--ease-out) 0.25s both; }
}
@keyframes karte-rein { from { opacity: 0; transform: translateX(28px); } }

/* Seitenkopf der Werkzeug-Seiten: das Piktogramm als weißes Schild wie an der Haltestelle */
.seiten-kopf { display: flex; align-items: flex-start; gap: 1rem; margin: 0.2rem 0 1.2rem; }
.seiten-kopf .symbol { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 12px; background: var(--text); color: var(--bg); }
.seiten-kopf .symbol .ikon { width: 30px; height: 30px; stroke-width: 2.4; }
.seiten-kopf h1 { margin: 0.3rem 0; }
.seiten-kopf p { margin: 0; max-width: 42em; color: var(--leise); }
@media (max-width: 560px) {
  .seiten-kopf { gap: 0.8rem; }
  .seiten-kopf .symbol { width: 44px; height: 44px; border-radius: 10px; }
  .seiten-kopf .symbol .ikon { width: 24px; height: 24px; }
  .seiten-kopf h1 { margin-top: 0.15rem; }
}

/* Lerntage: der Blitz zündet, sobald heute der erste Schritt geschafft ist */
@media (prefers-reduced-motion: no-preference) {
  .serie.zuendet .ikon { animation: zuenden 0.7s var(--ease-out); }
  dialog[open] { animation: dialog-rein 0.24s var(--ease-out); }
  .tutor:not([hidden]) { transform-origin: 100% 100%; animation: panel-rein 0.26s var(--ease-out); }
}
dialog[open]::backdrop { animation: einblenden 0.24s ease; }
@keyframes zuenden { 0% { transform: scale(0.6) rotate(-14deg); color: var(--matt); } 45% { transform: scale(1.3) rotate(6deg); } 100% { transform: none; } }
@keyframes zuenden-still { from { color: var(--matt); } }
@keyframes dialog-rein { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes panel-rein { from { opacity: 0; transform: translateY(14px) scale(0.97); } }

/* Weniger Bewegung: nichts gleitet, springt oder dreht sich; Farbe und Einblenden zeigen weiter, was passiert ist */
@media (prefers-reduced-motion: reduce) {
  .schritt.rein-vor, .schritt.rein-zurueck, .rueck > *, .tipps > .hinweis:last-of-type, .pruefliste li, .antwort-marke,
  .kk-wertung:not([hidden]), dialog[open], .tutor:not([hidden]) { animation: einblenden 0.2s ease both; }
  .serie.zuendet .ikon { animation: zuenden-still 0.6s ease; }
  .btn, .antwort, .kk-innen { transition: none; }
  .kk-hinten { transform: none; opacity: 0; }
  .kk-vorne, .kk-hinten { transition: opacity 0.2s ease; }
  .karteikarte.umgedreht .kk-innen { transform: none; }
  .karteikarte.umgedreht .kk-vorne { opacity: 0; }
  .karteikarte.umgedreht .kk-hinten { opacity: 1; }
}
.leer-zustand { display: flex; gap: 1.2rem; align-items: center; }
.leer-zustand .led { width: 90px; height: 112px; flex: none; }
.leer-zustand h2 { margin: 0 0 0.3rem; }
.leer-zustand p { margin: 0 0 0.8rem; }

/* ---------- Probeklausur ---------- */
/* Während der Probeklausur gibt es kein Menü und keinen KI-Tutor, wie in der echten Arbeit */
body.klausur-laeuft .kopf nav, body.klausur-laeuft .ki-knopf, body.klausur-laeuft .tutor { display: none !important; }
.pk-intro { max-width: 42em; margin: 0 0 1rem; }
.pk-karte .pk-themen { font-size: 0.88rem; color: var(--leise); }
.pk-karte .pk-stand { margin-top: auto; display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 700; font-size: 0.9rem; color: var(--leise); }
.pk-karte .pk-stand.laeuft { color: var(--text); }
.pk-ablauf { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.6rem; }
.pk-ablauf li { display: grid; gap: 0.15rem; padding: 0.75rem 1rem; background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; }
.pk-ablauf b { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.pk-wahl { display: flex; flex-wrap: wrap; gap: 0.6rem; min-width: 0; margin: 1rem 0 0.4rem; padding: 0; border: 0; }
.pk-wahl legend { float: left; width: 100%; padding: 0; margin: 0 0 0.1rem; font-weight: 700; font-size: 1.1rem; line-height: 1.25; }
.wahl { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.35rem 1rem; border: 1.5px solid var(--feld-rand); border-radius: 999px;
  background: transparent; font-weight: 600; font-size: 0.95rem; line-height: 1.2; cursor: pointer; }
.wahl:hover { background: var(--flaeche); }
.wahl:has(input:checked) { background: var(--text); border-color: var(--text); color: var(--bg); }
.wahl:has(input:focus-visible) { outline: 3px solid var(--text); outline-offset: 2px; }
.wahl input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--bg); }
.wahl input:focus-visible { outline: none; }
.fahrplan { margin: 0.5rem 0 1rem; padding-left: 1.5rem; }
.fahrplan li { max-width: 34em; margin: 0.4rem 0; padding-left: 0.2rem; }
.pk-feld { display: grid; gap: 0.35rem; margin: 0.6rem 0; }
.pk-feld > span:not(.versteckt) { font-weight: 700; }
.pk-feld textarea { width: 100%; padding: 0.45rem 0.65rem; border: 1.5px solid var(--feld-rand); border-radius: 12px; background: var(--feld); resize: vertical; }
.pk-feld textarea:focus { border-color: var(--text); outline: none; }
.klausur-leiste { flex-wrap: wrap; row-gap: 0.5rem; }
.klausur-leiste .pk-teil { font-weight: 600; font-size: 0.95rem; line-height: 1.3; color: var(--leise); }
.klausur-leiste .pk-teil b { font-weight: 700; color: var(--text); }
.klausur-leiste .pk-wo { white-space: nowrap; }
.pk-uhr { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.65rem; border-radius: 10px;
  font-weight: 700; font-size: 1rem; line-height: 1; font-variant-numeric: tabular-nums; }
.pk-uhr .ikon { width: 1.25em; height: 1.25em; }
.pk-uhr.knapp, .pk-uhr.um { color: var(--gelb); background: var(--gelb-hell); }
.pk-ergebnis { display: flex; gap: 1.2rem; align-items: center; margin: 0.6rem 0 0.4rem; }
.pk-ergebnis .led { width: 80px; height: 100px; flex: none; }
.pk-ergebnis h1 { margin: 0 0 0.3rem; }
.pk-ergebnis p { margin: 0.2rem 0; }
.pk-ergebnis b, .pk-summe { font-variant-numeric: tabular-nums; }
.pk-kopf { display: flex; align-items: baseline; gap: 0.8rem; }
.pk-p { margin-left: auto; flex: none; font-weight: 700; font-size: 0.95rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--leise); white-space: nowrap; }
.pk-antwort { margin: 0.3rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pk-leer { color: var(--leise); font-style: italic; }
.pk-ok { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.4rem; font-weight: 700; cursor: pointer; }
.pk-ok input { width: 1.1rem; height: 1.1rem; margin: 0; flex: none; }
.klausur > .ez-muster { margin: 0.4rem 0 0.8rem; }
.pruefliste.still li { animation: none; }
.pk-mehr { margin: 1rem 0; }
.pk-mehr summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; line-height: 1.3; color: var(--text); }
.pk-mehr[open] summary { margin-bottom: 0.6rem; }
.pk-ende { margin-top: 1.4rem; }
.spick-fahrplan { margin-bottom: 1.5rem; }
.spick-fahrplan h2 { margin-top: 0; }
.spick-fahrplan > p { max-width: 42em; margin: 0 0 0.4rem; color: var(--leise); }
.spick-fahrplan .fahrplan { margin-bottom: 0; }
@media (max-width: 560px) {
  .klausur-leiste { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 0.6rem; padding: 0.6rem 0.75rem 0.5rem; }
  .klausur-leiste .pk-uhr { margin-left: 0; justify-self: end; }
  .klausur-leiste .pk-abbruch { justify-self: start; }
  .pk-ergebnis { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .pk-ergebnis .led { width: 64px; height: 80px; }
}

/* Druck: ein weißer Aushang in Schwarz-Weiß, wie er aus dem Schuldrucker kommt */
@media print {
  :root { --bg: #fff; --karte: #fff; --flaeche: #f2f2f2; --text: #111; --leise: #444; --matt: #555; --linie: #bbb; --kante: #999; --feld: #fff; --feld-rand: #999;
    --akzent: #111; --akzent-hell: #f2f2f2; --akzent-rand: #bbb; --code-bg: #fff; --konsole: #fff; --konsole-text: #111;
    --gruen: #111; --gruen-hell: #fff; --gruen-rand: #999; --rot: #111; --rot-hell: #fff; --rot-rand: #999; --gelb: #111; --gelb-hell: #fff; --gelb-rand: #999;
    --t-kw: #111; --t-typ: #111; --t-str: #333; --t-num: #111; --t-com: #666; --t-pp: #111; --t-bi: #111; --t-fn: #111; --t-op: #444;
    --eva-e: #111; --eva-v: #111; --eva-a: #111;
    color-scheme: light; }
  .kopf, .knoepfe, .spick-suche, .tutor, .nicht-drucken { display: none !important; }
  body { display: block; background: #fff; color: #111; font-size: 11pt; }
  main { padding: 0; }
  .spick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Auf Papier lieber umbrechen als abschneiden */
  .erk pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  h1, h2, h3 { break-after: avoid; }
  .erk { border-color: #999; }
  .bildschirm b, .fm-meldung b { color: inherit; }
}
