/* DIE ERGEBNIS-KARTE UND DER KI-KNOPF UNTER DEN BERICHTEN (itm-746).

   DIE DIAGRAMME SELBST STEHEN IN scaliento-rahmen.css — dieselben wie auf der Berichte-Seite. Hier nur, was die Karte darüber
   hinaus braucht: der Satz, der Hinweis, die Kacheln in beliebiger Zahl, ein dichter Verlauf, das Feld mit dem KI-Knopf — und
   auf der Bühne alles groß (`.ek-buehne`), gemessen an der Szene (cqw/cqh), wie die übrigen Diagramme dort.

   Orange gehört nur der KI (scaliento-rahmen.css): Darum trägt das Feld mit dem KI-Knopf die orange Kante, die Karte nicht. */

/* ---------- Die Karte ---------- */
.ek { display: flex; flex-direction: column; }
.ek .ek-flaeche { min-height: 0; }
.ek-satz { margin-top: 18px !important; font: 400 16px/1.45 'Open Sans', Arial, sans-serif; color: var(--ink); }
.ek-hinweis { margin-top: 6px !important; font-size: 13px; color: var(--ink-3); }

.ek-kacheln { grid-template-columns: repeat(var(--ek-n, 3), minmax(0, 1fr)); }
.ek-kacheln .sr-kachel { min-height: 120px; }
.ek .sr-kachel .n { padding-right: 0; }

.ek-saeulen.dicht { gap: 3px; }
.ek-saeulen .wert.still, .ek-fuss .still { visibility: hidden; }
.ek-fuss.dicht { gap: 3px; }
.ek-fuss.dicht span { overflow: visible; white-space: nowrap; }
.ek-saeulen .sr-saeule .m.spitze { background: var(--navy-2); box-shadow: 0 -3px 0 var(--lia) inset; }

.ek-torte .ek-ring { width: 196px; height: 196px; flex: none; }
.ek-tab { margin-bottom: 0 !important; }
.ek-listenwert { font: 300 22px/1 'Open Sans', Arial, sans-serif; color: var(--navy); }

