/* ==========================================================================
   inhalt.css – Gestaltung der Kursinhalte (Texte, Kästen, Tabellen, Code)
   Farben nur über Variablen, damit heller und dunkler Modus zusammenpassen.
   Kästen: <div class="merke|hinweis|aufgabe|beispiel|praxisbezug|loesung">
   ========================================================================== */

/* Schrift IBM Plex (SIL Open Font License, liegt in assets/schrift, kein Google-Abruf) */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("schrift/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("schrift/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("schrift/ibm-plex-sans-latin-400-italic.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("schrift/ibm-plex-sans-latin-ext-400-italic.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("schrift/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("schrift/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("schrift/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("schrift/ibm-plex-sans-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("schrift/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("schrift/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("schrift/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url("schrift/ibm-plex-mono-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    color-scheme: light;
    --schrift: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --schrift-titel: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --schrift-code: "IBM Plex Mono", "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;

    --bg: #ffffff;
    --bg-weich: #f6f7f9;
    --bg-tief: #eef0f3;
    --text: #1c2026;
    --text-2: #4b5563;
    --text-3: #6b7280;
    --linie: #e4e7eb;
    --linie-stark: #cfd5dc;
    --akzent: #2350c8;
    --akzent-text: #1f47b3;
    --akzent-weich: #eaf0fd;

    --merke: #1f47b3;      --merke-bg: #f2f6fe;     --merke-linie: #d3e0fb;
    --hinweis: #15803d;    --hinweis-bg: #f2fbf5;   --hinweis-linie: #c4ebd1;
    --aufgabe: #b45309;    --aufgabe-bg: #fffaf0;   --aufgabe-linie: #f6dfb0;
    --beispiel: #6d28d9;   --beispiel-bg: #f7f5ff;  --beispiel-linie: #ddd5fb;
    --praxis: #0f766e;     --praxis-bg: #f0faf8;    --praxis-linie: #b9e6de;
    --loesung: #1d4ed8;    --loesung-bg: #f1f5ff;   --loesung-linie: #c9d7fb;
    --grau: #475569;       --grau-bg: #f5f7fa;      --grau-linie: #dde3ea;

    --code-bg: #0f1520;
    --code-text: #e3e8ef;
    --code-inline: #0b5cad;
    --code-inline-bg: #eef3fa;
    --mark: #fde68a;
    --mark-bez: #bfdbfe;
    --mark-kard: #bbf7d0;

    --radius: 12px;
    --schatten: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
}

/* Interaktive Zusatzseiten haben eigene helle Flächen: immer hell darstellen */
.immer-hell {
    color-scheme: light;
    --schrift: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --schrift-titel: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --schrift-code: "IBM Plex Mono", "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;

    --bg: #ffffff;
    --bg-weich: #f6f7f9;
    --bg-tief: #eef0f3;
    --text: #1c2026;
    --text-2: #4b5563;
    --text-3: #6b7280;
    --linie: #e4e7eb;
    --linie-stark: #cfd5dc;
    --akzent: #2350c8;
    --akzent-text: #1f47b3;
    --akzent-weich: #eaf0fd;

    --merke: #1f47b3;      --merke-bg: #f2f6fe;     --merke-linie: #d3e0fb;
    --hinweis: #15803d;    --hinweis-bg: #f2fbf5;   --hinweis-linie: #c4ebd1;
    --aufgabe: #b45309;    --aufgabe-bg: #fffaf0;   --aufgabe-linie: #f6dfb0;
    --beispiel: #6d28d9;   --beispiel-bg: #f7f5ff;  --beispiel-linie: #ddd5fb;
    --praxis: #0f766e;     --praxis-bg: #f0faf8;    --praxis-linie: #b9e6de;
    --loesung: #1d4ed8;    --loesung-bg: #f1f5ff;   --loesung-linie: #c9d7fb;
    --grau: #475569;       --grau-bg: #f5f7fa;      --grau-linie: #dde3ea;

    --code-bg: #0f1520;
    --code-text: #e3e8ef;
    --code-inline: #0b5cad;
    --code-inline-bg: #eef3fa;
    --mark: #fde68a;
    --mark-bez: #bfdbfe;
    --mark-kard: #bbf7d0;

    --radius: 12px;
    --schatten: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
}
.immer-hell { background: var(--bg); color: var(--text); padding: 18px 20px; border-radius: 14px; }
.immer-hell img { background: none !important; padding: 0 !important; }

/* Dunkler Modus: folgt dem System, außer man hat hell/dunkel selbst gewählt */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0f1216;
        --bg-weich: #161a20;
        --bg-tief: #1d222a;
        --text: #e5e8ec;
        --text-2: #b4bcc6;
        --text-3: #8b95a2;
        --linie: #272d36;
        --linie-stark: #38404b;
        --akzent: #7fa2ff;
        --akzent-text: #9db8ff;
        --akzent-weich: #1c2742;
        --merke: #9db8ff;   --merke-bg: #172036;   --merke-linie: #26355a;
        --hinweis: #4ade80; --hinweis-bg: #10201a; --hinweis-linie: #1f4430;
        --aufgabe: #fbbf24; --aufgabe-bg: #211b0f; --aufgabe-linie: #4a3a16;
        --beispiel: #b49cff;--beispiel-bg: #1a1630;--beispiel-linie: #362c63;
        --praxis: #2dd4bf;  --praxis-bg: #0e2220;  --praxis-linie: #1b4a44;
        --loesung: #8fb5ff; --loesung-bg: #131d33; --loesung-linie: #263a66;
        --grau: #aab4c0;    --grau-bg: #171c23;    --grau-linie: #2b323c;
        --code-bg: #0a0d12;
        --code-inline: #9cc4ff;
        --code-inline-bg: #1b2332;
        --mark: #6b5a16;
        --mark-bez: #1e3a66;
        --mark-kard: #1c4a2c;
        --schatten: 0 1px 2px rgba(0, 0, 0, 0.3);
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1216;
    --bg-weich: #161a20;
    --bg-tief: #1d222a;
    --text: #e5e8ec;
    --text-2: #b4bcc6;
    --text-3: #8b95a2;
    --linie: #272d36;
    --linie-stark: #38404b;
    --akzent: #7fa2ff;
    --akzent-text: #9db8ff;
    --akzent-weich: #1c2742;
    --merke: #9db8ff;   --merke-bg: #172036;   --merke-linie: #26355a;
    --hinweis: #4ade80; --hinweis-bg: #10201a; --hinweis-linie: #1f4430;
    --aufgabe: #fbbf24; --aufgabe-bg: #211b0f; --aufgabe-linie: #4a3a16;
    --beispiel: #b49cff;--beispiel-bg: #1a1630;--beispiel-linie: #362c63;
    --praxis: #2dd4bf;  --praxis-bg: #0e2220;  --praxis-linie: #1b4a44;
    --loesung: #8fb5ff; --loesung-bg: #131d33; --loesung-linie: #263a66;
    --grau: #aab4c0;    --grau-bg: #171c23;    --grau-linie: #2b323c;
    --code-bg: #0a0d12;
    --code-inline: #9cc4ff;
    --code-inline-bg: #1b2332;
    --mark: #6b5a16;
    --mark-bez: #1e3a66;
    --mark-kard: #1c4a2c;
    --schatten: 0 1px 2px rgba(0, 0, 0, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--schrift);
    font-size: 17px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ---------- Überschriften ---------- */
h1, h2, h3, h4 {
    font-family: var(--schrift-titel);
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -0.012em;
    scroll-margin-top: 90px;
}
h1 { font-size: 2.1rem; font-weight: 700; margin: 0.2em 0 0.6em; letter-spacing: -0.02em; }
h2 { font-size: 1.45rem; font-weight: 600; margin: 2.2em 0 0.6em; padding-top: 0.2em; }
h3 { font-size: 1.15rem; font-weight: 600; margin: 1.6em 0 0.4em; }
h4 { font-size: 1rem; font-weight: 600; margin: 1.3em 0 0.3em; }

.anker {
    margin-left: 0.35em;
    color: var(--text-3);
    text-decoration: none;
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.15s;
}
h2:hover .anker, h3:hover .anker, .anker:focus { opacity: 1; }

p { margin: 0.75em 0; }
li { margin: 0.35em 0; }
ul, ol { padding-left: 1.4em; }
a { color: var(--akzent-text); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
hr { border: none; border-top: 1px solid var(--linie); margin: 2em 0; }

/* ---------- Tabellen ---------- */
table, #table1 {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1.4rem 0;
    font-size: 0.94rem;
    border: 1px solid var(--linie);
    border-radius: 10px;
    overflow: hidden;
    display: table;
}
th, td {
    padding: 0.6em 0.9em;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--linie);
}
thead th, th { background: var(--bg-weich); font-weight: 600; color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-weich); }
table.gitter th, table.gitter td { border: 1px solid var(--linie-stark); text-align: center; }

/* ---------- Bilder ---------- */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.8em 0.2em;
}
/* Abbildungen sind meist für hellen Hintergrund gezeichnet */
:root[data-theme="dark"] .seiteninhalt img:not(.ohne-rahmen) { background: #fff; padding: 6px; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .seiteninhalt img:not(.ohne-rahmen) { background: #fff; padding: 6px; }
}
figure { margin: 1.4rem 0; }
figcaption { font-size: 0.88rem; color: var(--text-3); margin-top: -0.3em; }
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 1rem auto; }
.gallery img { width: calc(50% - 10px); max-width: 500px; margin: 0; }
@media (max-width: 600px) { .gallery img { width: 100%; } }

/* ---------- Kästen ---------- */
.merke, .hinweis, .aufgabe, .loesung, .praxisbezug, .beispiel, .sachtext, .selfcheck-quelle, .ml-frage,
#merke, #hinweis, #aufgabe, #loesung, #praxisbezug, #beispiel {
    --k: var(--grau); --k-bg: var(--grau-bg); --k-linie: var(--grau-linie);
    display: block;
    position: relative;
    margin: 1.3rem 0;
    padding: 0.95rem 1.15rem;
    border: 1px solid var(--k-linie);
    border-radius: var(--radius);
    background: var(--k-bg);
}
.merke, #merke             { --k: var(--merke);    --k-bg: var(--merke-bg);    --k-linie: var(--merke-linie); }
.hinweis, #hinweis         { --k: var(--hinweis);  --k-bg: var(--hinweis-bg);  --k-linie: var(--hinweis-linie); }
.aufgabe, #aufgabe         { --k: var(--aufgabe);  --k-bg: var(--bg);          --k-linie: var(--linie-stark); box-shadow: var(--schatten); }
.loesung, #loesung         { --k: var(--loesung);  --k-bg: var(--loesung-bg);  --k-linie: var(--loesung-linie); }
.praxisbezug, #praxisbezug { --k: var(--praxis);   --k-bg: var(--praxis-bg);   --k-linie: var(--praxis-linie); }
.beispiel, #beispiel       { --k: var(--beispiel); --k-bg: var(--beispiel-bg); --k-linie: var(--beispiel-linie); }

