/* css/stage.css - Modul C: Main Stage (Keynote-Stil).
 * Nur Design-Tokens aus dem :root-Block in index.html, keine eigenen Hex-Werte. */

.main-stage {
  display: block;
  position: relative;
  width: 100%;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.stage-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 56px) clamp(16px, 4vw, 48px) 28px;
  min-height: 78vh;
}

/* ---- Folie ------------------------------------------------------------- */

.stage-deck { flex: 1 1 auto; display: flex; }

.slide {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr;
  /* "safe" verhindert, dass eine ueberhohe Folie nach oben aus dem Kasten
   * laeuft und der untere Teil nicht mehr erreichbar ist. */
  align-content: center;
  align-content: safe center;
  gap: clamp(20px, 3vw, 40px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 240ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.slide.is-in { opacity: 1; transform: none; }

.slide.is-split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  align-items: safe center;
}

.slide-text { min-width: 0; }

.slide-kicker {
  margin: 0 0 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-color);
}

.slide-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: clamp(32px, 4.4vw, 64px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: var(--headline-spacing);
  text-transform: var(--headline-transform);
  text-wrap: balance;
}

.slide-body {
  margin-top: clamp(16px, 2.4vh, 28px);
  max-width: 62ch;
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.6;
  color: var(--text-muted);
}

.slide-body .md-heading {
  margin: 0 0 10px;
  font-family: var(--font-headline);
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-caption);
}

.slide-body .md-p { margin: 0 0 12px; }
.slide-body .md-p:last-child { margin-bottom: 0; }
.slide-body strong { color: var(--text-primary); font-weight: 700; }
.slide-body em { font-style: italic; }

.md-code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--brand-color);
}

.md-list { margin: 0 0 12px; padding-left: 1.2em; }
.md-list li { margin-bottom: 6px; }

.slide-bullets {
  margin: clamp(16px, 2.4vh, 26px) 0 0;
  padding: 0;
  list-style: none;
  max-width: 62ch;
  display: grid;
  gap: 10px;
}

.slide-bullets li {
  position: relative;
  padding-left: 22px;
  font-size: clamp(14px, 1.05vw, 17px);
  line-height: 1.5;
  color: var(--text-muted);
}

.slide-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-color);
}

.slide-commit { margin: clamp(18px, 2.6vh, 30px) 0 0; }

.commit-chip {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: var(--radius-field);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-ghost);
  color: var(--text-caption);
}

.commit-chip::before { content: "commit "; color: var(--text-caption); opacity: 0.6; }

/* ---- Mockup und Code --------------------------------------------------- */

.slide-visual { min-width: 0; display: grid; gap: 16px; align-content: safe center; }
.slide-visual.is-inline { margin-top: clamp(18px, 2.6vh, 30px); max-width: 720px; }

.mockup-pane, .code-pane {
  margin: 0;
  background: var(--surface-1);
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 1px var(--border-ghost);
  overflow: hidden;
}

.mockup-img { display: block; width: 100%; height: auto; }

.mockup-frame {
  display: block;
  width: 100%;
  height: clamp(220px, 34vh, 420px);
  border: 0;
  background: var(--surface-0);
}

.mockup-caption, .code-head {
  font-size: 12px;
  color: var(--text-caption);
  padding: 10px 16px;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-ghost);
}

.code-title { font-weight: 600; color: var(--text-muted); }

.code-lang {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-color);
}

.code-body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  max-height: clamp(220px, 40vh, 460px);
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.65;
}

.code-gutter {
  display: flex;
  flex-direction: column;
  padding: 14px 10px 14px 16px;
  text-align: right;
  color: var(--text-caption);
  opacity: 0.45;
  user-select: none;
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
}

.code-source { margin: 0; padding: 14px 16px 14px 12px; }
.code-source code { display: block; white-space: pre; }
.code-line { display: block; }

.tok-str { color: var(--brand-secondary); }
.tok-com { color: var(--text-caption); font-style: italic; opacity: 0.8; }
.tok-key { color: var(--brand-color); }
.tok-num { color: color-mix(in srgb, var(--brand-secondary) 65%, var(--text-primary)); }
.tok-var { color: var(--brand-color); }
.tok-prop { color: var(--text-primary); }

