/*
  Kursbereich im Stil von lass-schneiden.de (home2 / v12): Figtree, heller Grund #f4f4ef, weiße Karten mit großen
  Radien, dunkle Kopfzeile, Gelb (#ffe17c) nur für den nächsten Schritt.
  v3 nach einem Nutzertest mit drei Personen (Handy, Profi am großen Monitor, unsicher am Laptop):
  - eine Startseite (Kursübersicht) statt zwei, gleiche Namen in Menü und Zurück-Knöpfen
  - eine Zählweise (Lektion 7 von 27, 2 von 27 geschafft), ein Balken, Hinweis „zählt automatisch“
  - in der Lektion erst Prompts und Downloads, dann Text, am Ende Zurück und Weiter nebeneinander
  - ein Kartenstil, ein Raster, nichts steht ohne Bezug („hängt in der Luft“)
  - kleine Schrift und Grau etwas dunkler, damit sie auch mit Lesebrille gut lesbar sind
  Nur für den Kundenbereich (layout.php, layout_bare.php). Die Verwaltung nutzt app.css.
  Keine style-Attribute im HTML: die CSP erlaubt nur style-src 'self'. Fortschritt deshalb mit <progress>.
*/

@font-face { font-family: "Figtree"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin.woff2) format("woff2"); }

:root {
  --bg: #f4f4ef;
  --card: #ffffff;
  --soft: #f4f4ef;
  --line: #e2e2db;
  --line-2: #cfcfc5;
  --ink: #171e19;
  --ink-2: #2b332d;
  --muted: rgba(23, 30, 25, 0.74);
  --kick: rgba(23, 30, 25, 0.62);
  --dk: #0f1411;
  --dk-card: #171e19;
  --dk-card-2: #1f2722;
  --dk-line: rgba(255, 255, 255, 0.09);
  --dk-text: #f4f4ef;
  --dk-muted: rgba(244, 244, 239, 0.74);
  --mark: #ffe17c;
  --mark-hover: #ffd94f;
  --mark-2: #fff3c4;
  --mark-rgb: 255, 225, 124;
  --on-mark: #0f1411;
  --ok: #1f6f4a;
  --ok-soft: #e1efe7;
  --danger: #b9361b;
  --danger-soft: #fbe9e4;
  --r: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --gap: 24px;
  --gut: clamp(16px, 4vw, 40px);
  --side: 380px;
  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 1px 2px rgba(15, 20, 17, 0.04), 0 18px 40px -28px rgba(15, 20, 17, 0.28);
  --grid-d: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  color-scheme: light;
}

/* ---- Grundlagen ------------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 500 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
main { flex: 1; }
img, video { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--mark); color: var(--on-mark); font-weight: 700; text-decoration: none; }
.skip:focus { left: 12px; }
.inline { display: inline; margin: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--mark); color: var(--on-mark); }

.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 17px; height: 17px; }
.icon-xs { width: 14px; height: 14px; }

/* ---- Typografie --------------------------------------------------------------------------------------------------- */
.title { font-size: clamp(34px, 4.2vw, 56px); line-height: 1.04; font-weight: 800; letter-spacing: -0.04em; text-wrap: balance; }
.h2 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.12; font-weight: 800; letter-spacing: -0.03em; }
.h3 { font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.lead { margin-top: 12px; max-width: 46em; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.5; color: var(--muted); }
.greeting { margin-bottom: 10px; font-size: 17px; font-weight: 600; color: var(--muted); }
.kicker { font-size: 14px; font-weight: 700; color: var(--kick); letter-spacing: -0.005em; }
.kicker-dark { color: var(--mark); }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.2; vertical-align: middle; letter-spacing: 0; }
.tag-mark { background: var(--mark); color: var(--on-mark); }
code { font-size: 0.92em; padding: 2px 6px; border-radius: 6px; background: var(--soft); }

/* ---- Rahmen: ein Raster für alle Seiten ---------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gut)); margin-inline: auto; padding-inline: var(--gut); }
.page { padding-top: 40px; padding-bottom: 96px; }
.page-head { margin-bottom: 32px; }
.page-head .tag { margin-bottom: 14px; }
.section { margin-top: 48px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-note { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; color: var(--muted); }
.section > .h2 { margin-bottom: 20px; }
.card.section { margin-top: var(--gap); }
.split-2 { display: grid; gap: var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }

/* ---- Kopf und Fuß ------------------------------------------------------------------------------------------------- */
.top { background: var(--dk); color: var(--dk-text); border-bottom: 1px solid var(--dk-line); }
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -0.04em; color: var(--dk-text); text-decoration: none; white-space: nowrap; }
.logo-dark { color: var(--ink); }
.top-nav { display: flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 600; }
.top-nav a, .top-out { padding: 9px 14px; border-radius: 999px; color: var(--dk-muted); text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; transition: color 0.15s, background-color 0.15s; }
.top-nav a:hover, .top-out:hover { color: var(--dk-text); background: rgba(255, 255, 255, 0.07); }
.top-nav a[aria-current="page"] { color: var(--on-mark); background: var(--mark); }
.top-nav .top-admin { box-shadow: inset 0 0 0 1px var(--dk-line); }
.top-out { font-size: 15px; font-weight: 600; }
.nav-short { display: none; }

.flash { display: flex; justify-content: center; padding: 20px 16px 0; }
.flash > span { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--dk-text); font-size: 15px; font-weight: 600; box-shadow: var(--shadow); }
.flash .icon { color: var(--mark); }
.flash-inline { padding: 0 0 16px; }

.foot { margin-top: auto; border-top: 1px solid var(--line); }
.foot-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 24px; font-size: 14px; color: var(--muted); }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-marke { flex-basis: 100%; font-size: 12px; line-height: 1.5; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---- Knöpfe ------------------------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px;
  border: 0; background: var(--card); color: var(--ink); font: 700 15.5px/1 var(--sans); letter-spacing: -0.005em; text-decoration: none;
  white-space: nowrap; cursor: pointer; transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--mark); color: var(--on-mark); box-shadow: none; }
