/* ===== styles.css = app.css (legacy) + inline <style> from app.html v4.0, 1:1, cascade order ===== */
/* ---- BLOCK 1: app.css (legacy, was loaded via <link> first) ---- */
/* =====================================================================
   BIS-Dashboard V3 — App-Shell (Layer 2 Steuerboard + Layer 3 Analyse
   Board + Quadranten-Rahmen mit 2×2-State-Machine)
   ---------------------------------------------------------------------
   Auftraggeber : BAG kommunaler Frauenbüros & Gleichstellungsstellen
   Bau-Synapse  : W-SHELL (Worker-Schicht)
   Look         : BAG-Theme aus design_v3/styles.css (hier eingebettet,
                  damit app.html self-contained ist — KEIN Netz/CDN).
   Panel-Kontrakt: .ak-panel/.ak-tab/.ak-body/.ak-grafik/.ak-stat/
                  .ak-kitext/.ak-funktionsleiste/.ak-support/.ak-type-badge
                  + globale akToggle()/akSupport() in app.js. Die Styles
                  hier sind kompatibel zum Fragment von W-KARTEN
                  (analysekarten.html): Single-Focus über .ak-panel.open,
                  Karte #ak-map fährt 62%→20% ein.
   Theme-Regeln (verbindlich): Gelb nur Branding-Fläche mit dunklem Text;
                  eine Akzentfarbe je Ansicht (Cyan default); kein Text auf
                  100% Magenta; Akzent nur als Tint/Strich; Kontrast hoch.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. MARKEN-VARIABLEN  (aus styles.css :root — hier umfärben, sonst nichts)
   --------------------------------------------------------------------- */
:root {
  --bag-gelb:    #ffff01;
  --bag-magenta: #ff07fc;
  --bag-cyan:    #04ffff;
  --bag-dark:    #231f20;
  --bag-light:   #f1f1f1;
  --bag-white:   #ffffff;

  --bag-magenta-50: #ff83fe;
  --bag-magenta-20: #ffcdfe;
  --bag-magenta-10: #ffe6ff;
  --bag-magenta-05: #fff2ff;

  --bag-cyan-50: #82ffff;
  --bag-cyan-20: #cdffff;
  --bag-cyan-10: #e6ffff;
  --bag-cyan-05: #f2ffff;

  --bag-gelb-50: #ffff80;
  --bag-gelb-20: #ffffcc;

  --bag-grau-mid:  #6b6668;
  --bag-grau-line: #d9d7d8;

  /* Aktive Akzentfarbe der Ansicht (Cyan default, an EINER Stelle umschaltbar) */
  --akzent:    var(--bag-cyan);
  --akzent-50: var(--bag-cyan-50);
  --akzent-20: var(--bag-cyan-20);
  --akzent-10: var(--bag-cyan-10);
  --akzent-05: var(--bag-cyan-05);

  /* "Ihr Kreis"-Markierung (warmes Orange, EINZIGE warme Daten-Markierung) */
  --mein-kreis: #e8844a;

  --radius:    10px;
  --radius-sm: 6px;
  --gap:       16px;

  --font: "Fira Sans", "Segoe UI", system-ui, sans-serif;
  --kachel-ton: #e8e5df;   /* zarter Kachel-Ton — Analysekarte + Steuerboard (Norbert 2026-06-21) */

  --shadow-card: 0 1px 3px rgba(35, 31, 32, 0.08);
  --shadow-lift: 0 6px 24px rgba(35, 31, 32, 0.18);
  --t: 0.22s ease;

  --header-h: 56px;
  --tab-size: 80px;          /* Kanten-Tabs identisch 80px (Spec) */
}

/* ---------------------------------------------------------------------
   2. RESET / GRUNDLAGEN
   --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--bag-dark);
  background: var(--bag-light);
  line-height: 1.5;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ---------------------------------------------------------------------
   2b. HOCHKONTRAST-MODUS (Werkzeuge B4) — schaltet auf max. Kontrast,
       hebt Akzent-Tints auf Volltöne mit dunklem Text an.
   --------------------------------------------------------------------- */
body.hochkontrast {
  --bag-light:     #ffffff;
  --bag-grau-mid:  #3a3537;
  --bag-grau-line: #231f20;
  --akzent-20:     #04ffff;
  --akzent-10:     #82ffff;
  --akzent-05:     #cdffff;
}

/* ---------------------------------------------------------------------
   3. APP-RAHMEN — 20% Steuerboard oben · 80% Content unten
   --------------------------------------------------------------------- */
.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 3a. Schmaler Gelb-Header (Branding-Fläche, dunkler Text — regelkonform) */
.app-header {
  height: var(--header-h);
  background: var(--bag-gelb);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  flex: 0 0 auto;
}
.app-header .logo-box {
  display: flex; align-items: center; justify-content: center;
  width: 104px; height: 32px;
  border: 1.5px dashed var(--bag-dark);
  border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600; color: var(--bag-dark);
  flex: 0 0 auto;
}
.app-header .titel { font-weight: 800; font-size: 17px; color: var(--bag-dark); white-space: nowrap; }
.app-header .tag {
  font-size: 11px; font-weight: 600; color: var(--bag-dark); opacity: 0.7;
  border-left: 1px solid rgba(35,31,32,0.25); padding-left: 12px;
}
.app-header .header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.kreis-kontext {
  background: var(--bag-dark); color: var(--bag-white);
  padding: 6px 14px; border-radius: 999px;
  font-weight: 600; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
}
.kreis-kontext .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--akzent); }

/* =====================================================================
   4. STEUERBOARD  (Layer 2) — ~20%, einklappbar, 5 Blöcke B1–B5
   ===================================================================== */
