/* lermentum (D24): ruhig und natürlich, präzise im Detail, mit wenigen inspirierenden Akzenten.
   Mobile First, hell und dunkel, ohne Build-Schritt. Schriften liegen lokal (static/fonts, OFL),
   damit beim Lesen keine Anfrage an fremde Server entsteht (T34).
   Farbrollen: --brand (tiefes Blaugrün) trägt die Marke, --petrol hebt Funktionen hervor (Links,
   Wiedergabe, Fokus), --violet ist der Akzent für KI und Inspiration. Kontraste nach WCAG AA,
   geprüft in tests/test_design.py. */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-standard.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Farbwelten (D25): Forest (Standard, mit dunkler Variante nach Systemeinstellung), Violet und
   Fusion. Jede Farbwelt belegt nur dieselben Rollen mit anderen Werten. Gewählt wird im Profil,
   gesetzt als data-theme am <html>-Element. [data-theme-preview] zeigt eine Farbwelt im Kleinen
   (Auswahl im Profil). Kontraste aller Farbwelten prüft tests/test_design.py. */
:root {
  color-scheme: light;
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "Cascadia Code", "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --toc-w: 19rem;
  --sticky-offset: 0px;
}

/* Forest: organisch und konzentriert */
:root, [data-theme-preview="forest"] {
  --bg: #F6F3EC;
  --surface: #FFFDF8;
  --surface-2: #EFEAE0;
  --fg: #1E2B28;
  --muted: #58645E;
  --line: #E3DCCF;
  --line-strong: #CEC5B4;
  --brand: #14514A;
  --brand-strong: #0D3C37;
  --brand-soft: #E2EEE9;
  --brand-fg: #FBF8F1;
  --leaf: #8ED3BE;
  --petrol: #17697A;
  --petrol-soft: #E3F0F1;
  --violet: #6550C0;
  --violet-soft: #F0ECFA;
  --ok: #2D6F48;
  --danger: #B3261E;
  --warn: #875510;
  --warn-bg: #FBF0DC;
  --code-bg: #F3EEE4;
  --code-bar: #EAE3D6;
  --accent-fg: #FFFFFF;
  --font-heading: var(--font-serif);
  --heading-weight: 600;
  --heading-tracking: -0.012em;
  --shadow-sm: 0 1px 2px rgba(30, 43, 40, 0.06);
  --shadow: 0 1px 2px rgba(30, 43, 40, 0.05), 0 6px 20px rgba(30, 43, 40, 0.07);
  --shadow-lg: 0 12px 40px rgba(16, 32, 29, 0.18);
}

/* Abgeleitete Rollen. Jede Farbwelt kann sie überschreiben (Fusion: dunkler Kopf). */
:root, [data-theme-preview] {
  --card: var(--surface);
  --soft: var(--brand-soft);
  --accent: var(--petrol);
  --ai: var(--violet);
  --ai-bg: var(--violet-soft);
  --video: var(--petrol);
  --video-bg: var(--petrol-soft);
  --action: var(--brand);
  --action-strong: var(--brand-strong);
  --action-fg: var(--brand-fg);
  --header-bg: var(--surface);
  --header-fg: var(--fg);
  --header-muted: var(--muted);
  --header-line: var(--line);
  --header-active-bg: var(--brand-soft);
  --header-active-fg: var(--brand);
  --header-brand: var(--brand);
  --cta-bg: var(--action);
  --cta-fg: var(--action-fg);
  --idea-bg: var(--brand-soft);
  --idea-fg: var(--fg);
  --idea-label: var(--brand);
  --idea-border: var(--brand);
}

/* Forest dunkel, wenn das System dunkel eingestellt ist */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="violet"]):not([data-theme="fusion"]) {
    color-scheme: dark;
    --bg: #0F1715;
    --surface: #16211E;
    --surface-2: #1C2925;
    --fg: #E5EDE9;
    --muted: #9DACA5;
    --line: #2A3833;
    --line-strong: #3B4C46;
    --brand: #79C6B0;
    --brand-strong: #A7DDCC;
    --brand-soft: #17302A;
    --brand-fg: #0F1715;
    --petrol: #6CC2D3;
    --petrol-soft: #132A2F;
    --violet: #B8A6F4;
    --violet-soft: #241F38;
    --ok: #7DD3A0;
    --danger: #FF8A80;
    --warn: #EDBB68;
    --warn-bg: #2A2314;
    --code-bg: #111C19;
    --code-bar: #18251F;
    --accent-fg: #0F1715;
    --shadow-sm: none;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}

/* Violet: hell und kreativ. Kühles, luftiges Weiß, Violett als Primärfarbe, klare serifenlose
   Überschriften. KI-Kennzeichnung in Beere, damit sie sich von der Primärfarbe abhebt. */
