/* zahlen.css: Zahlen der Booster-Plattform (Phase 3, "Zahlen als Demo")
 *
 * Dashboard-Block (zahlen-block.js), Diagramme (zahlen-svg.js) und Quartalsbericht mit
 * Druckfassung (quartalsbericht.html, eigener Abschnitt unten). Farben nur ueber die
 * Theme-Variablen der Seite (theme.js), hell und dunkel. Diagramme sind einfarbig in
 * Schriftfarbe (currentColor), kein Rot im Block: Rot ist Warnung (Entscheidung 6 und 10).
 * Animiert werden nur transform und opacity.
 */

/* ---------------------------------------------------------------- Grundlagen */
#zahlen-block[hidden] { display: none !important; }

/* Gemeinsame Tokens fuer den Block (.vlz-block) und den Quartalsbericht (.qb) */
.vlz-block, .qb {
  /* Flaechenfarbe fuer die Ringe um Endpunkt und Soll-Strich (zahlen-svg.js): die Kartenfarbe */
  --vlz-flaeche: var(--bg-s1, #161616);
  --vlz-linie: var(--line-a080, rgba(255, 255, 255, 0.08));
  --vlz-leise: var(--fg-a600, rgba(255, 255, 255, 0.6));
  --vlz-mittel: var(--fg-a700, rgba(255, 255, 255, 0.7));
  --vlz-ok: var(--fg-1, #F4F4F4);   /* Status ohne Farbe (CI v1.1) */
  --vlz-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --vlz-spalte: 28px;
}
[data-theme="light"] .vlz-block, [data-theme="light"] .qb { --vlz-ok: var(--fg-1, #0A0708); }
.vlz-block {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 24px;
  color: var(--fg-1, #fff);
}
@media (min-width: 768px) { .vlz-block { padding: 32px; } }

.vlz-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- Kopf */
.vlz-kopf { margin-bottom: 28px; align-items: flex-end; }
.vlz-kopf-text { min-width: 0; }
.vlz-titelzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.vlz-titelzeile h2 { margin: 0; }
.vlz-block .vlz-unterzeile { font-size: 13px; line-height: 1.4; color: var(--vlz-leise); margin-top: 6px; }

.vlz-schild {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 13px; line-height: 1;
  letter-spacing: 0; text-transform: none; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px;
  color: var(--fg-a850, rgba(255, 255, 255, 0.85));
  border: 1px solid var(--line-a180, rgba(255, 255, 255, 0.18));
}

/* Am Handy steht das Schild neben dem Titel, nicht in einer eigenen Zeile */
@media (max-width: 479.98px) {
  .vlz-titelzeile { gap: 6px 10px; }
  .vlz-schild { padding: 5px 10px; }
}

/* Eigener, neutraler Link in Schriftfarbe (Ruling R2), nicht .vl-link */
.vlz-bericht {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px;
  font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 15px; line-height: 1;
  letter-spacing: 0; text-transform: none; white-space: nowrap;
  color: var(--fg-1, #fff); text-decoration: none; border-radius: 6px;
  transition: opacity 0.14s ease, transform 0.14s var(--vlz-ease);
}
.vlz-bericht .material-symbols-outlined { font-size: 16px; transition: transform 0.28s var(--vlz-ease); }
.vlz-bericht:hover { opacity: 0.72; }
.vlz-bericht:hover .material-symbols-outlined { transform: translateX(3px); }
.vlz-bericht:active { transform: scale(0.97); }
.vlz-bericht:focus-visible { outline: 2px solid var(--text-primary, #F4F4F4); outline-offset: 3px; }

/* Kleine Ueberschriften (h3): Reichweite, Views, Follower, Ziele, Meistgesehen */
.vlz-block .vlz-label {
  margin: 0; font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 13px; line-height: 1.3;
  letter-spacing: 0; text-transform: none; color: var(--vlz-mittel);
}
[data-theme="light"] .vlz-block .vlz-label { color: var(--fg-a700, #4A4346) !important; }

/* ---------------------------------------------------------------- Kennzahlen */
.vlz-kennzahlen { display: grid; grid-template-columns: minmax(0, 1fr); }
.vlz-kennzahl { min-width: 0; display: flex; flex-direction: column; padding: 24px 0; border-top: 1px solid var(--vlz-linie); }
.vlz-kennzahl:first-child { padding-top: 0; border-top: 0; }
.vlz-zahl {
  margin-top: 12px; font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 34px; line-height: 1;
  letter-spacing: -0.015em; color: var(--fg-1, #fff); white-space: nowrap;
}
.vlz-leit .vlz-zahl { font-size: clamp(48px, 4.4vw, 64px); letter-spacing: -0.03em; }
.vlz-zahl-leer { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--vlz-leise); white-space: normal; }
.vlz-block .vlz-zusatz { margin-top: 8px; min-height: 18px; font-size: 13px; line-height: 18px; color: var(--vlz-leise); }

.vlz-diagramm { position: relative; margin-top: 20px; color: var(--fg-1, #fff); }
.vlz-diagramm-ort { min-height: 128px; }
.vlz-diagramm .sk { border-radius: 10px; }

/* Diagramm ist Tab-Ziel (Pfeiltasten wandern durch die Werte) */
.vlz-svg { outline: none; }
.vlz-svg:focus-visible { outline: 2px solid var(--text-primary, #F4F4F4); outline-offset: 4px; border-radius: 6px; }

/* Tooltip: hover() setzt nur Lage und Sichtbarkeit, das Aussehen kommt von hier */
.vlz-tipp {
  z-index: 4; display: flex; flex-direction: column; gap: 2px; padding: 7px 10px 8px;
  border-radius: 10px; background: var(--bg-s3, #2a2a2a); border: 1px solid var(--line-a120, rgba(255, 255, 255, 0.12));
  box-shadow: none; font-family: 'Funnel Display', sans-serif; line-height: 1.2;
}
.vlz-tipp-wert { font-size: 15px; font-weight: 600; color: var(--fg-1, #fff); }
.vlz-tipp-label { font-size: 12px; color: var(--vlz-mittel); }
[data-theme="light"] .vlz-tipp { background: var(--bg-body, #F7F4F2); border-color: var(--kontur, #B0ADAC); box-shadow: none; }

/* Tablet: Leitzahl ueber die ganze Breite, Views und Follower nebeneinander */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .vlz-kennzahlen { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vlz-leit { grid-column: 1 / -1; }
  .vlz-kennzahl:nth-child(2) { padding-right: var(--vlz-spalte); }
  .vlz-kennzahl:nth-child(3) { padding-left: var(--vlz-spalte); border-left: 1px solid var(--vlz-linie); }
}

/* Desktop: 6 / 3 / 3 Spalten, Zeilen ueber alle drei Kacheln ausgerichtet (subgrid) */
@media (min-width: 1024px) {
  .vlz-kennzahlen { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
  .vlz-kennzahl { padding: 0 var(--vlz-spalte); border-top: 0; border-left: 1px solid var(--vlz-linie); }
  .vlz-kennzahl:first-child { padding-left: 0; border-left: 0; }
  .vlz-kennzahl:nth-child(3) { padding-right: 0; }
  @supports (grid-template-rows: subgrid) {
    .vlz-kennzahlen { grid-template-rows: auto auto auto auto; }
    .vlz-kennzahl { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
    .vlz-kennzahl .vlz-zahl { align-self: end; }
    .vlz-kennzahl .vlz-diagramm { align-self: end; }
  }
  .vlz-kennzahl .vlz-diagramm { margin-top: 24px; }
}

/* ---------------------------------------------------------------- Ziele und Meistgesehen */
.vlz-unten { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: 8px; border-top: 1px solid var(--vlz-linie); }
.vlz-unten > * { min-width: 0; padding: 24px 0 0; }
.vlz-unten > * + * { margin-top: 24px; border-top: 1px solid var(--vlz-linie); }
.vlz-kennzahlen + .vlz-unten { margin-top: 28px; }
.vlz-kopf + .vlz-unten { margin-top: 0; border-top: 0; }
.vlz-kopf + .vlz-unten > :first-child { padding-top: 0; }
@media (min-width: 1024px) {
  .vlz-unten { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vlz-unten > * { padding-top: 28px; }
  .vlz-unten > :first-child { padding-right: var(--vlz-spalte); }
  .vlz-unten > * + * { margin-top: 0; border-top: 0; border-left: 1px solid var(--vlz-linie); padding-left: var(--vlz-spalte); }
  .vlz-unten > :only-child { grid-column: 1 / -1; padding-right: 0; }
}

.vlz-ziele-liste { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 22px; }
.vlz-nur-ziele .vlz-ziele-liste { margin-top: 0; }
@media (min-width: 1024px) {
  .vlz-nur-ziele .vlz-ziele-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
}
.vlz-ziel { min-width: 0; }
/* Drei Ziele nebeneinander: Titel, Balken, Wert und Notiz stehen ueber alle Spalten auf einer Linie (subgrid),
   auch wenn ein Titel zweizeilig wird (Web-QA 26.10.: im PDF stand der dritte Balken tiefer). Gilt fuer den
   Block nur mit Zielen ab 1024 px, den Bericht ab 900 px und den Druck (dort immer drei Spalten). */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1024px) {
    .vlz-nur-ziele .vlz-ziele-liste { row-gap: 0; }
    .vlz-nur-ziele .vlz-ziel { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  }
  @media (min-width: 900px) {
    .qb .vlz-nur-ziele .vlz-ziele-liste { row-gap: 0; }
    .qb .vlz-nur-ziele .vlz-ziel { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  }
  @media print {
    .qb .vlz-nur-ziele .vlz-ziele-liste { row-gap: 0; }
    .qb .vlz-nur-ziele .vlz-ziel { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  }
}
.vlz-ziel-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.vlz-ziel-titel { min-width: 0; font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--fg-1, #fff); }
.vlz-ziel-prozent { flex: none; font-size: 15px; line-height: 1.3; font-weight: 600; color: var(--fg-1, #fff); }
.vlz-balken-ort { color: var(--fg-1, #fff); }
.vlz-ziel-fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 8px; min-height: 20px; font-size: 13px; line-height: 1.4; }
.vlz-ziel-wert { min-width: 0; color: var(--vlz-leise); }
.vlz-status { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 500; color: var(--fg-1, #fff); }
.vlz-status .material-symbols-outlined { font-size: 16px; line-height: 1; font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 20; }
.vlz-status-erreicht { color: var(--vlz-ok); }
.vlz-status-offen, .vlz-status-wartet { color: var(--vlz-leise); font-weight: 400; }
/* Notiz unter einem Ziel (nur im Quartalsbericht, zielZeile mit { notiz: true }) */
.vlz-ziel-notiz {
  margin-top: 12px; padding-left: 10px; border-left: 2px solid var(--vlz-linie);
  font-size: 13px; line-height: 1.5; color: var(--vlz-leise); overflow-wrap: anywhere;
}
.vlz-block .vlz-erklaerung, .qb .vlz-erklaerung { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-size: 12px; line-height: 1.4; color: var(--vlz-leise); }
.vlz-strich { flex: none; width: 2px; height: 14px; border-radius: 1px; background: var(--fg-1, #fff); }

.vlz-top-liste { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.vlz-beitrag {
  position: relative; isolation: isolate; display: flex; align-items: flex-start; gap: 14px;
  margin: 0 -10px; padding: 10px; border-radius: 14px; color: inherit; text-decoration: none; min-width: 0;
}
a.vlz-beitrag { transition: transform 0.12s var(--vlz-ease); }
a.vlz-beitrag::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: var(--bg-s2, #1f1f1f); opacity: 0; transition: opacity 0.15s ease;
}
a.vlz-beitrag:hover::before { opacity: 1; }
a.vlz-beitrag:active { transform: scale(0.99); }
a.vlz-beitrag:focus-visible { outline: 2px solid var(--text-primary, #F4F4F4); outline-offset: 2px; }
a.vlz-beitrag > .material-symbols-outlined { flex: none; align-self: center; font-size: 18px; color: var(--vlz-leise); }

/* Vorschau: Bild, sonst Text-Kachel im Seiten-Look (Symbol je Typ, Anfang der Caption) */
.vlz-beitrag-bild {
  position: relative; flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 12px;
  display: flex; flex-direction: column; justify-content: space-between; padding: 7px 7px 6px;
  background: var(--bg-s2, #1f1f1f); border: 1px solid var(--line-a080, rgba(255, 255, 255, 0.08));
  color: var(--vlz-mittel);
}
.vlz-beitrag-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vlz-mit-bild > :not(img) { visibility: hidden; }
.vlz-kachel-icon { font-size: 16px; line-height: 1; }
.vlz-kachel-text {
  font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 11px; line-height: 1.1; color: var(--fg-1, #fff);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.vlz-beitrag-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vlz-beitrag-caption {
  font-size: 14px; line-height: 1.35; font-weight: 500; color: var(--fg-1, #fff);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
}
.vlz-beitrag-meta { font-size: 12px; line-height: 1.4; color: var(--vlz-leise); }
.vlz-beitrag-zahlen { font-size: 13px; line-height: 1.4; color: var(--vlz-mittel); overflow-wrap: anywhere; }
.vlz-beitrag-zahlen strong { font-weight: 600; color: var(--fg-1, #fff); }
.vlz-block .vlz-leer { margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--vlz-leise); }

/* ---------------------------------------------------------------- Skelett (gleiche Masse wie der fertige Block) */
.vlz-block .sk { max-width: 100%; }
.vlz-block .sk.vlz-sk-titel { height: 27px; }
.vlz-block .sk.vlz-sk-unterzeile { height: 14px; margin-top: 8px; }
.vlz-block .sk.vlz-sk-label { height: 12px; border-radius: 6px; }
.vlz-block .sk.vlz-sk-zahl { height: 34px; margin-top: 12px; border-radius: 10px; }
.vlz-block .vlz-leit .sk.vlz-sk-zahl { height: clamp(48px, 4.4vw, 64px); }
.vlz-block .sk.vlz-sk-zusatz { height: 14px; margin-top: 10px; margin-bottom: 2px; }
.vlz-block .sk.vlz-sk-diagramm { height: 128px; border-radius: 10px; }
.vlz-block .sk.vlz-sk-ziel { height: 78px; margin-top: 20px; border-radius: 12px; }
.vlz-block .vlz-ziele > div > .sk.vlz-sk-label + .sk.vlz-sk-ziel { margin-top: 18px; }
.vlz-block .vlz-ziele-liste .sk.vlz-sk-ziel { margin-top: 0; }
.vlz-block .sk.vlz-sk-erklaerung { height: 12px; margin-top: 22px; }
.vlz-block .sk.vlz-sk-link { height: 12px; margin: 16px 0; }
.vlz-block .sk.vlz-sk-beitrag { height: 84px; margin-top: 4px; border-radius: 12px; }
@media (max-width: 767.98px) { .vlz-block .sk.vlz-sk-beitrag { height: 97px; } }
.vlz-block .vlz-top > .sk.vlz-sk-label + .sk.vlz-sk-beitrag { margin-top: 14px; }

/* ---------------------------------------------------------------- Auftritt (einmal, nach dem Laden) */
@media (prefers-reduced-motion: no-preference) {
  .vlz-auftritt .vlz-inhalt { animation: vlzEin 0.52s var(--vlz-ease) both; }
  .vlz-auftritt .vlz-saeule { transform-box: fill-box; transform-origin: 50% 100%; animation: vlzWachsen 0.6s var(--vlz-ease) both; }
  .vlz-auftritt .vlz-fuell { transform-box: fill-box; transform-origin: 0 50%; animation: vlzFuellen 0.8s var(--vlz-ease) 0.12s both; }
  .vlz-auftritt .vlz-saeule:nth-of-type(2) { animation-delay: 0.03s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(3) { animation-delay: 0.06s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(4) { animation-delay: 0.09s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(5) { animation-delay: 0.12s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(6) { animation-delay: 0.15s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(7) { animation-delay: 0.18s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(8) { animation-delay: 0.21s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(9) { animation-delay: 0.24s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(10) { animation-delay: 0.27s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(11) { animation-delay: 0.3s; }
  .vlz-auftritt .vlz-saeule:nth-of-type(12) { animation-delay: 0.33s; }
}
@keyframes vlzEin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes vlzWachsen { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes vlzFuellen { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
  .vlz-bericht, .vlz-bericht .material-symbols-outlined, a.vlz-beitrag, a.vlz-beitrag::before { transition: none; }
  .vlz-bericht:hover .material-symbols-outlined { transform: none; }
}

/* ================================================================================================
 * Quartalsbericht (quartalsbericht.html, Wurzel main.qb)
 * Bildschirm: Kopf auf dem Seitengrund, fuenf Abschnitte als Karten. Ziele kommen aus
 * VLZahlenBlock.zieleTeil (wie im Block, plus Notiz), Diagramme aus zahlen-svg.js.
 * Kein Rot im Bericht (auch keine rote Linie am Kopf): Rot bleibt Warnung und Fokusring.
 * ============================================================================================== */
.qb {
  --vlz-flaeche: var(--card-bg, #161616);       /* Ringe in der Farbe der Abschnitts-Karte */
  --qb-linie: var(--line-a100, rgba(255, 255, 255, 0.1));
  --qb-druck-diagramm: 87mm;                     /* Breite eines Diagramms im Druck (zwei je Zeile) */
  color: var(--fg-1, #fff);
}

/* ---------------------------------------------------------------- Kopf */
.qb-kopf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 40px; align-items: end; }
@media (min-width: 900px) { .qb-kopf { grid-template-columns: minmax(0, 1fr) auto; } }
.qb-h1 {
  margin: 0; font-family: 'Unbounded', sans-serif; font-weight: 900; text-transform: uppercase;
  font-size: clamp(24px, 6.1vw, 74px); line-height: 1.1; letter-spacing: -0.01em; color: var(--fg-1, #fff);
}
.qb-h1-q { display: block; }
.qb-meta { margin: 22px 0 0; font-size: 15px; line-height: 1.55; color: var(--fg-a600, rgba(255, 255, 255, 0.6)); }
.qb-meta-teil { white-space: nowrap; }
.qb-beispiel {
  display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 8px 16px 8px 14px;
  border-radius: 999px; border: 1px solid var(--line-a180, rgba(255, 255, 255, 0.18));
  font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--fg-1, #fff);
}
.qb-beispiel[hidden] { display: none; }
.qb-beispiel-punkt { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.qb-steuer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.qb-steuer[hidden] { display: none; }
.qb-wahl { position: relative; display: inline-flex; align-items: center; }
.qb-wahl select {
  -webkit-appearance: none; appearance: none; height: 44px; min-width: 132px; padding: 0 42px 0 18px;
  border-radius: 999px; border: 1px solid var(--line-a180, rgba(255, 255, 255, 0.18)); background: transparent;
  color: var(--fg-1, #fff); color-scheme: dark; font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 15px;
  cursor: pointer; transition: transform 0.18s var(--vlz-ease);
}
.qb-wahl select:hover { border-color: var(--fg-a500, rgba(255, 255, 255, 0.5)); }
.qb-wahl select:active { transform: scale(0.98); }
.qb-wahl select:focus-visible { outline: 2px solid var(--text-primary, #F4F4F4); outline-offset: 3px; }
.qb-wahl .material-symbols-outlined { position: absolute; right: 14px; font-size: 20px; pointer-events: none; color: var(--fg-a700, rgba(255, 255, 255, 0.7)); }

/* ---------------------------------------------------------------- Abschnitte */
#qb-bericht { margin-top: 48px; display: grid; gap: 20px; }
#qb-bericht.qb-laedt { opacity: 0.45; transition: opacity 0.2s ease; }
.qb-abschnitt {
  min-width: 0; padding: 28px 22px 30px; border-radius: 24px;
  border: 1px solid var(--line-a080, rgba(255, 255, 255, 0.08)); background: var(--card-bg, #161616);
}
@media (min-width: 768px) { .qb-abschnitt { padding: 36px 40px 40px; border-radius: 28px; } }
.qb-abschnitt-kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.qb-h2 {
  margin: 0; font-family: 'Unbounded', sans-serif; font-weight: 900; text-transform: uppercase;
  font-size: 24px; line-height: 1.1; letter-spacing: -0.01em; color: var(--fg-1, #fff);
}
.qb-abschnitt-info { margin: 0; font-size: 13px; line-height: 1.45; color: var(--fg-a600, rgba(255, 255, 255, 0.6)); }
.qb-leer-text { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg-a600, rgba(255, 255, 255, 0.6)); }
.qb-leer-text a { color: var(--fg-1, #fff); font-weight: 600; text-decoration: none; }
.qb-leer-text a:hover { opacity: 0.72; }
.qb-leer-text a:active { opacity: 0.7; }
.qb-leer-text a:focus-visible { outline: 2px solid var(--text-primary, #F4F4F4); outline-offset: 2px; border-radius: 4px; }

/* Ziele: wie im Block (nur Ziele, drei Spalten), mit Notiz */
.qb .vlz-ziele-liste { gap: 28px; }
@media (min-width: 900px) {
  .qb .vlz-nur-ziele .vlz-ziele-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; }
}
.qb .vlz-ziel-titel, .qb .vlz-ziel-prozent { font-size: 16px; }
.qb .vlz-erklaerung { margin-top: 28px; }

/* Kennzahlen: sieben Kacheln, Haarlinien statt Kaesten (Rasterluecke in Linienfarbe) */
.qb-kacheln {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--qb-linie); border: 1px solid var(--qb-linie); border-radius: 18px; overflow: hidden;
}
.qb-kachel { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 20px 18px 18px; background: var(--card-bg, #161616); }
.qb-kachel-leit { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .qb-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .qb-kachel { padding: 24px 24px 22px; }
  .qb-kachel-leit { grid-column: span 2; }
}
.qb-kachel-label {
  margin: 0; font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 13px; line-height: 1.3;
  letter-spacing: 0; text-transform: none; color: var(--vlz-mittel);
}
[data-theme="light"] .qb .qb-kachel-label { color: var(--fg-a700, #4A4346) !important; }
.qb-kachel-zahl {
  font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 32px; line-height: 1; letter-spacing: -0.015em;
  color: var(--fg-1, #fff); white-space: nowrap; overflow-wrap: normal;
}
.qb-kachel-leit .qb-kachel-zahl { font-size: clamp(40px, 5vw, 60px); letter-spacing: -0.03em; }
.qb-kachel-leer { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--vlz-leise); white-space: normal; }
.qb-kachel-zusatz { min-height: 18px; font-size: 13px; line-height: 18px; color: var(--vlz-leise); }

/* Verlauf: zwei Diagramme nebeneinander (Desktop), untereinander (Handy) */
.qb-verlauf { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; }
@media (min-width: 900px) { .qb-verlauf { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.qb-diagramm { position: relative; min-width: 0; color: var(--fg-1, #fff); }
.qb-diagramm-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.qb-diagramm-kopf .qb-kachel-label { margin: 0; }
.qb-diagramm-info { font-size: 13px; color: var(--vlz-leise); white-space: nowrap; }
.qb-diagramm-ort { min-height: 176px; }
.qb-diagramm-fuss { margin: 10px 0 0; font-size: 12px; line-height: 1.4; color: var(--vlz-leise); }

/* Tabellen: scrollen am Handy in sich, nicht die Seite */
.qb-tabelle-rahmen { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.qb-tabelle-rahmen:focus-visible { outline: 2px solid var(--text-primary, #F4F4F4); outline-offset: 4px; }
.qb-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.qb-tabelle-top { min-width: 640px; }
.qb-tabelle thead th {
  padding: 0 14px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--qb-linie);
  font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--vlz-mittel);
}
.qb-tabelle td, .qb-tabelle tbody th { padding: 14px; vertical-align: top; text-align: left; font-weight: 400; color: var(--fg-1, #fff); border-bottom: 1px solid var(--vlz-linie); }
.qb-tabelle tbody tr:last-child > * { border-bottom: 0; }
.qb-tabelle th:first-child, .qb-tabelle td:first-child { padding-left: 0; }
.qb-tabelle th:last-child, .qb-tabelle td:last-child { padding-right: 0; }
.qb-tabelle .qb-zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qb-tabelle .qb-leise { color: var(--vlz-leise); white-space: nowrap; }
.qb-tabelle .qb-caption { min-width: 260px; overflow-wrap: anywhere; }
.qb-tabelle tbody th { font-weight: 500; }
.qb-teilwoche { color: var(--vlz-leise); font-weight: 400; }
.qb-quelle { margin: 4px 4px 0; font-size: 12.5px; line-height: 1.5; color: var(--fg-a600, rgba(255, 255, 255, 0.6)); }

/* Handy: Wochentabelle passt in die Breite (nur die breite Top-5-Tabelle scrollt), Kachel-Labels enger */
@media (max-width: 640px) {
  .qb-abschnitt { padding: 26px 18px 28px; }
  .qb-kachel { padding: 18px 14px 16px; }
  /* zwei Kacheln je Zeile: Platz fuer "+999.999" und "1,2 Mio." (ab 1 Mio. kurz, quartalsbericht.html) */
  .qb-kachel:not(.qb-kachel-leit) .qb-kachel-zahl { font-size: 27px; }
  .qb-kachel-label { font-size: 12px; }
  .qb-tabelle-wochen { font-size: 13px; }
  .qb-tabelle-wochen thead th { padding: 0 6px 10px; font-size: 12px; }
  .qb-tabelle-wochen td, .qb-tabelle-wochen tbody th { padding: 12px 6px; }
}

/* Handy: Top 5 als gestapelte Zeilen statt Scrolltabelle (Web-QA 26.10.: Views, Reichweite und Interaktionen
   lagen ausserhalb des Rahmens, die Caption brach mitten im Wort am Rand ab). Je Beitrag: Datum · Typ, die
   ganze Caption, darunter drei Zahlen mit Bezeichnung (data-label, fuer Screenreader leer: der Spaltenkopf
   bleibt unsichtbar im Baum). Die Tabellen-Rollen setzt quartalsbericht.html, weil Safari sie sonst mit dem
   display-Wechsel verwirft. Nur am Bildschirm: der Druck bleibt eine Tabelle.
   Grenze 900 px wie der uebrige Bericht: die Tabelle braucht rund 763 px Inhalt, darunter lagen bei Handy quer
   und iPad hoch (641 bis ~890 px) Zahlenspalten ausserhalb des Rahmens (Review Task 7). */
@media screen and (max-width: 899.98px) {
  .qb-tabelle-top { display: block; min-width: 0; }
  .qb-tabelle-top thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .qb-tabelle-top tbody { display: block; }
  .qb-tabelle-top tbody tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--vlz-linie); }
  .qb-tabelle-top tbody tr:first-child { padding-top: 2px; }
  .qb-tabelle-top tbody tr:last-child { padding-bottom: 0; border-bottom: 0; }
  .qb-tabelle-top tbody td { display: block; padding: 0; border: 0; }
  .qb-tabelle-top td.qb-leise { font-size: 13px; }
  .qb-tabelle-top td.qb-leise + td.qb-leise::before { content: '\00b7'; content: '\00b7' / ''; margin-right: 12px; }
  .qb-tabelle-top td.qb-caption { flex: 1 1 100%; min-width: 0; margin: 6px 0 12px; font-size: 15px; line-height: 1.45; font-weight: 500; }
  .qb-tabelle-top td.qb-zahl { flex: 1 1 0; min-width: 0; text-align: left; font-size: 15px; font-weight: 600; }
  .qb-tabelle-top td.qb-zahl::after {
    content: attr(data-label); content: attr(data-label) / '';
    display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--vlz-leise);
  }
}

/* Auftritt (einmal je Laden): Abschnitte nacheinander, Saeulen und Balken wie im Block (.vlz-auftritt) */
@media (prefers-reduced-motion: no-preference) {
  .qb-auftritt > .qb-abschnitt { animation: vlzEin 0.56s var(--vlz-ease) both; }
  .qb-auftritt > .qb-abschnitt:nth-child(2) { animation-delay: 0.06s; }
  .qb-auftritt > .qb-abschnitt:nth-child(3) { animation-delay: 0.12s; }
  .qb-auftritt > .qb-abschnitt:nth-child(4) { animation-delay: 0.18s; }
  .qb-auftritt > .qb-abschnitt:nth-child(5) { animation-delay: 0.24s; }
}
@media (prefers-reduced-motion: reduce) {
  #qb-bericht.qb-laedt, .qb-wahl select { transition: none; }
}

/* ================================================================================================
 * Druck (A4 hoch, Rand 14 mm; @page steht in quartalsbericht.html, damit es nur diese Seite trifft)
 * Immer hell: die Theme-Variablen werden ueberschrieben, keine dunklen Flaechen. Kopfleiste, Footer,
 * Chat, Upload-Widget, Blob-Grund, Knoepfe und Quartalswahl fallen weg. Das Musterfirma-Band
 * (booster-plattform.js) bleibt fest oben und wiederholt sich auf jeder Seite; damit der Inhalt
 * nicht darunter rutscht, ist der Bericht im Druck eine Tabelle, deren Kopfgruppe (.qb-druckkopf,
 * nur mit Band) als Platzhalter auf jeder Seite wiederkehrt. Diagramme sind schwarz ueber currentColor.
 * ============================================================================================== */
.qb-druckrahmen, .qb-druckrahmen > tbody, .qb-druckrahmen > tbody > tr, .qb-druckrahmen > tbody > tr > td { display: block; margin: 0; padding: 0; border: 0; }
.qb-druckrahmen { width: 100%; }
.qb-druckkopf { display: none; }
@media print {
  html[data-theme], html[data-theme] body.qb-seite {
    --bg-body: #FFFFFF; --bg-dim: #FFFFFF; --bg-s1: #FFFFFF; --bg-s1b: #FFFFFF; --bg-s2: #F4F1EF; --bg-s2b: #F4F1EF; --bg-s3: #ECE7E4; --bg-s4: #E2DCD8;
    --card-bg: #FFFFFF; --input-bg: #FFFFFF; --fg-1: #0A0708; --text-primary: #0A0708; --text-secondary: #4A4346; --text-muted: #6E6569;
    --fg-a400: #4A4346; --fg-a450: #4A4346; --fg-a500: #4A4346; --fg-a550: #4A4346; --fg-a600: #4A4346; --fg-a620: #4A4346; --fg-a700: #3A3437; --fg-a720: #3A3437; --fg-a750: #3A3437; --fg-a800: #2A2527; --fg-a850: #0A0708; --fg-a900: #0A0708;
    --line-a050: rgba(10,7,8,0.08); --line-a060: rgba(10,7,8,0.09); --line-a070: rgba(10,7,8,0.1); --line-a080: rgba(10,7,8,0.12); --line-a100: rgba(10,7,8,0.16); --line-a120: rgba(10,7,8,0.18); --line-a150: rgba(10,7,8,0.2); --line-a180: rgba(10,7,8,0.24);
    color-scheme: light;
  }
  html[data-theme] { background: #FFFFFF !important; }
  /* hoehere Spezifitaet als das Band-CSS (html.vl-muster-an body{padding-top:..!important}) */
  html:root body.qb-seite.qb-seite { padding: 0 !important; margin: 0 !important; background: #FFFFFF !important; color: #0A0708 !important; }
  /* theme.js blendet Farben weich um (transition); im Druck gilt sofort hell */
  html[data-theme], body.qb-seite, body.qb-seite * { transition: none !important; }
  /* Browser drucken Hintergruende sonst nicht: Haarlinien der Kacheln, Strich der Legende, Punkte.
     Alle Flaechen sind im Druck hell, exakt drucken kostet also keine Tinte. */
  .qb, .qb * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.qb-seite::before, body.qb-seite::after { display: none !important; content: none !important; }
  body.qb-seite > *:not(main):not(#vl-muster-band) { display: none !important; }

  body.qb-seite > #vl-muster-band {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important;
    background: #EDE8E5 !important; color: #0A0708 !important; box-shadow: none !important; border-bottom: 0.5pt solid rgba(10,7,8,0.25);
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  #qb-main.qb { max-width: 182mm; margin: 0; padding: 0 !important; opacity: 1 !important; transform: none !important; font-size: 10pt; --vlz-ok: #0A0708; }
  .qb *, .qb *::before, .qb *::after { animation: none !important; transition: none !important; }
  .qb-druckrahmen { display: table; width: 100%; border-collapse: collapse; border-spacing: 0; }
  .qb-druckrahmen > tbody { display: table-row-group; }
  .qb-druckrahmen > tbody > tr, .qb-druckkopf > tr { display: table-row; }
  .qb-druckrahmen > tbody > tr > td, .qb-druckkopf > tr > td { display: table-cell; padding: 0; vertical-align: top; }
  html.vl-muster-an .qb-druckkopf { display: table-header-group; }
  .qb-druckkopf-platz { height: calc(30px + 5mm); }

  #qb-main footer, .qb-steuer, .qb-adminleiste, #qb-hinweis, .qb .vlz-tipp, .qb-nur-bildschirm { display: none !important; }

  /* Kopf */
  .qb-kopf { display: block; break-inside: avoid; break-after: avoid; }
  .qb-h1 { font-size: 26pt; line-height: 1.1; }
  .qb-meta { margin-top: 4mm; font-size: 10pt; }
  .qb-beispiel { margin-top: 3mm; padding: 1.4mm 3.5mm; font-size: 9.5pt; border-color: rgba(10,7,8,0.35); }

  /* Abschnitte: keine Karten, Haarlinie oben, nie zerteilt */
  #qb-bericht { margin-top: 7mm; gap: 0; display: block; opacity: 1 !important; }
  .qb-abschnitt {
    padding: 5mm 0 0; margin: 0 0 6mm; border: 0; border-top: 0.75pt solid rgba(10,7,8,0.3); border-radius: 0; background: transparent;
    break-inside: avoid; page-break-inside: avoid;
  }
  .qb-abschnitt-kopf { margin-bottom: 4mm; break-after: avoid; }
  .qb-h2 { font-size: 18pt; }
  .qb-abschnitt-info { font-size: 8.5pt; }

  .qb .vlz-nur-ziele .vlz-ziele-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 7mm; }
  .qb .vlz-ziel-titel, .qb .vlz-ziel-prozent { font-size: 10pt; }
  .qb .vlz-ziel-fuss, .qb .vlz-ziel-notiz { font-size: 8.5pt; }
  .qb .vlz-ziel-fuss { flex-direction: column; align-items: flex-start; gap: 0.6mm; }   /* schmale Spalten: Wert, darunter Status */
  .qb .vlz-erklaerung { margin-top: 4mm; font-size: 8.5pt; }

  .qb-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 3mm; }
  .qb-kachel { padding: 3.2mm 3.5mm; gap: 1.6mm; }
  .qb-kachel-leit { grid-column: span 2; }
  .qb-kachel-label { font-size: 8.5pt; }
  .qb-kachel-zahl { font-size: 15pt; }
  .qb-kachel-leit .qb-kachel-zahl { font-size: 22pt; }
  .qb-kachel-zusatz { min-height: 0; font-size: 8.5pt; line-height: 1.3; }

  /* Diagramme in fester Druckbreite (--qb-druck-diagramm), die Seite zeichnet sie dafuer neu */
  .qb-verlauf { grid-template-columns: var(--qb-druck-diagramm) var(--qb-druck-diagramm); justify-content: space-between; gap: 0; }
  .qb-diagramm, .qb-diagramm-ort { width: var(--qb-druck-diagramm); }
  .qb-diagramm { color: #0A0708; }
  .qb-diagramm-ort { min-height: 0; }
  .qb-diagramm-kopf { margin-bottom: 2mm; }
  .qb-diagramm-info { font-size: 8.5pt; }
  .qb-diagramm-fuss { margin-top: 1.5mm; font-size: 8.5pt; }

  .qb-tabelle-rahmen { overflow: visible; }
  .qb-tabelle, .qb-tabelle-top { min-width: 0; font-size: 8.5pt; line-height: 1.35; }
  .qb-tabelle thead th { padding: 0 2.5mm 2mm; font-size: 8.5pt; }
  .qb-tabelle td, .qb-tabelle tbody th { padding: 1.8mm 2.5mm; }
  .qb-tabelle .qb-caption { min-width: 0; }
  .qb-tabelle tr { break-inside: avoid; }
  .qb-quelle { margin: 0; font-size: 8.5pt; }
}
