/* Erklärgrafiken, Fassung 2 (13.11.2026). Gemeinsames Gerüst für alle Seiten mit <figure class="erklaer ek …">.
   Wird vom Bau nur auf Seiten mit Erklärgrafik eingebunden. Die Szenen selbst stehen in page-<seite>.css
   (erzeugt von tools/erklaer-css.py). Alle Abläufe dauern 12 s und sind in gleich lange Schritte geteilt.
   Die Hervorhebung der Schritte läuft nur mit js/erklaer.js (Klasse ek--js), damit sie ohne JavaScript nicht ohne Bild weiterläuft. */
.erklaer-block { margin-top: 40px; }
.erklaer { margin: 0; }
.ek { --ek-dauer: 12s; --ek-haut: #F5E9DB; --ek-haut-2: #E8D5BE; --ek-knochen: #FFFBF1; --ek-knochen-2: #EFE5D2; --ek-knorpel: #BCD5E2; --ek-kontur: var(--dark-soft); --ek-stoff: #DCE7EE; --ek-stoff-2: #5B7083; --ek-haar: #4B3A30; --ek-innen: #86705A;
  background: var(--white); border: 1px solid var(--gray-mid); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.ek__buehne { border-radius: var(--radius-md); background: radial-gradient(120% 100% at 50% 35%, #fff 0%, #fff 35%, var(--gray-warm) 100%); border: 1px solid var(--gray-light); overflow: hidden; }
.ek__bild { display: block; width: 100%; height: auto; max-height: 420px; margin: 0 auto; }
.ek figcaption { margin-top: 14px; }

/* Schritte: Karten mit Nummer und Fortschrittsbalken */
.ek__schritte { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; counter-reset: ek; }
.ek__schritte li { --ek-i: 0; counter-increment: ek; position: relative; overflow: hidden; background: var(--white); border: 1.5px solid var(--gray-mid); border-radius: var(--radius-md); line-height: 1.5; font-size: .95rem; }
.ek__schritte li:nth-child(2) { --ek-i: 1; }
.ek__schritte li:nth-child(3) { --ek-i: 2; }
.ek__schritte li:nth-child(4) { --ek-i: 3; }
.ek__schritte li::before { content: counter(ek); position: absolute; left: 12px; top: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--gray-light); color: var(--dark); font-weight: 700; font-size: .85rem; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.ek__schritte li::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--orange); transform: scaleX(0); transform-origin: left; pointer-events: none; }
.ek__t { display: block; padding: 12px 14px 16px 48px; }
button.ek__t { display: flex; flex-direction: column; justify-content: flex-start; appearance: none; -webkit-appearance: none; width: 100%; height: 100%; margin: 0; border: 0; background: none; font: inherit; color: inherit; line-height: inherit; text-align: left; cursor: pointer; border-radius: inherit; }
button.ek__t:focus-visible { outline-offset: -5px; }
.ek__schritte li:hover:has(button) { border-color: var(--orange); }
.ek__t strong { display: block; margin-bottom: 2px; }
.ek--spalte .ek__schritte { grid-template-columns: 1fr; }
@media (min-width: 961px) { .ek--breit { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 20px; align-items: start; } .ek--breit figcaption { margin-top: 0; } .ek--breit .ek__schritte { grid-template-columns: 1fr; } }
.ek__fuss { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-top: 12px; }
.ek__hinweis { font-size: .85rem; color: var(--text-muted); margin: 0; }
.ek__knopf { display: inline-flex; align-items: center; gap: 8px; }
.ek__knopf[hidden] { display: none; }
.ek__knopf svg { width: 14px; height: 14px; flex-shrink: 0; fill: currentColor; }
.ek--4 .ek__schritte { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 600px) { .ek { padding: 10px; } .ek__schritte, .ek--4 .ek__schritte { grid-template-columns: 1fr; gap: 8px; } }

/* Zeichenstil */
.ek-k { fill: var(--ek-kontur); stroke: var(--ek-kontur); stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.ek-f { fill: var(--ek-haut); stroke: none; }
.ek-v { stroke: none; }
.ek-f--stoff { fill: var(--ek-stoff); }
.ek-gk { fill: none; stroke: var(--ek-kontur); stroke-linecap: round; }
.ek-gf { fill: none; stroke: var(--ek-haut); stroke-linecap: round; }
.ek-gf--stoff { stroke: var(--ek-stoff); }
.ek-gf--hose { stroke: var(--ek-stoff-2); }
.ek-gf--schuh { stroke: #fff; }
.ek-haar { fill: var(--ek-haar); }
.ek-auge { fill: var(--ek-kontur); }
.ek-schatten { fill: rgba(28,28,30,.07); }
.ek-polster { fill: var(--ek-kontur); }
.ek-knochen { fill: var(--ek-knochen); stroke: var(--ek-kontur); stroke-width: 3; stroke-linejoin: round; }
.ek-knochen--innen { stroke: var(--ek-innen); stroke-width: 2.5; }
.ek-knochen-2 { fill: var(--ek-knochen-2); stroke: none; }
.ek-knorpel { fill: none; stroke: var(--ek-knorpel); stroke-width: 7; }
.ek-t { font: 600 24px 'Figtree', sans-serif; fill: var(--dark); stroke: #fff; stroke-width: 6px; stroke-linejoin: round; paint-order: stroke; }
.ek-l { fill: none; stroke: var(--gray); stroke-width: 2; stroke-linecap: round; }
.ek-lp { fill: var(--gray); }
.ek-pfeil { fill: var(--orange); stroke: var(--ek-kontur); stroke-width: 2.5; stroke-linejoin: round; }
.ek-skala { fill: none; stroke: var(--gray-mid); stroke-width: 9; stroke-linecap: round; }
.ek-skala-wert { fill: none; stroke: var(--orange-strong); stroke-width: 9; stroke-dasharray: 100 100; }
.ek-hand-f { fill: #fff; stroke: none; }
.ek-aermel { fill: var(--orange); stroke: var(--ek-kontur); stroke-width: 2.5; stroke-linejoin: round; }

@media (prefers-reduced-motion: no-preference) {
  .ek .ek-szene { animation: ek-blende var(--ek-dauer) linear infinite; }
  .ek--js .ek__schritte li { animation: ek-aktiv-3 var(--ek-dauer) step-end infinite; animation-delay: calc(var(--ek-i) * var(--ek-dauer) / 3); }
  .ek--js .ek__schritte li::before { animation: ek-nr-3 var(--ek-dauer) step-end infinite; animation-delay: calc(var(--ek-i) * var(--ek-dauer) / 3); }
  .ek--js .ek__schritte li::after { animation: ek-balken-3 var(--ek-dauer) linear infinite; animation-delay: calc(var(--ek-i) * var(--ek-dauer) / 3); }
  .ek--js.ek--4 .ek__schritte li { animation-name: ek-aktiv-4; animation-delay: calc(var(--ek-i) * var(--ek-dauer) / 4); }
  .ek--js.ek--4 .ek__schritte li::before { animation-name: ek-nr-4; animation-delay: calc(var(--ek-i) * var(--ek-dauer) / 4); }
  .ek--js.ek--4 .ek__schritte li::after { animation-name: ek-balken-4; animation-delay: calc(var(--ek-i) * var(--ek-dauer) / 4); }
}
/* Anhalten-Knopf und Pause außerhalb des sichtbaren Bereichs (Klassen setzt js/erklaer.js) */
.erklaer.is-paused *, .erklaer.is-paused *::before, .erklaer.is-paused *::after,
.erklaer.is-offscreen *, .erklaer.is-offscreen *::before, .erklaer.is-offscreen *::after { animation-play-state: paused !important; }
@keyframes ek-blende { 0% { opacity: 0; } 2.5%, 97.5% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ek-aktiv-3 { 0% { background: var(--orange-pale); border-color: var(--orange); } 33.33%, 100% { background: var(--white); border-color: var(--gray-mid); } }
@keyframes ek-aktiv-4 { 0% { background: var(--orange-pale); border-color: var(--orange); } 25%, 100% { background: var(--white); border-color: var(--gray-mid); } }
@keyframes ek-nr-3 { 0% { background: var(--orange); color: var(--on-orange); } 33.33%, 100% { background: var(--gray-light); color: var(--dark); } }
@keyframes ek-nr-4 { 0% { background: var(--orange); color: var(--on-orange); } 25%, 100% { background: var(--gray-light); color: var(--dark); } }
@keyframes ek-balken-3 { 0% { transform: scaleX(0); } 33.33% { transform: scaleX(1); } 33.34%, 100% { transform: scaleX(0); } }
@keyframes ek-balken-4 { 0% { transform: scaleX(0); } 25% { transform: scaleX(1); } 25.01%, 100% { transform: scaleX(0); } }