:root[data-theme="violet"], [data-theme-preview="violet"] {
  --bg: #F7F6FC;
  --surface: #FFFFFF;
  --surface-2: #EFEDF8;
  --fg: #1E1A2E;
  --muted: #5B5670;
  --line: #E3DFF0;
  --line-strong: #CBC4E2;
  --brand: #5A3CC8;
  --brand-strong: #4529A8;
  --brand-soft: #EEEAFC;
  --brand-fg: #FFFFFF;
  --leaf: #C9BBFF;
  --petrol: #146A82;
  --petrol-soft: #E3F1F5;
  --violet: #9C3279;
  --violet-soft: #FBEAF4;
  --ok: #237047;
  --danger: #B3261E;
  --warn: #8A5300;
  --warn-bg: #FFF3DE;
  --code-bg: #F5F3FB;
  --code-bar: #ECE8F7;
  --accent-fg: #FFFFFF;
  --font-heading: var(--font-sans);
  --heading-weight: 700;
  --heading-tracking: -0.02em;
  --shadow-sm: 0 1px 2px rgba(46, 30, 110, 0.06);
  --shadow: 0 1px 2px rgba(46, 30, 110, 0.05), 0 8px 24px rgba(46, 30, 110, 0.08);
  --shadow-lg: 0 14px 44px rgba(40, 24, 100, 0.2);
}

/* Fusion: harmonisch und vielseitig. Helle Leseflächen, dunkelgrüner Kopf und dunkle Kernidee,
   Petrol für Aktionen, Grün für die Marke, Violett für KI und Inspiration. */
:root[data-theme="fusion"], [data-theme-preview="fusion"] {
  --bg: #F3F4F0;
  --surface: #FFFFFF;
  --surface-2: #E9EBE5;
  --fg: #16211F;
  --muted: #545F5B;
  --line: #DEE1D9;
  --line-strong: #C6CBC0;
  --brand: #1B5E55;
  --brand-strong: #134740;
  --brand-soft: #E0EEE9;
  --brand-fg: #FFFFFF;
  --leaf: #8ED3BE;
  --petrol: #16677A;
  --petrol-soft: #E1EFF2;
  --violet: #6A4FD0;
  --violet-soft: #EFEBFC;
  --ok: #2D6F48;
  --danger: #B3261E;
  --warn: #875510;
  --warn-bg: #FBF0DC;
  --code-bg: #F0F2EC;
  --code-bar: #E5E8E0;
  --accent-fg: #FFFFFF;
  --font-heading: var(--font-serif);
  --heading-weight: 600;
  --heading-tracking: -0.012em;
  --shadow-sm: 0 1px 2px rgba(18, 48, 44, 0.07);
  --shadow: 0 1px 2px rgba(18, 48, 44, 0.06), 0 6px 20px rgba(18, 48, 44, 0.08);
  --shadow-lg: 0 12px 40px rgba(18, 48, 44, 0.2);
  --action: #16677A;
  --action-strong: #105262;
  --action-fg: #FFFFFF;
  --header-bg: #12302C;
  --header-fg: #EEF4F1;
  --header-muted: #B4C8C1;
  --header-line: #12302C;
  --header-active-bg: rgba(142, 211, 190, 0.16);
  --header-active-fg: #8ED3BE;
  --header-brand: #EEF4F1;
  --cta-bg: #8ED3BE;
  --cta-fg: #0E2622;
  --idea-bg: #12302C;
  --idea-fg: #EEF4F1;
  --idea-label: #8ED3BE;
  --idea-border: #8ED3BE;
}