.steuerboard {
  flex: 0 0 auto;
  background: var(--bag-light);
  border-bottom: 2px solid var(--bag-grau-line);
  position: relative;
  transition: padding var(--t);
}
.sb-kopf {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 0;
}
.sb-kopf .sb-titel {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--bag-grau-mid);
}
.sb-kopf .sb-sub { font-size: 11px; color: var(--bag-grau-mid); }
.sb-toggle {
  margin-left: auto;
  font-family: var(--font);
  font-size: 11px; font-weight: 600; color: var(--bag-grau-mid);
  border: 1px solid var(--bag-grau-line); border-radius: 999px;
  padding: 3px 12px; background: var(--bag-white); cursor: pointer;
  transition: all var(--t);
}
.sb-toggle:hover { border-color: var(--bag-dark); color: var(--bag-dark); }

/* Block-Reihe: 5 Blöcke nebeneinander (Norbert-Reihenfolge aus Layout-Skizze:
   Support · Indikatorwahl · Quadranten-Gitter · Kontext · Werkzeuge — die
   B1–B5-Inhalte aus der Spec sind den Blöcken zugeordnet, s. data-block) */
.sb-reihe {
  display: grid;
  gap: 12px;
  align-items: stretch;
  padding: 10px 16px 14px;
  grid-template-columns:
    var(--w-support,  0.7fr)
    var(--w-indikator,1.7fr)
    var(--w-quadrant, 1.6fr)
    var(--w-kontext,  1.7fr)
    var(--w-werkzeug, 0.9fr);
}

/* Steuerboard eingeklappt: Reihe weg, nur Kopf + State-Badge bleibt */
.steuerboard.collapsed .sb-reihe { display: none; }
.steuerboard.collapsed { padding-bottom: 4px; }

/* ---- Ein Block ---- */
.blk {
  position: relative;
  background: var(--bag-white);
  border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm);
  padding: 9px 11px 11px;
  display: flex; flex-direction: column;
  min-height: 128px;
}
.blk.schmal { background: var(--bag-light); }
.blk-kopf {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; color: var(--bag-dark);
  margin-bottom: 8px;
  cursor: pointer; user-select: none;
}
.blk-nr {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--bag-dark); color: var(--bag-white);
  font-size: 10px; font-weight: 700; flex: 0 0 auto;
}
.blk-kopf .blk-fold {
  margin-left: auto; font-size: 10px; color: var(--bag-grau-mid);
  transition: transform var(--t);
}
.blk.blk-collapsed .blk-fold { transform: rotate(-90deg); }
.blk-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.blk.blk-collapsed .blk-body { display: none; }
.blk.blk-collapsed { min-height: 0; }

/* Platzhalter-Controls in den Blöcken */
.ctl {
  display: flex; align-items: center; justify-content: space-between;
  height: 30px; padding: 0 9px;
  background: var(--bag-light);
  border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm);
  color: var(--bag-grau-mid); font-size: 11.5px;
  font-family: var(--font); cursor: pointer;
  width: 100%;
}
.blk.schmal .ctl { background: var(--bag-white); }
.ctl:hover { border-color: var(--akzent); }
.ctl + .ctl { margin-top: 7px; }
.ctl.drop::after { content: "▾"; font-size: 9px; margin-left: 6px; }
.ctl-label { font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--bag-grau-mid); text-transform: uppercase; margin-bottom: 4px; }
.ctl-label + .ctl { margin-top: 0; }

/* kleine dezente Buttons (Support / Werkzeuge) */
.mini-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; width: 100%; height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bag-grau-line);
  background: var(--bag-white);
  color: var(--bag-grau-mid); font-size: 11px; font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: all var(--t);
}
.mini-btn:hover { border-color: var(--bag-dark); color: var(--bag-dark); }
.mini-btn + .mini-btn { margin-top: 7px; }
.mini-btn.is-on { background: var(--akzent-20); border-color: var(--akzent); color: var(--bag-dark); }
.mini-btn .state-mini { margin-left: auto; font-size: 11px; }

/* ---- B2 Filter: Geschlecht-Segment + BBSR-Chips + Männer-Gap ---- */
.seg {
  display: flex; background: var(--bag-light);
  border: 1px solid var(--bag-grau-line); border-radius: var(--radius-sm);
  padding: 2px; gap: 2px;
}
.blk.schmal .seg { background: var(--bag-white); }
.seg-btn {
  flex: 1; padding: 5px 4px; border: none; background: none;
  border-radius: 4px; font-family: var(--font);
  font-size: 11px; font-weight: 600; color: var(--bag-grau-mid);
  cursor: pointer; transition: all var(--t); white-space: nowrap;
}
.seg-btn:hover:not(.active) { color: var(--bag-dark); background: var(--akzent-05); }
.seg-btn.active { background: var(--bag-dark); color: var(--bag-white); }

/* Männer-Gap checkbox (disabled wenn Vergleich = ohne) */
.check-item {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; padding: 5px 2px 0; transition: opacity var(--t);
}
.check-item.disabled { opacity: 0.34; cursor: not-allowed; }
.check-box {
  width: 15px; height: 15px; flex: 0 0 auto;
  border: 1.5px solid var(--bag-grau-line); border-radius: 3px;
  background: var(--bag-light);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--t);
}
.check-item:not(.disabled):hover .check-box { border-color: var(--akzent); }
.check-item.checked .check-box { background: var(--akzent); border-color: var(--akzent); }
.check-box .tick { width: 9px; height: 9px; display: none; }
.check-item.checked .tick { display: block; }
.check-label { font-size: 11px; font-weight: 500; color: var(--bag-dark); white-space: nowrap; }
.check-item.disabled .check-label { color: var(--bag-grau-mid); }
.disabled-hint { font-size: 9.5px; color: var(--bag-grau-mid); display: none; }
.check-item.disabled .disabled-hint { display: inline; }

/* BBSR chips */
.chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 4px; }
.chip {
  padding: 3px 9px; border-radius: 20px;
  border: 1px solid var(--bag-grau-line); background: var(--bag-light);
  font-size: 10.5px; font-weight: 500; color: var(--bag-grau-mid);
  cursor: pointer; transition: all var(--t); white-space: nowrap;
  font-family: var(--font);
}
.blk.schmal .chip { background: var(--bag-white); }
.chip:hover:not(.active) { border-color: var(--akzent); color: var(--bag-dark); }
.chip.active { background: var(--bag-dark); border-color: var(--bag-dark); color: var(--bag-white); font-weight: 600; }
.chip.all { border-style: dashed; }