/* kleine Kopfzeile („MERKE“, „BEISPIEL“ …) */
.merke::before, #merke::before, .beispiel::before, #beispiel::before, .sachtext::before, .ml-frage::before {
    display: block;
    margin-bottom: 0.35em;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--k);
}
.merke::before, #merke::before { content: "Merke"; }
.beispiel::before, #beispiel::before { content: "Beispiel"; }
.beispiel.klappbar::before { display: none; }
.sachtext::before { content: "Sachtext"; }
.ml-frage::before { content: "Aufgabenstellung"; }
.merke > :first-child, .hinweis > :first-child, .beispiel > :first-child, .praxisbezug > :first-child { margin-top: 0; }
.merke > :last-child, .hinweis > :last-child, .beispiel > :last-child, .praxisbezug > :last-child, .aufgabe > :last-child { margin-bottom: 0; }

/* Aufgaben: Karte mit farbigem Streifen oben */
.aufgabe::after, #aufgabe::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px; top: -1px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--aufgabe);
    opacity: 0.85;
    display: none;  /* Stil „Klar“: Aufgaben ohne Farbbalken */
}

/* ---------- Aufklappen ---------- */
details { margin: 0; padding: 0; border: none; background: none; }
summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5em;
    font-weight: 600;
    color: var(--k, var(--text));
    border-radius: 6px;
}
summary::-webkit-details-marker { display: none; }
summary::before {
    content: "";
    flex: none;
    width: 0.55em;
    height: 0.55em;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.15s ease;
    margin: 0 0.25em 0 0.1em;
    opacity: 0.8;
}
details[open] > summary::before { transform: rotate(45deg); }
details[open] > summary { margin-bottom: 0.6em; }
summary:hover { opacity: 0.85; }
summary:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; }
.aufgabe > details > summary { color: var(--text); }
.aufgabe > details > summary::before { color: var(--aufgabe); }

