/* 4one LMS – Design-System „Lernfreundlich“
   Klare Kanten ohne Radien, helle ruhige Flächen, feine Linien, eine gut lesbare Schrift
   (Atkinson Hyperlegible Next) mit wenig Fett. Hauptfarbe Petrol, getönte Flächen statt Signalfarben.
   Die Kundenmarke steuert --brand, Ecken-Stil, Schrift und Navigation. */

@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/assets/fonts/atkinson-next.woff') format('woff'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('/assets/fonts/atkinson-next-italic.woff') format('woff'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('/assets/fonts/lora.woff') format('woff'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/assets/fonts/poppins-Regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/assets/fonts/poppins-Medium.woff') format('woff'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url('/assets/fonts/poppins-Bold.woff') format('woff'); font-weight: 700; font-display: swap; }

:root {
  /* Marke */
  --brand: #1F6F6B; --brand-ink: #fff; --accent: #E8865F;
  --brand-hover: color-mix(in srgb, var(--brand) 86%, black);
  --brand-soft: color-mix(in srgb, var(--brand) 12%, white);
  --brand-soft-2: color-mix(in srgb, var(--brand) 6%, white);
  --brand-line: color-mix(in srgb, var(--brand) 35%, white);
  --brand-deep: color-mix(in srgb, var(--brand) 80%, black);
  --link: var(--brand);
  /* Neutral */
  --ink: #24302E; --ink-2: #4A5653; --ink-3: #6A7774; --ink-4: #9AA5A2;
  --canvas: #F3F5F4; --surface: #FFFFFF; --surface-2: #F8FAF9; --fill: #F0F3F2; --fill-2: #E7ECEA;
  --line: #DDE3E1; --line-2: #E7ECEA;
  /* Status (gedämpft, lernfreundlich) */
  --ok: #2B6E4F; --ok-mark: #3A8A5F; --ok-soft: #E3F1EA;
  --warn: #7E5410; --warn-mark: #E0A23A; --warn-soft: #FCEFD9;
  --bad: #9A3E1E; --bad-mark: #E8865F; --bad-soft: #FBEDE6; --info-soft: var(--brand-soft);
  /* Typografie */
  --font: 'Atkinson Hyperlegible Next', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: var(--font);
  /* Form: keine Radien */
  --r: 0px; --r-btn: 0px; --r-chip: 0px;
  --shadow-pop: 0 10px 30px rgba(36, 48, 46, .14), 0 0 0 1px var(--line);
  --ease: cubic-bezier(.4, 0, .2, 1);
  --sidebar-w: 248px; --topbar-h: 72px;
  --side-bg: #FFFFFF; --side-ink: var(--ink); --side-ink-2: var(--ink-3); --side-icon: var(--ink-3); --side-hover: var(--fill);
  --side-active-bg: var(--brand-soft); --side-active-ink: var(--brand-deep); --side-active-icon: var(--brand); --side-line: var(--line);
}
:root[data-radius='rounded'] { --r: 8px; --r-btn: 8px; --r-chip: 6px; }
:root[data-radius='pill'] { --r: 12px; --r-btn: 999px; --r-chip: 999px; }
:root[data-font='serif'] { --font-display: 'Lora', Georgia, serif; }
:root[data-font='rounded'] { --font: 'Poppins', sans-serif; --font-display: 'Poppins', sans-serif; }
:root[data-font='humanist'] { --font: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; --font-display: var(--font); }
:root[data-sidebar='dark'] { --side-bg: #24302E; --side-ink: #EEF2F1; --side-ink-2: #9AA5A2; --side-icon: #9AA5A2; --side-hover: rgba(255,255,255,.06); --side-active-bg: rgba(255,255,255,.12); --side-active-ink: #fff; --side-active-icon: #fff; --side-line: #24302E; }
:root[data-sidebar='brand'] { --side-bg: var(--brand-deep); --side-ink: #fff; --side-ink-2: rgba(255,255,255,.7); --side-icon: rgba(255,255,255,.75); --side-hover: rgba(255,255,255,.08); --side-active-bg: rgba(255,255,255,.16); --side-active-ink: #fff; --side-active-icon: #fff; --side-line: var(--brand-deep); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 500; color: var(--ink); }
h1 { font-size: 36px; line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: 20px; line-height: 1.25; letter-spacing: -0.005em; }
h3 { font-size: 16px; line-height: 1.3; }
p { margin: 0 0 .8em; }
b, strong { font-weight: 600; }
.num, .tnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink-3); }
.small { font-size: 13.5px; }
.xs { font-size: 12.5px; }
.strong { font-weight: 500; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hide { display: none !important; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 24px; height: 24px; }

/* ---------- Shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--side-bg); border-right: 1px solid var(--side-line); display: flex; flex-direction: column; color: var(--side-ink); z-index: 30; }
.brandmark { height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; color: var(--side-ink); font-weight: 500; font-size: 16px; }
.brandmark img { max-height: 32px; max-width: 160px; object-fit: contain; }
.brandmark .logo-dot { width: 32px; height: 32px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 600; font-size: 15px; border-radius: var(--r); }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 20px; }
.nav-group { margin-top: 18px; }
.nav-group:first-child { margin-top: 4px; }
.nav-title { font-size: 12px; color: var(--side-ink-2); padding: 0 12px 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin: 1px 0; color: var(--side-ink); font-size: 14.5px; text-decoration: none; border-radius: var(--r); }
.nav a svg { color: var(--side-icon); }
.nav a:hover { background: var(--side-hover); }
.nav a.active { background: var(--side-active-bg); color: var(--side-active-ink); font-weight: 500; }
.nav a.active svg { color: var(--side-active-icon); }
.nav a .count { margin-left: auto; font-size: 12.5px; padding: 0 7px; background: var(--bad-soft); color: var(--bad); font-weight: 500; font-variant-numeric: tabular-nums; border-radius: var(--r-chip); }
.side-foot { padding: 16px 24px 20px; font-size: 12.5px; color: var(--side-ink-2); border-top: 1px solid var(--side-line); }
.side-foot .strong { color: var(--side-ink); }
.side-foot a { color: inherit; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 16px; padding: 0 40px; background: var(--canvas); border-bottom: 1px solid transparent; transition: border-color .2s var(--ease); }
.topbar.scrolled { border-bottom-color: var(--line); }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { width: 100%; height: 44px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px 0 42px; font: inherit; font-size: 15px; color: var(--ink); border-radius: var(--r); }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.search > svg { position: absolute; left: 14px; top: 13px; color: var(--ink-3); }
.search-results { position: absolute; top: 50px; left: 0; right: 0; background: var(--surface); box-shadow: var(--shadow-pop); padding: 6px; max-height: 70vh; overflow: auto; }
.search-results a { display: flex; gap: 12px; padding: 9px 10px; color: var(--ink); text-decoration: none; align-items: center; }
.search-results a:hover, .search-results a.sel { background: var(--brand-soft); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; border-radius: var(--r); }
.icon-btn:hover { background: var(--fill-2); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 6px; right: 5px; min-width: 18px; height: 18px; padding: 0 5px; background: var(--bad-mark); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; border-radius: var(--r-chip); }
.user-btn { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 4px; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 14.5px; color: var(--ink); border-radius: var(--r); }
.user-btn:hover { background: var(--fill-2); }
.avatar { width: 36px; height: 36px; background: var(--brand-soft); color: var(--brand-deep); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; border-radius: var(--r); }
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.menu-burger { display: none; }
.content { padding: 8px 40px 72px; max-width: 1320px; width: 100%; }
.banner { background: var(--warn-soft); color: var(--warn); padding: 10px 40px; font-size: 14px; }

/* ---------- Popover ---------- */
.popover { position: absolute; top: calc(var(--topbar-h) - 8px); right: 32px; width: 380px; max-height: 72vh; overflow: auto; background: var(--surface); box-shadow: var(--shadow-pop); z-index: 50; animation: drop .18s var(--ease); }
.popover.narrow { width: 280px; }
.popover header { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 18px 12px; }
@keyframes drop { from { opacity: 0; transform: translateY(-4px); } }
.menu-list { padding: 6px; }
.demo-switch { padding: 10px 6px 8px; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); max-height: 46vh; overflow: auto; }
.demo-switch > div { padding: 0 12px 6px; text-transform: uppercase; letter-spacing: .04em; }
.demo-switch button { display: flex; width: 100%; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 12px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.demo-switch button:hover { background: var(--brand-soft); }
.demo-switch button.on { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); font-weight: 600; }
.menu-list a, .menu-list button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; font: inherit; font-size: 14.5px; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: var(--brand-soft); }
.notif { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line-2); color: var(--ink); text-decoration: none; }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif.unread { background: var(--brand-soft-2); }
.notif .ico { width: 32px; height: 32px; background: var(--fill); display: grid; place-items: center; color: var(--ink-2); flex: none; }