/* ---- B1: 2×2-Quadranten-Gitter ---- */
.quadrant-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.q-spaltenkopf {
  display: grid; grid-template-columns: 14px 1fr 1fr; gap: 4px; margin-bottom: 3px;
}
.q-spaltenkopf .kopf {
  font-size: 9px; font-weight: 700; text-align: center;
  color: var(--bag-grau-mid); text-transform: uppercase; letter-spacing: 0.03em;
}
.q-body { display: grid; grid-template-columns: 14px 1fr 1fr; gap: 4px; flex: 1; }
.q-body + .q-body { margin-top: 4px; }
.q-zeilenkopf {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 9px; font-weight: 700; text-align: center;
  color: var(--bag-grau-mid); text-transform: uppercase; letter-spacing: 0.03em;
  display: flex; align-items: center; justify-content: center;
}
.q-zelle {
  border: 1px solid var(--bag-grau-line); border-radius: 4px;
  background: var(--bag-light);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 600; color: var(--bag-dark);
  text-align: center; line-height: 1.15; padding: 3px 2px; cursor: pointer;
  transition: all var(--t); min-height: 30px;
}
.blk .q-zelle { background: var(--bag-light); }
.q-zelle:hover:not(.is-active) { border-color: var(--akzent); background: var(--akzent-05); }
.q-zelle .q-lab { font-size: 8.5px; font-weight: 500; color: var(--bag-grau-mid); }
.q-zelle.is-active {
  background: var(--akzent-20); border-color: var(--akzent);
  box-shadow: inset 0 0 0 1px var(--akzent);
}
.q-zelle.is-active .q-lab { color: var(--bag-dark); }

/* =====================================================================
   5. CONTENT  (Layer 3 Analyse Board + Layer 4 Mount) — ~80%
   ===================================================================== */
.content {
  flex: 1 1 auto;
  position: relative;
  display: flex; flex-direction: column;
  min-height: 0;
  background: var(--bag-light);
}

/* State-Badge oben links */
.state-badge {
  position: absolute; top: 12px; left: 14px; z-index: 30;
  background: var(--bag-dark); color: var(--bag-white);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 6px 14px; border-radius: 999px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-card);
}
.state-badge .sb-q { color: var(--akzent); font-weight: 700; }

/* ---- Layer 3: Analyse Board (einklappbarer Selektor über den Panels) ---- */
.analyse-board {
  flex: 0 0 auto;
  background: var(--bag-white);
  border-bottom: 1px solid var(--bag-grau-line);
  padding: 8px 16px 10px 16px;
  transition: padding var(--t);
}
.ab-kopf {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  margin-left: 130px;  /* Platz neben State-Badge */
}
.ab-kopf .ab-titel {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--bag-grau-mid);
}
.ab-toggle {
  margin-left: auto; font-family: var(--font);
  font-size: 11px; font-weight: 600; color: var(--bag-grau-mid);
  border: 1px solid var(--bag-grau-line); border-radius: 999px;
  padding: 3px 12px; background: var(--bag-white); cursor: pointer;
  transition: all var(--t);
}
.ab-toggle:hover { border-color: var(--bag-dark); color: var(--bag-dark); }
.analyse-board.collapsed .ab-body { display: none; }
.analyse-board.collapsed { padding-bottom: 6px; }

.ab-body { display: flex; flex-direction: column; gap: 8px; }
.ab-zeile { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ab-zeile .ab-lab {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--bag-grau-mid);
  flex: 0 0 auto; min-width: 78px;
}

/* Darstellungs-Optionen (Chips) */
.darstellung-chip {
  padding: 5px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--bag-grau-line); background: var(--bag-light);
  font-size: 11.5px; font-weight: 600; color: var(--bag-grau-mid);
  cursor: pointer; transition: all var(--t); font-family: var(--font);
}
.darstellung-chip:hover:not(.active) { border-color: var(--akzent); color: var(--bag-dark); }
.darstellung-chip.active { background: var(--akzent-20); border-color: var(--akzent); color: var(--bag-dark); }

/* G1–G6-Gruppierungsleiste (Tab-/Chip-Reihe) */
.g-leiste { display: flex; gap: 4px; flex-wrap: wrap; }
.g-tab {
  display: flex; flex-direction: column; align-items: center;
  padding: 5px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--bag-grau-line); background: var(--bag-white);
  cursor: pointer; transition: all var(--t); font-family: var(--font);
  min-width: 64px;
}
.g-tab:hover:not(.active) { border-color: var(--akzent); }
.g-tab .g-code { font-size: 11px; font-weight: 800; color: var(--bag-dark); }
.g-tab .g-name { font-size: 9px; font-weight: 600; color: var(--bag-grau-mid); letter-spacing: 0.02em; }
.g-tab.active { background: var(--akzent-20); border-color: var(--akzent); }
.g-tab.active .g-name { color: var(--bag-dark); }

/* P6-Stufe-2-Box (nur im Vergleich-Zustand sichtbar) */
.p6-box {
  display: none;
  margin-top: 4px; padding: 9px 11px;
  background: var(--akzent-05);
  border: 1px dashed var(--akzent); border-radius: var(--radius-sm);
}
.app[data-vergleich="mit"] .p6-box { display: block; }
.p6-box .p6-titel {
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--bag-dark); margin-bottom: 7px;
}
.p6-row { display: flex; gap: 8px; flex-wrap: wrap; }
.p6-row .ctl { flex: 1; min-width: 130px; background: var(--bag-white); }

/* =====================================================================
   6. KARTE + PANEL-MOUNT  (Layer 4)
   ===================================================================== */
.karten-bereich {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  min-height: 0; overflow: hidden;
}

