/* =====================================================================
   styles_v12.css — ADDITIVE v1.2-Klassen (Team B)
   ---------------------------------------------------------------------
   Erbt alle Marken-Variablen + Basis-Optik aus styles_base.css (v4.0).
   Hier NUR die strukturellen v1.2-Neuerungen:
     - .sb-matrix-2x3   (SB2: 2×3 statt 2×2-Quadrant)
     - .ab-karte        (Analyseboard: 6 AK-Kacheln)
     - .ak-card / .ak-swap-grid / .ak-einfach-grid (gerenderte Karte)
     - .vgl-board       (inline-Vergleichsboard)
   Plus: Shiny-selectInput in den SB-Blöcken auf BAG-Look trimmen.
   ===================================================================== */

/* --- Shiny-selectInput auf BAG-Controls (SB-Blöcke) --- */
.sb-block .form-group { margin-bottom: 8px; }
.sb-block .control-label { display: none; }
.sb-block select.form-control,
.sb-block .selectize-input {
  height: 32px !important;
  min-height: 32px !important;
  background: var(--bag-light) !important;
  border: 1px solid var(--bag-grau-line) !important;
  border-radius: var(--radius-sm, 6px) !important;
  color: var(--bag-dark) !important;
  font-size: 12px !important;
  font-family: var(--font) !important;
  padding: 4px 9px !important;
  box-shadow: none !important;
}
.sb-block select.form-control:focus,
.sb-block .selectize-input.focus {
  border-color: var(--akzent) !important;
  box-shadow: 0 0 0 2px var(--akzent-20) !important;
}
.sb-ctl-label {
  display: block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--bag-grau-mid); text-transform: uppercase;
  margin: 6px 0 3px;
}

/* --- SB2: 2×3-Navigations-Matrix --- */
.sb-matrix-2x3 {
  display: grid;
  grid-template-columns: 72px 1fr 1fr 1fr;
  grid-template-rows: 22px 1fr 1fr;
  gap: 4px;
  margin-top: 4px;
}
/* SB2: nur die Kopf-Beschriftung „SB2 Navigation" mittig (Norbert 2026-06-21) */
.sb-reihe-v37 > .sb-block:nth-child(2) .sb-block-kopf { justify-content: center; }
/* Alle SB-Köpfe (SB1/SB2/SB3) mittig in ihrer Kachel (Norbert 2026-06-22) */
.sb-reihe-v37 > .sb-block .sb-block-kopf { justify-content: center; }
.m23-corner {}
.m23-colhead {
  display: flex; align-items: center; justify-content: center;
  font-size: 8.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.02em; color: var(--bag-grau-mid);
  text-align: center; line-height: 1.1;
}
.m23-rowhead {
  writing-mode: vertical-rl; transform: rotate(180deg);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0; color: var(--bag-grau-mid);
  overflow: visible; white-space: nowrap;
}
.m23-zelle {
  border: 1px solid var(--bag-grau-line);
  border-radius: 4px;
  background: var(--bag-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--bag-dark);
  cursor: pointer; transition: all 0.18s ease;
  min-height: 30px;
}
.m23-zelle:hover:not(.is-active) {
  border-color: var(--akzent); background: var(--akzent-05);
}
.m23-zelle.is-active {
  background: var(--akzent-20); border-color: var(--akzent);
  box-shadow: inset 0 0 0 1px var(--akzent);
}

/* SB2 — Band-Layout: Querschnitt/Zeitreihe als lesbare Bänder, Klartext-Kacheln
   (keine gedrehte Achse, keine E-Codes mehr). Norbert 2026-06-21. */
