/* KUKANILEA Systemcheck. Tokens 1:1 aus dem Kanon (kukanilea-fahrtenbuch/styles.css),
   nicht neu erfunden -- eigenstaendige Subdomain, identische Gestaltungsgroessen. */

:root {
  --cream: #ffffff;
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #475569;
  --ink-4: #5a6678;
  --line: #e6ebf1;
  --line-2: #cbd5e1;
  --white: #ffffff;
  --paper: #f4f6f9;
  --blue: #1B4965;
  --blue-2: #123449;
  --blue-soft: #d7e3ea;
  --blue-tint: #eef3f6;
  --green: #18553a;
  --green-soft: #e4f1e9;
  --warn-ink: #97491a;
  --warn-soft: #fde9d4;
  --red-ink: #8a1f2b;
  --red-soft: #fbe0e2;

  --radius: 14px;
  --radius-lg: 20px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 0 rgba(15,23,42,.04), 0 1px 2px rgba(15,23,42,.05);
  --shadow: 0 1px 0 rgba(15,23,42,.04), 0 12px 28px -16px rgba(15,23,42,.16);

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", "SF Mono", "IBM Plex Mono", monospace;
  --maxw: 880px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html body [hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
a { color: var(--blue); }

.sr-only, .sr-only-focusable:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.sr-only-focusable:focus {
  position: static; width: auto; height: auto; margin: 0;
  padding: 10px 16px; background: var(--blue); color: #fff; display: inline-block;
}

/* Fokus sichtbar, und zwar ueberall -- ein Werkzeug, das nur mit Maus
   bedienbar ist, ist nicht fertig. */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Kopf und Fuss ──────────────────────────────────────────────────── */

.kopf { background: var(--white); border-bottom: 1px solid var(--line); }
.kopf-inner { display: flex; align-items: center; min-height: 60px; }
.marke {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 650; letter-spacing: .02em; color: var(--ink);
  text-decoration: none;
}

.fuss {
  margin-top: 56px; padding: 28px 0 40px;
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: 14px;
}
.fuss p { margin: 4px 0; }
.fuss-jahr { color: var(--ink-4); }

main { padding: 36px 0 0; }
h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 0 0 10px; }
.lede { font-size: 18px; color: var(--ink-3); margin: 0 0 32px; max-width: 46rem; }

/* ── Der Einstieg ───────────────────────────────────────────────────── */

.start {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 40px 28px; text-align: center;
}

.btn {
  font: inherit; font-weight: 600; cursor: pointer;
  background: var(--blue); color: #fff;
  border: 1px solid var(--blue); border-radius: var(--radius-sm);
  padding: 12px 22px; transition: background .15s ease;
  /* 44 px Mindesthoehe -- auf dem Telefon ist alles darunter Gluecksspiel. */
  min-height: 44px;
}
.btn:hover { background: var(--blue-2); }
.btn--gross {
  font-size: 20px; padding: 20px 56px; border-radius: var(--radius);
  min-height: 64px; width: 100%; max-width: 420px;
}
.btn--leise {
  background: var(--white); color: var(--blue); border-color: var(--line-2);
}
.btn--leise:hover { background: var(--blue-tint); }
.btn--klein { padding: 8px 16px; font-size: 15px; }
.btn:disabled { opacity: .6; cursor: progress; }
/* Der grosse Startknopf ist einen Wimpernschlag lang deaktiviert, bis das
   Modul geladen hat. Sichtbar deaktiviert, damit ein Klick darauf nicht wie
   ein verschluckter Klick wirkt -- am 2026-09-17 zweimal selbst erlebt. */
.btn--gross:disabled { background: var(--line-2); border-color: var(--line-2); }
.btn--gross:disabled::after { content: " …"; }

/* Die Dauer gehoert auf den Knopf, nicht in eine Fussnote: sie ist Teil der
   Entscheidung, nicht ihre Erlaeuterung. */
.btn-dauer {
  display: block; margin-top: 4px;
  font-size: 13px; font-weight: 400; opacity: .85;
  letter-spacing: .01em;
}
.btn--gross:disabled::after { content: ""; }

.start-zweitweg {
  margin: 14px 0 0;
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
}
.start-zweitweg-text { color: var(--ink-4); font-size: 14px; }

.start-umfang {
  margin: 20px 0 0; color: var(--ink-3); font-size: 15px;
}
.start-unterschied {
  margin: 14px auto 0; max-width: 40rem;
  color: var(--ink-4); font-size: 14px; line-height: 1.5;
}
.start-hinweis {
  margin: 18px auto 0; max-width: 40rem;
  color: var(--ink-4); font-size: 14px; line-height: 1.5;
}

/* ── Fortschritt ────────────────────────────────────────────────────── */

.lauf {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm);
}
.lauf-kopf {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 12px; gap: 16px;
}
.lauf-schritt { font-weight: 600; }
/* Tabellenziffern, damit die Zahl beim Zaehlen nicht in der Breite zappelt --
   bei einer Nachkommastelle aendert sie sich mehrmals je Sekunde. */