/* ---- Funnel-Widget ----------------------------------------------------- */

.funnel {
  margin: clamp(18px, 2.6vh, 30px) 0 0;
  padding: clamp(16px, 2vw, 24px);
  background: var(--surface-1);
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 1px var(--border-ghost);
}

.funnel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 16px;
}

.funnel-title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-caption);
}

.funnel-plot { position: relative; }
.funnel-svg { display: block; width: 100%; height: auto; overflow: visible; }

.funnel-label {
  font-family: var(--font-body);
  font-size: 13px;
  fill: var(--text-muted);
}

.funnel-value {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 12px;
  fill: var(--text-caption);
}

.funnel-track { fill: var(--surface-3); }
.funnel-bar { fill: var(--brand-color); opacity: 0.85; }
.funnel-bar.is-drop { fill: var(--brand-secondary); opacity: 0.9; }

/* Drop-off-Bereich: liegt als Schaltflaeche ueber der Luecke zwischen den
 * beiden betroffenen Balken, damit er per Tab erreichbar bleibt. */
.funnel-drop {
  position: absolute;
  height: 16px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 6px;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-secondary) 12%, transparent);
  cursor: help;
  font: inherit;
}

.funnel-drop-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--brand-secondary);
}

.funnel-drop:hover, .funnel-drop:focus, .funnel-drop:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--brand-secondary) 22%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-secondary) 45%, transparent);
}

/* Bewusst im Fluss statt absolut: absolut positioniert wird das Panel am
 * unteren Rand der Buehne abgeschnitten. Es liegt ausserhalb von .funnel-plot,
 * weil es sonst dessen Hoehe aendert und die Prozent-Position des Drop-off-
 * Bandes verschiebt. Es schiebt beim Aufklappen die Marker nach unten. */
.funnel-tip {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--surface-3);
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 1px var(--border-ghost);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Fokus kommt ohne :has aus, Hover braucht es (Chrome/Safari seit 2022). */
.funnel-plot:focus-within + .funnel-tip,
.funnel-plot:has(.funnel-drop:hover) + .funnel-tip,
.funnel-tip:hover { display: block; }

.funnel-tip p { margin: 0 0 8px; }
.funnel-tip p:last-child { margin-bottom: 0; }

.funnel-tip-head {
  display: inline-block;
  margin-right: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-color);
}

.funnel-tip-excl { color: var(--text-caption); }

.funnel-markers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.funnel-marker {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-field);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-ghost);
}

.funnel-marker-key {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-caption);
}

.funnel-marker-val {
  font-family: var(--font-headline);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-muted);
}

.funnel-marker.is-after .funnel-marker-val { color: var(--brand-color); }

/* ---- Notizen ----------------------------------------------------------- */

.stage-notes {
  padding: 14px 18px;
  background: var(--surface-2);
  border-radius: var(--radius-card);
  box-shadow: inset 0 0 0 1px var(--border-ghost);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  max-height: 26vh;
  overflow: auto;
}

.stage-notes .notes-head {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-caption);
}

.stage-notes .md-p, .stage-notes .md-list { margin: 0 0 8px; }
.stage-notes .md-p:last-child { margin-bottom: 0; }

/* ---- Fuss: Punkte, Zaehler, Fortschritt -------------------------------- */

.stage-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.stage-dots { display: flex; flex-wrap: wrap; gap: 8px; }

.stage-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--surface-4);
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.stage-dot:hover { background: var(--text-caption); }

.stage-dot.is-active {
  background: var(--brand-color);
  transform: scale(1.35);
}

.stage-dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.stage-counter {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-caption);
}

.stage-progress {
  height: 2px;
  border-radius: 2px;
  background: var(--surface-3);
  overflow: hidden;
}

.stage-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand-color);
  transition: width 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- Schmale Fenster und Vollbild -------------------------------------- */

@media (max-width: 820px) {
  .slide.is-split { grid-template-columns: 1fr; }
  .stage-frame { min-height: 70vh; padding-left: 16px; padding-right: 16px; }
  .funnel-drop { justify-content: flex-start; }
  .funnel-drop-label { font-size: 11px; }
}

:fullscreen .stage-frame { min-height: 92vh; max-width: 1400px; }