details.loesung-details {
    margin-top: 0.9em;
    padding: 0.55em 0.9em;
    background: var(--loesung-bg);
    border: 1px solid var(--loesung-linie);
    border-radius: 8px;
}
details.loesung-details > summary { color: var(--loesung); }

/* ---------- Kennzeichen ---------- */
.niveau, .beispiel-kopf {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 999px;
    padding: 0.12em 0.65em;
    white-space: nowrap;
}
.niveau { color: var(--akzent-text); background: var(--akzent-weich); border: 1px solid transparent; margin-left: auto; }
.beispiel-kopf { color: var(--beispiel); background: var(--bg); border: 1px solid var(--beispiel-linie); text-transform: uppercase; }

/* ---------- kleinere Kästen ---------- */
.tipp, .git-datei {
    border: 1px solid var(--aufgabe-linie);
    background: var(--aufgabe-bg);
    border-radius: 8px;
    padding: 0.5em 0.85em;
    margin: 0.9em 0 0;
    font-size: 0.95rem;
}
.tipp::before, .git-datei::before {
    content: "Tipp";
    display: inline-block;
    margin-right: 0.6em;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--aufgabe);
}
.git-datei { border-color: var(--grau-linie); background: var(--grau-bg); }
.git-datei::before { content: "Datei & Git"; color: var(--grau); }

