/* Doomlearn – Feed UI. Bewusst dunkel und single-theme: die Seite ersetzt eine App, nicht ein Dokument. */
:root {
  --bg: #0F1220;
  --bg-2: #171B2C;
  --bg-3: #1F2438;
  --text: #F3F4FA;
  --text-2: #B7BCD1;
  --text-3: #7E849E;
  --line: #2A3047;
  --accent: #2447D6;
  --ok: #2BAE66;
  --bad: #E0534B;
  --quiz: #F0B454;
  --cat: var(--accent);
  --top-h: 56px;
  --bottom-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", var(--font);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.5;
  overflow: hidden; overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--quiz); outline-offset: 2px; }
a { color: inherit; }

/* ---------- Header ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: calc(var(--top-h) + var(--safe-t)); padding: var(--safe-t) 12px 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  background: linear-gradient(to bottom, rgba(15,18,32,.95), rgba(15,18,32,.6) 70%, transparent);
  pointer-events: none;
}
.top > * { pointer-events: auto; }
.brand {
  font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em;
  text-decoration: none; padding: 6px 2px;
}
.chips {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px;
  mask-image: linear-gradient(to right, transparent, #000 8px, #000 calc(100% - 12px), transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 500;
  background: rgba(255,255,255,.08); color: var(--text-2); border: 1px solid transparent; white-space: nowrap;
}
.chip.active { background: var(--text); color: var(--bg); }
.top-right { display: flex; gap: 6px; align-items: center; }
.streak { display: flex; align-items: center; gap: 3px; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.08); font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; }
.streak.hot { background: rgba(240,180,84,.18); color: var(--quiz); }
.lang { padding: 5px 9px; border-radius: 8px; background: rgba(255,255,255,.08); font-weight: 600; font-size: .8rem; letter-spacing: .05em; }

/* ---------- Feed ---------- */
.feed {
  position: fixed; inset: 0; overflow-y: scroll; overflow-x: hidden;
  scroll-snap-type: y mandatory; scrollbar-width: none; outline: none;
  -webkit-overflow-scrolling: touch;
}
.feed::-webkit-scrollbar { display: none; }
.feed.hidden { display: none; }
.slide {
  position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--top-h) + var(--safe-t) + 8px) 22px calc(var(--bottom-h) + var(--safe-b) + 16px);
  background:
    radial-gradient(120% 70% at 50% -10%, color-mix(in srgb, var(--cat) 28%, transparent), transparent 60%),
    var(--bg);
}
.slide.quiz { --cat: var(--quiz); }
.slide .inner { max-width: 560px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; padding-right: 52px; }
@media (min-width: 700px) { .slide .inner { padding-right: 0; } }