/* Karte (Platzhalter, fährt 62%→20% via akToggle) */
.ak-map {
  flex: 0 0 62%;
  background: linear-gradient(160deg, #e8eef0 0%, #dde7ea 100%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 2px solid var(--bag-grau-line);
  transition: flex var(--t);
  overflow: hidden; min-height: 0;
}
body.hochkontrast .ak-map { background: var(--bag-white); }
.ak-map .map-pin { position: absolute; top: 30%; left: 50%; transform: translate(-50%,-50%); font-size: 22px; }
.ak-map .map-kreis {
  position: absolute; top: 42%; left: 50%; transform: translate(-50%,-50%);
  width: 92px; height: 78px;
  background: rgba(232,132,74,0.22); border: 2px solid var(--mein-kreis);
  border-radius: 42% 52% 46% 56%;
}
.ak-map .map-stub {
  position: relative; z-index: 1;
  color: var(--bag-grau-mid); font-size: 12px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 600; text-align: center;
}

/* Panel-Mount — hier injiziert W-KARTEN das Fragment; hier liegen die 2 Platzhalter */
.ak-panels {
  flex: 1; display: flex; flex-direction: column;
  overflow-y: auto; background: var(--bag-light);
}

/* =====================================================================
   7. PANEL-KONTRAKT  (verbindlich — identisch zu W-KARTENs Fragment)
   ===================================================================== */
.ak-panel {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--bag-grau-line);
  background: var(--bag-white); flex: 0 0 auto;
}
.ak-panel.open { flex: 1 1 auto; min-height: 0; }

/* Tab-Header (44px) */
.ak-tab {
  height: 44px; display: flex; align-items: center; gap: 12px;
  padding: 0 18px; cursor: pointer; user-select: none;
  background: var(--bag-white); transition: background var(--t); flex: 0 0 auto;
}
.ak-tab:hover { background: var(--akzent-05); }
.ak-panel.open .ak-tab { background: var(--bag-dark); color: var(--bag-white); }
.ak-arrow {
  flex: 0 0 auto; font-size: 11px; color: var(--bag-grau-mid);
  transition: transform var(--t), color var(--t); display: inline-block;
}
.ak-panel.open .ak-arrow { transform: rotate(90deg); color: var(--akzent); }
.ak-title {
  flex: 1; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ak-type-badge {
  flex: 0 0 auto; font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--bag-grau-mid);
  background: var(--bag-light); border: 1px solid var(--bag-grau-line);
  border-radius: 3px; padding: 3px 8px;
}
.ak-panel.open .ak-type-badge {
  background: rgba(255,255,255,0.14); border-color: transparent; color: rgba(255,255,255,0.75);
}
/* optionaler G-Gruppen-Chip (W-KARTEN nutzt .ak-gruppe) */
.ak-gruppe {
  flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  color: var(--bag-dark); background: var(--akzent-20); border-radius: 3px; padding: 3px 8px;
}
.ak-panel.open .ak-gruppe { background: var(--akzent); color: var(--bag-dark); }
.ak-support {
  flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--bag-grau-mid); border: 1px solid var(--bag-grau-line);
  border-radius: 3px; padding: 4px 10px; cursor: pointer; transition: all var(--t);
}
.ak-support:hover { border-color: var(--akzent); color: var(--bag-dark); background: var(--akzent-10); }
.ak-panel.open .ak-support { border-color: rgba(255,255,255,0.4); color: rgba(255,255,255,0.85); }
.ak-panel.open .ak-support:hover { background: rgba(255,255,255,0.14); color: var(--bag-white); }

/* Panel-Body (Vierklang) — Grafik groß, drei Spuren rechts/unten */
.ak-body {
  display: none; flex: 1; min-height: 0;
  border-top: 1px solid var(--bag-grau-line);
  grid-template-columns: 1fr 290px;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "grafik stat"
    "funk   kitext";
  gap: 1px; background-color: var(--bag-grau-line);
}
.ak-panel.open .ak-body { display: grid; }
.ak-grafik {
  grid-area: grafik; background: var(--bag-white); padding: 18px 22px;
  display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: auto;
}
.ak-grafik .graf-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--bag-dark); flex: 0 0 auto;
}
.ak-grafik .graf-plot { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 9px; min-height: 100px; }
.ak-stat {
  grid-area: stat; background: var(--bag-light); padding: 11px 18px;
  display: flex; flex-direction: column; gap: 3px; overflow: auto;
}
.ak-stat .stat-titel {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--bag-dark); margin-bottom: 4px;
}
.ak-stat .stat-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 6px 0; border-bottom: 1px solid var(--bag-grau-line); font-size: 13px;
}
.ak-stat .stat-row:last-child { border-bottom: none; }
.ak-stat .stat-key { color: var(--bag-grau-mid); }
.ak-stat .stat-val { font-weight: 600; color: var(--bag-dark); }
.ak-stat .stat-val.mein { color: var(--mein-kreis); }
.ak-kitext {
  grid-area: kitext; background: var(--bag-white); padding: 14px 18px;
  font-size: 12.5px; line-height: 1.6; color: var(--bag-dark);
  overflow: auto; border-left: 3px solid var(--akzent);
}
.ak-kitext .kitext-tag {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--bag-grau-mid); margin-bottom: 5px;
}
.ak-kitext .kitext-lese {
  margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--bag-grau-line);
  font-size: 11.5px; color: var(--bag-grau-mid); font-style: italic;
}
.ak-funktionsleiste {
  grid-area: funk; background: var(--bag-light); padding: 12px 18px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
.ak-funktionsleiste .funk-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--bag-grau-mid);
}
.ak-funktionsleiste .funk-select {
  font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--bag-dark);
  background: var(--bag-white); border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm); padding: 6px 10px; cursor: pointer;
}
.ak-funktionsleiste .funk-btn {
  font-family: var(--font); font-size: 11px; font-weight: 600; color: var(--bag-dark);
  background: var(--bag-white); border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm); padding: 6px 11px; cursor: pointer; transition: all var(--t);
}
.ak-funktionsleiste .funk-btn:hover { border-color: var(--bag-dark); }
.ak-funktionsleiste .funk-sep { width: 1px; align-self: stretch; background: var(--bag-grau-line); margin: 2px; }
.ak-funktionsleiste .funk-quad {
  display: inline-flex; border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm); overflow: hidden;
}
.ak-funktionsleiste .funk-quad span {
  font-size: 11px; font-weight: 600; color: var(--bag-grau-mid);
  background: var(--bag-white); padding: 6px 11px; cursor: pointer; transition: all var(--t);
}
.ak-funktionsleiste .funk-quad span.on { background: var(--akzent-20); color: var(--bag-dark); }
.ak-funktionsleiste .funk-quad span:hover:not(.on) { background: var(--akzent-05); }

