/* Katalog, Erklärvideos unter Antworten, Markieren. Nur Tokens aus stil.css; Handy (375 px) zuerst. */

/* ---------- Erklärvideo unter Antwort/Aufgabe ---------- */
.erklaer-videos { display: grid; gap: 10px; margin-top: 14px; }
.erklaer-video { display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--flaeche-2); box-shadow: inset 0 0 0 1px var(--linie); }
.ev-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; }
.ev-auf { flex: 1 1 auto; min-width: 0; }
.ev-play { width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent currentColor; }
.ev-auf[aria-expanded="true"] .ev-play { width: 10px; height: 10px; border: 0; border-radius: 2px; background: currentColor; }
.ev-laden { min-height: 44px; }
.ev-titel { margin: 0; }
.ev-player { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 8px; background: #16191b; }
.ev-player[hidden] { display: none; }
.werk-ergebnis .erklaer-videos { margin-top: 10px; }

/* ---------- Markieren (Lesezeichen) ---------- */
.marke-knopf { appearance: none; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 8px;
  margin: -6px -8px -6px auto; border-radius: 8px; font: inherit; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); -webkit-tap-highlight-color: transparent; }
.marke-knopf svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.marke-knopf[aria-pressed="true"] { color: var(--text); }
.marke-knopf[aria-pressed="true"] svg { fill: var(--akzent); stroke: var(--text); }
.marke-knopf:hover { background: var(--linie); }
.marke-knopf:active { transform: scale(0.96); }
.quelle .marke-knopf { margin: 0 0 0 6px; vertical-align: middle; }

/* ---------- Katalog ---------- */
.kat-kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kat-kopfzeile .knopf { min-height: 40px; padding: 0 14px; }
.kat-suche { position: relative; margin-top: 22px; }
.kat-suche svg { position: absolute; left: 14px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.kat-suche input { width: 100%; height: 54px; padding: 0 14px 0 46px; border-radius: var(--radius-klein); border: 1px solid var(--linie); background: var(--flaeche);
  font-size: 1.0625rem; box-shadow: var(--schatten-1); -webkit-appearance: none; appearance: none; }
.kat-suche input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px var(--akzent-weich); }
.kat-filter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 14px; }
/* Am Handy eine waagerecht wischbare Reihe statt drei Zeilen Chips */
.kat-arten { margin-top: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--rand, 16px)); padding: 4px var(--rand, 16px); scroll-padding-inline: var(--rand, 16px); }
.kat-arten::-webkit-scrollbar { display: none; }
.kat-arten .chip { flex: none; min-height: 40px; }
.kat-n { margin-left: 4px; font-size: 0.8125rem; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .kat-n { color: inherit; opacity: 0.7; }
.kat-thema { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; font-weight: 600; }
.kat-thema select { flex: 1; min-width: 0; max-width: 340px; height: 44px; padding: 0 12px; border-radius: var(--radius-klein); border: 1px solid var(--linie); background: var(--flaeche); font-weight: 500; font-size: 1rem; }
.kat-fehler { margin: 14px 0 0; }
.kat-fehler .knopf { min-height: 32px; padding: 0 4px; }
.kat-zahl { margin: 18px 0 8px; }
.kat-zahl .knopf { min-height: 32px; padding: 0 4px; }
.kat-liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linie); }
.kat-liste li { border-bottom: 1px solid var(--linie); }
.kat-liste li.kat-mit { display: flex; align-items: center; gap: 4px; }
.kat-mit .kat-eintrag { flex: 1; min-width: 0; }
.kat-mit .marke-knopf { margin: 0 4px 0 0; flex: none; }
.kat-eintrag { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 56px; padding: 10px 4px;
  border: 0; background: none; text-align: left; cursor: pointer; color: var(--text); border-radius: 6px; -webkit-tap-highlight-color: transparent; }