.pill-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pill {
  display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  background: var(--cat); color: #fff; padding: .28em .7em; border-radius: 999px;
}
.pill.ghost { background: rgba(255,255,255,.1); color: var(--text-2); }
.pill.quizpill { color: #1A1300; }
.pill.review { background: transparent; border: 1px solid var(--quiz); color: var(--quiz); }
.hook {
  font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.08;
  font-size: clamp(1.7rem, 6.2vw, 2.5rem); text-wrap: balance; margin: 0;
}
.body { margin: 0; font-size: 1.05rem; color: var(--text); }
.useful {
  margin: 0; padding: 10px 0 0 14px; border-left: 3px solid var(--cat); color: var(--text-2); font-size: .95rem;
}
.useful b { color: var(--text); font-weight: 600; }
.source { font-size: .78rem; color: var(--text-3); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.source:hover { color: var(--text-2); text-decoration: underline; }

/* Action rail */
.rail {
  position: absolute; right: 10px; bottom: calc(var(--bottom-h) + var(--safe-b) + 24px);
  display: flex; flex-direction: column; gap: 14px; align-items: center;
}
@media (min-width: 700px) { .rail { right: calc(50% - 330px); } }
.rail button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .65rem; color: var(--text-2); width: 48px; }
.rail .ico {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem;
  background: rgba(255,255,255,.1); backdrop-filter: blur(6px);
}
.rail button.on .ico { background: var(--quiz); color: #1A1300; }
.rail button.on { color: var(--quiz); }
@media (prefers-reduced-motion: no-preference) {
  .rail .ico { transition: transform .15s; }
  .rail button:active .ico { transform: scale(.85); }
}

/* Quiz */
.q { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem, 5.2vw, 2rem); line-height: 1.12; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
.opts { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.opt {
  width: 100%; text-align: left; padding: 13px 14px; border-radius: 12px;
  background: rgba(255,255,255,.07); border: 1px solid var(--line); font-size: 1rem; line-height: 1.35;
  display: flex; gap: 10px; align-items: flex-start;
}
.opt .k { flex: 0 0 auto; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.opt:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.opt.right { background: rgba(43,174,102,.18); border-color: var(--ok); }
.opt.wrong { background: rgba(224,83,75,.18); border-color: var(--bad); }
.opt:disabled { cursor: default; opacity: .85; }
.opt.right:disabled, .opt.wrong:disabled { opacity: 1; }
.expl { margin: 0; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.07); font-size: .95rem; color: var(--text-2); }
.expl b { color: var(--text); }
.expl.ok b { color: var(--ok); }
.expl.bad b { color: var(--bad); }

/* Sonderkarten */
.slide.special .inner { text-align: center; align-items: center; padding-right: 0; }
.big { font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 10vw, 4rem); line-height: 1; letter-spacing: -.03em; margin: 0; }
.stat-row { display: flex; gap: 18px; justify-content: center; margin-top: 6px; }
.stat-row div { display: flex; flex-direction: column; gap: 2px; }
.stat-row b { font-family: var(--display); font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat-row span { font-size: .75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; background: var(--text); color: var(--bg);
  font-weight: 600; text-decoration: none; font-size: .95rem;
}
.btn.ghost { background: rgba(255,255,255,.1); color: var(--text); }
.btn-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.muted { color: var(--text-2); }

/* ---------- Panels (Gemerkt / Statistik) ---------- */
.panel {
  position: fixed; inset: 0; z-index: 10; overflow-y: auto; background: var(--bg);
  padding: calc(var(--top-h) + var(--safe-t) + 10px) 18px calc(var(--bottom-h) + var(--safe-b) + 20px);
}
.panel-inner { max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.panel h2 { font-family: var(--display); font-weight: 800; font-size: 1.8rem; letter-spacing: -.02em; margin: 6px 0 0; }
.panel p { margin: 0; color: var(--text-2); }
.list { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: grid; grid-template-columns: 4px 1fr auto; gap: 12px; align-items: center;
  padding: 12px 12px 12px 0; border-radius: 12px; background: var(--bg-2); overflow: hidden;
}
.item .bar { align-self: stretch; background: var(--cat); border-radius: 0 3px 3px 0; }
.item .h { font-weight: 600; font-size: .98rem; line-height: 1.3; }
.item .m { font-size: .75rem; color: var(--text-3); margin-top: 2px; }
.item .x { font-size: 1rem; color: var(--text-3); padding: 6px; }
.item.due .m { color: var(--quiz); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.tile { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; }
.tile b { display: block; font-family: var(--display); font-size: 1.7rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile span { font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.barrow { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; align-items: center; font-size: .85rem; }
.barrow .track { height: 8px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.barrow .fill { height: 100%; background: var(--cat); border-radius: 4px; }
.barrow b { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 500; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { aspect-ratio: 1; border-radius: 8px; background: var(--bg-3); display: grid; place-items: center; font-size: .7rem; color: var(--text-3); }
.day.hit { background: var(--quiz); color: #1A1300; font-weight: 600; }
.day.today { outline: 2px solid var(--text-3); outline-offset: -2px; }
.linkrow { display: flex; gap: 8px; flex-wrap: wrap; }
.danger { color: var(--bad); font-size: .85rem; text-decoration: underline; }

/* ---------- Bottom nav ---------- */
.bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--bottom-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: rgba(15,18,32,.92); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.bottom button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; color: var(--text-3); }
.bottom button .ico { font-size: 1.15rem; }
.bottom button.active { color: var(--text); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--bottom-h) + var(--safe-b) + 14px); transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  opacity: 0; pointer-events: none; z-index: 30; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
@media (prefers-reduced-motion: no-preference) { .toast { transition: opacity .2s, transform .2s; } }

/* ---------- Loading / plain ---------- */
.loading { display: grid; place-items: center; color: var(--text-3); font-size: .9rem; }
body.plain { overflow: auto; display: grid; place-items: center; min-height: 100vh; }
.plain-box { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.plain-box h1 { font-family: var(--display); font-size: 4rem; margin: 0; }

/* Desktop: Feed als Handy-Spalte, damit das Gefühl bleibt */
@media (min-width: 700px) {
  .slide { padding-left: 40px; padding-right: 40px; }
}

/* ---------- Bottom nav mit 4 Einträgen ---------- */
.bottom { grid-template-columns: repeat(4, 1fr); }
.bottom a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; color: var(--text-3); text-decoration: none; }
.bottom a.has-user { color: var(--quiz); }

/* ---------- Melden-Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet-inner { width: 100%; max-width: 560px; background: var(--bg-2); border-radius: 18px 18px 0 0; padding: 18px 18px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; }
.sheet h3 { margin: 0; font-family: var(--display); font-size: 1.2rem; }
.sheet .opts { display: grid; gap: 6px; }
.sheet label.opt { cursor: pointer; padding: 10px 12px; }
.sheet label.opt input { accent-color: var(--quiz); }
.sheet textarea { width: 100%; min-height: 70px; background: var(--bg-3); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: inherit; resize: vertical; }
.legal-links { font-size: .75rem; color: var(--text-3); margin-top: 20px; }
.legal-links a { color: var(--text-3); }
@media (min-width: 700px) { .sheet { align-items: center; } .sheet-inner { border-radius: 18px; } }

/* ---------- Einfache Seiten (Konto, Rechtliches) ---------- */
body.page { overflow: auto; height: auto; min-height: 100vh; display: flex; flex-direction: column; }
.page-top { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + var(--safe-t)) 18px 12px; border-bottom: 1px solid var(--line); }
.page-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.page-nav a { color: var(--text-2); text-decoration: none; font-size: .9rem; padding: 6px 10px; border-radius: 8px; }
.page-nav a:hover { background: rgba(255,255,255,.08); color: var(--text); }
.page-nav .lang-link { font-weight: 600; letter-spacing: .05em; font-size: .8rem; background: rgba(255,255,255,.08); }
.page-main { flex: 1; max-width: 640px; width: 100%; margin: 0 auto; padding: 24px 18px 40px; }
.page-main h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.7rem, 5vw, 2.3rem); letter-spacing: -.02em; margin: 0 0 8px; }
.page-main h2 { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin: 0 0 8px; }
.page-main p { margin: 0 0 10px; }
.box { background: var(--bg-2); border-radius: 14px; padding: 16px 18px; margin: 14px 0; }
.box form { display: flex; flex-direction: column; gap: 10px; }
.box label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--text-2); }
.box label.check { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; line-height: 1.45; }
.box label.check input { margin: 2px 0 0; accent-color: var(--quiz); width: 18px; height: 18px; }
.box label.check span { display: block; }
.box label.check a { color: var(--text); text-underline-offset: 2px; }
.box input[type=email], .box input[type=password], .box input[type=text] { background: var(--bg-3); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 1rem; }
.box input:focus-visible { outline: 2px solid var(--quiz); border-color: transparent; }
.box .btn { align-self: flex-start; border: 0; cursor: pointer; }
.btn.danger { background: var(--bad); color: #fff; }
.inline-form { margin-top: 10px; }
.danger-link { cursor: pointer; color: var(--bad); font-size: .9rem; }
.danger-form { margin-top: 10px; }
.notice { padding: 12px 14px; border-radius: 12px; margin-bottom: 14px; font-size: .95rem; }
.notice.ok { background: rgba(43,174,102,.18); color: var(--text); border: 1px solid var(--ok); }
.notice.bad { background: rgba(224,83,75,.18); color: var(--text); border: 1px solid var(--bad); }
.tabs { display: flex; gap: 6px; margin: 14px 0 6px; flex-wrap: wrap; }
.tab { padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text-2); font-size: .85rem; font-weight: 500; }
.tab.on { background: var(--text); color: var(--bg); }
.small { font-size: .8rem; }
.page-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; padding: 16px; border-top: 1px solid var(--line); font-size: .78rem; color: var(--text-3); }
.page-foot a { color: var(--text-3); text-decoration: none; }
.page-foot a:hover { color: var(--text); }
.legal { max-width: 65ch; }
.legal h2 { margin-top: 22px; }
.legal p { color: var(--text-2); font-size: .95rem; line-height: 1.6; }
.legal a { color: var(--text); }
.legal code { background: var(--bg-3); padding: .1em .35em; border-radius: 4px; font-size: .85em; }

/* ---------- Icons ---------- */
.ic { display: inline-block; vertical-align: middle; }
.rail .ico .ic { width: 20px; height: 20px; }
.bottom .ico { display: grid; place-items: center; height: 22px; }
.bottom .ico .ic { width: 20px; height: 20px; }
.streak .ic { width: 15px; height: 15px; margin-right: 2px; }
.streak.hot .ic { color: var(--quiz); }
.lang { text-decoration: none; }
a.pill { text-decoration: none; }
a.pill:hover { filter: brightness(1.15); }

/* ---------- Intro-Karte (erster Besuch, serverseitig gerendert) ---------- */
.slide.intro .inner { text-align: left; align-items: flex-start; max-width: 600px; }
.eyebrow { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin: 0; }
.slide.intro .big { font-size: clamp(2.2rem, 9vw, 3.6rem); }
.intro-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.intro-topics a { text-decoration: none; font-size: .8rem; font-weight: 500; padding: 6px 11px; border-radius: 999px; color: var(--text); background: color-mix(in srgb, var(--cat) 28%, transparent); border: 1px solid color-mix(in srgb, var(--cat) 55%, transparent); }
.slide.intro .btn-row { justify-content: flex-start; }
.slide.intro .btn { border: 0; cursor: pointer; }

/* ---------- Themen- und Über-Seiten ---------- */
.topic-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.topic-head .pill { align-self: flex-start; }
.card-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.card-list li a { display: block; padding: 14px 16px; border-radius: 14px; background: var(--bg-2); text-decoration: none; border-left: 3px solid var(--cat); }
.card-list li a:hover { background: var(--bg-3); }
.card-list h2 { font-family: var(--display); font-weight: 700; font-size: 1.05rem; margin: 0 0 4px; letter-spacing: -.01em; }
.card-list p { margin: 0; font-size: .9rem; color: var(--text-2); }
.topic-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.topic-nav a { text-decoration: none; font-size: .8rem; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text-2); }
.topic-nav a.on { background: var(--text); color: var(--bg); }
.page-main .lede { font-size: 1.1rem; color: var(--text-2); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 14px 0; }
.facts div { background: var(--bg-2); border-radius: 12px; padding: 12px 14px; }
.facts b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 800; }
.facts span { font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }

