/* ══════════════════════════════════════════════════════════════════════════
   SiteAudit – Oberflaeche.
   Designsystem „Nocturne“: dunkler Grund, ein Akzent, Inter fuer Text und
   eine Monospace fuer alles Gemessene. Das Werkzeug erfuellt selbst, was es
   prueft: WCAG 2.2 AA, responsive, ohne Build-Schritt.
   ══════════════════════════════════════════════════════════════════════ */

/* Die @font-face-Regeln liefert der Server unter /fonts/fonts.css – und zwar
   nur fuer Dateien, die tatsaechlich vorhanden sind (siehe public/fonts/).
   Fehlen sie, greift lueckenlos der Systemschriftstapel. */

:root {
  color-scheme: dark;

  --bg: #161826;
  --surface: #1d1f2c;
  --surface-2: #232532;
  --line: #3f424d;
  --line-2: #595d6c;
  --text: #e9e9ed;
  --muted: #9397ab;
  --dim: #8a8ea2;   /* 4,68:1 auf --surface-2 – erfuellt WCAG 2.2 AA */

  --accent: #9184d9;
  --accent-soft: #5d5294;
  --accent-ghost: #2b2741;

  --ok: #6fbf8b;
  --warn: #d9c184;
  --bad: #e08a8a;
  --blocker: #d96b6b;

  --sev-blocker: #d96b6b;
  --sev-critical: #e08a8a;
  --sev-high: #d9a97e;
  --sev-medium: #d9c184;
  --sev-low: #8fa8c9;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 44px;

  --r-sm: 4px; --r-md: 8px; --r-lg: 14px;
  --shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 0 0 1px var(--line-2), 0 16px 40px rgba(0, 0, 0, 0.6);

  --header-h: 52px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5fe;
  --surface: #fbfbff;
  --surface-2: #e9ebf7;
  --line: #cfd3e5;
  --line-2: #b2b6ca;
  --text: #292b31;
  --muted: #595d6c;
  --dim: #636778;   /* 4,73:1 auf --surface-2 */
  --accent: #5d5294;
  --accent-soft: #b5abfc;
  --accent-ghost: #e7e5fe;
  --ok: #2f7d4c;
  --warn: #8a6d20;
  --bad: #a83c3c;
  --blocker: #922f2f;
  --sev-blocker: #922f2f;
  --sev-critical: #a83c3c;
  --sev-high: #8a5a20;
  --sev-medium: #7a6620;
  --sev-low: #3f5f8a;
  --shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(30, 34, 60, 0.08);
  --shadow-lg: 0 0 0 1px var(--line-2), 0 14px 34px rgba(30, 34, 60, 0.14);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 { font-weight: 500; line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 var(--sp-2); }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 var(--sp-3); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
img { display: block; max-width: 100%; }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
/* Nach jedem Seitenwechsel wandert der Fokus in den Inhaltsbereich, damit
   Screenreader die neue Ansicht ansagen. Ein Rahmen um die gesamte Seite wäre
   dabei nur Rauschen – die Fokusmarkierung bleibt den Bedienelementen. */
#view:focus, #view:focus-visible { outline: none; }
::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); }

.mono { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* Nur fuer Screenreader – Sprunglink und Statusmeldungen */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--sp-3); top: -60px; z-index: 200;
  background: var(--surface); color: var(--text); padding: 10px 16px;
  border: 1px solid var(--accent); border-radius: var(--r-md); transition: top .15s;
}
.skip-link:focus { top: var(--sp-3); }

/* ── Kopfzeile ─────────────────────────────────────────────────────────── */
.appbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: var(--sp-4);
  height: var(--header-h); padding: 0 var(--sp-5);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.appbar__brand {
  display: flex; align-items: center; gap: var(--sp-2);
  font-weight: 600; font-size: 13px; letter-spacing: .06em;
  color: var(--text); text-decoration: none;
}
.appbar__brand svg { color: var(--accent); }
.appbar__ctx { font-size: 13px; color: var(--muted); }
.appbar nav { display: flex; gap: var(--sp-1); margin-left: var(--sp-2); flex-wrap: wrap; }
.appbar nav a {
  font-size: 13px; color: var(--dim); text-decoration: none;
  padding: 5px 9px; border-radius: var(--r-sm);
}
.appbar nav a:hover { color: var(--text); background: color-mix(in srgb, var(--text) 7%, transparent); }
.appbar nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

.appbar__spacer { flex: 1; }
.appbar__right { display: flex; align-items: center; gap: var(--sp-2); }