@media (prefers-reduced-motion: reduce) {
  .slide { transition: none; opacity: 1; transform: none; }
  .stage-progress span { transition: none; }
  .stage-dot { transition: none; }
}

/* ============================================================
   Folien-Layouts (Slide.layout) und Abbildungen
   ============================================================ */

/* Die Folie muss auf 1440x900 ohne Seiten-Scroll passen. Statt die Schrift
   zu verkleinern, ist der Folienkoerper in der Hoehe gedeckelt und scrollt
   bei Ueberlauf intern - Titel, Kicker und Fusszeile bleiben stehen. */
.slide-body {
  max-height: 58vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Vertrauenswuerdiges Folien-HTML bringt eigene Spaltenraster mit und darf
   deshalb nicht auf die Lesebreite des Markdown-Koerpers eingeschnuert werden. */
.slide-body.slide-html {
  max-width: none;
  font-size: 13.5px;
  line-height: 1.5;
}

.slide:has(.slide-html) .slide-title { font-size: clamp(24px, 2.6vw, 38px); }

/* --- layout: title --- */
.slide.is-title { align-content: center; justify-items: center; text-align: center; }
.slide.is-title .slide-text { max-width: 74ch; }
.slide.is-title .slide-title { font-size: clamp(34px, 4.4vw, 62px); }
.slide.is-title .slide-body { margin-top: clamp(14px, 2.2vh, 26px); }

/* --- layout: divider --- */
.slide.is-divider { align-content: center; justify-items: center; text-align: center; }
.slide.is-divider .slide-text { max-width: 62ch; }
.slide.is-divider .slide-title { font-size: clamp(26px, 3.4vw, 48px); }
.slide.is-divider .slide-kicker::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 12px auto 0;
  border-radius: 2px;
  background: var(--brand-color);
}

/* --- layout: figure --- */
.slide.is-figure { align-content: start; }
.slide.is-figure .slide-body { max-height: 18vh; }
.slide.is-figure .slide-figure-img { max-height: 48vh; }
.slide.is-figure .fig-placeholder { min-height: clamp(160px, 28vh, 320px); }

/* --- layout: figsplit --- */
.slide.is-figsplit {
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center;
  align-items: safe center;
}
.slide.is-figsplit .slide-body { max-height: 56vh; }

/* --- Abbildung --- */
.slide-figure {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slide-figure-img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: var(--radius-card);
  background: var(--surface-1);
  box-shadow: 0 0 0 1px var(--border-ghost);
}

.slide.is-figsplit .slide-figure-img { max-height: 56vh; }

/* Tonale Platzhalterflaeche, wenn das Artefakt benannt, die Datei aber noch
   nicht vorhanden ist - besser als ein kaputtes Bild im Vortrag. */
.fig-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: clamp(180px, 34vh, 380px);
  padding: 24px;
  border-radius: var(--radius-card);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border-ghost);
}

.fig-placeholder span {
  max-width: 44ch;
  text-align: center;
  font-family: var(--font-headline);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-caption);
}

.slide-figure .fignote { margin-top: 10px; text-align: center; max-width: 88ch; }

/* ============================================================
   Folien-HTML (Slide.html) - Klassen des Keynote-Decks in Neon Pulse
   Alle Farben leiten aus den Tokens ab, kleinste Schriftgroesse 11px.
   ============================================================ */

.slide-html {
  --fx-ok: var(--brand-color);
  --fx-warn: var(--brand-secondary);
  --fx-part: color-mix(in srgb, var(--brand-color) 55%, var(--brand-secondary));
  --fx-open: var(--text-caption);
  --fx-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  color: var(--text-muted);
  text-align: left;
}

/* --- Grundtypografie --- */
.slide-html > :first-child { margin-top: 0; }
.slide-html p { margin: 0 0 9px; font-size: 13.5px; line-height: 1.5; color: var(--text-muted); }
.slide-html p:last-child { margin-bottom: 0; }
.slide-html strong { color: var(--text-primary); font-weight: 700; }
.slide-html em { font-style: normal; color: var(--text-caption); }

.slide-html code {
  font-family: var(--fx-mono);
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 6px;
  background: var(--surface-3);
  color: var(--brand-color);
}