ol.schritte { list-style: none; counter-reset: schritt; margin: 0.6em 0; padding: 0; }
ol.schritte > li { counter-increment: schritt; position: relative; padding: 0.1em 0 0.1em 2.3em; margin: 0.55em 0; }
ol.schritte > li::before {
    content: counter(schritt);
    position: absolute; left: 0; top: 0.15em;
    width: 1.55em; height: 1.55em;
    display: grid; place-items: center;
    border-radius: 999px;
    background: var(--loesung); color: var(--bg);
    font-size: 0.78em; font-weight: 700; line-height: 1;
}

mark { background: var(--mark); color: inherit; padding: 0 0.15em; border-radius: 3px; }
mark.bez { background: var(--mark-bez); }
mark.kard { background: var(--mark-kard); }

/* ---------- Selbstcheck ---------- */
.selfcheck-quelle { font-size: 0.9rem; color: var(--text-2); }
.selfcheck-gruppe { margin: 1.6em 0; }
.selfcheck-gruppe h3 { margin-bottom: 0.4em; }
.selfcheck-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.selfcheck-liste li { margin: 0; border-bottom: 1px solid var(--linie); }
.selfcheck-liste label { display: flex; align-items: flex-start; gap: 0.7em; padding: 0.55em 0.2em; cursor: pointer; }
.selfcheck-liste input[type="checkbox"] { margin-top: 0.35em; width: 1.1em; height: 1.1em; flex-shrink: 0; accent-color: var(--hinweis); }
.selfcheck-liste .sc-ref { color: var(--text-3); font-size: 0.85em; }

.ml-toc { columns: 2; column-gap: 2.5em; }
@media (max-width: 600px) { .ml-toc { columns: 1; } }

/* ---------- Code ---------- */
code, kbd {
    font-family: var(--schrift-code);
    font-size: 0.86em;
}
code {
    color: var(--code-inline);
    background: var(--code-inline-bg);
    padding: 0.12em 0.38em;
    border-radius: 5px;
}
kbd {
    border: 1px solid var(--linie-stark);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 0.05em 0.4em;
    background: var(--bg-weich);
}
pre, pre[class*=language-] {
    position: relative;
    background: var(--code-bg) !important;
    color: var(--code-text);
    padding: 1em 1.15em;
    margin: 1em 0;
    border-radius: 10px;
    overflow-x: auto;
    font-family: var(--schrift-code);
    font-size: 0.86rem;
    line-height: 1.6;
    border: 1px solid #1f2937;
    text-shadow: none !important;
    tab-size: 4;
}
pre code, pre code[class*=language-] {
    background: none !important;
    color: inherit !important;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    text-shadow: none !important;
}
/* Rechnungen, Ausgaben, Daten, Bäume: kein Programmcode, daher hell */
pre.darstellung {
    background: var(--bg-weich) !important;
    color: var(--text);
    border: 1px solid var(--linie);
    font-size: 0.9rem;
}
/* Schriftliche Rechnungen: eine Ziffer je Kästchen, Kommas untereinander (bauen.py: rechnung_html) */
.rechnung-rahmen {
    overflow-x: auto;
    margin: 1rem 0 1.25rem;
}
table.rechnung {
    width: auto;
    border-collapse: collapse;
    margin: 0;
    font-family: var(--schrift-code);
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
    background: none;
    border: 0;
}
table.rechnung th,
table.rechnung td {
    background: none;
    border: 0;
    padding: 0;
    line-height: 1;
    height: 1.9em;
}
table.rechnung th {
    font-weight: normal;
    text-align: right;
    white-space: nowrap;
    padding: 0 0.45em;
    color: var(--text);
}
table.rechnung td {
    width: 1.9em;
    min-width: 1.9em;
    text-align: center;
    border: 1px solid var(--linie-stark);
    color: var(--text);
}
table.rechnung td.komma {
    width: 0.9em;
    min-width: 0.9em;
    font-weight: 600;
}
table.rechnung td.notiz {
    width: auto;
    border: 0;
    text-align: left;
    white-space: nowrap;
    padding-left: 0.8em;
    color: var(--text-2);
    font-family: var(--schrift);
}
table.rechnung tr.uebertrag td:not(.notiz),
table.rechnung tr.uebertrag th {
    font-size: 0.75em;
    color: var(--akzent);
    vertical-align: bottom;
    padding-bottom: 0.15em;
    height: 1.6em;
}
table.rechnung tr.uebertrag td:not(.notiz) { width: 2.53em; min-width: 2.53em; }
table.rechnung tr.uebertrag td.komma { width: 1.2em; min-width: 1.2em; }
table.rechnung tr.ergebnis td:not(.notiz) {
    border-top: 2px solid var(--text);
    font-weight: 700;
}
table.rechnung td.ueberlauf {
    color: var(--text-2);
    text-decoration: line-through;
}
pre.schema {
    background: var(--akzent-weich) !important;
    color: var(--text);
    border: 1px solid var(--loesung-linie);
    white-space: pre-wrap;
}