.btn-primary:hover { background: var(--mark-hover); box-shadow: 0 10px 24px -14px rgba(var(--mark-rgb), 0.9); }
.btn-ink { background: var(--ink); color: #fff; box-shadow: none; }
.btn-ink:hover { background: #2a332d; box-shadow: none; }
.btn-line { background: transparent; }
.btn-line-light { background: transparent; color: var(--dk-text); box-shadow: inset 0 0 0 1.5px rgba(244, 244, 239, 0.4); }
.btn-line-light:hover { box-shadow: inset 0 0 0 1.5px var(--dk-text); color: var(--dk-text); }
.btn-quiet { background: var(--soft); box-shadow: none; }
.btn-quiet:hover { background: var(--line); box-shadow: none; }
.btn-danger { background: transparent; color: var(--danger); box-shadow: inset 0 0 0 1.5px rgba(185, 54, 27, 0.35); }
.btn-danger:hover { background: var(--danger); color: #fff; box-shadow: none; }
.btn-lg { height: 58px; padding: 0 30px; font-size: 17px; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn .icon { width: 18px; height: 18px; }
.btn-lg .icon { width: 20px; height: 20px; }
.btn:disabled { opacity: 0.6; cursor: default; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-size: 15.5px; font-weight: 700; color: var(--ink); text-decoration: none; }
.link-arrow .icon { transition: transform 0.15s ease; }
.link-arrow:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---- Karten und Listen: ein Stil ---------------------------------------------------------------------------------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 30px; }
.card-pad > .h3 + * { margin-top: 16px; }
.card-pad > * + .btn-block, .card-pad > .rows + .btn-block { margin-top: 18px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.card-note { margin-top: 12px; }

.rows { display: grid; }
.card.rows { padding: 8px; }
.rows-flush { margin-inline: -12px; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); transition: background-color 0.15s; }
.row:hover { background: var(--soft); }
.row-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--ink); }
.row-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.row-text strong { font-size: 15.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.row-text span { font-size: 14px; color: var(--muted); }
.row-action { flex: none; font-size: 14px; font-weight: 700; text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 4px; }

/* Downloads: ganze Zeile klickbar, mit sichtbarem Knopf „Herunterladen“ */
.downloads { display: grid; gap: 10px; }
.download { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; border-radius: var(--r-md); background: var(--soft); text-decoration: none; color: var(--ink); transition: background-color 0.15s; }
.download:hover { background: var(--mark-2); }
.download .row-icon { background: var(--card); }
.download:hover .btn { background: #2a332d; }

/* Schritt-Nummer: gelb = jetzt, dunkel mit Haken = geschafft, Ring = offen */
.step-dot { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; font-size: 15px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.step-dot.is-here { background: var(--mark); color: var(--on-mark); }
.step-dot.is-done { background: var(--ink); color: var(--mark); }
.step-dot.is-open { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.step-dot-sm { width: 26px; height: 26px; font-size: 12.5px; }

/* Fortschritt: natives <progress> */
progress.meter { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--line); color: var(--ink); overflow: hidden; }
progress.meter::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress.meter::-webkit-progress-value { background: var(--ink); border-radius: 999px; transition: width 0.4s ease; }
progress.meter::-moz-progress-bar { background: var(--ink); border-radius: 999px; }
progress.meter-dark, progress.meter-dark::-webkit-progress-bar { background: rgba(255, 255, 255, 0.14); }
progress.meter-dark::-webkit-progress-value { background: var(--mark); }
progress.meter-dark::-moz-progress-bar { background: var(--mark); }

/* Häufige Fragen wie auf der Website: Plus im Kreis */
.faq { display: grid; }
.faq details + details { border-top: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; font-size: 16px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--soft); font-size: 18px; font-weight: 600; }
.faq details[open] summary::after { content: "–"; background: var(--mark); }
.faq details p { padding: 0 0 16px; color: var(--muted); font-size: 15.5px; }

/* Hilfe (gelb wie „Noch etwas offen?“ auf der Website) */
.help { display: grid; gap: 6px; padding: 28px 30px; border-radius: var(--r); background: var(--mark); color: var(--on-mark); }
.help-title { font-size: 21px; line-height: 1.15; font-weight: 800; letter-spacing: -0.03em; }
.help p { color: rgba(15, 20, 17, 0.78); }
.help .btn { margin-top: 12px; }

.empty-state { display: grid; justify-items: start; gap: 14px; padding: 40px; }

/* Titelbild (nur noch in der Kursliste bei mehreren Kursen) */
.cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-md); background: var(--dk-card-2); }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-designed { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 24px; background-color: var(--dk-card-2); background-image: var(--grid-d); background-size: 40px 40px; color: var(--dk-text); }
.cover-kicker { font-size: 13px; font-weight: 700; color: var(--mark); }
.cover-title { font-size: clamp(22px, 2.4vw, 32px); line-height: 1.05; font-weight: 800; letter-spacing: -0.035em; }
.cover-badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: var(--mark); color: var(--on-mark); font-size: 12.5px; font-weight: 700; }

.play-disc { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 999px; background: var(--mark); color: var(--on-mark); box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.6); transition: transform 0.2s ease; }
.play-disc .icon { width: 30px; height: 30px; margin-left: 4px; }
.play-disc-lg { width: 88px; height: 88px; }
.play-disc-lg .icon { width: 36px; height: 36px; }

