/* ══════════════════════════════════════════════════════════════════════
   schleumer-ui · basis.css — Grundstil. Setzt tokens.css und schrift.css voraus.
   Reihenfolge der Einbindung: tokens.css, schrift.css, basis.css,
   bausteine.css, zustaende.css, danach die eigene CSS der App (nur Anordnung
   und Fachbausteine, nur Tokens).
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Grund und Schrift. Auch verschachtelte Themen- und Dichte-Bereiche malen
   ihren eigenen Grund, damit der Katalog hell und dunkel nebeneinander zeigt. */
body,
[data-thema],
[data-dichte] {
  background-color: var(--farbe-grund);
  color: var(--farbe-text);
  font-family: var(--schrift-text);
  font-size: var(--schrift-groesse);
  line-height: var(--zeilenhoehe);
}
[data-dichte="luftig"],
[data-dichte="luftig"] body {
  background-color: var(--farbe-grund-luftig);
}

body {
  margin: 0;
  min-height: 100vh;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 9 5 4;
  overflow-wrap: break-word;
}

/* Ausblenden mit hidden wirkt auch, wenn eine Klasse display setzt
   (Leitlinie 000 16, Abschnitt 8, HV-Ablage 29.09.2026). */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--schrift-titel);
  font-weight: 500;
  color: var(--farbe-text-titel);
  line-height: 1.2;
  margin: 0;
  text-wrap: pretty;
}
h1 { font-size: var(--schrift-titel-1); letter-spacing: -0.015em; }
h2 { font-size: var(--schrift-titel-2); }
h3 { font-size: var(--schrift-titel-3); }
h4 { font-size: var(--schrift-groesse); }

p { margin: 0 0 var(--abstand-3); }
p:last-child { margin-bottom: 0; }

img, svg { max-width: 100%; }

/* Links im Fließtext sind immer unterstrichen, Farbe allein reicht nicht
   (WCAG 1.4.1, Website global.css). */
a { color: var(--farbe-text-titel); }
p a, li a, td a, .lesetext a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--farbe-gelb-hover);
}
p a:hover, li a:hover, td a:hover, .lesetext a:hover {
  color: var(--farbe-text);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2.5px solid var(--farbe-fokus);
  outline-offset: 2px;
}

::selection {
  background: var(--farbe-gelb);
  color: var(--farbe-auf-gelb);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border-radius: 0;
  accent-color: var(--farbe-text-titel);   /* R25: Haken, Optionsknöpfe, Regler nie im Systemblau */
}
button { cursor: pointer; }

/* Zahlen in Vergleichs-Kontexten mit fester Ziffernbreite */
.zahl, td.zahl, th.zahl { font-variant-numeric: tabular-nums; }

.leise { color: var(--farbe-text-leise-grund); }
.karte .leise, .merkkasten .leise { color: var(--farbe-text-leise); }
.klein { font-size: var(--schrift-klein); }

/* Nur für Screenreader sichtbar */
.nur-vorlesen {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sprungmarke {
  position: absolute;
  left: var(--abstand-4);
  top: -80px;
  z-index: 100;
  background: var(--farbe-gelb);
  color: var(--farbe-auf-gelb);
  font-family: var(--schrift-titel);
  font-weight: 500;
  padding: var(--abstand-2) var(--abstand-4);
}
.sprungmarke:focus { top: var(--abstand-2); }

/* Seitenrahmen */
.inhalt {
  max-width: var(--breite-inhalt);
  margin: 0 auto;
  padding: var(--abstand-5) var(--abstand-4) var(--abstand-6);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body { background-color: var(--farbe-grund-luftig); }
}