/* Prism-Farben (dunkles Schema, passt in beiden Modi) */
pre .token.comment, pre .token.prolog, pre .token.doctype, pre .token.cdata { color: #7d8799 !important; font-style: italic; }
pre .token.punctuation { color: #aab4c3 !important; }
pre .token.keyword, pre .token.atrule, pre .token.important { color: #c792ea !important; }
pre .token.builtin, pre .token.class-name { color: #ffcb6b !important; }
pre .token.function { color: #82aaff !important; }
pre .token.string, pre .token.char, pre .token.attr-value, pre .token.inserted { color: #c3e88d !important; }
pre .token.number, pre .token.boolean, pre .token.constant { color: #f78c6c !important; }
pre .token.operator, pre .token.entity, pre .token.url { color: #89ddff !important; background: none !important; }
pre .token.decorator, pre .token.annotation { color: #ffcb6b !important; }
pre .token.deleted { color: #ff5370 !important; }

@media print {
    .no-print { display: none !important; }
    pre, pre[class*=language-] { background: #f6f8fa !important; color: #111 !important; border-color: #ddd; }
}

/* Lernziele „Das kann ich jetzt“ */
.ziele {
    margin: 2.2rem 0 1.5rem;
    padding: 1.1em 1.3em 0.9em;
    border: 1px solid var(--linie-stark);
    border-radius: var(--radius);
    background: var(--bg);
}
.ziele h2 { margin: 0 0 0.3em; font-size: 1.2rem; color: var(--text); }
.ziele .ziele-hinweis { margin: 0 0 0.7em; font-size: 0.92rem; color: var(--text-2); }
.ziele-liste { list-style: none; margin: 0; padding: 0; }
.ziele-liste li { margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.ziele-liste li:first-child { border-top: 0; }
.ziele-liste label { display: flex; gap: 0.7em; align-items: flex-start; padding: 0.55em 0; cursor: pointer; }
.ziele-liste input { width: 1.15em; height: 1.15em; margin: 0.15em 0 0; flex: none; accent-color: var(--akzent); cursor: pointer; }
.ziele-liste input:checked + span { color: var(--text-2); }
.ziele .ziele-stand { margin: 0.5em 0 0; font-size: 0.88rem; font-weight: 600; color: var(--akzent-text); }
.ziele-chip {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1em 0.55em;
    border-radius: 999px;
    border: 1px solid var(--linie-stark);
    color: var(--text-2);
    white-space: nowrap;
}
.ziele-chip.fertig { border-color: var(--hinweis-linie); background: var(--hinweis-bg); color: var(--hinweis); }
.ziele .ziel-titel { margin: 0.9em 0 0.1em; font-size: 0.85rem; font-weight: 600; color: var(--text-2); }
.ziele .ziel-titel:first-of-type { margin-top: 0.3em; }
.ziel-titel span, .ziel-lb {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.05em 0.45em;
    margin-right: 0.35em;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--hinweis-linie);
    color: var(--hinweis);
    vertical-align: 0.1em;
}
.ziele-liste + .ziele-liste { margin-top: 0.2em; }
.ziele-liste li { display: flex; align-items: flex-start; gap: 0.6em; }
.ziele-liste li label { flex: 1; }
.ziel-thema {
    flex: none;
    align-self: center;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.1em 0.5em;
    border-radius: 999px;
    border: 1px solid var(--linie-stark);
    color: var(--akzent-text);
    background: var(--bg);
}
.ziel-thema:hover { border-color: var(--akzent); }
.ziel-titel em { font-style: normal; font-weight: 400; color: var(--text-3); }
