/* =====================================================================
   Lernplattform – Oberfläche
   ===================================================================== */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #3454f5;
  --primary-hover: #2440d8;
  --primary-soft: #eef1ff;
  --success: #15803d;
  --success-soft: #e8f6ee;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --warning: #b45309;
  --warning-soft: #fdf3e2;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.16);
  --sidebar: 252px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
.small { font-size: .86rem; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: .05rem .35rem; border-radius: 6px; font-size: .85em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ---------- Boot / Spinner ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin .8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 4rem 0; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 1.1rem .8rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 750; font-size: 1.05rem; padding: .2rem .55rem 1rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--primary), #7a5cff); display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; }
.nav-section { margin-top: .9rem; }
.nav-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 .65rem .35rem; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: .6rem; padding: .5rem .65rem; border-radius: var(--radius-sm); color: #374151; font-weight: 500; font-size: .93rem; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav .ico { width: 18px; text-align: center; opacity: .85; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.user-chip .who { min-width: 0; }
.user-chip .who b, .user-chip .who span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .who span { color: var(--muted); font-size: .8rem; }

.main { min-width: 0; }
.backdrop { display: none; }
.topbar { display: none; align-items: center; gap: .75rem; padding: .7rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.content { padding: 2rem 2.25rem 4rem; max-width: 1240px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--muted); }
.org-switch { margin: 0 .3rem .6rem; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .backdrop { display: block; }
  .backdrop { position: fixed; inset: 0; background: rgba(17,24,39,.35); z-index: 30; }
  .topbar { display: flex; }
  .content { padding: 1.25rem 1rem 4rem; }
  h1 { font-size: 1.35rem; }
}