/* ---- Kursübersicht: nächster Schritt ------------------------------------------------------------------------------ */
.hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) var(--side); align-items: stretch;
  border-radius: var(--r); background: var(--dk-card); color: var(--dk-text);
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grid-d); background-size: 56px 56px; -webkit-mask-image: radial-gradient(80% 100% at 15% 20%, #000 20%, transparent 85%); mask-image: radial-gradient(80% 100% at 15% 20%, #000 20%, transparent 85%); }
.hero::after { content: ""; position: absolute; z-index: -1; left: -10%; top: -40%; width: 60%; height: 130%; background: radial-gradient(closest-side, rgba(var(--mark-rgb), 0.12), transparent); pointer-events: none; }
.hero-main { padding: 40px 44px; }
.hero-title { margin-top: 10px; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; font-weight: 800; letter-spacing: -0.04em; text-wrap: balance; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 0; margin-top: 14px; font-size: 15.5px; color: var(--dk-muted); }
.hero-meta span + span::before { content: "·"; margin: 0 10px; color: rgba(244, 244, 239, 0.4); }
.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.hero-note { font-size: 15px; color: var(--dk-muted); }
.hero-stat { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 40px 36px; border-left: 1px solid var(--dk-line); background: rgba(255, 255, 255, 0.02); }
.hero-stat-big { font-size: 20px; font-weight: 700; color: var(--dk-muted); letter-spacing: -0.02em; }
.hero-stat-big strong { font-size: 52px; line-height: 1; font-weight: 800; letter-spacing: -0.05em; color: var(--dk-text); margin-right: 4px; }
.hero-stat-label { font-size: 16px; font-weight: 700; color: var(--dk-text); }
.hero-stat .meter { margin-top: 12px; }
.hero-stat-note { margin-top: 6px; font-size: 14.5px; color: var(--dk-muted); }

/* ---- Kursübersicht: Kapitel und Seitenleiste ---------------------------------------------------------------------- */
.crumbs { margin-bottom: 20px; }
.crumbs a, .crumb-back { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.crumbs a:hover, .crumb-back:hover { background: var(--mark); }

.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: var(--gap); align-items: start; }
.course-head { margin-top: 48px; }
.course-side { display: grid; gap: var(--gap); }
.side-sub { font-size: 14.5px; color: var(--muted); }
.card-pad > .h3 + .side-sub { margin-top: 4px; }
.side-sub + .rows { margin-top: 12px; }

.chapters { list-style: none; padding: 0; display: grid; gap: 12px; }
.chapter > details { border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.chapter.is-here > details { box-shadow: 0 0 0 2px var(--ink), var(--shadow); }
.chapter-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px; cursor: pointer; list-style: none; border-radius: var(--r); }
.chapter-head::-webkit-details-marker { display: none; }
.chapter-head:hover .chapter-chev { color: var(--ink); }
.chapter-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.chapter-kicker { font-size: 14px; font-weight: 700; color: var(--kick); }
.chapter.is-here .chapter-kicker { color: var(--ink); }
.chapter-title { font-size: 20px; line-height: 1.2; font-weight: 800; letter-spacing: -0.025em; }
.chapter-meta { font-size: 14.5px; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chapter-chev { color: var(--kick); transition: transform 0.2s ease; }
details[open] > summary .chapter-chev { transform: rotate(180deg); }
.chapter-desc { padding: 0 24px 10px 74px; color: var(--muted); }
.chapter .lessons { padding: 0 12px 12px; }

/* Lektionszeilen (Nummer = Lektion im ganzen Kurs) */
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lesson { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 10px 14px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); transition: background-color 0.15s; }
.lesson:hover { background: var(--soft); }
.lesson-state { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--muted); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lesson-check, .lesson-play { display: none; }
.lesson-play .icon { margin-left: 2px; }
.lesson:hover .lesson-num { display: none; }
.lesson:hover .lesson-play { display: grid; color: var(--ink); }
.lesson-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.lesson-flag { flex: none; padding: 5px 11px; border-radius: 999px; background: var(--ink); color: var(--mark); font-size: 13px; font-weight: 700; white-space: nowrap; }
.lesson-flag-soft { background: var(--soft); color: var(--ink); }
.lesson-extra { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--soft); color: var(--ink); }
.lesson-dur { flex: none; min-width: 44px; text-align: right; font-size: 14.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
/* geschafft */
.lesson.is-done .lesson-state { background: var(--ink); color: var(--mark); box-shadow: none; }
.lesson.is-done .lesson-num, .lesson.is-done:hover .lesson-num { display: none; }
.lesson.is-done .lesson-check { display: grid; }
.lesson.is-done:hover .lesson-play { display: none; }
/* angefangen: halber Ring */
.lesson.is-started .lesson-state { box-shadow: inset 0 0 0 2px var(--line-2); background: conic-gradient(var(--ink) 0 50%, transparent 0); color: var(--ink); }
.lesson.is-started .lesson-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--card); }
/* jetzt dran */
.lesson.is-next { background: var(--mark-2); }
.lesson.is-next:hover { background: #ffedab; }
.lesson.is-next .lesson-state { background: var(--mark); color: var(--on-mark); box-shadow: none; }
.lesson.is-next .lesson-num { display: none; }
.lesson.is-next .lesson-play { display: grid; }
.lesson.is-next .lesson-extra { background: var(--card); }
/* läuft gerade (Kursinhalt neben dem Video) */
.lesson.is-current, .lesson.is-current:hover { background: var(--ink); color: var(--dk-text); }
.lesson.is-current .lesson-state { background: var(--mark); color: var(--on-mark); box-shadow: none; }
.lesson.is-current .lesson-num, .lesson.is-current .lesson-check { display: none; }
.lesson.is-current .lesson-play { display: grid; }
.lesson.is-current .lesson-dur { color: var(--dk-muted); }

/* ---- Kursliste (mehrere Kurse) ------------------------------------------------------------------------------------ */
.course-cards { display: grid; gap: 16px; }
.course-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 28px 30px; }
.course-card-text { flex: 1; min-width: 240px; display: grid; gap: 8px; justify-items: start; }
.course-card .meter { max-width: 360px; margin-top: 4px; }

/* ---- Meine Kurse (Startseite) ------------------------------------------------------------------------------------- */
.picks { display: grid; gap: var(--gap); }
.pick { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 36px; align-items: center; padding: 20px; }
.pick-media { display: block; text-decoration: none; }
.pick-media .cover { border-radius: var(--r-md); }
.pick-body { display: grid; gap: 10px; justify-items: start; padding: 12px 16px 12px 0; }
.pick-title { font-size: clamp(30px, 3vw, 42px); line-height: 1.05; font-weight: 800; letter-spacing: -0.04em; }
.pick-title a { text-decoration: none; }
.pick-title a:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 4px; text-underline-offset: 6px; }
.pick-progress { display: grid; gap: 8px; width: 100%; max-width: 420px; margin-top: 10px; font-size: 15.5px; color: var(--muted); }
.pick-progress strong { color: var(--ink); }
.pick-next { font-size: 15.5px; color: var(--muted); }
.pick-next strong { color: var(--ink); }
.pick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: var(--gap); align-items: start; margin-top: var(--gap); }
.home-side { display: grid; gap: var(--gap); }
.tile { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); transition: box-shadow 0.15s; }
.tile:hover { box-shadow: inset 0 0 0 1.5px var(--ink), var(--shadow); }
.tile-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tile-text strong { font-size: 17px; font-weight: 800; letter-spacing: -0.015em; }
.tile-text span { font-size: 14.5px; color: var(--muted); }
.tile-go { color: var(--ink); transition: transform 0.15s ease; }
.tile:hover .tile-go { transform: translateX(3px); }

/* ---- Zusatzmodule: leicht abgesetzt (heller gelber Grund, Plus statt Nummer) ---------------------------------------- */
.bonus { margin-top: 32px; padding: 22px; border-radius: var(--r); background: var(--mark-2); }
.bonus-head { display: grid; gap: 6px; padding: 4px 6px 18px; }
.bonus-head .h3 { display: flex; align-items: center; gap: 10px; }
.bonus-note { font-size: 15px; color: rgba(15, 20, 17, 0.74); }
.step-dot.is-bonus { background: var(--mark-2); color: var(--on-mark); }
.chapter.is-bonus > details { box-shadow: 0 1px 2px rgba(15, 20, 17, 0.05); }
.side-divider { display: flex; align-items: center; gap: 8px; margin: 14px 10px 4px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 800; }
.side-chapter.is-bonus .side-chapter-kicker { color: var(--ink); }

