/* Vitrine /beispiele und die Bereichsfassungen /beispiele-erp, -web, -gebaeude (aus _konzepte/mockup-hifi, live-fertig
   09.11.2026; BEREICHE.md, Abschnitt B). Farben nur aus den Tokens in style.css, dadurch passt alles zu Hell/Dunkel.
   Textgröße und Abstände der Bedienleiste (G11): Schrift im HTML als max(9px, calc(Npx * var(--ts))), Abstände als
   calc(Npx * var(--ui)). Die Schrift in den Diagrammen (.vt-svg text) bleibt in viewBox-Einheiten: sie wächst mit der
   Breite der Bühne, und die Plätze der Beschriftungen rechnet vitrine.js für genau diese Größen. */

/* ── Seite ── */
.vt-sprung { display: flex; flex-wrap: wrap; gap: calc(8px * var(--ui)) calc(18px * var(--ui)); font-family: var(--mono); font-size: max(9px, calc(13px * var(--ts))); }
.vt-sprung a { color: var(--muted); text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.vt-sprung a:hover { color: var(--accent); }
.vt { gap: calc(14px * var(--ui)); }
.vt h2 { max-width: 30ch; }
.vt-knoepfe { display: flex; flex-wrap: wrap; gap: calc(8px * var(--ui)); align-items: center; }
.vt-knoepfe button { font: max(9px, calc(13px * var(--ts))) / 1 var(--mono); color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 6px; min-height: 36px; padding: 0 calc(12px * var(--ui)); cursor: pointer; }
.vt-knoepfe button:hover { color: var(--fg); border-color: var(--muted); }
.vt-knoepfe button[aria-pressed="true"] { color: var(--fg); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.vt-knoepfe .vt-leise { border-style: dashed; margin-left: auto; }
.vt-buehne { width: 100%; max-width: 1100px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.vt-svg { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.vt-svg text { font-family: var(--mono); font-size: 13px; fill: var(--muted); }
.vt-svg text.zahl { fill: var(--fg); font-size: 12px; }
.vt-svg text.klein { font-size: 11px; }
.vt-hilfe line, .vt-hilfe circle { stroke: var(--line); stroke-width: 1.4; }
.vt-kanten line { stroke: var(--edge); stroke-width: 0.8; stroke-opacity: 0.5; }
.vt-kanten line.quer { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 2 4; stroke-linecap: round; stroke-opacity: 0.8; }
/* Wolkenfarben wie im Netz: f1 = Grün (Werkbank), f2–f5 */
.vt-f1 { fill: var(--accent); background: var(--accent); }
.vt-f2 { fill: var(--w2); background: var(--w2); }
.vt-f3 { fill: var(--w3); background: var(--w3); }
.vt-f4 { fill: var(--w4); background: var(--w4); }
.vt-f5 { fill: var(--w5); background: var(--w5); }
/* Skizze: nur Umriss, wie im Band */
.vt-svg rect.st-skizze { fill-opacity: 0.08; stroke-width: 1.4; stroke-dasharray: 3 2; }
.vt-svg rect.vt-f1.st-skizze { stroke: var(--accent); } .vt-svg rect.vt-f2.st-skizze { stroke: var(--w2); }
.vt-svg rect.vt-f3.st-skizze { stroke: var(--w3); } .vt-svg rect.vt-f4.st-skizze { stroke: var(--w4); } .vt-svg rect.vt-f5.st-skizze { stroke: var(--w5); }
.vt-svg[data-ansicht="netz"] rect.st-skizze, .vt-svg[data-ansicht="ring"] rect.st-skizze, .vt-svg[data-ansicht="band"] rect.st-skizze { fill-opacity: 0.5; }
.vt-svg rect { transition: fill-opacity 0.6s; }
.vt-svg rect:hover { filter: brightness(1.2); }

/* „Das will ich auch“: bewusst leise, rechts unter dem Exponat */
.vt-will { align-self: flex-end; font: max(9px, calc(13px * var(--ts))) var(--mono); color: var(--faint); text-decoration: none; border-bottom: 1px dashed var(--line); padding: 6px 0 2px; }
.vt-will:hover, .vt-will:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
.vt-ende p { color: var(--muted); }
.vt-ende a { color: var(--accent); text-decoration: none; }
/* Kleine Hinweiszeile, z. B. „Daten fiktiv“ in der Bühne B1 und unter der Morph-Bühne */
.vt-hinweis { font-size: max(9px, calc(12px * var(--ts))); color: var(--faint); margin: 0; }
/* im Hero gegen .hero p (größer, --muted) durchsetzen */
.hero .vt-hinweis { margin-top: calc(-10px * var(--ui)); font-size: max(9px, calc(12px * var(--ts))); color: var(--faint); max-width: 96ch; }

/* ── 02 · Eigene Zahlen ── */
.z-rahmen { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: calc(18px * var(--ui)); width: 100%; max-width: 1100px; }
.z-eingabe { display: flex; flex-direction: column; gap: calc(6px * var(--ui)); }
.z-zeile { display: grid; grid-template-columns: 10px minmax(0, 1fr) 76px; gap: 8px; align-items: center; }
.z-farbe { width: 10px; height: 10px; border-radius: 50%; }
.z-eingabe input { font: max(9px, calc(14px * var(--ts))) var(--sans); color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; min-height: 40px; padding: 0 10px; width: 100%; }
.z-eingabe input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.z-eingabe .z-wert { text-align: right; font-family: var(--mono); }
.z-kpi { display: flex; flex-wrap: wrap; gap: calc(8px * var(--ui)) calc(22px * var(--ui)); margin: calc(6px * var(--ui)) 0 0; font-size: max(9px, calc(13px * var(--ts))); color: var(--muted); }
.z-kpi b { font: 700 max(9px, calc(20px * var(--ts))) var(--mono); color: var(--fg); margin-right: 4px; }
.z-kpi span { display: inline-flex; align-items: baseline; gap: 4px; }
.z-linie { fill: none; stroke: var(--fg); stroke-width: 1.6; stroke-opacity: 0.7; }
.z-flaeche { fill: var(--accent); fill-opacity: 0.12; stroke: none; }
.vt-svg text.z-summe { font: 700 30px var(--mono); fill: var(--fg); }
.vt-svg text.z-summe-k { font-size: 12px; fill: var(--faint); }
.vt-svg text.z-name-t { font-size: 12px; }

/* ── 03 · Tabelle wird Dashboard ── */
.t-zelle { fill: var(--bg); stroke: var(--line); stroke-width: 1; transition: fill 0.5s, stroke-opacity 0.5s; }
.t-zelle.kopf { fill: color-mix(in srgb, var(--line) 45%, var(--bg)); }
.t-zelle.dash { stroke-opacity: 0; }
.t-zelle.dash[data-ka="0"] { fill: transparent; }
.t-zelle.dash[data-ka="1"] { fill: var(--w2); }
.t-zelle.dash[data-ka="2"] { fill: var(--accent); }
.t-zelle.dash[data-ka="3"] { fill: var(--w4); }
.vt-svg text.t-wert { fill: var(--fg); font-family: var(--mono); }
.vt-svg text.t-wert.kopf { fill: var(--muted); font-weight: 700; }
.t-kachel { fill: var(--bg); stroke: var(--line); }
.vt-svg text.t-kzahl { font: 700 26px var(--mono); fill: var(--fg); }
.vt-svg text.t-kname { font-size: 12px; fill: var(--faint); }
.t-linie { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 1; stroke-linejoin: round; }
.t-dash line { stroke: var(--line); stroke-width: 1.4; }
/* 03 rechts: Projektliste aus 01 */
.t-paar { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: calc(14px * var(--ui)); width: 100%; max-width: 1100px; }
.t-paar .vt-buehne { max-width: none; }
.vt-svg text.p-name { font-size: 11px; fill: var(--muted); font-family: var(--sans); }
.vt-svg text.p-stand { font-size: 10px; fill: var(--faint); }
.p-linie { stroke: var(--line); }
.t-hinweis { margin: 0; font-size: max(9px, calc(12px * var(--ts))); color: var(--faint); }
.t-hinweis a { color: var(--muted); }
@media (max-width: 900px) { .t-paar { grid-template-columns: 1fr; } }

/* ── 04 · Zwei Tabellen verknüpft ── */
.t-zelle.v-an { fill: color-mix(in srgb, var(--accent) 16%, var(--bg)); }
.t-zelle.dash.v-an { stroke: var(--fg); stroke-opacity: 1; stroke-width: 2; }
.t-zelle.dash[data-ka="m1"] { fill: var(--accent); } .t-zelle.dash[data-ka="m2"] { fill: var(--w2); } .t-zelle.dash[data-ka="m3"] { fill: var(--w3); }
.t-zelle.dash[data-ka="m4"] { fill: var(--w4); } .t-zelle.dash[data-ka="m5"] { fill: var(--w5); }
.vt-svg text.auf-farbe { fill: var(--on-accent); font-weight: 700; }
.v-band { fill: var(--accent); fill-opacity: 0.14; stroke: var(--accent); stroke-opacity: 0.55; stroke-width: 1.2; pointer-events: none; }
.v-band.offen { fill: none; stroke-width: 2; stroke-opacity: 0.8; }
.v-satz { margin: 0; font-size: max(9px, calc(14px * var(--ts))); color: var(--muted); min-height: 1.6em; }
.v-satz b { color: var(--fg); font-family: var(--mono); font-weight: 700; }

/* ── 05 · Ablauf beim Scrollen ── */
.ab { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: calc(40px * var(--ui)); width: 100%; max-width: 1100px; }
.ab-rahmen { position: sticky; top: 24px; align-self: start; }
.ab-buehne { position: relative; display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: calc(22px * var(--ui)); min-height: 280px; }
.ab-zone { grid-area: 1 / 1; opacity: 0; transition: opacity 0.5s; align-self: start; }
.ab-buehne[data-s="0"] .ab-zettel, .ab-buehne[data-s="1"] .ab-form, .ab-buehne[data-s="2"] .ab-form, .ab-buehne[data-s="3"] .ab-bericht { opacity: 1; }
.ab-zone > small { display: block; font: max(9px, calc(12px * var(--ts))) var(--mono); color: var(--faint); margin-bottom: 10px; }
.ab-slot { display: inline-block; visibility: hidden; max-width: 100%; white-space: normal; }
/* Lange Wörter (große Schrift am Handy) brechen im Platzhalter um, statt die Seite seitlich zu verbreitern; vitrine.js
   gibt dem wandernden Wort (.ab-chip) dann dieselbe Breite, so bricht es an derselben Stelle um. Rahmen und Innenabstand
   von Wort und Platzhalter sind in jedem Schritt gleich, sonst stimmt die Breite nicht. */
/* Zettel: Schrift wie die wandernden Wörter (.ab-chip), sonst passen die Plätze nicht */
.ab-zettel .ab-text { margin: 0; padding: 16px 18px; background: color-mix(in srgb, var(--w3) 16%, var(--bg)); border-radius: 4px; transform: rotate(-1deg); font: max(9px, calc(16px * var(--ts))) / 1.9 var(--mono); color: var(--fg); max-width: 34ch; }
.ab-text .nw { white-space: nowrap; }
/* Formular */
.ab-form dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 12px; margin: 0; align-items: center; }
.ab-form dt { font-size: max(9px, calc(12px * var(--ts))); color: var(--faint); }
.ab-form dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ab-form .ab-slot, .ab-buehne[data-s="1"] .ab-chip, .ab-buehne[data-s="2"] .ab-chip { font: max(9px, calc(14px * var(--ts))) / 1.4 var(--sans); padding: 3px 9px; border: 1px solid transparent; border-radius: 99px; }
.ab-ok { margin-left: auto; align-self: center; color: var(--accent); font-weight: 700; opacity: 0; transform: scale(0.4); transition: opacity 0.4s, transform 0.4s; }
.ab-regel { margin: 14px 0 0; font-size: max(9px, calc(12px * var(--ts))); color: var(--muted); opacity: 0; transition: opacity 0.5s 0.2s; }
.ab-regel b { color: var(--accent); }
.ab-buehne[data-s="2"] .ab-ok { opacity: 1; transform: none; }
.ab-buehne[data-s="2"] .ab-regel { opacity: 1; }
/* Bericht */
.ab-blatt { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; display: grid; gap: 6px; }
.ab-blatt h4 { margin: 0 0 6px; font: 700 max(9px, calc(14px * var(--ts))) var(--mono); color: var(--fg); }
.ab-blatt p { margin: 0; font-size: max(9px, calc(13px * var(--ts))); color: var(--muted); }
.ab-blatt p > i { font-style: normal; color: var(--faint); margin-right: 6px; }
.ab-bericht .ab-slot, .ab-buehne[data-s="3"] .ab-chip { font: max(9px, calc(13px * var(--ts))) / 1.5 var(--sans); padding: 0 3px 0 0; border: 0; }
.ab-fertig { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ab-fertig span { font: max(9px, calc(12px * var(--ts))) var(--mono); border: 1px solid var(--accent); color: var(--accent); border-radius: 99px; padding: 3px 10px; }
/* Wörter, die wandern */
.ab-chips { position: absolute; inset: 0; pointer-events: none; }
.ab-chip { position: absolute; left: 0; top: 0; white-space: nowrap; color: var(--fg); font: max(9px, calc(16px * var(--ts))) / 1.9 var(--mono); padding: 0; border: 0 solid transparent; border-radius: 0;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1), font-size 0.9s, padding 0.9s, background-color 0.6s, border-color 0.6s, border-radius 0.6s, line-height 0.9s; }
.ab-buehne[data-s="1"] .ab-chip { background: color-mix(in srgb, var(--w2) 18%, var(--bg)); }
.ab-buehne[data-s="2"] .ab-chip { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.ab-buehne[data-s="3"] .ab-chip { color: var(--fg); background: transparent; }
/* Schritte als Zeitleiste: Linie links, je Schritt ein Rahmen; der aktive ist grün umrandet und zeigt mehr Erklärung */
.ab-anleitung { font: max(9px, calc(13px * var(--ts))) var(--mono); color: var(--accent); }
.ab-schritte { position: relative; list-style: none; margin: 0; padding: 4vh 0 34vh 28px; display: flex; flex-direction: column; gap: 26vh; counter-reset: ab; }
.ab-schritte::before { content: ""; position: absolute; left: 8px; top: 4vh; bottom: 34vh; width: 2px; background: linear-gradient(var(--line), var(--line)) no-repeat; }
.ab-schritte li { position: relative; opacity: 0.55; transition: opacity 0.4s, border-color 0.4s, background-color 0.4s; cursor: pointer;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: calc(14px * var(--ui)) calc(16px * var(--ui)); }
.ab-schritte li::before { content: ""; position: absolute; left: -26px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); transition: background-color 0.4s, border-color 0.4s; }
.ab-schritte li.jetzt { opacity: 1; border-color: var(--accent); }
.ab-schritte li.jetzt::before, .ab-schritte li.vorbei::before { background: var(--accent); border-color: var(--accent); }
.ab-schritte li:hover { opacity: 0.9; }
.ab-schritte .ab-mehr { max-height: 0; overflow: hidden; opacity: 0; margin-top: 0; font-size: max(9px, calc(14px * var(--ts))); color: var(--muted); transition: max-height 0.5s, opacity 0.5s, margin-top 0.5s; }
.ab-schritte li.jetzt .ab-mehr { max-height: 12em; opacity: 1; margin-top: 8px; }
.ab-schritte h3 { margin: 0 0 6px; font-size: max(9px, calc(16px * var(--ts))); }
.ab-schritte h3::before { counter-increment: ab; content: counter(ab) " · "; color: var(--accent); }
.ab-schritte p { margin: 0; }
/* Fortschritt über der Bühne und Hinweis darunter */
.ab-fortschritt { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; font: max(9px, calc(12px * var(--ts))) var(--mono); color: var(--muted); }
.ab-balken { display: flex; gap: 6px; }
.ab-balken button { width: 34px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--line); cursor: pointer; transition: background-color 0.4s; }
.ab-balken button.an { background: var(--accent); }
.ab-balken button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ab-weiter { margin: 8px 0 0; font: max(9px, calc(12px * var(--ts))) var(--mono); color: var(--faint); text-align: center; transition: opacity 0.4s; animation: ab-wippen 1.8s ease-in-out infinite; }
.ab[data-s="3"] .ab-weiter { opacity: 0; }
@keyframes ab-wippen { 50% { transform: translateY(4px); } }

/* Bereichsleiste: allgemeine Beispiele und die drei Bereichsfassungen */
.vt-bereiche { display: flex; flex-wrap: wrap; gap: calc(8px * var(--ui)); }
.vt-bereiche a { font: max(9px, calc(13px * var(--ts))) var(--mono); color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; min-height: 34px; display: inline-flex; align-items: center; }
.vt-bereiche a:hover { color: var(--fg); border-color: var(--muted); }
.vt-bereiche a[aria-current="page"] { color: var(--fg); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

@media (max-width: 640px) {
  .z-rahmen { grid-template-columns: 1fr; }
  .vt-knoepfe .vt-leise { margin-left: 0; }
  .ab { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ab-rahmen { top: 0; z-index: 2; background: var(--bg); padding: 8px 0; }
  .ab-buehne { padding: calc(14px * var(--ui)); min-height: 0; }
  .ab-zettel .ab-text, .ab-chip { font-size: max(9px, calc(14px * var(--ts))); }
  .ab-schritte { padding: 4vh 0 40vh 26px; gap: 40vh; }
  .ab-schritte::before { bottom: 40vh; }
  .ab-weiter { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ab-chip, .ab-zone, .ab-ok, .ab-regel, .ab-schritte li, .ab-schritte .ab-mehr, .vt-svg rect, .t-zelle { transition: none; }
  .ab-weiter { animation: none; }
}

/* Hell (G5): die Karten in 04 („Rechts nach Stand“) tragen ihre Zahl. Auf den abgedunkelten Wolkenfarben wäre die dunkle
   Schrift (--on-accent) zu schwach; hell bekommen die Karten daher eine helle Tönung der Wolkenfarbe und dunkle Schrift. */
html[data-theme="light"] .t-zelle.dash[data-ka="m1"] { fill: color-mix(in srgb, var(--accent) 28%, var(--panel)); }
html[data-theme="light"] .t-zelle.dash[data-ka="m2"] { fill: color-mix(in srgb, var(--w2) 28%, var(--panel)); }
html[data-theme="light"] .t-zelle.dash[data-ka="m3"] { fill: color-mix(in srgb, var(--w3) 28%, var(--panel)); }
html[data-theme="light"] .t-zelle.dash[data-ka="m4"] { fill: color-mix(in srgb, var(--w4) 28%, var(--panel)); }
html[data-theme="light"] .t-zelle.dash[data-ka="m5"] { fill: color-mix(in srgb, var(--w5) 28%, var(--panel)); }
html[data-theme="light"] .vt-svg text.auf-farbe { fill: var(--fg); }