.lauf-zahl {
  font-variant-numeric: tabular-nums; color: var(--ink-3);
  white-space: nowrap;
}
.lauf-technik {
  margin: 0 0 12px; color: var(--ink-4);
  font-size: 13px; line-height: 1.4;
  /* Eine leere Technikzeile darf die Kopfzeile nicht verschieben. */
  min-height: 1.4em;
}
.lauf-bereiche {
  margin: 10px 0 0; color: var(--ink-4); font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.lauf-balken {
  height: 10px; background: var(--blue-tint);
  border-radius: 999px; overflow: hidden;
}
/* `transform` statt `width`.
 *
 * Eine Breitenanimation erzwingt bei jedem Bild Layout und Anstrich; eine
 * Transformation laeuft im Compositor. Der Unterschied war hier nicht
 * theoretisch: die Gegenprobe vom 2026-09-17 fand waehrend JEDER Messphase
 * eine laufende `width`-Transition an genau diesem Balken -- waehrend
 * nebenan Rechenzeit und Durchsatz gemessen wurden.
 *
 * Der Balken ist jetzt volle Breite und wird gestaucht; `transform-origin`
 * haelt ihn links verankert. */
.lauf-balken-fuellung {
  height: 100%; width: 100%; background: var(--blue);
  border-radius: 999px;
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .3s ease;
}
/* Waehrend einer Messung springt er statt zu gleiten. Drei Zehntelsekunden
   Bewegung sind kein Gewinn, wenn daneben Millisekunden gezaehlt werden. */
body.misst .lauf-balken-fuellung { transition: none; }
.lauf-hinweis { margin: 16px 0 0; color: var(--ink-4); font-size: 14px; }

/* ── Ergebnis ───────────────────────────────────────────────────────── */

.ergebnis-kopf { margin: 8px 0 24px; }
.ergebnis-kopf h2 { margin: 0 0 6px; font-size: 26px; }
.ergebnis-kopf h2:focus { outline: none; }
.ergebnis-kopf h2:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.bilanz { margin: 0 0 16px; color: var(--ink-3); font-size: 15px; }
.ergebnis-aktionen { display: flex; flex-wrap: wrap; gap: 10px; }

#berichtBereich { margin: 0 0 24px; }
#berichtBereich label { display: block; margin-bottom: 6px; font-weight: 600; }
#berichtFeld {
  width: 100%; font-family: var(--font-mono); font-size: 13px;
  padding: 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}

.ergebnisse { display: grid; gap: 18px; }

