/* ==========================================================================
   Dispolotse · Design system v3 „Luxus" · ds/wiki-lesen.css — wiki articles (07.10.2026)
   Generated pages wiki-<slug>.html (wiki_bauen.py). Prefix wl-.
   Two reading modes (Marco chooses):
     ① „Ganzer Artikel"  — the article reads normally, contents list sticky (PC) / fold (phone)  [default]
     ② „Abschnittweise"  — one section at a time, the contents list becomes tabs, prev/next below
   Without JS the article always reads as ①.
   ========================================================================== */

/* body text sits inside .wl-abschnitt now — same reading rhythm as the sample article */
.wl-abschnitt > p, .wl-abschnitt > ul, .wl-abschnitt > ol { line-height: 1.75; font-size: 1.02rem; margin: 0 0 var(--ab3); }
.wl-abschnitt > ul, .wl-abschnitt > ol { padding-left: 1.3em; }
.wl-abschnitt > ul li, .wl-abschnitt > ol li { margin-bottom: 6px; }
.wl-abschnitt > ul li::marker, .wl-abschnitt > ol li::marker { color: var(--ton); }
.wl-abschnitt > ol li::marker { font-weight: 700; font-family: var(--mono); font-size: .9em; }
.us-artikel h3 { font-family: var(--serif); font-weight: 580; font-size: 1.22rem; margin: var(--ab5) 0 var(--ab2); color: var(--text); scroll-margin-top: 90px; }
.us-artikel code { font-family: var(--mono); font-size: .86em; padding: 1px 6px; border-radius: 6px; background: var(--mulde); border: 1px solid var(--rand); overflow-wrap: anywhere; }
.us-artikel .us-tipp ul, .us-artikel .us-tipp ol { margin: 6px 0 0; padding-left: 1.2em; line-height: 1.6; }
.wl-achtung { background: rgba(240, 107, 111, .07); border-color: rgba(240, 107, 111, .22); border-left-color: var(--rost); }
.wl-achtung p:first-child { color: var(--rost); }
.us-artikel a { overflow-wrap: anywhere; }

/* tables: scroll inside their own frame, never the page */
.wl-tabelle { max-width: 100%; overflow-x: auto; margin: var(--ab4) 0 var(--ab5); border: 1px solid var(--rand); border-radius: var(--rd); background: var(--karte-verlauf); box-shadow: var(--schatten-klein); scrollbar-width: thin; }
.wl-tabelle table { width: 100%; border-collapse: collapse; font-size: .9rem; line-height: 1.5; }
.wl-tabelle th, .wl-tabelle td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rand); }
.wl-tabelle th { color: var(--text-gold); font-weight: 640; font-size: .8rem; letter-spacing: .02em; background: var(--karte2); white-space: nowrap; }
.wl-tabelle tr:last-child td { border-bottom: 0; }
.wl-tabelle td:first-child { color: var(--text); font-weight: 560; }

/* ── reading-mode switch ─────────────────────────────────────────────── */
.wl-lesart { display: flex; align-items: center; gap: var(--ab3); flex-wrap: wrap; margin: 0 0 var(--ab4); }
.wl-wahl button[aria-pressed="true"] { color: var(--text); background: var(--karte-verlauf) padding-box, var(--glanzkante) border-box; border: 1px solid transparent; box-shadow: var(--schatten-klein); }
.wl-wahl button[aria-pressed="true"] .i-k { color: var(--text-gold); }

