/* Oberfläche B „EHBS-Marke“ (Entscheidung Thomas 31.10.2026, Vorlage entwurf/oberflaeche/erzeugen.py, Richtung b).
   Dunkelblaue Kopfzeile mit weißem Logo-Feld, Reiter, hellgrauer Grund, weiße Karten mit dünnen Linien, rote Knöpfe.
   Nur Tokens aus ehbs-web.css. Die dunkle Darstellung kommt aus lernpfad.css (überschreibt die Tokens),
   hier nur Ergänzungen für Kopfzeile und Kopfzeilen-Elemente. Keine Webfonts, kein JavaScript. */

:root {
  --ehbs-bg-soft: #f3f4f8;
  --ehbs-line: #dfe2ec;
  --ehbs-text: #1a1f3d;
  --ehbs-text-sek: #4f5573;
  --radius: 6px;
  --shadow: none;
}

/* ---------- Kopfzeile ---------- */
.ob-kopf { background: var(--ehbs-blue); border-bottom: 0; color: #fff; }
.ob-kopf .ehbs-container { min-height: 64px; }
.ob-kopf .ehbs-logo img { height: 40px; width: auto; background: #fff; border-radius: var(--radius); padding: 3px 8px; display: block; }
.ob-kopf :focus-visible { outline: 3px solid #ffd27a; outline-offset: 2px; }
.ob-kopf .ehbs-btn--outline { color: #fff; border-color: rgba(255, 255, 255, .6); }
.ob-kopf .ehbs-btn--outline:hover { background: #fff; color: var(--ehbs-blue); }
.ob-kopfaktionen { flex: 1; justify-content: flex-end; gap: var(--space-3); flex-wrap: nowrap; }
.ob-suche { display: flex; align-items: center; gap: var(--space-2); flex: 1 1 auto; max-width: 320px; min-height: 40px; padding: 0 var(--space-3);
  background: rgba(255, 255, 255, .14); color: #fff; border-radius: 8px; text-decoration: none; font-size: var(--fs-small); }
.ob-suche:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.ob-suche span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-kopf .portal-sprachwahl select { min-height: 40px; background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .4); max-width: 9rem; }
.ob-kopf .portal-sprachwahl select option { color: #1a1f3d; background: #fff; }
.ob-profil { flex: none; width: 36px; height: 36px; border-radius: 50%; background: #ac1410; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; text-transform: uppercase; }

.ob-reiter { background: var(--ehbs-blue); border-top: 1px solid rgba(255, 255, 255, .14); }
.ob-reiter .ehbs-container { display: flex; gap: var(--space-6); overflow-x: auto; }
.ob-reiter a { color: rgba(255, 255, 255, .8); text-decoration: none; padding: var(--space-3) 0; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.ob-reiter a:hover { color: #fff; }
.ob-reiter a[aria-current="page"] { color: #fff; font-weight: 700; border-bottom-color: #fff; }
.ob-reiter a:focus-visible { outline: 3px solid #ffd27a; outline-offset: -3px; }

/* ---------- Seitenfläche ---------- */
.ob-buehne { max-width: 1180px; padding-top: var(--space-2); padding-bottom: var(--space-8); }
.ob-h1, .ob-buehne .ehbs-heading { font-size: 1.7rem; margin: var(--space-2) 0 var(--space-3); padding-bottom: 0; }
.ob-h1::after, .ob-buehne .ehbs-heading::after { display: none; }
.ob-h2 { font-size: 1.3rem; margin: var(--space-8) 0 var(--space-4); }
.ob-h3 { font-size: 1.15rem; margin: 0 0 var(--space-2); }
.ob-h4 { font-size: 1rem; margin: var(--space-4) 0 var(--space-2); }
.ob-frist { color: var(--ehbs-text-sek); margin-top: 0; }
.ob-kette { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: var(--fs-small); color: var(--ehbs-text-sek); margin: var(--space-4) 0; }
.ob-kette a { color: inherit; }
.ob-kette [aria-current="page"] { color: var(--ehbs-text); font-weight: 700; }

.ob-karte { background: var(--ehbs-white); border: 1px solid var(--ehbs-line); border-radius: var(--radius); padding: var(--space-6); margin-bottom: var(--space-4); }
.ob-karte--mittel { max-width: 46rem; }
.ob-karte > :first-child { margin-top: 0; }
.ob-karte .ehbs-heading, .ob-untervideo .ehbs-heading { margin-top: 0; }
.ob-gross { min-height: 52px; font-size: var(--fs-lg); padding: 0 var(--space-8); }
.ob-knopfreihe { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-top: var(--space-4); }
.ob-knopfreihe [hidden] { display: none; }
.ob-knopfreihe .portal-gross, .ob-knopfreihe .ob-gross { margin-top: 0; width: auto; }
.portal-fortschritt__balken { background: var(--ehbs-red); }

/* Fortschrittslinie */
.ob-fort { height: 6px; background: var(--ehbs-line); border-radius: 9px; overflow: hidden; }
.ob-fort i { display: block; height: 100%; background: var(--ehbs-red); }

/* ---------- „Weitermachen“ ---------- */
.ob-weiter { position: relative; display: block; width: min(100%, 440px); aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; background: #1d2a36; }
.ob-weiter img, .ob-platz { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ob-weiter img { filter: brightness(.45); }
.ob-platz { background: linear-gradient(135deg, #232e6a, #ac1410); }
.ob-weiter::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(0, 0, 0, .85)); }
.ob-weiter__play { position: absolute; z-index: 1; inset-inline-end: 1rem; top: 1rem; width: 48px; height: 48px; border-radius: 50%; background: #ac1410; color: #fff; display: grid; place-items: center; }
.ob-weiter__text { position: absolute; z-index: 1; inset: auto 1.1rem 1rem 1.1rem; display: grid; gap: 2px; }
.ob-weiter__text small { color: #e6e8f2; font-size: .8rem; }
.ob-weiter__text strong { font-size: 1.1rem; line-height: 1.3; }
.ob-weiter:hover .ob-weiter__play { background: #870f0c; }
.ob-weiter:focus-visible { outline: 3px solid var(--ehbs-focus); outline-offset: 3px; }

/* ---------- Kurs- und Kapitelkarten ---------- */
.ob-raster { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ob-kurs { background: var(--ehbs-white); border: 1px solid var(--ehbs-line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.ob-kurs__bild { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #232e6a, #ac1410) center / cover; }
.ob-kurs--gesperrt .ob-kurs__bild, .ob-kurs.ob-z--gesperrt .ob-kurs__bild { filter: grayscale(1) brightness(.8); }
.ob-kurs__nr { position: absolute; inset-block-start: .6rem; inset-inline-start: .6rem; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #232e6a; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.ob-kurs__text { padding: var(--space-4) var(--space-4) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.ob-kurs__text strong { font-size: 1.05rem; }
.ob-kurs__knoepfe { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); }
.ob-fortschrittskarte { margin: var(--space-6) 0 var(--space-4); max-width: 440px; }

/* Lerneinheiten-Übersicht: weiße Karten auf grauem Grund */
.lp-kopfkarte { background: var(--ehbs-white); border: 1px solid var(--ehbs-line); border-inline-start-width: 1px; }
.lp-kopfkarte .ob-fort, .lp-kopfkarte .portal-fortschritt { height: 8px; }
.lp-einheit, .lp-testkarte, .portal-kapitel__eintrag { background: var(--ehbs-white); }
.lp-einheit { border-inline-start-width: 1px; border-color: var(--ehbs-line); }
.lp-einheit--aktuell { border-color: var(--ehbs-primary); }
.lp-kapitel .portal-h2 { font-size: 1.15rem; }

/* ---------- Zweispaltig: Hauptspalte + Kapitelleiste ---------- */
.ob-lektion { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-6); align-items: start; }
.ob-lektion__haupt { min-width: 0; }
.ob-video { margin: 0; border-radius: var(--radius); background: #000; }
.ob-untervideo { margin: var(--space-4) 0; }
.ob-untervideo .ob-h1 { margin-top: 0; }
.ob-lektion .portal-test, .ob-lektion .lp-test { margin-top: var(--space-4); }
.ob-lektion .lp-einheit-seite > * + * { margin-top: var(--space-4); }
.ob-lektion .lp-abschluss { border: 1px solid var(--ehbs-line); border-radius: var(--radius); padding: var(--space-3) var(--space-4); }

.ob-leiste { background: var(--ehbs-white); border: 1px solid var(--ehbs-line); border-radius: var(--radius); overflow: hidden; position: sticky; top: var(--space-4); max-height: calc(100vh - 2rem); overflow-y: auto; }
.ob-leiste__kopf { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-4) var(--space-3); }
.ob-leiste__kopf h2 { font-size: 1rem; margin: 0; }
.ob-pille { flex: none; font-size: .75rem; font-weight: 700; padding: 2px var(--space-3); border-radius: 99px; background: var(--ehbs-primary-tint); color: var(--ehbs-text); }
.ob-leiste > .ob-fort { height: 3px; border-radius: 0; }
.ob-zeilen { list-style: none; margin: 0; padding: 0; }
.ob-zeile { border-top: 1px solid var(--ehbs-line); }
.ob-leiste > nav > .ob-zeilen > .ob-zeile:first-child { border-top: 0; }
.ob-zeile__in { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-2) var(--space-4); min-height: 44px; font-size: .88rem; color: inherit; text-decoration: none; border-inline-start: 3px solid transparent; }
a.ob-zeile__in:hover { background: var(--ehbs-primary-tint); }
a.ob-zeile__in:focus-visible { outline: 3px solid var(--ehbs-focus); outline-offset: -3px; }
.ob-zeile.ist-aktuell .ob-zeile__in { background: var(--ehbs-primary-tint); border-inline-start-color: var(--ehbs-primary); font-weight: 700; }
.ob-z--gesperrt .ob-zeile__in { color: var(--ehbs-text-sek); cursor: not-allowed; }
.ob-z--gesperrt .ob-mini { opacity: .5; }
.ob-zeile__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ob-zeile__text small { color: var(--ehbs-text-sek); font-weight: 400; margin-inline-start: var(--space-1); }
.ob-kreis { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ehbs-line); display: grid; place-items: center; font-size: .65rem; line-height: 1; }
.ob-z--fertig .ob-kreis { background: var(--ampel-green); border-color: var(--ampel-green); color: var(--ehbs-text-on-dark); }
.ob-z--aktiv .ob-kreis { border-color: var(--ehbs-red); color: var(--ehbs-red); }
.ob-z--offen .ob-kreis { border-color: var(--ehbs-text-sek); }
.ob-z--gesperrt .ob-kreis { border-style: dashed; }
.ob-mini { flex: none; position: relative; width: 72px; aspect-ratio: 16 / 9; border-radius: 4px; background: linear-gradient(135deg, #232e6a, #ac1410) center / cover; }
.ob-mini--text { background: var(--ehbs-bg-light); color: var(--ehbs-text-sek); display: grid; place-items: center; font-size: .7rem; text-align: center; line-height: 1.1; padding: 0 2px; }
.ob-dauer { position: absolute; inset-inline-end: 3px; bottom: 3px; background: rgba(0, 0, 0, .78); color: #fff; font-size: .65rem; padding: 0 4px; border-radius: 3px; }
.ob-gruppe { border-top: 1px solid var(--ehbs-line); }
.ob-gruppe summary { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); min-height: 44px; cursor: pointer; font-weight: 700; font-size: .9rem; list-style: none; }
.ob-gruppe summary::-webkit-details-marker { display: none; }
.ob-gruppe summary::before { content: "\25B8"; flex: none; transition: transform .15s; }
.ob-gruppe details[open] > summary::before { transform: rotate(90deg); }
[dir="rtl"] .ob-gruppe summary::before { content: "\25C2"; }
[dir="rtl"] .ob-gruppe details[open] > summary::before { transform: rotate(-90deg); }
.ob-gruppe summary:focus-visible { outline: 3px solid var(--ehbs-focus); outline-offset: -3px; }
.ob-gruppe__nr { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--ehbs-blue); color: #fff; display: grid; place-items: center; font-size: .75rem; }
.ob-gruppe__titel { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ob-gruppe summary small { color: var(--ehbs-text-sek); font-weight: 400; }
.ob-gruppe .ob-zeile__in { padding-inline-start: var(--space-6); }

/* ---------- Dunkle Darstellung: nur, was lernpfad.css nicht abdeckt ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-hell]) .ob-kopf .portal-sprachwahl select { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .4); }
  :root:not([data-hell]) .ob-kopf .portal-sprachwahl select option { background: #181c33; color: #f1f2f8; }
  :root:not([data-hell]) .ob-kopf .ehbs-logo img { padding: 3px 8px; }
  :root:not([data-hell]) .ob-gruppe__nr { background: #aab6ff; color: #10132a; }
  :root:not([data-hell]) .ob-kurs__nr { background: #fff; color: #232e6a; }
  :root:not([data-hell]) .ob-mini--text { background: var(--ehbs-bg-light); }
}

/* ---------- Handy: einspaltig, Leiste unter dem Video ---------- */
@media (max-width: 900px) {
  .ob-lektion { grid-template-columns: 1fr; gap: var(--space-4); }
  .ob-lektion__haupt { display: contents; }
  .ob-lektion > .ob-leiste { order: 3; position: static; max-height: none; overflow: visible; }
  .ob-lektion .ob-karte--nach { order: 4; }
  .ob-lektion .ob-video, .ob-lektion .ob-untervideo, .ob-lektion .ob-karte, .ob-lektion .lp-einheit-seite { order: 1; }
  .ob-lektion .ob-karte--nach { order: 4; }
  .ob-lektion .lp-einheit-seite { min-width: 0; }
}
@media (max-width: 640px) {
  .ob-kopf .ehbs-container { padding-top: var(--space-2); padding-bottom: var(--space-2); gap: var(--space-2); }
  .ob-kopfaktionen { flex-wrap: wrap; }
  .ob-suche { max-width: none; flex: 1 1 8rem; }
  .ob-kopf .portal-sprachwahl select { max-width: 7.5rem; }
  .ob-buehne { padding-top: 0; }
  .ob-karte { padding: var(--space-4); }
  .ob-gross { width: 100%; padding: 0 var(--space-4); }
  .ob-knopfreihe > * { flex: 1 1 100%; }
  .ob-knopfreihe .portal-weiter { width: 100%; }
  .ob-raster { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ob-gruppe summary::before { transition: none; } }

/* Abmelden in der Kopfzeile der Teilnehmenden */
.ob-abmelden { color: #fff; font-size: .9rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px;
  padding: .5rem .25rem; white-space: nowrap; }
.ob-abmelden:hover, .ob-abmelden:focus-visible { text-decoration-thickness: 2px; }
