/* HistAdress — Grundlage: Reset, Typografie, Fokus, Bewegung. Nur Tokens aus tokens.css (docs/design_system.md).
   Schutzdatei: Änderungen brauchen die Freigabe des Nutzers. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;   /* Zustände tragen eigene Flächen (Recherche 2026-10-23) */
  background: var(--color-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;   /* nicht dvh (R21c, B-20261022-27): kein Neuauslegen beim Ein- und Ausfahren der Safari-Leiste */
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--leading);
  letter-spacing: var(--tracking);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3, h4 { font-size: inherit; font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight); }
/* Umbruch: Überschriften ausgewogen, Fließtext ohne Einzelwort in der letzten Zeile (Recherche 2026-10-23). */
h1, h2, h3, .dialog-title, .empty-title { text-wrap-style: balance; }   /* Langform: lässt nowrap (.truncate) stehen */
p, .prose { text-wrap-style: pretty; }
ul, ol { padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }

a { color: var(--color-accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); text-decoration: underline; }

code, kbd, samp { font-family: var(--font-mono); }

::selection { background: var(--color-selection); }

/* Fokus: überall derselbe Umriss, nie der Browser-Standard. */
:focus { outline: none; }
:focus-visible { outline: var(--ring-focus); outline-offset: var(--ring-offset); }

/* Zahlen in Listen und Zählern: Tabellenziffern. */
.tnum { font-feature-settings: "tnum"; }

/* Nur für Screenreader sichtbar. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: calc(-1 * var(--hairline));
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* Nur am Handy unsichtbar (Name eines Symbol-Knopfs), sonst sichtbar. */
@media (max-width: 759.98px) {
  .sr-only-handy {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: calc(-1 * var(--hairline));
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0s; --dur: 0s; --dur-slow: 0s; --dur-pille: 0s; --dur-puls: 0s; --dur-schimmer: 0s; }
  *, *::before, *::after { animation-duration: var(--dur-fast) !important; scroll-behavior: auto !important; }
}