/* Grundlagen ------------------------------------------------------------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main, .site-header, .site-footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}
main { padding-bottom: 6rem; }
main:focus { outline: none; }
h1, h2, h3 { font-family: var(--font-heading); font-optical-sizing: auto; font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); color: var(--fg); }
h1 { font-size: clamp(1.65rem, 1.2rem + 2.2vw, 2.35rem); line-height: 1.15; margin: 1.5rem 0 0.75rem; }
h2 { font-size: 1.3rem; line-height: 1.25; margin: 2rem 0 0.6rem; }
h3 { font-size: 1.1rem; }
a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--leaf); color: #10201C; }
img, svg { max-width: 100%; }
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--brand);
  color: var(--brand-fg);
  font-weight: 600;
}
.skip-link:focus { top: 0.75rem; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Kopf und Fuß ---------------------------------------------------------------------------------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand cta" "nav nav";
  align-items: center;
  gap: 0.25rem 1rem;
  padding-top: 0.7rem;
  padding-bottom: 0.15rem;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  /* Hintergrund über die ganze Breite, Inhalt in der Spalte */
  box-shadow: 0 0 0 100vmax var(--header-bg);
  clip-path: inset(0 -100vmax);
}
.header-inner { display: contents; }
.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  justify-self: start;
  color: var(--header-brand);
  text-decoration: none;
}
.brand-mark { width: 2rem; height: 2rem; flex: 0 0 auto; border-radius: 0.5rem; }
.wordmark {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1;
  color: inherit;
}
.nav-new {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.8rem;
  border-radius: 0.55rem;
  background: var(--cta-bg);
  color: var(--cta-fg);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s var(--ease), filter 0.15s var(--ease);
}
.nav-new:hover { filter: brightness(0.94); }
.nav-new span { font-size: 1.1em; line-height: 1; }
.main-nav {
  grid-area: nav;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0.35rem -0.25rem 0;
}
.main-nav a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  min-height: 3.25rem;
  padding: 0.35rem 0.1rem 0.45rem;
  color: var(--header-muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.main-nav svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.main-nav a:hover { color: var(--header-fg); }
.main-nav a[aria-current="page"] { color: var(--header-active-fg); }
.main-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 30%;
  right: 30%;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--header-active-fg);
}
.main-nav .count { position: absolute; top: 0.15rem; left: calc(50% + 0.35rem); }
.count {
  display: inline-block;
  min-width: 1.35em;
  padding: 0 0.38em;
  border-radius: 1em;
  background: var(--violet);
  color: var(--surface);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 6.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-brand .brand-mark { width: 1.35rem; height: 1.35rem; border-radius: 0.35rem; }
.footer-brand strong { font-family: var(--font-serif); font-weight: 600; color: var(--brand); }
.footer-links { display: flex; gap: 1rem; }
.site-footer a { color: var(--muted); }

@media (min-width: 50rem) {
  .site-header { grid-template-columns: auto 1fr auto; grid-template-areas: "brand nav cta"; padding-bottom: 0.7rem; }
  .main-nav { display: flex; justify-content: center; gap: 0.15rem; margin: 0; }
  .main-nav a { flex-direction: row; gap: 0.4rem; min-height: 2.5rem; padding: 0.35rem 0.75rem; border-radius: 2rem; font-size: 0.95rem; letter-spacing: 0; }
  .main-nav svg { width: 1.15rem; height: 1.15rem; }
  .nav-new { min-height: 2.4rem; }
  .main-nav a:hover { background: color-mix(in srgb, var(--header-fg) 8%, transparent); }
  .main-nav a[aria-current="page"] { background: var(--header-active-bg); }
  .main-nav a[aria-current="page"]::after { display: none; }
  .main-nav .count { position: static; }
}

/* Texte, Knöpfe, Formulare ----------------------------------------------------------------------- */
.hint { color: var(--muted); font-size: 0.93rem; }
.prose p { margin: 0 0 1rem; }
.lead { font-size: 1.15rem; line-height: 1.6; }
.hero .lead { color: var(--muted); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 1.5rem 0 0;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.eyebrow-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--violet); }
.eyebrow + h1 { margin-top: 0.35rem; }

.button, button.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 3rem;
  margin: 0.5rem 0;
  padding: 0.7rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  background: var(--action);
  color: var(--action-fg);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.1s var(--ease);
}
.button:hover { background: var(--action-strong); }
.button:active { transform: translateY(1px); }
.button.secondary { background: transparent; color: var(--action); border-color: var(--line-strong); box-shadow: none; }
.button.secondary:hover { background: var(--surface-2); border-color: var(--action); }
.button.danger { background: var(--danger); color: #FFFFFF; }
.button.small, button.button.small { display: inline-flex; width: auto; min-height: 2.75rem; margin: 0; padding: 0.5rem 1.05rem; }
.button:disabled { opacity: 0.5; cursor: not-allowed; }
button.link {
  min-height: 2.5rem;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: var(--petrol);
  font: inherit;
  cursor: pointer;
}
.danger { color: var(--danger); }

.stack > div, .stack fieldset { margin: 0 0 1.1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
input[type="text"], input[type="email"], input[type="number"], input[type="url"], input[type="search"], textarea, select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.65rem;
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 3px color-mix(in srgb, var(--petrol) 25%, transparent); }
input:disabled { color: var(--muted); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.75rem 0.9rem; background: var(--surface); }
legend { font-weight: 600; padding: 0 0.3rem; }
fieldset label, input[type="checkbox"] + label { font-weight: 400; }
fieldset div > label { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0; }
input[type="radio"], input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; accent-color: var(--action); }
.helptext { display: block; color: var(--muted); font-size: 0.9rem; }
.errorlist { margin: 0.25rem 0; padding: 0; list-style: none; color: var(--danger); font-size: 0.92rem; }
textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }
textarea[name="body"] { font-family: var(--font-mono); font-size: 0.92rem; }

.messages { padding: 0; list-style: none; }
.messages li { margin: 1rem 0 0; padding: 0.8rem 1rem; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); animation: rise 0.3s var(--ease); }
.messages .success { border-left-color: var(--ok); }

