/* seite.css – Rahmen der Kurswebseite: Kopf, Seitenleiste, Inhaltsverzeichnis, Reiter, Startseite.
   Farben kommen aus inhalt.css (Variablen, heller und dunkler Modus). */

:root {
    --leiste-breite: 290px;
    --toc-breite: 230px;
    --kopf-hoehe: 60px;
}

html { scroll-padding-top: calc(var(--kopf-hoehe) + 64px); }
body { margin: 0; padding: 0; max-width: none; }

/* ---------- Kopf ---------- */
.kopf {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--kopf-hoehe);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 20px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--linie);
}
.marke {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--schrift-titel);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.01em;
    min-width: 0;
}
.marke span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marke-zeichen {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: 9px;
    background: var(--akzent);
    color: var(--bg);
    font-family: var(--schrift-code);
    font-size: 0.78rem;
    font-weight: 700;
}
.kopf-rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.knopf-rund, .menue-knopf {
    display: inline-grid;
    place-items: center;
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    border: 1px solid var(--linie);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-2);
    font: inherit;
    font-size: 0.92rem;
    cursor: pointer;
}
.knopf-rund:hover, .menue-knopf:hover { background: var(--bg-weich); color: var(--text); }
.knopf-rund svg, .menue-knopf svg { width: 18px; height: 18px; }
.menue-knopf { display: none; grid-auto-flow: column; gap: 6px; white-space: nowrap; }
.thema-hell, .thema-dunkel { display: none; }
:root[data-theme="dark"] .thema-hell { display: block; }
:root[data-theme="light"] .thema-dunkel, :root:not([data-theme]) .thema-dunkel { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .thema-dunkel { display: none; }
    :root:not([data-theme]) .thema-hell { display: block; }
}

/* ---------- Rahmen: Leiste | Inhalt | Inhaltsverzeichnis ---------- */
.rahmen {
    display: grid;
    grid-template-columns: var(--leiste-breite) minmax(0, 1fr);
    min-height: calc(100vh - var(--kopf-hoehe));
}

.leiste {
    position: sticky;
    top: var(--kopf-hoehe);
    height: calc(100vh - var(--kopf-hoehe));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid var(--linie);
    padding: 16px 12px 48px;
    font-size: 0.9rem;
    scrollbar-width: thin;
    background: var(--bg-weich);
}
.suche { position: relative; margin-bottom: 12px; }
.suche input {
    width: 100%;
    font: inherit;
    color: var(--text);
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--linie);
    border-radius: 10px;
    background: var(--bg);
}
.suche input:focus { outline: 2px solid var(--akzent); outline-offset: 0; background: var(--bg); }
.suche svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--text-3); }
.leiste a {
    display: block;
    color: var(--text-2);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 8px;
    line-height: 1.35;
}
.leiste a:hover { background: var(--bg-tief); color: var(--text); }
.leiste a.aktiv { background: var(--akzent-weich); color: var(--akzent-text); font-weight: 600; }
.leiste-start { font-weight: 600; color: var(--text) !important; margin-bottom: 6px; }
.leiste details.lb { margin: 2px 0; }
.leiste details.lb > summary {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: baseline;
    padding: 7px 10px;
    font-weight: 600;
    color: var(--text);
    border-radius: 8px;
}
.leiste details.lb > summary:hover { background: var(--bg-tief); opacity: 1; }
.leiste details.lb > summary::before { align-self: flex-start; margin-top: 0.55em; color: var(--text-3); width: 0.45em; height: 0.45em; }
.leiste details.lb[open] > summary { margin-bottom: 2px; }
.lb-nr {
    flex: none;
    width: 5.6em;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--akzent-text);
    font-variant-numeric: tabular-nums;
}
.lb-inhalt { margin-left: 14px; padding-left: 8px; border-left: 1px solid var(--linie); }
.lb-uebersicht { font-size: 0.85rem; color: var(--text-3) !important; }
.leiste .kap {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 1px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
    cursor: pointer;
}
.leiste .kap:hover { background: var(--bg-tief); color: var(--text-2); opacity: 1; }
.leiste .kap::before { width: 0.42em; height: 0.42em; border-width: 0 1.5px 1.5px 0; margin: 0; }
.leiste details.kap-gruppe[open] > summary { margin-bottom: 1px; }
.leiste .kap { flex-wrap: nowrap; align-items: baseline; line-height: 1.35; }
.leiste .kap::before { align-self: center; flex: none; }
.kap-nr { flex: none; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; color: var(--akzent-text); }
.kap-nr:empty, .h2-nr:empty { display: none; }
.h2-nr { color: var(--text-3); font-variant-numeric: tabular-nums; margin-right: 0.2em; }
.kap-block > summary { display: flex; align-items: center; gap: 0.6em; cursor: pointer; margin: 2.2em 0 0; }
.kap-block > summary::before { width: 0.5em; height: 0.5em; color: var(--text-3); }
.kap-block > summary h2 { margin: 0; }
.kap-block[open] > summary { margin-bottom: 0.6em; }
.leiste ul { list-style: none; margin: 0; padding: 0; }
.leiste li { margin: 0; }
.t-nr { color: var(--text-3); font-variant-numeric: tabular-nums; margin-right: 3px; font-size: 0.92em; }
.leiste a.aktiv .t-nr { color: inherit; }
.leiste .versteckt { display: none; }