.slide-html h2, .slide-html h3, .slide-html h4 {
  margin: 0 0 8px;
  font-family: var(--font-headline);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}
.slide-html h2 { font-size: 19px; }
.slide-html h3 { font-size: 16px; }
.slide-html h3.mini { font-size: 15px; }
.slide-html h4 { font-size: 14px; }

.slide-html .sub {
  margin: 0 0 clamp(14px, 2.2vh, 28px);
  font-size: clamp(15px, 1.35vw, 22px);
  line-height: 1.4;
  color: var(--text-muted);
}
.slide-html .lead { margin: 0 0 14px; font-size: 15px; line-height: 1.5; color: var(--text-primary); }
.slide-html .note { margin-top: 9px; font-size: 11.5px; line-height: 1.45; color: var(--text-caption); }
.slide-html .note.wide { margin-top: 14px; }
.slide-html .note.warnline { color: var(--brand-secondary); }
.slide-html .note strong { color: var(--text-muted); }
.slide-html .close { font-family: var(--font-headline); font-size: 15px; line-height: 1.5; color: var(--text-primary); }

/* --- Titelfolie: Metablock und Quellenzeile --- */
.slide-html .title-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 clamp(16px, 2.6vh, 30px);
  text-align: left;
}
.slide-html .title-meta div { border-left: 2px solid var(--brand-color); padding-left: 14px; }
.slide-html .title-meta span {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-caption);
}
.slide-html .title-meta strong {
  display: block;
  font-family: var(--font-headline);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}
.slide-html .title-ref { font-size: 13px; line-height: 1.45; color: var(--text-caption); }

/* --- Raster --- */
.slide-html .grid2,
.slide-html .two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 1.8vw, 26px); align-items: start; }
.slide-html .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.slide-html .grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.slide-html .cardstack { display: flex; flex-direction: column; gap: 14px; }
.slide-html .wide { max-width: none; }

/* --- Karten --- */
.slide-html .card,
.slide-html .case,
.slide-html .minicase,
.slide-html .flowbox,
.slide-html .formula,
.slide-html .kpibox,
.slide-html .soll {
  background: var(--surface-1);
  border-radius: var(--radius-card);
  box-shadow: 0 0 0 1px var(--border-ghost);
}

.slide-html .card { padding: 16px 18px; }
.slide-html .card h3 { margin: 0 0 8px; font-size: 16px; }
.slide-html .card p { font-size: 13px; }
.slide-html .card ul { margin: 0; padding: 0; list-style: none; }
.slide-html .card li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 15px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-muted);
}
.slide-html .card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-color);
}
.slide-html .card .hl { color: var(--text-primary); font-weight: 700; }
.slide-html .card .fix { margin-top: 4px; font-family: var(--font-headline); font-size: 11.5px; color: var(--brand-color); }

.slide-html .card.warn,
.slide-html .card.bad,
.slide-html .card.accent-b {
  background: color-mix(in srgb, var(--brand-secondary) 6%, var(--surface-1));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-secondary) 38%, transparent);
}
.slide-html .card.warn li::before,
.slide-html .card.bad li::before { background: var(--brand-secondary); }
.slide-html .card.warn code { color: var(--brand-secondary); }

.slide-html .card.good,
.slide-html .card.hl-card,
.slide-html .card.accent-a {
  background: color-mix(in srgb, var(--brand-color) 6%, var(--surface-1));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-color) 34%, transparent);
}
.slide-html .card.neutral { background: var(--surface-1); box-shadow: 0 0 0 1px var(--border-ghost); }

.slide-html .agenda .card h3 { font-size: 15px; }
.slide-html .agenda .card p { font-size: 12px; }
.slide-html .markt .card h3 { font-size: 14px; line-height: 1.3; }
.slide-html .markt .card p { font-size: 11.5px; }
.slide-html .reviews .card h3,
.slide-html .risk .card h3 { font-size: 14.5px; }
.slide-html .reviews .card p,
.slide-html .risk .card p { font-size: 12px; }
.slide-html .break .card .lead { font-size: 14px; color: var(--text-primary); }
.slide-html .big-warn h3 { font-size: 18px; color: var(--brand-secondary); }
.slide-html .big-warn li { margin-bottom: 9px; font-size: 13px; }