/* Karten, Listen, Hinweise ----------------------------------------------------------------------- */
.card, .cards li {
  margin: 0.85rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.cards { padding: 0; list-style: none; }
.cards a { display: block; font-weight: 600; text-decoration: none; }
.card-title { margin: 0.2rem 0 0.35rem; font-size: 1.22rem; line-height: 1.3; }
.card-title a { color: var(--fg); text-decoration: none; }
.card > :last-child { margin-bottom: 0; }
.card.linked .card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card.linked { position: relative; transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s var(--ease); }
.card.linked:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card.linked :is(.feed-meta a, .note, .tag, .badge) { position: relative; z-index: 1; }
.card.unread { border-left: 4px solid var(--violet); }
.badge { display: inline-block; padding: 0 0.55rem; border-radius: 1rem; border: 1px solid var(--line-strong); font-size: 0.84rem; color: var(--muted); }
.badge.ok { border-color: var(--ok); color: var(--ok); }
.badge.warn { border-color: var(--warn); color: var(--warn); }
.note {
  position: relative;
  margin: 0.7rem 0;
  padding: 0.55rem 0.9rem 0.55rem 2.1rem;
  border-radius: var(--radius-sm);
  background: var(--violet-soft);
  color: var(--fg);
}
.note::before { content: "“"; position: absolute; left: 0.65rem; top: 0.05rem; color: var(--violet); font: 600 1.9rem/1 var(--font-serif); }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 1.5rem 0; }
section > h2:first-child { margin-top: 1.5rem; }
.empty { padding: 1.1rem 1.2rem; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); background: var(--surface); }
.teaser { margin: 0.25rem 0 0.5rem; color: var(--fg); }
.callout { margin: 1rem 0; padding: 0.85rem 1.05rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--brand-soft); }
.callout p { margin: 0.25rem 0; }
.callout.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-bg); }
.callout.small { padding: 0.6rem 0.9rem; font-size: 0.94rem; }
.callout .errorlist { color: var(--fg); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.cta-row .button { flex: 1 1 12rem; margin: 0; }
.person { margin: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.actions form { margin: 0; }
.more-actions { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-top: 1.5rem; }
.search { display: flex; gap: 0.5rem; margin: 0.5rem 0 1rem; }
.search input { flex: 1; min-width: 0; }

/* Personen-Avatar (Initiale, Farbe aus der Kennung) */
.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font-heading);
  font-weight: 600;
}
.avatar.tone-1 { background: var(--petrol-soft); color: var(--petrol); }
.avatar.tone-2 { background: var(--violet-soft); color: var(--violet); }
.avatar.tone-3 { background: var(--warn-bg); color: var(--warn); }

/* Seitenköpfe und Startseiten -------------------------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.5rem 1rem; }
.page-head h1 { margin-bottom: 0.25rem; }
.page-head p { margin: 0 0 0.75rem; }
.welcome { padding: 2rem 0 1rem; }
.welcome .lockup { display: flex; align-items: center; gap: 0.75rem; }
.welcome .brand-mark { width: 3.25rem; height: 3.25rem; border-radius: 0.85rem; }
.welcome .wordmark { font-size: clamp(2.4rem, 1.8rem + 3vw, 3.3rem); }
.claim { margin: 0.6rem 0 1.5rem; color: var(--muted); font-size: 0.95rem; letter-spacing: 0.18em; }
.claim b { color: var(--violet); font-weight: 600; }
.welcome h1 { font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2rem); }
.pillars { display: grid; gap: 0.75rem; margin: 1.5rem 0; padding: 0; list-style: none; }
.pillars li { padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pillars strong { display: block; font-family: var(--font-heading); font-size: 1.1rem; color: var(--brand); }
.pillars li:nth-child(2) strong { color: var(--petrol); }
.pillars li:nth-child(3) strong { color: var(--violet); }
@media (min-width: 40rem) { .pillars { grid-template-columns: repeat(3, 1fr); } }

/* Import und Status ------------------------------------------------------------------------------ */
.import-form { margin: 1.25rem 0 0.75rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.import-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.import-row input { flex: 1 1 16rem; min-height: 3.1rem; font-size: 1rem; }
.import-row .button { flex: 0 0 auto; width: auto; margin: 0; padding-inline: 1.5rem; }
.facts { display: grid; gap: 0.45rem; margin: 0.75rem 0 1.25rem; padding: 0; list-style: none; font-size: 0.96rem; }
.facts li { position: relative; padding-left: 1.4rem; }
.facts li::before { content: ""; position: absolute; left: 0.3rem; top: 0.6em; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 2px var(--brand-soft); }
.activity li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem; }
.activity a { font-weight: 500; }
.steps { margin: 1.25rem 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 0.5rem 0 0.5rem 2.4rem; color: var(--muted); counter-increment: step; }
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0.45rem;
  left: 0;
  width: 1.7rem;
  height: 1.7rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.8rem;
  line-height: 1.55rem;
  text-align: center;
}
.steps li.done { color: var(--fg); }
.steps li.done::before { content: "✓"; border-color: var(--ok); background: var(--ok); color: var(--surface); }
.steps li.current { color: var(--fg); font-weight: 600; }
.steps li.current::before { border-color: var(--brand); color: var(--brand); animation: pulse 1.6s ease-in-out infinite; }
.steps .hint { font-weight: 400; }
.progress { height: 0.35rem; overflow: hidden; border-radius: 1rem; background: var(--brand-soft); }
.progress span { display: block; width: 35%; height: 100%; border-radius: 1rem; background: linear-gradient(90deg, var(--brand), var(--petrol)); animation: slide 1.8s var(--ease) infinite; }
.pulse { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--brand); animation: pulse 1.6s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Kennzeichnungen: aus dem Video, KI-Ergänzung, KI-Zeitmarke, Warnung ---------------------------- */
.tag {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
  vertical-align: middle;
  white-space: nowrap;
}
.tag.ai { border-color: color-mix(in srgb, var(--violet) 40%, transparent); background: var(--violet-soft); color: var(--violet); }
.tag.ai-time { border-style: dashed; border-color: var(--violet); color: var(--violet); }
.tag.video { border-color: color-mix(in srgb, var(--petrol) 40%, transparent); background: var(--petrol-soft); color: var(--petrol); }
.tag.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); background: var(--warn-bg); color: var(--warn); }
h2 .tag { margin-left: 0.4rem; font-family: var(--font-sans); letter-spacing: 0; }