/* ---------- Karten & Raster ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.card + .card { margin-top: 1rem; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (max-width: 1100px) { .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid.cols-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

.stat .label { color: var(--muted); font-size: .85rem; font-weight: 500; }
.stat .value { font-size: 1.85rem; font-weight: 750; letter-spacing: -.02em; margin: .2rem 0; }
.stat .hint { color: var(--muted); font-size: .82rem; }
.hero { background: linear-gradient(135deg, #3454f5 0%, #6a4cff 100%); color: #fff; border: 0; }
.hero p, .hero .muted { color: rgba(255,255,255,.85); }
.hero .btn.secondary { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); }

/* ---------- Fortschritt ---------- */
.progress { height: 8px; background: #eceef3; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s ease; }
.progress.good > span { background: var(--success); }
.progress.warn > span { background: #e08a12; }
.progress.bad > span { background: var(--danger); }
.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--p) * 1%), #eceef3 0); display: grid; place-items: center; flex: none; }
.ring::after { content: attr(data-label); width: 72px; height: 72px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 750; font-size: 1.1rem; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: .5rem; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.bars .bar .stack-bar { width: 100%; max-width: 30px; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 3px 3px; overflow: hidden; background: #eceef3; }
.bars .bar .ok { background: var(--success); }
.bars .bar .no { background: #f2a3a3; }
.bars .bar small { font-size: .68rem; white-space: nowrap; }

/* ---------- Formulare ---------- */
.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-weight: 550; font-size: .88rem; margin-bottom: .35rem; }
.field .help { color: var(--muted); font-size: .8rem; margin-top: .3rem; }
.input, select.input, textarea.input {
  width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid #d5d9e1; border-radius: var(--radius-sm);
  padding: .6rem .75rem; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(52,84,245,.15); }
.input[disabled] { background: var(--surface-2); color: var(--muted); }
.check { display: flex; gap: .55rem; align-items: flex-start; margin-bottom: .7rem; font-size: .92rem; cursor: pointer; }
.check input { margin-top: .25rem; width: 16px; height: 16px; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 1rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 600; font-size: .92rem; padding: .58rem 1rem; border-radius: var(--radius-sm); border: 1px solid transparent; background: var(--primary); color: #fff; cursor: pointer; transition: background .15s, transform .05s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: #d5d9e1; }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #a91f1f; }
.btn.success { background: var(--success); }
.btn.sm { padding: .36rem .7rem; font-size: .84rem; }
.btn.block { width: 100%; }
.icon-btn { background: none; border: 0; font-size: 1.35rem; cursor: pointer; padding: .2rem .4rem; color: var(--text); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; margin: 0 -1.25rem; padding: 0 1.25rem; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; padding: .6rem .6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: .7rem .6rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .55rem; border-radius: 99px; font-size: .76rem; font-weight: 600; background: #eef0f4; color: #374151; white-space: nowrap; }
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.amber { background: var(--warning-soft); color: var(--warning); }

/* ---------- Hinweise ---------- */
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); border: 1px solid; font-size: .92rem; margin-bottom: 1rem; }
.alert.info { background: var(--primary-soft); border-color: #cfd8ff; color: #1e3a8a; }
.alert.success { background: var(--success-soft); border-color: #bfe5cd; color: #14532d; }
.alert.error { background: var(--danger-soft); border-color: #f5c2c2; color: #7f1d1d; }
.alert.warn { background: var(--warning-soft); border-color: #f3d9a8; color: #78350f; }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty .big { font-size: 2rem; margin-bottom: .5rem; }

/* ---------- Listen ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 550; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--border); }
.dot.green { background: var(--success); } .dot.red { background: var(--danger); } .dot.blue { background: var(--primary); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs button { background: none; border: 0; font: inherit; font-weight: 550; color: var(--muted); padding: .6rem .9rem; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- Fragen ---------- */
.question { max-width: 780px; }
.question .qtext { font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem; }
.question img.qmedia { max-width: 100%; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid var(--border); }
.option { display: flex; gap: .8rem; align-items: flex-start; padding: .85rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); margin-bottom: .6rem; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.option:hover { border-color: #b9c3f7; }
.option input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.option.selected { border-color: var(--primary); background: var(--primary-soft); }
.option.correct { border-color: var(--success); background: var(--success-soft); }
.option.wrong { border-color: var(--danger); background: var(--danger-soft); }
.option.locked { cursor: default; }
.feedback { margin-top: 1rem; padding: 1rem; border-radius: var(--radius-sm); }
.feedback.ok { background: var(--success-soft); }
.feedback.no { background: var(--danger-soft); }
.qmeta { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }

.qnav { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 6px; }
.qnav button { height: 38px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font: inherit; font-weight: 600; font-size: .85rem; cursor: pointer; }
.qnav button.answered { background: var(--primary-soft); border-color: #c7d0ff; color: var(--primary); }
.qnav button.current { outline: 2px solid var(--primary); outline-offset: 1px; }
.qnav button.ok { background: var(--success-soft); color: var(--success); border-color: #bfe5cd; }
.qnav button.no { background: var(--danger-soft); color: var(--danger); border-color: #f5c2c2; }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.1rem; }
.timer.low { color: var(--danger); }
.exam-layout { display: grid; grid-template-columns: 1fr 260px; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .exam-layout { grid-template-columns: 1fr; } }

/* ---------- Nachrichten ---------- */
.chat { display: grid; grid-template-columns: 280px 1fr; min-height: 520px; padding: 0; overflow: hidden; }
.chat .contacts { border-right: 1px solid var(--border); overflow-y: auto; max-height: 70vh; }
.chat .contacts button { display: flex; width: 100%; gap: .6rem; align-items: center; padding: .75rem 1rem; border: 0; border-bottom: 1px solid var(--border); background: none; text-align: left; font: inherit; cursor: pointer; }
.chat .contacts button.active { background: var(--primary-soft); }
.chat .thread { display: flex; flex-direction: column; min-width: 0; }
.chat .msgs { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; max-height: 60vh; }
.bubble { max-width: 75%; padding: .55rem .8rem; border-radius: 14px; background: #eef0f4; white-space: pre-wrap; word-wrap: break-word; }
.bubble.me { align-self: flex-end; background: var(--primary); color: #fff; }
.bubble small { display: block; opacity: .7; font-size: .7rem; margin-top: .15rem; }
.chat form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--border); }
@media (max-width: 760px) { .chat { grid-template-columns: 1fr; } .chat .contacts { max-height: 200px; border-right: 0; border-bottom: 1px solid var(--border); } }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-side { background: linear-gradient(150deg, #2440d8 0%, #6a4cff 100%); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h1 { font-size: 2.1rem; max-width: 460px; }
.auth-side ul { padding: 0; list-style: none; margin: 1.5rem 0 0; }
.auth-side li { margin-bottom: .7rem; opacity: .92; }
.auth-main { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth-box { width: 100%; max-width: 410px; }
.auth-box .brand { padding-left: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
.seg label { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .7rem; cursor: pointer; font-weight: 550; font-size: .9rem; display: flex; gap: .5rem; align-items: center; }
.seg label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* ---------- Modal & Toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(17,24,39,.45); display: grid; place-items: center; padding: 1rem; z-index: 100; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: var(--radius); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal.wide { max-width: 860px; }
.modal-head { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 1.25rem; }
.modal-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; position: sticky; bottom: 0; background: var(--surface); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
#toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 200; }
.toast { background: #111827; color: #fff; padding: .75rem 1rem; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 380px; font-size: .92rem; animation: pop .2s ease; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* ---------- Öffentlich ---------- */
.public-wrap { max-width: 860px; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.public-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.legal-text { white-space: pre-wrap; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-top: 1.5rem; }
.footer-links a { color: var(--muted); }
.landing-hero { text-align: center; padding: 3rem 0 2rem; }
.landing-hero h1 { font-size: 2.4rem; max-width: 720px; margin: 0 auto 1rem; }
.landing-hero p { font-size: 1.1rem; color: var(--muted); max-width: 620px; margin: 0 auto 1.5rem; }
.feature .ico { font-size: 1.5rem; margin-bottom: .4rem; }
.price { font-size: 1.8rem; font-weight: 750; }

/* ---------- Live-Unterricht ---------- */
.live-layout { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 1rem; align-items: start; }
.live-side .card + .card { margin-top: 1rem; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
.live-side .tabs { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; margin-bottom: 0; padding: 0 .5rem; }
.live-side .tabs + .card { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.live-side .tabs + .card + .card { margin-top: 1rem; }
.grid > .card + .card, .grid > * + .card { margin-top: 0; }
@media (max-width: 1100px) { .live-layout { grid-template-columns: 1fr; } }

/* ---------- Verkaufs-Startseite ---------- */
.lp { background: #fff; }
.lp-inner { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.lp-nav { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.lp-nav .lp-inner { height: 66px; }
.lp-nav .brand { padding: 0; }
.lp-links a:not(.btn) { color: #374151; font-weight: 500; font-size: .95rem; margin: 0 .55rem; }
.lp-hero { background: radial-gradient(900px 500px at 10% 0%, #e9edff 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #f1ecff 0%, transparent 60%); padding: 4.5rem 0 4rem; }
.lp-hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 3rem; align-items: center; }
.lp-hero h1 { font-size: 3.1rem; line-height: 1.08; letter-spacing: -.03em; margin: 1rem 0; }
.lp-lead { font-size: 1.15rem; color: #4b5563; line-height: 1.6; }
.lp-tag, .lp-kicker { display: inline-block; font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: .3rem .7rem; border-radius: 99px; }
.lp-cta { margin-top: 1.6rem; }
.lp-btn { padding: .85rem 1.4rem; font-size: 1rem; border-radius: 12px; }
.lp-note { color: var(--muted); margin-top: 1rem; }
.lp-video { border-radius: 18px; overflow: hidden; box-shadow: 0 30px 70px rgba(36,64,216,.25); background: #0d1230; aspect-ratio: 16/9; }
.lp-video video { width: 100%; height: 100%; display: block; }
.lp-strip { background: #0d1230; color: #fff; padding: 2rem 0; }
.lp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.lp-stats b { display: block; font-size: 1.8rem; font-weight: 800; }
.lp-stats span { color: #c3cbf5; font-size: .9rem; }
.lp-sec { padding: 5rem 0; }
.lp-alt { background: #f6f7fb; }
.lp-head { text-align: center; max-width: 720px; margin: 0 auto 2.8rem; }
.lp-head h2, .lp-split h2 { font-size: 2.2rem; letter-spacing: -.02em; margin: .8rem 0 .6rem; }
.lp-head p { color: #4b5563; font-size: 1.08rem; }
.lp-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.lp-feat { border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; background: #fff; }
.lp-feat p { color: #4b5563; margin: 0; }
.lp-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: 1.2rem; margin-bottom: .9rem; }
.lp-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.lp-list { list-style: none; padding: 0; margin: 1.2rem 0 1.6rem; }
.lp-list li { display: flex; gap: .6rem; margin-bottom: .7rem; align-items: flex-start; }
.lp-check { color: var(--success); font-weight: 800; }
.lp-mock { display: grid; gap: 1rem; }
.lp-mock-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 1.3rem; box-shadow: var(--shadow); }
.lp-mock-card p { color: #4b5563; margin: .5rem 0 .8rem; }
.lp-mock-card.ok { background: var(--success-soft); border-color: #bfe5cd; }
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.lp-steps > div { padding: 1.5rem; border-radius: 16px; border: 1px solid var(--border); }
.lp-steps span { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; margin-bottom: .9rem; }
.lp-steps p { color: #4b5563; margin: 0; }
.lp-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; align-items: stretch; }
.lp-price { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 1.8rem; position: relative; display: flex; flex-direction: column; }
.lp-price .lp-list { flex: 1; }
.lp-price.best { border: 2px solid var(--primary); box-shadow: 0 20px 50px rgba(52,84,245,.15); }
.lp-best { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700; padding: .25rem .8rem; border-radius: 99px; }
.lp-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
.lp-trust p { color: #4b5563; margin-top: .4rem; }
.lp-faq { max-width: 820px; }
.lp-faq details { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: .7rem; }
.lp-faq summary { font-weight: 650; cursor: pointer; }
.lp-faq details p { color: #4b5563; margin: .7rem 0 0; }
.lp-final { background: linear-gradient(135deg, #2440d8, #6a4cff); color: #fff; text-align: center; padding: 4.5rem 0; }
.lp-final h2 { font-size: 2.2rem; margin-bottom: .6rem; }
.lp-final p { color: rgba(255,255,255,.88); font-size: 1.1rem; margin-bottom: 1.6rem; }
.lp-white { background: #fff; color: #2440d8; }
.lp-white:hover { background: #eef1ff; }
.lp-outline { background: transparent; border-color: rgba(255,255,255,.6); }
.lp-outline:hover { background: rgba(255,255,255,.12); }
.lp-foot { padding: 1.6rem 0; font-size: .88rem; color: var(--muted); }
.lp-foot a { color: var(--muted); margin-left: 1rem; }
@media (max-width: 900px) {
  .lp-hero-grid, .lp-split { grid-template-columns: 1fr; gap: 2rem; }
  .lp-hero { padding: 2.5rem 0; }
  .lp-hero h1 { font-size: 2.2rem; }
  .lp-features, .lp-steps, .lp-prices, .lp-trust { grid-template-columns: 1fr; }
  .lp-stats { grid-template-columns: 1fr 1fr; }
  .lp-links a:not(.btn) { display: none; }
  .lp-sec { padding: 3.2rem 0; }
  .lp-head h2, .lp-split h2, .lp-final h2 { font-size: 1.7rem; }
}
.nbadge { margin-left: auto; background: var(--danger, #dc2626); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; }
.confirm-text p { margin: .3rem 0; }
.qtools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .8rem; }
.input.sm { padding: .3rem .5rem; font-size: .85rem; min-height: 0; }
.qnav button.marked { box-shadow: inset 0 0 0 2px #f59e0b; }
.qnav button.marked::after { content: '★'; font-size: .55rem; position: absolute; top: 1px; right: 2px; color: #f59e0b; }
.qnav button { position: relative; }
.qlist li .st { width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: #cbd5e1; }
.qlist li .st.wrong { background: var(--danger, #dc2626); } .qlist li .st.learning { background: #f59e0b; } .qlist li .st.mastered { background: var(--success, #16a34a); }
.qlist li .qt { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ready-card .ring { --size: 92px; }
.dot.amber { background: #f59e0b; }
small .dot { display: inline-block; vertical-align: middle; }
/* Editor Startseite */
.ed-list { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.ed-row { display: flex; gap: .4rem; align-items: flex-start; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg, #f8fafc); }
.ed-row > .input, .ed-row > textarea { flex: 1; min-width: 0; }
.ed-row .ed-icon { flex: 0 0 56px; text-align: center; }
.ed-btns { display: flex; gap: .1rem; flex: none; }
@media (max-width: 700px) { .ed-row { flex-direction: column; align-items: stretch; } }
.credbox { white-space: pre-wrap; background: var(--bg, #f1f5f9); border: 1px solid var(--border); border-radius: 8px; padding: .8rem; font-size: .9rem; user-select: all; }
[hidden] { display: none !important; }
/* Kurse */
.course-card { display: block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15,23,42,.08); }
.course-cover { aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, var(--primary), #7c3aed); display: grid; place-items: center; color: #fff; font-size: 2.4rem; }
.course-cover img { width: 100%; height: 100%; object-fit: cover; }
.course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
@media (max-width: 960px) { .course-layout { grid-template-columns: 1fr; } }
.video-box { position: relative; aspect-ratio: 16/9; background: #000; }
.video-box video, .video-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-ext { padding: 2.5rem 1.5rem; text-align: center; background: var(--bg, #f8fafc); }
.lesson-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.lesson-list li { border-radius: 9px; margin-bottom: .2rem; }
.lesson-list li a { display: flex; gap: .6rem; align-items: center; padding: .55rem .5rem; color: inherit; text-decoration: none; border-radius: 9px; }
.lesson-list li a:hover { background: var(--bg, #f1f5f9); }
.lesson-list li.active > a { background: var(--primary-soft); }
.lesson-list li a .grow { display: flex; flex-direction: column; min-width: 0; }
.lesson-list .lstate { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--border); }
.lesson-list .lstate.done { background: var(--success); color: #fff; }
.lesson-tools { display: flex; justify-content: flex-end; gap: .1rem; padding: 0 .3rem .3rem; }
.rec-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #dc2626; animation: recblink 1s infinite; margin-right: .35rem; }
@keyframes recblink { 50% { opacity: .2; } }
/* App installieren */
.app-hero { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; }
.app-hero h2 { margin-top: 0; }
.app-steps { padding-left: 1.2rem; line-height: 1.6; }
.app-steps li { margin: .35rem 0; }
.btn.lg { padding: .85rem 1.5rem; font-size: 1.05rem; }
/* Als App: Platz für iPhone-Notch / Statusleiste */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .sidebar { padding-top: calc(env(safe-area-inset-top) + 1rem); }
}
/* Ein/Aus-Schalter */
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; vertical-align: middle; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider { position: absolute; inset: 0; background: #cbd5e1; border-radius: 999px; transition: background .2s; }
.switch .slider::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .slider { background: var(--success, #16a34a); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--primary); outline-offset: 2px; }
.switch input:disabled + .slider { opacity: .5; cursor: not-allowed; }
.switch-row { display: flex; align-items: center; gap: .9rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .grow b { display: block; }
/* Admin-Kacheln */
.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; }
.admin-tile { display: flex; gap: .8rem; align-items: center; padding: 1rem; border-radius: 14px; background: var(--card, #fff); border: 1px solid var(--border); color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.admin-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,23,42,.07); border-color: var(--primary); }
.admin-tile .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: var(--primary-soft); color: var(--primary); flex: none; }
.admin-tile b { display: block; }
.admin-tile small { color: var(--muted); }
.bulkbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .6rem .8rem; margin-bottom: .8rem; background: var(--primary-soft); border-radius: 10px; }
.maint-banner { background: #fef3c7; color: #78350f; padding: .55rem 1rem; text-align: center; font-size: .92rem; border-bottom: 1px solid #fcd34d; }

/* ================= Prüfungsbogen (wie am Prüfungs-PC) ================= */
.qsheet { --qs-line: #c9d3e3; font-size: calc(1rem * var(--ez, 1)); }
.qs-head { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.qs-chip { font-size: .78em; font-weight: 700; letter-spacing: .02em; padding: .25em .7em; border-radius: 6px; background: #eef2fa; color: #33415c; border: 1px solid var(--qs-line); }
.qs-body { display: grid; gap: 1.2rem; }
.qsheet.has-media .qs-body { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .qsheet.has-media .qs-body { grid-template-columns: 1fr; } }
.qs-text { font-size: 1.18em; font-weight: 650; line-height: 1.45; color: #0f172a; }
.qs-instr { margin: .5rem 0 .9rem; font-size: .85em; color: #52607a; }
.qs-answers { position: relative; display: flex; flex-direction: column; gap: .55rem; }
.qs-ans { display: grid; grid-template-columns: 1.6em 2.1em 1fr auto; align-items: center; gap: .65rem; padding: .8em .9em; background: #fff; border: 2px solid var(--qs-line); border-radius: 10px; cursor: pointer; transition: border-color .12s, background .12s; user-select: none; }
.qs-ans:hover:not(.locked) { border-color: #7f95c4; background: #f8faff; }
.qs-ans input { position: absolute; opacity: 0; pointer-events: none; }
.qs-ans input:focus-visible ~ .qs-box { outline: 3px solid var(--primary); outline-offset: 2px; }
.qs-letter { font-weight: 800; font-size: 1.05em; color: #33415c; text-align: center; }
.qs-box { width: 1.9em; height: 1.9em; border: 2.5px solid #33415c; border-radius: 4px; background: #fff; display: grid; place-items: center; position: relative; }
.qs-ans.checked .qs-box::after, .qs-ans input:checked ~ .qs-box::after { content: '✕'; font-size: 1.35em; font-weight: 900; color: #1d3fbf; line-height: 1; }
.qs-ans.checked { border-color: #3454f5; background: #f2f5ff; }
.qs-txt { line-height: 1.45; }
.qs-ans.locked { cursor: default; }
.qs-ans.correct { border-color: var(--success, #16a34a); background: #effaf3; }
.qs-ans.wrong { border-color: var(--danger, #dc2626); background: #fdf1f1; }
.qs-ans.wrong .qs-box::after { color: var(--danger, #dc2626); }
.qs-ok { font-size: .8em; font-weight: 700; color: var(--success, #16a34a); white-space: nowrap; }
.qs-num { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; font-weight: 650; }
.qs-num .input { width: 9em; font-size: 1.25em; font-weight: 700; text-align: center; border: 2.5px solid #33415c; }
.qs-numright { font-weight: 600; } .qs-numright.ok { color: var(--success); } .qs-numright.no { color: var(--danger); }
.qs-answers[data-needs-video] .qs-ans, .qs-answers[data-needs-video] .qs-num { opacity: .35; pointer-events: none; }
.qs-wait { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; font-weight: 700; color: #33415c; background: rgba(244,246,251,.55); border-radius: 10px; padding: 1rem; }
.qs-answers:not([data-needs-video]) .qs-wait { display: none; }
/* Bild */
.qs-img { position: relative; display: block; width: 100%; padding: 0; border: 2px solid var(--qs-line); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; }
.qs-img img { display: block; width: 100%; height: auto; }
.qs-zoom { position: absolute; right: .5rem; bottom: .5rem; background: rgba(15,23,42,.65); color: #fff; border-radius: 6px; padding: .1rem .45rem; font-size: .9rem; }
.qs-lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(10,15,30,.88); display: grid; place-items: center; padding: 1rem; cursor: zoom-out; }
.qs-lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 8px; }
.qs-lightbox button { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer; }
/* Video */
.qs-video { position: relative; border: 2px solid var(--qs-line); border-radius: 10px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.qs-video video { width: 100%; height: 100%; display: block; object-fit: contain; }
.qs-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 0; border-radius: 999px; padding: .8rem 1.4rem; font-weight: 750; font-size: 1rem; background: #fff; color: #1d3fbf; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.35); display: flex; gap: .45rem; align-items: center; }
.qs-play:disabled { opacity: .55; cursor: not-allowed; }
.qs-video.playing .qs-play { display: none; }
.qs-plays { position: absolute; left: 0; right: 0; bottom: 0; padding: .35rem .7rem; font-size: .8rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); text-align: center; }
.qs-plays:empty { display: none; }

/* Prüfungsseite */
.exam-sheet { max-width: 1180px; margin: 0 auto; }
.es-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: #1f2a44; color: #fff; padding: .85rem 1.1rem; border-radius: 14px 14px 0 0; }
.es-title { display: flex; flex-direction: column; } .es-title span { opacity: .85; font-size: .92rem; }
.es-right { display: flex; align-items: center; gap: .6rem; }
.es-top .timer { background: rgba(255,255,255,.12); color: #fff; border-color: transparent; }
.es-zoom { display: flex; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); }
.es-zoom button { background: transparent; color: #fff; border: 0; padding: .4rem .6rem; font-weight: 700; cursor: pointer; }
.es-zoom button + button { border-left: 1px solid rgba(255,255,255,.25); }
.es-submit { background: #fff; color: #1f2a44; } .es-submit:hover { background: #e8ecf7; }
.es-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 5px; padding: .75rem; background: #e9eef8; border-left: 1px solid #d5dced; border-right: 1px solid #d5dced; }
.es-nav button { height: 34px; border-radius: 6px; border: 1.5px solid #b7c3db; background: #fff; font-weight: 700; color: #33415c; cursor: pointer; position: relative; }
.es-nav button.answered { background: #3454f5; border-color: #3454f5; color: #fff; }
.es-nav button.current { outline: 3px solid #f59e0b; outline-offset: 1px; }
.es-nav button.marked::after { content: '★'; position: absolute; top: -7px; right: -5px; font-size: .7rem; color: #f59e0b; text-shadow: 0 0 2px #fff; }
.es-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: #52607a; padding: .45rem .8rem; background: #e9eef8; border: 1px solid #d5dced; border-top: 0; }
.es-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid #b7c3db; background: #fff; vertical-align: -2px; margin-right: .25rem; }
.es-legend .lg.answered { background: #3454f5; border-color: #3454f5; } .es-legend .lg.marked { border-color: #f59e0b; background: #fff7e6; }
.es-card { background: #f4f6fb; border: 1px solid #d5dced; border-top: 0; padding: 1.2rem; }
.es-foot { display: flex; align-items: center; gap: .6rem; padding: .85rem 1.1rem; background: #fff; border: 1px solid #d5dced; border-top: 0; border-radius: 0 0 14px 14px; }
.es-foot .btn { min-width: 140px; justify-content: center; }
@media (max-width: 640px) { .es-foot .btn { min-width: 0; flex: 1; } .es-nav { grid-template-columns: repeat(10, 1fr); } .es-nav button { height: 30px; font-size: .8rem; } }
