/* Schriften, selbst ausgeliefert (Redesign „Rund“, 2026-09-19). Bis dahin
   kamen Roboto und die Symbolschrift bei jedem Start von Google; offline
   fehlten sie. Die Dateien holt scripts/schriften-holen.sh, Herkunft,
   Gewichte und Messwerte stehen in assets/fonts/HERKUNFT.md. Jede Datei
   steht auch in SCHRIFTEN im Service Worker (Vorab-Cache, cache-first) —
   tests/schrift-ausgeliefert.test.js hält beide Listen deckungsgleich.
   Kein ?v=: die Dateinamen werden nie an Ort und Stelle überschrieben. */
@font-face {
  font-family: 'Saira Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/saira-condensed-600-latin.woff2') format('woff2');
}

/* EINE variable Datei für alle Textgewichte. Google liefert sie mit der
   ganzen Achse 100–700; der Bereich 400 600 hält die App auf den drei
   Schnitten der Gestaltungsregeln. Fettdruck (<strong>, 700) erscheint als
   600 — in Chrome gemessen ohne gefälschten Fettdruck. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-sans-400-600-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
}

/* Symbolschrift: nur die Namen aus assets/fonts/symbole.txt, statische
   Instanz wght 300. `block` statt `swap`: eine Ligaturschrift zeigt bis zum
   Laden sonst ihre Namen als Text („check_box“). Die Laufnummer im Namen
   steigt, sobald sich die Namensliste ändert. */
@font-face {
  font-family: 'Material Symbols Rounded';
  font-style: normal;
  font-weight: 300;
  font-display: block;
  src: url('../assets/fonts/material-symbols-rounded-5.woff2') format('woff2');
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Die Schrift-Tokens setzt m3-tokens.css; der Stapel hinter dem Komma trägt,
   falls eines fehlt. */
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--schrift-text, 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif);
  background-color: var(--md-sys-color-background);
  color: var(--md-sys-color-on-background);
  transition: background-color 0.3s, color 0.3s;
  overscroll-behavior-x: none;
}

body {
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
  touch-action: pan-y;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
}

/* Titel in Saira Condensed, nur 600 — das einzige Gewicht der Titelschrift. */
h1, h2, h3 {
  font-family: var(--schrift-titel, 'Saira Condensed', 'Arial Narrow', sans-serif);
  font-weight: 600;
}

/* Code in Plex Mono. Die Größe steht dabei, weil der Browser `monospace`
   allein auf 13 px setzt, einen Stapel mit benannter Schrift davor aber auf
   die volle Textgröße: Inline-Code in einer Chat-Antwort sprang so von 13
   auf 16 px (in Chrome gemessen, 2026-09-19). .875em ergibt dort 14 px;
   Regeln mit eigener Größe (.message-bubble pre, .diff-view) gewinnen. */
code, pre, kbd {
  font-family: var(--schrift-mono, 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace);
  font-size: .875em;
}

/* Ein Knopf in einer Überschrift bleibt in der Textschrift: `button` erbt
   sonst über `font-family: inherit` (weiter unten) die Titelschrift. Auf der
   Systemseite steht „jetzt neu messen“ im <h3> (status-betrieb.js) und
   erschien im Probelauf vom 2026-09-19 in Saira Condensed. */
h1 button, h2 button, h3 button {
  font-family: var(--schrift-text, 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif);
  font-weight: 500;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  text-decoration: none;
  color: inherit;
}

.hidden {
  display: none !important;
}
