/* ==========================================================================
   Profiling-Institut · Cluster /berufsbilder/
   Layout- & Lesbarkeits-Korrekturen (rein additiv, keine Inhaltsänderung)

   1) Ausgewogene Kartenraster  (kein 4+2 / 5+3 / 5+1 / 3+1 mehr)
   2) Kontrast / Lesbarkeit     (WCAG 2.1 AA)
   3) Tabellen-Caption          (auf Mobile ohne Seitwärts-Scrollen lesbar)

   Bewusst ohne !important -> die bestehenden Mobile-Regeln (1fr!important)
   behalten Vorrang. Alle Raster-Regeln greifen nur bei exakt passender
   Kartenzahl (:has(> :nth-child(n):last-child)).
   ========================================================================== */


/* ==========================================================================
   1) AUSGEWOGENE KARTENRASTER
   Prinzip: die Mindestbreite einer Spalte wird auf 1/n der Containerbreite
   angehoben. Dadurch können höchstens n Spalten entstehen; auf schmalen
   Viewports greift weiterhin der ursprüngliche px-Wert, d.h. Tablet/Mobile
   brechen wie bisher um.
   ========================================================================== */

/* --- max. 3 Spalten: 6 Karten -> 3+3, 5 -> 3+2, 9 -> 3+3+3 --------------- */
html body [class^="pi-"][class$="-aufg-grid"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-ag-grid"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-spez"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-spez"]:has(> :nth-child(9):last-child),
html body [class^="pi-"][class$="-stack"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-stack"]:has(> :nth-child(5):last-child),
html body [class^="pi-"][class$="-siblings"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-siblings"]:has(> :nth-child(5):last-child),
html body [class^="pi-"][class$="-tools"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-felder"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-branchen"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-schulen"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-zert"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-zert-grid"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-ausb-steps"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-av-steps"]:has(> :nth-child(5):last-child),
html body [class^="pi-"][class$="-ac-days"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-reg-grid"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-ew-grid"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-tr-grid"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-tvoed-grid"]:has(> :nth-child(6):last-child),
html body [class^="pi-"][class$="-fuehrung-grid"]:has(> :nth-child(6):last-child) {
  grid-template-columns: repeat(auto-fit, minmax(max(240px, calc((100% - 32px) / 3)), 1fr));
}

/* --- max. 4 Spalten: 8 Karten -> 4+4, 7 -> 4+3, 12 -> 4+4+4 -------------- */
html body [class^="pi-"][class$="-ag-grid"]:has(> :nth-child(7):last-child),
html body [class^="pi-"][class$="-ag-grid"]:has(> :nth-child(8):last-child),
html body [class^="pi-"][class$="-spez"]:has(> :nth-child(8):last-child),
html body [class^="pi-"][class$="-spez"]:has(> :nth-child(12):last-child),
html body [class^="pi-"][class$="-felder"]:has(> :nth-child(8):last-child),
html body [class^="pi-"][class$="-fach"]:has(> :nth-child(8):last-child),
html body [class^="pi-"][class$="-zert-grid"]:has(> :nth-child(7):last-child) {
  grid-template-columns: repeat(auto-fit, minmax(max(190px, calc((100% - 42px) / 4)), 1fr));
}

/* --- max. 2 Spalten: 4 breite Karten -> 2+2 ------------------------------ */
html body [class^="pi-"][class$="-anf-grid"]:has(> :nth-child(4):last-child),
html body [class^="pi-"][class$="-au-paths"]:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(auto-fit, minmax(max(280px, calc((100% - 18px) / 2)), 1fr));
}


/* ==========================================================================
   2) KONTRAST / LESBARKEIT (WCAG 2.1 AA)
   ========================================================================== */

/* --- Sekundärtexte auf hellem Grund -------------------------------------- */
/* vorher #aaa (2,3:1) bzw. #8a8a8a (3,5:1) -> jetzt 6,0:1 ----------------- */
html body [class^="pi-"][class$="-internal-col-title"],
html body [class^="pi-"][class$="-kar-level"],
html body [class^="pi-"][class$="-gehalt-card-sub"],
html body [class^="pi-"][class$="-ag-cat"],
html body [class^="pi-"][class$="-tool-cat"],
html body [class^="pi-"][class$="-rtile-l"],
html body [class^="pi-"][class$="-rtile-n"],
/* vorher #888 / #777 / #7a7a7a (3,5-4,5:1) -> jetzt 6,0:1 ----------------- */
html body [class^="pi-"][class$="-kar-years"],
html body [class^="pi-"][class$="-author-role"],
html body [class^="pi-"][class$="-internal-block-sub"],
html body [class^="pi-"][class$="-ab-sub"],
html body [class^="pi-"][class$="-tool-note"],
html body [class^="pi-"][class$="-zert-org"],
html body [class^="pi-"][class$="-breadcrumb"],
html body [class^="pi-"][class$="-bc"],
html body [class^="pi-"][class$="-hub-back"] span,
html body [class^="pi-"][class$="-related-grid"] a small {
  color: #5b6068;
}

/* Trennzeichen in der Breadcrumb: vorher #ccc (1,6:1) --------------------- */
html body [class^="pi-"][class$="-bc"] span.sep,
html body [class^="pi-"][class$="-breadcrumb"] span.sep {
  color: #97a0a8;
}

/* --- Orange Überschriften in Pro/Contra- und Hinweisboxen ---------------- */
/* vorher #c97000 / #c07000 (3,6-3,9:1) -> #a04e00 (5,0:1) ---------------- */
html body [class^="pi-"][class$="-con"] [class$="-pc-title"],
html body [class^="pi-"][class$="-pc-con"] h4,
html body [class^="pi-"][class$="-box-orange"] h4 {
  color: #a04e00;
}
html body [class^="pi-"][class$="-pc-con"] li::before {
  color: #a04e00;
}

/* --- RIASEC-Kacheln auf dunkelgrünem Grund ------------------------------- */
/* Labels: vorher rgba(247,245,239,.5) (2,7:1) -> jetzt ca. 4,7-5,6:1 ------ */
html body [class^="pi-"][class$="-riasec-label"],
html body [class^="pi-"][class$="-riasec-lbl"] {
  color: rgba(247, 245, 239, 0.85);
}
/* Große Buchstaben inaktiver Typen (A, R ...): Großschrift, Ziel 3:1 ------ */
html body [class^="pi-"][class*="-riasec-type"][class~="neutral"] [class$="-riasec-letter"] {
  color: rgba(247, 245, 239, 0.75);
}


/* ==========================================================================
   3) TABELLEN-CAPTION
   Die Caption liegt im horizontalen Scroll-Container der Gehaltstabelle und
   war auf Mobile 780px breit -> nur per Seitwärts-Scrollen lesbar.
   Sie bleibt jetzt am linken Rand stehen und bricht im sichtbaren Bereich um.
   ========================================================================== */
html body [class^="pi-"] table > caption,
html body table[class*="-table"] > caption {
  position: sticky;
  left: 0;
  box-sizing: border-box;
  width: min(100%, calc(100vw - 3rem));
}

/* ==========================================================================
   4) HERO-DESIGNLINIE VARIANTE B — CLUSTERWEIT
   Vorbild: /berufsbilder/leiter-controlling/ (.pi-lco-hero)
   Reines CSS, kein Seiteninhalt wird geändert.

   Deckt zwei Bauarten ab:
     A) Berufsbildseiten   …-hero-label / …-hero-sub / …-hero-kpis > …-kpi
     B) Hub + Querschnitt  …-hero-label / …-hero-sub / …-hero-stats > …-stat
                           plus …-hero-cta-row mit …-hero-btn
   Die 28 Seiten, die Variante B schon im Inhalt haben, bekommen dieselben
   Werte noch einmal – wirkungsgleich, daher unkritisch.
   ========================================================================== */

/* ---------- Hero-Fläche --------------------------------------------------- */
html body [class^="pi-"][class$="-hero"] {
  background: #F7F5EF !important;
  border: 1px solid #E0DDD5 !important;
  border-radius: 22px !important;
  padding: 52px 48px !important;
  margin-bottom: 26px;
  position: relative;
  overflow: hidden;
}

/* dekorative Farbkreise der alten Heros abschalten */
html body [class^="pi-"][class$="-hero"]::before { display: none !important; }

/* 5px-Farbleiste oben */
html body [class^="pi-"][class$="-hero"]::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: auto;
  width: auto; height: 5px;
  border-radius: 0;
  background: linear-gradient(90deg, #0B7C58, #D3FA00 55%, #12A06F) !important;
}

html body [class^="pi-"][class$="-hero"] h1 {
  color: #12261D !important;
  font-size: clamp(28px, 3.6vw, 44px);
  max-width: none;
}

/* ---------- Eyebrow: aus der Pille wird die schlichte grüne Zeile -------- */
html body [class^="pi-"][class$="-hero-label"] {
  background: transparent !important;
  border: 0 !important;
  color: #0B7C58 !important;
  padding: 0 !important;
  border-radius: 0;
  font-size: 11px;
  letter-spacing: 1.6px;
  margin-bottom: 16px;
}
/* hartcodierte stroke-Attribute der Eyebrow-Symbole überschreiben */
html body [class^="pi-"][class$="-hero-label"] svg path,
html body [class^="pi-"][class$="-hero-label"] svg circle,
html body [class^="pi-"][class$="-hero-label"] svg line,
html body [class^="pi-"][class$="-hero-label"] svg polyline {
  stroke: #0B7C58;
}

/* ---------- Lead ---------------------------------------------------------- */
html body [class^="pi-"][class$="-hero-sub"] {
  color: #3E4B44 !important;
  font-size: 16.5px;
  max-width: none;
}

/* ---------- Bauart A: KPI-Kacheln der Berufsbildseiten -------------------- */
html body [class^="pi-"][class$="-hero-kpis"] {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
html body [class^="pi-"][class$="-hero-kpis"] > [class$="-kpi"] {
  background: #fff !important;
  border: 1px solid #E0DDD5 !important;
  border-radius: 16px;
  padding: 20px 18px;
  border-top: 3px solid #12A06F !important;
}
html body [class^="pi-"][class$="-hero-kpis"] > [class$="-kpi"]:nth-child(2) { border-top-color: #D3FA00 !important; }
html body [class^="pi-"][class$="-hero-kpis"] > [class$="-kpi"]:nth-child(3) { border-top-color: #0B7C58 !important; }
html body [class^="pi-"][class$="-hero-kpis"] > [class$="-kpi"]:nth-child(4) { border-top-color: #475569 !important; }
html body [class^="pi-"][class$="-hero-kpis"] [class$="-kpi-val"] {
  color: #00543D !important;
  font-size: clamp(18px, 2.05vw, 25px);
}
html body [class^="pi-"][class$="-hero-kpis"] [class$="-kpi-label"] {
  color: #5F6B64 !important;
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- Bauart B: Stat-Kacheln von Hub und Querschnittsseiten --------- */
html body [class^="pi-"][class$="-hero-stats"] {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
html body [class^="pi-"][class$="-hero-stats"] > [class$="-stat"] {
  background: #fff !important;
  border: 1px solid #E0DDD5 !important;
  border-radius: 16px;
  padding: 20px 18px;
  border-top: 3px solid #12A06F !important;
}
html body [class^="pi-"][class$="-hero-stats"] > [class$="-stat"]:nth-child(2) { border-top-color: #D3FA00 !important; }
html body [class^="pi-"][class$="-hero-stats"] > [class$="-stat"]:nth-child(3) { border-top-color: #0B7C58 !important; }
html body [class^="pi-"][class$="-hero-stats"] > [class$="-stat"]:nth-child(4) { border-top-color: #475569 !important; }
html body [class^="pi-"][class$="-hero-stats"] [class$="-stat-val"] {
  color: #00543D !important;
  font-size: clamp(18px, 2.05vw, 25px);
}
html body [class^="pi-"][class$="-hero-stats"] [class$="-stat-label"] {
  color: #5F6B64 !important;
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- Buttons im Hero (waren für dunklen Grund gebaut) ------------- */
html body [class^="pi-"][class$="-hero"] [class*="-btn-primary"],
html body [class^="pi-"][class$="-hero"] [class*="-btn-pri"] {
  background: #D3FA00 !important;
  color: #00543D !important;
  border-color: #D3FA00 !important;
}
html body [class^="pi-"][class$="-hero"] [class*="-btn-secondary"],
html body [class^="pi-"][class$="-hero"] [class*="-btn-sec"] {
  background: transparent !important;
  color: #00543D !important;
  border-color: #00543D !important;
}
html body [class^="pi-"][class$="-hero"] [class*="-btn-secondary"]:hover,
html body [class^="pi-"][class$="-hero"] [class*="-btn-sec"]:hover {
  background: #00543D !important;
  color: #D3FA00 !important;
}

/* ---------- unklassifizierte Resttexte im Hero --------------------------- */
html body [class^="pi-"][class$="-hero"] p:not([class]),
html body [class^="pi-"][class$="-hero"] li:not([class]) {
  color: #3E4B44;
}

@media (max-width: 780px) {
  html body [class^="pi-"][class$="-hero"] { padding: 36px 24px; }
}

/* ---------- weitere Hero-Bauarten im Cluster ----------------------------- */
/* Grundfarbe im Hero, damit nichts Weißes durchrutscht */
html body [class^="pi-"][class$="-hero"] { color: #3E4B44 !important; }

/* Eyebrow-Varianten: -hero-eyebrow (15 Seiten), -hero-tag */
html body [class^="pi-"][class$="-hero-eyebrow"],
html body [class^="pi-"][class$="-hero-tag"] {
  background: transparent !important;
  border: 0 !important;
  color: #0B7C58 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  letter-spacing: 1.6px !important;
  margin-bottom: 16px !important;
}
html body [class^="pi-"][class$="-hero-eyebrow"] svg path,
html body [class^="pi-"][class$="-hero-eyebrow"] svg circle,
html body [class^="pi-"][class$="-hero-tag"] svg path { stroke: #0B7C58 !important; }

/* Lead-Varianten */
html body [class^="pi-"][class$="-hero-lead"] {
  color: #3E4B44 !important;
  font-size: 16.5px;
  max-width: none;
}

/* Fakten-Chips (-hero-facts > -hfact) statt KPI-Kacheln, 15 Seiten */
html body [class^="pi-"][class$="-hero-facts"] {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 14px !important;
}
html body [class^="pi-"][class$="-hfact"] {
  background: #fff !important;
  border: 1px solid #E0DDD5 !important;
  border-top: 3px solid #12A06F !important;
  border-radius: 16px !important;
  padding: 18px 18px !important;
}
html body [class^="pi-"][class$="-hfact"]:nth-child(2) { border-top-color: #D3FA00 !important; }
html body [class^="pi-"][class$="-hfact"]:nth-child(3) { border-top-color: #0B7C58 !important; }
html body [class^="pi-"][class$="-hfact"]:nth-child(4) { border-top-color: #475569 !important; }
html body [class^="pi-"][class$="-hfact-l"] { color: #5F6B64 !important; }
html body [class^="pi-"][class$="-hfact-v"] { color: #00543D !important; }

/* KPI-Variante mit ausgeschriebenen Namen (-hero-kpi-value / -sub) */
html body [class^="pi-"][class$="-kpi-value"] {
  color: #00543D !important;
  font-size: clamp(18px, 2.05vw, 25px);
}
html body [class^="pi-"][class$="-kpi-sub"] { color: #5F6B64 !important; }
html body [class^="pi-"][class$="-kpi-icon"] { stroke: #0B7C58 !important; color: #0B7C58 !important; }

/* dekorative Overlay-Grafik der alten dunklen Heros */
html body [class^="pi-"][class$="-hero-deco"] { display: none !important; }

/* ---------- Hero der 9 Kurzprofile (Richter, Notar, Hebamme …) ----------- */
/* Diese Seiten hatten keinen Hero. H1, Lead und die vier vorhandenen        */
/* Fakten-Kästchen wurden in eine …-hero-Section gefasst; hier ihr Styling.  */
html body [class^="pi-"][class$="-hero"] [class$="-lead"] {
  color: #3E4B44 !important;
  font-size: 16.5px;
  max-width: none;
}
html body [class^="pi-"][class$="-hero"] [class$="-facts"] {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 14px !important;
  margin: 24px 0 0 !important;
}
html body [class^="pi-"][class$="-hero"] [class$="-fact"] {
  background: #fff !important;
  border: 1px solid #E0DDD5 !important;
  border-top: 3px solid #12A06F !important;
  border-radius: 16px !important;
  padding: 20px 18px !important;
  margin: 0 !important;
}
html body [class^="pi-"][class$="-hero"] [class$="-fact"]:nth-child(2) { border-top-color: #D3FA00 !important; }
html body [class^="pi-"][class$="-hero"] [class$="-fact"]:nth-child(3) { border-top-color: #0B7C58 !important; }
html body [class^="pi-"][class$="-hero"] [class$="-fact"]:nth-child(4) { border-top-color: #475569 !important; }
html body [class^="pi-"][class$="-hero"] [class$="-fact"] b {
  display: block;
  color: #00543D !important;
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(18px, 2.05vw, 25px);
  line-height: 1.1;
  margin-bottom: 6px;
}
html body [class^="pi-"][class$="-hero"] [class$="-fact"] span {
  display: block;
  color: #5F6B64 !important;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}
html body [class^="pi-"][class$="-hero-label"] svg { flex: 0 0 auto; }

/* ==========================================================================
   5) HUB-KARTENRASTER  (/berufsbilder/, .pi-bb-grid)
   Der Hub steht auf repeat(auto-fill, minmax(290px,1fr)) = 3 Spalten.
   Vier Gruppen endeten dadurch mit einer einzelnen Karte in der letzten
   Reihe. Gleiches Prinzip wie Block 1: Mindestbreite auf 1/n anheben.
     4 Karten -> 2+2   (Staat & Verwaltung)
     7 Karten -> 4+3   (Personal & Coaching, Soziales & Bildung)
   13 Karten (C-Level) bleibt unangetastet - eine Primzahl laesst sich
   nicht gleichmaessig aufteilen, das loest nur eine 14. Karte.
   ========================================================================== */

html body [class^="pi-"][class$="-bb-grid"]:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(auto-fit, minmax(max(290px, calc((100% - 18px) / 2)), 1fr)) !important;
}

html body [class^="pi-"][class$="-bb-grid"]:has(> :nth-child(7):last-child) {
  grid-template-columns: repeat(auto-fit, minmax(max(240px, calc((100% - 54px) / 4)), 1fr)) !important;
}

/* ==========================================================================
   6) VERGLEICHSTABELLEN AUF DEM HUB (.pi-bb-compare-v7)
   Schrift verkleinert, damit die sechste Spalte (KI-Risiko) Platz hat.
   Die Basisregeln stehen in Divis Customizer-CSS und sind !important,
   deshalb hier ebenfalls !important.
   ========================================================================== */
html body [class^="pi-"][class*="-compare-v7"] {
  font-size: 14.5px !important;
}
html body [class^="pi-"][class*="-compare-v7"] tbody td {
  font-size: 14.5px !important;
  padding: 8px 12px !important;
  line-height: 1.45 !important;
}
html body [class^="pi-"][class*="-compare-v7"] thead th {
  font-size: 11px !important;
  padding: 9px 12px !important;
}

/* Ampel der KI-Risiko-Spalte. Divis Customizer setzt tbody td auf color:#333
   !important, deshalb hier ebenfalls !important statt Inline-Style.
   Schwellen wie im Automatisierbarkeits-Check: bis 33 gering, 34-66 mittel,
   ab 67 hoch. Farben gegen Weiss auf WCAG AA gepruefet (5,6 / 4,9 / 6,3:1). */
html body [class^="pi-"][class*="-compare-v7"] tbody td.pi-bb-ki { font-weight: 600 !important; white-space: nowrap; }
html body [class^="pi-"][class*="-compare-v7"] tbody td.pi-bb-ki-gering { color: #0a6e50 !important; }
html body [class^="pi-"][class*="-compare-v7"] tbody td.pi-bb-ki-mittel { color: #A85B00 !important; }
html body [class^="pi-"][class*="-compare-v7"] tbody td.pi-bb-ki-hoch   { color: #B22D1F !important; }
html body [class^="pi-"][class*="-compare-v7"] tbody td.pi-bb-ki-offen  { color: #767676 !important; font-weight: 400 !important; }


/* ==========================================================================
   7) HUB-HERO · Variante V1 "Kollektiv"   (nur .pi-bb-hero, also nur 43254)
   Zweispaltig: Text links, Figurenfeld rechts, Kennzahlen ueber beide.
   Das Markup bleibt flach – die Zuordnung macht das Grid.
   ========================================================================== */
html body .pi-bb-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr) !important;
  column-gap: 44px !important;
  row-gap: 0 !important;
  align-content: start;
}
html body .pi-bb-hero > .pi-bb-hero-label { grid-column: 1; grid-row: 1; align-self: end; }
html body .pi-bb-hero > h1               { grid-column: 1; grid-row: 2; }
html body .pi-bb-hero > .pi-bb-hero-sub  { grid-column: 1; grid-row: 3; align-self: start; }
html body .pi-bb-hero > .pi-bb-crowd {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: center;
  width: 100%;
  height: auto;
  max-width: 340px;
  justify-self: end;
}
html body .pi-bb-hero > .pi-bb-crowd-m { display: none; }
html body .pi-bb-hero > .pi-bb-hero-stats {
  grid-column: 1 / -1;
  grid-row: 4;
  margin-top: 30px !important;
}

/* Figurenfarben: gedeckte Menge, gruene und limefarbene Akzente,
   drei Figuren in frischem Orange als Blickfang */
html body .pi-bb-crowd .f-mute,
html body .pi-bb-crowd-m .f-mute   { fill: #DAD6C9; }
html body .pi-bb-crowd .f-mid,
html body .pi-bb-crowd-m .f-mid    { fill: #0B7C58; }
html body .pi-bb-crowd .f-green,
html body .pi-bb-crowd-m .f-green  { fill: #00543D; }
html body .pi-bb-crowd .f-lime,
html body .pi-bb-crowd-m .f-lime   { fill: #D3FA00; stroke: #00543D; stroke-width: 0.9; }
html body .pi-bb-crowd .f-orange,
html body .pi-bb-crowd-m .f-orange { fill: #F97316; }

/* Ab 900px kein Platz mehr fuer zwei Spalten: Streifen statt Feld */
@media (max-width: 900px) {
  html body .pi-bb-hero { display: block !important; }
  html body .pi-bb-hero > .pi-bb-crowd { display: none; }
  html body .pi-bb-hero > .pi-bb-crowd-m {
    display: block;
    width: 100%;
    height: auto;
    max-width: 420px;
    margin: 22px 0 0;
  }
  html body .pi-bb-hero > .pi-bb-hero-stats { margin-top: 24px !important; }
}

/* Ausgelagerter Einleitungstext unter der Trust-Leiste */
html body .pi-bb-wrap p.pi-bb-hub-intro {
  max-width: none !important;
  margin: 0 0 34px !important;
  text-align: left !important;
  font-size: 16.5px !important;
  line-height: 1.7 !important;
  color: #3E4B44 !important;
}


/* ==========================================================================
   8) HUB · Suchleiste und Ergebniszeile
   Die Leiste stand auf flex-direction:column, dadurch sass die Lupe allein
   in einer eigenen Zeile ueber dem Eingabefeld. Grid setzt beide in eine
   Zeile, die Filterknoepfe darunter.
   ========================================================================== */
html body #pi-bb-filterbar {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 10px !important;
  row-gap: 12px !important;
}
html body #pi-bb-filterbar > svg { grid-column: 1; grid-row: 1; }
html body #pi-bb-filterbar > .pi-bb-search-input { grid-column: 2; grid-row: 1; }
html body #pi-bb-filterbar > .pi-bb-filter-row { grid-column: 1 / -1; grid-row: 2; }

/* Ergebniszeile, wird per JS eingehaengt und nur bei aktiver Suche gezeigt */
html body .pi-bb-search-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: -10px 0 24px;
  padding: 10px 16px;
  background: #F7F5EF;
  border: 1px solid #E0DDD5;
  border-radius: 10px;
  font-size: 14px;
  color: #3E4B44;
}
html body .pi-bb-search-status[hidden] { display: none !important; }
html body .pi-bb-search-status-text { font-weight: 600; }
html body .pi-bb-search-reset {
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  background: #fff;
  color: #00543D;
  border: 1px solid #C9D3CD;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
html body .pi-bb-search-reset:hover,
html body .pi-bb-search-reset:focus-visible {
  background: #00543D;
  color: #D3FA00;
  border-color: #00543D;
}

/* Sichtbarkeit im Filter laeuft ueber .pi-bb-hidden, weil Divis Customizer-CSS
   die Karten auf display:flex!important setzt und ein Inline-display dagegen
   verliert. Fuer .pi-bb-card ist die Klasse dort schon hinterlegt, fuer die
   Gruppen-Akkordeons und die Hinweiskaesten fehlte sie. */
html body details.pi-bb-gruppe-acc.pi-bb-hidden { display: none !important; }
html body .pi-bb-cross-link.pi-bb-hidden { display: none !important; }

/* Aktionen in der Ergebniszeile */
html body .pi-bb-search-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
html body .pi-bb-search-jump {
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  background: #00543D;
  color: #D3FA00;
  border: 1px solid #00543D;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
html body .pi-bb-search-jump:hover,
html body .pi-bb-search-jump:focus-visible {
  background: #0B7C58;
  border-color: #0B7C58;
}
html body .pi-bb-search-jump[hidden] { display: none !important; }

/* ============================================================
   BLOCK 9 – Berufsfeld-Badge "Staat & Verwaltung" und Sonderprofil
   Neue Feldgruppe in den Querschnittsmatrizen (122er-Ausbau 03.09.2026)
   ============================================================ */
html body .pi-gv-feld-sonder,
html body .pi-ra-feld-sonder,
html body .pi-za-feld-sonder,
html body .pi-re-feld-sonder,
html body .pi-fa-feld-sonder { background: #0a6e50 !important; color: #ffffff !important; }
html body .pi-gv-feld-staat,
html body .pi-ra-feld-staat,
html body .pi-za-feld-staat,
html body .pi-re-feld-staat,
html body .pi-fa-feld-staat { background: #1e3a5f !important; color: #ffffff !important; }

html body .pi-neu-mark { color: #0a6e50 !important; font-weight: 700 !important; margin-left: 3px !important; cursor: help !important; }

/* ============================================================
   BLOCK 10 – gemeinsamer Ruecklink zur Uebersicht
   Fuer die 28 Seiten, die keinen eigenen -hub-back hatten (03.09.2026)
   ============================================================ */
html body a.pi-bb-hub-back {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: #ffffff !important;
  border: 1.5px solid #e0ddd5 !important;
  border-radius: 12px !important;
  padding: 12px 20px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #00543D !important;
  text-decoration: none !important;
  margin: 0 0 28px !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease !important;
}
html body a.pi-bb-hub-back:hover,
html body a.pi-bb-hub-back:focus-visible {
  background: #00543D !important;
  color: #D3FA00 !important;
  border-color: #00543D !important;
}
html body a.pi-bb-hub-back span {
  font-weight: 400 !important;
  color: #5b6068 !important;
  font-size: 12.5px !important;
}
html body a.pi-bb-hub-back:hover span,
html body a.pi-bb-hub-back:focus-visible span {
  color: #D3FA00 !important;
  opacity: .85 !important;
}
@media (max-width: 640px) {
  html body a.pi-bb-hub-back { flex-wrap: wrap !important; padding: 11px 16px !important; }
}

/* ============================================================
   BLOCK 11 – Suche, Filter und Sortierung der Querschnittsseiten
   Gegenstueck zu uploads/pi-js/pi-spoke-tools.js (03.09.2026)
   ============================================================ */
html body tr.pi-gv-row-hidden,
html body tr.pi-re-row-hidden,
html body tr.pi-fa-row-hidden,
html body tr.pi-op-row-hidden { display: none !important; }

html body .pi-spoke-result {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin: -8px 0 18px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #00543D !important;
}
html body .pi-spoke-result[hidden] { display: none !important; }
html body .pi-spoke-result-reset {
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  background: #00543D !important;
  color: #D3FA00 !important;
  border: 1px solid #00543D !important;
  padding: 6px 14px !important;
  border-radius: 99px !important;
  cursor: pointer !important;
  transition: background .15s ease, border-color .15s ease !important;
}
html body .pi-spoke-result-reset:hover,
html body .pi-spoke-result-reset:focus-visible {
  background: #0B7C58 !important;
  border-color: #0B7C58 !important;
}

/* Sortier-Indikator: nur dort, wo das Skript aria-sort setzt. */
html body table[data-pi-tools-inited] thead th[data-col] { cursor: pointer !important; }
html body table[data-pi-tools-inited] thead th[aria-sort]::after {
  content: " ▲" !important;
  font-size: .78em !important;
  opacity: .85 !important;
}
html body table[data-pi-tools-inited] thead th[aria-sort="descending"]::after { content: " ▼" !important; }
