/* Knigge Spirit Darkmode 0.10.0 - zentrales Designsystem für Light und Dark.

   SCOPE-REGEL (ab 0.9.1, verbindlich für jede neue Regel in dieser Datei):
   1. Token-Definitionen (:root und html.ksom-dark-mode) gelten in BEIDEN Modi.
      Sie färben nichts ein, sie stellen nur Werte bereit, die andere Plugins
      bewusst über var(--ks-..., <literal>) konsumieren.
   2. Jede Regel, die tatsächlich etwas einfärbt (background-color, color,
      border-color), MUSS mit html.ksom-dark-mode bzw. html.ks-theme-dark
      beginnen. Sonst greift sie auch im Light Mode und übermalt die Ausgabe
      fremder Plugins mit unseren Standardfarben.
      Genau das war die Ursache der Meldungen von Workshops, Marktplatz und
      Community sowie der weißen Kästen auf den BuddyBoss-Profilseiten:
      body.ksdm-active wird gesetzt, sobald das Plugin aktiv ist, also auch im
      Light Mode, wo unsere Tokens echte Farbwerte haben (Fläche #FFFFFF,
      Text #253D54, Link #326569).
   3. Bewusste Ausnahmen, die modusunabhängig bleiben: Schriftfamilien und
      Schriftgewichte (sonst springt die Schrift beim Umschalten) und der
      Fokus-Rahmen (Barrierefreiheit, muss in beiden Modi sichtbar sein).
      Beide setzen keine Flächen- oder Textfarben. */
:root {
	--ksdm-ci-blue: #253D54;
	--ksdm-ci-green: #326569;
	--ksdm-ci-dark-accent: #407D82;
	--ksdm-ci-red: #931204;
	--ksdm-ci-beige: #E1DDD4;
	--ksdm-bg: #E1DDD4;
	--ksdm-section: #EBE7DE;
	--ksdm-row: #FFFFFF;
	--ksdm-surface: #FFFFFF;
	--ksdm-surface-raised: #F7F6F2;
	--ksdm-text: #253D54;
	--ksdm-heading: #253D54;
	--ksdm-text-muted: #53616B;
	--ksdm-border: #D8D5CE;
	--ksdm-link: #326569;
	--ksdm-input: #FFFFFF;
	--ksdm-inverse-text: #FFFFFF;
	--ksdm-button: #253D54;
	--ksdm-button-text: #FFFFFF;
	--ksdm-accent: #326569;
	--ksdm-danger: #931204;
	--ksdm-success: #2F7D4F;
	--ksdm-warning: #A36314;
	--ksdm-light-text: #253D54;
	--ksdm-light-link: #326569;
	--ksdm-shadow: rgba(37, 61, 84, 0.12);
	color-scheme: light;
}

html.ksom-dark-mode,
html.ks-theme-dark {
	--ksdm-bg: #101820;
	--ksdm-section: #16202B;
	--ksdm-row: #17232D;
	--ksdm-surface: #17232D;
	--ksdm-surface-raised: #1D2C37;
	--ksdm-text: #F3EFE6;
	--ksdm-heading: #F3EFE6;
	--ksdm-text-muted: #CFC8BC;
	--ksdm-border: #344650;
	--ksdm-link: #72AEB1;
	--ksdm-input: #111C24;
	--ksdm-inverse-text: #FFFFFF;
	--ksdm-button: #407D82;
	--ksdm-button-text: #FFFFFF;
	--ksdm-accent: #407D82;
	--ksdm-danger: #E07868;
	--ksdm-success: #3F9D5F;
	--ksdm-warning: #D9A441;
	--ksdm-shadow: rgba(0, 0, 0, 0.34);
	color-scheme: dark;
}

/* Schrift: bewusst modusunabhängig, siehe Scope-Regel Punkt 3. */
body.ksdm-active {
	font-family: 'Yantramanav Light', 'Yantramanav Regular', 'Yantramanav', sans-serif;
}

body.ksdm-active :where(h1, h2, h3, h4, h5, h6) {
	font-family: 'Cinzel', serif;
	font-weight: 400;
}

body.ksdm-active :where(.ks-hero, .et_pb_fullwidth_header) :where(h1, .et_pb_module_header) {
	font-weight: 500;
}

body.ksdm-active :where(button, .button, input[type="button"], input[type="submit"]) {
	font-family: 'Yantramanav Regular', 'Yantramanav Light', 'Yantramanav', sans-serif;
}