/* ---------- Hauptbereich ---------- */
.haupt-rahmen {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: center;
    gap: 48px;
    padding: 28px 48px 72px;
}
.mit-toc .haupt-rahmen { grid-template-columns: minmax(0, 780px) var(--toc-breite); }
.haupt { min-width: 0; max-width: 780px; width: 100%; justify-self: center; }
.mit-toc .haupt { justify-self: end; }

.pfad { font-size: 0.85rem; color: var(--text-3); margin: 0 0 4px; }
.pfad a { color: var(--text-3); text-decoration: none; }
.pfad a:hover { color: var(--akzent-text); text-decoration: underline; }
.h1-nr {
    display: inline-block;
    margin-right: 0.35em;
    color: var(--text-3);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.unterzeile { font-size: 1.12rem; color: var(--text-2); margin-top: -0.3em; }

.reiter {
    position: sticky;
    top: var(--kopf-hoehe);
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 1.8em;
    padding: 4px 0 0;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--linie);
}
.reiter a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--text-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}
.reiter a:hover { color: var(--text); border-bottom-color: var(--linie-stark); }
.reiter a.aktiv { color: var(--text); border-bottom-color: var(--akzent); }
.reiter .r-zahl { font-size: 0.75rem; font-weight: 600; opacity: 0.65; }
.zusatz-marke, .marke-klein {
    display: inline-block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--beispiel-bg);
    color: var(--beispiel);
    border: 1px solid var(--beispiel-linie);
}
.marke-klein { margin-left: 6px; vertical-align: 2px; background: var(--bg-weich); color: var(--text-3); border-color: var(--linie); }
.marke-klein.m-vertiefung { background: var(--aufgabe-bg); color: var(--aufgabe); border-color: var(--aufgabe-linie); }
.marke-klein.m-zusatz { background: var(--beispiel-bg); color: var(--beispiel); border-color: var(--beispiel-linie); }

.seiteninhalt > h2:first-child { margin-top: 0.4em; }

.weiter-kasten {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 3em 0 1em;
    padding: 1.1em 1.3em;
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    background: var(--bg-weich);
}
.weiter-kasten p { margin: 0 auto 0 0; font-weight: 650; }
.weiter-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--akzent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.93rem;
}
:root[data-theme="dark"] .weiter-link { color: #0b1220; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .weiter-link { color: #0b1220; } }
.weiter-link:hover { filter: brightness(1.08); text-decoration: none; }

.blaettern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 2.5em;
}
.blaettern a {
    display: block;
    padding: 12px 16px;
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.93rem;
}
.blaettern a:hover { border-color: var(--akzent); }
.blaettern small { display: block; font-weight: 500; color: var(--text-3); font-size: 0.78rem; margin-bottom: 2px; }
.blaettern .vor { text-align: right; grid-column: 2; }