/* Lesedarstellung (Markdown-Ressourcen und Lernansicht) ------------------------------------------ */
.resource-head .hint a { font-weight: 600; }
.content { font-size: 1.08rem; line-height: 1.72; overflow-wrap: break-word; }
.content h2, .content h3, .content h4, .content h5, .content h6 { line-height: 1.3; scroll-margin-top: calc(var(--sticky-offset) + 1rem); }
.content h2 { font-size: 1.4rem; margin: 2.2rem 0 0.6rem; }
.content h3 { font-size: 1.18rem; margin: 1.8rem 0 0.5rem; }
.content h4, .content h5, .content h6 { font-size: 1rem; margin: 1.4rem 0 0.4rem; font-family: var(--font-sans); }
.content p, .content ul, .content ol, .content blockquote { margin: 0 0 1rem; }
.content li { margin: 0.3rem 0; }
.content strong { font-weight: 650; }
.content blockquote { padding: 0.2rem 0.95rem; border-left: 3px solid var(--line-strong); color: var(--muted); }
.content code { font-family: var(--font-mono); font-size: 0.86em; }
.content :not(pre) > code { padding: 0.12em 0.38em; border-radius: 0.35em; background: var(--code-bg); border: 1px solid var(--line); }
.content pre {
  margin: 0 0 1rem;
  padding: 0.95rem 1.05rem;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  font-size: 0.88rem;
  line-height: 1.55;
  tab-size: 4;
}
.content table { display: block; max-width: 100%; overflow-x: auto; margin: 0 0 1rem; border-collapse: collapse; }
.content th, .content td { padding: 0.45rem 0.65rem; border: 1px solid var(--line); }
.content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* Codeblöcke: Kopfzeile mit Sprache oder Datei und Kopierknopf, nichts liegt über dem Code */
.code-block { margin: 0 0 1rem; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--code-bg); }
.code-block pre { margin: 0; border-radius: 0; }
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.6rem;
  padding: 0.2rem 0.3rem 0.2rem 0.95rem;
  background: var(--code-bar);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.code-lang { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--fg);
  font: 600 0.84rem var(--font-sans);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.copy:hover { background: var(--surface); border-color: var(--line); }
.copy svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy.is-done { color: var(--ok); }

/* Player (M4): Platzhalter bis zur ersten Handlung, danach 16:9. Nichts liegt über dem Player
   (YouTube-Richtlinien), Werkzeuge stehen darunter. Mindesthöhe 200 px. */
.player {
  margin: 1rem 0 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--brand-soft), var(--surface) 60%);
  overflow: hidden;
}
.player-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.55rem;
  aspect-ratio: 16 / 9;
  padding: 1.1rem;
  font-size: 0.93rem;
}
.player-stage p { margin: 0; color: var(--muted); max-width: 32rem; }
.player-stage .button { margin: 0.2rem 0; }
.player.loaded { border: 0; background: #000; }
.player.loaded .player-stage { padding: 0; min-height: 200px; }
.player-stage iframe, .player-stage > div { display: block; width: 100%; height: 100%; border: 0; }
.player-tools[hidden] { display: none; }
.player-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem; font-size: 0.9rem; }
.player-tools .toggle { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.5rem; margin: 0; font-weight: 400; }
.player-tools .toggle input { margin: 0; }
/* Angeheftet bleibt der geladene Player beim Scrollen sichtbar (Smartphone: oben). */
.pinned:has(.player.loaded), .player.loaded.pinned {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-bottom: 0.25rem;
  background: var(--bg);
}

