/*
 * IT-Dashboard – Stil. Farben und Schrift wie in der Academy (public/css/neu.css):
 * Geist, Teal als Marke. Ampelfarben tragen die Bedeutung nie allein – jede
 * Ampel hat ein Wort daneben.
 */
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/fonts/geist-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/fonts/geist-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(/fonts/geist-mono-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(/fonts/geist-mono-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --grund: #f4f7f7;
  --flaeche: #ffffff;
  --flaeche-leise: #fafcfc;
  --flaeche-tief: #ebeff0;
  --linie: #dee4e5;
  --linie-stark: #c7d0d2;
  --text: #131a1c;
  --text-mittel: #3d4a4d;
  --text-schwach: #566468;
  --akzent: #14707f;
  --akzent-tief: #0c4854;
  --akzent-hell: #e7f3f5;
  --gut: #1a7f4b;
  --gut-hell: #e8f5ee;
  --warn: #9a5f00;
  --warn-punkt: #d48a0c;
  --warn-hell: #fdf3e1;
  --schlecht: #c62828;
  --schlecht-hell: #fdedec;
  --neutral: #8a979b;
  --schatten: 0 1px 2px rgba(16, 24, 28, .05);
  --schatten-hoch: 0 16px 32px -12px rgba(16, 24, 28, .22), 0 2px 6px rgba(16, 24, 28, .06);
  --ring: 0 0 0 3px rgba(20, 112, 127, .25);
  --schrift: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 10px;
  --radius-klein: 6px;
  --kopf-hoehe: 60px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --grund: #0d1315;
    --flaeche: #141c1f;
    --flaeche-leise: #172024;
    --flaeche-tief: #1d292d;
    --linie: #26353a;
    --linie-stark: #35484f;
    --text: #e7eef0;
    --text-mittel: #bccacd;
    --text-schwach: #8fa0a5;
    --akzent: #55b6c4;
    --akzent-tief: #93d6e0;
    --akzent-hell: #12313a;
    --gut: #4fc48c;
    --gut-hell: #11301f;
    --warn: #e6ae47;
    --warn-punkt: #e6ae47;
    --warn-hell: #33270f;
    --schlecht: #f07a72;
    --schlecht-hell: #3b1a19;
    --neutral: #6d7d82;
    --schatten: 0 1px 2px rgba(0, 0, 0, .4);
    --schatten-hoch: 0 16px 32px -12px rgba(0, 0, 0, .7);
    --ring: 0 0 0 3px rgba(85, 182, 196, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --grund: #0d1315;
  --flaeche: #141c1f;
  --flaeche-leise: #172024;
  --flaeche-tief: #1d292d;
  --linie: #26353a;
  --linie-stark: #35484f;
  --text: #e7eef0;
  --text-mittel: #bccacd;
  --text-schwach: #8fa0a5;
  --akzent: #55b6c4;
  --akzent-tief: #93d6e0;
  --akzent-hell: #12313a;
  --gut: #4fc48c;
  --gut-hell: #11301f;
  --warn: #e6ae47;
  --warn-punkt: #e6ae47;
  --warn-hell: #33270f;
  --schlecht: #f07a72;
  --schlecht-hell: #3b1a19;
  --neutral: #6d7d82;
  --schatten: 0 1px 2px rgba(0, 0, 0, .4);
  --schatten-hoch: 0 16px 32px -12px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(85, 182, 196, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--kopf-hoehe) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 400 15px/1.55 var(--schrift);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}
a { color: var(--akzent); text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
code, .mono { font-family: var(--mono); font-size: .86em; }
code {
  background: var(--flaeche-tief);
  border-radius: 4px;
  padding: .05em .35em;
  word-break: break-word;
}
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
.versteckt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Kopf ------------------------------------------------------------------ */

.kopf {
  position: sticky; top: 0; z-index: 20;
  height: var(--kopf-hoehe);
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--flaeche) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--linie);
}
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.marke img { width: 28px; height: 28px; flex: none; }
.marke b { font-weight: 600; font-size: 15px; letter-spacing: -.01em; white-space: nowrap; }
.marke span { color: var(--text-schwach); font-size: 13px; white-space: nowrap; }
.kopf-mitte { flex: 1; display: flex; justify-content: center; min-width: 0; }
.kopf-rechts { display: flex; align-items: center; gap: 10px; color: var(--text-schwach); font-size: 13px; }
.stand-zeit { white-space: nowrap; font-variant-numeric: tabular-nums; }
.knopf {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein);
  background: var(--flaeche); color: var(--text-mittel);
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.knopf:hover { border-color: var(--akzent); color: var(--akzent); }
.knopf.leise { border-color: transparent; background: transparent; }
.knopf.leise:hover { background: var(--flaeche-tief); color: var(--text); }
.knopf svg { width: 16px; height: 16px; }

.gesamt {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px;
  border-radius: 999px; font-size: 13px; font-weight: 500;
  border: 1px solid transparent; text-decoration: none; white-space: nowrap;
}
.gesamt.gut { background: var(--gut-hell); color: var(--gut); }
.gesamt.warn { background: var(--warn-hell); color: var(--warn); }
.gesamt.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.gesamt.unbekannt { background: var(--flaeche-tief); color: var(--text-schwach); }

/* --- Rahmen und Navigation -------------------------------------------------- */

.rahmen {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}
.navi {
  position: sticky; top: calc(var(--kopf-hoehe) + 24px);
  align-self: start;
  display: flex; flex-direction: column; gap: 2px;
}
.navi a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: var(--radius-klein);
  color: var(--text-mittel); text-decoration: none; font-size: 14px;
}
.navi a:hover { background: var(--flaeche-tief); color: var(--text); }
.navi a.aktiv { background: var(--akzent-hell); color: var(--akzent-tief); font-weight: 500; }
.navi .zahl {
  margin-left: auto; font-size: 12px; color: var(--text-schwach);
  font-variant-numeric: tabular-nums;
}
.navi .trenner { height: 1px; background: var(--linie); margin: 8px 10px; }