/* gemeinsame Grafik-Bausteine für die Platzhalter-Panels */
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-name { font-size: 11px; color: var(--bag-grau-mid); width: 92px; flex: 0 0 auto; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; height: 18px; background: var(--bag-light); border: 1px solid var(--bag-grau-line); border-radius: 3px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--akzent); border-radius: 2px 0 0 2px; }
.bar-fill.mein { background: var(--mein-kreis); }
.bar-val { font-size: 11px; font-weight: 600; color: var(--bag-dark); width: 46px; flex: 0 0 auto; }

/* =====================================================================
   8. KANTEN-TABS (rechte Kante = Modus stat↔dyn · untere = Vergleich)
      beide identisch 80px (Spec)
   ===================================================================== */
.tab-right {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 28px; height: var(--tab-size);
  background: var(--bag-dark);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 6px 0 0 6px; z-index: 28;
  transition: background var(--t), width var(--t);
  box-shadow: -2px 0 8px rgba(35,31,32,0.15);
}
.tab-right:hover { width: 36px; }
.tab-right span {
  writing-mode: vertical-rl; text-orientation: mixed; transform: rotate(180deg);
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--bag-white); white-space: nowrap;
}
.tab-right .tab-pfeil { color: var(--akzent); }

.tab-bottom {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  height: 28px; width: var(--tab-size);
  background: var(--bag-dark);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border-radius: 6px 6px 0 0; z-index: 28;
  transition: background var(--t), height var(--t);
  box-shadow: 0 -2px 8px rgba(35,31,32,0.15);
}
.tab-bottom:hover { height: 36px; }
.tab-bottom span {
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--bag-white); white-space: nowrap;
}
.tab-bottom .tab-pfeil { color: var(--akzent); }

/* =====================================================================
   9. DRAWER / RAND-NAVIGATION (P5b) — Nachbar-Wechsel an Bildschirmkanten
      2 Nachbarn je Quadrant, KEIN Diagonal-Sprung.
   ===================================================================== */
/* Unsichtbare Hot-Zones an unterer + rechter Kante */
.drawer-hot {
  position: fixed; z-index: 40; background: transparent;
}
.drawer-hot.bottom { left: 0; right: 0; bottom: 0; height: 18px; }
.drawer-hot.right  { top: 0; bottom: 0; right: 0; width: 18px; }

/* Der ausziehbare Reiter (erscheint bei Maus an der Kante) */
.drawer {
  position: fixed; z-index: 41;
  background: var(--bag-white);
  border: 1px solid var(--akzent);
  box-shadow: var(--shadow-lift);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-size: 11px; font-weight: 600; color: var(--bag-dark);
  cursor: pointer;
  transition: transform var(--t), opacity var(--t);
  opacity: 0; pointer-events: none;
}
.drawer .drawer-kopf {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--bag-grau-mid);
}
.drawer .drawer-ziel { color: var(--akzent); font-weight: 800; }
.drawer.bottom {
  left: 50%; bottom: 0; transform: translate(-50%, 100%);
  border-radius: 8px 8px 0 0; border-bottom: none;
  flex-direction: column; text-align: center;
}
.drawer.right {
  right: 0; top: 50%; transform: translate(100%, -50%);
  border-radius: 8px 0 0 8px; border-right: none;
  flex-direction: column; text-align: center;
}
.drawer.bottom.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.drawer.right.show  { transform: translate(0, -50%);  opacity: 1; pointer-events: auto; }
.drawer.show:hover { background: var(--akzent-05); }

/* =====================================================================
   10. SUPPORT-OVERLAY (global, fixed unten rechts) — akSupport()
   ===================================================================== */
.ak-support-box {
  display: none; position: fixed; bottom: 24px; right: 24px; width: 280px;
  background: var(--bag-dark); color: var(--bag-white);
  border-radius: var(--radius); padding: 20px 22px 22px;
  font-size: 12.5px; line-height: 1.65; box-shadow: var(--shadow-lift); z-index: 200;
}
.ak-support-box.visible { display: block; }
.ak-support-box h4 { font-size: 13px; font-weight: 700; color: var(--bag-white); margin-bottom: 8px; }
.ak-support-box p { color: rgba(255,255,255,0.82); }
.ak-support-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  color: rgba(255,255,255,0.5); font-size: 18px; cursor: pointer; line-height: 1;
}
.ak-support-close:hover { color: var(--bag-white); }

/* =====================================================================
   11. RESPONSIV (grob — Pareto)
   ===================================================================== */
@media (max-width: 1100px) {
  .sb-reihe { grid-template-columns: 1fr 1fr 1fr; }
  .ab-kopf { margin-left: 130px; }
}
@media (max-width: 720px) {
  .sb-reihe { grid-template-columns: 1fr 1fr; }
  .ak-body { grid-template-columns: 1fr; grid-template-areas: "grafik" "stat" "kitext" "funk"; }
}

/* =====================================================================
   === aus analysekarten.html portiert ===
   Innen-Inhalts-Regeln für das injizierte 6-Karten-Fragment (G1–G6).
   Die Kontrakt-Klassen (.ak-grafik/.ak-stat/.ak-kitext/.ak-funktionsleiste/
   .ak-tab/.ak-body/.ak-support/.ak-type-badge) UND die Balken-Klassen
   (.bar-row/.bar-name/.bar-track/.bar-fill/.bar-val) sind oben bereits
   definiert — hier NUR die zusätzlichen, in der Shell bisher fehlenden
   Grafik-Bausteine: SVG-Linie (line-wrap), Heatmap (heat-*), KPI (kpi-*),
   damit G3/G4/G6 im Shell genauso rendern wie standalone.
   ===================================================================== */

