/* Vokabeltrainer – Landingpage. Welt: Der Karteikasten (Richtungsvertrag .impeccable/surfaces/index-html.md).
   Farben aus der App (ThemePalette, Farbwelt Dunkel). Regler-Werte für Phase 6 stehen als eigene Variablen. */

@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("../fonts/SpaceGrotesk-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/JetBrainsMono-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  /* Farben (ThemePalette.Dark) */
  --bg: #0B0F14;          /* PageBackground: Kastenwand */
  --wand: #0E141A;        /* Zwischenton Fläche/Karte für Fächer */
  --karte: #131A21;       /* CardBackground */
  --karte-2: #17212B;     /* CardBack */
  --linie: #1F2831;       /* CardBorder */
  --linie-hell: #2C3843;  /* Rand bei Hover/offen */
  --text: #F3F5F7;        /* TextPrimary */
  --leise: #8B98A5;       /* TextMuted (Text) */
  --zier: #62707C;        /* TextSubtle (nur Zierde) */
  --akzent: #38BDF8;      /* Accent */
  --auf-akzent: #0B0F14;  /* OnAccent */
  --sitzt: #34D399;       /* AnswerCorrect */

  /* Schrift */
  --sans: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --h1: clamp(2.5rem, 1.5rem + 3.4vw, 51px);
  --h2: clamp(1.9rem, 1.3rem + 2.2vw, 53px);
  --h2-gross: clamp(2.4rem, 1.4rem + 4vw, 4.6rem);
  --text-gross: clamp(1.1rem, 1rem + .35vw, 20px);

  /* Maße (Regler; Werte von Dennis aus dem Panel, 2026-11-09, als Obergrenze übernommen) */
  --breite: 1130px;
  --rand: clamp(16px, 4vw, 48px);
  --abschnitt: clamp(88px, 7vw + 48px, 128px);
  --radius: 17px;
  --radius-klein: 14px;
  --hero-oben: clamp(20px, 3.3vw, 47px);
  --karte-ueberstand: clamp(18px, 4.7vw, 68px);
  --reiter-hoehe: 34px;

  --aus: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 128px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.6;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--akzent); text-underline-offset: .22em; text-decoration-thickness: 1px; }
::selection { background: var(--akzent); color: var(--auf-akzent); }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: var(--linie) var(--bg); }
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--linie); border-radius: 12px; border: 3px solid var(--bg); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--akzent); color: var(--auf-akzent); padding: 10px 16px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: min(var(--breite), 100% - 2 * var(--rand)); margin-inline: auto; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--rand);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.is-gerollt { border-bottom-color: var(--linie); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; min-height: 48px; }
.nav nav { display: flex; gap: clamp(14px, 2.4vw, 36px); }
.nav nav a { color: var(--leise); text-decoration: none; font-size: .98rem; padding: 12px 0; transition: color .2s; }
.nav nav a:hover { color: var(--text); }