/* ── ② one section at a time ─────────────────────────────────────────── */
.wl-teilreiter, .wl-schritt { display: none; }
.wl-teilweise .wl-teilreiter { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 var(--ab4); border-radius: 14px; background: var(--mulde); border: 1px solid var(--rand); }
.wl-teilreiter button { border: 1px solid transparent; background: none; color: var(--matt); font-weight: 620; font-size: .84rem; min-height: 36px; padding: 0 12px; border-radius: 10px; white-space: nowrap; }
.wl-teilreiter button:hover { color: var(--text); }
.wl-teilreiter button[aria-current="true"] { color: var(--text); background: var(--karte-verlauf) padding-box, var(--glanzkante-gold) border-box; box-shadow: var(--schatten-klein); }
.wl-teilweise .wl-abschnitt:not(.wl-an) { display: none; }
.wl-teilweise .wl-abschnitt { animation: wl-ein var(--ruhig) var(--kurve); }
.wl-teilweise .wl-abschnitt > h2:first-child { margin-top: var(--ab2); }
.wl-teilweise .us-toc-handy { display: none; }
.wl-teilweise .wl-schritt { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--ab3); margin-top: var(--ab5); padding-top: var(--ab4); border-top: 1px solid var(--rand); }
.wl-schritt .knopf { height: auto; min-height: 56px; padding: 8px 14px; justify-content: flex-start; min-width: 0; }
.wl-schritt .knopf[data-schritt="1"] { justify-content: flex-end; }
.wl-schritt .knopf[disabled] { opacity: .35; cursor: default; }
.wl-schritt-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.wl-schritt .knopf[data-schritt="1"] .wl-schritt-text { align-items: flex-end; text-align: right; }
.wl-schritt-text b { font-weight: 640; font-size: .88rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-schritt-text small { font-size: .62rem; }
.wl-schritt-zahl { font-family: var(--mono); white-space: nowrap; }
@keyframes wl-ein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wl-teilweise .wl-abschnitt { animation: none; } }

/* ── related articles ────────────────────────────────────────────────── */
.wl-verwandt { margin-top: var(--ab6); }
.wl-verwandt > .aufschrift { margin-bottom: var(--ab3); }
.wl-verwandt-raster .us-themenkarte small { display: block; }

@media (max-width: 1100px) {
  .wl-verwandt-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .wl-teilweise .wl-teilreiter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .wl-teilreiter::-webkit-scrollbar { display: none; }
  .wl-teilweise .wl-schritt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wl-schritt-zahl { grid-column: 1 / -1; grid-row: 1; text-align: center; }
  .wl-verwandt-raster { grid-template-columns: minmax(0, 1fr); }
  .wl-tabelle th, .wl-tabelle td { padding: 8px 10px; }
}

/* label on the gold „next" button: dark ink, not gold on gold */
.wl-schritt .knopf.haupt .wl-schritt-text small { color: var(--auf-ton); opacity: .72; }
.wl-schritt .knopf[disabled] .wl-schritt-text b { visibility: hidden; }

/* phone: every table row becomes a small card (the live cells carry data-titel) */
@media (max-width: 700px) {
  .wl-tabelle { background: none; border: 0; box-shadow: none; overflow: visible; }
  .wl-tabelle table, .wl-tabelle tbody { display: block; }
  .wl-tabelle thead { display: none; }
  .wl-tabelle tr { display: block; margin-bottom: var(--ab2); padding: var(--ab2) var(--ab3); border: 1px solid var(--rand); border-radius: var(--rd); background: var(--karte-verlauf); box-shadow: var(--schatten-klein); }
  .wl-tabelle td { display: grid; grid-template-columns: minmax(0, 34%) minmax(0, 1fr); gap: var(--ab2); padding: 6px 0; border-bottom: 1px solid var(--rand); overflow-wrap: anywhere; }
  .wl-tabelle tr td:last-child { border-bottom: 0; }
  .wl-tabelle td[data-titel]::before { content: attr(data-titel); color: var(--matt); font-size: .74rem; font-weight: 600; letter-spacing: .02em; padding-top: 2px; }
}

/* phone: the arrows carry the direction, the section title is enough; related cards compact */
@media (max-width: 700px) {
  .wl-schritt-text small { display: none; }
  .wl-schritt .knopf { min-height: 48px; }
  .wl-verwandt-raster .us-themenkarte > span:not(.us-tk-kopf) { display: none; }
  .wl-verwandt-raster .us-themenkarte { padding: var(--ab3) var(--ab4); }
}

/* L2 pipeline 07.10.2026: the group heading inside each start-page panel is for readers without JS
   (all groups shown); with the tabs working it would only repeat the tab */
.wl-reiter-an .wl-gruppe { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
