/* Helle Palette (Schema "default"). Alle Farbwerte der Hilfe laufen ueber
   diese Variablen, damit der dunkle Modus sie geschlossen umschalten kann. */
:root {
  --rillsoft-secondary: #262834;
  --rillsoft-ink: rgba(33, 33, 33, 0.87);
  --rillsoft-ink-dark: #212121;
  --rillsoft-muted: #757575;
  --rillsoft-border: #e0e0e0;
  --rillsoft-surface: #f5f5f5;
  --rillsoft-code-fg: var(--rillsoft-secondary);
  --rillsoft-code-bg: var(--rillsoft-surface);
}

/* Dunkle Palette (Schema "slate", auch im Automatik-Modus bei
   prefers-color-scheme: dark). Ohne diese Ueberschreibungen bliebe der
   Text in den dunklen Flaechen nahezu schwarz und damit unsichtbar.
   Die Werte leiten sich aus den Theme-Variablen ab, damit Kontrast und
   Farbton zum uebrigen Theme passen. */
[data-md-color-scheme="slate"] {
  --rillsoft-ink: var(--md-default-fg-color);
  --rillsoft-ink-dark: var(--md-default-fg-color);
  --rillsoft-muted: var(--md-default-fg-color--light);
  --rillsoft-border: var(--md-default-fg-color--lighter);
  --rillsoft-surface: hsla(var(--md-hue), 15%, 27%, 1);
  --rillsoft-code-fg: var(--md-code-fg-color);
  --rillsoft-code-bg: var(--md-code-bg-color);
  --rillsoft-image-frame: var(--md-default-fg-color--lighter);
}

body,
.md-typeset {
  color: var(--rillsoft-ink);
}

.md-header,
.md-tabs {
  background-color: var(--rillsoft-secondary);
}

.md-header__title,
.md-header__topic,
.md-header__button,
.md-tabs__link {
  color: #fff;
}

.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  max-height: 2rem;
}

.md-search__form {
  background-color: rgba(255, 255, 255, 0.18);
}

.md-search__form:hover {
  background-color: rgba(255, 255, 255, 0.28);
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3 {
  color: var(--rillsoft-ink-dark);
  font-weight: 800;
}

.md-typeset table:not([class]) {
  border-color: var(--rillsoft-border);
}

.md-typeset table:not([class]) th {
  background: var(--rillsoft-surface);
  color: var(--rillsoft-ink-dark);
}

.md-typeset code {
  color: var(--rillsoft-code-fg);
  background: var(--rillsoft-code-bg);
  border-color: var(--rillsoft-border);
}

.md-search-result__meta,
.md-typeset .caption,
.md-typeset figcaption {
  color: var(--rillsoft-muted);
}

.md-typeset .admonition,
.md-typeset details {
  border-color: var(--rillsoft-border);
}

.md-typeset .admonition-title,
.md-typeset summary {
  background-color: var(--rillsoft-surface);
}

.md-grid {
  max-width: 1180px;
}

/* Screenshots und Prozessgrafiken haben einen hellen Hintergrund. Im dunklen
   Modus wirken sie sonst wie ein Loch in der Seite; heller Rahmen und weiche
   Ecke fassen sie als Karte. Die helle Flaeche fuellt zugleich transparente
   Bildbereiche (Fensterecken/Schatten vieler Screenshots), die sonst dunkel
   durchscheinen. Die Bildfarben selbst bleiben unveraendert. */
[data-md-color-scheme="slate"] .md-typeset img:not(.twemoji) {
  background-color: #fff;
  padding: 0.3rem;
  border-radius: 0.2rem;
  box-shadow: 0 0 0 1px var(--rillsoft-image-frame);
}

/* Synonyme fuer die Suche: im Doctree vorhanden und damit indexierbar,
   visuell ausgeblendet (a11y "visually hidden"-Muster). Von seo_extras
   aus search_keywords.yml erzeugt. */
.search-synonyms {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
