/* ============================================================
   Gemeinsames Design aller App-Seiten (Walied 05.10.2026):
   Vorlage ist „Üben und Prüfen“ (aevo-theorie.css, Abschnitt „Neugestaltung“).
   Wird NACH den seiteneigenen Stilen geladen und vereinheitlicht Karten, Köpfe und Überschriften.
   Präfix ds- für neue Bausteine.
   ============================================================ */

/* Browser geben Formularelementen eine eigene Schrift (Arial) – Seitenschrift erben (Gerüst-Bug B-025, 16.10.2026) */
button, input, select, textarea { font-family: inherit; }

/* ── Grundkarten aller Seiten: gleicher Rand und Radius wie die Modus-Karten ── */
.as-box, .ap-box, .st-box { border-color: #262b3f !important; border-radius: 16px; }

/* ── Seitenkopf: große Überschrift, EIN kurzer grauer Satz ── */
.ds-kopf { margin-bottom: 22px; }
.ds-kopf h1 { font-family: Inter, sans-serif; font-size: 2rem; font-weight: 800; color: #fff; margin: 0 0 6px; letter-spacing: -.01em; }
.ds-kopf p { font-size: 16.5px; color: #9aa0b0; margin: 0; line-height: 1.55; }
.ap-kopf p { font-size: 16.5px; line-height: 1.55; }

/* ── Abschnittsüberschrift mit Link rechts ── */
.ds-abschnitt { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.ds-abschnitt:first-child { margin-top: 0; }
.ds-abschnitt h2 { font-family: Inter, sans-serif; font-size: 1.2rem; font-weight: 800; color: #e8eaf0; margin: 0; }
.ds-abschnitt a { color: #a5b4fc; font-weight: 700; text-decoration: none; white-space: nowrap; font-size: 15px; }
.ds-abschnitt a:hover { text-decoration: underline; }
.ds-abschnitt span { font-size: 14px; color: #8b8fa6; }

/* ── Karte (wie die Modus-Karten „Üben“/„Prüfung simulieren“) ── */
.ds-karten { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ds-karten.drei { grid-template-columns: repeat(3, 1fr); }
.ds-karte { --ds-farbe: #6366f1; --ds-farbe-hell: rgba(99,102,241,.16);
  position: relative; display: flex; align-items: flex-start; gap: 16px; text-align: left; font-family: inherit; color: #e8eaf0;
  padding: 22px 22px 20px; border-radius: 16px; border: 1px solid #262b3f; overflow: hidden; text-decoration: none; box-sizing: border-box;
  background: linear-gradient(160deg, var(--ds-farbe-hell), rgba(19,22,31,0) 55%), #13161f; transition: border-color .2s, transform .2s, box-shadow .2s; }
.ds-karte::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--ds-farbe); }
a.ds-karte, button.ds-karte { cursor: pointer; }
@media (hover: hover) { a.ds-karte:hover, button.ds-karte:hover { border-color: var(--ds-farbe); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.35); } }
.ds-karte:focus-visible { outline: 2px solid var(--ds-farbe); outline-offset: 2px; }
.ds-karte-icon { flex: 0 0 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--ds-farbe-hell); color: var(--ds-farbe); }
.ds-karte-icon svg { width: 26px; height: 26px; }
.ds-karte-text { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.ds-karte-name { font-family: Inter, sans-serif; font-size: 1.35rem; font-weight: 800; color: #e8eaf0; }
.ds-karte-beschr { font-size: 15.5px; color: #b4b9c8; line-height: 1.5; }
.ds-karte-los { align-self: center; font-size: 1.4rem; font-weight: 800; color: var(--ds-farbe); }
/* kleinere Kartenvariante (Weitere Bereiche, Downloads) */
.ds-karte.klein { padding: 16px 16px 15px; gap: 14px; }
.ds-karte.klein .ds-karte-icon { flex-basis: 40px; height: 40px; border-radius: 10px; }
.ds-karte.klein .ds-karte-icon svg { width: 21px; height: 21px; }
.ds-karte.klein .ds-karte-name { font-size: 1.08rem; }
.ds-karte.klein .ds-karte-beschr { font-size: 14.5px; }
.ds-karte.klein .ds-karte-los { font-size: 1.15rem; }
/* Karte ohne Hover-Aktion, aber mit Akzentstrich (Inhaltskästen) */
.ds-flaeche { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--ds-farbe-hell, rgba(99,102,241,.12)), rgba(19,22,31,0) 45%), #13161f; }
.ds-flaeche::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--ds-farbe, #6366f1); }

/* ── Akzentfarben (nach .ds-karte, damit sie deren Standard überschreiben) ── */
.ds-indigo  { --ds-farbe: #6366f1; --ds-farbe-hell: rgba(99,102,241,.16); }
.ds-orange  { --ds-farbe: #f0a03c; --ds-farbe-hell: rgba(240,160,60,.14); }
.ds-violett { --ds-farbe: #8b5cf6; --ds-farbe-hell: rgba(139,92,246,.15); }
.ds-cyan    { --ds-farbe: #06b6d4; --ds-farbe-hell: rgba(6,182,212,.14); }
.ds-gruen   { --ds-farbe: #10b981; --ds-farbe-hell: rgba(16,185,129,.14); }
.ds-rot     { --ds-farbe: #ef4444; --ds-farbe-hell: rgba(239,68,68,.13); }

/* ── Fakten-Pillen ── */
.ds-fakten { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ds-fakten span { font-size: 13.5px; font-weight: 700; color: #cfd2de; background: rgba(255,255,255,.05); border: 1px solid #2a2f45;
  border-radius: 999px; padding: 3px 10px; }

/* ── Handlungsfeld-Kacheln (linker Farbrand, Stand + Balken) ── */
.ds-hf-raster { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ds-hf { display: flex; flex-direction: column; gap: 3px; text-align: left; font-family: inherit; color: #e8eaf0; text-decoration: none;
  background: #13161f; border: 1px solid #262b3f; border-left: 4px solid var(--hf); border-radius: 12px; padding: 14px 14px 12px;
  transition: border-color .2s, background .2s; box-sizing: border-box; min-width: 0; }
a.ds-hf { cursor: pointer; }
@media (hover: hover) { a.ds-hf:hover { border-color: var(--hf); background: #171b28; } }
.ds-hf:focus-visible { outline: 2px solid var(--hf); outline-offset: 2px; }
.ds-hf1 { --hf: #6366f1; } .ds-hf2 { --hf: #8b5cf6; } .ds-hf3 { --hf: #06b6d4; } .ds-hf4 { --hf: #10b981; }
.ds-hf-nr { font-size: 13px; font-weight: 800; letter-spacing: .06em; color: var(--hf); }
.ds-hf-name { font-family: Inter, sans-serif; font-size: 16px; font-weight: 800; line-height: 1.3; }
.ds-hf-unter { font-size: 13.5px; color: #8b8fa6; }
.ds-hf-stand { font-size: 13.5px; font-weight: 700; color: #cfd2de; margin-top: 8px; }
.ds-hf-balken { display: block; height: 5px; border-radius: 99px; background: #23283a; overflow: hidden; margin-top: 4px; }
.ds-hf-balken i { display: block; height: 100%; width: 0; background: var(--hf); border-radius: 99px; transition: width .4s; }

/* ── Einzeilige Pillenleiste (Reiter/Filter), am Handy seitlich wischbar ── */
.ds-pillen { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; padding-bottom: 2px; }
.ds-pillen::-webkit-scrollbar { display: none; }
.ds-pillen > button, .ds-pillen > a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-family: inherit; font-size: 14.5px; font-weight: 700; padding: 7px 14px; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: #13161f; border: 1px solid #262b3f; color: #9aa0b0; transition: color .15s, border-color .15s, background .15s; }
@media (hover: hover) { .ds-pillen > button:not(.aktiv):not(.active):hover, .ds-pillen > a:not(.aktiv):hover { color: #e8eaf0; border-color: #3a4060; } }
.ds-pillen > .aktiv, .ds-pillen > .active { background: #5558e6; border-color: #5558e6; color: #fff; }
.ds-pillen i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ── Handy ── */
@media (max-width: 900px) {
  .ds-hf-raster { grid-template-columns: 1fr 1fr; }
  .ds-karten.drei { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .ds-kopf h1 { font-size: 1.55rem; }
  .ds-kopf p, .ap-kopf p { font-size: 15.5px; }
  .ds-karten, .ds-karten.drei { grid-template-columns: 1fr; gap: 12px; }
  .ds-karte { padding: 16px; gap: 12px; }
  .ds-karte-icon { flex-basis: 42px; height: 42px; }
  .ds-karte-name { font-size: 1.2rem; }
  .ds-abschnitt { margin-top: 24px; }
  .ds-abschnitt h2 { font-size: 1.08rem; }
  .ds-abschnitt span { display: none; }
  .ds-hf { padding: 12px; }
  .ds-hf-name { font-size: 15px; }
}

/* ── Ergänzungen für die Werkzeugseiten (Konzept-Check, Builder, Fachgespräch, Übungsplan) ── */
.ap-kopf .ds-fakten { margin-top: 12px; }
button.ds-karte.aktiv { border-color: var(--ds-farbe); box-shadow: inset 0 0 0 1px var(--ds-farbe); }
button.ds-karte:not(.aktiv) { opacity: .8; }
@media (hover: hover) { button.ds-karte:not(.aktiv):hover { opacity: 1; } }
.fg-quellen { margin-bottom: 16px; }
.ap-box > h2 { font-family: Inter, sans-serif; font-size: 1.2rem; font-weight: 800; color: #fff; }

/* ── Zusammenfassungen / Prüfungswissen: Filter-Pillen mit Farbpunkt wie die HF-Leiste ── */
.zs-toc-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.zs-toc-chip.hf1::before, .zs-toc-chip.hf2::before, .zs-toc-chip.hf3::before, .zs-toc-chip.hf4::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.zs-toc-chip.hf1::before { background: #6366f1; } .zs-toc-chip.hf2::before { background: #8b5cf6; }
.zs-toc-chip.hf3::before { background: #06b6d4; } .zs-toc-chip.hf4::before { background: #10b981; }
.zs-toc-chip.active::before { background: #fff !important; }
.zs-toc-chip.active { background: #5558e6; border-color: #5558e6; }
/* Handy: Fakten-Pillen im Kopf weglassen, damit das Werkzeug gleich sichtbar ist */
@media (max-width: 640px) { .ap-kopf .ds-fakten { display: none; } }