/* Projekte */
.projects { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 10px; }
.projects a { display: grid; gap: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--text); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.projects a:hover, .projects a:focus-visible { border-color: var(--text-3); transform: translateY(-1px); }
.projects .p-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.projects .p-name { font-family: var(--display); font-size: 1.15rem; font-weight: 800; }
.projects .p-label { font-size: .72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; }
.projects .p-desc { color: var(--text-2); line-height: 1.5; }
.projects .p-host { font-size: .78rem; color: var(--text-3); }
.page-main .small { font-size: .82rem; }
.enough-more { margin: 14px 0 0; font-size: .82rem; }
.enough-more a { color: var(--text-3); }

/* ---- Suche, Schlagwörter, Kartenfuß ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.search-form { display: flex; gap: 8px; margin: 16px 0 20px; flex-wrap: wrap; }
.search-form input[type=search] {
  flex: 1 1 14rem; min-width: 0; padding: 12px 14px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 1rem;
}
.search-form input[type=search]:focus-visible { outline: 2px solid var(--text-2); outline-offset: 2px; }
.search-form .btn { padding: 12px 20px; }
.card-list mark { background: rgba(123,147,255,.28); color: inherit; border-radius: 3px; padding: 0 2px; }

.tag-cloud { list-style: none; margin: 18px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  display: inline-block; text-decoration: none; border-radius: 999px;
  padding: 8px 14px; background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text); font-size: calc(.82rem + var(--w) * .0022rem);
}
.tag-cloud a:hover { background: var(--bg-3); }
.tag-cloud .muted { color: var(--text-3); font-size: .72rem; margin-left: 4px; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.card-tags a {
  font-size: .74rem; text-decoration: none; padding: 4px 9px; border-radius: 999px;
  background: rgba(255,255,255,.07); color: var(--text-3);
}
.card-tags a:hover { color: var(--text-2); }
.card-meta { margin: 8px 0 0; font-size: .74rem; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.card-meta .dots { display: inline-flex; gap: 3px; }
.card-meta .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.18); }
.card-meta .dots i.on { background: var(--cat, var(--text-2)); }

/* ---- Zweite Seite zur Karte: Quiz, verwandte Karten, Einordnung ---- */
/* Der Kontext-Abschnitt ist länger als der Bildschirm. Mit „mandatory" würde das
   Einrasten dagegen arbeiten; „proximity" rastet bei den normalen Karten weiterhin
   ein und lässt diesen einen Abschnitt ruhig durchscrollen. */