/* ── Layout ────────────────────────────────────────────────────────────── */
main { padding: var(--sp-6) var(--sp-5) 80px; max-width: 1420px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: var(--sp-4); margin-bottom: var(--sp-5); flex-wrap: wrap; }
.page-head__text { flex: 1; min-width: 260px; }
.kicker { font-size: 10px; letter-spacing: .11em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
.section { margin-bottom: var(--sp-8); }
.section__head { display: flex; align-items: baseline; gap: var(--sp-3); margin-bottom: var(--sp-3); flex-wrap: wrap; }
.section__head h2 { margin: 0; }

/* ── Schaltflaechen ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font); font-weight: 500; font-size: 13px; line-height: 1.2;
  color: var(--text); background: transparent;
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 8px 13px; cursor: pointer; text-decoration: none;
  min-height: 34px; white-space: nowrap;
}
.btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.btn:active { background: color-mix(in srgb, var(--text) 13%, transparent); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn--primary { color: var(--accent); border-color: var(--accent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.btn--ghost { border-color: transparent; color: var(--muted); padding-inline: 8px; }
.btn--ghost:hover { color: var(--text); }
.btn--sm { font-size: 12px; padding: 5px 9px; min-height: 28px; }
.btn--icon { width: 34px; padding: 0; }
.btn--danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 55%, transparent); }

/* ── Formulare ─────────────────────────────────────────────────────────── */
.field { margin-bottom: var(--sp-3); }
.field > label { display: block; font-size: 12px; margin-bottom: 5px; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 36px; padding: 7px 11px;
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--surface); caret-color: var(--accent);
  border: 1px solid var(--line); border-radius: var(--r-md);
}
.input:hover { border-color: var(--line-2); }
.input:focus-visible { border-color: var(--accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
select.input { cursor: pointer; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.seg button {
  font: inherit; font-size: 12.5px; padding: 6px 12px; min-height: 30px;
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.seg button:hover:not([aria-pressed="true"]) { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }

/* ── Karten & Flaechen ─────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--sp-4);
}
.card--flat { background: transparent; }
.card--link { text-decoration: none; color: inherit; display: block; }
.card--link:hover { border-color: var(--line-2); background: var(--surface-2); color: inherit; }

.grid { display: grid; gap: var(--sp-3); }
.grid--tiles { grid-template-columns: repeat(auto-fill, minmax(min(168px, 100%), 1fr)); }
.grid--projects { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

/* Kopfbereich der Scan-Übersicht: Ring und Diagramme nebeneinander, auf
   schmalen Geräten untereinander. Bewusst ohne feste Mindestbreiten – die
   erzwingen sonst genau das horizontale Scrollen, das die App anmahnt. */
.score-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-6); align-items: center; }
.score-layout__charts { display: flex; gap: var(--sp-5); align-items: center; flex-wrap: wrap; }
.score-layout__radar { flex: 0 1 300px; min-width: 0; }
.score-layout__bars { flex: 1 1 240px; min-width: 0; }
@media (max-width: 1100px) {
  .score-layout { grid-template-columns: 1fr; }
}

/* ── Kennzahlen ────────────────────────────────────────────────────────── */
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.tile__value { display: block; font-size: 23px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile__label { display: block; font-size: 11px; color: var(--dim); margin-top: 5px; }
.tile__hint { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-top: 3px; }
.tile--good .tile__value { color: var(--ok); }
.tile--warn .tile__value { color: var(--warn); }
.tile--bad .tile__value { color: var(--bad); }

/* ── Score-Ring ────────────────────────────────────────────────────────── */
.score { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }
.ring { position: relative; width: 116px; height: 116px; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring__center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
}
.ring__value { font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.ring__label { font-family: var(--mono); font-size: 10px; color: var(--dim); }

/* ── Balken ────────────────────────────────────────────────────────────── */
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 118px 1fr 34px; gap: 10px; align-items: center; }
.bar-row__label {
  display: flex; align-items: center; min-height: 24px;
  font-size: 12.5px; color: var(--muted); text-align: left;
  background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit;
}
.bar-row__label:hover { color: var(--text); }
.bar-track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.bar-fill--ok { background: var(--ok); }
.bar-fill--warn { background: var(--warn); }
.bar-fill--bad { background: var(--bad); }
.bar-row__value { font-family: var(--mono); font-size: 12px; text-align: right; }

/* ── Marken & Schweregrade ─────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 3px 8px; border-radius: var(--r-sm);
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.tag--accent { border-color: var(--accent-soft); color: var(--accent); }
.tag--ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok); }
.tag--mono { font-family: var(--mono); }
.sev {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500; padding: 3px 8px;
  border-radius: var(--r-sm); white-space: nowrap;
  border: 1px solid currentColor;
}
.sev::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; }
.sev--blocker { color: var(--sev-blocker); }
.sev--critical { color: var(--sev-critical); }
.sev--high { color: var(--sev-high); }
.sev--medium { color: var(--sev-medium); }
.sev--low { color: var(--sev-low); }

/* ── Tabellen ──────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--dim); font-weight: 500; padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; background: var(--surface); z-index: 1;
}
table.data th button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }
table.data th button:hover { color: var(--text); }
table.data td { padding: 9px 12px; border-bottom: 1px solid color-mix(in srgb, var(--text) 8%, transparent); vertical-align: top; }
table.data tbody tr:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { font-family: var(--mono); font-size: 12px; text-align: right; }

/* ── Befundliste ───────────────────────────────────────────────────────── */
.findings { display: flex; flex-direction: column; gap: var(--sp-2); }
.finding-row {
  display: grid; grid-template-columns: 30px 1fr auto auto; gap: var(--sp-3);
  align-items: center; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  text-decoration: none; color: inherit;
}
.finding-row:hover { border-color: var(--line-2); background: var(--surface-2); color: inherit; }
.finding-row__rank { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.finding-row__title { font-size: 14px; font-weight: 500; line-height: 1.3; }
.finding-row__meta { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 3px; }
.finding-row__facts { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right; }
.finding-row--accepted { opacity: .55; }
.finding-row--accepted .finding-row__title { text-decoration: line-through; }

/* ── Filterleiste ──────────────────────────────────────────────────────── */
.filters {
  display: flex; gap: var(--sp-2); flex-wrap: wrap; align-items: center;
  padding: var(--sp-3); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); margin-bottom: var(--sp-4);
}
.filters .input { width: auto; min-width: 130px; }
.filters__count { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-left: auto; }

/* ── Befund-Detail ─────────────────────────────────────────────────────── */
.detail-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--sp-5); align-items: start; }
/* Die Lösung bleibt beim Scrollen durch lange Belegtlisten sichtbar. */
.detail-cols > :last-child { position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
@media (max-width: 1080px) {
  .detail-cols { grid-template-columns: 1fr; }
  .detail-cols > :last-child { position: static; }
}

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.panel__head {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--dim);
}
.panel__body { padding: var(--sp-4); }
.panel__body > :last-child { margin-bottom: 0; }

dl.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 5px var(--sp-4); margin: 0; font-size: 13px; }
dl.facts dt { color: var(--dim); }
dl.facts dd { margin: 0; font-family: var(--mono); font-size: 12px; word-break: break-word; }