/* ---- Prompts & Material ------------------------------------------------------------------------------------------- */
.search { position: relative; max-width: 640px; margin-bottom: 32px; }
.search .icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input[type="search"] { min-height: 58px; padding-left: 54px; border-radius: 999px; font-size: 17px; box-shadow: var(--shadow); border-color: transparent; }
.search-empty { margin: -12px 0 24px; font-weight: 600; color: var(--muted); }
.material-course { margin: 40px 0 16px; }
.material { display: grid; gap: 40px; }
.material-chapter { display: grid; gap: 12px; }
.material-chapter-title { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.material-item { display: grid; gap: 16px; }
.material-item-head { display: grid; gap: 2px; justify-items: start; }
.material-item-head .link-arrow { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }

/* ---- Lektion ------------------------------------------------------------------------------------------------------ */
.page-lesson { padding-top: 28px; }
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.lesson-pos { font-size: 15.5px; color: var(--muted); }
.lesson-pos strong { color: var(--ink); }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: var(--gap); align-items: start; }
.lesson-main { min-width: 0; display: grid; gap: var(--gap); }
.lesson-head { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.title-lesson { font-size: clamp(28px, 3vw, 40px); }

.player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r); background: #000; box-shadow: 0 0 0 1px rgba(15, 20, 17, 0.06), 0 30px 60px -34px rgba(15, 20, 17, 0.55); }
.player video { width: 100%; height: 100%; background: #000; }
.poster { display: none; }
.js .poster { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer; background: rgba(10, 12, 11, 0.28); transition: background-color 0.2s; }
.js .poster:hover { background: rgba(10, 12, 11, 0.12); }
.poster:hover .play-disc { transform: scale(1.06); }
.poster:focus { outline: none; }
.poster:focus-visible .play-disc { outline: 3px solid #fff; outline-offset: 4px; }
.poster-chip { position: absolute; left: 20px; bottom: 20px; padding: 8px 14px; border-radius: 999px; background: rgba(15, 20, 17, 0.82); color: #fff; font-size: 14.5px; font-weight: 700; }

.end-card { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; background: rgba(15, 20, 17, 0.92); color: var(--dk-text); }
.end-card-ok { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 999px; background: var(--mark); color: var(--on-mark); }
.end-card-title { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -0.03em; }
.end-card-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Geschafft-Zeile direkt unter dem Video */
/* Unter dem Video: Titel links, Geschafft rechts, Hinweis darunter */
.lesson-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head done" "hint hint"; align-items: end; gap: 14px 24px; padding: 26px 30px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.lesson-info .done-btn { background: var(--soft); box-shadow: none; }
.lesson-info .done-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.lesson-info .done-btn.is-done { background: var(--ok-soft); }
.lesson-info .done-hint { padding-top: 14px; border-top: 1px solid var(--line); }
.lesson-info .lesson-head { grid-area: head; }
.lesson-info .done-btn { grid-area: done; }
.lesson-info .done-hint { grid-area: hint; }
.done-btn { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 20px 0 14px; border: 0; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-size: 16px; font-weight: 700; cursor: pointer; }
.done-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink), var(--shadow); }
.done-box { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--line-2); color: transparent; transition: background-color 0.15s, color 0.15s; }
.done-btn.is-done .done-box { background: var(--ink); color: var(--mark); box-shadow: none; }
.done-hint { display: flex; align-items: flex-start; gap: 6px; font-size: 14.5px; color: var(--muted); }
.done-hint .icon { margin-top: 4px; }

.prompt-hint { margin-top: 20px; font-size: 15px; font-weight: 600; color: var(--muted); }
.downloads + .prompt-hint { margin-top: 24px; }
.lesson-prompt { margin-top: 12px; }
.lesson-prompt + .lesson-prompt { margin-top: 18px; }