main { min-width: 0; display: flex; flex-direction: column; gap: 40px; }

section > header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
.unterzeile { color: var(--text-schwach); font-size: 14px; }
section > header .unterzeile { flex-basis: 100%; margin-top: 2px; max-width: 70ch; }

/* --- Ampel ------------------------------------------------------------------ */

.punkt {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: var(--neutral); flex: none;
}
.punkt.gut { background: var(--gut); }
.punkt.warn { background: var(--warn-punkt); }
.punkt.schlecht { background: var(--schlecht); box-shadow: 0 0 0 3px var(--schlecht-hell); }
.ampel { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13px; }
.ampel.gut { color: var(--gut); }
.ampel.warn { color: var(--warn); }
.ampel.schlecht { color: var(--schlecht); font-weight: 500; }
.ampel.unbekannt { color: var(--text-schwach); }

.marker {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; line-height: 18px; white-space: nowrap;
  background: var(--flaeche-tief); color: var(--text-mittel);
}
.marker.eigen { background: var(--akzent-hell); color: var(--akzent-tief); }
.marker.extern { background: var(--warn-hell); color: var(--warn); }
.marker.gut { background: var(--gut-hell); color: var(--gut); }
.marker.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.marker.warn { background: var(--warn-hell); color: var(--warn); }