.kat-eintrag:hover { background: var(--flaeche); }
.kat-eintrag:active { background: var(--flaeche-2); }
/* Art als Beschriftungsschild – mit der Aderfarbe des Themas als Kante */
.kat-art { width: 88px; box-sizing: border-box; padding: 2px 4px; border-radius: 4px; background: var(--flaeche); box-shadow: inset 3px 0 0 var(--farbe, var(--linie)), inset 0 0 0 1px var(--linie);
  font-family: var(--schrift-schild); font-weight: 600; font-size: 0.875rem; line-height: 1.35; color: var(--text-2); text-align: center; }
.kat-text { display: grid; gap: 2px; min-width: 0; }
.kat-titel { font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.kat-unter { font-size: 0.8125rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kat-unter:empty { display: none; }
.kat-mehr { margin-top: 16px; display: flex; justify-content: center; }
.kat-gruppe { margin: 34px 0 10px; font-size: 1.375rem; }
.kat-gruppe .klein { font-weight: 600; }

/* ---------- Eintrag im Blatt ---------- */
.blatt-innen.kat-blatt { width: min(720px, 100%); }
.kat-blatt-inhalt { display: grid; gap: 12px; min-width: 0; }
.kat-blatt-inhalt h2 { font-size: 1.375rem; line-height: 1.3; overflow-wrap: anywhere; }
.kat-blatt-inhalt h2:focus { outline: none; }
.kat-blatt-inhalt p { margin: 0; line-height: 1.5; }
.kat-kopf { display: flex; align-items: center; gap: 10px; }
.kat-kopf .marke-knopf { margin-right: -8px; }
.kat-optionen .option { cursor: default; min-height: 48px; }
.kat-erklaerung { display: grid; gap: 12px; }
.kat-erklaerung .urteil { display: none; }
.kat-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.kat-knoepfe .knopf:first-child:not(.leise) { flex: 1 1 200px; }
.kat-h3 { font-size: 1.0625rem; margin: 6px 0 0; }
.kat-links, .kat-punkte { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.kat-unterlagen { margin: 0; display: grid; gap: 6px; }
.kat-unterlagen div { display: grid; gap: 2px; padding: 8px 10px; border-radius: 8px; background: var(--flaeche-2); }
.kat-unterlagen dt { font-size: 0.8125rem; font-weight: 600; color: var(--text-2); }
.kat-unterlagen dd { margin: 0; overflow-wrap: anywhere; }
.kat-formel code { font: 600 1.125rem/1.4 ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }

@media (min-width: 761px) {
  .kat-arten { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding: 0; }
  .kat-filter { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .kat-eintrag { padding: 10px 8px; }
}
@media (prefers-reduced-motion: reduce) { .marke-knopf:active { transform: none; } }
/* In Listen nur das Zeichen (Text bleibt für den Vorleser) – der Titel braucht den Platz */
.kat-mit .marke-knopf { min-width: 44px; min-height: 44px; justify-content: center; }
.kat-mit .marke-knopf span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Probeprüfung-Auswertung: Lesezeichen gleich in der Zeile, ohne sie aufzuklappen (Knopf liegt neben, nicht im Zeilenknopf) */
.runde.mit-marke { position: relative; }
.runde.mit-marke > .marke-knopf { position: absolute; top: 6px; right: 6px; margin: 0; min-width: 44px; min-height: 44px; justify-content: center; z-index: 1; }
.runde.mit-marke > .marke-knopf span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.runde.mit-marke > .runde-kopf { padding-right: 56px; }
/* .runde-details li (für die Verlaufsliste in leitwert.css) traf auch die Rechenschritte der Prüfungsauswertung:
   der Rechenweg stand in einer 22-px-Spalte, ein Zeichen je Zeile. Hier die Schritt-Form wiederherstellen. */
.runde-details .schritte li { grid-template-columns: none; gap: 4px; padding: 10px 12px 10px 42px; border-top: 0; }
.runde-details .loesung-reihe li { display: list-item; padding: 0; border-top: 0; }