/* Zurück und Weiter nebeneinander am Ende */
.lesson-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; }
.nav-card { display: flex; align-items: center; gap: 16px; min-height: 92px; padding: 18px 22px; border-radius: var(--r-md); text-decoration: none; color: var(--ink); transition: background-color 0.15s; }
.nav-card-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.nav-card-text strong { font-size: 18px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.nav-card-go { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; transition: transform 0.15s ease; }
.nav-card-prev { background: var(--card); box-shadow: var(--shadow); }
.nav-card-prev .nav-card-go { background: var(--soft); }
.nav-card-prev:hover .nav-card-go { transform: translateX(-3px); }
.nav-card-next { background: var(--mark); color: var(--on-mark); }
.nav-card-next:hover { background: var(--mark-hover); }
.nav-card-next .kicker { color: rgba(15, 20, 17, 0.72); }
.nav-card-next .nav-card-go { background: var(--ink); color: var(--mark); }
.nav-card-next:hover .nav-card-go { transform: translateX(3px); }

/* Text unter dem Video */
.prose { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.prose > * { margin: 0 0 0.9em; max-width: 70ch; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin-top: 1.4em; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.025em; color: var(--ink); }
.prose h3 { margin-top: 1.3em; font-size: 18px; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.prose > h2:first-child, .prose > h3:first-child { margin-top: 0; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose li::marker { color: var(--kick); }
.prose a { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.note { padding: 16px 20px; border-radius: 16px; background: var(--mark-2); color: var(--ink); font-size: 16px; }
.lesson-prompt h2, .lesson-prompt h3 { margin: 0 0 8px; font-size: 16.5px; }

/* Prompts zum Kopieren */
.codeblock { max-width: none !important; overflow: hidden; border-radius: 18px; background: var(--dk-card); color: var(--dk-text); }
.codeblock-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--dk-line); font-size: 14px; font-weight: 700; color: var(--dk-muted); }
.copy-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--mark); color: var(--on-mark); font: 700 14.5px/1 var(--sans); cursor: pointer; }
.copy-btn:hover { background: var(--mark-hover); }
.copy-btn.is-copied { background: #fff; }
.codeblock pre { margin: 0; padding: 18px; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.codeblock pre, .codeblock code { font: 500 16px/1.6 var(--sans); padding: 0; background: none; }
.codeblock pre { padding: 18px; }

/* Kursinhalt neben dem Video: Kapitel als Kopfzeile, Lektionen eingerückt */
.lesson-side { position: sticky; top: 24px; }
.side-card { padding: 22px 14px 14px; max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; }
.side-head { display: grid; gap: 8px; padding: 0 10px 18px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.side-title { font-size: 17px; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; }
.side-title:hover { text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.side-progress { font-size: 14.5px; color: var(--muted); }
.side-progress strong { color: var(--ink); }
.side-chapters { display: grid; gap: 2px; }
.side-chapter > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "kick count chev" "title count chev"; align-items: center; column-gap: 10px; padding: 12px 10px; border-radius: var(--r-sm); cursor: pointer; list-style: none; }
.side-chapter > summary::-webkit-details-marker { display: none; }
.side-chapter > summary:hover { background: var(--soft); }
.side-chapter-kicker { grid-area: kick; font-size: 12.5px; font-weight: 700; color: var(--kick); }
.side-chapter-title { grid-area: title; font-size: 15.5px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.side-chapter-count { grid-area: count; display: inline-flex; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.side-chapter.is-done .side-chapter-count { color: var(--ink); }
.side-chapter .chapter-chev { grid-area: chev; }
.side-chapter.is-here > summary .side-chapter-kicker { color: var(--ink); }
.lessons-compact { margin: 0 0 8px 10px; padding-left: 10px; border-left: 2px solid var(--line); }
.lessons-compact .lesson { gap: 10px; min-height: 0; padding: 8px 10px; }
.lessons-compact .lesson-state { width: 26px; height: 26px; font-size: 12px; }
.lessons-compact .lesson.is-started .lesson-num { width: 19px; height: 19px; }
.lessons-compact .lesson-title { font-size: 14.5px; font-weight: 600; }
.lessons-compact .lesson.is-current .lesson-title { font-weight: 700; }
.lessons-compact .lesson-flag, .lessons-compact .lesson-extra { display: none; }
.lessons-compact .lesson-dur { min-width: 0; font-size: 13px; }

/* Beta-Feedback */
.block-head { display: flex; align-items: center; gap: 12px; }
.feedback-form { display: grid; gap: 14px; margin-top: 16px; }
.rating { display: flex; flex-wrap: wrap; gap: 8px; border: 0; margin: 0; padding: 0; }
.rating-opt { position: relative; cursor: pointer; }
.rating-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rating-opt span { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--soft); font-size: 15.5px; font-weight: 700; transition: background-color 0.15s, color 0.15s; }
.rating-opt:hover span { background: var(--line); }
.rating-opt input:checked + span { background: var(--ink); color: #fff; }
.rating-opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.feedback-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.form-msg:empty { display: none; }
.form-msg { font-weight: 600; }
.form-msg.is-error { color: var(--danger); }
.feedback-list { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 18px; }
.feedback-list:empty { display: none; }
.feedback-item { padding: 14px 16px; border-radius: 16px; background: var(--soft); }
.feedback-item-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feedback-text { margin-top: 6px; color: var(--ink-2); overflow-wrap: anywhere; }
.push { margin-left: auto; }
.time-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; }
button.time-chip:hover { background: var(--mark); color: var(--on-mark); }
.rating-tag { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.rating-tag.rating-gut { background: var(--ok-soft); color: var(--ok); }
.rating-tag.rating-mittel { background: var(--mark-2); color: #6b5300; }
.rating-tag.rating-schlecht { background: var(--danger-soft); color: var(--danger); }
.iconbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; }
.iconbtn:hover { background: var(--card); color: var(--danger); }

/* ---- Formulare ---------------------------------------------------------------------------------------------------- */
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; font-size: 15px; font-weight: 700; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, select {
  width: 100%; min-width: 0; min-height: 52px; padding: 13px 16px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink); font: 500 16px/1.4 var(--sans); transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(var(--mark-rgb), 0.6); }
.check { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.alert { padding: 14px 18px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.page-head + .alert { margin: -12px 0 24px; }

.kv { display: grid; gap: 14px; margin-bottom: 24px; }
.kv dt { font-size: 14px; font-weight: 700; color: var(--kick); }
.kv dd { margin-top: 2px; font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.kv dd .muted { font-weight: 500; font-size: 14.5px; }

.more { margin-top: 24px; border-top: 1px solid var(--line); }
.more > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 0; font-weight: 700; cursor: pointer; list-style: none; }
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after { content: "+"; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--soft); font-size: 18px; font-weight: 600; }
.more[open] > summary::after { content: "–"; }
.more-body { margin-top: 18px; }

.devices { list-style: none; padding: 0; display: grid; gap: 4px; margin: 16px 0 0; }
.devices li { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.devices li + li { border-top: 1px solid var(--line); }

.options { display: grid; gap: 16px; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 20px; border-radius: var(--r-md); background: var(--soft); }
.option-title { font-size: 17px; font-weight: 800; letter-spacing: -0.015em; }
.option p { margin-top: 4px; max-width: 40em; }
.option-danger { box-shadow: inset 0 0 0 1.5px rgba(185, 54, 27, 0.25); background: #fff; }
.option-danger .option-title { color: var(--danger); }
.option-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; width: 100%; }
.option-form .field { flex: 1; min-width: 220px; }

/* ---- Login und schlichte Seiten ----------------------------------------------------------------------------------- */
.bare { background: var(--bg); }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; padding: 40px 48px 0; background: var(--dk); color: var(--dk-text); }
.auth-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--grid-d); background-size: 56px 56px; -webkit-mask-image: radial-gradient(70% 70% at 40% 30%, #000 30%, transparent 85%); mask-image: radial-gradient(70% 70% at 40% 30%, #000 30%, transparent 85%); }
.auth-art-body { margin-top: clamp(40px, 8vh, 96px); }
.auth-art-title { font-size: clamp(44px, 4.6vw, 72px); line-height: 1; font-weight: 800; letter-spacing: -0.045em; }
.auth-art-title span { color: var(--mark); }
.auth-art-text { margin-top: 18px; max-width: 26em; font-size: 18px; color: var(--dk-muted); }
.auth-photo { position: relative; margin-top: auto; height: min(52vh, 460px); }
.auth-photo-panel { position: absolute; left: 0; right: 0; bottom: -28px; height: 72%; border-radius: var(--r) var(--r) 0 0; background: var(--mark); }
.auth-photo img { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; width: auto; max-width: none; object-fit: contain; }
.auth-side { display: flex; flex-direction: column; padding: 32px var(--gut); }
.auth-logo { display: none; }
.auth-center { flex: 1; display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 460px; margin-inline: auto; padding-block: 32px; }
.auth-card { display: grid; gap: 16px; padding: 40px; border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.auth-card .h2 { font-size: clamp(28px, 2.6vw, 34px); line-height: 1.08; font-weight: 800; letter-spacing: -0.035em; }
.auth-card .muted { font-size: 16.5px; }
.auth-form { display: grid; gap: 16px; margin-top: 4px; }
.input-icon { position: relative; display: block; }
.input-icon .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 48px; }
.auth-steps { list-style: none; padding: 16px 0 0; display: grid; gap: 10px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.auth-steps li { display: flex; align-items: center; gap: 12px; }
.auth-foot { text-align: center; }
.auth-foot a, .auth-card a:not(.btn) { font-weight: 700; color: var(--ink); text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 3px; text-underline-offset: 3px; }
.auth-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 999px; background: var(--mark); color: var(--on-mark); }
.auth-icon .icon { width: 26px; height: 26px; }
.auth-mail { color: var(--ink); overflow-wrap: anywhere; }
.dev-box { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--mark-2); }
.auth-legal { display: flex; justify-content: center; gap: 20px; font-size: 14px; }
.auth-legal a { color: var(--muted); text-decoration: none; }
.auth-legal a:hover { color: var(--ink); text-decoration: underline; }

/* ---- Kleinere Bildschirme ----------------------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .course-layout, .lesson-grid { grid-template-columns: minmax(0, 1fr); }
  .lesson-side { position: static; }
  .side-card { max-height: none; }
  .course-side, .home-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .course-side .help { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-logo { display: block; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-stat { border-left: 0; border-top: 1px solid var(--dk-line); padding: 24px 44px 32px; }
  .split-2 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pick { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px; }
  .pick-body { padding: 10px 8px 12px; }
}

@media (max-width: 720px) {
  :root { --r: 24px; --r-md: 18px; --gap: 16px; }
  body { font-size: 16px; }
  .page { padding-top: 24px; padding-bottom: 64px; }
  .page-head { margin-bottom: 24px; }
  .section { margin-top: 36px; }
  .top-bar { min-height: 60px; gap: 8px; }
  .logo { font-size: 17px; }
  .top-nav { gap: 2px; font-size: 14.5px; }
  .top-nav a, .top-out { padding: 8px 11px; font-size: 14.5px; }
  .top-admin, .top-out { display: none; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .card-pad { padding: 22px; }
  .card-pad > .h3 + * { margin-top: 14px; }

  .hero-main { padding: 24px 22px; }
  .hero-actions { margin-top: 22px; }
  .hero-actions .btn { width: 100%; }
  .hero-meta { font-size: 14.5px; }
  .hero-stat { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: baseline; column-gap: 10px; padding: 18px 22px 22px; }
  .hero-stat-big strong { font-size: 32px; }
  .hero-stat-big { font-size: 16px; }
  .hero-stat .meter { flex-basis: 100%; margin-top: 8px; }
  .hero-stat-note { flex-basis: 100%; margin-top: 2px; }

  .course-head { margin-top: 36px; }
  .course-side, .home-side { grid-template-columns: minmax(0, 1fr); }
  .pick-actions { width: 100%; }
  .pick-actions .btn { width: 100%; }
  .pick-media.is-designed { display: none; }
  .bonus { padding: 14px; margin-top: 24px; }
  .chapter-head { gap: 12px; padding: 16px; }
  .chapter-title { font-size: 17.5px; }
  .chapter-dur { display: none; }
  .chapter-meta { font-size: 13.5px; }
  .chapter-desc { padding: 0 16px 8px; }
  .chapter .lessons { padding: 0 6px 8px; }
  .lesson { gap: 12px; padding: 10px; }
  .lesson-title { font-size: 15.5px; }
  .lesson-extra { display: none; }
  .lesson-flag { padding: 4px 9px; font-size: 12px; }
  .help { padding: 22px; }
  .empty-state { padding: 24px; }
  .course-card { padding: 22px; }
  .course-card .btn { width: 100%; }

  .search input[type="search"] { min-height: 52px; font-size: 16px; }
  .material { gap: 28px; }
  .download { flex-wrap: wrap; padding: 12px; }
  .download .btn { width: 100%; }

  .page-lesson { padding-top: 16px; }
  .lesson-top { margin-bottom: 18px; }
  .lesson-pos { font-size: 14.5px; }
  .player { margin-inline: calc(-1 * var(--gut)); border-radius: 0; }
  .play-disc-lg { width: 68px; height: 68px; }
  .play-disc-lg .icon { width: 28px; height: 28px; }
  .poster-chip { left: 12px; bottom: 12px; font-size: 13.5px; }
  .lesson-info { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "done" "hint"; align-items: stretch; padding: 20px 22px; }
  .done-btn { width: 100%; justify-content: center; }
  .done-hint { font-size: 14px; }
  .lesson-nav { grid-template-columns: minmax(0, 1fr); }
  .nav-card-next { order: -1; }
  .nav-card { min-height: 80px; padding: 14px 16px; }
  .nav-card-text strong { font-size: 16.5px; }
  .nav-card-go { width: 42px; height: 42px; }
  .end-card { gap: 10px; padding: 16px; }
  .end-card-ok { width: 40px; height: 40px; }
  .end-card-title { font-size: 20px; }
  .end-card .btn-lg { height: 48px; font-size: 15px; padding-inline: 18px; }
  .end-card .btn-line-light { height: 40px; font-size: 14px; }
  .prose { font-size: 16.5px; }
  .codeblock pre, .codeblock code { font-size: 15px; }
  .codeblock pre { padding: 14px; }

  .auth-side { padding: 20px var(--gut); }
  .auth-card { padding: 26px 22px; }
  .option { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---- Darstellung „Mit Bildern“: Vorschaubild je Kapitel ----------------------------------------------------------- */
.thumb { position: relative; isolation: isolate; flex: none; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; width: 172px; aspect-ratio: 16 / 9; padding: 10px 12px; border-radius: var(--r-sm); overflow: hidden; }
.thumb img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; }
.thumb-dark { background-color: var(--dk-card); background-image: var(--grid-d); background-size: 24px 24px; color: var(--dk-text); }
.thumb-dark .thumb-kick { color: var(--mark); }
.thumb-mark { background: var(--mark); color: var(--on-mark); }
.thumb-mark .thumb-kick { color: rgba(15, 20, 17, 0.66); }
.thumb-bonus { background: var(--mark-2); color: var(--on-mark); box-shadow: inset 0 0 0 1.5px rgba(15, 20, 17, 0.08); }
.thumb-bonus .thumb-kick { color: rgba(15, 20, 17, 0.66); }
.thumb-kick { font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.thumb-title { font-size: 16px; line-height: 1.05; font-weight: 800; letter-spacing: -0.025em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb-done { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--ink); color: var(--mark); }
.thumb.has-img { padding: 0; }

.chapter.is-pic .chapter-head { padding: 14px 22px 14px 14px; gap: 18px; }
.chapter.is-pic .chapter-desc { padding: 0 24px 10px; }
.chapter.is-pic .chapter-title { font-size: 21px; }
.chapter.is-pic.is-here > details { box-shadow: 0 0 0 2px var(--ink), var(--shadow); }

.side-chapter > summary.has-thumb { grid-template-columns: 92px minmax(0, 1fr) auto auto; grid-template-areas: "thumb kick count chev" "thumb title count chev"; column-gap: 12px; padding: 8px; }
.side-chapter > summary.has-thumb .thumb { grid-area: thumb; width: 92px; padding: 6px 8px; border-radius: 10px; }
.side-chapter > summary.has-thumb .thumb-kick { display: none; }
.side-chapter > summary.has-thumb .thumb-title { font-size: 11px; }
.side-chapter > summary.has-thumb .thumb-done { top: 4px; right: 4px; width: 18px; height: 18px; }
.side-chapter > summary.has-thumb .thumb-done .icon { width: 11px; height: 11px; }
.side-chapter.is-here > summary.has-thumb { background: var(--mark-2); }

@media (max-width: 720px) {
  .thumb { width: 116px; padding: 8px 9px; border-radius: 10px; }
  .thumb-kick { display: none; }
  .thumb-title { font-size: 12.5px; }
  .chapter.is-pic .chapter-head { padding: 10px 14px 10px 10px; gap: 12px; }
  .chapter.is-pic .chapter-title { font-size: 16.5px; }
}

/* Kursinhalt neben dem Video, Darstellung „Liste“: Nummernkreis statt „Kapitel n“, Linien zwischen den Kapiteln,
   Lektionen hängen an einer Linie unter dem Kreis */
.side-chapter + .side-chapter { border-top: 1px solid var(--line); }
.side-chapter > summary.has-dot { grid-template-columns: 26px minmax(0, 1fr) auto auto; grid-template-areas: "dot title count chev"; column-gap: 12px; padding: 13px 10px; }
.side-chapter > summary.has-dot .step-dot { grid-area: dot; }
.side-chapter > summary.has-dot .side-chapter-title { font-size: 15px; }
.side-chapter.is-here > summary.has-dot { background: var(--soft); }
.side-chapter.is-done > summary.has-dot .side-chapter-title { color: var(--ink-2); font-weight: 700; }
.side-chapter-count { min-width: 30px; justify-content: flex-end; }
.side-chapter[open] > .lessons-compact { margin: 2px 0 10px 22px; padding-left: 12px; }
.side-divider + .side-chapter { border-top: 0; }

/* Seitenleiste: das offene Kapitel ist eine ruhige Fläche mit seinen Lektionen, ohne Linie links. Die Nummern der
   Lektionen stehen unter dem Kapitelkreis, die laufende Lektion ist eine weiße Karte statt eines schwarzen Balkens. */
.side-chapter[open] { background: var(--soft); border-radius: var(--r-sm); border-top-color: transparent; }
.side-chapter[open] + .side-chapter { border-top-color: transparent; }
.side-chapter.is-here > summary.has-dot, .side-chapter.is-here > summary.has-thumb { background: none; }
.side-chapter > summary:hover { background: rgba(23, 30, 25, 0.04); }
.lessons-compact, .side-chapter[open] > .lessons-compact { margin: 0; padding: 0 6px 8px; border-left: 0; gap: 2px; }
.lessons-compact .lesson { padding: 8px 8px 8px 4px; }
.lessons-compact .lesson:hover { background: rgba(255, 255, 255, 0.7); }
.lessons-compact .lesson.is-current, .lessons-compact .lesson.is-current:hover { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 20, 17, 0.06), 0 8px 18px -12px rgba(15, 20, 17, 0.3); }
.lessons-compact .lesson.is-current .lesson-title { color: var(--ink); font-weight: 800; }
.lessons-compact .lesson.is-current .lesson-dur { color: var(--muted); }
.lessons-compact .lesson.is-done .lesson-title { color: var(--muted); }

/* ---- Prompts & Material: Werkzeugleiste, Dateikarten, Prompt-Karten im Raster ------------------------------------- */
.mat-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 36px; }
.mat-toolbar .search { flex: 1; min-width: 260px; margin: 0; }
.mat-chips { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); }
.mat-chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 700 15px/1 var(--sans); cursor: pointer; }
.mat-chip span { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 12.5px; }
.mat-chip:hover { color: var(--ink); }
.mat-chip[aria-pressed="true"] { background: var(--ink); color: #fff; }
.mat-chip[aria-pressed="true"] span { background: var(--mark); color: var(--on-mark); }
.mat-section + .mat-section { margin-top: 48px; }
.mat-section-title { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -0.025em; }
.mat-section-title .icon { display: grid; place-items: center; width: 34px; height: 34px; padding: 8px; border-radius: 999px; background: var(--mark); color: var(--on-mark); }
.mat-section-note { margin: 6px 0 0 44px; font-size: 15px; color: var(--muted); }
.mat-section > .file-grid { margin-top: 18px; }

.file-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.file-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-content: start; padding: 22px; }
.file-card-icon { display: grid; place-items: center; width: 56px; height: 64px; border-radius: 12px; background: var(--soft); box-shadow: inset 0 -4px 0 var(--mark); font-size: 13px; font-weight: 800; letter-spacing: 0.02em; }
.file-card-text { display: grid; gap: 2px; align-content: start; min-width: 0; }
.file-card-text h3 { font-size: 17.5px; line-height: 1.25; font-weight: 800; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.file-card-text p { font-size: 14px; color: var(--muted); }
.file-card .btn { grid-column: 1 / -1; margin-top: 4px; }
.from-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: none; overflow-wrap: anywhere; }
.from-link:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--mark); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.prompt-group { margin-top: 28px; }
.prompt-group-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 16px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink-2); }
.prompt-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); align-items: start; }
.pcard { display: grid; gap: 12px; padding: 20px 22px; }
.pcard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pcard-head h4 { font-size: 17px; line-height: 1.25; font-weight: 800; letter-spacing: -0.015em; }
.pcard-text { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--soft); white-space: pre-wrap; word-break: break-word; }
.pcard-text code { font: 500 15.5px/1.55 var(--sans); padding: 0; background: none; color: var(--ink); }
.pcard .copy-btn.is-copied { background: var(--ink); color: var(--mark); }
.pcard .from-link { margin-top: 0; }