.karte {
  background: var(--white); border: 1px solid var(--line);
  border-left: 4px solid var(--line-2);
  border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.karte--ok { border-left-color: var(--green); }
.karte--hinweis { border-left-color: var(--warn-ink); }
.karte--problem { border-left-color: var(--red-ink); }
.karte--unbekannt { border-left-color: var(--line-2); }
.karte--info { border-left-color: var(--blue); margin-top: 18px; }

.karte-kopf {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
}
.karte-titel { margin: 0; font-size: 20px; }
.karte-zweck { margin: 2px 0 16px; color: var(--ink-4); font-size: 14px; }
.karte-fussnote { color: var(--ink-4); font-size: 14px; margin: 12px 0 0; }

.karte-status {
  font-size: 14px; font-weight: 600; padding: 4px 12px;
  border-radius: 999px; white-space: nowrap;
}
.karte-status--ok { background: var(--green-soft); color: var(--green); }
.karte-status--hinweis { background: var(--warn-soft); color: var(--warn-ink); }
.karte-status--problem { background: var(--red-soft); color: var(--red-ink); }
.karte-status--unbekannt { background: var(--paper); color: var(--ink-4); }

.befunde { display: grid; gap: 2px; }
.befund-zeile { display: grid; gap: 2px; }

.befund {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: baseline; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.befund:last-child { border-bottom: 0; }
.befund-marke { font-weight: 700; text-align: center; }
.befund--ok .befund-marke { color: var(--green); }
.befund--hinweis .befund-marke { color: var(--warn-ink); }
.befund--problem .befund-marke { color: var(--red-ink); }
.befund--unbekannt .befund-marke { color: var(--ink-4); }

.befund-titel { color: var(--ink-2); }
.befund-wert {
  font-family: var(--font-mono); font-size: 14px;
  color: var(--ink); text-align: right; font-variant-numeric: tabular-nums;
}
.befund-wert--leer { color: var(--ink-4); font-style: italic; }

/* Die Herkunft steht kleiner daneben -- sie relativiert den Wert, sie ersetzt
   ihn nicht. Eine Browser-Selbstauskunft darf nicht wie eine Messung wirken. */
.befund-quelle {
  grid-column: 3; font-size: 12px; color: var(--ink-4);
  text-align: right; font-style: italic;
}
.befund-hinweis {
  grid-column: 2 / -1; margin: 0 0 10px 34px;
  color: var(--ink-4); font-size: 14px; line-height: 1.5;
}

.liste { margin: 8px 0 0; padding-left: 20px; color: var(--ink-3); }
.liste li { margin: 4px 0; }

/* ── Detailwerkzeuge ────────────────────────────────────────────────── */

.werkzeuge {
  margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px;
}
.werkzeuge summary {
  cursor: pointer; font-weight: 600; color: var(--blue);
  padding: 6px 0; min-height: 32px;
}
.werkzeug-zeile {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0;
}
.werkzeug-feld {
  font: inherit; padding: 9px 12px; min-height: 44px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink);
}
.werkzeug-feld[type="text"] { flex: 1 1 14rem; min-width: 0; }
.werkzeug-ausgabe {
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px;
  margin: 0; white-space: pre-wrap; word-break: break-all; min-height: 2.5em;
}

/* ── Fragen ─────────────────────────────────────────────────────────── */

.hinweise { margin-top: 48px; }
.hinweise h2 { font-size: 22px; margin: 0 0 12px; }
.hinweise details {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 8px;
}
.hinweise summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.hinweise p { margin: 10px 0 0; color: var(--ink-3); }

/* ── Telefon ────────────────────────────────────────────────────────── */

@media (max-width: 560px) {
  main { padding-top: 24px; }
  .start { padding: 28px 18px; }
  .btn--gross { font-size: 18px; padding: 18px 24px; }
  .karte { padding: 18px 16px; }
  /* Wert unter den Titel statt daneben: nebeneinander bleiben bei langen
     Bezeichnungen zwei Zeichen fuer den Messwert uebrig. */
  .befund { grid-template-columns: 24px 1fr; }
  .befund-wert, .befund-quelle { grid-column: 2; text-align: left; }
  .befund-hinweis { margin-left: 34px; }
}

/* ── Druck ──────────────────────────────────────────────────────────── */

@media print {
  .kopf, .fuss, .start, .lauf, .ergebnis-aktionen, .hinweise,
  .werkzeuge, #berichtBereich { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .karte { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .container { max-width: none; padding: 0; }
}

/* ── Lifecycle: Historie, Vergleich, Speicher ───────────────────────── */

.scan-kennung {
  margin: 0 0 14px; color: var(--ink-4); font-size: 13px;
  font-family: var(--font-mono);
}

.block {
  margin-top: 40px; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.block h2 { margin: 0 0 6px; font-size: 22px; }
.block h2:focus { outline: none; }
.block h2:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.block-zweck { margin: 0 0 16px; color: var(--ink-3); font-size: 15px; }
.block-zahl { margin: 0 0 12px; color: var(--ink-4); font-size: 14px; }
.block-fussnote { margin: 16px 0 0; color: var(--ink-4); font-size: 14px; }

.hinweis-zeile {
  margin: 12px 0 0; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--blue-tint); color: var(--ink-2); font-size: 14px;
}

/* Export */
.export { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.export summary {
  cursor: pointer; font-weight: 600; color: var(--blue); min-height: 32px;
  padding: 6px 0;
}
.export-hinweis { margin: 10px 0; color: var(--ink-4); font-size: 14px; }
.export-stufe {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 16px 0 4px; padding: 12px 14px;
  background: var(--paper); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink-3); line-height: 1.5;
}
.export-stufe input { margin-top: 3px; width: 18px; height: 18px; flex: none; }

/* Historie */
.historie-tag {
  margin: 18px 0 6px; font-size: 14px; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .04em; font-weight: 600;
}
.historie-tag:first-child { margin-top: 0; }
.historie-eintrag {
  display: flex; align-items: stretch; gap: 8px;
  border-bottom: 1px solid var(--line);
}
.historie-oeffnen {
  flex: 1; display: grid; gap: 12px; align-items: baseline;
  grid-template-columns: 5rem 1fr auto;
  font: inherit; text-align: left; cursor: pointer;
  background: none; border: 0; padding: 12px 4px; min-height: 44px;
  border-radius: var(--radius-sm); color: var(--ink);
}
.historie-oeffnen:hover { background: var(--blue-tint); }
.historie-zeit { font-family: var(--font-mono); font-size: 14px; }
.historie-umfang { color: var(--ink-3); font-size: 14px; }
.historie-bilanz { color: var(--ink-4); font-size: 13px; }
.historie-loeschen {
  font: inherit; font-size: 14px; cursor: pointer; color: var(--ink-4);
  background: none; border: 0; padding: 0 12px; min-height: 44px;
  border-radius: var(--radius-sm);
}
.historie-loeschen:hover { background: var(--red-soft); color: var(--red-ink); }

.import-zeile { display: block; }
.import-zeile input { display: block; margin-top: 8px; font: inherit; }

/* Vergleich */
.vergleich-kopf {
  margin: 0 0 14px; font-family: var(--font-mono); font-size: 14px;
  color: var(--ink-3);
}
.vergleich-zeile {
  display: grid; gap: 10px; align-items: baseline;
  grid-template-columns: 1fr auto auto auto auto;
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.vergleich-zeile--neu, .vergleich-zeile--weg {
  grid-template-columns: 1fr; color: var(--ink-3); font-size: 14px;
}
.vergleich-titel { color: var(--ink-2); }
.vergleich-vorher { color: var(--ink-4); font-family: var(--font-mono); font-size: 14px; }
.vergleich-pfeil { color: var(--ink-4); }
.vergleich-nachher { font-family: var(--font-mono); font-size: 14px; font-weight: 600; }
.vergleich-delta {
  font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
}
/* Bewusst neutral eingefaerbt: mehr ist nicht immer besser -- bei der Latenz
   ist ein Plus die schlechtere Nachricht. Die Richtung zeigt das Vorzeichen,
   die Bewertung ueberlassen wir dem Leser. */
.vergleich-delta--hoch, .vergleich-delta--runter {
  background: var(--blue-tint); color: var(--blue);
}
.vergleich-leer, .vergleich-fussnote {
  margin: 14px 0 0; color: var(--ink-4); font-size: 14px;
}

/* Speicher */
.speicher-zeile {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 18px;
}
.speicher-zeile label { font-weight: 600; }
.speicher-hinweis { color: var(--ink-4); font-size: 14px; }
.speicher-liste {
  display: grid; grid-template-columns: 14rem 1fr; gap: 8px 16px;
  margin: 0; font-size: 15px;
}
.speicher-liste dt { color: var(--ink-3); }
.speicher-liste dd { margin: 0; color: var(--ink-2); }
.btn--warnung { color: var(--red-ink); border-color: var(--red-soft); }
.btn--warnung:hover { background: var(--red-soft); }

@media (max-width: 560px) {
  .block { padding: 18px 16px; }
  .historie-oeffnen { grid-template-columns: 4.5rem 1fr; }
  .historie-bilanz { grid-column: 2; }
  .vergleich-zeile { grid-template-columns: 1fr auto; }
  .vergleich-titel { grid-column: 1 / -1; }
  .vergleich-pfeil { display: none; }
  .speicher-liste { grid-template-columns: 1fr; gap: 2px 0; }
  .speicher-liste dd { margin-bottom: 12px; }
}

@media print {
  .block, .export, #vergleichBereich { display: none !important; }
}


/* ══ Diagnoseraster ════════════════════════════════════════════════════
 *
 * Ein technisches Instrument, keine Kartenlandschaft. Die Leitgedanken:
 *
 *   Nicht alles ist gleich wichtig.  Die Durchsatzmessung ist der Grund,
 *   warum die meisten diese Seite oeffnen -- sie darf zwei Spalten und
 *   grosse Ziffern haben, waehrend die Browserfaehigkeiten eine Bilanzzeile
 *   sind.
 *
 *   Gruen bedeutet etwas, solange es selten ist.  Bei 65 von 67
 *   unauffaelligen Pruefungen faerbt ein gruener Rahmen je Karte die ganze
 *   Anwendung ein und sagt am Ende nichts. Der Normalzustand ist deshalb
 *   neutral; Farbe traegt nur, wo sie eine Information ist.
 *
 *   Ruhe.  Kein Schatten, kein Verlauf, keine Dauerbewegung. Ein
 *   Diagnosewerkzeug bewegt sich, waehrend es misst, und steht danach still.
 */

.raster-titel {
  margin: 40px 0 12px; font-size: 15px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-4);
}

.ergebnisse {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.ergebnisse > .kachel { grid-column: span var(--spanne, 1); }

@media (max-width: 1000px) {
  .ergebnisse { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ergebnisse > .kachel { grid-column: span min(var(--spanne, 1), 2); }
}
@media (max-width: 640px) {
  .ergebnisse { grid-template-columns: 1fr; }
  .ergebnisse > .kachel { grid-column: 1; }
}

/* ── Die Kachel ─────────────────────────────────────────────────────── */

.kachel {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
/* Nur Auffaelliges traegt Farbe. "In Ordnung" bleibt neutral. */
.kachel--hinweis { border-color: #e8cfa8; }
.kachel--problem { border-color: #e6b3ba; }

.kachel-kopf {
  display: block; padding: 14px 16px 12px; cursor: pointer; list-style: none;
}
.kachel-kopf::-webkit-details-marker { display: none; }
.kachel summary:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

.kachel-kopfzeile {
  display: flex; align-items: center; gap: 9px; min-height: 24px;
}
.kachel-symbol { flex: none; width: 18px; height: 18px; color: var(--ink-4); }
.kachel-symbol .sym {
  width: 18px; height: 18px; display: block;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.kachel-titel {
  flex: 1; min-width: 0; font-size: 12px; font-weight: 650;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3);
}
.kachel-marke {
  flex: none; font-size: 11px; font-weight: 600; padding: 2px 8px;
  border-radius: 4px; white-space: nowrap;
}
.kachel--hinweis .kachel-marke { background: var(--warn-soft); color: var(--warn-ink); }
.kachel--problem .kachel-marke { background: var(--red-soft); color: var(--red-ink); }

/* Ein Chevron statt siebenmal "Details anzeigen". Der zugaengliche Name
   steht am summary; sehend genuegt das Zeichen. */
.kachel-chevron {
  flex: none; color: var(--line-2); font-size: 11px;
  transition: transform .15s ease, color .15s ease;
}
.kachel-kopf:hover .kachel-chevron { color: var(--ink-4); }
.kachel[open] .kachel-chevron { transform: rotate(180deg); color: var(--ink-4); }

/* ── Inhalte ────────────────────────────────────────────────────────── */

.kachel-kurz { display: block; margin-top: 12px; }
.kachel[open] .kachel-kurz { display: none; }

.kachel-liste { display: block; }
.kurz-zeile {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 4px 0; font-size: 13.5px; align-items: baseline;
}
.kurz-titel { color: var(--ink-4); min-width: 0; }
.kurz-wert {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2);
  text-align: right; font-variant-numeric: tabular-nums;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; word-break: break-word;
}
.kurz-wert--leer { color: var(--line-2); }
.kurz-zeile--problem .kurz-wert { color: var(--red-ink); }
.kurz-zeile--hinweis .kurz-wert { color: var(--warn-ink); }

.kachel-bilanzzeile {
  display: block; font-size: 13.5px; color: var(--ink-2);
  padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}

/* Leistung: die Zahl ist der Hauptdarsteller. */
.kachel-leistung { display: block; }
.leistung-reihe { display: flex; gap: 28px; flex-wrap: wrap; }
.leistung-feld { display: block; }
.leistung-zahl {
  display: block; font-size: 30px; font-weight: 600; line-height: 1.05;
  color: var(--ink); font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.leistung-pfeil { font-size: 17px; color: var(--ink-4); margin-left: 3px; }
.leistung-einheit { display: block; font-size: 12px; color: var(--ink-4); margin-top: 2px; }
.leistung-name {
  display: block; font-size: 11px; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .05em; margin-top: 4px;
}
.leistung-neben {
  display: block; margin-top: 14px; padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-4); font-variant-numeric: tabular-nums;
}

/* Zusicherung: der Befund als Aussage. */
.kachel-aussage { display: block; margin-bottom: 8px; }
.aussage-wert {
  display: block; font-size: 17px; font-weight: 600; color: var(--ink);
  line-height: 1.25;
}
.aussage-titel { display: block; font-size: 11.5px; color: var(--ink-4); margin-top: 2px; }

/* Vorschau: nur bei echtem Zeiger, in reservierter Flaeche -- sie schiebt
   nichts im Raster. */
.kachel-vorschau { display: none; }
@media (hover: hover) and (pointer: fine) {
  .kachel-vorschau {
    display: block; max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height .15s ease, opacity .15s ease;
  }
  .kachel:not([open]):hover .kachel-vorschau,
  .kachel:not([open]):focus-within .kachel-vorschau {
    max-height: 6rem; opacity: 1;
  }
  .kachel:not([open]):hover { border-color: var(--line-2); }
}

/* ── Offen ──────────────────────────────────────────────────────────── */

.kachel-details { display: none; padding: 0 16px 16px; }
.kachel[open] .kachel-details { display: block; }
.ergebnisse > details.kachel[open] { grid-column: 1 / -1; }
.kachel[open] .befunde { content-visibility: auto; contain-intrinsic-size: auto 400px; }
.kachel[open] .befund-wert { display: inline; overflow: visible; }

/* ── Waehrend der Messung ───────────────────────────────────────────── */

.kachel--wartet { opacity: .5; }
/* Abstand zum Kategorienamen -- ohne ihn klebt "SYSTEMfertig" zusammen. */
.kachel-lauftext {
  font-size: 12px; color: var(--ink-4); margin-left: auto; padding-left: 10px;
  font-variant: normal; text-transform: none; letter-spacing: 0;
}
.kachel--prueft { border-color: var(--blue-soft); }

/* Ein einziger Aktivitaetsindikator, nur am gerade geprueften Modul.
   Kein Dauerloop nach Abschluss -- ein Instrument bewegt sich, waehrend es
   misst, und steht danach still. */
.kachel--prueft .kachel-symbol { color: var(--blue); animation: sc-atmen 1.4s ease-in-out infinite; }
@keyframes sc-atmen { 0%,100% { opacity: .4 } 50% { opacity: 1 } }
.kachel--fertig .kachel-symbol { animation: sc-fertig .2s ease-out 1; }
@keyframes sc-fertig { from { opacity: .5 } to { opacity: 1 } }

/* Waehrend der Leistungsmessung steht ALLE Bewegung still -- nicht nur die
   Symbole. Die erste Fassung dieser Regel nannte `.kachel-symbol`, und genau
   daran ist sie vorbeigegangen: der Fortschrittsbalken lief weiter. */
body.misst *, body.misst *::before, body.misst *::after {
  animation-play-state: paused !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .kachel-symbol, .kachel-chevron, .kachel-vorschau { animation: none !important; transition: none !important; }
}

/* ── Lifecycle: Utility, kein Messergebnis ──────────────────────────── */

.utility {
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center;
  margin-top: 28px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--white);
  font-size: 13.5px;
}
.utility-block { display: flex; align-items: baseline; gap: 10px; }
.utility-name { font-weight: 600; color: var(--ink-2); }
.utility-wert { color: var(--ink-4); font-variant-numeric: tabular-nums; }
.utility-knopf {
  font: inherit; font-size: 13px; color: var(--blue); background: none;
  border: 0; padding: 4px 6px; cursor: pointer; border-radius: 4px;
  min-height: 32px;
}
.utility-knopf:hover { background: var(--blue-tint); }

/* Historie als Liste, nicht als Karte in der Karte. */
.historie-tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.historie-tabelle th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-4); font-weight: 600;
  padding: 6px 10px 6px 0; border-bottom: 1px solid var(--line);
}
.historie-tabelle td {
  padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line);
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.historie-tabelle tr:last-child td { border-bottom: 0; }
.historie-zeit { font-family: var(--font-mono); font-size: 12.5px; }
.historie-tag-zeile td {
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-4); padding-top: 14px; border-bottom: 0;
}

@media (max-width: 640px) {
  .kachel-kopf { padding: 13px 14px 11px; }
  .kachel-details { padding: 0 14px 14px; }
  .leistung-reihe { gap: 22px; }
  .leistung-zahl { font-size: 26px; }
  .utility { flex-direction: column; align-items: stretch; gap: 14px; }
  .utility-block { justify-content: space-between; }
  .historie-tabelle th:nth-child(3), .historie-tabelle td:nth-child(3) { display: none; }
}

@media print {
  .utility, .raster-titel, .kachel-chevron, .kachel-kurz { display: none !important; }
  .ergebnisse { grid-template-columns: 1fr; }
  .kachel-details { display: block !important; }
}

/* ── Statuskopf und Export ──────────────────────────────────────────── */

.ergebnis-kopf { margin: 4px 0 22px; }
.bilanz { margin: 0 0 4px; font-size: 17px; color: var(--ink); font-weight: 500; }
.scan-kennung {
  margin: 0 0 16px; font-size: 12px; color: var(--ink-4);
  font-family: var(--font-mono);
}
.ergebnis-aktionen { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }

/* Ein Menue statt vier gleichrangiger Knoepfe. */
.export-menue { position: relative; }
.export-menue > summary { list-style: none; display: inline-flex; }
.export-menue > summary::-webkit-details-marker { display: none; }
.export-liste {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0;
  min-width: 17rem; padding: 6px;
  background: var(--white); border: 1px solid var(--line-2);
  border-radius: 8px; box-shadow: var(--shadow);
}
.export-eintrag {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 14px;
  background: none; border: 0; padding: 9px 10px; border-radius: 5px;
  cursor: pointer; color: var(--ink-2); min-height: 40px;
}
.export-eintrag:hover { background: var(--blue-tint); }
.export-stufe {
  display: flex; gap: 9px; align-items: flex-start;
  margin-top: 4px; padding: 10px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3); line-height: 1.45; cursor: pointer;
}
.export-stufe input { margin-top: 2px; width: 16px; height: 16px; flex: none; }
.export-stufe small { color: var(--ink-4); }