/* ---------- Seitenkopf ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 16px 0 28px; flex-wrap: wrap; }
.page-head p { color: var(--ink-2); margin: 8px 0 0; max-width: 64ch; font-size: 16px; }
.crumbs { font-size: 13.5px; color: var(--ink-3); margin: 8px 0 14px; display: flex; gap: 6px; align-items: center; }
.crumbs svg { width: 13px; height: 13px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border: 1px solid transparent; font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none !important; white-space: nowrap; border-radius: var(--r-btn); transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--ink-4); }
.btn-ghost { background: transparent; color: var(--link); padding: 0 12px; }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #F0CDBF; }
.btn-danger:hover { background: var(--bad-soft); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn-sm.btn-ghost { padding: 0 10px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 16px; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn-block { width: 100%; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--link); cursor: pointer; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Kacheln & Raster ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.card-pad { padding: 26px 28px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 24px 28px 0; }
.card-head + .card-body { padding-top: 16px; }
.card-head a.small, .section-title a.small { font-size: 14px; }
.card-body { padding: 22px 28px 26px; }
.card-foot { padding: 14px 28px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.card.flat { border-color: transparent; background: var(--fill); }
.card.tint { border-color: transparent; background: var(--brand-soft); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); align-items: start; }
.g-side { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; } .mt32 { margin-top: 32px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; } .mb24 { margin-bottom: 24px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 40px 0 16px; }
.section-title h2 { font-size: 22px; }

/* ---------- Kennzahlen ---------- */
.kpi { padding: 22px 24px; }
.kpi .label { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.kpi .label svg { display: none; }
.kpi .value { font-size: 40px; font-weight: 500; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -0.01em; }
.kpi .value small { font-size: 22px; color: var(--ink-2); margin-left: 3px; font-weight: 500; }
.kpi .sub { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
.kpi.alert { background: var(--bad-soft); border-color: transparent; }
.kpi.alert .label, .kpi.alert .sub { color: var(--bad); }
.kpi.alert .value { color: var(--bad); }

/* ---------- Startseite: Begrüssung + Als Nächstes ---------- */
.welcome { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; margin-bottom: 16px; }
.hero { background: var(--surface); border: 1px solid var(--line); padding: 36px 36px 30px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; border-radius: var(--r); }
.hero .date { font-size: 14px; color: var(--ink-3); }
.hero h1 { font-size: 44px; line-height: 1.1; position: relative; }
.hero p { margin: 0; font-size: 18px; color: var(--ink-2); max-width: 32em; position: relative; }
.hero-stats { display: flex; gap: 36px; margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; position: relative; }
.hero-stats div { font-size: 13px; color: var(--ink-3); }
.hero-stats b { display: block; font-size: 28px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.hero.has-img { color: #fff; border: 0; }
.hero.has-img::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(20,28,27,.78), rgba(20,28,27,.35)); }
.hero.has-img > :not(img) { z-index: 2; }
.hero.has-img h1, .hero.has-img .hero-stats b { color: #fff; }
.hero.has-img p, .hero.has-img .date, .hero.has-img .hero-stats div { color: rgba(255,255,255,.85); }
.hero.has-img .hero-stats { border-color: rgba(255,255,255,.25); }
.hero img.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.next-up { background: var(--brand-soft); padding: 32px; display: flex; flex-direction: column; gap: 12px; border-radius: var(--r); }
.next-up .eyebrow { font-size: 14px; color: var(--brand-deep); font-weight: 500; }
.next-up .title { font-size: 24px; font-weight: 500; line-height: 1.25; color: var(--ink); }
.next-up .meta { font-size: 15px; color: var(--ink-2); }
.next-up .progress { background: color-mix(in srgb, var(--brand) 18%, white); height: 6px; }
.next-up .btn { align-self: flex-start; margin-top: auto; }

/* ---------- Fahrplan (Fälligkeiten) ---------- */
.timetable { list-style: none; margin: 0; padding: 0; }
.timetable li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 12px 28px; border-top: 1px solid var(--line-2); }
.timetable li:first-child { border-top: 0; }
.tt-date { width: 64px; height: 60px; background: var(--fill); color: var(--ink); display: flex; flex-direction: column; justify-content: center; align-items: center; line-height: 1.1; font-variant-numeric: tabular-nums; border-radius: var(--r); }
.tt-date b { font-size: 22px; font-weight: 500; display: block; }
.tt-date span { font-size: 12px; }
.tt-date.over { background: var(--bad-soft); color: var(--bad); }
.tt-date.soon { background: var(--brand-soft); color: var(--brand-deep); }
.tt-date.none b { font-size: 16px; }
.tt-title { font-weight: 500; color: var(--ink); font-size: 16px; }
.tt-title:hover { color: var(--brand); }
.tt-meta { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); margin-top: 2px; flex-wrap: wrap; }
.tt-meta svg { width: 14px; height: 14px; }
.tt-due { font-size: 13.5px; color: var(--ink-3); white-space: nowrap; }
.tt-due.over { color: var(--bad); }

/* ---------- Kurs-Kacheln ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.ccard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; transition: border-color .15s var(--ease); border-radius: var(--r); overflow: hidden; }
.ccard:hover { border-color: var(--brand-line); }
.ccover { height: 128px; position: relative; background: color-mix(in srgb, var(--c, var(--brand)) 13%, white); display: grid; place-items: center; overflow: hidden; }
.ccover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ccover .badge-top { position: absolute; top: 12px; left: 12px; }
.app-icon { display: grid; place-items: center; color: color-mix(in srgb, var(--c, var(--brand)) 85%, black); flex: none; }
.app-icon svg { width: 48px; height: 48px; stroke-width: 1.3; }
.app-icon.lg { width: 96px; height: 96px; background: color-mix(in srgb, var(--c, var(--brand)) 13%, white); border-radius: var(--r); }
.app-icon.lg svg { width: 48px; height: 48px; }
.app-icon.sm svg { width: 20px; height: 20px; }
.cbody { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.cbody .eyebrow { font-size: 13px; color: color-mix(in srgb, var(--c, var(--brand)) 85%, black); }
.cbody h3 { font-size: 17px; line-height: 1.3; font-weight: 500; }
.cmeta { display: flex; gap: 14px; color: var(--ink-3); font-size: 13px; margin-top: auto; padding-top: 10px; align-items: center; flex-wrap: wrap; }
.cmeta span { display: inline-flex; gap: 5px; align-items: center; }
.cmeta svg { width: 14px; height: 14px; }

/* ---------- Chips & Badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; font-size: 12.5px; font-weight: 500; background: var(--fill); color: var(--ink-2); white-space: nowrap; border-radius: var(--r-chip); }
.chip svg { width: 13px; height: 13px; }
.chip.brand { background: var(--brand-soft); color: var(--brand-deep); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.dark { background: var(--surface); color: var(--ink); }
.chip.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.dotlabel { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; }
.dotlabel::before { content: ''; width: 10px; height: 10px; background: var(--d, var(--ink-4)); }

/* ---------- Fortschritt ---------- */
.row > .progress { flex: 1; }
.progress { height: 4px; background: var(--fill-2); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); }
.progress.ok > i { background: var(--ok-mark); }
.progress.lg { height: 8px; }
.ring { --p: 0; --s: 44px; width: var(--s); height: var(--s); border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--fill-2) 0); display: grid; place-items: center; flex: none; }
.ring::after { content: attr(data-label); width: calc(var(--s) - 8px); height: calc(var(--s) - 8px); border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; font-weight: 500; font-size: 13px; color: var(--ink-3); padding: 14px 16px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
table.t th:first-child, table.t td:first-child { padding-left: 28px; }
table.t th:last-child, table.t td:last-child { padding-right: 28px; }
table.t td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t tr.click { cursor: pointer; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person .n { font-weight: 500; color: var(--ink); }
.person .e { font-size: 13px; color: var(--ink-3); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field > label, .lbl { font-size: 14px; font-weight: 500; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--ink-3); }
.input, .select, .textarea { width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--surface); padding: 9px 14px; font: inherit; font-size: 15px; color: var(--ink); border-radius: var(--r); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
.textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13.5px; min-height: 420px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.input[readonly] { background: var(--fill); color: var(--ink-2); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236A7774' stroke-width='1.6'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.input-sm { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; padding: 5px 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 42px; height: 24px; background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line); position: relative; cursor: pointer; transition: background .2s var(--ease); margin: 0; flex: none; border-radius: var(--r-chip); }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); transition: transform .2s var(--ease); border-radius: var(--r-chip); }
.switch input:checked { background: var(--brand); box-shadow: none; }
.switch input:checked::after { transform: translateX(18px); box-shadow: none; }
.seg { display: inline-flex; border: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; border-radius: var(--r); overflow: hidden; }
.seg button, .seg a { border: 0; background: transparent; padding: 8px 16px; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; text-decoration: none !important; }
.seg button + button, .seg a + a { box-shadow: -1px 0 0 var(--line); }
.seg .on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 500; }
.seg.nowrap { flex-wrap: nowrap; }
.seg.nowrap span { padding: 5px 10px !important; font-size: 13px !important; white-space: nowrap; }
.seg.nowrap span.on { background: var(--brand-soft); color: var(--brand-deep); }
.ed-side .seg { display: flex; }
.ed-side .seg button { padding: 7px 8px; font-size: 13px; flex: 1; }
.color-input { display: flex; gap: 8px; align-items: center; }
.color-input input[type=color] { width: 44px; height: 44px; border: 1px solid var(--line); padding: 3px; background: var(--surface); cursor: pointer; }
.err-msg { background: var(--bad-soft); color: var(--bad); padding: 12px 16px; font-size: 14.5px; margin-bottom: 16px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; }
.tabs a { padding: 12px 16px; color: var(--ink-2); font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; display: inline-flex; gap: 8px; align-items: center; }
.tabs a svg { width: 15px; height: 15px; color: var(--ink-3); }
.tabs a .chip { height: 20px; padding: 0 7px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--brand-deep); border-bottom-color: var(--brand); font-weight: 500; }
.tabs a.on svg { color: var(--brand); }

/* ---------- Modal / Toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(36, 48, 46, .4); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--surface); width: 100%; max-width: 580px; box-shadow: 0 24px 60px rgba(36,48,46,.25); animation: pop .2s var(--ease); border-radius: var(--r); }
.modal.wide { max-width: 840px; }
.modal-head { padding: 26px 30px 4px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-head h2 { font-size: 22px; }
.modal-head p { color: var(--ink-2); margin: 6px 0 0; font-size: 15px; }
.modal-body { padding: 20px 30px 8px; }
.modal-foot { padding: 16px 30px 24px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line-2); margin-top: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; font-size: 14.5px; box-shadow: 0 8px 24px rgba(0,0,0,.2); display: flex; align-items: center; gap: 10px; animation: pop .2s var(--ease); max-width: 90vw; border-radius: var(--r); }
.toast svg { color: #8FD3B4; }
.toast.err { background: var(--bad); }
.toast.err svg { color: #fff; }

/* ---------- Leerzustände ---------- */
.empty { text-align: center; padding: 52px 24px; color: var(--ink-2); }
.empty .ico { width: 56px; height: 56px; margin: 0 auto 16px; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); border-radius: var(--r); }
.empty h3 { font-size: 18px; margin-bottom: 6px; color: var(--ink); font-weight: 500; }
.empty p { max-width: 44ch; margin: 0 auto 18px; font-size: 15px; }
.skeleton { height: 120px; background: linear-gradient(90deg, var(--fill-2), var(--surface-2), var(--fill-2)); background-size: 200% 100%; animation: sk 1.3s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- Listen ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 13px 28px; border-top: 1px solid var(--line-2); display: flex; align-items: center; gap: 14px; }
.list > li:first-child { border-top: 0; }
.list.compact > li { padding: 11px 24px; }
.lico { width: 36px; height: 36px; display: grid; place-items: center; background: var(--fill); color: var(--ink-2); flex: none; border-radius: var(--r); }
.lico svg { width: 17px; height: 17px; }
.lico.brand { background: var(--brand-soft); color: var(--brand-deep); }