/* --- Marken, Zahlen --- */
.slide-html .chip {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: var(--radius-field);
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-color);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-color) 34%, transparent);
}
.slide-html .chip.pink {
  color: var(--brand-secondary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-secondary) 38%, transparent);
}
.slide-html .rnd {
  margin-bottom: 6px;
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-caption);
}

.slide-html .num {
  margin-bottom: 8px;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: var(--brand-color);
}
.slide-html .bignum {
  margin-bottom: 6px;
  font-family: var(--font-headline);
  font-size: clamp(32px, 3.4vw, 52px);
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}
.slide-html .card.bad .bignum,
.slide-html .card.warn .bignum { color: var(--brand-secondary); }
.slide-html .card.good .bignum { color: var(--brand-color); }
.slide-html .card.neutral .bignum { color: var(--text-caption); }
.slide-html .delta { font-family: var(--font-headline); font-size: 17px; font-weight: 700; color: var(--brand-color); }

/* --- Listen --- */
.slide-html ul, .slide-html ol { margin: 0 0 10px; padding-left: 1.2em; }
.slide-html li { margin-bottom: 6px; font-size: 13px; line-height: 1.5; }
.slide-html ul.ticks { padding-left: 0; list-style: none; }
.slide-html ul.ticks li { position: relative; padding-left: 19px; }
.slide-html ul.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--brand-color) 70%, transparent);
}
.slide-html ol.blocks { padding-left: 0; list-style: none; }
.slide-html ol.blocks li { position: relative; padding-left: 30px; }
.slide-html ol.blocks strong {
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-headline);
  color: var(--brand-color);
}
.slide-html ul.crit { margin-bottom: 6px; padding-left: 0; list-style: none; }
.slide-html ul.crit li { font-size: 11px; line-height: 1.4; color: var(--text-muted); }

/* --- Tabellen: nur Ghost-Borders, keine harten Rahmen --- */
.slide-html table.tbl { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: 12px; }
.slide-html table.tbl:last-child { margin-bottom: 0; }
.slide-html table.tbl th {
  padding: 0 9px 7px;
  border-bottom: 1px solid var(--border-ghost);
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  color: var(--text-caption);
}
.slide-html table.tbl td {
  padding: 8px 9px;
  border-bottom: 1px solid var(--border-ghost);
  color: var(--text-muted);
  vertical-align: top;
}
.slide-html table.tbl tr:last-child td { border-bottom: none; }
.slide-html table.tbl strong { color: var(--text-primary); font-weight: 600; }
.slide-html table.tbl em { font-style: normal; font-size: 0.92em; color: var(--text-caption); }
.slide-html table.tbl td.c, .slide-html table.tbl th.c { text-align: center; }
.slide-html table.tbl.small { font-size: 11.5px; }
.slide-html table.tbl.small td, .slide-html table.tbl.small th { padding: 6px 8px; }
.slide-html table.tbl.opt td, .slide-html table.tbl.road td { font-size: 11.5px; }
.slide-html table.tbl.kpi td { font-size: 12px; }
.slide-html table.tbl.kpi.small td { padding: 7px 8px; font-size: 11.5px; }
.slide-html table.tbl.matrix td { font-size: 13px; }
.slide-html table.tbl.matrix th.c { font-size: 11px; }
.slide-html table.tbl.opt tr.no td { background: color-mix(in srgb, var(--brand-secondary) 6%, transparent); }
.slide-html table.tbl.opt tr.yes td { background: color-mix(in srgb, var(--brand-color) 6%, transparent); }
.slide-html table.tbl tr.row-hl td { background: color-mix(in srgb, var(--brand-secondary) 8%, transparent); }
.slide-html table.tbl tr.sum td { border-top: 1px solid var(--border-ghost); padding-top: 9px; font-size: 15px; }
.slide-html table.tbl th.ok, .slide-html table.tbl td.ok { color: var(--fx-ok); }
.slide-html table.tbl th.part, .slide-html table.tbl td.part { color: var(--fx-part); }
.slide-html table.tbl th.open, .slide-html table.tbl td.open { color: var(--fx-open); }
.slide-html table.tbl td.up { color: var(--brand-color); }
.slide-html table.tbl td.ok,
.slide-html table.tbl td.part,
.slide-html table.tbl td.open,
.slide-html table.tbl td.up { font-family: var(--font-headline); font-weight: 700; }