/* ---------- Einstieg: der Kasten ---------- */
.hero { padding: var(--hero-oben) var(--rand) 0; }
.kasten {
  position: relative; width: min(1200px, 100%); margin-inline: auto;
  padding: 86px clamp(14px, 3.4vw, 52px) var(--karte-ueberstand);
  background: linear-gradient(180deg, #10171E 0%, var(--wand) 60%, var(--bg) 100%);
  border: 1px solid var(--linie); border-bottom: 0; border-radius: 30px 30px 0 0;
}
.kasten__reiter { position: absolute; inset: 0 0 auto 0; height: 150px; pointer-events: none; }
.trenner {
  position: absolute; left: clamp(10px, 2.4vw, 36px); right: clamp(10px, 2.4vw, 36px); height: 120px;
  border-radius: var(--radius); background: var(--karte-2); border: 1px solid var(--linie);
}
.trenner--1 { top: 34px; opacity: .55; }
.trenner--2 { top: 56px; left: clamp(16px, 3.2vw, 48px); right: clamp(16px, 3.2vw, 48px); opacity: .8; }
.trenner--3 { top: 78px; left: clamp(22px, 4vw, 60px); right: clamp(22px, 4vw, 60px); background: #151E27; }
.reiter {
  position: absolute; z-index: 2; left: var(--x); top: 6px;
  font: 600 .86rem/1 var(--mono); color: var(--leise);
  padding: 9px 14px 12px; border-radius: 10px 10px 0 0;
  background: var(--karte-2); border: 1px solid var(--linie); border-bottom: 0; white-space: nowrap;
}
.reiter--2 { top: 28px; background: #18222C; }
.reiter--3 { top: 50px; background: #151E27; }
.reiter--sitzt { color: var(--sitzt); }

.karte {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(24px, 4vw, 64px); align-items: center;
  padding: clamp(26px, 3.8vw, 54px);
  background: var(--karte); border: 2px solid var(--akzent); border-radius: var(--radius);
  box-shadow: 0 -18px 40px -12px rgba(0, 0, 0, .55), 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.karte h1 { font-size: var(--h1); line-height: 1; margin-bottom: .42em; max-width: 14ch; }
.karte h1 em { font-style: normal; color: var(--akzent); }
.lead { font-size: var(--text-gross); color: var(--leise); max-width: 42ch; }
.ohne { color: var(--text); font-weight: 500; margin-top: -.2em; }
.aktion { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 24px; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  background: var(--akzent); color: var(--auf-akzent); border-radius: 999px;
  font-weight: 700; font-size: 1.04rem; text-decoration: none;
  transition: transform .25s var(--aus), filter .25s var(--aus);
}
.knopf:hover { transform: translateY(-2px); filter: brightness(1.08); }
.knopf:active { transform: translateY(0); }
.bald { margin: 0; color: var(--leise); font-size: .98rem; }
.bald span { color: var(--text); font-weight: 500; }

.stapel {
  position: relative; display: block; width: 100%; margin: 0; padding: 18px 6px 18px 0;
  border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.stapel:focus-visible { outline: none; }
.stapel:focus-visible .seite { outline: 2px solid var(--akzent); outline-offset: 3px; }
.stapel::before, .stapel::after {
  content: ""; position: absolute; inset: 18px 6px 18px 0; border-radius: var(--radius); border: 1px solid var(--linie);
}
.stapel::before { background: #121A22; transform: rotate(-5deg) translate(-10px, 8px); }
.stapel::after { background: #0F161C; transform: rotate(7deg) translate(14px, 14px); z-index: 0; }
.rueckseite {
  position: relative; z-index: 2; display: grid; min-height: 210px;
  transform: rotate(2.2deg); transform-origin: 30% 0; perspective: 900px;
}
.seite {
  grid-area: 1 / 1; display: grid; gap: 6px; align-content: start;
  padding: 26px 26px 22px;
  background: var(--bg); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: 0 22px 40px -24px rgba(0, 0, 0, .9);
  backface-visibility: hidden; transition: transform .6s var(--aus), border-color .3s;
}
.seite--hinten { transform: rotateY(180deg); }
.stapel[aria-pressed="true"] .seite--vorn { transform: rotateY(-180deg); }
.stapel[aria-pressed="true"] .seite--hinten { transform: rotateY(0); }
.stapel:hover .seite { border-color: var(--linie-hell); }
.rueckseite__hinweis { margin-top: 6px; font-size: .88rem; color: var(--leise); }
.rueckseite__wort { font-weight: 700; font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); letter-spacing: -.02em; line-height: 1.05; }
.rueckseite__due { margin-top: auto; padding-top: 28px; font: 600 .86rem/1.4 var(--mono); color: var(--sitzt); }
.rueckseite__due span { white-space: nowrap; }

/* ---------- Fächer (Abschnitte) ---------- */
/* Die ganze Seite ist ein Kasten: Fächer so breit wie der Kasten im Einstieg, mit Seitenwänden */
.fach, .schluss {
  width: min(1200px, 100% - 2 * var(--rand)); margin-inline: auto;
  border: 1px solid var(--linie); border-bottom: 0;
}
.fach {
  position: relative; padding: var(--abschnitt) 0;
  border-radius: var(--radius) var(--radius) 0 0;
  margin-top: -22px;
}
.fach--a { background: var(--wand); }
.fach--b { background: var(--karte); }
.fach--c { background: var(--karte-2); }
.fach__reiter {
  /* Reiter wandern der Reihe nach durch die Inhaltsspalte: neu (--i:0) links, in 4 Monaten (--i:7) rechts, sitzt am Schluss */
  --spalte: min(var(--breite), 100% - 2 * var(--rand));
  position: absolute; top: calc(-1 * var(--reiter-hoehe) + 1px);
  left: calc((100% - var(--spalte)) / 2 + var(--i, 0) * (var(--spalte) - 9.5rem) / 7);
  height: var(--reiter-hoehe); display: inline-flex; align-items: center;
  padding: 0 16px; border-radius: 12px 12px 0 0;
  font: 600 .86rem/1 var(--mono); color: var(--leise);
  background: inherit; border: 1px solid var(--linie); border-bottom: 0; white-space: nowrap;
}
.fach--a .fach__reiter { background: var(--wand); }
.fach--b .fach__reiter { background: var(--karte); }
.fach--c .fach__reiter { background: var(--karte-2); }
.fach__reiter--sitzt { color: var(--sitzt); }

.fach h2 { font-size: var(--h2); margin-bottom: .7em; max-width: 20ch; }
h2.gross { font-size: var(--h2-gross); max-width: 12ch; }
.fach p { max-width: 64ch; }
.fliess p, .ruhe p, .test p, .familie p, .abstaende p { color: var(--leise); }
.intro { font-size: var(--text-gross); color: var(--leise); max-width: 60ch; }
.nebenbei { color: var(--leise); font-size: .98rem; margin-top: 28px; }
.klein { font-size: .9rem; color: var(--leise); }
q { quotes: "„" "“"; color: var(--text); }

/* So funktioniert es: strenge Schrittfolge */
.ablauf { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.schritte { list-style: none; margin: 8px 0 0; padding: 0 0 0 0; position: relative; counter-reset: schritt; --fuellung: 0; }
.schritte::before, .schritte::after {
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; border-radius: 2px;
}
.schritte::before { background: var(--linie); }
.schritte::after { background: var(--akzent); transform-origin: top; transform: scaleY(var(--fuellung)); transition: transform .5s var(--aus); }
.schritt { position: relative; padding: 0 0 34px 84px; counter-increment: schritt; min-height: 56px; }
.schritt:last-child { padding-bottom: 0; }
.schritt::before {
  content: counter(schritt); position: absolute; left: 0; top: 0; z-index: 1;
  width: 56px; height: 56px; display: grid; place-items: center; border-radius: 16px;
  font: 600 1.25rem/1 var(--mono); color: var(--leise);
  background: var(--karte); border: 1px solid var(--linie);
  transition: background .35s var(--aus), color .35s, border-color .35s;
}
.schritt.is-erreicht::before { background: var(--akzent); color: var(--auf-akzent); border-color: var(--akzent); }
.schritt h3 { font-size: 1.45rem; margin: 12px 0 8px; }
.schritt p { color: var(--leise); margin: 0; }

.ablauf__bild { position: sticky; top: 108px; }
.buehne { position: relative; aspect-ratio: 540 / 1070; max-width: 380px; margin-inline: auto; }
.buehne > * {
  position: absolute; inset: 0; border-radius: 28px; overflow: hidden;
  border: 1px solid var(--linie); background: var(--karte);
  opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .45s var(--aus), transform .55s var(--aus);
}
.buehne > .is-aktiv { opacity: 1; transform: none; }
.buehne img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Datenweg */
.weg { position: relative; margin: 8px 0 56px; padding: 90px 0 24px; }
.weg__linie { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 170px; overflow: visible; }
.weg__linie path { fill: none; stroke: var(--text); stroke-width: 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.weg__linie .weg__abzweig { stroke: var(--zier); stroke-width: 2; stroke-dasharray: 6 8; }
.weg__stationen { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.weg__stationen li { position: relative; padding-top: 44px; }
.weg__stationen li::before {
  content: ""; position: absolute; left: 0; top: -12px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); border: 5px solid var(--text);
}
.weg__stationen b, .weg__nie b { display: block; font-size: clamp(1.05rem, .9rem + .5vw, 1.35rem); line-height: 1.2; max-width: 14ch; }
.zeit { display: block; font: 600 .82rem/1 var(--mono); color: var(--leise); margin-bottom: 8px; letter-spacing: .02em; }
.weg__nie { position: absolute; left: calc(36.6% + 8px); top: 4px; margin: 0; color: var(--leise); display: flex; align-items: baseline; gap: 10px; }
.weg__nie .zeit { margin: 0; }
.weg__nie b { color: var(--text); }
.weg__nie--schmal { display: none; }
.zwei { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.gibtsnicht { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.gibtsnicht li {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 14px 20px;
  background: var(--bg); border: 1px solid var(--linie); border-radius: var(--radius-klein);
  font-weight: 500; font-size: 1.08rem;
}
.gibtsnicht svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--leise); stroke-width: 2.4; stroke-linecap: round; }

/* Ohne Druck */
.ruhe { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.bildkarte { margin: 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--linie); background: var(--bg); }
.bildkarte--schraeg { transform: rotate(-1.6deg); }
.bildkarte--quer { max-width: 560px; }

/* Wie gelernt wird */
.stufen { list-style: none; margin: 40px 0 56px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.4vw, 32px); align-items: start; }
.stufen li { position: relative; }
.stufen li:nth-child(2) { margin-top: 36px; }
.stufen li:nth-child(3) { margin-top: 72px; }
.stufen li:not(:last-child)::after {
  content: ""; position: absolute; top: 46%; right: calc(-1 * clamp(14px, 2.4vw, 32px)); width: clamp(14px, 2.4vw, 32px); height: 2px; background: var(--linie);
}
.stufen figure { margin: 0; }
.stufen picture { display: block; border-radius: 22px; overflow: hidden; border: 1px solid var(--linie); background: var(--bg); }
.stufen img { width: 100%; aspect-ratio: 540 / 1070; object-fit: cover; object-position: top; }
.stufen figcaption { font: 500 .95rem/1.2 var(--sans); color: var(--leise); margin-top: 14px; }
.abstaende { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px clamp(28px, 5vw, 72px); align-items: center; margin-bottom: 40px; }
.abstaende .klein { grid-column: 2; margin-top: -8px; }
.lineal { position: relative; height: 92px; border-bottom: 2px solid var(--linie); }
.lineal i { position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: linear-gradient(90deg, var(--text), var(--text)) no-repeat; background-size: var(--lineal, 0%) 100%; transition: background-size 1.2s var(--aus); }
.lineal span {
  position: absolute; left: var(--t); bottom: 14px; transform: translateX(-50%);
  font: 600 .84rem/1 var(--mono); color: var(--text); white-space: nowrap;
}
.lineal span::after { content: ""; position: absolute; left: 50%; top: calc(100% + 6px); width: 2px; height: 16px; background: var(--leise); transform: translateX(-50%); }
.lineal span:first-of-type { transform: none; }
.lineal span:first-of-type::after { left: 0; }
.lineal span:last-of-type { transform: translateX(-100%); color: var(--sitzt); }
.lineal span:last-of-type::after { left: auto; right: 0; background: var(--sitzt); }

/* Test, Familie */
.test, .familie { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.familie .bildkarte { max-width: 440px; }

/* Kosten: zwei Kastengrößen */
.kaesten { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(16px, 3vw, 32px); align-items: end; margin-top: 8px; }
.preis {
  position: relative; padding: clamp(24px, 3.4vw, 40px); border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--linie);
}
.preis__zahl .unendlich { display: block; flex: none; width: clamp(3.6rem, 2.8rem + 2.6vw, 5rem); height: clamp(1.8rem, 1.4rem + 1.3vw, 2.5rem); color: var(--text); }
.preis__zahl:has(.unendlich) { align-items: center; }
.unendlich path { fill: none; stroke: currentColor; stroke-width: 7; stroke-linecap: round; }
.preis--gross { border: 2px solid var(--linie-hell); padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(32px, 4.6vw, 64px); }
.preis__kopf h3 { font-size: 1.6rem; }
.preis__kopf p { color: var(--leise); margin: 6px 0 0; }
.preis__zahl { margin: 26px 0 18px; display: flex; align-items: baseline; gap: 12px; color: var(--leise); font-size: 1.02rem; }
.preis__zahl b { font: 700 clamp(2.2rem, 1.6rem + 2vw, 3.2rem)/1 var(--sans); color: var(--text); letter-spacing: -.03em; }
.preis ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.preis li { position: relative; padding-left: 30px; }
.preis li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 14px; height: 8px; border-left: 2.5px solid var(--sitzt); border-bottom: 2.5px solid var(--sitzt); transform: rotate(-45deg); }

/* Fragen: Karteikarten */
.fragen h2 { margin-bottom: 1em; }
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--bg); border: 1px solid var(--linie); border-radius: var(--radius-klein); transition: border-color .25s; }
.faq details[open] { border-color: var(--linie-hell); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  min-height: 60px; padding: 16px 22px; font-weight: 500; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--leise); border-bottom: 2px solid var(--leise);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .3s var(--aus);
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); border-color: var(--text); }
.faq summary:hover { color: var(--text); text-decoration: underline; text-underline-offset: .22em; }
.faq details p { padding: 0 22px 20px; margin: 0; color: var(--leise); }

/* Schluss */
.schluss { position: relative; padding: calc(var(--abschnitt) * .8) 0 var(--abschnitt); background: var(--bg); border-radius: var(--radius) var(--radius) 0 0; margin-top: -22px; }
.schlusskarte {
  position: relative; max-width: 760px; margin-inline: auto; text-align: left;
  padding: clamp(32px, 5vw, 64px); background: var(--karte); border: 2px solid var(--sitzt); border-radius: var(--radius);
}
.schlusskarte .fach__reiter { background: var(--karte); border-color: var(--sitzt); left: auto; right: 40px; }
.schlusskarte h2 { font-size: var(--h2); margin-bottom: .5em; }
.schlusskarte p { color: var(--leise); margin: 0; font-size: var(--text-gross); }

/* Fuß */
.fuss {
  /* Boden des Kastens: Wände laufen bis hier, unten geschlossen */
  width: min(1200px, 100% - 2 * var(--rand)); margin: 0 auto 32px;
  border: 1px solid var(--linie); border-radius: 0 0 var(--radius) var(--radius);
  padding: 28px 0 32px; background: var(--bg);
}
.fuss__inhalt { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.fuss .brand { font-size: 1.1rem; }
.fuss nav { display: flex; gap: 24px; }
.fuss nav a { color: var(--leise); text-decoration: none; padding: 12px 0; }
.fuss nav a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Die wandernde Karte ---------- */
.wander {
  position: fixed; right: calc((100vw - 1200px) / 2 - 184px); top: 50%; z-index: 20;
  width: 168px; height: 120px; padding: 0; border: 0; background: none; cursor: pointer;
  perspective: 800px; color: var(--text); font: inherit; text-align: left;
  opacity: 0; transform: translateY(-40%); transition: opacity .4s var(--aus), transform .6s var(--aus);
  pointer-events: none;
}
.wander.is-sichtbar { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.wander__tab {
  position: absolute; left: 14px; top: -26px; height: 28px; display: inline-flex; align-items: center; padding: 0 10px;
  font: 600 .74rem/1 var(--mono); color: var(--leise); background: var(--karte-2); border: 1px solid var(--linie); border-bottom: 0; border-radius: 8px 8px 0 0;
  transition: left .6s var(--aus), color .3s;
}
.wander__face {
  position: absolute; inset: 0; display: grid; align-content: space-between; padding: 16px;
  background: var(--karte-2); border: 1px solid var(--linie); border-radius: 14px;
  backface-visibility: hidden; transition: transform .6s var(--aus), border-color .3s;
  box-shadow: 0 18px 34px -18px rgba(0, 0, 0, .9);
}
.wander__face b { font-size: 1.25rem; letter-spacing: -.02em; }
.wander__face small { font: 600 .7rem/1.35 var(--mono); color: var(--leise); }
.wander__face--front small { font: 500 .78rem/1.35 var(--sans); }
.wander__face--back { transform: rotateY(180deg); }
.wander[aria-pressed="true"] .wander__face--front { transform: rotateY(-180deg); }
.wander[aria-pressed="true"] .wander__face--back { transform: rotateY(0); }
.wander.is-sitzt .wander__tab { color: var(--sitzt); }
.wander.is-sitzt .wander__face { border-color: var(--sitzt); }
.wander:hover .wander__face { border-color: var(--linie-hell); }
.wander:focus-visible { outline: none; }
.wander:focus-visible .wander__face { outline: 2px solid var(--akzent); outline-offset: 3px; }


/* ---------- Schmal ---------- */
@media (max-width: 1599px) { .wander { display: none; } }
@media (max-width: 900px) {
  .karte { grid-template-columns: 1fr; }
  .rueckseite { max-width: 340px; min-height: 0; }
  .ablauf, .ruhe, .test, .familie, .zwei, .abstaende { grid-template-columns: 1fr; }
  .abstaende .klein { grid-column: 1; }
  .ablauf__bild { position: relative; top: 0; order: -1; }
  .buehne { max-width: 300px; }
  .kaesten { grid-template-columns: 1fr; }
  .weg__linie { display: none; }
  .weg { padding: 8px 0 0; }
  .weg__stationen { grid-template-columns: 1fr; row-gap: 28px; padding-left: 44px; }
  .weg__stationen::before { content: ""; position: absolute; left: 10px; top: 4px; bottom: 32px; width: 4px; border-radius: 2px; background: var(--text); }
  .weg__stationen li { padding-top: 0; }
  .weg__stationen li::before { left: -44px; top: 0; }
  .weg > .weg__nie { display: none; }
  .weg__nie--schmal { display: flex; position: static; margin: 16px 0 0; padding: 4px 0 4px 16px; border-left: 2px dashed var(--zier); }
  .familie .bildkarte { order: 1; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 160px; }
  .nav { flex-wrap: wrap; row-gap: 0; padding-bottom: 4px; }
  .nav nav { order: 2; width: 100%; justify-content: space-between; gap: 8px; }
  .nav nav a { font-size: .9rem; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
  .kasten { padding: 70px 8px 62px; border-radius: 22px 22px 0 0; }
  .karte h1 { font-size: 2rem; hyphens: auto; }
  .karte { padding: 24px 20px; }
  .kasten__reiter .reiter:nth-child(2), .kasten__reiter .reiter:nth-child(4) { display: none; }
  .kasten__reiter .reiter:nth-child(3) { left: 30%; }
  .kasten__reiter .reiter:nth-child(5) { left: auto; right: 6%; }
  .reiter { font-size: .76rem; padding: 8px 10px 10px; }
  .trenner { height: 90px; }
  .stufen { grid-template-columns: 1fr 1fr; }
  .stufen li:nth-child(2) { margin-top: 24px; }
  .stufen li:nth-child(3) { margin-top: 0; grid-column: 1 / -1; max-width: 50%; }
  .stufen li:nth-child(2)::after { display: none; }
  .fach__reiter { font-size: .78rem; padding: 0 12px; --spalte: calc(100% - 28px); }
  .fach > .wrap, .schluss > .wrap, .fuss > .wrap { width: calc(100% - 28px); }
  .fuss { margin-bottom: 16px; }
  .schritt { padding-left: 72px; }
  .schritt::before { width: 48px; height: 48px; border-radius: 14px; }
  .schritte::before, .schritte::after { left: 23px; }
  .lineal span { font-size: .74rem; }
  .lineal span:nth-child(2), .lineal span:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Rechtliche Unterseiten */
.rechtliches .fach { margin-top: 24px; min-height: 60vh; }
.rechtliches h1 { font-size: var(--h2); margin-bottom: .6em; }
.rechtliches p { color: var(--leise); }
@media (max-width: 640px) { .rechtliches .nav nav, .nav nav[aria-label="Zurück"] { display: flex; } }

/* ---------- Erklärvideos ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Videokarte: Zeile mit Abspielzeichen, öffnet das Video im Kino. Ohne Skript führt der Verweis zur Videodatei. */
.videokarte {
  display: flex; align-items: center; gap: 16px; max-width: 460px; min-height: 76px; margin-top: 28px;
  padding: 9px 20px 9px 9px; background: var(--bg); border: 1px solid var(--linie); border-radius: var(--radius-klein);
  color: var(--text); text-decoration: none; transition: border-color .25s;
}
.videokarte:hover { border-color: var(--linie-hell); }
.videokarte__zeichen, .video__zeichen {
  flex: none; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 12px;
  background: var(--karte); border: 1px solid var(--linie);
}
.videokarte__zeichen svg, .video__zeichen svg { width: 22px; height: 22px; fill: var(--text); }
.videokarte__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.videokarte__text b { font-weight: 500; font-size: 1.08rem; line-height: 1.25; }
.videokarte__text span { color: var(--leise); font-size: .92rem; line-height: 1.3; }
.videokarte__dauer, .video__meta .zeit { font: 600 .86rem/1 var(--mono); color: var(--leise); }
.stufen + .videokarte { margin: -24px 0 56px; }
.schlusskarte .schlusskarte__mehr { margin-top: 1em; }
.schlusskarte__mehr a { color: var(--text); }

/* Hilfe-Seite: alle Videos als Karten */
.hilfe .intro { margin-bottom: .6em; }
.videos { list-style: none; margin: 48px 0 40px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px clamp(14px, 2.4vw, 32px); }
.video > a { display: block; color: var(--text); text-decoration: none; }
.video__bild { position: relative; display: block; border-radius: 22px; overflow: hidden; border: 1px solid var(--linie); background: var(--bg); transition: border-color .25s; }
.video > a:hover .video__bild, .video:target .video__bild { border-color: var(--linie-hell); }
.video__bild img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.video__zeichen { position: absolute; left: 12px; bottom: 12px; background: var(--bg); }
.fach .video h2 { font-size: 1.3rem; line-height: 1.15; margin: 16px 0 8px; max-width: none; hyphens: auto; }
.video > a:hover h2 { text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.video p { margin: 0; font-size: .98rem; line-height: 1.5; }
.video .video__meta { margin-top: 10px; font-size: .92rem; display: flex; align-items: baseline; gap: 10px; }

/* Kino: das gezogene Video über der Seite */
.kino { padding: 0; border: 0; background: none; color: var(--text); max-width: none; max-height: none; overflow: visible; }
.kino::backdrop { background: rgba(5, 8, 11, .9); }
.kino[open] { animation: kino-auf .4s var(--aus); }
@keyframes kino-auf { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.kino__innen { width: min(100vw - 24px, (100vh - 96px) * 9 / 16, 540px); width: min(100vw - 24px, (100dvh - 96px) * 9 / 16, 540px); }
.kino__kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding-left: 4px; }
.kino__titel { margin: 0; font-weight: 700; font-size: 1.15rem; line-height: 1.2; letter-spacing: -.02em; }
.kino__zu {
  flex: none; width: 48px; height: 48px; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius-klein); transition: border-color .25s;
}
.kino__zu:hover { border-color: var(--linie-hell); }
.kino__zu svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; }
.kino__video {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain;
  background: var(--bg); border: 1px solid var(--linie); border-radius: 22px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}

@media (max-width: 1000px) { .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .videokarte { gap: 12px; padding-right: 14px; }
  .videokarte__zeichen { width: 48px; height: 48px; }
  .fach .video h2 { font-size: 1.12rem; }
  .video__zeichen { width: 48px; height: 48px; left: 8px; bottom: 8px; }
}