/* --- Bausteine ---------------------------------------------------------------- */

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
}
.raster { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.raster.schmal { grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }

.kachel { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
a.kachel:hover { border-color: var(--linie-stark); box-shadow: var(--schatten-hoch); }
.kachel .titel { display: flex; align-items: center; gap: 8px; color: var(--text-schwach); font-size: 13px; }
.kachel .wert { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kachel .wert small { font-size: 14px; font-weight: 400; color: var(--text-schwach); letter-spacing: 0; }
.kachel .zusatz { font-size: 13px; color: var(--text-schwach); }

.lage {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--linie);
  background: var(--flaeche);
}
.lage.gut { border-color: color-mix(in srgb, var(--gut) 35%, var(--linie)); background: var(--gut-hell); }
.lage.warn { border-color: color-mix(in srgb, var(--warn) 35%, var(--linie)); background: var(--warn-hell); }
.lage.schlecht { border-color: color-mix(in srgb, var(--schlecht) 40%, var(--linie)); background: var(--schlecht-hell); }
.lage .gross { font-size: 17px; font-weight: 600; }
.lage .punkt { margin-top: 7px; width: 11px; height: 11px; }

.hinweise { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hinweise li {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline;
  padding: 10px 16px; border-top: 1px solid var(--linie);
}
.hinweise li:first-child { border-top: 0; }
.hinweise li .punkt { transform: translateY(-1px); }
.hinweise a { font-size: 12px; color: var(--text-schwach); text-decoration: none; white-space: nowrap; }
.hinweise a:hover { color: var(--akzent); }

/* Tabellen: auf schmalen Bildschirmen scrollt nur die Tabelle, nie die Seite. */
.tabelle { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-weight: 500; font-size: 12px; color: var(--text-schwach);
  padding: 10px 14px; border-bottom: 1px solid var(--linie);
  background: var(--flaeche-leise); white-space: nowrap;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--linie); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--flaeche-leise); }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .leise, .leise { color: var(--text-schwach); }
td .klein, .klein { font-size: 12.5px; }
td.eng { white-space: nowrap; }
.tabelle table { min-width: 720px; }

/* Balken (Breite setzt app.js per CSSOM, nicht per style-Attribut). */
.balken { height: 6px; border-radius: 3px; background: var(--flaeche-tief); overflow: hidden; }
.balken > i { display: block; height: 100%; width: 0; background: var(--akzent); border-radius: 3px; }
.balken.warn > i { background: var(--warn-punkt); }
.balken.schlecht > i { background: var(--schlecht); }

dl.fakten { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
dl.fakten dt { color: var(--text-schwach); }
dl.fakten dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* --- Karten für Programme und Systeme ------------------------------------- */

.eintrag { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.eintrag-kopf { display: flex; align-items: flex-start; gap: 10px; }
.eintrag-kopf .name { font-weight: 600; font-size: 15.5px; }
.eintrag-kopf .rechts { margin-left: auto; text-align: right; }
.eintrag p { margin: 0; color: var(--text-mittel); font-size: 14px; }
.eintrag .zeile { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--text-schwach); }
.eintrag .zeile b { font-weight: 500; color: var(--text-mittel); }
details.mehr summary {
  cursor: pointer; color: var(--akzent); font-size: 13px; list-style: none;
  display: inline-flex; align-items: center; gap: 4px;
}
details.mehr summary::-webkit-details-marker { display: none; }
details.mehr summary::before { content: "▸"; font-size: 11px; transition: transform .15s; }
details.mehr[open] summary::before { transform: rotate(90deg); }
details.mehr > div { margin-top: 10px; }
.pruefungen { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--linie); display: flex; flex-direction: column; gap: 8px; }
.pruefungen .zeile { color: var(--text-mittel); }
.takte { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-mittel); }

/* --- Landkarte -------------------------------------------------------------- */

