/* tog.zone — Designsystem.
   Sommerliche Fassung. Grundsätze unverändert: keine abgerundeten
   Ecken, ein Verlauf für Seitenköpfe, weiche farbige Schatten.

   Vier Farbrollen, damit nichts durcheinandergerät:

   Sonne   — der Verlauf und alles Verlinkte. Das frische Orange trägt
             die Seite, wo früher Blau stand.
   Ton     — dunkles Orange für Navigation und dunkle Flächen.
   Aktion  — Natur-Grün. Nur, was der Nutzer auslöst: Primärknöpfe.
   Warnung — Rot bleibt Rot. Ein grüner Löschknopf wäre eine Falle. */

:root {
  /* Ton: Navigation und dunkle Flächen. */
  --clay-900: #6B2A0C;
  --clay-700: #8F3A10;
  --ink: #2B1A0F;
  --nav-divider: #9A4A1E;
  --nav-inactive: #F0C9A8;
  --tab-inactive: #E7B994;
  --tab-bar-idle: #93431A;

  /* Sonne: Verlauf, Links, Modulnummern. */
  --sun-600: #B8460A;
  --grad-start: #EE5709;
  --grad-mid: #FA7A10;
  --grad-end: #FF9B16;

  /* Akzent: die kleinen Marken — Striche, „als Nächstes“, Avatar. */
  --accent: #EE5709;
  --accent-dark: #C24A08;
  --accent-tint: #FFF3E7;

  /* Aktion: Natur-Grün. */
  --go-500: #258644;
  --go-700: #1C6A36;
  --green-600: #14794F;

  /* Warnung und Löschen. */
  --danger: #D93A22;
  --danger-dark: #B02A15;
  --danger-tint: #FFF3F0;

  --page-bg: #FDF6EC;
  --surface: #FFFFFF;
  --border: #EFDFCC;
  --border-strong: #DFC9AE;
  --row-divider: #F7EDE1;
  --track: #F2E4D3;

  --text: #2B1A0F;
  --text-muted: #7C6450;
  --text-subtle: #96806B;
  --text-disabled: #B39C85;
  --header-sub: #FFF0DC;
  --link: #B8460A;

  --grad: linear-gradient(115deg, #EE5709 0%, #FA7A10 50%, #FF9B16 100%);
  --grad-bar: linear-gradient(90deg, #EE5709, #FF9B16);

  --sh-card: 0 24px 44px -24px rgba(120, 52, 10, .30);
  --sh-accent: 0 18px 36px -14px rgba(238, 87, 9, .55);
  --sh-go: 0 14px 28px -10px rgba(37, 134, 68, .5);
  --sh-nav: 0 10px 30px -12px rgba(76, 30, 8, .45);
  --sh-tabs: 0 -10px 30px -12px rgba(76, 30, 8, .4);

  --gutter: 64px;
  --overlap: -28px;
  --rail: 340px;
}

:root[data-theme="dark"] {
  --page-bg: #1E1008;
  --surface: #2C1A0D;
  --border: #4A2C15;
  --border-strong: #5C3A1D;
  --row-divider: #3A230F;
  --track: #3A230F;
  --text: #FFF6EC;
  --text-muted: #C2A187;
  --text-subtle: #B08F73;
  --text-disabled: #8A6B52;
  --accent-tint: rgba(238, 87, 9, .14);
  --accent-dark: #FF8A3D;
  --danger-tint: rgba(217, 58, 34, .14);
  --danger-dark: #FF8266;
  --green-600: #2CB07A;
  --link: #FF9B16;
  /* Modulnummern und Kategorie-Labels heller, sonst verschwinden sie. */
  --sun-600: #FFA02B;
  --sh-card: 0 30px 50px -24px rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: Archivo, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: 30px; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 17px; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1rem; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--grad-end); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
code, pre { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: .92em; }
pre { background: var(--track); padding: 16px; overflow-x: auto; }

/* Keine runden Ecken — ausnahmslos. */
* { border-radius: 0 !important; }

/* ------------------------------------------------------ Top-Navigation */
.nav {
  height: 72px;
  background: var(--clay-900);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 40px;
  gap: 40px;
  position: relative;
  z-index: 3;
  box-shadow: var(--sh-nav);
}
.nav__brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; text-decoration: none; color: #fff; }
.nav__mark {
  width: 36px; height: 28px;
  -webkit-mask: url(/static/img/logo-mark.png) center / contain no-repeat;
  mask: url(/static/img/logo-mark.png) center / contain no-repeat;
  background: linear-gradient(115deg, #FF9B16, #EE5709);
  filter: drop-shadow(0 6px 8px rgba(255, 155, 22, .55));
}
.nav__word { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.nav__word span { color: var(--accent); }
.nav__items { display: flex; height: 100%; gap: 4px; min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.nav__items::-webkit-scrollbar { display: none; }
.nav__items a {
  display: flex; align-items: center; padding: 0 14px; height: 100%;
  font-size: 15px; font-weight: 500; color: var(--nav-inactive);
  white-space: nowrap; text-decoration: none; transition: color .15s ease-out;
}
.nav__items a:hover { color: #fff; }
.nav__items a.is-active { color: #fff; font-weight: 700; box-shadow: inset 0 -3px 0 var(--accent); }
.nav__right { margin-left: auto; display: flex; align-items: center; height: 100%; gap: 4px; flex-shrink: 0; }
.nav__right a { font-size: 14px; }
.nav__sep { width: 1px; height: 28px; background: var(--nav-divider); margin: 0 16px; }
.nav__avatar {
  width: 36px; height: 36px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 16px -6px rgba(238, 87, 9, .6);
}
.nav__avatar:hover { color: #fff; }

/* Schmaler Rahmen: Backoffice-Links weichen, erreichbar bleiben sie über
   das Konto-Menü. Sonst kollidieren sie mit den Hauptpunkten. */
@media (max-width: 1180px) {
  .nav__right a:not(.nav__avatar), .nav__sep { display: none; }
}

/* ------------------------------------------------------- Seitenkopf */
.head {
  position: relative; overflow: hidden;
  background: var(--grad); color: #fff;
  padding: 48px var(--gutter) 44px;
}
.head__mark {
  position: absolute; right: 60px; top: -30px;
  filter: drop-shadow(-30px 30px 30px rgba(120, 52, 10, .35));
  pointer-events: none;
}
.head__mark img { height: 260px; display: block; opacity: .22; }
.head__body { position: relative; display: flex; flex-direction: column; gap: 14px; max-width: 900px; }
.head h1 { font-size: 48px; font-weight: 800; letter-spacing: -.035em; line-height: 1.05; text-shadow: 0 10px 30px rgba(120, 52, 10, .3); }
.head__sub { font-size: 19px; color: var(--header-sub); text-wrap: pretty; }
.head .eyebrow { color: #fff; }
/* Auf dem Verlauf wäre der Strich sonst Orange auf Orange. */
.head .eyebrow::after, .hero .eyebrow::after { background: #fff; }
.head__back { font-size: 14px; color: var(--header-sub); text-decoration: none; position: relative; }
.head__back:hover { color: #fff; }

/* -------------------------------------------------------- Eyebrow */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::after { content: ""; width: 28px; height: 3px; background: var(--accent); flex-shrink: 0; }
.eyebrow--sun { color: var(--sun-600); font-size: 11px; letter-spacing: .2em; }
.eyebrow--sun::after { display: none; }

/* ---------------------------------------------------------- Layout */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.shell > main { flex: 1; }
.wrap { padding: 0 var(--gutter) 72px; }
.wrap--overlap { margin-top: var(--overlap); position: relative; }
.wrap--plain { padding-top: 32px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); gap: 28px; align-items: start; }
.cols--wide { --rail: 360px; }

/* Kursseite: rechts oben die Fortschrittskarte, darunter der Rest.
   Auf Mobil wandert sie über die Module — wie im Entwurf 3e. */
.cols--course > .cols__main { grid-column: 1; grid-row: 1 / span 2; }
.cols--course > .cols__lead { grid-column: 2; grid-row: 1; }
.cols--course > .cols__rail { grid-column: 2; grid-row: 2; display: flex; flex-direction: column; gap: 20px; }

.progresscard { display: flex; flex-direction: column; gap: 16px; }
.progresscard__info { display: flex; flex-direction: column; gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack--lg { gap: 28px; }
.stack--sm { gap: 12px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--top { align-items: flex-start; }
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.center { justify-content: center; }
.spacer { flex: 1; }

/* ----------------------------------------------------------- Karten */
.card { background: var(--surface); border: 1px solid var(--border); }
.card--float { border: 0; box-shadow: var(--sh-card); }
.card--pad { padding: 26px; }
.card--pad-lg { padding: 28px 32px; }
.card__head { padding: 22px 28px; border-bottom: 1px solid var(--border); }
.card__title { display: flex; gap: 12px; align-items: baseline; }
.card__num { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--sun-600); }
.card__sub { font-size: 15px; color: var(--text-muted); padding-left: 32px; }
.card--booked { box-shadow: inset 0 3px 0 var(--accent); }

/* --------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 24px; height: 46px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease-out, border-color .15s ease-out, color .15s ease-out;
}
.btn--primary { background: var(--go-500); color: #fff; box-shadow: var(--sh-go); }
.btn--primary:hover { background: var(--go-700); color: #fff; }
.btn--secondary { border-color: var(--ink); color: var(--text); font-weight: 600; background: transparent; }
.btn--secondary:hover { background: var(--ink); color: var(--surface); }
:root[data-theme="dark"] .btn--secondary { border-color: var(--border); }
:root[data-theme="dark"] .btn--secondary:hover { background: var(--border); color: #fff; }
.btn--onGrad { background: var(--clay-900); color: #fff; font-weight: 600; box-shadow: 0 20px 40px -14px rgba(76, 30, 8, .6); }
.btn--onGrad:hover { background: #55200A; color: #fff; }
.btn--danger { border-color: rgba(217, 58, 34, .45); color: var(--danger-dark); background: transparent; font-weight: 600; }
.btn--danger:hover { background: var(--danger-tint); }
.btn--lg { height: 54px; font-size: 17px; box-shadow: var(--sh-accent); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; box-shadow: none; }
.btn--block { display: flex; width: 100%; }
.btn:disabled, .btn.is-disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* --------------------------------------------------- Fortschritt */
.bar { height: 6px; background: var(--track); overflow: hidden; }
.bar__fill { height: 100%; background: var(--grad-bar); }
.bar--sm { height: 4px; }
.bar--done { background: var(--green-600); }
.metric { display: flex; align-items: baseline; gap: 10px; }
.metric__num { font-size: 40px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.metric__label { font-size: 15px; color: var(--text-muted); }

/* ------------------------------------------------- Lektionszeilen */
.lessons { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.lessons > li { display: contents; }
.lesson {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 28px; border-bottom: 1px solid var(--row-divider);
  color: inherit; text-decoration: none;
}
.lesson:last-child { border-bottom: 0; }
.lesson:hover { color: inherit; background: var(--row-divider); }
.lesson__mark { width: 22px; height: 22px; flex-shrink: 0; border: 1px solid var(--border-strong); }
.lesson__body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lesson__title { font-size: 16px; }
.lesson__meta { font-size: 13px; color: var(--text-subtle); }
.lesson__status {
  font-family: "IBM Plex Mono", monospace; font-size: 12px;
  letter-spacing: .12em; text-transform: uppercase; flex-shrink: 0;
}
.lesson.is-done .lesson__mark {
  background: var(--green-600); border-color: var(--green-600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.lesson.is-done .lesson__status { color: var(--green-600); }
.lesson.is-next {
  background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent);
}
.lesson.is-next .lesson__mark {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 6px 12px -4px rgba(238, 87, 9, .6);
}
.lesson.is-next .lesson__title { font-weight: 600; }
.lesson.is-next .lesson__status { color: var(--accent-dark); }
.lesson.is-locked { color: var(--text-disabled); cursor: default; }
.lesson.is-locked:hover { background: transparent; }
.lesson.is-locked .lesson__meta { color: inherit; }

/* ------------------------------------------------------- Termine */
.event { display: flex; gap: 18px; align-items: flex-start; }
.event + .event { margin-top: 22px; }
.event__date {
  width: 56px; flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; border-right: 1px solid var(--border); padding-right: 14px;
}
.event__day { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.event__mon { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .2em; color: var(--accent); }
.event__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.event__title { font-size: 16px; font-weight: 700; line-height: 1.3; }
.event__title a { color: inherit; }
.event__meta { font-size: 14px; color: var(--text-muted); }

/* --------------------------------------------------------- Player */
.player {
  aspect-ratio: 16 / 9; background: var(--grad); position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; box-shadow: 0 40px 60px -30px rgba(120, 52, 10, .5);
}
.player video, .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player__mark { position: absolute; right: -40px; bottom: -60px; filter: drop-shadow(-30px 30px 30px rgba(120, 52, 10, .35)); }
.player__mark img { height: 380px; display: block; opacity: .18; }
.player__play {
  position: relative; width: 88px; height: 88px; background: var(--accent);
  box-shadow: 0 24px 40px -10px rgba(150, 60, 5, .6);
  display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
}
.player__play::after {
  content: ""; width: 0; height: 0; margin-left: 6px;
  border-left: 26px solid #fff; border-top: 16px solid transparent; border-bottom: 16px solid transparent;
}
.player__note {
  position: relative; color: #fff; font-family: "IBM Plex Mono", monospace;
  font-size: 13px; letter-spacing: .12em; text-align: center; padding: 0 24px;
}
audio { width: 100%; }

/* ------------------------------------------------- Modul-Navigation */
.modnav { background: var(--surface); box-shadow: var(--sh-card); display: flex; flex-direction: column; }
.modnav__head { padding: 20px 22px; background: linear-gradient(115deg, #EE5709, #FF9B16); color: #fff; display: flex; flex-direction: column; gap: 4px; }
.modnav__eyebrow { font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .2em; }
.modnav__title { font-size: 17px; font-weight: 700; }
.modnav__item { padding: 14px 22px; display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none; font-size: 15px; }
.modnav__item:hover { color: inherit; background: var(--row-divider); }
.modnav__dot { width: 18px; height: 18px; flex-shrink: 0; border: 1px solid var(--border-strong); }
.modnav__item.is-done .modnav__dot { background: var(--green-600); border-color: var(--green-600); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.modnav__item.is-current { background: var(--accent-tint); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
.modnav__item.is-current .modnav__dot { background: var(--accent); border-color: var(--accent); }
.modnav__item.is-locked { color: var(--text-muted); cursor: default; }
.modnav__item.is-locked:hover { background: transparent; }

/* ------------------------------------------------------------ Quiz */
.quizbar { height: 6px; background: var(--border); }
.quizbar__fill { height: 100%; background: var(--grad-bar); box-shadow: 0 4px 12px rgba(255, 155, 22, .6); }
.quiz { width: 100%; max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; padding: 56px var(--gutter) 72px; }
.quiz__question { font-size: 36px; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; text-wrap: balance; }
.answers { display: flex; flex-direction: column; gap: 12px; }
.answer {
  background: var(--surface); border: 1px solid var(--border);
  padding: 20px 24px; display: flex; gap: 18px; align-items: center;
  font-size: 17px; cursor: pointer; transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
.answer:hover { border-color: var(--border-strong); }
.answer__key {
  font-family: "IBM Plex Mono", monospace; width: 30px; height: 30px; flex-shrink: 0;
  border: 1px solid var(--border-strong); display: flex; align-items: center;
  justify-content: center; font-size: 14px;
}
.answer input { position: absolute; opacity: 0; pointer-events: none; }
.answer:has(input:checked) {
  border-color: var(--grad-start); font-weight: 600;
  box-shadow: 0 20px 36px -20px rgba(238, 87, 9, .55);
}
.answer:has(input:checked) .answer__key {
  background: linear-gradient(135deg, #EE5709, #FF9B16); color: #fff; border-color: transparent;
}
.answer--correct { border-color: var(--green-600); }
.answer--wrong { border-color: var(--danger); }
.answer textarea { width: 100%; }

/* ---------------------------------------------------------- Formen */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field > span { font-size: 14px; font-weight: 600; }
.field .hint { font-weight: 400; color: var(--text-muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=date], input[type=datetime-local], select, textarea {
  height: 52px; padding: 0 16px; width: 100%;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); font-size: 16px;
}
textarea { height: auto; min-height: 120px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
select { padding-right: 36px; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(238, 87, 9, .18);
}
.field--inline { flex-direction: row; align-items: center; gap: 10px; margin-bottom: 12px; }
.field--inline input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.form-grid { display: grid; gap: 0 20px; }
.form-grid--2 { grid-template-columns: 1fr 1fr; }
.form-grid .wide { grid-column: 1 / -1; }
.divider-or {
  display: flex; align-items: center; gap: 14px; color: var(--text-subtle);
  font-size: 13px; font-family: "IBM Plex Mono", monospace; letter-spacing: .15em;
}
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* -------------------------------------------------------- Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-family: "IBM Plex Mono", monospace; font-size: 11px;
  text-transform: uppercase; letter-spacing: .15em; color: var(--text-muted);
  font-weight: 400; padding: 14px 20px; border-bottom: 1px solid var(--border);
}
td { padding: 14px 20px; border-bottom: 1px solid var(--row-divider); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

/* ---------------------------------------------------------- Chips */
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 0 16px; height: 40px; display: inline-flex; align-items: center;
  border: 1px solid var(--border-strong); font-size: 14px; font-weight: 500;
  color: var(--text); text-decoration: none; background: var(--surface);
}
.chip:hover { border-color: var(--ink); color: var(--text); }
.chip.is-active { background: var(--clay-900); border-color: var(--clay-900); color: #fff; font-weight: 600; }

/* --------------------------------------------------------- Badges */
.badge {
  display: inline-flex; align-items: center; padding: 4px 10px;
  font-family: "IBM Plex Mono", monospace; font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
  border: 1px solid transparent; background: var(--track); color: var(--text-muted);
}
.badge--red { border-color: rgba(217, 58, 34, .5); color: var(--danger-dark); background: transparent; }
.badge--green { color: var(--green-600); border-color: rgba(20, 121, 79, .4); background: transparent; }
.badge--sun { color: var(--sun-600); border-color: rgba(184, 70, 10, .35); background: transparent; }
.badge--solid { background: var(--accent); color: #fff; }

/* -------------------------------------------------------- Hinweise */
.notice { border-left: 3px solid var(--accent); background: var(--surface); border-top: 1px solid var(--border); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 14px 18px; font-size: 15px; }
.notice--ok { border-left-color: var(--green-600); }
.notice--info { border-left-color: var(--sun-600); }
.notice p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------- Prosa */
.prose { max-width: 42rem; }
.prose h2 { margin: 32px 0 12px; }
.prose h3 { margin: 24px 0 10px; }
.prose ul, .prose ol { padding-left: 20px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose blockquote { margin: 0 0 16px; padding-left: 16px; border-left: 3px solid var(--accent); color: var(--text-muted); }
.prose table { margin-bottom: 16px; }
.transcript { border-top: 1px solid var(--border); padding-top: 20px; font-size: 15px; line-height: 1.7; }

/* ------------------------------------------------------------ Chat */
.chat { display: flex; flex-direction: column; gap: 18px; max-height: 26rem; overflow-y: auto; }
.msg { display: flex; gap: 14px; }
.msg__avatar {
  width: 34px; height: 34px; flex-shrink: 0; background: var(--clay-900); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.msg--system .msg__avatar { background: var(--accent); }
.msg__body { flex: 1; min-width: 0; }
.msg__meta { font-size: 12px; color: var(--text-subtle); font-family: "IBM Plex Mono", monospace; letter-spacing: .08em; }
.msg__meta strong { color: var(--text); font-family: Archivo, sans-serif; font-size: 14px; letter-spacing: 0; }
.msg__text { font-size: 15px; }
.msg__text p:last-child { margin-bottom: 0; }

/* ------------------------------------------------- Paywall / SEO */
.paywalled {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  background: var(--surface); padding: 28px;
}
.breadcrumb { font-size: 14px; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--link); }

/* ----------------------------------------------- Öffentliche Seiten */
.topbar {
  height: 80px; display: flex; align-items: center; padding: 0 80px; gap: 40px;
  border-bottom: 1px solid var(--border); background: var(--surface);
}
.topbar__mark {
  width: 40px; height: 31px;
  -webkit-mask: url(/static/img/logo-mark.png) center / contain no-repeat;
  mask: url(/static/img/logo-mark.png) center / contain no-repeat;
  background: linear-gradient(115deg, #EE5709, #FF9B16);
  filter: drop-shadow(0 8px 10px rgba(238, 87, 9, .4));
}
.topbar__word { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.topbar__word span { color: var(--accent); }
.topbar__links { display: flex; gap: 32px; font-size: 16px; color: var(--text-muted); margin-left: 24px; }
.topbar__links a { color: inherit; }

.hero {
  position: relative; overflow: hidden; background: var(--grad); color: #fff;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  padding: 72px 80px; gap: 40px;
}
.hero__body { display: flex; flex-direction: column; gap: 28px; position: relative; z-index: 1; }
.hero h1 { font-size: 68px; font-weight: 800; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; text-shadow: 0 14px 40px rgba(120, 52, 10, .35); }
.hero__lead { font-size: 20px; line-height: 1.5; color: var(--header-sub); max-width: 520px; text-wrap: pretty; }
.hero__art { display: flex; justify-content: center; filter: drop-shadow(-40px 50px 40px rgba(120, 52, 10, .45)); }
.hero__art img { width: 520px; display: block; }
.hero .eyebrow { color: #fff; font-size: 13px; }
.hero .eyebrow::after { width: 36px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); }
.feature { padding: 34px 48px 38px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid var(--border); }
.feature:first-child { padding-left: 80px; }
.feature:last-child { border-right: 0; padding-right: 80px; }
.feature__dash { width: 28px; height: 3px; background: var(--accent); }
.feature h3 { font-size: 21px; }
.feature p { font-size: 16px; color: var(--text-muted); line-height: 1.5; margin: 0; }

.split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.split__art {
  background: linear-gradient(150deg, #EE5709 0%, #FA7A10 55%, #FF9B16 100%);
  position: relative; display: flex; flex-direction: column;
  justify-content: space-between; padding: 64px; color: #fff; overflow: hidden;
}
.split__mark {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  filter: drop-shadow(-40px 50px 40px rgba(120, 52, 10, .45));
}
.split__mark img { width: 420px; display: block; }
.split__claim { position: relative; font-size: 38px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; max-width: 480px; }
.split__form { display: flex; align-items: center; justify-content: center; padding: 64px; background: var(--surface); }
.split__inner { width: 100%; max-width: 420px; }
.dash { width: 32px; height: 3px; background: var(--accent); }

.footer { border-top: 1px solid var(--border); padding: 28px var(--gutter); font-size: 14px; color: var(--text-muted); background: var(--surface); }
.footer a { color: var(--text-muted); }

/* ------------------------------------------- Mobile Tab-Navigation */
.tabbar { display: none; }

/* ------------------------------------------------------ Hilfsklassen */
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); font-size: 13px; }
.small { font-size: 14px; }
.mono { font-family: "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.strong { font-weight: 700; }
.mb0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.text-red { color: var(--danger-dark); }
.text-green { color: var(--green-600); }
.hide-desk { display: none; }

/* ============================================================ Mobil */
@media (max-width: 900px) {
  :root { --gutter: 16px; --rail: 100%; }

  .nav { display: none; }
  .hide-desk { display: initial; }

  .head { padding: 34px 16px 44px; }
  .head h1 { font-size: 32px; letter-spacing: -.03em; }
  .head__sub { font-size: 15px; line-height: 1.45; }
  .head__mark { right: -40px; top: 30px; }
  .head__mark img { height: 160px; opacity: .2; }

  .cols { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cols--course > .cols__lead { grid-column: 1; grid-row: 1; }
  .cols--course > .cols__main { grid-column: 1; grid-row: 2; }
  .cols--course > .cols__rail { grid-column: 1; grid-row: 3; }

  /* Kompakte Fortschrittskarte: Zahl links, Aktion rechts. */
  .progresscard { flex-direction: row; align-items: center; gap: 16px; }
  .progresscard__info { flex: 1; min-width: 0; }
  .progresscard .eyebrow { display: none; }
  .progresscard .metric { gap: 4px 8px; flex-wrap: wrap; }
  .progresscard .metric__label { font-size: 13px; }
  .progresscard .btn { width: auto; margin: 0; padding: 0 16px; height: 48px; }
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 0 16px 96px; }
  .stack, .stack--lg { gap: 14px; }

  .card--pad, .card--pad-lg { padding: 18px; }
  .card__head { padding: 16px 18px; }
  .card__sub { padding-left: 0; }

  .lesson { padding: 14px 18px; min-height: 56px; }
  .lesson__status { display: none; }
  .lesson__title { font-size: 15px; }
  .lesson__mark { width: 20px; height: 20px; }

  .bar { height: 5px; }
  .metric__num { font-size: 26px; }

  .quiz { padding: 24px 16px 96px; gap: 22px; }
  .quiz__question { font-size: 24px; }
  .answer { padding: 16px 18px; font-size: 15px; }

  .player__play { width: 64px; height: 64px; }
  .player__play::after { border-left-width: 19px; border-top-width: 12px; border-bottom-width: 12px; }

  .topbar { height: 64px; padding: 0 16px; gap: 16px; }
  .topbar__links { display: none; }

  .hero { grid-template-columns: 1fr; padding: 40px 20px 48px; gap: 28px; }
  .hero h1 { font-size: 38px; }
  .hero__lead { font-size: 17px; }
  .hero__art img { width: 100%; max-width: 300px; }

  .features { grid-template-columns: 1fr; }
  .feature, .feature:first-child, .feature:last-child {
    padding: 24px 20px; border-right: 0; border-bottom: 1px solid var(--border);
  }

  .split { grid-template-columns: 1fr; min-height: 0; }
  .split__art { padding: 32px 20px; min-height: 220px; }
  .split__mark img { width: 200px; }
  .split__claim { font-size: 24px; }
  .split__form { padding: 32px 20px 96px; }

  .form-grid--2 { grid-template-columns: 1fr; }
  .footer { padding: 24px 16px 96px; }

  /* Tab-Leiste unten */
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--clay-900); padding: 0 8px calc(env(safe-area-inset-bottom, 0px) + 12px);
    box-shadow: var(--sh-tabs);
  }
  .tabbar a {
    height: 56px; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 8px; font-size: 12px; font-weight: 500;
    color: var(--tab-inactive); text-decoration: none;
  }
  .tabbar a::before { content: ""; width: 22px; height: 3px; background: var(--tab-bar-idle); }
  .tabbar a.is-active { color: #fff; font-weight: 700; }
  .tabbar a.is-active::before { background: var(--accent); box-shadow: 0 4px 10px rgba(255, 155, 22, .8); }

  /* Feste Aktionsleiste für Lektion und Test */
  .actionbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
    display: flex; gap: 12px;
  }
  .actionbar .btn { flex: 1; height: 50px; }
  .has-actionbar .tabbar { display: none; }
}

@media (min-width: 901px) {
  .actionbar { display: contents; }
  .actionbar .btn { flex: none; }
}

/* --------------------------------------- Ergänzungen fürs Backoffice */
.card__body { padding: 26px; }
.card .lessons .lesson:last-child { border-bottom: 0; }
.eyebrow + .form-grid, .eyebrow + p { margin-top: 0; }
.field--inline > span { margin: 0; }
input[type=file] { height: auto; padding: 12px 16px; }
.stack > form { margin: 0; }
.notice + .notice { margin-top: 10px; }
s { color: var(--text-subtle); }