/* Lernansicht (M4, D24): ruhig, gut lesbar, Kapitel klar gegliedert ------------------------------ */
.wide-page main, .wide-page .site-header, .wide-page .site-footer { max-width: 76rem; }
.lesson-page .resource-head, .learn-body { max-width: 44rem; }
.learn-body { min-width: 0; }
.resource-head h1 { margin-bottom: 0.4rem; }
.overview { scroll-margin-top: calc(var(--sticky-offset) + 1rem); }
.core-idea {
  position: relative;
  margin: 1.25rem 0;
  padding: 1rem 1.15rem 1.05rem 1.25rem;
  border-radius: var(--radius);
  background: var(--idea-bg);
  border-left: 4px solid var(--idea-border);
  color: var(--idea-fg);
  font-family: var(--font-heading);
  font-optical-sizing: auto;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5;
}
.label { display: block; margin-bottom: 0.25rem; color: var(--muted); font-family: var(--font-sans); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.core-idea .label { color: var(--idea-label); }
.goal-grid { display: grid; gap: 0.75rem; margin: 1rem 0; }
.panel { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel h2, .panel > h2:first-child { margin: 0 0 0.45rem; font-size: 1.05rem; }
.panel ul { margin: 0; padding-left: 1.2rem; }
.panel.muted { background: transparent; }
.panel ul.checks { padding-left: 0; list-style: none; }
.checks li { position: relative; padding: 0.2rem 0 0.2rem 1.6rem; }
.checks li::before { content: "✓"; position: absolute; left: 0.1rem; color: var(--brand); font-weight: 700; }
.lesson { margin: 2.25rem 0 1.5rem; padding-top: 0.75rem; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--sticky-offset) + 0.75rem); }
.lesson > h2 { display: flex; gap: 0.7rem; align-items: baseline; margin: 0.75rem 0 0.4rem; font-size: 1.45rem; line-height: 1.25; }
.num {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.6rem;
  background: var(--brand);
  color: var(--brand-fg);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  transform: translateY(-0.12rem);
}
.key-point { margin: 0.35rem 0 0.85rem; font-size: 1.12rem; font-weight: 600; line-height: 1.5; }
.lesson.is-playing { border-top: 2px solid var(--petrol); }
.passages { display: grid; gap: 0.45rem; margin: 0.5rem 0 1rem; padding: 0; list-style: none; }
.passages li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; }
.passage-label { color: var(--muted); font-size: 0.93rem; }
.play {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 5.5rem;
  min-height: 2.5rem;
  padding: 0.3rem 0.75rem;
  border: 1.5px solid var(--petrol);
  border-radius: 0.65rem;
  background: var(--surface);
  color: var(--petrol);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.long-video .play { min-width: 6.6rem; }
.play:hover, .play:focus-visible, .play.is-playing { background: var(--petrol); color: var(--surface); }
.play.is-playing { box-shadow: 0 0 0 3px color-mix(in srgb, var(--petrol) 30%, transparent); }
.visual { margin: 1rem 0; padding: 0.8rem 1.05rem; border-radius: var(--radius-sm); background: var(--petrol-soft); }
.visual figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.visual p { margin: 0.5rem 0 0; }
.code-figure { margin: 1.25rem 0; }
.code-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0 0 0.45rem; }
.code-figure .content pre { margin-bottom: 0; }
.code-figure .content .code-block { margin-bottom: 0.45rem; }
.code-note { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.93rem; }
.code-note strong { color: var(--fg); }
.code-title { margin: 1.4rem 0 0.35rem; font-weight: 650; }
.code-title code { font-family: var(--font-mono); font-size: 0.85em; color: var(--muted); }
.pitfalls { margin: 1rem 0; padding: 0.75rem 1.05rem; border-left: 4px solid var(--warn); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--warn-bg); }
.pitfalls ul { margin: 0; padding-left: 1.2rem; }
.pitfalls li { margin: 0.3rem 0; }
.addition { margin: 1rem 0; padding: 0.75rem 1.05rem; border-left: 4px solid var(--violet); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--violet-soft); }
.addition-head { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.3rem; font-weight: 600; }
.addition .content { font-size: 1rem; }
.addition .content > :last-child, .question .content > :last-child { margin-bottom: 0.75rem; }
.big-picture { margin: 2.5rem 0 1rem; border-color: color-mix(in srgb, var(--violet) 30%, var(--line)); background: linear-gradient(150deg, var(--violet-soft), var(--surface) 70%); scroll-margin-top: calc(var(--sticky-offset) + 1rem); }
.big-picture > h2:first-child { font-size: 1.25rem; }
#missverstaendnisse, #fragen, #entstehung { scroll-margin-top: calc(var(--sticky-offset) + 1rem); }
.myths { display: grid; gap: 0.6rem; padding: 0; list-style: none; }
.myths li { padding: 0.75rem 1.05rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.myths p { margin: 0.15rem 0; }
.myth { color: var(--muted); }
.myth span { color: var(--danger); font-weight: 700; }
.truth span { color: var(--ok); font-weight: 700; }
.question { margin: 0.55rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.question summary { min-height: 2.9rem; padding: 0.75rem 1rem; font-weight: 600; cursor: pointer; }
.question summary::marker { color: var(--brand); }
.question[open] summary { border-bottom: 1px solid var(--line); }
.question .content { padding: 0.75rem 1rem 0; font-size: 1rem; }
.quality { margin: 3rem 0 1rem; padding: 1.1rem 1.15rem; border-radius: var(--radius); background: var(--surface-2); font-size: 0.95rem; }
.quality h2 { margin-top: 0; font-size: 1.1rem; }
.legend { display: grid; gap: 0.55rem; padding: 0; list-style: none; }
.legend .tag { margin-right: 0.35rem; }
.wide-only { display: none; }

/* Inhaltsverzeichnis (D24). Ohne JavaScript eine Liste im Text, mit JavaScript eine Seitenleiste. */
.toc-panel { margin: 1.25rem 0; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.toc-head { display: flex; align-items: center; gap: 0.5rem; }
.toc-title { flex: 1; margin: 0; font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; color: var(--fg); }
.toc-list { margin: 0.35rem 0 0; padding: 0; list-style: none; }
.toc-list a {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.15rem 0.45rem;
  min-height: 2.6rem;
  padding: 0.45rem 0.6rem 0.45rem 0.55rem;
  border-left: 3px solid transparent;
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--fg);
  font-size: 0.96rem;
  line-height: 1.35;
  text-decoration: none;
}
.toc-list a:hover { background: var(--surface-2); }
.toc-list .toc-text { grid-column: 2; }
.toc-num { grid-column: 1; color: var(--muted); font-size: 0.82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.toc-time { color: var(--muted); font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.toc-list a[aria-current="location"] { border-left-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.toc-list a[aria-current="location"] .toc-num { color: var(--brand); }
.toc-list .indent-1 a { padding-left: 1.4rem; }
.toc-list .indent-2 a { padding-left: 2.2rem; }
.toc-pin, .toc-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  min-height: 2.6rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--surface);
  color: var(--fg);
  font: 600 0.85rem var(--font-sans);
  cursor: pointer;
}
.toc-pin[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.toc-close svg, .toc-inline-open svg, .fab svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.toc-inline-open {
  display: none;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 3rem;
  margin: 1.25rem 0 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  font: 600 1rem var(--font-sans);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.toc-inline-open .hint { margin-left: auto; font-weight: 400; }
.toc-inline-open:hover { border-color: var(--brand); }

.js .toc-inline-open:not([hidden]) { display: flex; }
.js .toc-panel {
  position: fixed;
  top: var(--toc-top, 0px);
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(22rem, 88vw);
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform 0.28s var(--ease), visibility 0s linear 0.28s;
}
.js .toc-panel.is-open { transform: none; visibility: visible; transition: transform 0.28s var(--ease); }
.js .toc-head { padding: 0.75rem 0.75rem 0.6rem 1rem; border-bottom: 1px solid var(--line); }
.js .toc-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: 0.5rem 0.5rem 5rem 0; }
.toc-backdrop {
  position: fixed;
  inset: var(--toc-top, 0px) 0 0 0;
  z-index: 55;
  background: rgba(12, 24, 21, 0.32);
  opacity: 0;
  transition: opacity 0.28s var(--ease);
}
.toc-backdrop.is-open { opacity: 1; }
html.toc-pinned .toc-panel { top: 0; z-index: 30; width: var(--toc-w); transform: none; visibility: visible; box-shadow: none; background: var(--surface); }
html.toc-pinned body { padding-right: var(--toc-w); }
html.toc-pinned .toc-close, html.toc-pinned .toc-backdrop, html.toc-pinned [data-fab-toc] { display: none; }
html.toc-pinned .fab-group { right: calc(var(--toc-w) + 1rem); }

/* Schwebende Knöpfe unten rechts, mit dem Daumen erreichbar (Inhalt, Sprung) */
.fab-group {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  pointer-events: none;
}
.fab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 3rem;
  max-width: min(20rem, calc(100vw - 2rem));
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: var(--surface);
  color: var(--fg);
  font: 600 0.95rem var(--font-sans);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  pointer-events: auto;
  animation: rise 0.25s var(--ease);
}
.fab[hidden] { display: none; }
.fab.primary { border-color: transparent; background: var(--action); color: var(--action-fg); }
.fab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fab[data-jump] svg { transition: transform 0.2s var(--ease); }
.fab[data-jump].is-down svg { transform: rotate(180deg); }

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

@media (min-width: 40rem) {
  .goal-grid { grid-template-columns: 3fr 2fr; }
}
@media (min-width: 60rem) {
  .learn.has-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, 38%); gap: 2.25rem; align-items: start; }
  .learn.has-media.media-large { grid-template-columns: minmax(0, 1fr) minmax(24rem, 55%); }
  .learn.has-media .learn-media { order: 2; position: sticky; top: 1rem; }
  .learn.has-media .learn-media.pinned { top: 1rem; padding: 0; background: transparent; }
  .learn.has-media .player { margin-top: 0; }
  .wide-only { display: inline; }
}
@media (min-width: 50rem) {
  .library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
}

/* Wissensfeed: lebendiger als die Lernansicht, gleiche Bausteine */
.feed-card { border-top: 3px solid var(--brand-soft); }
.feed-card:nth-of-type(3n + 2) { border-top-color: var(--petrol-soft); }
.feed-card:nth-of-type(3n) { border-top-color: var(--violet-soft); }
.feed-meta { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.35rem; font-size: 0.95rem; }
.feed-meta a { font-weight: 600; }
.start-list a { color: var(--brand); }

/* Aufklappbare Hinweise (Datenschutz, technische Details) */
.disclosure { margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.disclosure summary { min-height: 2.9rem; padding: 0.7rem 1rem; font-weight: 600; cursor: pointer; }
.disclosure summary::marker { color: var(--brand); }
.disclosure > :not(summary) { padding: 0 1rem 0.25rem; }
.disclosure[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 0.75rem; }

/* Code zeigt genau die Zeichen, die man abtippt oder kopiert: keine Ligaturen wie „⇒“ für „=>“. */
code, pre, kbd, samp, .code-bar { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }

/* Feinschliff nach Sichtprüfung mit echten Ressourcen (D24) */
.nav-new { white-space: nowrap; }
@media (min-width: 50rem) {
  .site-header, .site-footer { max-width: 76rem; }
}
.passages-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0.75rem 0 0.35rem; }
.passages-head .label { margin: 0; }
.passages li { gap: 0.25rem 0.65rem; }
@media (max-width: 39.99rem) {
  .core-idea { font-size: 1.08rem; font-weight: 450; line-height: 1.5; }
  .fab { min-height: 2.9rem; padding: 0.5rem 0.95rem; font-size: 0.92rem; }
}
/* Sehr schmale Bildschirme (bis etwa 370 px): Marke und Knopf etwas kompakter, damit nichts überläuft */
@media (max-width: 23rem) {
  .site-header { column-gap: 0.5rem; }
  .brand { gap: 0.45rem; }
  .brand-mark { width: 1.75rem; height: 1.75rem; }
  .wordmark { font-size: 1.3rem; }
  .nav-new { padding: 0.3rem 0.7rem; font-size: 0.88rem; }
}
/* Einstiegsseiten (Willkommen, Anmeldung, Einladung): die große Marke im Einstieg ersetzt den Kopf */
.welcome-page .site-header { display: none; }
.welcome-page .welcome { padding-top: 2.5rem; }

/* Zentraler Transparenzhinweis der Lernressource (D25) */
.ai-notice { display: flex; align-items: baseline; gap: 0.5rem; margin: 0.6rem 0 0; color: var(--muted); font-size: 0.92rem; }
.ai-notice .eyebrow-dot { flex: 0 0 auto; transform: translateY(-0.05rem); }
.visual figcaption .play, .code-meta .play { margin-right: 0.15rem; }

/* Farbwelt im Profil (D25): jede Karte zeigt ihre Farbwelt im Kleinen */
.theme-options { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); margin: 0.75rem 0; }
.theme-option {
  position: relative;
  display: grid;
  gap: 0.2rem;
  margin: 0;
  padding: 0.65rem 0.65rem 0.75rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--fg);
  font-weight: 400;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option:has(input:checked) { border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 22%, transparent); }