/* ---------- Das Feld mit dem KI-Knopf (Berichte-Seite) ---------- */
.ek-frage { margin-top: 16px; padding: 18px 22px 20px; background: #fff; border-left: 3px solid var(--lia); border-radius: 2px; box-shadow: var(--shadow); }
.ek-frage-kopf { display: flex; align-items: center; gap: 10px; font: 300 22px/1.2 'Open Sans', Arial, sans-serif; color: var(--navy); }
.ek-frage-kopf .sr-lia { font-size: 12px; }
.ek-frage .unter { margin-top: 6px; font-size: 13px; color: var(--ink-3); }
.ek-frage form { display: flex; gap: 10px; margin-top: 14px; }
.sr .ek-frage input[type="text"] { flex: 1; min-width: 0; max-width: none; height: 44px; margin: 0; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 3px; background: #fff; box-shadow: none; font: 400 15px/1 'Open Sans', Arial, sans-serif; color: var(--ink); }
.sr .ek-frage input[type="text"]:focus { border-color: var(--navy); outline: 2px solid rgba(41, 45, 91, .18); outline-offset: 0; }
.ek-frage .sr-knopf.ki { background: var(--lia); border-color: var(--lia); color: #fff; }
.ek-frage .sr-knopf.ki:hover { background: #DE7A10; }
.ek-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ek-chip { height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 15px; background: #fff; color: var(--ink-2); font: 400 13px/1 'Open Sans', Arial, sans-serif; cursor: pointer; }
.ek-chip:hover { border-color: var(--navy); color: var(--navy); }
.ek-antwort:not(:empty) { margin-top: 16px; }
.ek-antwort .sr-leer b { color: var(--navy); }
.ek-laeuft { display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
.ek-laeuft::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--lia-r); border-top-color: var(--lia); animation: ek-dreh .8s linear infinite; }
@keyframes ek-dreh { to { transform: rotate(360deg); } }

@container sr (max-width: 688px) {
    .ek-kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ek-frage form { flex-direction: column; }
}

/* ---------- Auf der Bühne: groß, an der Szene gemessen ---------- */
.sr.ek-buehne {
    min-height: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    background: transparent;
    display: flex;
    align-items: stretch;
}

.ek-buehne .ek {
    flex: 1;
    min-width: 0;
    padding: clamp(10px, 3cqh, 28px) clamp(12px, 3cqw, 36px);
    box-shadow: 0 1px 2px rgba(31, 34, 64, .06), 0 10px 28px -18px rgba(31, 34, 64, .35);
    border-radius: 6px;
}

.ek-buehne .sr-karte-kopf { font-size: clamp(18px, 6cqh, 40px); }
.ek-buehne .unter { margin-top: 2px; font-size: clamp(12px, 3.6cqh, 22px); color: var(--ink-3); }
.ek-buehne .ek-flaeche { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.ek-buehne .ek-hinweis { font-size: clamp(11px, 3cqh, 18px); }

/* AUF DER BÜHNE ALLE KACHELN IN EINER ZEILE — die Szene ist schmaler als die Seite, und die Regel für schmale Seiten bräche sonst um. */
.sr.ek-buehne .ek-kacheln { margin-top: 0; gap: clamp(8px, 2.5cqw, 24px); grid-template-columns: repeat(var(--ek-n, 3), minmax(0, 1fr)); }
.ek-buehne .sr-kachel { min-height: clamp(90px, 40cqh, 320px); padding: clamp(12px, 4cqh, 32px) clamp(14px, 3cqw, 32px); }
.ek-buehne .sr-kachel .n { font-size: clamp(34px, 18cqh, 140px); }
.ek-buehne .sr-kachel .l { font-size: clamp(14px, 4.6cqh, 30px); }
.ek-buehne .sr-kachel .l small { font-size: clamp(12px, 3.4cqh, 20px); }

.ek-buehne .ek-balken { margin-top: 0; }
.ek-buehne .ek-balken li { height: clamp(26px, calc(62cqh / var(--ek-zeilen, 8)), 64px); grid-template-columns: minmax(110px, 28%) minmax(0, 1fr) clamp(44px, 8cqw, 90px); gap: clamp(8px, 2cqw, 20px); }
.ek-buehne .ek-balken .bn { font-size: clamp(13px, 4cqh, 26px); }
.ek-buehne .ek-balken .bs { height: 55%; }
.ek-buehne .ek-balken b { font-size: clamp(18px, 6cqh, 40px); }

.ek-buehne .ek-saeulen { height: clamp(120px, 56cqh, 520px); margin-top: 0; }
.ek-buehne .sr-saeule .wert { font-size: clamp(13px, 4.4cqh, 30px); }
.ek-buehne .ek-fuss span { font-size: clamp(11px, 3.2cqh, 20px); }

.ek-buehne .ek-torte { margin-top: 0; gap: clamp(16px, 4cqw, 48px); }
.ek-buehne .ek-torte .ek-ring { width: clamp(140px, 62cqh, 460px); height: clamp(140px, 62cqh, 460px); }
.ek-buehne .ek-torte .sr-legende li { height: clamp(30px, 9cqh, 64px); font-size: clamp(14px, 4.4cqh, 28px); }
.ek-buehne .ek-torte .sr-legende li i { width: clamp(12px, 3cqh, 20px); height: clamp(12px, 3cqh, 20px); }
.ek-buehne .ek-torte .sr-legende li b { font-size: clamp(18px, 6cqh, 40px); }

.ek-buehne .ek-tab { margin: 0 !important; max-height: 70cqh; overflow: auto; }
.ek-buehne .sr-tab { font-size: clamp(13px, 4cqh, 24px); }
.ek-buehne .sr-tab th, .ek-buehne .sr-tab td { height: clamp(32px, 8cqh, 56px); }

.ek-buehne .ek-liste { max-height: 70cqh; overflow: hidden; }
.ek-buehne .ek-liste .sr-zeile { min-height: clamp(40px, 10cqh, 72px); font-size: clamp(14px, 4.4cqh, 28px); }
.ek-buehne .ek-liste .sr-zeile .sb small { font-size: clamp(12px, 3.4cqh, 20px); }

/* DIE BEWEGUNG DER BÜHNE: Balken wachsen, Säulen steigen, Zeilen kommen nacheinander. `prefers-reduced-motion` schaltet sie ab. */
.ek-buehne .ek-balken .bs i { transform-origin: left center; animation: ek-wachsen .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
.ek-buehne .ek-saeulen .sr-saeule i { transform-origin: bottom center; animation: ek-steigen .9s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 30ms); }
.ek-buehne .ek-torte .sr-legende li, .ek-buehne .ek-liste .sr-zeile { animation: ek-kommen .5s ease both; animation-delay: calc(var(--i, 0) * 80ms); }

@keyframes ek-wachsen { from { transform: scaleX(0); } }
@keyframes ek-steigen { from { transform: scaleY(0); } }
@keyframes ek-kommen { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
    .ek-buehne .ek-balken .bs i, .ek-buehne .ek-saeulen .sr-saeule i, .ek-buehne .ek-torte .sr-legende li, .ek-buehne .ek-liste .sr-zeile, .ek-laeuft::before { animation: none; }
}

@media print {
    .ek-frage { display: none; }
    .sr.druck-einzeln .ek-frage:has(.ek.druck) { display: block; border: 0; box-shadow: none; padding: 0; }
    .sr.druck-einzeln .ek-frage:has(.ek.druck) > :not(.ek-antwort) { display: none; }
    .sr.druck-einzeln .ek.druck .sr-kacheln { display: grid; }
    .ek .sr-symbole { display: none; }
}

/* ---------- Auf der Bühne im Stil des AI Hub (itm-746, Martin 08.10.2026) ----------
   Die Karte trägt dort `.lb` und die Klassen des Reiters „Berichte“ (lia-berichte.css): Farben, Glühen, Hochzählen und das
   Abschalten der Bewegung bei `prefers-reduced-motion` kommen von dort. Hier nur, was die Bühne größer braucht — gemessen an
   der Szene (cqw/cqh) —, und was eine Karte über den Reiter hinaus hat. */
.lb.ek-lb { width: 100%; height: 100%; flex: none; }
.ek-lb .ek-lb-flaeche { flex: 1; min-height: 0; padding: clamp(12px, 4cqh, 34px) clamp(14px, 3.4cqw, 40px); gap: clamp(6px, 2cqh, 16px); }
.ek-lb .lb-flaeche-titel { font-size: clamp(11px, 3.2cqh, 18px); line-height: 1.3; }
.ek-lb .ek-lb-titel { margin: 0; font-size: clamp(18px, 6cqh, 40px); font-weight: 300; color: var(--lb-navy); }
.ek-lb .ek-lb-inhalt { flex: 1; min-height: 0; justify-content: center; }
.ek-lb .ek-lb-satz { margin: 0; font-size: clamp(14px, 4.2cqh, 26px); color: var(--lb-text); }
.ek-lb .ek-lb-hinweis { margin: 0; font-size: clamp(11px, 3cqh, 18px); }

/* EINE ZAHL: die Riesenzahl der gesparten Zeit, darunter die Kacheln der Taten. */
.ek-lb .lb-riesig { font-size: clamp(56px, 30cqh, 220px); }
.ek-lb .lb-held-unter { margin: 0; font-size: clamp(14px, 4.6cqh, 28px); color: var(--lb-text-2); }
.ek-lb .ek-lb-kacheln { grid-template-columns: repeat(var(--ek-n, 2), minmax(0, 1fr)); gap: clamp(8px, 2cqw, 20px); }
.ek-lb .lb-tat { padding: clamp(10px, 3cqh, 22px) clamp(12px, 2.4cqw, 24px); }
.ek-lb .lb-tat-zahl { font-size: clamp(28px, 13cqh, 96px); }
.ek-lb .lb-tat-name { font-size: clamp(13px, 4cqh, 24px); line-height: 1.25; }

/* DER VERLAUF: höher als im Reiter, Zahlen darüber, die Achse einzeilig. */
.ek-lb .ek-lb-verlauf { padding-top: clamp(16px, 6cqh, 40px); padding-bottom: clamp(16px, 5.4cqh, 34px); }
.ek-lb .ek-lb-verlauf .lb-verlauf { height: clamp(90px, 46cqh, 420px); }
.ek-lb .ek-lb-verlauf .lb-verlauf-achse { height: auto; }
.ek-lb .ek-lb-verlauf .lb-verlauf-achse span { font-size: clamp(11px, 3.4cqh, 20px); }
.ek-lb .ek-lb-werte { top: 0; bottom: auto; }
.ek-lb .ek-lb-werte span { font-size: clamp(12px, 4cqh, 26px); font-weight: 300; color: var(--lb-navy); }

/* BALKEN, TABELLE UND DIE TEILE DES RINGS: die Zeilen der Kosten, so hoch, wie die Szene es hergibt. */
.ek-lb .ek-lb-balken { gap: clamp(4px, 1.4cqh, 12px); }
.ek-lb .ek-lb-balken li { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) minmax(48px, auto); min-height: clamp(22px, calc(56cqh / var(--ek-zeilen, 6)), 56px); gap: clamp(8px, 1.6cqw, 18px); font-size: clamp(13px, 4.2cqh, 26px); animation: lb-auftauchen .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
.ek-lb .ek-lb-balken .lb-kosten-balken { height: clamp(8px, 3.2cqh, 22px); border-radius: 999px; }
.ek-lb .ek-lb-balken .lb-kosten-balken::before { background: var(--farbe, var(--lb-navy)); border-radius: 999px; }
.ek-lb .ek-lb-balken li:first-child .lb-kosten-balken::before { box-shadow: 0 0 10px rgba(41, 45, 91, .35); }
.ek-lb .ek-lb-balken .lb-kosten-wert { font-size: clamp(15px, 5cqh, 32px); font-weight: 300; color: var(--lb-navy); }
.ek-lb .ek-lb-tabelle li { border-bottom: 1px solid #ecedf1; }
.ek-lb .ek-lb-kopfzeile { display: grid; gap: clamp(8px, 1.6cqw, 18px); font-size: clamp(11px, 3cqh, 18px); text-transform: uppercase; letter-spacing: .06em; color: var(--lb-leise); }
.ek-lb .ek-lb-kopfzeile span:not(:first-child) { text-align: right; }

.ek-lb .ek-lb-ring { flex-direction: row; align-items: center; gap: clamp(14px, 4cqw, 48px); }
.ek-lb .ek-lb-ring-bild { position: relative; flex: none; width: clamp(120px, 58cqh, 420px); aspect-ratio: 1; }
.ek-lb .ek-lb-ring-bild .lb-ring { width: 100%; height: 100%; }
.ek-lb .ek-lb-ring-bild .lb-ring-spur, .ek-lb .ek-lb-ring-bild .lb-ring-bogen { stroke-width: 7; }
.ek-lb .ek-lb-ring-mitte { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ek-lb .ek-lb-ring-mitte .lb-kennzahl-wert { font-size: clamp(26px, 13cqh, 96px); }
.ek-lb .ek-lb-ring-mitte .lb-kennzahl-name { font-size: clamp(12px, 3.6cqh, 22px); }
.ek-lb .ek-lb-ring .ek-lb-balken { flex: 1; min-width: 0; }
.ek-lb .ek-lb-ring .ek-lb-balken li { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(36px, auto); }

/* DIE LISTE: der Ticker des Live-Pulses — Nummer, Eintrag, rechts der Zusatz als Marke. */
.ek-lb .ek-lb-liste { border-top: 0; gap: clamp(4px, 1.6cqh, 14px); }
.ek-lb .ek-lb-liste li { grid-template-columns: clamp(20px, 4cqw, 40px) minmax(0, 1fr) auto; font-size: clamp(14px, 4.4cqh, 28px); }
.ek-lb .ek-lb-liste .lb-ticker-wer { font-size: clamp(11px, 3.2cqh, 18px); line-height: 1.6; }
.ek-lb .ek-lb-liste .lb-ticker-text { color: var(--lb-text); font-weight: 600; }

/* ---------- Kennzahlen, die keine KI-Tätigkeit sind: Navy statt Orange (Martin, 08.10.2026) ----------
   Im AI Hub heißt Orange „die KI hat das getan“. Die Bausteine des Reiters „Berichte“ tragen es fest (Säulen des Verlaufs,
   Glühen der großen Zahl, Kacheln) — für eine Karte ohne `ki` (`.ek-kennzahl`) stehen sie hier in Navy. Eine Karte mit `ki`
   (`.ek-ki`, etwa „Von der KI beantwortet“) bleibt orange. */
.ek-lb.ek-kennzahl .lb-verlauf-balken { fill: var(--lb-navy); }
.ek-lb.ek-kennzahl .lb-verlauf-balken.null { fill: #c9cbd8; }
.ek-lb.ek-kennzahl .lb-verlauf-balken.jetzt:not(.null) { filter: drop-shadow(0 0 3px rgba(41, 45, 91, .55)); }
.ek-lb.ek-kennzahl .lb-verlauf-balken.jetzt.null { fill: var(--lb-navy); }
.ek-lb.ek-kennzahl .lb-held {
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(41, 45, 91, .12) 0%, rgba(41, 45, 91, 0) 55%),
        radial-gradient(90% 80% at 0% 100%, rgba(41, 45, 91, .08) 0%, rgba(41, 45, 91, 0) 60%),
        var(--lb-flaeche);
}
.ek-lb.ek-kennzahl .lb-held::before { background: conic-gradient(from 0deg, rgba(41, 45, 91, 0), rgba(41, 45, 91, .10), rgba(124, 131, 200, .10), rgba(41, 45, 91, 0)); }
.ek-lb.ek-kennzahl .lb-tat { background: linear-gradient(180deg, #eef0f7 0%, #fff 100%); box-shadow: inset 0 0 0 1px #dcdfeb; }
.ek-lb.ek-kennzahl .lb-tat::before { background: linear-gradient(90deg, var(--lb-navy), rgba(41, 45, 91, 0)); }
.ek-lb.ek-kennzahl .lb-tat.null { background: var(--lb-flaeche-2); box-shadow: inset 0 0 0 1px #e6e7ee; }
.ek-lb.ek-kennzahl .lb-neu { animation: none; }