.occurrence { border-top: 1px solid var(--line); padding: var(--sp-3) var(--sp-4); }
.occurrence:first-child { border-top: 0; }
.occurrence__url { font-family: var(--mono); font-size: 12px; color: var(--accent); word-break: break-all; }
.occurrence__selector {
  display: inline-block; font-family: var(--mono); font-size: 11.5px;
  background: var(--surface-2); padding: 2px 6px; border-radius: var(--r-sm); margin-top: 5px;
  word-break: break-all;
}

pre.code {
  margin: var(--sp-2) 0; padding: 12px 14px; overflow-x: auto;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md);
  font-family: var(--mono); font-size: 12px; line-height: 1.5; tab-size: 2;
}
.code-block { position: relative; }
.code-block__bar {
  display: flex; align-items: center; gap: var(--sp-2);
  font-family: var(--mono); font-size: 10.5px; color: var(--dim); margin-top: var(--sp-3);
}
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 var(--sp-3); }
.steps li {
  counter-increment: step; position: relative; padding-left: 30px; margin-bottom: 10px; font-size: 14px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-ghost); color: var(--accent);
  font-family: var(--mono); font-size: 11px;
}
.verify {
  border-left: 2px solid var(--accent); padding: 2px 0 2px 12px;
  font-size: 13px; color: var(--muted); margin: var(--sp-3) 0 0;
}

/* ── Fortschritt ───────────────────────────────────────────────────────── */
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress__fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s ease; }
.phases { display: flex; flex-direction: column; gap: 2px; margin-top: var(--sp-4); }
.phase { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; font-size: 13px; }
.phase__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); justify-self: center; }
.phase--done .phase__dot { background: var(--ok); }
.phase--active .phase__dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-ghost); }
.phase--active { color: var(--text); }
.phase:not(.phase--active):not(.phase--done) { color: var(--dim); }
.log { font-family: var(--mono); font-size: 11.5px; color: var(--dim); max-height: 190px; overflow-y: auto; }
.log div { padding: 2px 0; border-bottom: 1px solid color-mix(in srgb, var(--text) 5%, transparent); }