/* ── Grenzen und Fragen: ganz unten, geschlossen ────────────────────── */

.grenzen, .hinweise details {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 6px;
}
.grenzen > summary, .hinweise summary {
  cursor: pointer; font-weight: 600; font-size: 14px; min-height: 28px;
  color: var(--ink-2);
}
.grenzen p, .hinweise p { margin: 10px 0 0; color: var(--ink-3); font-size: 14px; }
.grenzen .liste { font-size: 14px; }
.hinweise { margin-top: 36px; }

.historie-aktionen { text-align: right; white-space: nowrap; }
.import-zeile input { font-size: 12px; margin-left: 8px; }

/* ── Touch-Ziele ────────────────────────────────────────────────────────
 *
 * 44 Pixel sind die Untergrenze, unter der Treffen zum Gluecksspiel wird --
 * und das gilt fuer das EINGABEGERAET, nicht fuer die Bildschirmbreite. Der
 * erste Anlauf haing an `max-width: 640px`; auf einem iPad im Querformat
 * (1024 px) griff er deshalb nicht, obwohl dort ausschliesslich getippt wird.
 *
 * `pointer: coarse` fragt genau das Richtige: gibt es hier einen praezisen
 * Zeiger oder einen Finger? Dieselbe Logik wie bei der Hover-Vorschau.
 */
@media (pointer: coarse) {
  .utility-knopf,
  .historie-aktionen button,
  .export-menue > summary,
  .export-eintrag,
  .grenzen > summary,
  .hinweise summary,
  .werkzeuge summary { min-height: 44px; }
  .utility-knopf, .historie-aktionen button { padding: 11px 12px; }
  .grenzen > summary, .hinweise summary { display: flex; align-items: center; }
}

/* ── Der Skip-Link ist ein Tastaturweg, keine Ueberschrift ────────────
   Er hatte hier ueberhaupt kein CSS und stand deshalb als sichtbarer
   Streifen ueber der Seite. Von neun Werkzeugen mit "Zum Inhalt
   springen" traf das am 2026-09-22 drei; die anderen sechs hatten die
   Regel laengst. W3C erlaubt ausdruecklich, ihn visuell auszublenden und
   bei Tastaturfokus hereinzuholen -- entfernt werden darf er nicht.
   `:focus` und nicht `:focus-visible`: er ist mit der Maus gar nicht
   erreichbar, also ist jeder Fokus hier ein Tastaturfokus. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 400;
  background: var(--blue, #1b4965); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }
