/* ============================================================
   NOW ACADEMY — ein Stylesheet fuer alle Seiten.
   Farben und Schriften wie auf den Landingpages (kern.css), aber ohne
   deren Mechanik. Keine Farbe als Literal ausserhalb von :root, ausser
   den goldenen rgba-Stufen.
   ============================================================ */

:root {
  --gold: #C9A84C;
  --gold-light: #E2C97A;
  --gold-dark: #A07830;
  --black: #0e0c0a;
  --surface: #181410;
  --surface-2: #211d18;
  --border: rgba(201, 168, 76, 0.28);
  --linie: rgba(255, 255, 255, 0.08);
  --text: #f2efe9;
  --text-muted: #a9a49d;
  --rot: #E85A44;
  --gruen: #7FB77E;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius: 6px;
  --radius-lg: 12px;
  --t: 0.25s ease;
}

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

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(201, 168, 76, 0.10) 0%, transparent 65%),
    var(--black);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.inhalt { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
main { flex: 1 0 auto; }

/* --- Kopfzeile --- */
.kopf {
  border-bottom: 1px solid var(--linie);
  background: rgba(14, 12, 10, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.kopf__innen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.marke { display: flex; align-items: center; gap: 12px; color: var(--text); }
.marke:hover { color: var(--text); }
.marke img { width: 36px; height: 36px; }
.marke span { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; }
.marke em { color: var(--gold); font-style: italic; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a, .nav button {
  background: none; border: 0; cursor: pointer;
  padding: 8px 12px; border-radius: var(--radius);
  font-size: 0.9rem; color: var(--text-muted);
  transition: color var(--t), background var(--t);
}
.nav a:hover, .nav button:hover, .nav a[aria-current] { color: var(--text); background: rgba(255, 255, 255, 0.05); }

/* --- Fuss --- */
.fuss {
  flex-shrink: 0;
  border-top: 1px solid var(--linie);
  padding: 22px 0 30px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.fuss .inhalt { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }
.fuss nav { display: flex; gap: 20px; }
.fuss a { color: var(--text-muted); }
.fuss a:hover { color: var(--gold); }

/* --- Typografie --- */
.titel {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.titel em { color: var(--gold); font-style: italic; }
.untertitel { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.leise { color: var(--text-muted); }
.klein { font-size: 0.88rem; }
h2.abschnitt { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; margin: 0 0 16px; }

/* --- Knoepfe --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; min-height: 48px;
  border: 0; border-radius: var(--radius); cursor: pointer;
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; letter-spacing: 0.03em;
  transition: background var(--t), transform var(--t), box-shadow var(--t), color var(--t), border-color var(--t);
  text-align: center;
}
.btn--gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--black); box-shadow: 0 0 18px rgba(201, 168, 76, 0.22); }
.btn--gold:hover { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--black); transform: translateY(-1px); }
.btn--rand { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, 0.16); }
.btn--rand:hover { border-color: var(--gold); color: var(--text); }
.btn--klein { min-height: 36px; padding: 7px 14px; font-size: 0.84rem; }
.btn--voll { width: 100%; }
.btn--gefahr { background: transparent; color: var(--rot); border: 1px solid rgba(232, 90, 68, 0.45); }
.btn--gefahr:hover { background: rgba(232, 90, 68, 0.1); color: var(--rot); }
.btn[disabled] { opacity: 0.55; cursor: wait; transform: none; }

/* --- Karten und Formulare (Login & Co.) --- */
.seite-mitte { justify-content: center; align-items: center; }
.seite-mitte main { display: flex; align-items: center; justify-content: center; width: 100%; padding: 48px 16px; }
.karte {
  width: 100%;
  background: linear-gradient(155deg, #1c1810 0%, #141008 100%);
  border: 1px solid rgba(201, 168, 76, 0.22);
  border-radius: var(--radius-lg);
  padding: 34px 30px;
}
.karte--schmal { max-width: 440px; text-align: left; }
.logo-klein { width: 56px; height: 56px; margin: 0 auto 18px; }
.karte .titel { text-align: center; font-size: clamp(1.6rem, 4vw, 2rem); }
.karte > .leise { text-align: center; margin-bottom: 24px; }

.formular { display: flex; flex-direction: column; gap: 14px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label { font-size: 0.85rem; color: var(--text-muted); }
.eingabe {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  color: var(--text); font-size: 1rem; font-family: var(--font-body);
  transition: border-color var(--t), background var(--t);
}
.eingabe:focus { outline: none; border-color: var(--gold); background: rgba(255, 255, 255, 0.06); }
.passwort { position: relative; }
.passwort .eingabe { padding-right: 84px; }
.passwort__zeigen {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; padding: 6px 10px;
  font-size: 0.8rem; color: var(--text-muted);
}
.passwort__zeigen:hover { color: var(--gold); }
.meldung { padding: 12px 14px; border-radius: var(--radius); font-size: 0.92rem; line-height: 1.5; }
.meldung--fehler { background: rgba(232, 90, 68, 0.1); border: 1px solid rgba(232, 90, 68, 0.4); color: #f3b3a8; }
.meldung--info { background: rgba(201, 168, 76, 0.08); border: 1px solid rgba(201, 168, 76, 0.35); color: var(--text); }
.meldung--ok { background: rgba(127, 183, 126, 0.1); border: 1px solid rgba(127, 183, 126, 0.4); color: #cfe6ce; }
.unter-formular { margin-top: 18px; text-align: center; font-size: 0.9rem; color: var(--text-muted); }

/* --- Fortschrittsbalken --- */
.balken { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.balken__fuellung {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.balken--gross { height: 12px; }
.fortschritt-zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 0.9rem; color: var(--text-muted); }
.fortschritt-zeile strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; color: var(--gold); }

/* --- Meine Kurse --- */
.begruessung { padding-top: 48px; padding-bottom: 28px; }
.kachel-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; padding-bottom: 64px; }
.kachel {
  display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(155deg, #1c1810 0%, #141008 100%);
  border: 1px solid rgba(201, 168, 76, 0.22); border-radius: var(--radius-lg);
  padding: 26px 24px; color: var(--text);
  transition: border-color var(--t), transform var(--t);
}
.kachel:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
.kachel h3 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; line-height: 1.2; }
.kachel p { color: var(--text-muted); font-size: 0.95rem; }
.kachel .btn { align-self: flex-start; margin-top: auto; }
.leer { padding: 40px 0 80px; color: var(--text-muted); }

/* --- Kursseite --- */
.kurs-kopf { padding-top: 36px; padding-bottom: 22px; }
.kurs-kopf .titel { margin-bottom: 18px; }
.willkommen { margin-bottom: 20px; }
.kurs-raster { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; padding-bottom: 72px; }
.buehne { position: sticky; top: 84px; min-width: 0; }
.player {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: radial-gradient(ellipse 60% 60% at 50% 50%, rgba(201, 168, 76, 0.10) 0%, transparent 70%), var(--surface-2);
  overflow: hidden;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; }
.player__start {
  position: absolute; inset: 0; z-index: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: none; border: 0; cursor: pointer; color: var(--gold);
}
.player__start svg { width: 76px; height: 76px; transition: transform var(--t); }
.player__start:hover svg { transform: scale(1.08); }
.player__start span { font-size: 0.92rem; font-weight: 500; letter-spacing: 0.04em; color: var(--text); }
.player--leer .player__start { cursor: default; }
.player--leer .player__start svg { display: none; }
.player--leer .player__start span { color: var(--text-muted); }

.lektion-info { padding-top: 20px; }
.lektion-info__modul { font-size: 0.76rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.lektion-info h2 { font-family: var(--font-display); font-size: clamp(1.35rem, 2.6vw, 1.8rem); font-weight: 500; line-height: 1.25; margin-bottom: 12px; }
.lektion-info p { color: var(--text-muted); margin-bottom: 20px; max-width: 70ch; }
.leiste { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.leiste .rechts { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.erledigt-knopf[aria-pressed="true"] { border-color: rgba(127, 183, 126, 0.6); color: #cfe6ce; }

.liste {
  border: 1px solid rgba(201, 168, 76, 0.22); border-radius: var(--radius-lg);
  background: linear-gradient(155deg, #1c1810 0%, #141008 100%);
  padding: 14px 10px 8px;
}
.liste__modul { padding: 12px 10px 4px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.liste__modul span { display: block; margin-top: 2px; font-family: var(--font-display); font-size: 1.02rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); }
.liste ol { list-style: none; }
.lektion {
  display: flex; align-items: flex-start; gap: 12px; width: 100%;
  padding: 10px 10px; border: 0; border-radius: var(--radius); background: none;
  text-align: left; cursor: pointer; font-size: 0.92rem; line-height: 1.45; color: var(--text-muted);
  transition: background var(--t), color var(--t);
}
.lektion:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.lektion--aktiv { background: rgba(201, 168, 76, 0.10); color: var(--text); }
.lektion__ring { flex: 0 0 auto; position: relative; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid rgba(201, 168, 76, 0.55); }
.lektion--aktiv .lektion__ring { border-color: var(--gold); box-shadow: inset 0 0 0 3px #161209, inset 0 0 0 8px var(--gold); }
.lektion--fertig .lektion__ring { background: var(--gold); border-color: var(--gold); box-shadow: none; }
.lektion--fertig .lektion__ring::after {
  content: ''; position: absolute; left: 4.5px; top: 1.5px; width: 3.5px; height: 7px;
  border: solid #161209; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}
.abschluss { margin-top: 28px; padding: 28px 24px; text-align: center; border: 1px solid rgba(201, 168, 76, 0.34); border-radius: var(--radius-lg); background: rgba(201, 168, 76, 0.05); }
.abschluss h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; margin-bottom: 8px; }
.abschluss p { color: var(--text-muted); margin-bottom: 18px; }

/* --- Admin --- */
.admin-kopf { padding-top: 36px; padding-bottom: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.kennzahlen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.kennzahl { padding: 18px 18px 16px; border: 1px solid var(--linie); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.025); }
.kennzahl b { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 500; line-height: 1.1; color: var(--text); }
.kennzahl span { font-size: 0.85rem; color: var(--text-muted); }
.trichter { border: 1px solid var(--linie); border-radius: var(--radius-lg); padding: 18px 18px 8px; margin-bottom: 30px; background: rgba(255, 255, 255, 0.02); }
.trichter__zeile { display: grid; grid-template-columns: minmax(0, 1fr) 200px 54px; gap: 14px; align-items: center; padding: 7px 0; font-size: 0.9rem; border-top: 1px solid var(--linie); }
.trichter__zeile:first-of-type { border-top: 0; }
.trichter__zeile b { font-weight: 600; text-align: right; color: var(--gold); }
.werkzeuge { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }
.werkzeuge .eingabe { max-width: 340px; min-height: 42px; }
.tabelle-huelle { border: 1px solid var(--linie); border-radius: var(--radius-lg); overflow-x: auto; margin-bottom: 72px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); background: rgba(255, 255, 255, 0.025); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .klein { color: var(--text-muted); }
td .balken { width: 120px; margin-top: 6px; }
.marke-status { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 0.75rem; font-weight: 600; }
.marke-status--aktiv { background: rgba(127, 183, 126, 0.12); color: #bfe0be; }
.marke-status--gesperrt { background: rgba(232, 90, 68, 0.14); color: #f3b3a8; }
.marke-status--admin { background: rgba(201, 168, 76, 0.14); color: var(--gold-light); }

dialog {
  margin: auto; width: min(520px, calc(100% - 32px));
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 24px;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog h3 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; margin-bottom: 4px; }
.dialog-aktionen { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 8px; }
.link-kasten { display: flex; gap: 8px; margin-top: 10px; }
.link-kasten .eingabe { font-size: 0.82rem; min-height: 42px; }

/* --- Rechtstexte --- */
.text-seite { max-width: 760px; padding: 44px 24px 72px; }
.text-seite h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 500; margin-bottom: 20px; }
.text-seite h2 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; margin: 26px 0 8px; color: var(--gold); }
.text-seite p { color: var(--text-muted); margin-bottom: 10px; }

/* --- Schmal --- */
@media (max-width: 960px) {
  .kurs-raster { grid-template-columns: minmax(0, 1fr); }
  .buehne { position: static; }
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .inhalt { padding: 0 16px; }
  .marke span { display: none; }
  .karte { padding: 28px 20px; }
  .kachel-raster { grid-template-columns: minmax(0, 1fr); }
  .trichter__zeile { grid-template-columns: minmax(0, 1fr) 70px 44px; }
  .leiste .rechts { margin-left: 0; width: 100%; }
  .leiste .rechts .btn { flex: 1 1 auto; }

  /* Tabelle wird zu Karten */
  .tabelle-huelle { border: 0; overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border: 1px solid var(--linie); border-radius: var(--radius-lg); margin-bottom: 12px; padding: 6px 0; }
  td { border: 0; padding: 6px 14px; }
  td[data-titel]::before { content: attr(data-titel); display: block; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Kleine Helfer statt Inline-Styles (die Sicherheitsrichtlinie verbietet sie). */
.abstand-oben { margin-top: 14px; }
.mitte { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