.sb2-bands { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
/* Jedes Band als eigene Kachel-Box (Norbert 2026-06-21) */
.sb2-band {
  background: var(--bag-white); border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm, 6px); padding: 7px 9px;
}
.sb2-band-kopf { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.sb2-band-ico { display: inline-flex; align-items: center; color: var(--bag-grau-mid); }
.sb2-band-titel { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bag-dark); }
/* Band-Titel jetzt in der oberen Grid-Reihe (Spalte 1) — auf Höhe der „Vergleiche"-Klammer (Norbert 2026-06-21) */
.sb2-zellen .sb2-band-titel {
  grid-column: 1; grid-row: 1; margin: 0;
  display: inline-flex; align-items: center; gap: 5px; align-self: center;
}
/* Farb-Absetzung je Band (Platzhalter — Querschnitt/Zeitreihe tragen je eine Farbe) */
.sb2-band--qs { border-left: 3px solid #2a9d8f; }
.sb2-band--zr { border-left: 3px solid #e76f51; }
.sb2-band--qs .sb2-band-ico { color: #2a9d8f; }
.sb2-band--zr .sb2-band-ico { color: #e76f51; }
.sb2-band-sub { font-size: 9px; color: var(--bag-grau-mid); letter-spacing: 0.02em; }
.sb2-zellen {
  display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto auto;
  gap: 4px 6px; align-items: stretch;
}
/* „Vergleiche"-Klammer über den beiden rechten Kacheln (Räumlich/Thematisch) */
.sb2-vergleich-label {
  grid-column: 2 / 4; grid-row: 1;
  display: flex; align-items: center; gap: 6px;
  font-size: 8px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bag-grau-mid);
}
.sb2-vergleich-label::before, .sb2-vergleich-label::after {
  content: ""; flex: 1; height: 1px; background: var(--bag-grau-line);
}
/* Kacheln: Icon über Text, in Zeile 2 platziert (Mein Kreis steht allein in Spalte 1) */
.sb2-zellen .m23-zelle {
  grid-row: 2; flex-direction: column; gap: 2px;
  min-height: 44px; padding: 5px 6px; line-height: 1.1; text-align: center;
}
.sb2-zellen .m23-zelle:nth-of-type(1) { grid-column: 1; }
.sb2-zellen .m23-zelle:nth-of-type(2) { grid-column: 2; }
.sb2-zellen .m23-zelle:nth-of-type(3) { grid-column: 3; }
.sb2-zellen .m23-zelle:not(.is-active) { background: var(--bag-white); }
.sb2-zellen .zelle-ico { display: inline-flex; color: var(--bag-grau-mid); }
.sb2-zellen .m23-zelle.is-active .zelle-ico { color: var(--akzent); }
.sb2-zellen .zelle-txt { font-size: 10.5px; font-weight: 600; }

/* --- Analyseboard: 6 AK-Kacheln (vertikale Liste) --- */
.ab-liste { display: flex; flex-direction: column; gap: 7px; }
.ab-karte {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm, 6px);
  background: var(--bag-white);
  cursor: pointer; transition: all 0.18s ease;
}
.ab-karte:hover:not(.is-active) { border-color: var(--akzent); }
.ab-karte.is-active {
  border-color: var(--akzent); background: var(--akzent-05);
  box-shadow: inset 0 0 0 1px var(--akzent);
}
.ab-karte-code {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--bag-dark); color: var(--bag-white);
  font-size: 13px; font-weight: 800;
}
.ab-karte.is-active .ab-karte-code { background: var(--akzent); color: var(--bag-dark); }
.ab-karte-text { min-width: 0; }
.ab-karte-titel {
  font-size: 12px; font-weight: 700; color: var(--bag-dark);
  line-height: 1.25;
}
.ab-karte-meta {
  font-size: 10px; color: var(--bag-grau-mid); margin-top: 2px;
}

/* --- Gerenderte Analysekarte (IB-Frame) --- */
.ak-card {
  background: var(--bag-white);
  border: none;   /* äußerer Rahmen raus — die 3 Kacheln rahmen selbst (Norbert 2026-06-21) */
  border-radius: var(--radius, 10px);
  margin: 8px 0; padding: 0 0 14px;
  display: flex; flex-direction: column;
  min-height: 0;
}
.ak-card-kopf {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 14px; border-bottom: 1px solid var(--bag-grau-line);   /* eingerückt, Buttons in Flucht (Norbert 2026-06-22) */
  background: var(--bag-dark); color: var(--bag-white);
  border-radius: var(--radius, 10px) var(--radius, 10px) 0 0;
}
.ak-card-titel { flex: 1; font-size: 14px; font-weight: 700; white-space: nowrap; }

/* Geschlechter-Toggle im KARTEN-KOPF (BEFUND 2): dunkler Grund → helle Schrift,
   eigener Abstand, nicht gestreckt. */
.ak-card-kopf .ak-geschlecht-toggle { margin: 0; flex: 0 0 auto; }
.ak-card-kopf .ak-geschlecht-toggle .gt-label { color: var(--bag-white); }
.ak-card-kopf .ak-geschlecht-toggle .gt-hint { display: none; }

/* E1/E4: 3-Zellen-Swap — Karte (gross) | Statistik (rechts oben, FIX) | Diagramm (klein, rechts unten).
   Swap tauscht Karte <-> Diagramm über grid-area; beide bleiben sichtbar, das Kleine ist klickbar. */
.ak-swap-grid {
  display: grid;
  grid-template-columns: 3.25fr 1.2fr;   /* Karte/Statistik-Grenze fluchtet zu SB2/SB3 (Norbert 2026-06-21) */
  grid-template-rows: auto 1fr;   /* Grafik (unten) füllt den Platz → keine Lücke (Norbert 2026-06-22) */
  grid-template-areas: "gross stat" "gross klein";
  gap: 12px; padding: 10px 0;
  align-items: stretch;
}
.swap-zelle { min-width: 0; min-height: 0; }
.swap-karte { grid-area: gross; display: flex; }
.swap-stat  { grid-area: stat; }
.swap-diag  { grid-area: klein; display: flex; flex-direction: column; }
.swap-karte, .swap-diag {
  border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm, 6px);
  background: var(--kachel-ton, #e8e5df);   /* zarter Ton statt Weiß — mehr Substanz (Norbert 2026-06-21) */
  overflow: hidden;
}
/* Statistik bekommt einen eigenen Rahmen (getrennt vom Balken) + gleichen Ton */
.swap-stat > .ak-stat {
  border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm, 6px);
  background: var(--kachel-ton, #e8e5df);
}
.swap-diag > .ak-grafik { background: var(--kachel-ton, #e8e5df); }
/* Hochkontrast: Kacheln wieder weiß (dort passt der Ton nicht) */
body.hochkontrast .swap-karte,
body.hochkontrast .swap-diag,
body.hochkontrast .swap-diag > .ak-grafik,
body.hochkontrast .swap-stat > .ak-stat { background: #fff; }
.swap-karte > * { flex: 1; width: 100%; min-height: 0; }
.swap-karte .ak-map, .swap-karte .km-iframe { height: 100%; min-height: 0; }
/* Balken-Kachel: gleicher 18px-Innenabstand wie die Statistik-Kachel →
   Labels links und Werte rechts fluchten zwischen beiden Kacheln. Norbert 2026-06-21. */
.swap-diag > .ak-grafik { flex: 1; min-height: 0; padding: 10px 18px; overflow: hidden; }
/* Balken (E1) typografisch wie die Statistik: Labels/Zahlen 13px, Labels linksbündig;
   Balken dicker („mehr aufziehen") + mehr Abstand. Norbert 2026-06-22. */
.swap-diag .bar-name { font-size: 13px; text-align: left; width: 104px; }
.swap-diag .bar-val  { font-size: 13px; }
.swap-diag .bar-track { height: 24px; }
.swap-diag .graf-plot { gap: 12px; }
/* „mein Kreis"-Zeile mild-gelb markieren = User-Eingabe (wie Linse/Landing). Norbert 2026-06-22. */
.bar-row.mein-row {
  background: #fdf6d8; border-radius: 5px;
  padding: 1px 6px; margin: 2px -6px;
}
/* Werte IM Balken (weiß, rechts im Fill). Norbert 2026-06-22. */
.bar-fill { display: flex; align-items: center; justify-content: flex-end; }
.bar-val-innen { color: #fff; font-size: 11px; font-weight: 700; padding-right: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* E6: Linien nebeneinander (facets) statt Overlay (§10.7). Norbert 2026-06-22. */
.facet-lines { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.facet-line  { flex: 1 1 220px; min-width: 200px; }
.facet-titel { font-size: 11px; font-weight: 700; color: var(--bag-dark); margin-bottom: 4px; }
/* Swap/Umschaltung ENTFERNT (Norbert 2026-06-22): Karte fix links, Grafik fix rechts.
   Karten-iframe bleibt interaktiv (für Zoom/Klick auf Kreis). */

/* Karten-Fuß schwarz; Datenbasis links (weiß), STAND rechts als gelbe Pille — Norbert 2026-06-21 */
.ak-card.ak-swap { padding-bottom: 0; }
.ak-fuss-gelb {
  display: grid;
  grid-template-columns: 3.25fr 1.2fr;   /* deckungsgleich mit .ak-swap-grid → Datenbasis unter Statistik */
  gap: 12px; align-items: center;
  margin: 8px 0 0; padding: 10px 14px;
  background: var(--bag-dark); color: var(--bag-white);
  border-radius: 0 0 var(--radius, 10px) var(--radius, 10px);
  font-size: 11px;
}
.ak-fuss-links { display: flex; align-items: center; justify-content: space-between; min-width: 0; }
/* Rechte Footer-Spalte: Datenbasis links bündig zur Statistik-Kachel, Download rechts */
.ak-fuss-rechts { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.ak-fuss-gelb .ak-kopf-dl { margin-left: 0; }   /* kein Auto-Margin im Footer — Download bleibt ganz links */

/* Footer-Akzent: hartes Gelb (wie Kopfleiste) statt Cyan; Hover invertiert (gelb gefüllt,
   Text dunkel) — gleiches Spiel wie oben mit Cyan. Norbert 2026-06-21. */
.ak-fuss-gelb .ak-chip-zu { border-color: var(--bag-gelb); color: var(--bag-gelb); }
.ak-fuss-gelb .ak-chip-zu:hover { background: var(--bag-gelb); color: var(--bag-dark); }
.ak-fuss-gelb .ak-chip-tag { background: var(--bag-gelb); color: var(--bag-dark); }
.ak-fuss-gelb .ak-kopf-dl {
  border-color: var(--bag-gelb); color: var(--bag-gelb);
  font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: normal;
  padding: 4px 12px;     /* gleiche Größe wie STAND/Datenbasis */
}
.ak-fuss-gelb .ak-kopf-dl:hover { background: var(--bag-gelb); color: var(--bag-dark); }

/* Download-Flyout (Klick öffnet PNG/PDF/CSV/DOCX nach OBEN) — Norbert 2026-06-22. */
.ak-dl-wrap { position: relative; display: inline-flex; }
.ak-dl-flyout {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 0;
  flex-direction: row; white-space: nowrap; z-index: 50;   /* horizontal wie Geschlecht-Toggle, linksbündig (Norbert 2026-06-22) */
  background: var(--bag-dark); border: 1px solid var(--bag-gelb);
  border-radius: 8px; padding: 5px; gap: 3px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.ak-dl-wrap.is-open .ak-dl-flyout { display: flex; }
.ak-dl-opt {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  color: var(--bag-white); font-family: var(--font); font-size: 12px; font-weight: 600;
  text-align: left; padding: 6px 12px; border-radius: 5px; transition: all 0.14s ease;
}
.ak-dl-opt:hover { background: var(--bag-gelb); color: var(--bag-dark); }

/* Statistik-Kopf: Titel links, Indikator als mild-gelber Chip rechts (Norbert 2026-06-21).
   Mildes Gelb (#fdf6d8) — nicht das harte Marken-Gelb. */
.ak-stat .stat-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.ak-stat .stat-kopf .stat-titel { margin-bottom: 0; }
.ind-chip {
  background: #fdf6d8; color: var(--bag-dark);
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em;
  padding: 2px 9px; border-radius: 12px; white-space: nowrap;
  text-transform: none;
}
/* Indikator-Pille auch im Balken-Kopf und als Overlay auf der Karte (Norbert 2026-06-21) */
.ak-grafik .graf-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ak-grafik .graf-kopf .graf-label { flex: 1 1 auto; min-width: 0; }
.ak-grafik .graf-kopf .ind-chip { flex: 0 0 auto; }
.swap-karte { position: relative; }
.ind-chip-karte {
  position: absolute; top: 8px; right: 8px; z-index: 5; pointer-events: none;
  width: max-content;   /* sonst zieht sich die abs.-positionierte Pille auf volle Breite */
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}
/* Zentrale Ausgabe der Auswahl (Indikator · Jahr · Kreis) — mittig im Karten-Kopf,
   mild-gelb. Ersetzt die einzelnen Kachel-Pillen (Norbert 2026-06-21). */
.ak-card-kopf .ak-kopf-ausgabe {
  position: absolute; left: 50%; transform: translateX(-50%);
  background: #fdf6d8; color: var(--bag-dark);
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  padding: 3px 14px; border-radius: 14px; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
}

/* Einklappbare Chips (STAND links, Datenbasis rechts) — Cyan-Outline wie Steuerboard;
   Hover klappt den Inhalt auf (Pfeil ▸). „2024" entfällt bei Datenbasis. Norbert 2026-06-21. */
.ak-chip { position: relative; display: inline-flex; align-items: center; }
.ak-chip-zu {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: 1px solid var(--akzent); color: var(--akzent);
  border-radius: 6px; padding: 4px 12px;
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.16s ease;
}
.ak-chip-zu:hover { background: var(--akzent); color: var(--bag-dark); }
.ak-chip-auf {
  display: none; align-items: center; gap: 8px;
  color: var(--bag-white); font-size: 11px; letter-spacing: 0.02em; white-space: nowrap;
}
.ak-chip-tag {
  background: var(--akzent); color: var(--bag-dark); font-weight: 700;
  font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 12px;
}
/* Klick-statt-Hover (Norbert 2026-06-22): Chip öffnet per Klick (.is-open via JS) und
   bleibt STABIL offen — Hover öffnet NICHT mehr (Lesbarkeit der Datenbasis). */
.ak-chip.is-open .ak-chip-zu { display: none; }
.ak-chip.is-open .ak-chip-auf { display: inline-flex; }

/* E2/E3/E5/E6: Diagramm groß + Statistik rechts */
.ak-einfach-grid {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 12px; padding: 14px 18px;
  align-items: start;
}
.ak-einfach-grid .ak-grafik {
  background: var(--bag-white); border: 1px solid var(--bag-grau-line);
  border-radius: var(--radius-sm, 6px); padding: 14px 16px;
  min-height: 240px;
}

/* FEHLER-3-FIX: altes grid-area aus dem Panel-Layout (styles_base.css)
   kapert das neue 1fr-290px-Grid → Diagramm landet in 0px-Zeile (leer).
   Im einfach-Grid platzieren grafik/stat per auto, nicht per benanntem Bereich. */
.ak-einfach-grid > .ak-grafik,
.ak-einfach-grid > .ak-stat {
  grid-area: auto;
}

/* --- Inline-Vergleichsboard --- */
.vgl-board {
  margin: 12px 18px 0;
  background: var(--akzent-05);
  border: 1px dashed var(--akzent);
  border-radius: var(--radius-sm, 6px);
  padding: 9px 12px;
}
.vgl-board-kopf {
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--bag-dark); margin-bottom: 7px;
}
.vgl-board-body { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.vgl-pill {
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--bag-grau-line); background: var(--bag-white);
  font-size: 11px; font-weight: 600; color: var(--bag-grau-mid);
  cursor: pointer; transition: all 0.18s ease;
}
.vgl-pill:hover:not(.is-active) { border-color: var(--akzent); color: var(--bag-dark); }
.vgl-pill.is-active { background: var(--bag-dark); border-color: var(--bag-dark); color: var(--bag-white); }
.vgl-hint { font-size: 10.5px; color: var(--bag-grau-mid); font-style: italic; }
/* Vergleichsboard auf-/zuklappen (Norbert 2026-06-22): Default offen; „Bestätigen" klappt ein, „Vergleich ▸" wieder auf. */
.ak-card.vgl-zu .vgl-wrap { display: none; }
.vgl-confirm {
  margin: 9px 18px 2px; appearance: none; cursor: pointer;
  background: var(--akzent); color: var(--bag-dark); border: 0;
  border-radius: 6px; padding: 6px 14px;
  font-family: var(--font); font-size: 12px; font-weight: 700;
  transition: filter 0.15s ease;
}
.vgl-confirm:hover { filter: brightness(1.06); }

/* --- Karten-Footer: Geschlechter-Toggle (alle 6 E-Karten konsistent) --- */
.ak-card-fuss {
  margin: 0 18px; padding: 11px 0 2px;
  border-top: 1px solid var(--bag-grau-line);
}
.ak-geschlecht-toggle {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
}
.ak-geschlecht-toggle .gt-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--bag-grau-mid);
}
.ak-geschlecht-toggle .gt-options {
  display: inline-flex; align-items: stretch; gap: 0;
  border: 1px solid var(--bag-grau-line); border-radius: 20px;
  overflow: hidden; background: var(--bag-white);
}
.ak-geschlecht-toggle .gt-opt {
  appearance: none; border: 0; background: transparent;
  padding: 4px 13px; font-size: 11px; font-weight: 600;
  font-family: var(--font); color: var(--bag-grau-mid);
  cursor: pointer; transition: all 0.16s ease;
  border-left: 1px solid var(--bag-grau-line);
}
.ak-geschlecht-toggle .gt-opt:first-child { border-left: 0; }
.ak-geschlecht-toggle .gt-opt:hover:not(.is-active):not(.is-disabled) {
  background: var(--akzent-05); color: var(--bag-dark);
}
.ak-geschlecht-toggle .gt-opt.is-active {
  background: var(--bag-dark); color: var(--bag-white);
}
/* Geschlechtssymbol je Option (Norbert 2026-06-21):
   farbiger Marker = Geschlechtssymbol statt Punkt.
   Alle ▪ grau · weiblich ♀ Magenta #c01f8d · männlich ♂ Blau #1d91c0 · Differenz Δ.
   Symbol als ::before-content, eingefärbt via color (kein background-Punkt mehr). */
.ak-geschlecht-toggle .gt-opt::before {
  content: "\25AA";  /* ▪ neutraler Marker (Alle) */
  display: inline-block; margin-right: 5px; vertical-align: middle;
  font-size: 12px; line-height: 1; color: #999;
}
.ak-geschlecht-toggle .gt-opt[data-geschlecht="weiblich"]::before {
  content: "\2640";  /* ♀ */ color: #c01f8d; font-size: 13px;
}
.ak-geschlecht-toggle .gt-opt[data-geschlecht="männlich"]::before {
  content: "\2642";  /* ♂ */ color: #1d91c0; font-size: 13px;
}
.ak-geschlecht-toggle .gt-opt[data-geschlecht="Differenz"]::before {
  content: "\0394";  /* Δ */ color: #c01f8d; font-size: 12px; font-weight: 700;
}
/* aktive Option (dunkler Hintergrund) → Symbol hell halten für Kontrast */
.ak-geschlecht-toggle .gt-opt.is-active::before { color: #ffffff; }

/* Kompakt & icon-basiert (Norbert 2026-06-22): Geschlechter nur als Symbol (Wort aus),
   „Alle" bleibt Text; Differenz Δ halb-halb (oben Magenta · unten Blau);
   aktive Geschlechts-Option füllt sich mit der Geschlechtsfarbe (Symbol dann weiß). */
.ak-geschlecht-toggle .gt-opt[data-geschlecht="weiblich"],
.ak-geschlecht-toggle .gt-opt[data-geschlecht="männlich"],
.ak-geschlecht-toggle .gt-opt[data-geschlecht="Differenz"] {
  font-size: 0; padding-left: 11px; padding-right: 11px;
}
.ak-geschlecht-toggle .gt-opt[data-geschlecht="weiblich"]::before,
.ak-geschlecht-toggle .gt-opt[data-geschlecht="männlich"]::before,
.ak-geschlecht-toggle .gt-opt[data-geschlecht="Differenz"]::before {
  margin-right: 0; font-size: 17px; font-weight: 700;   /* dicker/auffälliger (Norbert 2026-06-22) */
}
.ak-geschlecht-toggle .gt-opt[data-geschlecht="Alle"]::before { display: none; }
.ak-geschlecht-toggle .gt-opt[data-geschlecht="Differenz"]::before {
  background: linear-gradient(180deg, #c01f8d 50%, #1d91c0 50%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
/* aktiv = schwarze Füllung (aus Basis-.is-active); Symbol behält Geschlechtsfarbe (Norbert 2026-06-22) */
.ak-geschlecht-toggle .gt-opt[data-geschlecht="weiblich"].is-active::before { color: #c01f8d; -webkit-text-fill-color: #c01f8d; }
.ak-geschlecht-toggle .gt-opt[data-geschlecht="männlich"].is-active::before { color: #1d91c0; -webkit-text-fill-color: #1d91c0; }

/* Farbinversion (Norbert 2026-06-22): inaktive Felder DUNKEL (schwarz), aktives Feld WEISS.
   „Alle" Default-aktiv → weiß + schwarze Schrift. Symbole behalten ihre Geschlechtsfarbe. */
.ak-card-kopf .ak-geschlecht-toggle .gt-options {
  background: var(--bag-dark); border-color: rgba(255,255,255,0.45);
}
.ak-card-kopf .ak-geschlecht-toggle .gt-opt {
  color: #fff; border-left-color: rgba(255,255,255,0.28);
}
.ak-card-kopf .ak-geschlecht-toggle .gt-opt.is-active {
  background: #fff; color: var(--bag-dark);
}
.ak-geschlecht-toggle .gt-hint {
  font-size: 10.5px; color: var(--bag-grau-mid); font-style: italic;
}
/* Ausgegraut (kein Geschlechtsbezug): sichtbar, aber nicht klickbar */
.ak-geschlecht-toggle.is-disabled { opacity: 0.55; }
.ak-geschlecht-toggle.is-disabled .gt-options { background: var(--bag-light); }
.ak-geschlecht-toggle .gt-opt.is-disabled,
.ak-geschlecht-toggle .gt-opt:disabled {
  cursor: not-allowed; color: var(--bag-grau-mid);
}
.ak-geschlecht-toggle.is-disabled .gt-opt.is-active {
  /* "Alle" bleibt im ausgegrauten Zustand markiert, aber gedämpft */
  background: var(--bag-grau-mid); color: var(--bag-white);
}

/* responsive (AnyDesk-Schmalansicht) */
@media (max-width: 768px) {
  .ak-einfach-grid { grid-template-columns: 1fr; }
  /* E1/E4-Swap schmal: untereinander (gross · Statistik · klein), alle sichtbar */
  .ak-swap-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas: "gross" "stat" "klein";
  }
  .ak-swap-grid .swap-karte { min-height: 240px; }
}

/* Steuerboard eingeklappt → Analysekarte zieht sich auf und füllt den frei gewordenen Platz.
   Nur im eingeklappten Zustand, damit der Normal-Look unverändert bleibt. Norbert 2026-06-21. */
.steuerboard-v37.is-collapsed + .haupt-wrap .hauptflaeche { display: flex; flex-direction: column; }
.steuerboard-v37.is-collapsed + .haupt-wrap .hauptflaeche #ib_frame {
  flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0;
}
.steuerboard-v37.is-collapsed + .haupt-wrap .ak-card.ak-swap { flex: 1 1 auto; min-height: 0; }
.steuerboard-v37.is-collapsed + .haupt-wrap .ak-card.ak-swap .ak-swap-grid {
  flex: 1 1 auto; min-height: 0; grid-template-rows: 1fr 140px;
}

/* === Schritt 1: STEUERBOARD mittig in der schwarzen Navi-Leiste (Norbert 2026-06-21) === */
.nav-bar { position: relative; }
/* Steuerboard-Button rechts — exakt wie .btn-back (gleiche Schrift/Größe, dünner Pfeil),
   nur nach rechts gerückt. Bewusst unauffällig — selten genutzter Schalter (Norbert 2026-06-21) */
.btn-steuerboard {
  margin-left: auto;
}

/* === Header-Feinschliff (Norbert 2026-06-21) =========================
   Titel mittig im gelben Header (Versions-Text + Hilfe-Button via ui.R
   bereits entfernt → hier nur die echte Mittenzentrierung). */
.landing-bar { position: relative; }
.landing-bar .bar-claim {
  position: absolute; left: 50%; transform: translateX(-50%);
  white-space: nowrap;
}

/* Kopf-, Navi- und Steuerboard-Leiste als abgerundete „schwebende" Panels
   (wie die Karten) — kleine Lücken dazwischen. Norbert 2026-06-21. */
/* Masthead = gelber Header + schwarze Navi-Leiste als EINE durchgehende Einheit:
   oben rund (Header-Top), unten rund (Nav-Bottom), die Naht dazwischen eckig.
   Steuerboard bleibt eigenes rundes Panel. Norbert 2026-06-21. */
.landing-bar     { border-radius: 12px 12px 0 0; margin-top: 5px; }
.nav-bar         { border-radius: 0 0 12px 12px; margin-top: 0; }
.app-shell       { margin-top: 14px; }   /* Abstand Masthead → SB-Karten (Steuerboard-Rahmen entfernt) */

/* === Karten-Kopf-Feinschliff (Norbert 2026-06-21) ===================
   Geschlecht-Toggle horizontal+vertikal mittig im Karten-Kopf
   (Type-Badge „Mein Kreis"/„Vergleich" ist im Renderer entfernt). */
.ak-card-kopf { position: relative; }
/* Geschlecht-Toggle links, Download rechts (Cyan) im Karten-Kopf (Norbert 2026-06-21) */
.ak-card-kopf .ak-geschlecht-toggle { margin: 0; }

/* Geschlecht eingeklappt als Chip „Geschlecht ▸"; Hover klappt die Optionen auf.
   Chip im selben Cyan wie der Download daneben, Farbwechsel auf Hover (wie Steuerboard). */
.gt-chip { display: none; }                 /* Chip nur im Karten-Kopf sichtbar */
.ak-card-kopf .ak-geschlecht-toggle { position: relative; display: inline-flex; align-items: center; }
.ak-card-kopf .ak-geschlecht-toggle .gt-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: 1px solid var(--bag-white); color: var(--bag-white);
  border-radius: 6px; padding: 4px 12px;
  font-family: var(--font); font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: all 0.16s ease;
}
.ak-card-kopf .ak-geschlecht-toggle .gt-chip > * { pointer-events: none; }
.ak-card-kopf .ak-geschlecht-toggle .gt-options,
.ak-card-kopf .ak-geschlecht-toggle .gt-hint { display: none; }
/* Hover: Chip weg, Optionen erscheinen (Container bleibt gehovert → bleibt offen) */
/* Klick-statt-Hover: öffnet nur bei .is-open (per JS gesetzt), NICHT bei Hover (Norbert 2026-06-22) */
.ak-card-kopf .ak-geschlecht-toggle.is-open .gt-chip { display: none; }
.ak-card-kopf .ak-geschlecht-toggle.is-open .gt-options { display: inline-flex; }
/* eingeklappter Cyan-Look: Chip füllt sich beim Annähern (wie Steuerboard) */
.ak-card-kopf .ak-geschlecht-toggle .gt-chip:hover { background: var(--bag-white); color: var(--bag-dark); }
/* deaktiviert (kein Geschlechtsbezug): Chip gedämpft, kein Aufklapp-Reiz */
.ak-card-kopf .ak-geschlecht-toggle.is-disabled .gt-chip { opacity: 0.45; cursor: default; }
.ak-kopf-dl {
  margin-left: auto;
  appearance: none; background: transparent;
  border: 1px solid var(--akzent); color: var(--akzent);
  font-family: var(--font); font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 15px; border-radius: 6px; cursor: pointer; transition: all 0.16s ease;
  white-space: nowrap;
}
.ak-kopf-dl:hover { background: var(--akzent); color: var(--bag-dark); }

/* Vergleichsboard-Button im Kopf rechts. Blass/inaktiv bei E1/E4, Cyan+klickbar bei E2/E3/E5/E6
   (Norbert 2026-06-21). */
.ak-vboard-btn {
  margin-left: auto;
  appearance: none; background: transparent;
  border: 1px solid transparent; color: #c2c2c2;   /* randlos-Look, aber 28px hoch = fluchtet mit den anderen Buttons (Norbert 2026-06-22) */
  font-family: var(--font); font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 6px; white-space: nowrap;
  cursor: default; opacity: 1;
}
.ak-vboard-btn.is-aktiv {
  border: 1px solid var(--akzent); color: var(--akzent);   /* E2/E3/E5/E6: Rahmen + Cyan = optische Veränderung */
  cursor: pointer; opacity: 1; transition: all 0.16s ease;
}
.ak-vboard-btn.is-aktiv:hover { background: var(--akzent); color: var(--bag-dark); }
