/* GRUNDSTEIN — Fit für die Bank · Lernplattform
   Brand: Immoglatze (Off-White / Petrolblau / Sky / Anthrazit)
   Fonts self-hosted (DSGVO: kein Google-CDN-Call) */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/Fraunces.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/Fraunces-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/PlusJakartaSans.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}

:root {
  --cream: #F2F2F1;
  --cream-warm: #EFEAE1;
  --paper: #FFFFFF;
  --paper-soft: #FAFAF9;
  --ink: #2B2A2B;
  --ink-soft: #444444;
  --ink-mute: #7A7A7A;
  --line: rgba(43,42,43,0.08);
  --line-soft: rgba(43,42,43,0.05);
  --blue: #004976;
  --blue-deep: #003A5E;
  --sky: #56A8DC;
  --sky-soft: #E6EEF4;
  --sky-tint: #F0F6FA;
  --sand: #E8DFC9;
  --hot: #B8462B;
  --hot-bg: #F4E2D7;
  --warm-c: #C68B3E;
  --warm-bg: #F5E8D0;
  --good: #4A6B3A;
  --good-bg: #DCE5D1;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  color: var(--ink-soft);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
}
.ico { width: 18px; height: 18px; stroke-width: 1.4; flex-shrink: 0; }

/* === APP layout === */
.app {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* === SIDEBAR === */
.side {
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
}
.side-head {
  padding: 32px 28px 26px;
  border-bottom: 1px solid var(--line);
}
.side-head img { height: 60px; width: auto; display: block; margin-bottom: 24px; }
.eyebrow-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  background: var(--sky-tint);
  border: 1px solid rgba(0,73,118,0.1);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--blue);
  margin-bottom: 14px;
}
.eyebrow-tag::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--blue);
  border-radius: 50%;
}
.course-title {
  font-family: 'Fraunces', serif;
  font-size: 1.85rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variation-settings: "opsz" 144;
}
.course-sub {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 8px;
  letter-spacing: 0.02em;
}

.progress-wrap {
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.progress-label span:last-child { color: var(--blue); }
.progress-bar {
  height: 4px;
  background: var(--cream);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--sky));
  transition: width 1s var(--ease);
  border-radius: 999px;
}

.module-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.module-list::-webkit-scrollbar { width: 4px; }
.module-list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }

.module {
  padding: 16px 28px;
  display: flex;
  gap: 14px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.5s var(--ease);
  position: relative;
}
.module:hover { background: var(--cream); }
.module.active {
  background: var(--sky-tint);
  border-left-color: var(--blue);
}
.module.locked { opacity: 0.45; cursor: not-allowed; }
.module.locked:hover { background: transparent; }

.mod-status {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--paper);
  background: rgba(43,42,43,0.15);
  margin-top: 2px;
  transition: all 0.4s var(--ease);
  border: 2px solid transparent;
}
.module.done .mod-status { background: var(--good); }
.module.active .mod-status { background: var(--blue); }
.module.locked .mod-status { background: var(--cream); color: var(--ink-mute); border-color: var(--line); }
.mod-status .ico { width: 14px; height: 14px; }

.mod-info { flex: 1; min-width: 0; }
.mod-num {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin-bottom: 3px;
}
.module.active .mod-num { color: var(--blue); }
.mod-name {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.mod-meta {
  font-size: 11.5px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

.side-foot {
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--ink-mute);
  line-height: 1.5;
}
.side-foot strong { color: var(--ink); font-weight: 600; }

/* === MAIN === */
.main { background: var(--cream); min-height: 100vh; }
.topbar {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 16px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
}
.crumbs {
  font-size: 12.5px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.crumbs strong { color: var(--ink); font-family: 'Fraunces', serif; font-weight: 500; font-size: 13.5px; }
.crumbs .sep { color: rgba(43,42,43,0.25); margin: 0 10px; }
.topbar-right { display: flex; align-items: center; gap: 14px; font-size: 12.5px; }
.streak {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.streak .ico { color: var(--warm-c); }

.content {
  padding: 56px 48px 120px;
  max-width: 920px;
  margin: 0 auto;
}

/* === Module header === */
.mod-header { margin-bottom: 40px; }
.mod-header .tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 12px;
  background: var(--sky-tint);
  border: 1px solid rgba(0,73,118,0.1);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--blue);
  margin-bottom: 22px;
}
.mod-header .tag::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--blue);
  border-radius: 50%;
}
.mod-header h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 400;
  margin-bottom: 16px;
  max-width: 720px;
  line-height: 1.05;
}
.mod-header h1 em { color: var(--blue); font-style: italic; font-weight: 500; }
.mod-header .desc {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 660px;
  line-height: 1.6;
}