/* SVG-Linie (G3 Entwicklung) */
.line-wrap { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.line-wrap svg { width: 100%; height: 100%; max-height: 220px; }

/* Heatmap (G4 Muster · CSS-Grid) */
.heat-grid { display: grid; gap: 3px; }
.heat-head, .heat-rowname { font-size: 10px; font-weight: 600; color: var(--bag-grau-mid); display: flex; align-items: center; }
.heat-rowname { justify-content: flex-end; padding-right: 6px; white-space: nowrap; }
.heat-cell {
  aspect-ratio: 1.8 / 1;
  min-height: 22px;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  color: var(--bag-dark);
}
.heat-cell.mein-col { outline: 2px solid var(--mein-kreis); outline-offset: -2px; }

/* KPI-Boxen (G6 Mitnehmen) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.kpi-box { background: var(--bag-light); border: 1px solid var(--bag-grau-line); border-radius: var(--radius-sm); padding: 12px 14px; }
.kpi-num { font-size: 22px; font-weight: 800; color: var(--bag-dark); line-height: 1.1; }
.kpi-num.mein { color: var(--mein-kreis); }
.kpi-cap { font-size: 11px; color: var(--bag-grau-mid); margin-top: 2px; }

/* ---- BLOCK 2: inline <style> from app.html v4.0 (loaded after app.css -> wins per order) ---- */
/* =====================================================================
   v3.7-app inline overrides - bringt Mockup-Look über das Legacy-app.css.
   Reihenfolge: app.css zuerst, dann diese Datei (gewinnt per Spezifität
   / Reihenfolge). Tokens 1:1 aus app_v36_mockup.html.
   ===================================================================== */
:root {
  --bag-gelb:    #ffff01;
  --bag-magenta: #ff07fc;
  --bag-cyan:    #04ffff;
  --bag-dark:    #231f20;
  --bag-light:   #f1f1f1;
  --bag-white:   #ffffff;

  --bag-cyan-50: #82ffff;
  --bag-cyan-20: #cdffff;
  --bag-cyan-10: #e6ffff;
  --bag-cyan-05: #f2ffff;

  --bag-gelb-50: #ffff80;
  --bag-gelb-20: #ffffcc;

  --bag-grau-mid:  #6b6668;
  --bag-grau-line: #d9d7d8;

  --akzent:    var(--bag-cyan);
  --akzent-50: var(--bag-cyan-50);
  --akzent-20: var(--bag-cyan-20);
  --akzent-10: var(--bag-cyan-10);
  --akzent-05: var(--bag-cyan-05);

  --mein-kreis: #e8844a;

  --radius:    10px;
  --radius-sm: 6px;
  --gap:       16px;

  --font: "Fira Sans", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;

  --shadow-card: 0 1px 3px rgba(35, 31, 32, 0.08);
  --shadow-lift: 0 4px 14px rgba(35, 31, 32, 0.12);

  --c-seite-bg:   var(--bag-light);
  --c-flaeche-bg: var(--bag-white);
  --c-text:       var(--bag-dark);
  --c-text-mid:   var(--bag-grau-mid);
  --c-line:       var(--bag-grau-line);
  --c-feld-bg:    var(--bag-light);
}
body.hochkontrast {
  --c-seite-bg:   #ffffff;
  --c-flaeche-bg: #ffffff;
  --c-text:       #000000;
  --c-text-mid:   #000000;
  --c-line:       #000000;
  --c-feld-bg:    #ffffff;
  --bag-grau-mid: #000000;
  --shadow-card:  none;
  --shadow-lift:  none;
}

*, *::before, *::after { box-sizing: border-box; }
html, body.v37 {
  margin: 0; padding: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--c-text);
  background: var(--c-seite-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* --- Branding-Leiste oben (Gelb) - identisch zu Mockup/Landing ----- */
.landing-bar {
  background: var(--bag-gelb);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-box {
  display: flex; align-items: center; justify-content: center;
  width: 116px; height: 40px;
  border: 1.5px dashed var(--bag-dark);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--bag-dark);
  font-size: 12px; font-weight: 600;
  text-align: center; letter-spacing: 0.02em;
  flex: 0 0 auto; line-height: 1.2;
}
.bar-claim { color: var(--bag-dark); font-weight: 600; font-size: 14px; }
.bar-version {
  color: var(--bag-dark);
  font-size: 12px; font-weight: 600;
  opacity: 0.7; letter-spacing: 0.03em;
}
.bar-tools {
  margin-left: auto;
  display: flex;
  gap: 6px;
  align-items: center;
}
.mini-btn {
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.25);
  color: #1a1a1a;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;   /* vorher 0.9rem ≈ 9px — Hochkontrast vergrößert + einheitlich (Norbert 2026-06-21) */
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.2;
}
.mini-btn.is-on {
  background: #1a1a1a;
  color: #ffd700;
  border-color: #1a1a1a;
}
.mini-btn:hover { filter: brightness(0.95); }
.tool-btn {
  width: 30px; height: 30px;
  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.25);
  color: #1a1a1a;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.tool-btn:hover { filter: brightness(0.95); }
.tool-sep {
  width: 1px; height: 22px;
  background: rgba(0,0,0,0.25);
  margin: 0 4px;
}

/* --- Schwarze Navi-Leiste mit Zurück-Button + Stand-Pill ---------- */
.nav-bar {
  background: var(--bag-dark);
  color: var(--bag-white);
  padding: 9px 14px;   /* eingerückt, Buttons in Flucht (Norbert 2026-06-22) */
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-bar .nav-label {
  color: var(--bag-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}
.btn-back {
  background: transparent;
  color: var(--bag-cyan);
  border: 1px solid var(--bag-cyan);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-back:hover { background: var(--bag-cyan); color: var(--bag-dark); }
.stand-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bag-gelb-20);
  border: 1px solid var(--bag-gelb);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--bag-dark);
  white-space: nowrap;
  line-height: 1.2;
  margin-left: auto;
}
.stand-pill-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-mid);
  margin-right: 6px;
}

