/* ═══════════════════════════════════════════════════════════════════
   Warum-Kette des AusdauerLabs (Stand 07.10.2026)
   Gehoert zu assets/js/warumkette.js. Nimmt die Farben des Moduls
   (--modul, --tinte, --linie …) und hat Rueckfallwerte, damit sie in
   jedem Modul funktioniert. Stil Wettkampfbogen: Linien und Flaechen,
   keine Radien, keine Schatten.
   ═══════════════════════════════════════════════════════════════════ */

.wk { --wk-modul: var(--modul, #b23a1f); --wk-tinte: var(--tinte, #16181a);
  --wk-linie: var(--linie, #d8d3c8); --wk-grau: var(--grau, #6f6b64);
  --wk-flaeche: var(--flaeche, #fafafa); }

.wk-marke { margin: 0 0 4px; font-family: var(--kondens, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  font-weight: 700; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--wk-modul); }

/* Ausgangspunkt */
.wk-start { border: 3px solid var(--wk-tinte); background: var(--wk-flaeche); padding: 14px 18px; margin: 0 0 14px; }
.wk-satz { margin: 0; font-family: var(--kondens, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  font-weight: 700; font-size: 24px; line-height: 1.2; }

/* Bisher geklaerte Glieder, untereinander */
.wk-kette { list-style: none; margin: 0 0 14px; padding: 0; }
.wk-kette:empty { display: none; }
.wk-karte { display: grid; grid-template-columns: 52px 1fr; align-items: stretch;
  border: 3px solid var(--wk-tinte); border-top-width: 0; background: #fff; }
.wk-karte:first-child { border-top-width: 3px; }
.wk-nr { display: flex; align-items: center; justify-content: center; background: var(--wk-modul); color: #fff;
  font-family: var(--mono, 'Plex Mono', Consolas, monospace); font-weight: 600; font-size: 20px; }
.wk-text { padding: 11px 16px; font-size: 17px; line-height: 1.45; }

/* Aktuelle Frage */
.wk-station { border: 3px solid var(--wk-modul); background: #fff; padding: 18px 18px 20px; outline: none; }
.wk-station[hidden] { display: none; }
.wk-fnr { margin: 0 0 6px; font-family: var(--kondens, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  font-size: 14px; letter-spacing: .14em; text-transform: uppercase; color: var(--wk-grau); }
.wk-lead { margin: 0 0 10px; font-size: 16px; line-height: 1.45; color: var(--tinte-weich, #3d4145); }
.wk .wk-frage { margin: 0 0 14px; font-family: var(--kondens, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  font-weight: 700; font-size: 24px; line-height: 1.2; letter-spacing: .02em; text-transform: none; color: var(--wk-tinte); }

.wk-optionen { display: flex; flex-direction: column; gap: 10px; }
.wk-option { width: 100%; min-height: 60px; padding: 12px 16px; text-align: left;
  background: #fff; color: var(--wk-tinte); border: 3px solid var(--wk-tinte);
  font: inherit; font-size: 18px; line-height: 1.35; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wk-option:hover:not(:disabled) { border-color: var(--wk-modul); }
.wk-option:focus-visible { outline: 3px solid var(--wk-modul); outline-offset: 2px; }
.wk-option:disabled { cursor: default; }
.wk-option:disabled:not(.wk-richtig) { opacity: .45; }
.wk-option.wk-richtig { border-color: #2f7d32; background: #f1f8f1; font-weight: 600; opacity: 1; }
.wk-option.wk-falsch { border-color: #c0201a; background: #fdf2f1; }

.wk-hinweis { margin: 12px 0 0; padding: 12px 14px; font-size: 16px; line-height: 1.45;
  border-left: 6px solid #c0201a; background: #fdf2f1; }
.wk-hinweis[hidden] { display: none; }
.wk-hinweis-abruf { margin: 0 0 14px; font-size: 16px; color: var(--wk-grau); }

.wk-aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* Ganze Kette am Ende */
.wk-ende { border: 3px solid var(--wk-tinte); background: #fff; padding: 18px 18px 20px; outline: none; }
.wk-ende[hidden] { display: none; }
.wk .wk-ende-titel { margin: 0 0 12px; font-family: var(--kondens, 'Barlow Condensed', 'Arial Narrow', sans-serif);
  font-weight: 700; font-size: 22px; letter-spacing: .05em; text-transform: uppercase; color: var(--wk-modul); }
.wk-glieder { list-style: none; margin: 0; padding: 0; counter-reset: glied; }
.wk-glied { position: relative; counter-increment: glied; padding: 9px 0 9px 50px;
  border-bottom: 1px solid var(--wk-linie); font-size: 17px; line-height: 1.45; }
.wk-glied:last-child { border-bottom: 0; font-weight: 700; }
.wk-glied::before { content: counter(glied); position: absolute; left: 0; top: 8px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: var(--wk-modul); color: #fff;
  font-family: var(--mono, 'Plex Mono', Consolas, monospace); font-weight: 600; font-size: 17px; }
/* Der Pfeil zwischen den Gliedern traegt die Richtung Ursache → Wirkung */
.wk-glied:not(:last-child)::after { content: "↓"; position: absolute; left: 10px; bottom: -13px; z-index: 1;
  font-family: var(--mono, 'Plex Mono', Consolas, monospace); font-size: 16px; line-height: 1;
  background: #fff; color: var(--wk-grau); padding: 0 2px; }
.wk-satz-ende { margin: 16px 0 0; padding: 12px 16px; border-left: 6px solid var(--wk-modul);
  background: var(--wk-flaeche); font-weight: 600; font-size: 18px; }

@media (max-width: 640px) {
  .wk-satz { font-size: 21px; }
  .wk-station, .wk-ende { padding: 14px 14px 16px; }
  .wk .wk-frage { font-size: 21px; }
  .wk-option { font-size: 17px; min-height: 58px; }
  .wk-karte { grid-template-columns: 44px 1fr; }
  .wk-text { padding: 10px 12px; font-size: 16px; }
  .wk-glied { padding-left: 46px; font-size: 16px; }
  .wk-aktionen .knopf { width: 100%; }
}