/* === Completion banner === */
.completion {
  background: linear-gradient(135deg, var(--good) 0%, #5C8048 100%);
  color: white;
  padding: 24px 28px;
  border-radius: 20px;
  margin-bottom: 32px;
  display: none;
  align-items: center;
  gap: 20px;
  box-shadow: 0 20px 40px -20px rgba(74,107,58,0.4);
  animation: slideIn 0.7s var(--ease);
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}
.completion.show { display: flex; }
.comp-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.completion h4 { color: white; font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 500; margin-bottom: 4px; }
.completion p { color: rgba(255,255,255,0.88); font-size: 13.5px; margin: 0; }

/* === Lessons bar === */
.lessons-bar {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(43,42,43,0.025);
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-bottom: 28px;
  overflow-x: auto;
}
.lesson-tab {
  flex: 1;
  min-width: 150px;
  padding: 14px 16px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--ink-soft);
  transition: all 0.5s var(--ease);
  text-align: left;
  border: none;
  background: transparent;
  font-family: 'Plus Jakarta Sans', sans-serif;
}
.lesson-tab:hover { background: rgba(43,42,43,0.04); color: var(--ink); }
.lesson-tab.active { background: var(--ink); color: white; }
.lesson-tab.done .lt-num { color: var(--good); }
.lesson-tab.active.done { background: var(--good); color: white; }
.lesson-tab.active.done .lt-num { color: rgba(255,255,255,0.7); }
.lt-num { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; opacity: 0.78; display: block; }
.lt-name { font-family: 'Fraunces', serif; font-weight: 500; margin-top: 4px; display: block; font-size: 14px; letter-spacing: -0.005em; }
.lt-time { font-size: 11px; opacity: 0.7; margin-top: 3px; display: block; }

/* === Video player === */
.video-wrap {
  background: rgba(43,42,43,0.025);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 24px;
  margin-bottom: 32px;
}
.video-frame {
  background: var(--ink);
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 1px rgba(255,255,255,0.1) inset;
  background-image:
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(86,168,220,0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 75% 70%, rgba(0,73,118,0.5) 0%, transparent 55%),
    linear-gradient(135deg, rgba(43,42,43,0.6) 0%, rgba(0,73,118,0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.7s var(--ease);
}
.video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.45));
  z-index: 1;
}
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  background: #000;
}
.play-btn {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.7s var(--ease);
  position: relative;
  z-index: 2;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35), 0 1px 1px rgba(255,255,255,0.5) inset;
}
.video-frame:hover .play-btn { transform: scale(1.08); }
.play-btn svg { width: 32px; height: 32px; margin-left: 5px; }

.video-info {
  position: absolute;
  bottom: 24px;
  left: 28px;
  right: 28px;
  color: white;
  z-index: 2;
}
.vt-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}
.vt-tag::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--sky);
  border-radius: 50%;
}
.video-info h3 {
  color: white;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  font-weight: 500;
  margin-bottom: 6px;
  max-width: 600px;
  line-height: 1.2;
}
.vt-meta {
  font-size: 12.5px;
  opacity: 0.82;
  display: flex;
  gap: 16px;
  letter-spacing: 0.02em;
}

/* === Section === */
.section {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 40px;
  margin-bottom: 24px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}
.section h3 { font-size: 1.65rem; margin-bottom: 18px; font-weight: 500; }
.section h4 { font-size: 1.05rem; font-family: 'Fraunces', serif; font-weight: 500; margin-top: 24px; margin-bottom: 10px; }
.section p { font-size: 15.5px; margin-bottom: 14px; line-height: 1.7; color: var(--ink-soft); }
.section p:last-child { margin-bottom: 0; }
.section ul, .section ol { padding-left: 24px; margin-bottom: 12px; }
.section li { font-size: 15.5px; line-height: 1.7; margin-bottom: 8px; color: var(--ink-soft); }
.lernziel {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 20px;
  background: var(--sky-tint);
  border: 1px solid rgba(0,73,118,0.1);
  border-radius: 14px;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--blue);
  line-height: 1.6;
}
.lernziel .ico { color: var(--blue); margin-top: 2px; }
.lernziel strong { font-weight: 700; }

/* === Übung === */
.uebung {
  background: var(--warm-bg);
  border: 1px solid rgba(198,139,62,0.25);
  border-radius: 22px;
  padding: 30px 36px;
  margin-bottom: 24px;
}
.uebung-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(198,139,62,0.3);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--warm-c);
  margin-bottom: 14px;
}
.uebung-badge::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--warm-c);
  border-radius: 50%;
}
.uebung h4 { font-size: 1.2rem; font-weight: 500; margin-bottom: 10px; }
.uebung p { font-size: 14.5px; line-height: 1.65; color: var(--ink-soft); margin-bottom: 10px; }
.uebung p:last-child { margin-bottom: 0; }