/* ---------- Balken (Reports) ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 140px minmax(0, 1fr) 46px; gap: 12px; align-items: center; font-size: 14.5px; }
.bar-track { height: 10px; background: var(--fill-2); overflow: hidden; display: flex; }
.bar-track i { display: block; height: 100%; }
.columns { display: flex; align-items: flex-end; gap: 16px; height: 170px; padding-top: 12px; }
.columns .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.columns .col i { width: 100%; max-width: 44px; background: var(--brand); min-height: 2px; }
.columns .col span { font-size: 13px; color: var(--ink-3); }
.columns .col b { font-size: 13.5px; font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- Setup-Assistent ---------- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); font-size: 15px; }
.steps li:first-child { border-top: 0; }
.steps li::before { counter-increment: s; content: counter(s); width: 28px; height: 28px; background: var(--fill); display: grid; place-items: center; font-size: 13px; font-weight: 500; color: var(--ink-2); flex: none; }
.steps li.done::before { content: '✓'; background: var(--ok-soft); color: var(--ok); }
.steps li.done a { color: var(--ink-3); }

/* ---------- Kursdetail & Player ---------- */
.course-hero { background: var(--surface); border: 1px solid var(--line); padding: 36px; margin-bottom: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 32px; align-items: start; border-radius: var(--r); }
.course-hero > .app-icon, .course-hero > img { grid-row: span 4; }
.course-hero > img { width: 220px; height: 150px; object-fit: cover; border-radius: var(--r) !important; margin: 0 !important; }
.course-hero h1 { font-size: 40px; line-height: 1.12; max-width: 24ch; }
.course-hero p { color: var(--ink-2); max-width: 46em; margin: 10px 0 0; font-size: 18px; }
.course-hero .row-wrap { margin-bottom: 12px; }
.course-hero .hero-cta { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.course-hero .more { font-size: 15px !important; }
.outline-mod { padding: 16px 28px; border-top: 1px solid var(--line-2); }
.outline-mod:first-child { border-top: 0; }
.outline-mod h4 { font-size: 14px; margin-bottom: 8px; color: var(--ink-2); }
.outline-les { display: flex; align-items: center; gap: 12px; padding: 6px 0; font-size: 15px; color: var(--ink); }
.outline-les .tick { width: 20px; height: 20px; box-shadow: inset 0 0 0 1.5px var(--line); flex: none; display: grid; place-items: center; }
.outline-les.done .tick { background: var(--ok-mark); box-shadow: none; color: #fff; }
.outline-les .tick svg { width: 12px; height: 12px; stroke-width: 2.4; }

.player { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 100vh; background: var(--surface); }
.player-side { border-right: 1px solid var(--line); background: var(--canvas); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.player-side .ps-head { padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.player-side .mod { padding: 14px 12px 6px; }
.player-side .mod-title { font-size: 13px; color: var(--ink-3); padding: 0 10px 6px; }
.player-side a.les { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: var(--ink); font-size: 14.5px; text-decoration: none; }
.player-side a.les:hover { background: var(--fill-2); }
.player-side a.les.on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 500; }
.player-side a.les.done .tick { background: var(--ok-mark); box-shadow: none; color: #fff; }
.player-side .tick { width: 18px; height: 18px; box-shadow: inset 0 0 0 1.5px var(--ink-4); flex: none; display: grid; place-items: center; }
.player-side .tick svg { width: 11px; height: 11px; stroke-width: 2.6; }
.player-top #tog { display: none; }
#view:focus { outline: none; }
.player-main { display: flex; flex-direction: column; min-width: 0; }
.player-top { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 5; }
.player-body { flex: 1; padding: 52px 28px 88px; }
.lesson { max-width: 720px; margin: 0 auto; }
.lesson > h1 { font-size: 40px; margin-bottom: 32px; }
.player-nav { max-width: 720px; margin: 44px auto 0; display: flex; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }

/* Bausteine */
.blk { margin: 0 0 24px; }
.blk-heading h2 { font-size: 26px; margin-top: 8px; }
.blk-text { font-size: 18px; line-height: 1.7; color: var(--ink); }
.blk-text p:last-child { margin-bottom: 0; }
.blk-callout { display: flex; gap: 14px; padding: 18px 20px; background: var(--brand-soft); font-size: 16.5px; line-height: 1.6; }
.blk-callout.success { background: var(--ok-soft); } .blk-callout.warning { background: var(--warn-soft); } .blk-callout.danger { background: var(--bad-soft); }
.blk-callout svg { margin-top: 3px; color: var(--brand-deep); }
.blk-callout.success svg { color: var(--ok); } .blk-callout.warning svg { color: var(--warn); } .blk-callout.danger svg { color: var(--bad); }
.blk-list ul, .blk-list ol { padding-left: 24px; margin: 0; }
.blk-list li { margin: 5px 0; }
.blk-image figure { margin: 0; } .blk-image img { width: 100%; } .blk-image figcaption { font-size: 14px; color: var(--ink-3); margin-top: 8px; }
.blk-video .vid { position: relative; padding-top: 56.25%; overflow: hidden; background: #000; }
.blk-video iframe, .blk-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.blk-divider { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.acc { border: 1px solid var(--line); }
.acc details { border-top: 1px solid var(--line); } .acc details:first-child { border-top: 0; }
.acc summary { padding: 15px 18px; cursor: pointer; font-weight: 500; font-size: 16px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: '+'; font-size: 22px; color: var(--brand); font-weight: 300; line-height: 1; }
.acc details[open] summary::after { content: '−'; }
.acc details[open] summary { background: var(--brand-soft-2); }
.acc details > div { padding: 4px 18px 16px; color: var(--ink-2); line-height: 1.65; }
.flash { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.flash button { min-height: 140px; border: 1px solid var(--line); background: var(--surface); padding: 20px; font: inherit; cursor: pointer; text-align: left; display: flex; flex-direction: column; justify-content: center; color: var(--ink); transition: background .2s var(--ease); }
.flash button b { font-size: 17px; font-weight: 500; }
.flash button.flipped { background: var(--brand-soft); border-color: var(--brand-line); }
.flash button .back { display: none; line-height: 1.55; font-size: 15px; }
.flash button.flipped .front { display: none; } .flash button.flipped .back { display: block; }
.flash button .front { display: flex; flex-direction: column; gap: 8px; }
.flash .hint { display: block; font-size: 12.5px; color: var(--ink-3); }
.checklist label { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; font-size: 16px; }
.checklist input { width: 20px; height: 20px; accent-color: var(--brand); }
.quiz { border: 1px solid var(--line); padding: 24px; background: var(--surface-2); }
.quiz .q { font-weight: 500; font-size: 18px; margin-bottom: 14px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border: 1px solid var(--line); margin-bottom: 8px; background: var(--surface); cursor: pointer; font-size: 16px; transition: border-color .15s var(--ease); }
.opt:hover { border-color: var(--ink-4); }
.opt:has(input:checked) { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.opt input { accent-color: var(--brand); width: 18px; height: 18px; margin: 0; }
.opt.right { border-color: var(--ok-mark); background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok-mark); }
.opt.wrong { border-color: var(--bad-mark); background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad-mark); }
.quiz .fb { margin-top: 12px; padding: 13px 16px; font-size: 15px; }
.quiz .fb.ok { background: var(--ok-soft); } .quiz .fb.no { background: var(--bad-soft); }
.file-dl { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.done-screen { text-align: center; max-width: 540px; margin: 40px auto; }
.done-screen h1 { font-size: 40px; }
.done-screen .big { width: 88px; height: 88px; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 22px; }
.done-screen .big svg { width: 40px; height: 40px; stroke-width: 2; }
.done-screen p { font-size: 17px; }

/* ---------- Editor ---------- */
.editor { display: grid; grid-template-columns: 270px minmax(0, 1fr) 340px; grid-template-rows: auto 1fr; gap: 0; min-height: calc(100vh - var(--topbar-h)); margin: -8px -40px -72px; align-items: start; }
.ed-bar { position: sticky; top: var(--topbar-h); z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); grid-column: 1 / -1; min-height: 62px; }
.ed-tree { background: var(--surface); padding: 16px 12px; overflow-y: auto; position: sticky; top: calc(var(--topbar-h) + 62px); height: calc(100vh - var(--topbar-h) - 62px); border-right: 1px solid var(--line); }
.ed-tree .mod { margin-bottom: 14px; }
.ed-tree .mod-h { display: flex; align-items: center; gap: 6px; padding: 4px 6px; color: var(--ink-3); }
.ed-tree .mod-h input { border: 0; background: transparent; font: inherit; font-weight: 500; font-size: 13.5px; flex: 1; min-width: 0; padding: 4px; color: var(--ink-2); }
.ed-tree .mod-h input:focus { background: var(--fill); outline: none; color: var(--ink); }
.ed-tree .les { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 14.5px; color: var(--ink); cursor: pointer; }
.ed-tree .les svg { color: var(--ink-3); }
.ed-tree .les:hover { background: var(--fill); }
.ed-tree .les.on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 500; }
.ed-tree .les.on svg { color: var(--brand); }
.ed-tree .les .tools, .ed-tree .mod-h .tools { margin-left: auto; display: none; gap: 2px; }
.ed-tree .les:hover .tools, .ed-tree .mod-h:hover .tools { display: flex; }
.mini { width: 26px; height: 26px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-3); cursor: pointer; padding: 0; }
.mini:hover { background: var(--fill-2); color: var(--ink); }
.mini svg { width: 14px; height: 14px; }
.ed-canvas { background: var(--canvas); padding: 32px 40px 120px; min-width: 0; }
.ed-paper { max-width: 780px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); padding: 44px 52px 52px; }
.ed-paper .lesson-title { border: 0; font-family: var(--font-display); font-size: 32px; font-weight: 500; width: 100%; padding: 4px 0; margin-bottom: 20px; color: var(--ink); background: transparent; }
.ed-paper .lesson-title:focus { outline: none; box-shadow: inset 0 -2px 0 var(--brand-soft); }
.eblk { position: relative; border: 1px solid transparent; padding: 10px 14px; margin: 0 -15px 6px; }
.eblk:hover { border-color: var(--line); }
.eblk.sel { border-color: var(--brand); background: var(--brand-soft-2); }
.eblk .etools { position: absolute; top: -15px; right: 12px; display: none; gap: 0; background: var(--surface); border: 1px solid var(--line); }
.eblk:hover .etools, .eblk.sel .etools { display: flex; }
.eblk .etype { position: absolute; top: -11px; left: 12px; font-size: 11.5px; font-weight: 500; color: #fff; background: var(--brand); padding: 1px 8px; display: none; }
.eblk.sel .etype { display: block; }
.eblk textarea.inline, .eblk input.inline { width: 100%; border: 0; background: transparent; font: inherit; color: inherit; resize: none; padding: 0; line-height: inherit; }
.eblk textarea.inline:focus, .eblk input.inline:focus { outline: none; }
.add-blk { display: flex; justify-content: center; margin: 16px 0; }
.blk-palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.blk-palette button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 500; color: var(--ink); text-align: left; }
.blk-palette button svg { color: var(--brand); }
.blk-palette button:hover { border-color: var(--brand); background: var(--brand-soft-2); }
.blk-palette button span { font-weight: 400; color: var(--ink-3); font-size: 13px; }
.ed-side { background: var(--surface); padding: 20px 22px; overflow-y: auto; position: sticky; top: calc(var(--topbar-h) + 62px); height: calc(100vh - var(--topbar-h) - 62px); border-left: 1px solid var(--line); }
.ed-side h3 { font-size: 15px; margin-bottom: 12px; }
.comment { padding: 12px 0; border-top: 1px solid var(--line-2); font-size: 14.5px; }
.comment:first-child { border-top: 0; }
.comment .who { display: flex; gap: 8px; align-items: center; font-size: 13.5px; margin-bottom: 4px; }
.comment.resolved { opacity: .55; }
.opt-edit { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.opt-edit input[type=text] { flex: 1; }
form[data-att] { overflow-x: auto; }

/* ---------- Wiki ---------- */
.prose { font-size: 16.5px; line-height: 1.75; color: var(--ink); max-width: 72ch; }
.prose h1 { font-size: 34px; margin: 0 0 20px; }
.prose h2 { font-size: 23px; margin: 34px 0 12px; }
.prose h3 { font-size: 18px; margin: 24px 0 8px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 18px 0; padding: 14px 20px; background: var(--brand-soft); color: var(--ink); }
.prose code { background: var(--fill); padding: 2px 6px; font-size: .9em; }
.prose pre { background: var(--ink); color: #EEF2F1; padding: 16px; overflow-x: auto; font-size: 13.5px; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 14px; text-align: left; }
.prose th { background: var(--fill); font-weight: 500; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.prose img { margin: 12px 0; }
.space-card { display: flex; gap: 16px; padding: 22px; color: var(--ink); text-decoration: none !important; }
.space-card:hover { border-color: var(--brand-line); }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: flex; flex-direction: column; background: var(--canvas); }
.auth-top { height: 72px; display: flex; align-items: center; justify-content: center; font-size: 16px; gap: 10px; background: var(--surface); border-bottom: 1px solid var(--line); }
.auth-top img { max-height: 32px; }
.auth-banner { width: 100%; max-height: 280px; object-fit: cover; }
.auth-form { flex: 1; display: flex; justify-content: center; padding: 56px 24px 48px; }
.auth-form .inner { width: 100%; max-width: 460px; background: var(--surface); border: 1px solid var(--line); padding: 40px 40px 36px; align-self: flex-start; }
.auth-form .brand-icon { margin: 0 0 22px; width: 64px !important; height: 64px !important; }
.auth-form .brand-icon svg { width: 32px !important; height: 32px !important; }
.auth-form h1 { font-size: 32px; margin: 0 0 8px; }
.auth-form .lead { color: var(--ink-2); font-size: 16px; margin-bottom: 28px; }
.auth-form .input { min-height: 48px; font-size: 16px; }
.acc-list .acc { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; }
.acc-list .acc:hover { border-color: var(--brand); background: var(--brand-soft); }
.acc-list .acc svg { color: var(--ink-3); flex: none; }
.demo-logins { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.auth-foot { padding: 20px; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ---------- Branding-Vorschau ---------- */
.preview-frame { border: 1px solid var(--line); overflow: hidden; background: var(--canvas); }
.pv-top { height: 44px; display: flex; align-items: center; padding: 0 16px; gap: 8px; background: var(--surface); border-bottom: 1px solid var(--line); font-weight: 500; font-size: 14px; }
.pv-body { display: grid; grid-template-columns: 140px 1fr; min-height: 290px; }
.pv-side { padding: 12px 8px; font-size: 13px; border-right: 1px solid var(--line); }
.pv-side div { padding: 6px 8px; margin-bottom: 2px; }
.pv-main { padding: 16px; }
.pv-hero { padding: 20px; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; background: #fff; border: 1px solid var(--line); background-size: cover; background-position: center; position: relative; overflow: hidden; }
.pv-hero b { font-size: 18px; font-weight: 500; position: relative; } .pv-hero span { font-size: 13px; opacity: .8; position: relative; margin-top: 4px; }

/* ---------- Status-Punkte ---------- */
.status-dot { width: 9px; height: 9px; display: inline-block; background: var(--ink-4); }
.status-dot.ok { background: var(--ok-mark); } .status-dot.warn { background: var(--warn-mark); } .status-dot.bad { background: var(--bad-mark); }

/* ---------- Responsive ---------- */
/* Geräte-Vorschau */
.dp { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: #E4E9E7; animation: fade .15s var(--ease); }
.dp-bar { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dp-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 180px; line-height: 1.3; }
.dp-seg button { display: inline-flex; align-items: center; gap: 8px; }
.dp-seg svg { width: 16px; height: 16px; }
.dp-tools { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; justify-content: flex-end; }
.dp-stage { flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.dp-fit { position: relative; }
.dp-device { position: absolute; top: 0; left: 0; transform-origin: 0 0; background: #1E2624; box-shadow: 0 24px 60px rgba(20, 30, 28, .22); transition: width .2s var(--ease), height .2s var(--ease); }
.dp-device.pc { background: #fff; outline: 1px solid var(--line); }
.dp-device iframe { display: block; border: 0; background: #fff; }
.dp-chrome { display: none; }
.dp-device.pc .dp-chrome { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; background: #EEF1F0; border-bottom: 1px solid var(--line); }
.dp-chrome i { width: 9px; height: 9px; background: #C9D1CE; }
.dp-chrome span { margin-left: 14px; font-size: 12px; color: var(--ink-3); background: #fff; padding: 2px 12px; }
.dp-note { text-align: center; padding: 0 16px 12px; }
@media (max-width: 760px) { .dp-hide-s, .dp-seg span { display: none; } .dp-bar { gap: 10px; padding: 8px 12px; } }

@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .welcome { grid-template-columns: minmax(0, 1fr); }
  .editor { grid-template-columns: 240px minmax(0, 1fr); }
  .editor .ed-side { display: none; }
  .editor.show-side .ed-side { display: block; position: fixed; right: 0; top: var(--topbar-h); width: 360px; z-index: 40; box-shadow: var(--shadow-pop); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-pop); }
  .app.nav-open .sidebar { transform: none; }
  .menu-burger { display: grid; }
  .topbar { padding: 0 12px; height: 64px; }
  .content { padding: 8px 16px 48px; }
  h1 { font-size: 30px; }
  .g2, .g3, .g-side { grid-template-columns: minmax(0, 1fr); }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
  .player { grid-template-columns: 1fr; }
  .player-side { display: none; }
  .player-top #tog { display: grid; }
  .player.show-side .player-side { display: block; position: fixed; inset: 0 20% 0 0; z-index: 30; }
  .player-body { padding: 32px 18px 64px; }
  .lesson > h1, .done-screen h1 { font-size: 30px; }
  .editor { grid-template-columns: 1fr; margin: -8px -16px -48px; }
  .ed-tree { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .ed-canvas { padding: 16px 12px 80px; }
  .ed-paper { padding: 24px 18px; }
  .hero { padding: 26px 22px; } .hero h1 { font-size: 32px; } .hero p { font-size: 16px; } .hero-stats { gap: 20px; }
  .next-up { padding: 24px 22px; }
  .course-hero { grid-template-columns: 1fr; padding: 24px 20px; } .course-hero > .app-icon, .course-hero > img { grid-row: auto; margin-bottom: 18px !important; }
  .course-hero h1 { font-size: 30px; }
  .timetable li { grid-template-columns: 56px minmax(0, 1fr); padding: 12px 16px; }
  .timetable li > :last-child { grid-column: 2; }
  .tt-date { width: 56px; height: 54px; }
  .bar-row { grid-template-columns: 100px minmax(0, 1fr) 40px; }
  .search { max-width: none; }
  .user-btn .uname { display: none; }
  .popover { right: 8px; left: 8px; width: auto; }
  .card-head, .card-body, .card-pad { padding-left: 18px; padding-right: 18px; }
  .list > li { padding-left: 18px; padding-right: 18px; }
  .auth-form .inner { padding: 28px 22px; }
}
@media (max-width: 560px) { .g4 { grid-template-columns: minmax(0, 1fr); } .blk-palette { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .actions { display: none !important; } .app { display: block; } .card { break-inside: avoid; } }