.bild-fehlt, .material-fehlt {
    display: block;
    font-size: 0.85rem;
    color: var(--text-3);
    border: 1px dashed var(--linie-stark);
    border-radius: 8px;
    padding: 0.5em 0.8em;
    background: var(--bg-weich);
}
.material-fehlt { display: inline; padding: 0 0.3em; }

.lp-video { max-width: 780px; margin: 1em 0; }
.lp-video video, .seiteninhalt video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: #0f1a2e;
    border-radius: 12px;
}

/* ---------- Inhaltsverzeichnis rechts ---------- */
.toc {
    position: sticky;
    top: calc(var(--kopf-hoehe) + 28px);
    align-self: start;
    max-height: calc(100vh - var(--kopf-hoehe) - 56px);
    overflow-y: auto;
    font-size: 0.85rem;
    scrollbar-width: thin;
}
.toc-titel {
    margin: 0 0 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3);
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--linie); }
.toc li { margin: 0; }
.toc a {
    display: block;
    margin-left: -1px;
    padding: 4px 0 4px 12px;
    border-left: 2px solid transparent;
    color: var(--text-3);
    text-decoration: none;
    line-height: 1.35;
}
.toc a.unter { padding-left: 24px; font-size: 0.95em; }
.toc a:hover { color: var(--text); }
.toc a.aktiv { color: var(--akzent-text); border-left-color: var(--akzent); font-weight: 600; }