/* =====================================================================
   APP-SHELL Layout
   ===================================================================== */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 100px);
  background: var(--c-seite-bg);
}

/* --- BOARD 1: STEUERBOARD oben (einklappbar) ----------------------- */
.steuerboard-v37 {
  /* Äußerer Rahmen entfernt — die drei SB-Karten schweben direkt im Raster
     (Norbert 2026-06-21). Container nur noch als unsichtbare Hülle. */
  background: transparent;
  border-bottom: none;
  box-shadow: none;
}
.board-kopf {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 24px;
  background: var(--bag-cyan-05);
  border-bottom: 1px solid var(--bag-cyan-20);
}
.board-titel {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bag-dark);
}
.board-sub {
  font-size: 11px;
  color: var(--c-text-mid);
  font-style: italic;
}
.board-toggle {
  margin-left: 6px;   /* naeher an den Namen */
  white-space: nowrap;
  background: var(--c-flaeche-bg);
  border: 1px solid var(--c-line);
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  font-family: inherit;
}
.board-toggle:hover { background: var(--bag-cyan-10); }

.sb-reihe-v37 {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1.2fr;   /* 1:2:1 — SB2 dominant, SB1/SB3 mit etwas Luft (Norbert 2026-06-21) */
  gap: 14px;
  padding: 0;   /* Steuerboard-Rahmen entfernt → SB-Karten bündig auf 15px (Norbert 2026-06-21) */
}
.steuerboard-v37.is-collapsed .sb-reihe-v37 { display: none; }

.sb-block {
  background: var(--kachel-ton);   /* gleicher Ton wie die Analysekarten-Kacheln (Norbert 2026-06-21) */
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.hochkontrast .sb-block { background: #fff; }
.sb-block-kopf {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bag-dark);   /* hervorgehoben (vorher c-text-mid grau) — Norbert 2026-06-21 */
  margin-bottom: 4px;
}
.sb-block-nr {
  background: var(--bag-dark);
  color: var(--bag-cyan);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 800;
}
.sb-ctl {
  background: var(--c-flaeche-bg);
  border: 1px solid var(--c-line);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--c-text);
  cursor: pointer;
}
.sb-ctl:hover { border-color: var(--akzent); }
.sb-ctl-label {
  font-size: 10px;
  color: var(--c-text-mid);
  font-weight: 600;
}

/* Quadranten-Mini-Grid */
.sb-quadrant-mini {
  display: grid;
  flex: 1;   /* SB-II: Quadranten fuellen den Block bis Unterkante SB-I/SB-III */
  grid-template-columns: 88px 1fr 1fr;   /* D4: breitere Zeilen-Beschriftung */
  grid-template-rows: 22px 1fr 1fr;
  gap: 4px;
  margin-top: 4px;
}
.sb-q-colhead {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-mid);
  text-align: center;
}
.sb-q-rowhead {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-mid);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}
.sb-q-zelle {
  background: var(--c-flaeche-bg);
  border: 1px solid var(--c-line);
  border-radius: 4px;
  padding: 10px 6px;
  min-height: 42px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
  cursor: pointer;
  opacity: 0.6;
}
.sb-q-zelle.is-active {
  background: var(--akzent-05);
  border-color: var(--akzent);
  color: var(--bag-dark);
  opacity: 1;
  font-weight: 700;
}
.sb-q-zelle:hover { border-color: var(--akzent); opacity: 1; }

.gpill-row { display: flex; gap: 3px; flex-wrap: wrap; }
.gpill {
  padding: 3px 8px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-flaeche-bg);
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
}
.gpill.is-active {
  background: var(--bag-dark);
  color: var(--bag-white);
  border-color: var(--bag-dark);
}
.kpill-row { display: flex; gap: 3px; flex-wrap: wrap; }
.kpill {
  padding: 3px 7px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-flaeche-bg);
  font-size: 10px;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
}
.kpill.is-active {
  background: var(--bag-dark);
  color: var(--bag-white);
  border-color: var(--bag-dark);
}

/* --- Hauptbereich: Analyseboard entfällt → Hauptflaeche im VOLLFELD - */
.haupt-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
}

/* --- BOARD 2: ANALYSEBOARD links (einklappbar) --------------------- */
.analyse-board-v37 {
  background: var(--c-flaeche-bg);
  border-right: 1px solid var(--c-line);
  display: flex;
  flex-direction: column;
}
.ab-kopf {
  display: flex;
  margin-left: 0 !important;
  align-self: flex-start;
  width: 100%;
  box-sizing: border-box;   /* volle Spaltenbreite, Titel links auf x=24 */
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 24px;   /* Titel links auf Steuerboard-Linie (24px) */
  background: var(--bag-cyan-05);
  border-bottom: 1px solid var(--bag-cyan-20);
}
.ab-titel-v37 {
  white-space: nowrap;   /* D2: Titel 1-zeilig + kompakt, damit Toggle daneben passt */
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;   /* zurueck auf Steuerboard-Titel-Schrift */
  text-transform: uppercase;
  color: var(--bag-dark);
}
.ab-toggle-v37 {
  margin-left: 6px;   /* naeher an den Namen */
  white-space: nowrap;
  background: var(--c-flaeche-bg);
  border: 1px solid var(--c-line);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.ab-liste {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px 12px 24px;   /* Kacheln links auf Steuerboard-Linie (24px) */
  overflow-y: auto;
}
.ak-karte-v37 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 11px;
  background: var(--c-feld-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--c-text);
  position: relative;
}
.ak-karte-v37:hover { border-color: var(--akzent); background: var(--bag-cyan-05); }
.ak-karte-v37.is-active {
  border-color: var(--akzent);
  background: var(--akzent-05);
  box-shadow: var(--shadow-lift);
}
.ak-icon {
  width: 26px; height: 26px;
  background: var(--bag-dark);
  color: var(--bag-cyan);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}