/* --- Bewertungsmarke --- */
.slide-html .verdict {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-field);
  font-family: var(--font-headline);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.slide-html .verdict.yes {
  color: var(--fx-ok);
  background: color-mix(in srgb, var(--fx-ok) 10%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fx-ok) 42%, transparent);
}
.slide-html .verdict.part {
  color: var(--fx-part);
  background: color-mix(in srgb, var(--fx-part) 10%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fx-part) 45%, transparent);
}
.slide-html .verdict.open,
.slide-html .verdict.no {
  color: var(--fx-open);
  background: color-mix(in srgb, var(--fx-open) 9%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--fx-open) 45%, transparent);
}

/* --- Zitate: Markenlinie links --- */
.slide-html .quote {
  padding: 16px 20px;
  background: var(--surface-1);
  border-left: 3px solid var(--brand-color);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  box-shadow: 0 0 0 1px var(--border-ghost);
}
.slide-html .quote p { margin-bottom: 12px; font-size: 14.5px; line-height: 1.52; color: var(--text-primary); }
.slide-html .quote strong {
  display: block;
  font-family: var(--font-headline);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand-color);
}
.slide-html .quote span { display: block; margin-top: 2px; font-size: 11px; color: var(--text-caption); }
.slide-html .quote-s {
  padding-left: 14px;
  border-left: 2px solid var(--brand-color);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}
.slide-html .quote-s span { display: block; margin-top: 5px; font-size: 11px; color: var(--text-caption); }
.slide-html .quote-b {
  padding: 14px 18px;
  background: var(--surface-1);
  border-left: 3px solid var(--brand-secondary);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}

/* --- Abbildungen im Folien-HTML --- */
.slide-html .figwrap { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 0; }
.slide-html .figwrap img { max-width: 100%; max-height: 62vh; object-fit: contain; border-radius: var(--radius-card); }
.slide-html .fignote,
.slide-figure .fignote { margin-top: 10px; font-size: 12px; line-height: 1.45; color: var(--text-muted); }
.slide-html .fignote strong,
.slide-figure .fignote strong { color: var(--text-primary); }
.slide-html figure.shot { margin: 0; display: flex; flex-direction: column; }
.slide-html figure.shot img {
  display: block;
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--border-ghost);
}
.slide-html figure.shot figcaption { margin-top: 8px; font-size: 11px; line-height: 1.4; color: var(--text-caption); }
.slide-html figure.shot strong { font-family: var(--font-headline); color: var(--brand-color); }
.slide-html .imgbox { display: flex; align-items: center; justify-content: center; max-height: 40vh; }
.slide-html .imgbox img,
.slide-html .shots img { width: auto; max-width: 100%; max-height: 40vh; object-fit: contain; }

/* --- Weitere Bausteine des Decks --- */
.slide-html .phasen { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.slide-html .phasen span {
  display: block;
  padding: 8px;
  border-radius: var(--radius-field);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border-ghost);
  font-family: var(--font-headline);
  font-size: 11.5px;
  text-align: center;
  color: var(--text-muted);
}
.slide-html .vnhead {
  margin-bottom: 6px;
  font-family: var(--font-headline);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-secondary);
}
.slide-html .vnhead.ok { color: var(--brand-color); }
.slide-html .vn code { font-size: 11px; letter-spacing: 0; text-transform: none; }

.slide-html .flowbox { padding: 16px; }
.slide-html .flowbox .url {
  padding: 10px 12px;
  border-radius: var(--radius-field);
  background: var(--surface-2);
  font-family: var(--fx-mono);
  font-size: 13.5px;
  color: var(--text-muted);
  word-break: break-all;
}
.slide-html .flowbox .url.own {
  color: var(--brand-color);
  background: color-mix(in srgb, var(--brand-color) 9%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-color) 34%, transparent);
}
.slide-html .flowbox .url.foreign {
  color: var(--brand-secondary);
  background: color-mix(in srgb, var(--brand-secondary) 9%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-secondary) 38%, transparent);
}
.slide-html .arrow { padding: 10px 0; font-size: 12px; line-height: 1.4; text-align: center; color: var(--text-muted); }
.slide-html .flowbox .arrow::before {
  content: "\25BC";
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--text-caption);
}
.slide-html .arrow.small { padding-bottom: 0; font-size: 11px; }
.slide-html .flowbox em { font-style: normal; color: var(--brand-secondary); }