html.ksom-dark-mode body.ksdm-active,
html.ks-theme-dark body.ksdm-active {
	background-color: var(--ksdm-bg,#E1DDD4);
	color: var(--ksdm-text,#253D54);
}

/* Globale Typografie-Farben. Divi-Inhalte werden bei aktivem Lesbarkeitsschutz
   ausgenommen. Zusätzlich ausgenommen: die Hero-Sektionen unserer eigenen
   Plugins. Deren Headlines sind bewusst hell (weiß über Bild oder Verlauf) und
   dürfen NICHT vom Text-Token eingefärbt werden. Kanonische Opt-out-Klasse =
   `ks-hero`; die bestehenden Hero-Wrapper `.ks-mp-hero` (Marktplatz),
   `.ks-kal-hero` (Kalender) und `.kscom-hero` (Community) sind zusätzlich fest
   aufgeführt. */
html.ksom-dark-mode body.ksdm-active.ksdm-readability-guard :where(h1, h2, h3, h4, h5, h6):not(.et_pb_section *):not(:is(.ks-hero, .ks-mp-hero, .ks-kal-hero, .kscom-hero) *),
html.ks-theme-dark body.ksdm-active.ksdm-readability-guard :where(h1, h2, h3, h4, h5, h6):not(.et_pb_section *):not(:is(.ks-hero, .ks-mp-hero, .ks-kal-hero, .kscom-hero) *),
html.ksom-dark-mode body.ksdm-active:not(.ksdm-readability-guard) :where(h1, h2, h3, h4, h5, h6):not(:is(.ks-hero, .ks-mp-hero, .ks-kal-hero, .kscom-hero) *),
html.ks-theme-dark body.ksdm-active:not(.ksdm-readability-guard) :where(h1, h2, h3, h4, h5, h6):not(:is(.ks-hero, .ks-mp-hero, .ks-kal-hero, .kscom-hero) *) {
	color: var(--ksdm-heading,#253D54);
}

/* Links: greift nur im Dark-Kontext. Im Light Mode behalten fremde Plugins ihre
   eigene Linkfarbe, insbesondere Links, die als Button gestaltet sind. */
html.ksom-dark-mode body.ksdm-active.ksdm-readability-guard :where(a):not(.et_pb_section *):not(:is(.ks-hero, .ks-mp-hero, .ks-kal-hero, .kscom-hero) *),
html.ks-theme-dark body.ksdm-active.ksdm-readability-guard :where(a):not(.et_pb_section *):not(:is(.ks-hero, .ks-mp-hero, .ks-kal-hero, .kscom-hero) *),
html.ksom-dark-mode body.ksdm-active:not(.ksdm-readability-guard) :where(a):not(:is(.ks-hero, .ks-mp-hero, .ks-kal-hero, .kscom-hero) *),
html.ks-theme-dark body.ksdm-active:not(.ksdm-readability-guard) :where(a):not(:is(.ks-hero, .ks-mp-hero, .ks-kal-hero, .kscom-hero) *) {
	color: var(--ksdm-link,#326569);
}

html.ksom-dark-mode body.ksdm-active :where(input, select, textarea):not(.et_pb_section *),
html.ks-theme-dark body.ksdm-active :where(input, select, textarea):not(.et_pb_section *) {
	background-color: var(--ksdm-input,#FFFFFF);
	border-color: var(--ksdm-border,#D8D5CE);
	color: var(--ksdm-text,#253D54);
}

html.ksom-dark-mode body.ksdm-active :where(input, textarea):not(.et_pb_section *)::placeholder,
html.ks-theme-dark body.ksdm-active :where(input, textarea):not(.et_pb_section *)::placeholder {
	color: var(--ksdm-text-muted,#53616B);
	opacity: 1;
}

html.ksom-dark-mode body.ksdm-active :where(table, th, td):not(.et_pb_section *),
html.ks-theme-dark body.ksdm-active :where(table, th, td):not(.et_pb_section *) {
	border-color: var(--ksdm-border,#D8D5CE);
}

/* Divi: nur gekoppelte Bereiche erhalten Fläche UND lesbaren Text gemeinsam. */
html.ksom-dark-mode body.ksdm-active.ksdm-divi-marked .ksdm-dark-section,
html.ks-theme-dark body.ksdm-active.ksdm-divi-marked .ksdm-dark-section,
html.ksom-dark-mode body.ksdm-active.ksdm-divi-auto .ksdm-dark-section,
html.ks-theme-dark body.ksdm-active.ksdm-divi-auto .ksdm-dark-section {
	background-color: var(--ksdm-bg,#E1DDD4) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-card, .ksdm-auto-surface),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-card, .ksdm-auto-surface) {
	background-color: var(--ksdm-surface,#FFFFFF) !important;
	border-color: var(--ksdm-border,#D8D5CE) !important;
}

html.ksom-dark-mode body.ksdm-active.ksdm-divi-auto .ksdm-auto-surface[data-ksdm-auto-scope="section"],
html.ks-theme-dark body.ksdm-active.ksdm-divi-auto .ksdm-auto-surface[data-ksdm-auto-scope="section"] {
	background-color: var(--ksdm-section,#EBE7DE) !important;
}

html.ksom-dark-mode body.ksdm-active.ksdm-divi-auto .ksdm-auto-surface[data-ksdm-auto-scope="row"],
html.ks-theme-dark body.ksdm-active.ksdm-divi-auto .ksdm-auto-surface[data-ksdm-auto-scope="row"] {
	background-color: var(--ksdm-row,#FFFFFF) !important;
}

html.ksom-dark-mode body.ksdm-active.ksdm-divi-auto .ksdm-auto-surface[data-ksdm-auto-scope="column"],
html.ks-theme-dark body.ksdm-active.ksdm-divi-auto .ksdm-auto-surface[data-ksdm-auto-scope="column"] {
	background-color: var(--ksdm-surface-raised,#F7F6F2) !important;
}

/* Exakte X→Y-Zuordnungen besitzen Vorrang vor der allgemeinen Divi-Fläche. */
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-color-mapped,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-color-mapped {
	background-color: var(--ksdm-mapped-bg) !important;
	border-color: var(--ksdm-border,#D8D5CE) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-dim-background),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-dim-background),
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-dim-background) :where(h1, h2, h3, h4, h5, h6, p, li, span, div):not(.ksdm-keep-light):not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-dim-background) :where(h1, h2, h3, h4, h5, h6, p, li, span, div):not(.ksdm-keep-light):not(.ksdm-keep-light *) {
	color: var(--ksdm-text,#253D54) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-dim-background) a:not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-dim-background) a:not(.ksdm-keep-light *) {
	color: var(--ksdm-link,#326569) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-color-mapped,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-color-mapped,
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-color-mapped :where(h1, h2, h3, h4, h5, h6, p, li, span, div):not(.ksdm-keep-light):not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-color-mapped :where(h1, h2, h3, h4, h5, h6, p, li, span, div):not(.ksdm-keep-light):not(.ksdm-keep-light *) {
	color: var(--ksdm-mapped-text) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-color-mapped a:not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-color-mapped a:not(.ksdm-keep-light *) {
	color: var(--ksdm-mapped-link) !important;
}

/* Divi-Accordion: jeden offenen und geschlossenen Toggle einheitlich behandeln. */
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) .et_pb_accordion .et_pb_toggle,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) .et_pb_accordion .et_pb_toggle,
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_accordion:is(.ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) .et_pb_toggle,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_accordion:is(.ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) .et_pb_toggle {
	background-color: var(--ksdm-mapped-bg, var(--ksdm-surface,#FFFFFF)) !important;
	border-color: var(--ksdm-border,#D8D5CE) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) .et_pb_accordion :is(.et_pb_toggle_open, .et_pb_toggle_close) :is(.et_pb_toggle_title, .et_pb_toggle_content, .et_pb_toggle_content p),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) .et_pb_accordion :is(.et_pb_toggle_open, .et_pb_toggle_close) :is(.et_pb_toggle_title, .et_pb_toggle_content, .et_pb_toggle_content p),
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_accordion:is(.ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) :is(.et_pb_toggle_open, .et_pb_toggle_close) :is(.et_pb_toggle_title, .et_pb_toggle_content, .et_pb_toggle_content p),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_accordion:is(.ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) :is(.et_pb_toggle_open, .et_pb_toggle_close) :is(.et_pb_toggle_title, .et_pb_toggle_content, .et_pb_toggle_content p),
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) .et_pb_accordion :is(.et_pb_toggle_open, .et_pb_toggle_close) .et_pb_toggle_title::before,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) .et_pb_accordion :is(.et_pb_toggle_open, .et_pb_toggle_close) .et_pb_toggle_title::before,
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_accordion:is(.ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) :is(.et_pb_toggle_open, .et_pb_toggle_close) .et_pb_toggle_title::before,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_accordion:is(.ksdm-dark-card, .ksdm-auto-surface, .ksdm-color-mapped) :is(.et_pb_toggle_open, .et_pb_toggle_close) .et_pb_toggle_title::before,
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_accordion .et_pb_toggle.ksdm-color-mapped .et_pb_toggle_title::before,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_accordion .et_pb_toggle.ksdm-color-mapped .et_pb_toggle_title::before {
	color: var(--ksdm-mapped-text, var(--ksdm-text,#253D54)) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface) :where(input, select, textarea):not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.ksdm-dark-section, .ksdm-dark-card, .ksdm-auto-surface) :where(input, select, textarea):not(.ksdm-keep-light *) {
	background-color: var(--ksdm-input,#FFFFFF) !important;
	border-color: var(--ksdm-border,#D8D5CE) !important;
	color: var(--ksdm-text,#253D54) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-keep-light,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-keep-light {
	background-color: #ffffff !important;
	color-scheme: light;
	color: var(--ksdm-light-text,#253D54) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-keep-light :where(h1, h2, h3, h4, h5, h6, p, li, span, div),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-keep-light :where(h1, h2, h3, h4, h5, h6, p, li, span, div) {
	color: var(--ksdm-light-text,#253D54) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-keep-light a,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-keep-light a {
	color: var(--ksdm-light-link,#326569) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-dim-background,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .ksdm-dim-background {
	background-color: rgba(16, 24, 32, 0.62) !important;
	background-blend-mode: multiply;
}

/* Reale Divi-Komponenten aus dem Seitenexport vom 13.08.2026. */
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_column.ksdm-color-mapped,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_column.ksdm-color-mapped {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blog_grid .et_pb_post:not(.ksdm-keep-light):not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blog_grid .et_pb_post:not(.ksdm-keep-light):not(.ksdm-keep-light *) {
	background-color: var(--ksdm-surface-raised,#F7F6F2) !important;
	border-color: var(--ksdm-border,#D8D5CE) !important;
	color: var(--ksdm-text,#253D54) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blog_grid .et_pb_post:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(.entry-title, .post-content, .post-content p),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blog_grid .et_pb_post:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(.entry-title, .post-content, .post-content p) {
	color: var(--ksdm-text,#253D54) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blog_grid .et_pb_post:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(a, .more-link),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blog_grid .et_pb_post:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(a, .more-link) {
	color: var(--ksdm-link,#326569) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_testimonial:not(.ksdm-keep-light):not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_testimonial:not(.ksdm-keep-light):not(.ksdm-keep-light *) {
	background-color: var(--ksdm-surface-raised,#F7F6F2) !important;
	border-color: var(--ksdm-border,#D8D5CE) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_testimonial:not(.ksdm-keep-light):not(.ksdm-keep-light *)::before,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_testimonial:not(.ksdm-keep-light):not(.ksdm-keep-light *)::before {
	background-color: var(--ksdm-button,#253D54) !important;
	color: var(--ksdm-button-text,#FFFFFF) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blurb:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(.et-pb-icon, .et_pb_main_blurb_image),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blurb:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(.et-pb-icon, .et_pb_main_blurb_image) {
	color: var(--ksdm-accent,#326569) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blurb:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(.et_pb_module_header, .et_pb_blurb_description, .et_pb_blurb_description p),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_blurb:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(.et_pb_module_header, .et_pb_blurb_description, .et_pb_blurb_description p) {
	color: var(--ksdm-text,#253D54) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_divider:not(.ksdm-keep-light):not(.ksdm-keep-light *) .et_pb_divider_internal,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_divider:not(.ksdm-keep-light):not(.ksdm-keep-light *) .et_pb_divider_internal {
	border-color: var(--ksdm-border,#D8D5CE) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.et_pb_button, .et_pb_more_button):not(.ksdm-keep-light):not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.et_pb_button, .et_pb_more_button):not(.ksdm-keep-light):not(.ksdm-keep-light *) {
	background-color: var(--ksdm-button,#253D54) !important;
	border-color: var(--ksdm-button,#253D54) !important;
	color: var(--ksdm-button-text,#FFFFFF) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.et_pb_button, .et_pb_more_button):not(.ksdm-keep-light):not(.ksdm-keep-light *):hover,
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) :is(.et_pb_button, .et_pb_more_button):not(.ksdm-keep-light):not(.ksdm-keep-light *):hover {
	background-color: var(--ksdm-accent,#326569) !important;
	border-color: var(--ksdm-accent,#326569) !important;
	color: var(--ksdm-button-text,#FFFFFF) !important;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_slide:not(.ksdm-keep-light):not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_slide:not(.ksdm-keep-light):not(.ksdm-keep-light *) {
	background-color: rgba(16, 24, 32, 0.54) !important;
	background-blend-mode: multiply;
}

html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_slide:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(.et_pb_slide_title, .et_pb_slide_content, .et_pb_slide_content p),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_slide:not(.ksdm-keep-light):not(.ksdm-keep-light *) :is(.et_pb_slide_title, .et_pb_slide_content, .et_pb_slide_content p) {
	color: var(--ksdm-text,#253D54) !important;
}

/* Divi-Masken bleiben erhalten, werden aber auf dunklen Flächen zurückgenommen. */
html.ksom-dark-mode body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_background_mask:not(.ksdm-keep-light):not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active:is(.ksdm-divi-marked, .ksdm-divi-auto) .et_pb_background_mask:not(.ksdm-keep-light):not(.ksdm-keep-light *) {
	filter: brightness(0.58) saturate(0.72);
	opacity: 0.48;
	mix-blend-mode: soft-light;
}

/* BuddyBoss-Theme-Chrome und häufige Nouveau-Flächen, ausschließlich im Dark-Kontext.
   Vor 0.9.1 galten diese Regeln auch im Light Mode und haben dort weiße Kästen auf
   den Profil- und Einstellungsseiten erzeugt. */
html.ksom-dark-mode body.ksdm-active :where(.site, .site-content, .bb-grid, #primary, #secondary),
html.ks-theme-dark body.ksdm-active :where(.site, .site-content, .bb-grid, #primary, #secondary) {
	background-color: var(--ksdm-bg,#E1DDD4);
	color: var(--ksdm-text,#253D54);
}

html.ksom-dark-mode body.ksdm-active :where(.site-header, .bb-mobile-header),
html.ks-theme-dark body.ksdm-active :where(.site-header, .bb-mobile-header) {
	background-color: var(--ksdm-ci-blue,#253D54);
	color: var(--ksdm-inverse-text,#FFFFFF);
}

html.ksom-dark-mode body.ksdm-active :where(.site-header, .bb-mobile-header) :where(a, button, span),
html.ks-theme-dark body.ksdm-active :where(.site-header, .bb-mobile-header) :where(a, button, span) {
	color: var(--ksdm-inverse-text,#FFFFFF);
}

html.ksom-dark-mode body.ksdm-active :where(.widget, .bp-widget, .bp-list > li, .activity-list .activity-item, .item-body, .item-header, .bb-profile-grid, .bb-profile-grid > *, .subnav, .bp-navs),
html.ks-theme-dark body.ksdm-active :where(.widget, .bp-widget, .bp-list > li, .activity-list .activity-item, .item-body, .item-header, .bb-profile-grid, .bb-profile-grid > *, .subnav, .bp-navs) {
	background-color: var(--ksdm-surface,#FFFFFF);
	border-color: var(--ksdm-border,#D8D5CE);
	color: var(--ksdm-text,#253D54);
}

html.ksom-dark-mode body.ksdm-active :where(.activity-comments, .acomment-content, .bp-feedback, .bp-messages, .bb-modal, .bb-model-header),
html.ks-theme-dark body.ksdm-active :where(.activity-comments, .acomment-content, .bp-feedback, .bp-messages, .bb-modal, .bb-model-header) {
	background-color: var(--ksdm-surface-raised,#F7F6F2);
	border-color: var(--ksdm-border,#D8D5CE);
	color: var(--ksdm-text,#253D54);
}

html.ksom-dark-mode body.ksdm-active :where(.bp-navs .selected > a, .bp-navs .current > a, .bp-navs .is-active > a),
html.ks-theme-dark body.ksdm-active :where(.bp-navs .selected > a, .bp-navs .current > a, .bp-navs .is-active > a) {
	background-color: var(--ksdm-button,#253D54);
	color: var(--ksdm-button-text,#FFFFFF);
}

/* WooCommerce-Chrome einschließlich BuddyBoss-Classic-Checkout, nur im Dark-Kontext.
   Vor 0.9.1 färbte `.woocommerce form` jedes Produkt-Kauf-Formular auch im Light
   Mode weiß ein (Meldung Marktplatz vom 19.08.2026). */
html.ksom-dark-mode body.ksdm-active :where(.woocommerce, .woocommerce-page, .woocommerce-MyAccount-content, .woocommerce-MyAccount-navigation, .cart-collaterals, .bb-wc-co, .bb-wc-col, .bb-order-review),
html.ks-theme-dark body.ksdm-active :where(.woocommerce, .woocommerce-page, .woocommerce-MyAccount-content, .woocommerce-MyAccount-navigation, .cart-collaterals, .bb-wc-co, .bb-wc-col, .bb-order-review) {
	color: var(--ksdm-text,#253D54);
}

html.ksom-dark-mode body.ksdm-active :where(.woocommerce form, .woocommerce table.shop_table, .woocommerce .cart_totals, .woocommerce .woocommerce-checkout-review-order, .woocommerce .woocommerce-MyAccount-content, .woocommerce .woocommerce-MyAccount-navigation),
html.ks-theme-dark body.ksdm-active :where(.woocommerce form, .woocommerce table.shop_table, .woocommerce .cart_totals, .woocommerce .woocommerce-checkout-review-order, .woocommerce .woocommerce-MyAccount-content, .woocommerce .woocommerce-MyAccount-navigation) {
	background-color: var(--ksdm-surface,#FFFFFF);
	border-color: var(--ksdm-border,#D8D5CE);
}

html.ksom-dark-mode body.ksdm-active :where(.woocommerce-message, .woocommerce-info, .woocommerce-error),
html.ks-theme-dark body.ksdm-active :where(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
	background-color: var(--ksdm-surface-raised,#F7F6F2);
	border-color: var(--ksdm-accent,#326569);
	color: var(--ksdm-text,#253D54);
}

html.ksom-dark-mode body.ksdm-active .woocommerce-message,
html.ks-theme-dark body.ksdm-active .woocommerce-message,
html.ksom-dark-mode body.ksdm-active :where(.bp-feedback.success, .bp-feedback.updated),
html.ks-theme-dark body.ksdm-active :where(.bp-feedback.success, .bp-feedback.updated) {
	border-color: var(--ksdm-success,#2F7D4F);
}

html.ksom-dark-mode body.ksdm-active .woocommerce-error,
html.ks-theme-dark body.ksdm-active .woocommerce-error,
html.ksom-dark-mode body.ksdm-active :where(.bp-feedback.error, .bp-feedback.warning),
html.ks-theme-dark body.ksdm-active :where(.bp-feedback.error, .bp-feedback.warning) {
	border-color: var(--ksdm-danger,#931204);
}

/* Buttons: nur im Dark-Kontext. Im Light Mode behalten die Plugins ihre eigene
   Buttonfarbe und ihre eigene Schriftfarbe. */
html.ksom-dark-mode body.ksdm-active :where(.button, button, input[type="button"], input[type="submit"]),
html.ks-theme-dark body.ksdm-active :where(.button, button, input[type="button"], input[type="submit"]) {
	border-color: var(--ksdm-button,#253D54);
}

html.ksom-dark-mode body.ksdm-active :where(.button:not(.button-link-delete), .bb-button, .bp-button, .woocommerce button.button, input[type="submit"]),
html.ks-theme-dark body.ksdm-active :where(.button:not(.button-link-delete), .bb-button, .bp-button, .woocommerce button.button, input[type="submit"]) {
	background-color: var(--ksdm-button,#253D54);
	color: var(--ksdm-button-text,#FFFFFF);
}

html.ksom-dark-mode body.ksdm-active :where(.button:not(.button-link-delete), .bb-button, .bp-button, .woocommerce button.button, input[type="submit"]):hover,
html.ks-theme-dark body.ksdm-active :where(.button:not(.button-link-delete), .bb-button, .bp-button, .woocommerce button.button, input[type="submit"]):hover {
	background-color: var(--ksdm-accent,#326569);
	border-color: var(--ksdm-accent,#326569);
	color: var(--ksdm-button-text,#FFFFFF);
}

html.ksom-dark-mode body.ksdm-active.ksdm-dim-images :where(.entry-content img, .et_pb_image img, .activity-inner img):not(.ksdm-keep-light *),
html.ks-theme-dark body.ksdm-active.ksdm-dim-images :where(.entry-content img, .et_pb_image img, .activity-inner img):not(.ksdm-keep-light *) {
	filter: brightness(0.86);
}

/* Fokus-Rahmen: bewusst modusunabhängig, siehe Scope-Regel Punkt 3.
   Tastaturbedienung braucht in beiden Modi einen sichtbaren Rahmen. */
body.ksdm-active :where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--ksdm-accent,#326569);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	html.ksom-dark-mode *,html.ks-theme-dark *{scroll-behavior:auto !important;transition-duration:0.01ms !important}
}