@media (max-width: 720px) {
  .mat-toolbar { margin-bottom: 28px; }
  .mat-chips { width: 100%; justify-content: space-between; }
  .mat-chip { flex: 1; justify-content: center; padding: 0 10px; }
  .prompt-grid, .file-grid { grid-template-columns: minmax(0, 1fr); }
  .mat-section-note { margin-left: 0; }
}

/* ---- Neu im Kurs (Startseite) ----------------------------------------------------------------------------- */
/* Ruhige Liste unter der Kurskarte. Neues seit dem letzten Besuch: hellgelber Grund und gelbes „Neu“. */
.news { margin-top: var(--gap); }
.news-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.news-note { font-size: 14.5px; color: var(--muted); }
.news-list { display: grid; gap: 2px; margin: 0 -12px; padding: 0; list-style: none; }
.news-item { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); transition: background-color 0.15s; }
.news-item:hover { background: var(--soft); }
.news-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--ink); }
.news-item.is-fresh .news-icon { background: var(--mark); color: var(--on-mark); }
.news-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.news-meta { font-size: 13.5px; color: var(--muted); }
.news-meta strong { color: var(--ink); font-weight: 700; }
.news-title { font-size: 16.5px; font-weight: 800; line-height: 1.3; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.news-body { font-size: 15px; color: var(--muted); line-height: 1.45; }
.news-fresh { flex: none; }
.news-go { flex: none; color: var(--ink); transition: transform 0.15s ease; }
.news-item:hover .news-go { transform: translateX(3px); }
.news-older { margin-top: 8px; border-top: 1px solid var(--line); }
.news-older summary { display: inline-flex; align-items: center; gap: 8px; padding: 14px 0 6px; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.news-older summary::-webkit-details-marker { display: none; }
.news-older summary::after { content: "+"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 999px; background: var(--soft); font-weight: 600; }
.news-older[open] summary::after { content: "–"; }
.news-older .news-list { margin-top: 6px; }
/* Kursübersicht: frische Meldung an der Lektion */
.tag-news { margin-left: 4px; padding: 2px 8px; font-size: 12px; }

@media (max-width: 720px) {
  .news-item { align-items: flex-start; gap: 12px; }
  .news-icon { width: 36px; height: 36px; }
  .news-go { display: none; }
}

/* Bunny-Video lädt nicht (hls-player.js) */
.player-error { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; margin: 0; padding: 10px 14px; background: rgba(10, 12, 11, 0.86); color: #fff; }
.player-error[hidden] { display: none; }

/* Rückfrage-Dialog (app.js, ask): Abmelden, Löschen. Eigene Klassen, damit er im Kurs- und im Verwaltungsbereich
   gleich aussieht (2026-11-09). */
.ask { width: min(420px, calc(100vw - 32px)); max-width: none; margin: auto; padding: 28px 28px 24px; border: 0; border-radius: 24px; background: #fff; color: #171e19; box-shadow: 0 30px 80px -20px rgba(15, 20, 17, 0.5); font: inherit; }
.ask::backdrop { background: rgba(15, 20, 17, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.ask-text { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 700; letter-spacing: -0.01em; }
.ask-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.ask-btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 20px; border: 0; border-radius: 999px; font-family: inherit; font-size: 15.5px; font-weight: 700; line-height: 1; cursor: pointer; background: #f4f4ef; color: #171e19; }
.ask-btn:hover { background: #e8e8e1; }
.ask-btn:focus-visible { outline: 3px solid rgba(255, 216, 77, 0.9); outline-offset: 2px; }
.ask-yes.is-normal { background: #ffd84d; color: #171e19; }
.ask-yes.is-normal:hover { background: #f5cc33; }
.ask-yes.is-danger { background: #b9361b; color: #fff; }
.ask-yes.is-danger:hover { background: #9e2d16; }
@media (max-width: 480px) { .ask-actions .ask-btn { flex: 1 1 0; } }

/* ---- Hilfe (/hilfe, seit 2026-11-11) --------------------------------------------------------------------------------
   Übersicht: großes Suchfeld, Artikel als Karten nach Thema. Artikel: Bild „So sieht es aus“, Ursache, nummerierte
   Schritte mit Bildern, „Hat nicht geklappt?“. Startseite und Kursübersicht: Suchfeld im gelben Hilfe-Kasten. */
.help-head { margin-bottom: 24px; }
.help-search { max-width: 760px; margin-bottom: 44px; }
.help-cat + .help-cat { margin-top: 40px; }
.help-cat-title { margin-bottom: 14px; font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--kick); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.help-card { display: flex; align-items: center; gap: 16px; padding: 22px 24px; text-decoration: none; color: var(--ink); transition: box-shadow 0.15s; }
.help-card:hover { box-shadow: inset 0 0 0 1.5px var(--ink), var(--shadow); }
.help-card:hover .tile-go { transform: translateX(3px); }
.help-card-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.help-card-text strong { font-size: 17px; font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.help-card-text span { font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.help-none { display: grid; justify-items: start; gap: 12px; margin-top: 8px; }
.help-foot { margin-top: 56px; max-width: 760px; }
.help-foot .btn { justify-self: start; }
.help-quick { display: flex; gap: 8px; margin-top: 12px; }
.help-quick input { flex: 1; min-width: 0; min-height: 48px; border-radius: 999px; border-color: transparent; background: #fff; color: var(--ink); }
.help-quick .btn { margin-top: 0; flex: none; }
.help-mail { margin-top: 10px; font-size: 14px; }
.help-mail a { color: inherit; font-weight: 700; }

.help-art { max-width: 860px; }
.help-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 15px; font-weight: 700; color: var(--muted); text-decoration: none; }
.help-back:hover { color: var(--ink); }
.help-shot { margin: 0; }
.help-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line), var(--shadow); background: #1e1e1e; }
.help-see { margin-bottom: 24px; }
.help-see figcaption { margin-bottom: 10px; font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--kick); }
.help-cause p { margin-top: 10px; font-size: 17px; line-height: 1.55; }
.help-steps { margin-top: 40px; }
.help-steps ol { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: schritt; }
.help-step { counter-increment: schritt; position: relative; padding-left: 78px; }
.help-step::before { content: counter(schritt); position: absolute; left: 26px; top: 26px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--mark); color: var(--on-mark); font-weight: 800; font-size: 16px; }
.help-step p { font-size: 17px; line-height: 1.55; }
.help-step .help-shot { margin-top: 18px; }
.help-step code, .help-cause code { padding: 2px 7px; border-radius: 6px; background: var(--soft); font-size: 0.92em; }
.help-still { margin-top: 28px; display: grid; justify-items: start; gap: 12px; }
.help-related { margin-top: 56px; }
@media (max-width: 640px) {
  .help-search { margin-bottom: 32px; }
  .help-card { padding: 18px 18px; }
  .help-step { padding: 22px 20px 22px 64px; }
  .help-step::before { left: 18px; top: 22px; width: 30px; height: 30px; font-size: 15px; }
  .help-step p, .help-cause p { font-size: 16px; }
  .help-step .help-shot { margin-left: -46px; }
  .help-shot img { border-radius: 14px; }
  .help-quick { flex-direction: column; }
}

/* Nutzungsbedingungen bestätigen (/bedingungen, 2026-11-14) */
.terms-list { list-style: disc; padding-left: 22px; gap: 8px; }
.terms-list li { display: list-item; line-height: 1.45; }
.terms-check { align-items: flex-start; font-size: 15.5px; line-height: 1.45; }
.terms-check input { margin-top: 3px; flex: none; }
.terms-check a { text-decoration: underline; text-underline-offset: 2px; }
.terms-check.is-error span { color: var(--danger); }