.slide-html .case { padding: 4px 18px; }
.slide-html .caseline { padding: 12px 0; border-bottom: 1px solid var(--border-ghost); font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.slide-html .caseline:last-child { border-bottom: none; }
.slide-html .caseline span {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-headline);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-caption);
}
.slide-html .caseline strong { color: var(--text-primary); }

.slide-html .cohort { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.slide-html .cohort div {
  padding: 10px;
  border-radius: var(--radius-field);
  background: var(--surface-1);
  box-shadow: 0 0 0 1px var(--border-ghost);
}
.slide-html .cohort strong {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-headline);
  font-size: 16px;
  color: var(--brand-secondary);
}
.slide-html .cohort span { display: block; font-size: 11px; line-height: 1.35; color: var(--text-caption); }

.slide-html .minicase { padding: 14px 16px; }
.slide-html .minicase strong { color: var(--text-primary); }
.slide-html .cases { margin-top: 16px; }

.slide-html .decision {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-field);
  background: color-mix(in srgb, var(--brand-color) 6%, transparent);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
}
.slide-html .decision strong { color: var(--brand-color); }
.slide-html .decision em { font-style: normal; font-weight: 600; color: var(--text-primary); }

.slide-html .formula { padding: 16px 18px; margin-bottom: 12px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-color) 26%, transparent); }
.slide-html .frow { margin-bottom: 8px; }
.slide-html .frow code { padding: 0; background: none; font-size: 16px; font-weight: 600; color: var(--brand-color); }
.slide-html .fnote {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border-ghost);
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--text-caption);
}
.slide-html .fnote strong { color: var(--text-muted); }

.slide-html .soll { padding: 14px 18px; font-size: 15px; line-height: 1.55; color: var(--text-primary); }
.slide-html .soll strong { color: var(--brand-color); }

.slide-html pre.term {
  padding: 14px 16px;
  border-radius: var(--radius-card);
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--border-ghost);
  font-family: var(--fx-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
  overflow-x: auto;
}

.slide-html .kpibox { padding: 16px 18px; box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-color) 26%, transparent); }
.slide-html .kpirow { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border-ghost); }
.slide-html .kpirow:last-of-type { border-bottom: none; }
.slide-html .kpirow span { flex: none; width: 150px; font-size: 11.5px; color: var(--text-caption); }
.slide-html .kpirow strong {
  font-family: var(--font-headline);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-muted);
}
.slide-html .kpirow.big strong { font-size: 40px; color: var(--brand-color); }
.slide-html .kpirow em { font-style: normal; font-size: 11.5px; color: var(--text-caption); }

.slide-html .bilanz { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; text-align: center; }
.slide-html .bilanz strong {
  display: block;
  font-family: var(--font-headline);
  font-size: 32px;
  line-height: 1;
  color: var(--text-primary);
}
.slide-html .bilanz div:nth-child(1) strong { color: var(--fx-ok); }
.slide-html .bilanz div:nth-child(2) strong { color: var(--fx-part); }
.slide-html .bilanz div:nth-child(3) strong { color: var(--fx-open); }
.slide-html .bilanz span { display: block; margin-top: 4px; font-size: 11px; color: var(--text-caption); }

/* Schmale Fenster: Raster brechen auf eine Spalte, Figsplit stapelt. */
@media (max-width: 960px) {
  .slide-html .grid2,
  .slide-html .two-col,
  .slide-html .grid3,
  .slide-html .grid4,
  .slide-html .title-meta,
  .slide-html .phasen,
  .slide-html .cohort,
  .slide-html .bilanz { grid-template-columns: minmax(0, 1fr); }
  .slide.is-figsplit { grid-template-columns: minmax(0, 1fr); }
  .slide-html .kpirow span { width: 110px; }
}