/* ---------- Code-Werkzeuge (Kopieren, Ausführen) ---------- */
.code-block { position: relative; margin: 1em 0; }
.code-block pre { margin: 0; }
.code-werkzeuge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.15s;
}
.code-block:hover .code-werkzeuge, .code-block:focus-within .code-werkzeuge, .code-block.laeuft .code-werkzeuge { opacity: 1; }
.ausfuehrbar pre { border-radius: 10px 10px 0 0; border-bottom: none; }
.ausfuehrbar .code-werkzeuge {
    position: static;
    opacity: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding: 7px 8px;
    background: #161d29;
    border: 1px solid #1f2937;
    border-radius: 0 0 10px 10px;
}
.code-toolbar > .toolbar { display: none !important; }
div.code-toolbar { position: static; }
.code-knopf {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid #334155;
    border-radius: 7px;
    background: #1b2330;
    color: #cbd5e1;
    font: 600 0.75rem var(--schrift);
    cursor: pointer;
}
.code-knopf:hover { background: #263142; color: #fff; }
.code-knopf[hidden] { display: none; }
.code-knopf.start { background: #16a34a; border-color: #16a34a; color: #fff; }
.code-knopf.start:hover { background: #15803d; }
.code-knopf svg { width: 12px; height: 12px; }
.code-block pre[contenteditable="true"] { outline: 2px solid #16a34a; outline-offset: -2px; }
.code-ausgabe {
    margin-top: 6px;
    border: 1px solid var(--linie);
    border-radius: 10px;
    background: var(--bg-weich);
    overflow: hidden;
}
.code-ausgabe-kopf {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    border-bottom: 1px solid var(--linie);
}
.code-ausgabe-kopf button { margin-left: auto; }
.code-konsole {
    padding: 8px 12px;
    min-height: 2.4em;
    font-size: 0.86rem;
    --nw-bg: var(--bg-weich);
    --nw-text: var(--text);
    --nw-accent: var(--akzent);
}
.code-hinweis { font-size: 0.78rem; color: var(--text-3); padding: 4px 12px 8px; margin: 0; }
.code-leer { margin: 0; font-family: var(--schrift); font-style: italic; opacity: 0.75; white-space: normal; }

/* ---------- Startseite ---------- */
.held {
    padding: 2.4em 0 1.2em;
}
.held h1 {
    font-size: clamp(2.1rem, 4vw, 3rem);
    line-height: 1.2;
    /* Platz für Unterlängen (g, p): der Verlauf wird auf die Box geschnitten */
    padding-bottom: 0.1em;
    margin: 0 0 0.2em;
    color: var(--text);
}
.held .unterzeile { font-size: 1.2rem; max-width: 38em; }
.aufbau { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.aufbau-teil {
    border: 1px solid var(--linie);
    border-radius: var(--radius);
    padding: 1em 1.1em;
    background: var(--bg-weich);
}
.aufbau-teil p { margin: 0.4em 0 0; font-size: 0.93rem; color: var(--text-2); }
.aufbau-kopf { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.aufbau-zahl {
    display: grid; place-items: center;
    width: 24px; height: 24px;
    border-radius: 8px;
    background: var(--akzent-weich);
    color: var(--akzent-text);
    font-size: 0.8rem;
}
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.karte {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 1.1em 1.2em;
    border: 1px solid var(--linie);
    border-radius: 14px;
    background: var(--bg);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.karte:hover { border-color: var(--akzent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(36, 87, 214, 0.12); text-decoration: none; }
.karte-nr { font-size: 0.75rem; font-weight: 700; color: var(--akzent-text); letter-spacing: 0.04em; }
.karte-titel { font-family: var(--schrift-titel); font-size: 1.15rem; font-weight: 700; color: var(--text); }
.karte-text { font-size: 0.9rem; color: var(--text-2); flex: 1; }
.karte-fuss { font-size: 0.8rem; color: var(--text-3); margin-top: 6px; }

.themenliste { list-style: none; padding: 0; margin: 0.5em 0 0; border-top: 1px solid var(--linie); }
.themenliste li { margin: 0; padding: 9px 4px; border-bottom: 1px solid var(--linie); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.themenliste a { text-decoration: none; font-weight: 600; color: var(--text); margin-right: auto; }
.themenliste a:hover { color: var(--akzent-text); }

.fuss {
    border-top: 1px solid var(--linie);
    padding: 20px;
    font-size: 0.85rem;
    color: var(--text-3);
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}
.fuss a { color: var(--text-3); }

/* ---------- Breiten ---------- */
@media (max-width: 1280px) {
    .toc { display: none; }
    .mit-toc .haupt-rahmen { grid-template-columns: minmax(0, 1fr); }
    .mit-toc .haupt { justify-self: center; }
}
@media (max-width: 960px) {
    .menue-knopf { display: inline-grid; }
    .rahmen { display: block; }
    .leiste {
        display: none;
        position: fixed;
        z-index: 50;
        top: var(--kopf-hoehe);
        left: 0;
        width: min(340px, 88vw);
        background: var(--bg);
        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.18);
    }
    .leiste.offen { display: block; }
    .haupt-rahmen { padding: 18px 16px 56px; }
    .aufbau { grid-template-columns: 1fr; }
    h1 { font-size: 1.7rem; }
    .blaettern { grid-template-columns: 1fr; }
    .blaettern .vor { grid-column: 1; text-align: left; }
    .code-werkzeuge { opacity: 1; }
}

@media print {
    .kopf, .leiste, .reiter, .blaettern, .weiter-kasten, .fuss, .toc, .code-werkzeuge { display: none !important; }
    .rahmen, .haupt-rahmen { display: block; padding: 0; }
    .haupt { max-width: none; }
}

/* ---------- Interaktive Zusatzseiten: Vollbild und eigener Tab ---------- */
.zusatz-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.zusatz-leiste-text { font-size: 0.85rem; color: var(--text-3); margin-right: auto; }
.zusatz-knopf {
    display: inline-flex; align-items: center; gap: 6px;
    font: inherit; font-size: 0.85rem; font-weight: 600;
    padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--linie-stark); background: var(--bg); color: var(--text);
    text-decoration: none; cursor: pointer;
}
.zusatz-knopf:hover { border-color: var(--akzent); color: var(--akzent-text); }
.zusatz-knopf svg { width: 16px; height: 16px; }
.nur-vollseite { display: none; }
html.vollseite .nur-vollseite { display: inline-flex; }
html.vollseite .nur-im-kurs { display: none; }
/* eigener Tab: nur die Zusatzseite, ohne Kopf, Leiste, Reiter und Fuß */
html.vollseite .kopf, html.vollseite .leiste, html.vollseite .toc, html.vollseite .reiter,
html.vollseite .pfad, html.vollseite .blaettern, html.vollseite .fuss, html.vollseite .weiter-kasten { display: none !important; }
html.vollseite .rahmen { grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
html.vollseite .haupt-rahmen, html.vollseite .mit-toc .haupt-rahmen { grid-template-columns: minmax(0, 1fr); padding: 16px 20px 32px; }
html.vollseite .haupt { max-width: 1400px; justify-self: center; }
html.vollseite .haupt h1 { font-size: 1.4rem; margin: 0 0 10px; }
/* Vollbild */
#seiteninhalt:fullscreen { overflow: auto; padding: 24px 28px; border-radius: 0; background: var(--bg); }
#seiteninhalt::backdrop { background: var(--bg); }
.zusatz-knopf[hidden] { display: none; }

/* Inhaltsverzeichnis auf schmalen Bildschirmen (unter 1280 px) */
.toc-mobil { display: none; margin: 0 0 18px; border: 1px solid var(--linie); border-radius: 12px; background: var(--bg-weich); }
.toc-mobil summary { cursor: pointer; padding: 10px 14px; font-size: 0.9rem; font-weight: 600; color: var(--text-2); }
.toc-mobil ul { margin: 0; padding: 0 14px 10px 30px; }
.toc-mobil li { margin: 4px 0; font-size: 0.92rem; }
.toc-mobil a { color: var(--text); text-decoration: none; }
.toc-mobil a:hover { color: var(--akzent-text); }
@media (max-width: 1280px) { .toc-mobil { display: block; } }
html.vollseite .toc-mobil { display: none !important; }
@media print { .toc-mobil { display: none !important; } }

/* ---------- Werkzeugseite ---------- */
.werkzeug-liste { list-style: none; padding: 0; margin: 0.6em 0 1.6em; border-top: 1px solid var(--linie); }
.werkzeug-liste li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 4px; border-bottom: 1px solid var(--linie); margin: 0; }
.werkzeug-liste li > div { min-width: 0; }
.werkzeug-liste a { font-weight: 600; text-decoration: none; color: var(--text); }
.werkzeug-liste a:hover { color: var(--akzent-text); }
.werkzeug-liste p { margin: 2px 0 0; font-size: 0.93rem; color: var(--text-2); }
.werkzeug-liste p.werkzeug-thema { font-size: 0.8rem; color: var(--text-3); }
.werkzeug-art {
    flex: none; width: 82px; text-align: center; margin-top: 2px;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
    padding: 3px 0; border-radius: 6px; border: 1px solid var(--linie-stark); color: var(--text-2); background: var(--bg-weich);
}
.werkzeug-art.art-simulation { color: var(--beispiel); border-color: var(--beispiel-linie); background: var(--beispiel-bg); }
.werkzeug-art.art-labor { color: var(--praxis); border-color: var(--praxis-linie); background: var(--praxis-bg); }
.werkzeug-art.art-uebung { color: var(--aufgabe); border-color: var(--aufgabe-linie); background: var(--aufgabe-bg); }
.werkzeug-hinweis { font-size: 0.85rem; color: var(--text-3); margin-top: 8px; }
.projekt-karte { border-color: var(--beispiel-linie); }
.projekt-karte .karte-nr { color: var(--beispiel); }

/* ---------- Karten mit Bild (Lernprojekte, Werkzeuge) ---------- */
.karten-bild { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.karte-bild {
    display: block; width: calc(100% + 2.4em); max-width: none; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
    margin: -1.1em -1.2em 0.5em; border-radius: 13px 13px 0 0; border-bottom: 1px solid var(--linie); background: var(--bg-weich);
}
.werkzeug-karte .karte-nr { color: var(--praxis); }

/* ---------- Wortmarke „LK Informatik_“ mit blinkendem Cursor ---------- */
.marke-wort { font-family: var(--schrift-titel); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.marke-wort .cursor {
    font-family: var(--schrift-code);
    font-weight: 600;
    color: var(--akzent);
    margin-left: 0.05em;
    animation: cursor-blinken 1.1s steps(1, end) infinite;
}
@keyframes cursor-blinken { 50% { opacity: 0; } }

/* ---------- Schnellzugriff oben rechts ---------- */
.schnell { display: flex; gap: 2px; align-items: center; }
.schnell a, .schnell-liste a {
    padding: 6px 10px; border-radius: 8px; font-size: 0.88rem; font-weight: 600;
    color: var(--text-2); text-decoration: none; white-space: nowrap;
}
.schnell a:hover, .schnell-liste a:hover { background: var(--bg-weich); color: var(--akzent-text); }
.schnell-titel { font-size: 0.8rem; color: var(--text-3); white-space: nowrap; margin-right: 4px; }
.schnell-liste .schnell-titel { padding: 4px 10px 6px; margin: 0; }
.schnell-menue { display: none; position: relative; }
.schnell-menue summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
/* Handy: „Themen“ nur als Symbol, damit „Informatik in Schule_“ ganz in die Kopfzeile passt */
@media (max-width: 600px) {
    .kopf { gap: 8px; padding: 0 12px; }
    .menue-knopf span { display: none; }
    .marke-wort { font-size: 1rem; }
}
.schnell-menue summary::marker { content: ""; }
.schnell-menue summary::-webkit-details-marker { display: none; }
.schnell-liste {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
    display: flex; flex-direction: column; min-width: 170px; padding: 6px;
    background: var(--bg); border: 1px solid var(--linie); border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}
@media (max-width: 1200px) {
    .schnell { display: none; }
    .schnell-menue { display: block; }
}
@media print { .schnell, .schnell-menue { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .marke-wort .cursor { animation: none; } }

/* ---------- Lernprojekte: ein Abschnitt je Spiel ---------- */
.projekt { border: 1px solid var(--beispiel-linie); border-radius: 16px; padding: 1.1em 1.2em 0.9em; margin: 1.4em 0; background: var(--bg); }
.projekt-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.projekt-kopf h2 { margin: 0.1em 0 0; border: none; padding: 0; }
.projekt-kopf .karte-nr { color: var(--beispiel); }
.projekt-los { flex: none; font-weight: 700; text-decoration: none; padding: 0.45em 1em; border-radius: 10px; background: var(--akzent); color: var(--bg); }
.projekt-los:hover { filter: brightness(1.1); text-decoration: none; color: var(--bg); }
.projekt-galerie { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0.9em 0; }
.projekt-galerie a { display: block; border-radius: 9px; overflow: hidden; border: 1px solid var(--linie); }
.projekt-galerie img { display: block; margin: 0; max-width: none; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.2s; }
.projekt-galerie a:hover img { transform: scale(1.04); }
.projekt-text { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4em; }
.projekt-text h3 { margin: 0.2em 0 0.2em; font-size: 1rem; }
.projekt-text p { margin: 0 0 0.6em; font-size: 0.95rem; color: var(--text-2); }
.projekt-fuss { margin: 0.2em 0 0; font-size: 0.8rem; color: var(--text-3); }
@media (max-width: 720px) { .projekt-galerie { grid-template-columns: 1fr 1fr; } .projekt-galerie a:first-child { grid-column: span 2; } .projekt-text { grid-template-columns: 1fr; } }