/* Seitenleiste neben der Karte nur, wenn der Platz reicht; sonst darunter. */
.karte-aussen { container-type: inline-size; }
.karte-huelle { display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.karte-flaeche { overflow-x: auto; overflow-y: hidden; padding: 16px 12px 12px 16px; border-bottom: 1px solid var(--linie); }
.karte-flaeche svg { display: block; width: 100%; min-width: 760px; max-width: 1000px; height: auto; margin: 0 auto; }
.legende { grid-column: 1 / -1; }
@container (min-width: 1060px) {
  .karte-huelle { grid-template-columns: minmax(0, 1fr) 300px; }
  .karte-flaeche { border-bottom: 0; border-right: 1px solid var(--linie); }
}
.karte-seite { padding: 18px; display: flex; flex-direction: column; gap: 12px; min-width: 0; background: var(--flaeche-leise); }
.karte-seite .leer { color: var(--text-schwach); font-size: 14px; }
.karte-seite ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.karte-seite li { font-size: 13px; line-height: 1.45; }
.karte-seite li b { font-weight: 500; }
.karte-seite dl.fakten { grid-template-columns: 1fr; gap: 0; }
.karte-seite dl.fakten dt { font-size: 12px; }
.karte-seite dl.fakten dd { margin-bottom: 8px; font-size: 13.5px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px; border-top: 1px solid var(--linie); font-size: 12.5px; color: var(--text-schwach); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }

svg .spur-titel { font: 600 11px var(--schrift); letter-spacing: .08em; text-transform: uppercase; fill: var(--text-schwach); }
svg .gruppe-rahmen { fill: var(--flaeche-leise); stroke: var(--linie-stark); stroke-dasharray: 4 3; }
svg .gruppe-titel { font: 600 12px var(--schrift); fill: var(--text-mittel); }
svg .gruppe-unter { font: 400 11px var(--mono); fill: var(--text-schwach); }
svg .knoten { cursor: pointer; }
svg .knoten rect.koerper { fill: var(--flaeche); stroke: var(--linie-stark); stroke-width: 1; transition: stroke .12s; }
svg .knoten:hover rect.koerper, svg .knoten:focus-visible rect.koerper { stroke: var(--akzent); }
svg .knoten.gewaehlt rect.koerper { stroke: var(--akzent); stroke-width: 2; }
svg .knoten:focus { outline: none; }
svg .knoten text.name { font: 500 12.5px var(--schrift); fill: var(--text); }
svg .knoten text.unter { font: 400 11px var(--schrift); fill: var(--text-schwach); }
svg .knoten circle.ampel-punkt { fill: var(--neutral); }
svg .knoten.gut circle.ampel-punkt { fill: var(--gut); }
svg .knoten.warn circle.ampel-punkt { fill: var(--warn-punkt); }
svg .knoten.schlecht circle.ampel-punkt { fill: var(--schlecht); }
svg .knoten.schlecht rect.koerper { stroke: var(--schlecht); }
svg .knoten.extern rect.koerper { stroke-dasharray: 3 2; }
svg .kante { fill: none; stroke: var(--linie-stark); stroke-width: 1.2; transition: opacity .12s, stroke .12s; }
svg .kante.adresse { stroke: color-mix(in srgb, var(--akzent) 35%, var(--linie-stark)); }
svg .kante.gestoert { stroke: var(--schlecht); stroke-dasharray: 5 4; }
svg .kante.hell { stroke: var(--akzent); stroke-width: 2; }
svg.fokus .kante:not(.hell) { opacity: .12; }
svg.fokus .knoten:not(.nah) { opacity: .4; }
svg .pfeil { fill: var(--linie-stark); }
svg .pfeil-hell { fill: var(--akzent); }

/* --- Offene Punkte ------------------------------------------------------------ */

.befunde { display: flex; flex-direction: column; gap: 10px; }
.befund { padding: 14px 18px; border-left: 3px solid var(--linie-stark); border-radius: 0 var(--radius) var(--radius) 0; display: grid; grid-template-columns: 88px 1fr; gap: 4px 16px; }
.befund.hoch { border-left-color: var(--schlecht); }
.befund.mittel { border-left-color: var(--warn-punkt); }
.befund.niedrig { border-left-color: var(--akzent); }
.befund.erledigt { border-left-color: var(--gut); opacity: .8; }
.befund .stufe { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.befund.hoch .stufe { color: var(--schlecht); }
.befund.mittel .stufe { color: var(--warn); }
.befund.niedrig .stufe { color: var(--akzent); }
.befund.erledigt .stufe { color: var(--gut); }
.befund h3 { grid-column: 2; }
.befund p { grid-column: 2; margin: 2px 0 0; color: var(--text-mittel); font-size: 14px; max-width: 80ch; }
.befund .seit { grid-column: 2; font-size: 12px; color: var(--text-schwach); }
.befund pre { grid-column: 2; margin: 6px 0 0; padding: 8px 10px; background: var(--flaeche-tief); border-radius: 6px; font: 12px/1.6 var(--mono); overflow-x: auto; }

/* --- Hinweisleisten und Fuß ------------------------------------------------- */

.leiste {
  display: none; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: 14px;
  border-bottom: 1px solid var(--linie);
}
.leiste.sichtbar { display: flex; }
.leiste.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.leiste.warn { background: var(--warn-hell); color: var(--warn); }

.fuss { color: var(--text-schwach); font-size: 13px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--linie); padding-top: 18px; }
.fuss ul { margin: 6px 0 0; padding-left: 18px; font-family: var(--mono); font-size: 12px; }

[data-abstand] { margin-top: 14px; }
.stapel { display: flex; flex-direction: column; gap: 14px; }
[data-stapel] { margin-bottom: 14px; }
.laden { padding: 40px; text-align: center; color: var(--text-schwach); }

/* --- Anmeldung -------------------------------------------------------------- */

.anmelden-seite { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.anmelden-karte { width: min(100%, 380px); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.anmelden-karte h1 { font-size: 20px; }
.anmelden-karte label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-mittel); }
.anmelden-karte input {
  height: 40px; padding: 0 12px; font: inherit; font-size: 15px;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-klein);
  background: var(--flaeche); color: var(--text);
}
.anmelden-karte input:focus { outline: none; border-color: var(--akzent); box-shadow: var(--ring); }
.anmelden-karte button[type=submit] {
  height: 40px; border: 0; border-radius: var(--radius-klein);
  background: var(--akzent); color: #fff; font-weight: 500; cursor: pointer;
}
.anmelden-karte button[type=submit]:hover { background: var(--akzent-tief); }
.meldung { padding: 10px 12px; border-radius: var(--radius-klein); font-size: 14px; display: none; }
.meldung.sichtbar { display: block; }
.meldung.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.meldung.gut { background: var(--gut-hell); color: var(--gut); }