/* === Checklist === */
.checklist {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 36px;
  margin-bottom: 24px;
}
.checklist-head { margin-bottom: 22px; }
.checklist h4 { font-family: 'Fraunces', serif; font-size: 1.35rem; font-weight: 500; margin-bottom: 6px; }
.checklist .sub { font-size: 13.5px; color: var(--ink-mute); }
.check-group {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--blue);
  padding: 18px 0 4px;
}
.check-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: flex-start;
  cursor: pointer;
  transition: opacity 0.4s var(--ease);
}
.check-item:last-child { border-bottom: 0; }
.check-item:hover .check-box { border-color: var(--blue); }
.check-box {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1.5px solid rgba(43,42,43,0.2);
  background: var(--paper);
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.5s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}
.check-item.checked .check-box {
  background: var(--good);
  border-color: var(--good);
  color: white;
  box-shadow: 0 4px 12px -2px rgba(74,107,58,0.4);
}
.check-item.checked .check-text { color: var(--ink-mute); text-decoration: line-through; }
.check-text { font-size: 14.5px; line-height: 1.55; color: var(--ink-soft); }
.check-text strong { color: var(--ink); font-weight: 600; }

/* === Quiz === */
.quiz {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.quiz::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--sky));
}
.quiz-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.quiz-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  background: var(--sky-tint);
  border: 1px solid rgba(0,73,118,0.1);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--blue);
}
.quiz-badge::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--blue);
  border-radius: 50%;
}
.quiz-q {
  font-family: 'Fraunces', serif;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 24px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt {
  padding: 16px 22px;
  background: var(--cream);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink);
  transition: all 0.5s var(--ease);
  text-align: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 14px;
}
.quiz-opt .opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mute);
  flex-shrink: 0;
  transition: all 0.5s var(--ease);
}
.quiz-opt:not(:disabled):hover { border-color: rgba(0,73,118,0.3); background: var(--sky-tint); transform: translateY(-1px); }
.quiz-opt:not(:disabled):hover .opt-letter { background: var(--blue); color: white; border-color: var(--blue); }
.quiz-opt.correct { background: var(--good-bg); border-color: var(--good); color: var(--good); font-weight: 600; }
.quiz-opt.correct .opt-letter { background: var(--good); color: white; border-color: var(--good); }
.quiz-opt.wrong { background: var(--hot-bg); border-color: var(--hot); color: var(--hot); }
.quiz-opt.wrong .opt-letter { background: var(--hot); color: white; border-color: var(--hot); }
.quiz-feedback {
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.6;
  display: none;
}
.quiz-feedback.correct { background: var(--good-bg); color: var(--good); display: block; }
.quiz-feedback.wrong { background: var(--hot-bg); color: var(--hot); display: block; }

/* === Abschluss / Scorecard === */
.abschluss {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 36px 40px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.abschluss::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--warm-c), var(--sand));
}
.score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}
.score-row:last-of-type { border-bottom: 0; }
.score-label { font-size: 14.5px; color: var(--ink-soft); line-height: 1.5; flex: 1; }
.score-btns { display: flex; gap: 6px; flex-shrink: 0; }
.score-btn {
  min-width: 38px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--cream);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-mute);
  cursor: pointer;
  transition: all 0.4s var(--ease);
}
.score-btn:hover { border-color: var(--blue); color: var(--blue); }
.score-btn.sel-1 { background: var(--hot-bg); border-color: var(--hot); color: var(--hot); }
.score-btn.sel-2 { background: var(--warm-bg); border-color: var(--warm-c); color: var(--warm-c); }
.score-btn.sel-3 { background: var(--good-bg); border-color: var(--good); color: var(--good); }
.score-result {
  margin-top: 20px;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--sky-tint);
  border: 1px solid rgba(0,73,118,0.1);
  font-size: 14px;
  color: var(--blue);
  line-height: 1.6;
  display: none;
}
.score-result.show { display: block; }
.score-result strong { font-family: 'Fraunces', serif; font-size: 1.05rem; }