.feed:has(.slide.context) { scroll-snap-type: y proximity; }
.slide.context {
  height: auto; min-height: 100%; justify-content: flex-start;
  scroll-snap-stop: normal;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.slide.context .inner { padding-right: 0; gap: 28px; max-width: 640px; }
.ctx-block h2 {
  font-family: var(--display); font-size: 1.05rem; font-weight: 700;
  margin: 0 0 10px; letter-spacing: -.01em;
}
.ctx-q { margin: 0 0 10px; font-size: 1rem; }
.ctx-opts { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; font-size: .92rem; color: var(--text-2); }
.ctx-answer { margin-top: 14px; }
.ctx-answer summary {
  cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--text-2);
  padding: 8px 0; list-style-position: outside;
}
.ctx-answer summary:hover { color: var(--text); }
.ctx-answer p { margin: 6px 0 0; font-size: .92rem; }
.ctx-expl { margin: 12px 0 0; font-size: .9rem; color: var(--text-2); }
.ctx-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ctx-list a {
  display: block; text-decoration: none; background: var(--bg-3);
  border-radius: 12px; padding: 12px 14px;
}
.ctx-list a:hover { background: rgba(255,255,255,.09); }
.ctx-list .h { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 3px; }
.ctx-list .m { display: block; font-size: .82rem; color: var(--text-2); }
.ctx-legal { margin: 14px 0 0; font-size: .78rem; color: var(--text-3); }
.ctx-legal a { color: var(--text-3); }

/* Kartenlisten: die Überschrift ist optisch eine Überschrift, aber kein H2 –
   150 Volltext-H2 hintereinander sind für Screenreader und Suchmaschinen Lärm. */
.card-list li a .h, .ctx-list a .h {
  font-family: var(--display); font-weight: 700; letter-spacing: -.01em;
}
.card-list li a .h { display: block; font-size: 1.05rem; margin: 0 0 4px; }
