/* ============================================================
   Sachkunde 34a Prüfungstrainer – Stylesheet
   Neues Bewertungsschema ab 1. Juli 2025: 82 Fragen, 120 Punkte,
   Teilpunkte statt Alles-oder-Nichts.
   ============================================================ */

:root {
  --navy-900: #0d1b2a;
  --navy-800: #14273a;
  --navy-700: #1b3652;
  --ink: #16212e;
  --ink-soft: #47586b;
  --ink-mute: #7a8a9b;
  --line: #e2e8ef;
  --line-soft: #eef2f6;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --accent: #1f6feb;
  --accent-dark: #1758c0;
  --accent-soft: #e8f0fe;
  --gold: #c8973f;
  --green: #15803d;
  --green-soft: #e7f6ec;
  --red: #c0392b;
  --red-soft: #fdecea;
  --amber: #b7791f;
  --amber-soft: #fdf3e0;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16, 33, 51, .06), 0 2px 8px rgba(16, 33, 51, .05);
  --shadow-md: 0 4px 14px rgba(16, 33, 51, .09);
  --shadow-lg: 0 18px 48px rgba(13, 27, 42, .16);
  --font: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 2.5rem); }
.section { padding: 3rem 0; }
.muted { color: var(--ink-mute); font-size: .9rem; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--navy-900);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 6px 22px rgba(13,27,42,.22);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; }
.brand-mark {
  display: grid; place-items: center; width: 48px; height: 48px;
  color: #fff; flex: none;
}
.brand-logo { display: block; width: 48px; height: 48px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; letter-spacing: -.01em; }
.brand-text small { font-size: .74rem; color: #93a7bd; letter-spacing: .06em; text-transform: uppercase; }

.main-nav { margin-left: auto; display: flex; gap: .25rem; }
.main-nav a {
  color: #c3d0de; padding: .5rem .85rem; border-radius: 8px;
  font-size: .93rem; font-weight: 500; transition: .18s;
}
.main-nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.main-nav a.active { background: var(--accent); color: #fff; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  width: 42px; height: 42px; border-radius: 9px; padding: 10px;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; margin: 4px 0; transition: .2s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .94rem;
  padding: .68rem 1.25rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: .16s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(31,111,235,.3); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #116631; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: rgba(16,33,51,.06); color: var(--ink); }
.btn-lg { padding: .85rem 1.7rem; font-size: 1rem; }
.btn-tiny { padding: .35rem .7rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.link-back { background: none; border: 0; color: var(--ink-mute); cursor: pointer; font: inherit; font-size: .9rem; padding: 0 0 .8rem; }
.link-back:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1100px 480px at 12% -10%, #1d3a5c 0%, transparent 60%), var(--navy-900);
  color: #fff; padding: 4rem 0 4.5rem;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.pill {
  display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: #9fc4ff; background: rgba(31,111,235,.17);
  border: 1px solid rgba(31,111,235,.4); padding: .3rem .8rem; border-radius: 999px; margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: .6rem; }
.hero h1 .accent { color: #6ba6ff; white-space: nowrap; }
.lead { font-size: 1.08rem; color: #c3d3e4; max-width: 46ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.8rem; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.28); border-style: solid; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.hero-stats { display: flex; gap: 2.2rem; margin-top: 2.4rem; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 1.6rem; color: #fff; line-height: 1.1; }
.hero-stats span { font-size: .82rem; color: #93a7bd; }

.hero-card {
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px; padding: 1.5rem; backdrop-filter: blur(6px);
}
.hero-side { display: grid; gap: 1rem; min-width: 0; }
.hero-brand-banner {
  display: block; width: 100%; height: auto; border-radius: 18px;
  border: 1px solid rgba(255,255,255,.13); box-shadow: 0 18px 48px rgba(1,10,20,.25);
}
.hc-head { display: flex; align-items: center; gap: .6rem; font-size: .84rem; letter-spacing: .05em; text-transform: uppercase; color: #93a7bd; margin-bottom: 1rem; }
.hc-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 4px rgba(74,222,128,.18); }
.hc-list { list-style: none; margin: 0; padding: 0; }
.hc-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.1); font-size: .93rem; }
.hc-list li:last-child { border: 0; }
.hc-list span { color: #93a7bd; }
.hc-list strong { text-align: right; font-weight: 600; }

/* ---------- Sections ---------- */
.section-title { font-size: 1.65rem; margin-bottom: .3rem; }
.page-title { font-size: 2rem; margin-bottom: .3rem; }
.section-sub { color: var(--ink-soft); max-width: 68ch; margin-bottom: 2rem; }

/* ---------- Topic cards ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 1.1rem; }
.topic-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; cursor: pointer; text-align: left; font: inherit;
  display: flex; flex-direction: column; gap: .55rem; transition: .18s; box-shadow: var(--shadow-sm);
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c9d8ea; }
.tc-top { display: flex; align-items: center; gap: .75rem; }
.tc-num {
  width: 34px; height: 34px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-weight: 700; font-size: .95rem; color: #fff;
}
.tc-title { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
.tc-desc { color: var(--ink-soft); font-size: .88rem; margin: 0; }
.tc-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: .7rem; font-size: .82rem; color: var(--ink-mute); }
.mini-track { height: 6px; border-radius: 4px; background: var(--line-soft); overflow: hidden; flex: 1; }
.mini-fill { height: 100%; background: var(--green); border-radius: 4px; transition: width .4s; }

/* ---------- Mode cards ---------- */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.2rem; }
.mode-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.mode-icon {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; margin-bottom: .9rem;
}
.mode-card h3 { font-size: 1.12rem; }
.mode-card p { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Panels ---------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.4rem; box-shadow: var(--shadow-sm);
}
.panel.note { border-left: 4px solid var(--gold); background: #fffdf7; }
.panel-title { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); margin: 1.6rem 0 .8rem; }
.panel-title:first-child { margin-top: 0; }
.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-foot.stacked { flex-direction: column; align-items: stretch; }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.chip {
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem .95rem; font: inherit; font-size: .88rem; cursor: pointer; transition: .15s; color: var(--ink-soft);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.chip small { opacity: .7; margin-left: .35rem; }

.switch-row { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; cursor: pointer; font-size: .93rem; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

.rule-list { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--ink-soft); }
.rule-list li { margin-bottom: .45rem; }

.dist-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dist-table td { padding: .55rem 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); }
.dist-table td:last-child { text-align: right; font-weight: 700; color: var(--ink); white-space: nowrap; }
.dist-table tr:last-child td { border-bottom: 0; border-top: 2px solid var(--line); font-weight: 700; color: var(--ink); }

/* ---------- Quiz ---------- */
.quiz-bar { position: sticky; top: 68px; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.quiz-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 56px; }
.qb-left, .qb-right { display: flex; align-items: center; gap: .9rem; }
.qb-label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.qb-count { font-size: .88rem; color: var(--ink-mute); font-variant-numeric: tabular-nums; }
.qb-score { font-size: .88rem; color: var(--green); font-weight: 600; }
.qb-timer {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: .98rem;
  background: var(--accent-soft); color: var(--accent-dark); padding: .25rem .7rem; border-radius: 7px;
}
.qb-timer.warn { background: var(--amber-soft); color: var(--amber); }
.qb-timer.danger { background: var(--red-soft); color: var(--red); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.progress-track { height: 3px; background: var(--line-soft); }
.progress-fill { height: 100%; background: var(--accent); width: 0; transition: width .3s; }

.quiz-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
.quiz-layout.with-side { grid-template-columns: 1fr 250px; }

.question-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.q-meta { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.q-topic { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: .28rem .7rem; border-radius: 6px; }
.q-tools { display: inline-flex; gap: .35rem; margin-left: auto; }
.tool-btn { display: inline-flex; align-items: center; gap: .3rem; background: none; border: 1px solid var(--line); border-radius: 7px; padding: .3rem .6rem; font: inherit; font-size: .82rem; color: var(--ink-mute); cursor: pointer; transition: .15s; }
.tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.tool-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
#difficultBtn.on { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.flag-btn { display: inline-flex; align-items: center; gap: .35rem; background: none; border: 1px solid var(--line); border-radius: 7px; padding: .3rem .65rem; font: inherit; font-size: .82rem; color: var(--ink-mute); cursor: pointer; }
.flag-btn:hover { border-color: var(--amber); color: var(--amber); }
.flag-btn.on { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); font-weight: 600; }

.note-panel, .report-panel {
  margin-top: 1rem; padding: 1rem 1.1rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #f8fafc;
}
.note-panel textarea, .report-panel textarea, .report-panel select {
  width: 100%; font: inherit; font-size: .92rem; color: var(--ink);
  padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); resize: vertical; margin-top: .45rem;
}
.report-panel strong { font-size: .92rem; }
.note-actions { display: flex; gap: .5rem; margin-top: .55rem; }
.q-text { font-size: 1.22rem; line-height: 1.5; margin-bottom: 1.4rem; }

.answers { display: flex; flex-direction: column; gap: .65rem; }
.answer {
  display: flex; align-items: flex-start; gap: .85rem; width: 100%; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: .9rem 1.05rem; font: inherit; font-size: .98rem; cursor: pointer; transition: .14s; color: var(--ink);
}
.answer:hover:not(:disabled) { border-color: var(--accent); background: #fafcff; }
.answer .key {
  width: 26px; height: 26px; flex: none; border-radius: 6px; background: var(--bg);
  display: grid; place-items: center; font-weight: 700; font-size: .84rem; color: var(--ink-soft); transition: .14s;
}
.answer.selected { border-color: var(--accent); background: var(--accent-soft); }
.answer.selected .key { background: var(--accent); color: #fff; }
.answer.correct { border-color: var(--green); background: var(--green-soft); }
.answer.correct .key { background: var(--green); color: #fff; }
.answer.wrong { border-color: var(--red); background: var(--red-soft); }
.answer.wrong .key { background: var(--red); color: #fff; }
.answer:disabled { cursor: default; }

.feedback { margin-top: 1.3rem; padding: 1.05rem 1.2rem; border-radius: var(--radius-sm); font-size: .94rem; border-left: 4px solid; }
.feedback.ok { background: var(--green-soft); border-color: var(--green); }
.feedback.no { background: var(--red-soft); border-color: var(--red); }
.feedback.partial { background: var(--amber-soft); border-color: var(--amber); }
.feedback b { display: block; margin-bottom: .3rem; }
.feedback.ok b { color: var(--green); }
.feedback.no b { color: var(--red); }
.feedback.partial b { color: var(--amber); }

/* ---------- Einzel-Erklärungen je Antwortoption ---------- */
.ans-expl { display: flex; flex-direction: column; gap: .55rem; margin-top: .8rem; text-align: left; }
.ae-card {
  border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface);
  padding: .7rem .9rem; font-size: .9rem;
}
.ae-card.correct { border-left-color: var(--green); }
.ae-card.wrong { border-left-color: var(--red); }
.ae-card.picked { background: var(--accent-soft); border-color: var(--accent); }
.ae-card.picked.correct { border-left-color: var(--green); }
.ae-card.picked.wrong { border-left-color: var(--red); }
.ae-head { display: flex; align-items: center; gap: .55rem; margin-bottom: .25rem; flex-wrap: wrap; }
.ae-verdict { font-size: .72rem; font-weight: 800; letter-spacing: .06em; }
.ae-card.correct .ae-verdict { color: var(--green); }
.ae-card.wrong .ae-verdict { color: var(--red); }
.ae-letter { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.ae-picked {
  margin-left: auto; font-size: .68rem; font-weight: 600; letter-spacing: .03em;
  color: var(--accent); border: 1px solid var(--accent);
  padding: .1rem .5rem; border-radius: 999px;
}
.ae-text { font-weight: 600; color: var(--ink); margin-bottom: .3rem; }
.ae-why { color: var(--ink-soft); line-height: 1.5; }
.ae-general { font-size: .9rem; color: var(--ink-soft); padding: .4rem 0; line-height: 1.5; }
.ae-legal {
  font-size: .84rem; color: var(--navy-700); background: #eef2f7;
  border-radius: var(--radius-sm); padding: .5rem .8rem;
}
.fb-sol { display: block; margin-bottom: .5rem; font-weight: 600; color: var(--ink); }

/* Mehrfachauswahl */
.multi-hint {
  margin: -.4rem 0 1rem; font-size: .86rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: .35rem .85rem; display: inline-block;
}
.answer.multi .key { border-radius: 5px; box-shadow: inset 0 0 0 1.5px var(--line); background: var(--surface); }
.answer.multi.selected .key,
.answer.multi.correct .key,
.answer.multi.wrong .key { box-shadow: none; }

.btn-accent { background: var(--ink); color: #fff; }
.btn-accent:hover { background: #000; }

.quiz-nav { display: flex; gap: .8rem; margin-top: 1.3rem; }
.quiz-nav .btn-accent, .quiz-nav .btn-primary, .quiz-nav .btn-success { margin-left: auto; }
.quiz-nav .btn-accent:not([hidden]) ~ .btn-primary,
.quiz-nav .btn-accent:not([hidden]) ~ .btn-success { margin-left: 0; }

.quiz-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; position: sticky; top: 140px; box-shadow: var(--shadow-sm); }
.quiz-side h3 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
.q-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; margin-bottom: 1rem; }
.q-grid button {
  aspect-ratio: 1; border: 1px solid var(--line); background: var(--surface); border-radius: 6px;
  font: inherit; font-size: .76rem; font-weight: 600; color: var(--ink-mute); cursor: pointer; transition: .14s;
}
.q-grid button:hover { border-color: var(--accent); }
.q-grid button.answered { background: var(--accent-soft); border-color: #b9d3fb; color: var(--accent-dark); }
.q-grid button.flagged { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.q-grid button.current { outline: 2px solid var(--accent); outline-offset: 1px; }
.legend { list-style: none; margin: 0 0 1rem; padding: 0; font-size: .78rem; color: var(--ink-mute); }
.legend li { display: flex; align-items: center; gap: .45rem; margin-bottom: .3rem; }
.swatch { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); display: inline-block; }
.swatch.answered { background: var(--accent-soft); border-color: #b9d3fb; }
.swatch.flagged { background: var(--amber-soft); border-color: var(--amber); }
.swatch.open { background: var(--surface); }

/* ---------- Ergebnis ---------- */
.result-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; margin-bottom: 1.4rem; display: flex; align-items: center; gap: 2rem; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.score-ring { width: 128px; height: 128px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative; }
.score-ring::after { content: ""; position: absolute; inset: 11px; background: var(--surface); border-radius: 50%; }
.score-ring span { position: relative; z-index: 1; font-size: 1.9rem; font-weight: 800; }
.result-head h1 { font-size: 1.7rem; margin-bottom: .25rem; }
.result-head p { color: var(--ink-soft); margin: 0; }
.verdict { display: inline-block; padding: .3rem .85rem; border-radius: 999px; font-size: .84rem; font-weight: 700; margin-bottom: .6rem; }
.verdict.pass { background: var(--green-soft); color: var(--green); }
.verdict.fail { background: var(--red-soft); color: var(--red); }

.result-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1.4rem; align-items: start; }

.bar-row { margin-bottom: 1rem; }
.bar-row.clickable, .kv.clickable { cursor: pointer; }
.bar-row.clickable:hover .bar-head span, .kv.clickable:hover span { color: var(--accent); }
.bar-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .89rem; margin-bottom: .35rem; }
.bar-head b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-track { height: 9px; background: var(--line-soft); border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; transition: width .5s; }

.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line-soft); font-size: .93rem; }
.kv:last-child { border: 0; }
.kv span { color: var(--ink-soft); }
.kv b { font-variant-numeric: tabular-nums; }

.review-list { margin-top: 1.5rem; }
.review-item { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid; border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; margin-bottom: .9rem; box-shadow: var(--shadow-sm); }
.review-item.ok { border-left-color: var(--green); }
.review-item.no { border-left-color: var(--red); }
.review-item.skip { border-left-color: var(--ink-mute); }
.ri-head { display: flex; gap: .8rem; align-items: baseline; font-size: .8rem; color: var(--ink-mute); margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .04em; }
.ri-q { font-weight: 650; margin-bottom: .7rem; font-size: 1.02rem; }
.ri-a { font-size: .92rem; padding: .35rem 0; color: var(--ink-soft); }
.ri-a.correct { color: var(--green); font-weight: 600; }
.ri-a.chosen { color: var(--red); font-weight: 600; }
.ri-exp { margin-top: .7rem; padding: .8rem 1rem; background: var(--bg); border-radius: 8px; font-size: .9rem; color: var(--ink-soft); }

/* ---------- Statistik ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.stat-card b { display: block; font-size: 2rem; line-height: 1.1; }
.stat-card span { font-size: .85rem; color: var(--ink-mute); }
.empty { color: var(--ink-mute); font-size: .92rem; padding: 1rem 0; }

.activity-chart { display: flex; align-items: flex-end; gap: .18rem; height: 120px; padding: .6rem 0; }
.ac-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
.ac-bar { width: 100%; border-radius: 3px 3px 0 0; min-height: 2px; }
.ac-bar.ac-all { background: var(--line); }
.ac-bar.ac-ok { background: var(--green); position: absolute; bottom: 0; left: 0; opacity: .92; }
.activity-legend { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--ink-mute); margin-top: .3rem; }
.activity-legend span { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.activity-legend .al-ok { background: var(--green); }
.activity-legend .al-all { background: var(--line); }
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.hist-row:last-child { border: 0; }
.badge { font-size: .78rem; font-weight: 700; padding: .18rem .6rem; border-radius: 999px; }
.badge.pass { background: var(--green-soft); color: var(--green); }
.badge.fail { background: var(--red-soft); color: var(--red); }
.badge.written { background: #eef2f6; color: var(--ink-soft); }
.badge.oral { background: rgba(196,124,20,.14); color: #a2650f; }

/* ---------- Mündlicher Prüfungsteil ---------- */
.gate-badge { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: .28rem .8rem; border-radius: 999px; margin-bottom: .9rem; }
.gate-badge.pass { background: var(--green-soft); color: var(--green); }
.gate-badge.fail { background: var(--red-soft); color: var(--red); }
#oralGate p { color: var(--ink-soft); font-size: .93rem; margin-bottom: .6rem; }
#oralGate p:last-of-type { margin-bottom: 0; }
.star { color: #d99311; font-size: .9rem; }

.oral-hint { margin-top: 1.2rem; padding: 1rem 1.2rem; background: var(--bg); border-left: 3px solid var(--accent); border-radius: 8px; font-size: .92rem; color: var(--ink-soft); }
.oral-hint strong { color: var(--ink); }

.oral-scenario {
  margin: 1.1rem 0; padding: 1.25rem 1.35rem; border: 1px solid #bed5f2;
  border-radius: var(--radius); background: linear-gradient(135deg, #edf5ff, #fff);
  box-shadow: var(--shadow-sm);
}
.oral-scenario-kicker { display: block; margin-bottom: .35rem; color: var(--accent); font-size: .72rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.oral-scenario h2 { margin: 0 0 .35rem; font-size: 1.15rem; }
.oral-scenario p { margin: 0; color: var(--ink-soft); line-height: 1.55; }
.oral-mode-field { display: block; margin-bottom: 1rem; }
.oral-mode-field > span { display: block; margin-bottom: .4rem; color: var(--ink-soft); font-size: .86rem; font-weight: 700; }
.oral-mode-field select { width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; font: inherit; }

.key-list { margin: .5rem 0 0; padding-left: 1.2rem; }
.key-list li { margin-bottom: .35rem; font-weight: 500; line-height: 1.5; }
.key-list li:last-child { margin-bottom: 0; }

.oral-score { margin-top: 1.3rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft); }
.oral-score-title { font-weight: 650; font-size: .95rem; margin-bottom: .7rem; }
.score-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.score-btn { width: 42px; height: 42px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; font-weight: 700; font-size: 1rem; color: var(--ink-soft); cursor: pointer; transition: .15s; }
.score-btn:hover { border-color: var(--accent); color: var(--accent); }
.score-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.score-legend { margin-left: .6rem; font-size: .88rem; color: var(--ink-mute); }
.oral-assessment { margin-bottom: 1.2rem; padding: 1.2rem; border: 1px solid #bfd2ea; border-radius: 14px; background: #f7fbff; }
.oral-assessment h4 { margin: 0 0 .35rem; }
.oral-assessment > p { margin: 0 0 1rem; color: var(--ink-mute); font-size: .88rem; }
.oral-assessment-grid { display: grid; gap: .7rem; }
.oral-assessment-row { display: grid; grid-template-columns: minmax(0, 1fr) 92px auto; gap: .7rem; align-items: center; }
.oral-assessment-row label { color: var(--ink-soft); line-height: 1.4; }
.oral-assessment-row input { width: 92px; padding: .55rem .65rem; border: 1px solid var(--line); border-radius: 9px; font: inherit; text-align: right; }
.oral-assessment-row span { color: var(--ink-mute); font-size: .86rem; white-space: nowrap; }
.oral-assessment-total { display: flex; justify-content: space-between; gap: 1rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line); font-weight: 800; }
@media (max-width: 560px) {
  .oral-assessment-row { grid-template-columns: 1fr 76px auto; }
  .oral-assessment-row input { width: 76px; }
}

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(13,27,42,.55); display: grid; place-items: center; z-index: 100; padding: 1.5rem; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 1.8rem; max-width: 420px; width: 100%; box-shadow: var(--shadow-lg); }
.modal h3 { font-size: 1.2rem; }
.modal p { color: var(--ink-soft); font-size: .94rem; }
.modal .field { display: block; width: 100%; margin-top: 1rem; }
.modal .field > span { display: block; margin-bottom: .4rem; color: var(--ink-soft); font-size: .86rem; font-weight: 700; }
.modal .field input { display: block; width: 100%; min-width: 0; box-sizing: border-box; }
.modal-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.4rem; }
.auth-link-button { appearance: none; border: 0; background: transparent; color: var(--accent); cursor: pointer; font: inherit; font-weight: 700; padding: .35rem 0; text-align: left; }
.auth-link-button:hover, .auth-link-button:focus-visible { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #93a7bd; padding: 2.2rem 0; margin-top: 3rem; }
.footer-inner p { margin: 0 0 .35rem; font-size: .88rem; }
.site-footer .muted { color: #6b7f95; font-size: .82rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .65rem 1.2rem; margin-bottom: .85rem; }
.footer-links a { color: #fff; font-size: .9rem; font-weight: 700; text-decoration: none; }
.footer-links a:hover, .footer-links a:focus-visible { color: #8db9ff; text-decoration: underline; }
.footer-links .footer-withdraw-link { padding: .15rem .55rem; border: 1px solid #6f91b5; border-radius: 7px; }

/* ---------- Rechtliche Seiten ---------- */
.legal-page { min-height: calc(100vh - 260px); padding: 3.2rem 0 4rem; background: var(--bg); }
.legal-wrap { max-width: 880px; }
.legal-intro { margin: -.3rem 0 1.5rem; color: var(--ink-mute); }
.legal-warning { margin: 0 0 1.25rem; padding: 1rem 1.1rem; border: 1px solid #d8a117; border-radius: 12px; background: #fff7d6; color: #5c4300; line-height: 1.55; }
.legal-card { padding: clamp(1.25rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.legal-card section + section { margin-top: 2rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.legal-card h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
.legal-card p, .legal-card address { margin: 0; color: var(--ink-soft); line-height: 1.7; }
.legal-card address { font-style: normal; }
.legal-card p + p { margin-top: .85rem; }
.legal-card h3 { margin: 1.1rem 0 .45rem; font-size: 1rem; }
.legal-contact { margin-top: .8rem !important; }
.legal-list { margin: .65rem 0 0; padding-left: 1.35rem; color: var(--ink-soft); }
.legal-list li + li { margin-top: .35rem; }
.legal-placeholder { display: inline; padding: .08rem .25rem; border-radius: 4px; background: #fff1a8; color: #603d00; font-weight: 750; }
.legal-card a.legal-placeholder { text-decoration: underline; }
.legal-note { margin-top: .85rem !important; padding: .75rem .9rem; border-left: 3px solid var(--accent); background: #f3f7fc; font-size: .9rem; }
.legal-updated { margin: 1rem 0 0; color: var(--ink-mute); font-size: .84rem; }
.legal-home-link { margin-left: auto; }
.withdrawal-card h3 { color: var(--ink); }
.withdrawal-address { margin: .7rem 0 1rem !important; padding: .85rem 1rem; border-left: 3px solid var(--accent); background: #f3f7fc; }
.withdrawal-form { margin-top: 1.1rem; }
.withdrawal-form .field { display: block; margin-bottom: 1rem; }
.withdrawal-form .field > span { display: block; margin-bottom: .4rem; color: var(--ink-soft); font-size: .88rem; font-weight: 750; }
.withdrawal-form input { width: 100%; min-width: 0; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.withdrawal-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.withdrawal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.withdrawal-statement { margin: .4rem 0 1rem; padding: 1rem; border: 1px solid #bfd2ea; border-radius: 12px; background: #f7fbff; }
.withdrawal-statement p { margin: .35rem 0 0; }
.withdrawal-confirm { align-items: flex-start; margin: 0 0 1.1rem; }
.withdrawal-confirm input { width: 19px; height: 19px; margin-top: .18rem; flex: none; }
.withdrawal-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.withdrawal-success { padding: 1.25rem; border: 1px solid #78b98d; border-radius: 12px; background: var(--green-soft); color: #155c2d; }
.withdrawal-success h3 { color: #155c2d; }
.withdrawal-template { margin-top: 1rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.withdrawal-template p { margin-bottom: .8rem; }
.purchase-consent { align-items: flex-start; margin: .8rem 0 1rem; color: var(--ink-soft); font-size: .84rem; line-height: 1.45; }
.purchase-consent input { margin-top: .2rem; flex: none; }
.purchase-consent a { text-decoration: underline; }
@media (max-width: 560px) {
  .legal-page { padding-top: 2rem; }
  .legal-home-link { display: none; }
  .withdrawal-grid { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- Fragenverwaltung ---------- */
.qe-filter { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.qe-filter select {
  flex: 0 1 280px; font: inherit; font-size: .92rem; color: var(--ink);
  padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
}
.qe-filter input[type=search] {
  flex: 1 1 220px; font: inherit; font-size: .92rem; color: var(--ink);
  padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.qe-filter select:focus, .qe-filter input:focus,
.qe-form input:focus, .qe-form select:focus, .qe-form textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.qe-tools { display: flex; gap: .5rem; flex-wrap: wrap; margin: .8rem 0; }
.import-help { margin: .2rem 0 1rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: #f8fbff; color: var(--ink-mute); }
.import-help summary { color: var(--ink); font-weight: 750; cursor: pointer; }
.import-help p { margin: .65rem 0 0; line-height: 1.55; }

.qe-list { display: flex; flex-direction: column; gap: .4rem; max-height: 540px; overflow-y: auto; }
.qe-item {
  display: flex; align-items: center; gap: .75rem; width: 100%; text-align: left;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .65rem .9rem; cursor: pointer; transition: .15s;
}
.qe-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.qe-id { font-size: .74rem; color: var(--ink-mute); font-family: Consolas, monospace; flex: none; }
.qe-text {
  flex: 1; font-size: .92rem; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.qe-topic { font-size: .78rem; color: var(--ink-soft); flex: none; max-width: 220px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qe-badges { display: flex; gap: .35rem; flex: none; }
.qe-badge { font-size: .68rem; font-weight: 600; padding: .16rem .55rem; border-radius: 999px; letter-spacing: .02em; }
.qe-badge.custom { background: var(--green-soft); color: var(--green); }
.qe-badge.edited { background: var(--amber-soft); color: var(--amber); }
.qe-badge.status-entwurf { background: var(--amber-soft); color: var(--amber); }
.qe-badge.status-geprueft { background: var(--accent-soft); color: var(--accent-dark); }
.qe-badge.status-veroeffentlicht { background: var(--green-soft); color: var(--green); }
.qe-badge.overdue { background: var(--red-soft); color: var(--red); }
.role-banner { padding: .8rem 1rem; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.group-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.group-row:last-child { border-bottom: 0; }
.group-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.group-runner-card { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.group-runner-card .answer { display: block; width: 100%; text-align: left; margin: .5rem 0; }
.inline-form { margin: 1rem 0; padding: 1rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.inline-form .field { display: block; margin-bottom: .5rem; }
.report-row { padding: .9rem 0; border-bottom: 1px solid var(--line-soft); }
.report-row:last-child { border-bottom: 0; }
.report-row.resolved { opacity: .65; }
.report-head, .report-actions { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.report-reason { margin: .35rem 0; color: var(--ink-soft); font-size: .9rem; }
.report-actions { margin-top: .6rem; }

.qe-form .field { margin-bottom: .95rem; }
.qe-form .field > span { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }
.qe-form input[type=text], .qe-form select, .qe-form textarea {
  width: 100%; font: inherit; font-size: .94rem; color: var(--ink);
  padding: .6rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); resize: vertical;
}
.qe-opt-row { display: flex; align-items: flex-start; gap: .55rem; margin-bottom: .45rem; }
.qe-opt-row input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); cursor: pointer; flex: none; margin-top: .55rem; }
.qe-opt-mid { flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.qe-opt-why { font-size: .85rem !important; color: var(--ink-soft) !important; background: #f8fafc !important; }
.qe-opt-del { color: var(--red); font-size: 1.05rem; line-height: 1; flex: none; margin-top: .45rem; }
.qe-opt-del:hover { background: var(--red-soft); }

.qe-meta-row { display: flex; gap: .8rem; flex-wrap: wrap; }
.qe-meta-row > div { flex: 1 1 160px; }
.qe-meta-row span { display: block; font-size: .84rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .35rem; }

.qe-msg { background: var(--red-soft); color: var(--red); border-radius: var(--radius-sm);
  padding: .6rem .9rem; font-size: .88rem; margin-bottom: .95rem; }
.qe-msg.ok { background: var(--green-soft); color: var(--green); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a93226; }
.qe-foot-left, .qe-foot-right { display: inline-flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- Zugang / Konto / Admin ---------- */
.header-auth { display: flex; align-items: center; gap: .5rem; }
.btn.btn-sm { padding: .38rem .75rem; font-size: .82rem; }
.product-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; margin-bottom: 1rem; box-shadow: var(--shadow-sm); }
.product-card { position: relative; }
.product-card.recommended { border-color: #70a7ed; box-shadow: 0 14px 34px rgba(37,111,220,.13); }
.product-badge { position: absolute; top: .8rem; right: .8rem; padding: .28rem .58rem; border-radius: 999px; color: #fff; background: var(--accent); font-size: .72rem; font-weight: 800; }
.pricing-note { margin: 1rem 0 0; padding: .85rem 1rem; border-radius: 12px; color: var(--ink-mute); background: #f5f8fc; line-height: 1.55; }
.product-card h4 { margin: 0 0 .4rem; }
.product-features { margin: .6rem 0; padding-left: 1.25rem; color: var(--ink-soft); font-size: .92rem; }
.product-features li { margin: .25rem 0; }
.product-price { margin: .4rem 0 .8rem; font-size: 1.02rem; }
.paypal-mount { margin-top: .8rem; min-height: 52px; }
.admin-box { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; margin: 1rem 0; }
.admin-box h4 { margin: 0 0 .5rem; }
.admin-box .field > span { display: block; font-size: .82rem; color: var(--ink-mute); margin-bottom: .25rem; }
.admin-box input, .admin-box select { width: 100%; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fff; }
.admin-box .qe-meta-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.admin-box .qe-meta-row > div { flex: 1; min-width: 180px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th, .admin-table td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.admin-organization-list { display: grid; gap: 1rem; }
.admin-organization-card { padding: 1rem; border: 1px solid var(--line); border-radius: 15px; background: #fbfdff; }
.admin-organization-head { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.admin-organization-head > div { display: grid; gap: .2rem; }
.admin-organization-head > div:last-child { text-align: right; }
.admin-organization-head strong { font-size: 1rem; color: var(--ink); }
.admin-organization-head span { color: var(--ink-mute); font-size: .82rem; }
@media (max-width: 640px) {
  .admin-organization-head { display: grid; }
  .admin-organization-head > div:last-child { text-align: left; }
}
.temp-password { display: inline-block; background: var(--amber-soft); border: 1px dashed var(--amber); color: var(--amber); padding: .5rem .8rem; border-radius: 6px; font-family: ui-monospace, Consolas, monospace; font-weight: 700; word-break: break-all; margin-top: .4rem; }
.access-ok { color: var(--green); font-weight: 600; }

@media (max-width: 620px) {
  .qe-item { flex-wrap: wrap; }
  .qe-text { white-space: normal; flex-basis: 100%; order: 5; }
  .panel-foot { flex-direction: column; align-items: stretch; gap: .6rem; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.2rem; }
  .result-grid { grid-template-columns: 1fr; }
  .quiz-layout.with-side { grid-template-columns: 1fr; }
  .quiz-side { position: static; order: -1; }
  .q-grid { grid-template-columns: repeat(12, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .header-auth { margin-left: auto; }
  .header-auth .btn-sm { padding: .32rem .55rem; font-size: .78rem; }
  .main-nav {
    position: absolute; top: 68px; left: 0; right: 0; background: var(--navy-800);
    flex-direction: column; padding: .6rem; gap: .2rem; display: none;
    box-shadow: var(--shadow-lg); border-top: 1px solid rgba(255,255,255,.08);
  }
  .main-nav.open { display: flex; }
  .section { padding: 2rem 0; }
  .hero { padding: 2.5rem 0 3rem; }
  .question-card { padding: 1.25rem; }
  .q-text { font-size: 1.08rem; }
  .result-head { gap: 1.2rem; padding: 1.4rem; }
  .quiz-bar-inner { height: auto; padding: .6rem 0; flex-wrap: wrap; }
  .q-grid { grid-template-columns: repeat(8, 1fr); }
  .quiz-nav { flex-wrap: wrap; }
  .quiz-nav .btn { flex: 1; }
}

/* ---------- 2026 Experience refresh ---------- */
:root {
  --navy-900: #071525;
  --navy-800: #0d2238;
  --accent: #2477f3;
  --accent-dark: #155bcc;
  --accent-soft: #eaf2ff;
  --bg: #f3f6fa;
  --line: #dce4ee;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(6, 24, 44, .05), 0 8px 24px rgba(6, 24, 44, .045);
  --shadow-md: 0 16px 38px rgba(6, 24, 44, .11);
  --shadow-lg: 0 30px 80px rgba(4, 17, 31, .28);
}

body { background: linear-gradient(180deg, #f8fafc 0, var(--bg) 520px); }
.site-header { background: rgba(7, 21, 37, .96); backdrop-filter: blur(18px); }
.header-inner { height: 72px; }
.brand-mark { border-radius: 50%; filter: drop-shadow(0 8px 16px rgba(36,119,243,.24)); }
.main-nav a { font-size: .89rem; padding: .54rem .72rem; }
.main-nav a.active { background: rgba(65, 142, 255, .18); box-shadow: inset 0 0 0 1px rgba(93,159,255,.32); color: #fff; }
.btn { min-height: 44px; border-radius: 12px; }
.btn-primary { background: linear-gradient(135deg, #3487ff, #155bcc); box-shadow: 0 9px 24px rgba(31,111,235,.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 13px 30px rgba(31,111,235,.34); }

.hero {
  position: relative; overflow: hidden; padding: 4.8rem 0 6.3rem;
  background:
    radial-gradient(720px 420px at 72% 8%, rgba(38,126,255,.22), transparent 68%),
    radial-gradient(720px 420px at 4% 100%, rgba(15,155,142,.13), transparent 70%),
    linear-gradient(145deg, #071525 0%, #0b2036 55%, #0a192a 100%);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.hero-inner { position: relative; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); gap: 4.2rem; }
.pill { color: #c4dbff; background: rgba(48,128,247,.12); border-color: rgba(103,166,255,.35); }
.hero h1 { max-width: 690px; font-size: clamp(2.45rem, 4.8vw, 4.25rem); line-height: 1.04; letter-spacing: -.045em; }
.hero h1 .accent { color: #72aaff; }
.lead { max-width: 64ch; font-size: 1.08rem; line-height: 1.75; color: #b9cce0; }
.hero-stats { gap: 0; border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.2rem; padding-top: 1.35rem; }
.hero-stats div { min-width: 116px; padding-right: 1.2rem; margin-right: 1.2rem; border-right: 1px solid rgba(255,255,255,.11); }
.hero-stats div:last-child { border-right: 0; }
.hero-stats b { font-size: 1.45rem; }

.dashboard-preview { padding: 1.25rem; border-radius: 24px; background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.16); box-shadow: var(--shadow-lg); }
.dashboard-preview .hc-head { margin-bottom: 1.2rem; }
.live-label { margin-left: auto; padding: .18rem .5rem; border-radius: 999px; font-size: .65rem; font-weight: 800; letter-spacing: .08em; color: #98f5bb; background: rgba(31, 178, 91, .14); border: 1px solid rgba(82,211,128,.25); }
.cockpit-score { display: grid; grid-template-columns: 116px 1fr; gap: 1.1rem; align-items: center; padding: 1.1rem; border-radius: 18px; background: rgba(3,15,27,.34); border: 1px solid rgba(255,255,255,.08); }
.score-ring { --score: 0deg; width: 108px; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; position: relative; background: conic-gradient(#5c9cff var(--score), rgba(255,255,255,.11) 0); }
.score-ring::after { content: ''; position: absolute; inset: 9px; background: #10263c; border-radius: 50%; }
.score-ring strong, .score-ring span { position: relative; z-index: 1; }
.score-ring strong { font-size: 1.45rem; line-height: 1.1; }
.score-ring span { font-size: .68rem; color: #93a7bd; }
.score-copy { display: flex; flex-direction: column; }
.score-copy > span { color: #93a7bd; font-size: .77rem; text-transform: uppercase; letter-spacing: .07em; }
.score-copy strong { margin: .25rem 0; font-size: 1rem; }
.score-copy small { color: #8ea2b7; line-height: 1.45; }
.cockpit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin: .75rem 0; }
.cockpit-grid div { padding: .72rem .7rem; border-radius: 13px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.cockpit-grid span { display: block; color: #90a5ba; font-size: .68rem; }
.cockpit-grid strong { font-size: 1.13rem; }
.btn-dashboard { width: 100%; color: #eaf3ff; background: rgba(66,139,247,.18); border-color: rgba(103,166,255,.26); }
.btn-dashboard:hover { background: rgba(66,139,247,.28); }

.action-deck { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; margin-top: -2.8rem; }
.action-tile { position: relative; min-height: 148px; padding: 1.25rem; text-align: left; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: var(--shadow-md); cursor: pointer; transition: .2s ease; color: var(--ink); }
.action-tile:hover { transform: translateY(-4px); border-color: #b9cce4; box-shadow: 0 20px 44px rgba(6,24,44,.13); }
.action-tile.action-primary { color: #fff; border-color: transparent; background: linear-gradient(145deg, #256fdc, #1554ad); }
.action-kicker { display: block; margin-bottom: .6rem; font-size: .68rem; font-weight: 800; letter-spacing: .12em; color: var(--accent); }
.action-primary .action-kicker { color: #bcd7ff; }
.action-tile strong { display: block; font-size: 1rem; }
.action-tile small { display: block; margin-top: .35rem; max-width: 24ch; color: var(--ink-mute); line-height: 1.45; }
.action-primary small { color: #d5e5fb; }
.action-arrow { position: absolute; right: 1.1rem; bottom: .9rem; font-size: 1.3rem; color: var(--accent); }
.action-primary .action-arrow { color: #fff; }

.org-banner { margin: 1.4rem auto 0; padding: 1.15rem 1.3rem; display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; border: 1px solid #c9dcf3; border-radius: 18px; background: linear-gradient(135deg, #f3f8ff, #fff); box-shadow: var(--shadow-sm); }
.org-banner strong { display: block; margin-bottom: .25rem; color: var(--ink); }
.org-banner p { margin: 0; color: var(--ink-mute); line-height: 1.55; }
.customer-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; margin: 1rem 0; }
.metric-card { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.metric-card span, .metric-card small { display: block; color: var(--ink-mute); }
.metric-card span { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.metric-card strong { display: block; margin: .32rem 0 .2rem; font-size: 1.55rem; }
.student-invite-form { display: grid; grid-template-columns: 1fr 1.25fr auto; gap: .8rem; align-items: end; margin: 1rem 0; }
.student-table { display: grid; gap: .55rem; margin-top: 1rem; }
.student-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: .8rem; align-items: center; padding: .8rem; border: 1px solid var(--line); border-radius: 13px; background: #fbfdff; }
.student-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: var(--accent); font-weight: 800; }
.student-info strong, .student-info span { display: block; }
.student-info span { margin-top: .1rem; color: var(--ink-mute); font-size: .85rem; }
.student-status { padding: .28rem .55rem; border-radius: 999px; color: #8a5c00; background: #fff1c7; font-size: .75rem; font-weight: 800; }
.student-status.active { color: #166534; background: #dcfce7; }

/* ---------- Seiten- und Inhaltsverwaltung ---------- */
.admin-hero { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.15rem; }
.admin-kicker { display: block; margin-bottom: .45rem; color: var(--accent); font-size: .72rem; font-weight: 850; letter-spacing: .13em; }
.admin-mode-badge { flex: none; padding: .42rem .7rem; border: 1px solid #d9b75c; border-radius: 999px; color: #7a5400; background: #fff7d6; font-size: .78rem; font-weight: 800; }
.admin-overview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .85rem; margin-bottom: 1rem; }
.admin-module-card { display: grid; grid-template-columns: 42px 1fr; gap: .15rem .8rem; align-items: center; padding: 1rem; text-align: left; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: #fff; box-shadow: var(--shadow-sm); cursor: pointer; }
.admin-module-card:hover, .admin-module-card.active { border-color: #9fc1ef; background: #f5f9ff; }
.admin-module-card .module-icon { grid-row: 1 / 3; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #3487ff, #155bcc); font-weight: 850; }
.admin-module-card strong, .admin-module-card small { display: block; }
.admin-module-card small { color: var(--ink-mute); line-height: 1.35; }
.content-admin-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; align-items: start; }
.content-admin-sidebar { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow-sm); }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem; border-bottom: 1px solid var(--line); }
.content-page-item { display: block; width: 100%; padding: .78rem .9rem; text-align: left; border: 0; border-bottom: 1px solid var(--line-soft); color: var(--ink); background: #fff; cursor: pointer; }
.content-page-item:hover, .content-page-item.active { background: var(--accent-soft); }
.content-page-item.active { box-shadow: inset 3px 0 0 var(--accent); }
.content-page-item strong, .content-page-item span { display: block; }
.content-page-item span { margin-top: .16rem; color: var(--ink-mute); font-size: .75rem; }
.content-empty { margin: 0; padding: .9rem; color: var(--ink-mute); font-size: .84rem; line-height: 1.45; }
.content-editor-panel { margin: 0; }
.content-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.content-field-grid .field-wide { grid-column: 1 / -1; }
.content-field-grid .field > span { display: block; margin-bottom: .35rem; color: var(--ink-soft); font-size: .82rem; font-weight: 700; }
.content-field-grid input, .content-field-grid textarea { width: 100%; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; font: inherit; line-height: 1.55; resize: vertical; }
.content-field-grid input:focus, .content-field-grid textarea:focus { outline: 3px solid rgba(36,119,243,.14); border-color: var(--accent); }
.content-savebar { display: flex; gap: .7rem; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.content-savebar > div { margin-right: auto; }
.content-savebar strong, .content-savebar small { display: block; }
.content-savebar small { margin-top: .12rem; color: var(--ink-mute); }
.production-note { margin-top: 1rem; border-color: #cbdcf2; background: #f5f9ff; }
.production-note p { margin: .35rem 0 0; color: var(--ink-mute); line-height: 1.55; }
.danger-text { color: var(--red); }
.rich-copy { font-size: 1.02rem; line-height: 1.75; }
.rich-copy p:first-child { margin-top: 0; }
.rich-copy p:last-child { margin-bottom: 0; }

.section { padding: 4rem 0; }
.section-title { font-size: clamp(1.6rem, 2.7vw, 2.2rem); letter-spacing: -.035em; }
.topic-card, .mode-card, .panel, .question-card { box-shadow: var(--shadow-sm); }
.topic-card { border-radius: 17px; padding: 1.4rem; }
.topic-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.tc-num { border-radius: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.mode-card { border-radius: 18px; }
.chip { min-height: 40px; }
.difficulty-leicht.active { background: #15803d; border-color: #15803d; }
.difficulty-mittel.active { background: #b7791f; border-color: #b7791f; }
.difficulty-schwer.active { background: #b42318; border-color: #b42318; }

@media (max-width: 1050px) {
  .hero-inner { grid-template-columns: 1fr .8fr; gap: 2rem; }
  .action-deck { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .header-auth { margin-left: auto; }
  .main-nav {
    position: absolute; top: 72px; left: 0; right: 0; background: var(--navy-800);
    flex-direction: column; padding: .6rem; gap: .2rem; display: none;
    box-shadow: var(--shadow-lg); border-top: 1px solid rgba(255,255,255,.08);
  }
  .main-nav.open { display: flex; }
}
@media (max-width: 820px) {
  .hero { padding: 3.4rem 0 5.5rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .dashboard-preview { max-width: 560px; width: 100%; }
  .hero-side { max-width: 560px; width: 100%; }
  .action-deck { margin-top: -2.4rem; }
  .customer-metrics { grid-template-columns: repeat(2, 1fr); }
  .student-invite-form { grid-template-columns: 1fr 1fr; }
  .student-invite-form .btn { grid-column: 1 / -1; }
  .admin-overview-grid { grid-template-columns: 1fr; }
  .content-admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .modal-backdrop { padding: .75rem; }
  .modal { padding: 1.2rem; border-radius: 16px; }
  .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .hero { padding-top: 2.7rem; }
  .brand-text small { display: none; }
  .brand-mark, .brand-logo { width: 44px; height: 44px; }
  .hero h1 { font-size: 2.45rem; }
  .lead { font-size: 1rem; }
  .hero-stats div { min-width: 50%; margin: 0; padding: .6rem .8rem .6rem 0; border-right: 0; }
  .action-deck { grid-template-columns: 1fr; gap: .65rem; }
  .action-tile { min-height: 126px; }
  .cockpit-score { grid-template-columns: 96px 1fr; }
  .score-ring { width: 92px; }
  .cockpit-grid { grid-template-columns: 1fr; }
  .cockpit-grid div { display: flex; align-items: center; justify-content: space-between; }
  .cockpit-grid span { font-size: .78rem; }
  .org-banner { align-items: stretch; flex-direction: column; }
  .customer-metrics, .student-invite-form { grid-template-columns: 1fr; }
  .student-row { grid-template-columns: auto 1fr; }
  .student-row .student-status, .student-row .btn { grid-column: 2; justify-self: start; }
  .admin-hero, .content-savebar { align-items: stretch; flex-direction: column; }
  .content-field-grid { grid-template-columns: 1fr; }
  .content-field-grid .field-wide { grid-column: auto; }
  .content-savebar > div { margin-right: 0; }
}