/* === Notes / freie Eingaben === */
.notes-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 32px;
  margin-bottom: 24px;
}
.notes-box h4 {
  font-size: 1.05rem;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Fraunces', serif;
  font-weight: 500;
}
.notes-box .save-hint {
  font-size: 10px;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
}
.notes-box .save-hint::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%; background: var(--good);
}
.notes-area {
  width: 100%;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 14.5px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--ink-soft);
  resize: vertical;
  background: var(--cream);
  line-height: 1.6;
  transition: all 0.4s var(--ease);
}
.notes-area:focus { outline: none; border-color: var(--blue); background: var(--paper); box-shadow: 0 0 0 4px rgba(0,73,118,0.08); }

/* === Nav buttons === */
.lesson-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 6px 6px 24px;
  border-radius: 999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #FFF;
  transition: all 0.6s var(--ease);
  line-height: 1;
}
.btn-ico {
  width: 34px; height: 34px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  margin-left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.6s var(--ease);
}
.btn-ico svg { width: 14px; height: 14px; stroke-width: 1.5; }
.btn:hover { transform: scale(0.98); }
.btn:hover .btn-ico { transform: translate(2px, -1px) scale(1.06); background: rgba(255,255,255,0.2); }
.btn.blue { background: var(--blue); border-color: var(--blue); }
.btn.blue:hover { background: var(--blue-deep); }
.btn.ghost { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn.ghost .btn-ico { background: rgba(43,42,43,0.06); color: var(--ink); }
.btn.ghost:hover .btn-ico { background: rgba(43,42,43,0.1); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.pill-good { background: var(--good-bg); color: var(--good); }
.pill-active { background: var(--sky-tint); color: var(--blue); }

/* Kurs-Abschluss-Feier */
.finale {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: white;
  padding: 48px 44px;
  border-radius: 26px;
  margin-bottom: 28px;
  text-align: center;
  box-shadow: 0 30px 60px -25px rgba(0,73,118,0.45);
}
.finale h2 { color: white; font-size: 2.2rem; font-weight: 400; margin-bottom: 14px; }
.finale h2 em { color: var(--sky); font-style: italic; }
.finale p { color: rgba(255,255,255,0.85); font-size: 15.5px; max-width: 560px; margin: 0 auto 8px; line-height: 1.7; }

/* === Opt-in-Gate === */
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.gate::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
.gate-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: rgba(43,42,43,0.025);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: 28px;
  margin: auto;
}
.gate-inner {
  background: var(--paper);
  border-radius: 22px;
  padding: 44px 44px 36px;
  box-shadow: 0 1px 1px rgba(255,255,255,0.7) inset, 0 30px 60px -25px rgba(0,73,118,0.14);
}
.gate-inner img { height: 56px; margin-bottom: 22px; }
.gate-inner h1 {
  font-size: 2.1rem;
  font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.1;
}
.gate-inner h1 em { color: var(--blue); font-style: italic; font-weight: 500; }
.gate-sub { font-size: 14.5px; color: var(--ink-soft); line-height: 1.65; margin-bottom: 22px; }
.gate-points { list-style: none; margin-bottom: 26px; }
.gate-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  color: var(--ink-soft);
  padding: 6px 0;
  line-height: 1.5;
}
.gate-points .ico { color: var(--good); width: 16px; height: 16px; margin-top: 2px; }
.gate-field { margin-bottom: 14px; }
.gate-field label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  margin-bottom: 6px;
}
.gate-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 15px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--ink);
  background: var(--cream);
  transition: all 0.4s var(--ease);
}
.gate-field input:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(0,73,118,0.08);
}
.gate-hp { position: absolute; left: -9999px; top: -9999px; height: 1px; width: 1px; overflow: hidden; }
.gate-error {
  display: none;
  background: var(--hot-bg);
  color: var(--hot);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.gate-error.show { display: block; }
.gate-submit {
  width: 100%;
  justify-content: center;
  padding: 16px 24px;
  font-size: 15px;
  border-radius: 16px;
}
.gate-submit:disabled { opacity: 0.6; cursor: wait; }
.gate-legal {
  font-size: 11px;
  color: var(--ink-mute);
  line-height: 1.6;
  margin-top: 16px;
}
.gate-legal a { color: var(--blue); }

/* Mobile */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: relative; height: auto; }
  .module-list { max-height: 320px; }
  .topbar { padding: 14px 20px; }
  .content { padding: 32px 20px 60px; }
  .mod-header h1 { font-size: 2rem; }
  .video-info h3 { font-size: 1.1rem; }
  .play-btn { width: 72px; height: 72px; }
  .play-btn svg { width: 26px; height: 26px; }
  .crumbs { font-size: 11px; }
  .section, .quiz, .abschluss { padding: 26px 22px; }
  .checklist, .uebung { padding: 24px 20px; }
  .score-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .gate-inner { padding: 32px 24px 28px; }
  .gate-inner h1 { font-size: 1.7rem; }
}