/* --- Schmale Bildschirme ------------------------------------------------------ */

@media (max-width: 1100px) {
  .rahmen { grid-template-columns: minmax(0, 1fr); padding: 0 16px 64px; gap: 0; }
  .navi {
    position: sticky; top: var(--kopf-hoehe); z-index: 10;
    flex-direction: row; overflow-x: auto; gap: 4px;
    margin: 0 -16px 20px; padding: 8px 16px;
    background: var(--grund); border-bottom: 1px solid var(--linie);
    scrollbar-width: none;
  }
  .navi::-webkit-scrollbar { display: none; }
  .navi a { white-space: nowrap; padding: 6px 10px; }
  .navi .zahl { margin-left: 2px; }
  .navi .trenner { display: none; }
  html { scroll-padding-top: calc(var(--kopf-hoehe) + 64px); }
}
@media (max-width: 640px) {
  .kopf { padding: 0 16px; gap: 10px; }
  .marke span, .stand-zeit .lang, .kopf .nutzer { display: none; }
  .kopf-mitte { justify-content: flex-end; }
  .gesamt { padding: 0 10px; }
  .gesamt .lang { display: none; }
  .befund { grid-template-columns: 1fr; }
  .befund h3, .befund p, .befund .seit, .befund pre { grid-column: 1; }
  .hinweise li { grid-template-columns: auto 1fr; }
  .hinweise li a { grid-column: 2; }
  .kachel .wert { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .kopf, .navi, .leiste { display: none !important; }
  .rahmen { display: block; padding: 0; }
  body { background: #fff; }
}