/* ── Banner ────────────────────────────────────────────────────────────── */
.banner {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  border: 1px solid var(--line); background: var(--surface); margin-bottom: var(--sp-4); font-size: 14px;
}
.banner--bad { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }
.banner--warn { border-color: color-mix(in srgb, var(--warn) 50%, transparent); background: color-mix(in srgb, var(--warn) 8%, var(--surface)); }
.banner--info { border-color: var(--accent-soft); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.banner p { margin: 0; }
.banner strong { display: block; margin-bottom: 2px; }

/* ── Screenshots ───────────────────────────────────────────────────────── */
.shots { display: flex; gap: var(--sp-3); overflow-x: auto; padding-bottom: var(--sp-3); scroll-snap-type: x proximity; }
.shot { flex: none; scroll-snap-align: start; }
.shot__frame {
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-2); position: relative;
  /* Ganzseiten-Aufnahmen sind unterschiedlich hoch. Eine gemeinsame Hoehe
     macht die Breakpoints vergleichbar; der Rest wird angedeutet. */
  max-height: 480px;
}
.shot__frame img { width: 100%; height: auto; display: block; }
.shot__frame::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
.shot__caption {
  font-family: var(--mono); font-size: 11px; color: var(--dim); margin-top: 6px;
  display: flex; gap: 8px; align-items: baseline; white-space: nowrap;
}
.shot__caption strong { color: var(--muted); font-weight: 500; }
.shot__flag { color: var(--bad); }

/* ── Diagramme ─────────────────────────────────────────────────────────── */
.chart { width: 100%; height: auto; }
.chart text { font-family: var(--mono); font-size: 9.5px; fill: var(--dim); }
.chart--radar { width: 100%; }
.chart .radar-label { fill: var(--muted); font-size: 10px; }
.chart .radar-value { fill: var(--text); font-size: 11px; font-weight: 500; }
.radar-grid { fill: none; stroke: var(--line); stroke-width: 1; }
.radar-area { fill: color-mix(in srgb, var(--accent) 25%, transparent); stroke: var(--accent); stroke-width: 1.5; }
.radar-point { fill: var(--accent); }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.spark-area { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
.spark-dot { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }

/* ── Login ─────────────────────────────────────────────────────────────── */
.login-wrap { min-height: 100dvh; display: grid; place-items: center; padding: var(--sp-5); }
.login { width: min(400px, 100%); }
.login__logo { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-5); }
.login__logo svg { color: var(--accent); }
.login__logo span { font-weight: 600; letter-spacing: .06em; font-size: 14px; }

/* ── Sonstiges ─────────────────────────────────────────────────────────── */
.empty { padding: var(--sp-10) var(--sp-5); text-align: center; color: var(--muted); }
.empty h3 { color: var(--text); }
.spinner {
  width: 15px; height: 15px; border: 2px solid var(--line-2); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast-stack { position: fixed; bottom: var(--sp-5); right: var(--sp-5); z-index: 200; display: flex; flex-direction: column; gap: var(--sp-2); }
.toast {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md);
  padding: 10px 14px; font-size: 13px; box-shadow: var(--shadow-lg); max-width: 340px;
}
.toast--bad { border-color: var(--bad); }
.toast--ok { border-color: var(--ok); }

details.disclosure { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: var(--sp-2); }
details.disclosure > summary { padding: 10px 14px; cursor: pointer; font-size: 13.5px; list-style: none; display: flex; gap: var(--sp-2); align-items: center; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "▸"; color: var(--dim); font-size: 11px; }
details.disclosure[open] > summary::before { content: "▾"; }
details.disclosure > div { padding: 0 14px 14px; }

.dialog-backdrop {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center;
  padding: var(--sp-4); background: color-mix(in srgb, #000 55%, transparent);
}
.dialog {
  width: min(460px, 100%); background: var(--surface); border-radius: var(--r-lg);
  padding: var(--sp-5); box-shadow: var(--shadow-lg);
}
.dialog h3 { margin-bottom: var(--sp-3); }
.dialog__actions { display: flex; justify-content: flex-end; gap: var(--sp-2); margin-top: var(--sp-4); }

@media (max-width: 720px) {
  main { padding: var(--sp-4) var(--sp-3) 60px; }
  .appbar { height: auto; padding: var(--sp-2) var(--sp-3); flex-wrap: wrap; }
  .appbar nav { order: 3; width: 100%; overflow-x: auto; }
  .finding-row { grid-template-columns: 24px 1fr; }
  .finding-row__facts, .finding-row .sev { grid-column: 2; text-align: left; }
  .bar-row { grid-template-columns: 96px 1fr 30px; }
}

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

@media print {
  .appbar, .filters, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
