/* Lernansichten (Runde 15): Übersicht, Staffel, Kapitel. Tokens und Schriften stehen in app.css. */

/* Breiten nach verfügbarem Platz in em (wächst mit der Textgröße): .lern ist der Abfrage-Container. */
.lern { container-type: inline-size; display: grid; gap: var(--a6); }
.lern .seitenkopf { padding: var(--a2) 0 0; }
.start-kopf { margin-bottom: calc(-1 * var(--a3)); }
.seite-haupt { display: grid; gap: var(--a6); }
.start-kopf .titel-gross { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); }
.pfad { margin-bottom: calc(-1 * var(--a4)); }
.schild { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px 2px; background: var(--karton); color: var(--tinte); border: 2.5px solid var(--tinte); border-radius: 8px; font: 800 var(--mini)/1.1 var(--f-display); letter-spacing: 0.07em; text-transform: uppercase; }
.listen-kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--a3) var(--a5); margin-bottom: var(--a4); }
.listen-kopf > p { font-size: var(--klein); font-weight: 600; color: var(--text-2); }
.lern .abschnitt-titel { margin: 0 0 var(--a3); }

.buehne { --b-rand: rgba(243, 238, 226, 0.6); position: relative; isolation: isolate; overflow: hidden; display: grid; border-radius: var(--r-l); background: var(--buehne) var(--raster); color: #fff; box-shadow: var(--schatten); }
.buehne::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1px solid rgba(243, 238, 226, 0.1); pointer-events: none; }
.buehne :focus-visible { outline-color: var(--senf); }
.buehne .bild { position: relative; display: block; }
.buehne .bild img { width: 100%; height: auto; }
.buehne .bild::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--buehne) 0, rgba(18, 28, 39, 0) 28%); }
.buehne-text { display: grid; gap: var(--a4); justify-items: start; align-content: center; padding: var(--a4) var(--a5) var(--a5); }
.kennung { display: flex; flex-wrap: wrap; align-items: center; gap: var(--a2) var(--a3); font-size: var(--klein); font-weight: 600; color: #C9D1D9; }
.buehne .titel-gross, .titel-buehne { color: #fff; }
.titel-buehne { font: 800 min(clamp(1.625rem, 1.15rem + 1.9vw, 2.5rem), max(9cqi, 1.5rem))/1.08 var(--f-display); letter-spacing: -0.022em; text-wrap: balance; }
/* Große Textgröße: Überschriften wachsen mit, aber höchstens so weit, dass ein langes Wort noch in die Zeile passt. */
.lern .titel-gross { font-size: min(var(--gross), max(8.5cqi, 1.5rem)); }
.versprechen { font-size: 1.1875rem; line-height: 1.42; color: #DFE4E8; max-width: 32em; text-wrap: pretty; }
.buehne-ort { font-size: var(--klein); color: #C9D1D9; }
.buehne .balken { max-width: 360px; }
.buehne .balken-spur { fill: rgba(243, 238, 226, 0.22); }
.buehne .balken-wert { fill: var(--st-f); }
.buehne .vorbereitung-hinweis { color: #DFE4E8; }
.buehne .knopf-primaer { --kontur: #04080C; }
.buehne-ruhig .buehne-text, .buehne-kapitel .buehne-text { padding-top: var(--a5); }
@container (min-width: 38em) {
  .buehne { min-height: 360px; align-items: center; }
  .buehne .bild { position: absolute; inset: 0; z-index: -1; }
  .buehne .bild img { height: 100%; object-fit: cover; object-position: right center; }
  .buehne .bild::after { background: linear-gradient(90deg, rgba(18, 28, 39, 0.95) 0 52%, rgba(18, 28, 39, 0) 80%); }
  .buehne-text { max-width: 50%; padding: clamp(24px, 4cqi, 52px); }
  .buehne-ruhig, .buehne-kapitel { min-height: 0; }
  .buehne-ruhig .buehne-text, .buehne-kapitel .buehne-text { max-width: 44em; }
}
.buehne-kapitel .bogen { margin: 0 var(--a5) var(--a5); }
@container (min-width: 56em) {
  .buehne-kapitel.mit-bogen { grid-template-columns: minmax(0, 1fr) minmax(18em, 24em); gap: var(--a5); padding-right: clamp(24px, 4cqi, 52px); }
  .buehne-kapitel .bogen { margin-block: var(--a6); }
}
/* Schmal: Text unter dem Bild auf ruhigem Grund, damit kein Rasterkreuz in Schrift oder Kennung liegt. */
@container (max-width: 37.99em) { .buehne-text { background-color: var(--buehne); } }
@media (prefers-contrast: more) { .buehne .bild::after { background: linear-gradient(90deg, var(--buehne) 0 56%, transparent 56%); } }

/* Bausteinleiste: ein Block je Kapitel bzw. Video, der Test als größerer Schlussstein (Zustand auch als Symbol). */
.fortschritt { display: grid; gap: var(--a2); width: 100%; max-width: 420px; }
.fortschritt-text { font-size: var(--klein); font-weight: 600; }
.bausteine { display: flex; align-items: center; gap: 4px; --bh: 16px; }
.b { flex: 1 1 0; min-width: 6px; max-width: 44px; height: var(--bh); border-radius: 4px; border: 2px solid var(--b-rand, var(--rand)); }
.b-fertig { background: var(--st-f); border-color: light-dark(var(--tinte), var(--st-f)); }
.b-laeuft { background: linear-gradient(90deg, var(--st-f) 50%, transparent 50%); border-color: light-dark(var(--tinte), var(--st-f)); }
.b-vorbereitung { border-style: dashed; }
.buehne .b-fertig, .buehne .b-laeuft { border-color: var(--st-f); }
/* Leere Bausteine decken das Bühnenraster ab, damit kein Kreuz durch die Leiste läuft. */
.buehne .b { background-color: var(--buehne); }
.buehne .b-fertig { background-color: var(--st-f); }
.b-schluss { flex: 0 0 auto; width: calc(var(--bh) + 12px); height: calc(var(--bh) + 12px); max-width: none; margin-left: 4px; border-radius: 7px; display: grid; place-items: center; color: var(--text-2); }
.b-schluss .icon { width: 64%; height: 64%; stroke-width: 2.6; }
.b-schluss.b-fertig { color: var(--tinte); }
.buehne .b-schluss { color: #DFE4E8; }
.buehne .b-schluss.b-fertig { color: var(--tinte); }

/* Bogen: Lernziele als Papierbogen mit Kästchen, nach Abschluss abgehakt. */
.bogen { background: var(--karton); color: var(--tinte); border: 3px solid var(--tinte); border-radius: 16px; overflow: hidden; box-shadow: 0 6px 0 var(--kontur); }
.bogen-kopf { background: var(--st-f); border-bottom: 3px solid var(--tinte); padding: 11px 20px 9px; font: 800 1rem/1.2 var(--f-display); letter-spacing: 0.06em; text-transform: uppercase; }
.bogen-inhalt { display: grid; gap: var(--a3); padding: 18px 20px 22px; }
.bogen-inhalt p { font-size: var(--klein); font-weight: 600; color: #3A4654; }
.bogen li { display: grid; grid-template-columns: 1.1em minmax(0, 1fr); gap: 0.7em; line-height: 1.4; font-weight: 500; }
.bogen li + li { margin-top: 10px; }
.bogen li::before { content: ""; width: 0.95em; height: 0.95em; margin-top: 0.2em; border: 2px solid var(--tinte); border-radius: 0.25em; }
.bogen.ist-erledigt li::before { background: var(--st-f) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7.4l2.7 2.7L11 4.4' fill='none' stroke='%230E1620' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }

.bogen-ziel .lernziel { font-size: var(--body); font-weight: 500; color: var(--tinte); }
.kennung-zeile { display: flex; }

/* Übersicht: Gesamtstand (ein Baustein je Staffel) und Staffelkarten. */
.stand { display: grid; gap: 6px; justify-items: start; width: min(100%, 300px); }
.bausteine-stand { width: 100%; --bh: 14px; }
.stand .meta { font-weight: 600; }
.staffeln { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5em), 1fr)); }
.staffel-karte { display: flex; flex-direction: column; height: 100%; background: var(--flaeche); border-radius: var(--r-l); overflow: hidden; box-shadow: var(--schatten); transition: transform var(--kurz) var(--kurve), box-shadow var(--kurz) var(--kurve); }
.staffel-karte:hover { transform: translateY(-3px); box-shadow: var(--schatten-hoch); }
.staffel-karte:active { transform: translateY(0); }
.staffel-karte:focus-visible { border-radius: var(--r-l); }
.sk-bild { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--buehne) var(--raster); }
.sk-bild .bild { position: absolute; inset: 0; }
.sk-bild img { width: 100%; height: 100%; object-fit: cover; }
.sk-bild .schild { position: absolute; left: 14px; top: 14px; }
.sk-text { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 18px 20px; }
.sk-teil { font-size: var(--mini); font-weight: 700; color: var(--st-t); }
.sk-titel { font: 700 min(1.3125rem, max(8cqi, 1.125rem))/1.18 var(--f-display); letter-spacing: -0.015em; text-wrap: balance; }
.sk-versprechen { font-size: var(--klein); line-height: 1.45; color: var(--text-2); }
.sk-fuss { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--linie); display: grid; gap: 8px; font-size: var(--mini); font-weight: 600; color: var(--text-2); }
.sk-fuss .bausteine { --bh: 10px; }
.sk-stand .zustand { font-size: var(--mini); }
@container (max-width: 37.99em) { .sk-bild { aspect-ratio: 2 / 1; } }

/* Staffelseite: links Bogen und Umfang, rechts Kapitel und Staffel-Test. */
.zwei { display: grid; gap: var(--a6); align-items: start; }
.seite-links { display: grid; gap: var(--a5); }
@container (min-width: 56em) {
  .zwei { grid-template-columns: minmax(0, 20em) minmax(0, 1fr); }
  .seite-links { position: sticky; top: 76px; }
}
.umfang { display: grid; gap: 10px; padding: 0 4px; font-size: var(--klein); color: var(--text-2); }
.umfang li { display: flex; gap: 10px; align-items: flex-start; }
.umfang .icon { margin-top: 0.1em; color: var(--st-t); }
.umfang strong { color: var(--text); }

/* Lernzeilen: Nummernstein, Titel, ein Satz, Meta, Zustand (Symbol und Wort). */
.lern-zeile { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 1em; gap: 0 12px; align-items: center; min-height: 80px; padding: 14px 14px 14px 16px; }
.lern-zeile > .zeile-symbol { width: 44px; height: 44px; align-self: start; border-radius: 12px; border: 2.5px solid light-dark(var(--kontur), var(--rand)); background: var(--flaeche-2); color: var(--text); font: 800 1.0625rem/1 var(--f-display); }
.lern-zeile.ist-fertig > .zeile-symbol { background: var(--st-f); color: var(--tinte); }
.lern-zeile.ist-aktuell > .zeile-symbol { background: var(--karton); color: var(--tinte); border-color: var(--tinte); box-shadow: 0 3px 0 var(--kontur); }
.lern-zeile.ist-gesperrt > .zeile-symbol, .lern-zeile.ist-vorbereitung > .zeile-symbol { border: 2px dashed var(--rand); background: transparent; color: var(--text-2); }
.lern-zeile.ist-aktuell { background: color-mix(in srgb, var(--st-f) 15%, var(--flaeche)); }
.lern-zeile > .zustand { grid-column: 2; grid-row: 2; margin-top: 8px; justify-self: start; font-size: var(--klein); font-weight: 700; }
.lern-zeile > .pfeil { grid-column: 3; grid-row: 1; width: 1em; height: 1em; }
.lern-zeile .zustand-fertig { color: var(--gut); }
.lern-zeile .zeile-titel { font: 700 min(1.1875rem, max(9cqi, 1rem))/1.25 var(--f-display); letter-spacing: -0.01em; }
.zeile-marke { font-size: var(--mini); font-weight: 700; color: var(--st-t); }
.zeile-kurz { font-size: var(--klein); line-height: 1.45; color: var(--text-2); max-width: 46em; }
.lern-zeile .zeile-meta { margin-top: 3px; font-weight: 600; }
.lern-zeile + .zeile-zusatz { padding-left: 72px; }
@container (min-width: 38em) {
  .lern-zeile { grid-template-columns: 44px minmax(0, 1fr) auto 1.25em; gap: 0 var(--a4); padding: 16px 20px; }
  .lern-zeile > .zeile-symbol { align-self: center; }
  .lern-zeile > .zustand { grid-column: auto; grid-row: auto; margin-top: 0; }
  .lern-zeile > .pfeil { grid-column: auto; grid-row: auto; width: 1.25em; height: 1.25em; }
  .lern-zeile + .zeile-zusatz { padding-left: 80px; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes setzen { from { opacity: 0; transform: translateY(-8px) scale(0.86); } }
  .buehne .b-fertig, .buehne .b-laeuft { animation: setzen 460ms var(--kurve) backwards 150ms; }
}
@media (forced-colors: active) {
  .b-fertig { background: CanvasText; } .b-laeuft { background: linear-gradient(90deg, CanvasText 50%, Canvas 50%); }
  .buehne .bild { display: none; }
}