.theme-option:has(input:focus-visible) { outline: 3px solid var(--petrol); outline-offset: 2px; }
.theme-sample { display: grid; gap: 0.3rem; margin-bottom: 0.35rem; padding: 0.4rem; border: 1px solid var(--line); border-radius: 0.55rem; background: var(--surface); }
.theme-sample .s-head { height: 0.75rem; border-radius: 0.3rem; background: var(--header-bg); box-shadow: inset 0 -2px 0 var(--header-active-fg), inset 0 0 0 1px var(--header-line); }
.theme-sample .s-idea { height: 1.1rem; border-radius: 0.3rem; background: var(--idea-bg); border-left: 3px solid var(--idea-border); }
.theme-sample .s-row { display: flex; gap: 0.3rem; }
.theme-sample .s-action { width: 2.2rem; height: 0.8rem; border-radius: 0.25rem; background: var(--action); }
.theme-sample .s-play { width: 1.7rem; height: 0.8rem; border-radius: 0.25rem; border: 2px solid var(--petrol); }
.theme-sample .s-ai { width: 1.2rem; height: 0.8rem; border-radius: 1rem; background: var(--violet); }
.theme-name { font-family: var(--font-heading); font-weight: var(--heading-weight); font-size: 1.05rem; }
.js .theme-picker [data-theme-submit] { display: none; }
/* Originalstellen: Zeitmarke links, Beschreibung daneben, auch bei langen Beschreibungen (D25) */
.passages li { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 0.2rem 0.75rem; }
.passages .passage-label { padding-top: 0.5rem; line-height: 1.45; }