.ak-karte-v37.is-active .ak-icon {
  background: var(--bag-cyan);
  color: var(--bag-dark);
}
.ak-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ak-meta-titel {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.25;
}
.ak-meta-frage {
  font-size: 10px;
  color: var(--c-text-mid);
  line-height: 1.3;
}
.ak-meta-typ {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--akzent);
  margin-top: 2px;
}

/* Eingeklappt: nur Icons */
.haupt-wrap.analyse-collapsed .ab-kopf {
  flex-direction: column;
  padding: 8px 6px;
  gap: 6px;
}
.haupt-wrap.analyse-collapsed .ab-titel-v37 { display: none; }
.haupt-wrap.analyse-collapsed .ab-toggle-v37 { margin: 0; }
.haupt-wrap.analyse-collapsed .ab-liste { padding: 8px 4px; }
.haupt-wrap.analyse-collapsed .ak-karte-v37 { padding: 6px; justify-content: center; }
.haupt-wrap.analyse-collapsed .ak-meta { display: none; }

/* --- HAUPTFLAECHE: Aktive Analysekarte im Vollbild ----------------- */
.hauptflaeche {
  padding: 8px 0;
  overflow-y: auto;
  background: var(--c-seite-bg);
}
.hf-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.hf-gruppe-badge {
  background: var(--bag-dark);
  color: var(--bag-cyan);
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.hf-titel {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-text);
  margin: 0;
}
.hf-type-badge {
  background: var(--akzent-20);
  color: var(--bag-dark);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.hf-support {
  margin-left: auto;
  background: var(--bag-magenta);
  color: var(--bag-white);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  border: none;
  font-family: inherit;
}
.hf-karte {
  background: var(--c-flaeche-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 20px 16px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 16px;
}
.hf-grafik {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.hf-grafik-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-mid);
}
.hf-grafik-plot {
  background: var(--c-feld-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 14px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
}

/* Balken */
.bar-row-v37 { display: grid; grid-template-columns: 130px 1fr 60px; gap: 8px; align-items: center; }
.bar-name-v37 { font-size: 12px; color: var(--c-text); }
.bar-track-v37 { background: var(--bag-light); height: 16px; border-radius: 3px; overflow: hidden; }
.bar-fill-v37 { background: var(--akzent); height: 100%; }
.bar-fill-v37.mein { background: var(--mein-kreis); }
.bar-val-v37 { font-size: 12px; font-weight: 700; text-align: right; color: var(--c-text); font-variant-numeric: tabular-nums; }

/* Stat-Box */
.hf-stat {
  background: var(--c-feld-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: fit-content;
}
.stat-titel {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-mid);
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--c-line);
  padding-bottom: 4px;
}
.stat-row { display: flex; justify-content: space-between; font-size: 12px; }
.stat-key { color: var(--c-text-mid); }
.stat-val { font-weight: 700; color: var(--c-text); font-variant-numeric: tabular-nums; }
.stat-val.mein { color: var(--mein-kreis); }

/* KI-Einschätzung */
.hf-kitext {
  grid-column: 1 / -1;
  background: var(--bag-cyan-05);
  border-left: 3px solid var(--akzent);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--c-text);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.kitext-tag {
  display: inline-block;
  background: var(--bag-dark);
  color: var(--bag-cyan);
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-right: 7px;
}
.kitext-lese {
  font-size: 11px;
  color: var(--c-text-mid);
  font-style: italic;
  margin-top: 5px;
}

/* Funktionsleiste */
.hf-funk {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--c-line);
  flex-wrap: wrap;
}
.funk-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-mid);
}
.funk-select-v37, .funk-btn-v37 {
  background: var(--c-flaeche-bg);
  border: 1px solid var(--c-line);
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 11px;
  font-family: inherit;
  color: var(--c-text);
  cursor: pointer;
  font-weight: 600;
}
.funk-btn-v37:hover { background: var(--bag-cyan-05); }
.funk-sep-v37 { width: 1px; height: 16px; background: var(--c-line); margin: 0 3px; }
.funk-readout {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text);
  padding: 4px 9px;
  background: var(--bag-cyan-05);
  border: 1px dashed var(--akzent);
  border-radius: 4px;
}
.funk-readout em { color: var(--c-text-mid); font-style: italic; font-weight: 500; }

/* Footer */
.landing-footer {
  padding: 14px 24px;
  background: var(--c-seite-bg);
  border-top: 1px solid var(--c-line);
  color: var(--c-text-mid);
  font-size: 12px;
  text-align: center;
}

/* Responsiv */
@media (max-width: 768px) {
  .sb-reihe-v37 { grid-template-columns: 1fr 1fr; }
  .haupt-wrap { grid-template-columns: 1fr; }
  .analyse-board-v37 { border-right: none; border-bottom: 1px solid var(--c-line); max-height: 220px; }
  .hf-karte { grid-template-columns: 1fr; }
  .landing-bar { flex-wrap: wrap; }
  .bar-tools { margin-left: 0; flex-wrap: wrap; }
  .nav-bar { flex-wrap: wrap; gap: 8px; }
  .stand-pill { margin-left: 0; }
}
/* =====================================================================
   v3.9-fix SCROLL (2026-06-07, NOUS-E1): Sperre gelöst.
   "Alles auf einer Seite ohne Scroll" = KANN-Norm — gilt nur, wenn es
   technisch passt. Steuerboard + Analysekarte passen aktuell nicht
   zusammen auf einen Schirm -> ganze Seite scrollt normal.
   ===================================================================== */
html, body.v37 { height: auto !important; min-height: 100vh; overflow-y: auto !important; }
.app-shell, .haupt-wrap, .hauptflaeche { height: auto !important; overflow: visible !important; }
