/* Norynd-Scan – nüchtern, dicht, gut lesbar. Hell und dunkel. Farben aus dem Logo (Auftrag 08b). */
:root {
  /* Markenfarben aus dem Logo. Nur hier als feste Werte; Regeln nehmen die Variablen darunter. */
  --brand-navy: #0a0f17;
  --brand-navy-2: #111a26;
  --brand-navy-3: #1d2a3b;
  --brand-cyan: #22d3ee;
  --brand-blue: #1e9be0;
  --brand-green: #4ade80;

  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --border: #dce3e8;
  --text: #172a38;
  --text-2: #586b7a;
  /* Links und Hervorhebungen: Blau aus dem Logo, dunkler, damit Text auf Weiß gut lesbar bleibt. */
  --accent: #006d80;
  --accent-ink: #ffffff;
  --accent-soft: #e5f3f4;
  /* Hauptknopf (z. B. „Neuen Scan starten“): dunkel wie der Kopf. */
  --primary: #006d80;
  --primary-ink: #ffffff;
  --primary-icon: #ffffff;
  --danger: #b4232c;
  --danger-soft: #fbe9ea;
  /* Schrift auf rotem Grund (Knopf „Endgültig löschen“): hell 6,5:1 auf --danger. */
  --danger-ink: #ffffff;
  --warn: #8a5a00;
  --warn-soft: #fff3d6;
  /* Stufe „Hoch“: zwischen Warnung und Gefahr (Kacheln, Risikobalken). */
  --high: #d9582b;
  --ok: #1d6b3a;
  --ok-soft: #e3f3e8;
  --info-soft: #e8eef9;
  /* Stufe „Später“ (Lage, Auftrag 23b): ruhiges Blau, nicht die Farbe der Links. */
  --later: #2a4a7a;
  --later-line: #6b8bb8;
  /* Angriffsgraph (Auftrag 76): Weg, der im Szenario geschlossen ist (grau, gestrichelt). */
  --ag-closed: #b9c4cd;
  /* Grund des MFA-QR-Codes: in beiden Modi weiß, sonst lesen manche Apps den Code nicht. */
  --qr-bg: #ffffff;
  --topbar: #ffffff;
  --topbar-2: #f5f7f9;
  --topbar-line: #dce3e8;
  --topbar-text: #586b7a;
  --topbar-strong: #172a38;
  /* Design Kunden-Tenant (23g): Tabellenkopf beim Sortieren, Linie zwischen Zeilen, Hintergrund von Chips. */
  --sort-active: #eef3f8;
  --sort-arrow: #8a99aa;
  --row-line: #edf0f3;
  --neutral-soft: #eef2f5;
  --neutral-ink: #485f70;
  --shadow: 0 8px 28px rgb(23 42 56 / 0.07);
  /* Leiser Schatten der Karten ohne Rail (Anmeldung, Seiten für Kunden; Design 05.11.2026). */
  --card-shadow: 0 16px 60px rgb(20 44 62 / 0.04);
  /* Detailfeld über dem Inhalt (Auftrag 67) */
  --shadow-feld: 0 12px 40px rgb(10 15 23 / 0.14), 0 2px 8px rgb(10 15 23 / 0.06);
  --radius: 12px;
  /* Seitenrand links und rechts: wächst mit der Fensterbreite. Ganz breite Bildschirme begrenzt --page-max. */
  --gutter: clamp(1rem, 2.5vw, 2.5rem);
  --page-max: 2000px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Design 05.11.2026 (Rail): Fokusring, Logo je Darstellung (hell: dunkle Schrift), dunkles Band mit dem Firmenlogo
     (ui.brand_banner) in beiden Darstellungen. */
  --focus: #249bab;
  --logo-on-light: block;
  --logo-on-dark: none;
  --band: var(--brand-navy);
  --band-line: var(--brand-navy-3);
  --band-text: #f2f8fc;
  color-scheme: light;
}
/* Dunkle Werte (Darstellung, Auftrag 23a-2). Dieselbe Liste steht zweimal, weil CSS einen Block nicht zugleich
   abhängig und unabhängig von @media gelten lassen kann:
   1. „Automatisch“ (kein data-theme an <html>) folgt dem Browser; „Hell“ (data-theme="light") schließt sich aus.
   2. „Dunkel“ (data-theme="dark") gilt immer.
   Beide Listen müssen gleich bleiben (tests/test_theme.py prüft das): Neue Farbe in :root oben und in beiden
   Listen hier. Kopf und Rail folgen seit dem Design 05.11.2026 der Darstellung (hell oder dunkel); dunkel bleibt nur
   das Band mit dem Firmenlogo (--band). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111a22;
    --surface: #19252f;
    --surface-2: #1e2c37;
    --border: #334451;
    --text: #e6eef3;
    --text-2: #acbbc6;
    --accent: #78d6df;
    --accent-ink: #10242b;
    --accent-soft: #203e46;
    --primary: #78d6df;
    --primary-ink: #10242b;
    --primary-icon: #10242b;
    --danger: #ef6b72;
    --danger-soft: #3a1a1d;
    /* Weiß erreicht auf dem helleren Rot nur 3,0:1, Dunkelblau 6,4:1 (wie --primary-ink auf Cyan). */
    --danger-ink: var(--brand-navy);
    --warn: #e8b44d;
    --warn-soft: #3a2e14;
    --high: #f08a5d;
    --ok: #5fcf8a;
    --ok-soft: #15301f;
    --info-soft: #18263a;
    --later: #9db8e0;
    --later-line: #5d7da8;
    --ag-closed: #4a5c69;
    --qr-bg: #ffffff;
    --topbar: #19252f;
    --topbar-2: #1e2c37;
    --topbar-line: #334451;
    --topbar-text: #acbbc6;
    --topbar-strong: #e6eef3;
    --sort-active: #1c2836;
    --sort-arrow: #6f8196;
    --row-line: #2c3c48;
    --neutral-soft: #2b3b46;
    --neutral-ink: #cad7df;
    --shadow: 0 12px 32px rgb(0 0 0 / 0.5);
    --card-shadow: 0 16px 60px rgb(0 0 0 / 0.3);
    --shadow-feld: 0 12px 40px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.3);
    --focus: #249bab;
    --logo-on-light: none;
    --logo-on-dark: block;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111a22;
  --surface: #19252f;
  --surface-2: #1e2c37;
  --border: #334451;
  --text: #e6eef3;
  --text-2: #acbbc6;
  --accent: #78d6df;
  --accent-ink: #10242b;
  --accent-soft: #203e46;
  --primary: #78d6df;
  --primary-ink: #10242b;
  --primary-icon: #10242b;
  --danger: #ef6b72;
  --danger-soft: #3a1a1d;
  /* Weiß erreicht auf dem helleren Rot nur 3,0:1, Dunkelblau 6,4:1 (wie --primary-ink auf Cyan). */
  --danger-ink: var(--brand-navy);
  --warn: #e8b44d;
  --warn-soft: #3a2e14;
  --high: #f08a5d;
  --ok: #5fcf8a;
  --ok-soft: #15301f;
  --info-soft: #18263a;
  --later: #9db8e0;
  --later-line: #5d7da8;
  --ag-closed: #4a5c69;
  --qr-bg: #ffffff;
  --topbar: #19252f;
  --topbar-2: #1e2c37;
  --topbar-line: #334451;
  --topbar-text: #acbbc6;
  --topbar-strong: #e6eef3;
  --sort-active: #1c2836;
  --sort-arrow: #6f8196;
  --row-line: #2c3c48;
  --neutral-soft: #2b3b46;
  --neutral-ink: #cad7df;
  --shadow: 0 12px 32px rgb(0 0 0 / 0.5);
  --card-shadow: 0 16px 60px rgb(0 0 0 / 0.3);
  --shadow-feld: 0 12px 40px rgb(0 0 0 / 0.5), 0 2px 8px rgb(0 0 0 / 0.3);
  --focus: #249bab;
  --logo-on-light: none;
  --logo-on-dark: block;
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* Was hidden trägt, bleibt unsichtbar, auch wenn eine Klasse display setzt (z. B. passkey.js). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--sans);
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; }
h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin: 1.25rem 0 0.4rem; }
p { margin: 0 0 0.75rem; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }

/* --- Kopfzeile ------------------------------------------------------------- */
/* Kopf (seit dem Design 05.11.2026 hell bzw. dunkel nach Darstellung): Name, Suche, Kundenwahl, Werkzeuge. Logo und
   Navigation stehen in der Rail. */
.topbar { background: var(--topbar); color: var(--topbar-text); }
.topbar-row { display: flex; align-items: center; gap: 1.25rem; padding: 0.6rem var(--gutter) 0; max-width: var(--page-max); margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 1.1rem; font-weight: 650; color: inherit; letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 24px; width: auto; }
.product { padding-left: 1.1rem; border-left: 1px solid var(--topbar-line); color: var(--topbar-strong); font-size: 0.98rem; }
/* Alte Marke (Quadrat) für Seiten ohne Kopf, z. B. die Anmeldung. */
.brand-mark {
  width: 18px; height: 18px; border-radius: 4px;
  border: 2px solid var(--accent);
  box-shadow: inset 0 0 0 3px var(--topbar), inset 0 0 0 9px var(--accent);
}
.brand-large { font-size: 1.15rem; margin-bottom: 1.5rem; color: var(--text); }
.brand-large .brand-mark { box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 9px var(--accent); }
.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
/* Suche im Kopf: GET /search, ohne JavaScript. */
.topbar-search input[type="search"] {
  width: 17rem; min-width: 0; flex: none; padding: 0.45rem 0.8rem; border-radius: 8px; font: inherit; font-size: 0.88rem;
  background: var(--topbar-2); border: 1px solid var(--topbar-line); color: var(--topbar-strong);
}
.topbar-search input[type="search"]::placeholder { color: var(--topbar-text); opacity: 0.75; }
.topbar-search input[type="search"]:focus { outline: 2px solid var(--brand-cyan); outline-offset: 0; }

/* Rail (Design 05.11.2026): Navigation links, fest am Rand. Gruppen Arbeitsbereich, Pakete, Verwaltung (unten).
   Der aktive Eintrag trägt aria-current und ist hinterlegt (nicht nur Farbe). Maße und Handy-Verhalten im Block
   „Design 05.11.2026 (Rail)“ am Ende. */
.rail {
  position: fixed; inset: 0 auto 0 0; width: 222px; z-index: 35; display: flex; flex-direction: column; gap: 24px;
  padding: 27px 16px 18px; background: var(--surface); border-right: 1px solid var(--border); overflow-y: auto;
}
.rail-brand { display: block; margin: 0 4px; }
.rail-logo { width: 182px; height: auto; }
.rail-logo-light { display: var(--logo-on-light); }
.rail-logo-dark { display: var(--logo-on-dark); }
.rail-caption { font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-2); padding: 0 12px; margin: 0 0 8px; }
.rail-nav { display: grid; gap: 4px; }
.rail a.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 7px;
  color: var(--text-2); font-weight: 500; font-size: 13px;
}
.rail a.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.rail a.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
/* Unterpunkt (13m, Netzkarte unter Inventar): eingerückt; der Oberpunkt bleibt dabei markiert, aber ohne Fläche. */
.rail a.nav-item.nav-sub { padding: 6px 12px 6px 42px; font-size: 12.5px; }
/* Auftrag 63: zweite Ebene unter einem Standort (Funde, Einstellungen, Netzkarte); lange Standortnamen brechen um statt zu verschwinden. */
.rail a.nav-item.nav-sub2 { padding-left: 56px; font-size: 12px; }
.rail a.nav-item.nav-sub span { min-width: 0; overflow-wrap: anywhere; }
.rail a.nav-item[aria-current="true"] { color: var(--accent); font-weight: 700; }
.nav-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* Nicht gebuchte Pakete (Auftrag 23a): leiser, mit Schloss und verstecktem Text. Erreichbar bleiben sie (Vorschau). */
.rail a.nav-item.locked { font-weight: 400; }
.rail a.nav-item.locked .lock-icon { width: 18px; }
.rail-bottom { margin-top: auto; border-top: 1px solid var(--border); padding-top: 16px; }
/* Schalter fürs Handy-Menü: auf dem Desktop weg, auf dem Handy siehe unten. */
.nav-toggle, .mobile-nav-toggle, .mobile-close { display: none; }
.lock-icon { flex: none; vertical-align: -0.1em; }
/* Nur für Screenreader (z. B. „Paket nicht gebucht“ hinter dem Namen eines gesperrten Reiters). */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Kundenwahl im Kopf (nur Berater, Auftrag 23a): <details> mit Links auf die Kunden, ohne JavaScript. */
.pick-button {
  display: inline-flex; align-items: baseline; gap: 0.45rem; max-width: 22rem; padding: 0.4rem 0.75rem;
  border: 1px solid var(--topbar-line); border-radius: 8px; background: var(--topbar-2); color: var(--topbar-strong);
  font-size: 0.9rem; user-select: none;
}
.pick-label { color: var(--topbar-text); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.pick-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pick-caret { color: var(--topbar-text); font-size: 0.75rem; }
.customer-pick:hover > .pick-button, .customer-pick[open] > .pick-button { border-color: var(--brand-cyan); }
.menu-panel.menu-left { left: 0; right: auto; max-height: 70vh; overflow-y: auto; }
.menu-panel a.current { font-weight: 600; }
.menu-panel .menu-all { border-top: 1px solid var(--border); border-radius: 0 0 7px 7px; margin-top: 0.3rem; color: var(--accent); }
.menu-note { padding: 0.55rem 0.7rem; color: var(--text-2); font-size: 0.9rem; }
.menu-hint { color: var(--text-2); font-size: 0.82rem; margin-left: 0.3rem; }
/* Seite eines nicht gebuchten Pakets (packages/page.html): Zustand oben, mit Schloss und Text. */
.package-locked { max-width: 60rem; }
.package-state { display: flex; align-items: center; gap: 0.45rem; font-weight: 650; color: var(--text-2); }

/* Aufklappmenüs im Kopf (Einstellungen, Profil): <details>, also ohne JavaScript. */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.icon-button, .avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.05rem; user-select: none;
}
.icon-button { border: 1px solid var(--topbar-line); background: var(--topbar-2); color: var(--topbar-text); }
.icon-button:hover, .icon-button.current, .menu[open] > .icon-button { color: var(--topbar-strong); border-color: var(--brand-cyan); }
.avatar {
  background: linear-gradient(135deg, var(--brand-cyan), var(--brand-blue)); color: var(--brand-navy);
  font-weight: 700; font-size: 0.8rem; letter-spacing: 0.02em;
}
.menu[open] > .avatar { box-shadow: 0 0 0 2px var(--topbar), 0 0 0 4px var(--brand-cyan); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 0.5rem); z-index: 20; min-width: 15rem;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 0.4rem; display: flex; flex-direction: column;
}
.menu-panel a, .menu-item {
  display: block; width: 100%; text-align: left; padding: 0.55rem 0.7rem; border-radius: 7px;
  color: var(--text); font: inherit; font-size: 0.92rem; background: none; border: 0; cursor: pointer;
}
.menu-panel a:hover, .menu-item:hover { background: var(--surface-2); text-decoration: none; filter: none; }
.menu-panel a[aria-current="page"] { color: var(--accent); font-weight: 600; }
/* Mit Maus öffnen die Menüs schon beim Überfahren (ohne JavaScript über ::details-content). Ältere Browser und
   Touch-Geräte öffnen per Klick. Der unsichtbare Streifen über dem Kasten überbrückt die Lücke zum Knopf. */
@media (hover: hover) and (pointer: fine) {
  .menu:hover::details-content { content-visibility: visible; }
  .menu:hover > .icon-button { color: var(--topbar-strong); border-color: var(--brand-cyan); }
  .menu:hover > .avatar { box-shadow: 0 0 0 2px var(--topbar), 0 0 0 4px var(--brand-cyan); }
}
.menu-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -0.6rem; height: 0.6rem; }
.menu-who { display: flex; flex-direction: column; padding: 0.5rem 0.7rem 0.6rem; margin-bottom: 0.3rem; border-bottom: 1px solid var(--border); }
/* Darstellung im Profilmenü (Auftrag 23a-2): drei Knöpfe nebeneinander, die gewählte Fassung hervorgehoben und mit
   Häkchen (Text, nicht nur Farbe). Absenden ohne JavaScript, der Server leitet zurück. */
.menu-theme { margin: 0.3rem 0; padding: 0.45rem 0.7rem 0.55rem; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
/* Sprache (Auftrag 36) direkt unter der Darstellung: eine Trennlinie statt zwei. */
.menu-theme + .menu-theme { margin-top: -0.3rem; border-top: 0; }
.menu-label { display: block; color: var(--text-2); font-size: 0.78rem; margin-bottom: 0.35rem; }
.theme-choice { display: flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.theme-choice button {
  flex: 1 1 0; margin: 0; padding: 0.35rem 0.4rem; border: 0; border-radius: 0; background: var(--surface);
  color: var(--text); font: inherit; font-size: 0.85rem; cursor: pointer; white-space: nowrap;
}
.theme-choice button + button { border-left: 1px solid var(--border); }
.theme-choice button:hover { background: var(--surface-2); filter: none; }
.theme-choice button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.theme-choice button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* --- Layout (Auftrag 08f) ---------------------------------------------------------- */
/* Fließend statt fester Breite. Oben über die ganze Breite Brotkrumen und Überschrift (Block head), darunter
   der Inhalt (¾) und rechts das Untermenü (¼, Block aside). Das Untermenü beginnt auf der Höhe des Inhalts,
   nicht neben der Überschrift. Seiten ohne Block aside (z. B. Scans) nutzen die volle Breite. */
.page {
  display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--gutter); align-items: start;
  max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter);
}
.page.with-aside { grid-template-columns: minmax(0, 3fr) minmax(15rem, 1fr); }
.page-top { grid-column: 1 / -1; min-width: 0; padding: 1.5rem 0 0; }
.page-top .page-head { margin-bottom: 0; }
.container { grid-column: 1; min-width: 0; padding: 1.5rem 0 4rem; }
.page-top + .container { padding-top: 1.25rem; }
.aside {
  grid-column: 2; position: sticky; top: 1rem; padding: 1.5rem 0 2rem;
  display: flex; flex-direction: column; gap: 0.9rem; min-width: 0;
}
.page-top ~ .aside { padding-top: 1.25rem; }

/* Kästen im Untermenü: Überschrift klein, darunter Aktionen als Zeilen. */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.45rem; }
.panel-title {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2);
  margin: 0.5rem 0.6rem 0.35rem; font-weight: 650;
}
.action {
  display: flex; align-items: center; gap: 0.65rem; width: 100%; padding: 0.55rem 0.6rem; border-radius: 7px;
  color: var(--text); font: inherit; font-size: 0.92rem; text-align: left; background: none; border: 0; cursor: pointer;
}
.action:hover { background: var(--surface-2); text-decoration: none; filter: none; }
.action.current { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.action-icon { width: 1.3rem; text-align: center; color: var(--accent); flex-shrink: 0; }
.action-count { margin-left: auto; color: var(--text-2); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.action.primary { background: var(--primary); color: var(--primary-ink); justify-content: center; font-weight: 650; padding: 0.7rem; }
.action.primary .action-icon { color: var(--primary-icon); width: auto; }
.action.primary:hover { filter: brightness(1.15); }
.action.danger-action { color: var(--danger); }
.action.danger-action .action-icon { color: var(--danger); }
.panel form { margin: 0; }
/* Einklappbare Kästen (ui.panel mit Überschrift): auf dem Desktop immer offen, auf Handy und Tablet per Antippen. */
.panel.fold > summary { display: block; list-style: none; }
.panel.fold > summary::-webkit-details-marker { display: none; }
@supports selector(::details-content) {
  @media (min-width: 961px) {
    .panel.fold::details-content { content-visibility: visible; }
    .panel.fold > summary { pointer-events: none; }
  }
}
@media (max-width: 960px) {
  .panel.fold > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding-right: 0.6rem; }
  .panel.fold > summary::after { content: "▸"; color: var(--text-2); transition: transform 0.15s; }
  .panel.fold[open] > summary::after { transform: rotate(90deg); }
  .panel.fold > summary .panel-title { margin: 0.55rem 0.6rem; }
}
.panel-note { margin: 0.3rem 0.6rem 0.5rem; font-size: 0.86rem; color: var(--text-2); }
.panel-note p { margin: 0 0 0.5rem; }
.panel-note p:last-child { margin: 0; }
.panel .facts { grid-template-columns: 1fr; gap: 0; margin: 0; padding: 0.1rem 0.6rem 0.4rem; font-size: 0.88rem; }
.panel .facts div { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--border); }
.panel .facts div:last-child { border-bottom: 0; }
.panel .facts dt { text-transform: none; letter-spacing: 0; font-size: inherit; }
.panel .facts dd { margin: 0; font-weight: 600; text-align: right; }
.page-head, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head { margin: 2rem 0 0.9rem; }
.section-head h2 { margin: 0; }
.section-head.tight { margin: 0 0 0.9rem; }
.head-actions { display: flex; gap: 0.5rem; }
.crumbs { font-size: 0.85rem; color: var(--text-2); margin-bottom: 0.4rem; }
.crumbs a { color: var(--accent); }
.crumb-sep { margin: 0 0.4rem; color: var(--text-2); }
.lead { color: var(--text-2); font-size: 1.02rem; }
.muted { color: var(--text-2); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }
/* Lange Zeichenketten ohne Leerzeichen (z. B. Fingerabdrücke) umbrechen, statt aus der Karte zu laufen. */
.break { overflow-wrap: anywhere; }
/* Lösungstext eines Funds (Liste der Funde): aufklappbar, Absätze aus dem Report bleiben erhalten. */
details.solution summary { cursor: pointer; }
.solution-text { white-space: pre-line; min-width: 16rem; margin-top: 0.3rem; }
.prewrap { white-space: pre-wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 1200px) {
  /* Mittlere Breite (Laptop, Tablet quer): zwei Kästen nebeneinander werden eng, also untereinander. */
  .page.with-aside .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  /* Schmal: Aktionen über den Inhalt, reine Angaben (ui.panel mit info=true) darunter. display: contents macht die
     Kästen zu Teilen des Rasters, damit order sie einzeln setzen kann. Auf Tablets stehen die Kästen nebeneinander. */
  .page.with-aside { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); column-gap: 0.9rem; }
  .page.with-aside .container { grid-column: 1 / -1; padding-top: 1rem; padding-bottom: 2rem; }
  .aside { display: contents; }
  .page-top { order: -2; }
  .aside > .panel { order: -1; margin-top: 0.9rem; grid-column: auto; }
  /* Der Kasten nur mit dem Hauptknopf (ohne Überschrift) bekommt eine eigene Zeile über die ganze Breite. */
  .aside > .panel:not(:has(.panel-title)) { grid-column: 1 / -1; }
  .aside > .panel.info { order: 1; margin: 0 0 1rem; }
}
@media (max-width: 720px) {
  /* Handy (Sebastian, 02.11.2026): Menüs wie „Mehr“ oder „Netz wechseln“ unter den Inhalt; oben bleibt nur der Hauptknopf. */
  .aside > .panel:has(.panel-title) { order: 1; margin: 0 0 1rem; }
}
@media (max-width: 820px) {
  .grid-2, .row { grid-template-columns: 1fr; }
  .topbar-row { gap: 0.75rem; }
  .filter { flex-wrap: wrap; }
  .filter select { flex: 1 1 12rem; }
  h1 { font-size: 1.35rem; }
}
@media (max-width: 720px) {
  /* Schmal: Suche in eine eigene Zeile unter Logo und Menüs. */
  .topbar-row { flex-wrap: wrap; row-gap: 0.5rem; }
  .topbar-tools { display: contents; }
  .topbar-tools > .menu:first-of-type { margin-left: auto; }
  .topbar-search { order: 4; flex-basis: 100%; }
  .topbar-search input[type="search"] { width: 100%; }
  /* Kundenwahl in eine eigene Zeile über der Suche. */
  .customer-pick { order: 3; flex-basis: 100%; }
  .customer-pick .menu-panel { max-width: calc(100vw - 2 * var(--gutter)); }
  /* Breite Tabellen scrollen waagrecht, statt die Spalten bis zur Unlesbarkeit zu quetschen. */
  .table { display: block; overflow-x: auto; }
  .table th { white-space: nowrap; }
  .table td { min-width: 5.5rem; }
  /* Die erste Spalte (meist der Name) bleibt beim Wischen stehen. */
  .table th:first-child, .table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--border); }
  .table th:first-child { background: var(--surface-2); }
}
@media (max-width: 560px) {
  .product { display: none; }
  .brand-logo { height: 20px; }
}

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem 1.4rem; margin-bottom: 1.25rem;
}
.card.narrow, form.narrow { max-width: 760px; }
/* Neben dem Untermenü füllen Formulare die ¾-Spalte, sonst klafft eine Lücke zum Untermenü. */
.page.with-aside .card.narrow, .page.with-aside form.narrow { max-width: none; }
.card.placeholder { border-style: dashed; background: transparent; }
.empty { text-align: center; padding: 2.5rem 1rem; }
.stack { display: flex; flex-direction: column; gap: 1rem; }

/* --- Kennzahlen (ui.kpis, Auftrag 08c) ------------------------------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.85rem 1rem; }
.kpi-value { display: block; font-size: 1.65rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-label { display: block; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); margin-top: 0.2rem; }
.kpi-critical .kpi-value { color: var(--danger); }
.kpi-high .kpi-value { color: var(--high); }
.kpi-medium .kpi-value { color: var(--warn); }
.kpi-low .kpi-value { color: var(--accent); }
.kpi-ok .kpi-value { color: var(--ok); }

/* Balken für Risikopunkte (Top-Maßnahmen): <meter>, weil die CSP kein style="width: …" erlaubt. */
meter.risk { display: block; width: 6rem; height: 0.4rem; margin: 0.35rem 0 0 auto; border: 0; border-radius: 3px; background: var(--surface-2); }
meter.risk::-webkit-meter-bar { background: var(--border); border: 0; border-radius: 3px; height: 0.4rem; }
meter.risk::-webkit-meter-optimum-value { background: var(--high); border-radius: 3px; }
meter.risk::-moz-meter-bar { background: var(--high); border-radius: 3px; }

/* --- Formulare --------------------------------------------------------------- */
label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 550; font-size: 0.9rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="datetime-local"], select, textarea {
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px;
  padding: 0.55rem 0.7rem; width: 100%;
}
textarea.mono, textarea { line-height: 1.45; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.hint { font-weight: 400; font-size: 0.82rem; color: var(--text-2); }
fieldset { border: 1px solid var(--border); border-radius: 6px; padding: 0.75rem 1rem 1rem; margin: 0; }
legend { font-weight: 600; font-size: 0.9rem; padding: 0 0.35rem; }
label.check { flex-direction: row; align-items: flex-start; gap: 0.55rem; font-weight: 400; margin-top: 0.5rem; }
label.check input { margin-top: 0.25rem; }
/* Profil, das gerade nicht geht (Scan starten, Auftrag 18b): Grund unter der Beschreibung */
.profile-blocked { display: block; font-size: 0.82rem; color: var(--danger); }
/* Gesperrte Wahl: Auch der Text sieht gesperrt aus, nicht nur der Knopf. Der Grund (profile-blocked) bleibt gut lesbar. */
label.check:has(input:disabled) { color: var(--text-2); cursor: not-allowed; }
label.check:has(input:disabled) strong { color: var(--text-2); font-weight: 500; }
label.check:has(input:disabled) input { cursor: not-allowed; }
.profile-note { display: block; font-size: 0.82rem; color: var(--accent); }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; }
.actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
/* Hinweis auf überlappende Standorte unter den IP-Bereichen. */
.overlap-notes { margin-top: 0.75rem; }
/* Nächster Schritt in der Karte „Ablauf“ am Standort (sites/_setup.html). */
.next-step { margin-bottom: 0.9rem; gap: 0.6rem; }
/* Aufklappbarer Block in Formularen (forms.fold): selten gebrauchte Angaben, ohne JavaScript. */
.form-fold { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem 0.85rem; }
.form-fold > summary { cursor: pointer; font-weight: 600; }
.form-fold > summary .muted { font-weight: 400; }
.form-fold[open] > summary { margin-bottom: 0.85rem; }
form.inline { display: inline; }
/* Rückfrage zur Kulanzzeit (Einzelauftrag im Wartungsfenster, Auftrag 18d): Minuten und Knöpfe in einer Zeile,
   auf dem Handy umbrechend. */
.grace-form { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.6rem; }
.grace-form label { flex-direction: row; align-items: center; gap: 0.5rem; }
.grace-form input[type="number"] { width: 6rem; }
.filter { display: flex; gap: 0.5rem; }
/* Auswahlfelder dürfen schmaler werden als ihre längste Option (Handy, Regelabgleich C2): sonst scrollt die Seite. */
.filter > * { min-width: 0; }
.filter select { width: auto; min-width: 0; max-width: 100%; }

button, .button {
  font: inherit; font-weight: 550; font-size: 0.9rem;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.95rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.button:hover, button:hover { text-decoration: none; filter: brightness(0.97); }
.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.danger { background: var(--danger); border-color: var(--danger); color: var(--danger-ink); }
.danger-outline { color: var(--danger); border-color: var(--danger); background: transparent; }
.small.button, .button.small { padding: 0.3rem 0.7rem; font-size: 0.82rem; }
.linkbutton { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 400; font-size: inherit; cursor: pointer; }
.danger-text { color: var(--danger); }

/* --- Meldungen --------------------------------------------------------------- */
.flash { border-radius: 6px; padding: 0.7rem 0.95rem; margin-bottom: 1rem; border: 1px solid transparent; }
.flash ul { margin: 0; padding-left: 1.1rem; }
.flash-info { background: var(--info-soft); }
.flash-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
/* Warnung ohne Fehler (Auftrag 27f, z. B. SNMP v2c im Klartext): vorhandene Warnfarben, Text in normaler Farbe. */
.flash-warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

/* --- Tabellen und Listen ----------------------------------------------------- */
/* Hülle für breite Tabellen (Regelabgleich C1): Läuft die Tabelle über die Karte, scrollt nur sie, in jeder Breite.
   Unter 720 px scrollt zusätzlich die Tabelle selbst (mit fester erster Spalte, siehe oben). */
.table-wrap { max-width: 100%; overflow-x: auto; position: relative; }
/* Markierungen in Tabellen brechen nicht mitten im Wort um; zwischen mehreren Markierungen schon. */
.table .badge { white-space: nowrap; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); background: var(--surface-2); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.table.dense td { padding: 0.45rem 0.9rem; font-size: 0.88rem; }
/* Fundliste: Der Fund bekommt den Platz, Host und Lösung bleiben schmal; lange Hostnamen brechen um. */
.results-table th, .results-table td { padding-left: 0.6rem; padding-right: 0.6rem; }
.results-table td:nth-child(2) { width: 40%; }
.results-table td:nth-child(3) { min-width: 9.5rem; max-width: 13rem; }
.results-table td:nth-child(3) .small { overflow-wrap: anywhere; }
.results-table td:last-child { max-width: 10rem; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem 1.5rem; margin: 0 0 1.25rem; }
.facts.compact { margin-bottom: 0.5rem; }
.facts dt { font-size: 0.78rem; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; }
.facts dd { margin: 0.15rem 0 0; }
.facts .full { grid-column: 1 / -1; }
/* Zeile unter einer Angabe (Knopf, Hinweis), z. B. „Gesamtscan bilden“ auf der Seite des Auftrags. */
.facts dd .fact-action { margin-top: 0.4rem; }
/* Doppelt breite Angabe (z. B. Fortschritt auf der Scan-Seite), damit lange Werte nicht umbrechen. Nur ab mittlerer
   Breite: Bei einer einzigen Spalte würde span 2 eine zweite erzwingen. */
@media (min-width: 721px) { .facts .wide { grid-column: span 2; } }
.facts .big { font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Einfache Liste ohne Punkte (Übersicht, Suche). */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { padding: 0.45rem 0; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: 0; }
.kpi-note { margin: -0.6rem 0 1.25rem; }
input[type="search"] {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.55rem 0.7rem; flex: 1; min-width: 12rem;
}

.mono-list { list-style: none; margin: 0; padding: 0; font-family: var(--mono); font-size: 0.88rem; }
.mono-list li { padding: 0.2rem 0; border-bottom: 1px dashed var(--border); }
.mono-list li:last-child { border-bottom: 0; }
/* Aufklappbare Liste von Adressen (ui.ip_details), z. B. „nicht geprüft“ im Gesamtscan (18c-3): in Spalten, weil es
   Hunderte sein können. */
.ip-list summary { cursor: pointer; font-size: 0.88rem; }
.ip-list .mono-list { columns: 9rem; column-gap: 1.5rem; margin-top: 0.4rem; }
.ip-list .mono-list li { break-inside: avoid; }

.cred-list { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.cred-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--border); }
.cred-list li:first-child { padding-top: 0; }

.badge {
  display: inline-block; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 0.1rem 0.45rem; border-radius: 4px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
/* Hinweis ohne Handlungsbedarf, z. B. Zeitplan „übersprungen“, weil ein Auftrag noch läuft (18c-2). */
.badge.info { background: var(--info-soft); color: var(--text); border-color: transparent; }
.badge.crit-hoch { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.crit-normal { background: var(--info-soft); color: var(--text); border-color: transparent; }

.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.9rem; margin-bottom: 1rem; }
.type-card {
  display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; color: var(--text);
}
.type-card:hover { border-color: var(--accent); text-decoration: none; }

/* --- Anmeldung --------------------------------------------------------------- */
body.auth .container { display: flex; flex-direction: column; align-items: center; padding-top: 8vh; }
body.auth .container > .flash { width: 100%; max-width: 440px; }
/* Karte ohne Rail (Design 05.11.2026, Entwurf „auth-card“): 440px, runder, leiser Schatten. --auth-pad hält Innenabstand
   und die negativen Ränder des Bands gleich; auf dem Handy kleiner (unten). */
.auth-card {
  --auth-pad: 32px;
  width: 100%; max-width: 440px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: var(--auth-pad); box-shadow: var(--card-shadow);
}
.auth-card.wide { max-width: 680px; }
.auth-card h1 { font-size: 27px; margin: 0 0 1rem; }
/* Hauptknopf eines Formulars über die ganze Breite (Entwurf); nicht die Knöpfe der Download-Zeilen. */
.auth-card form.stack > button.primary { width: 100%; justify-content: center; }
/* Band oben in der Karte (ui.brand_banner): dunkel in beiden Darstellungen (--band), weil das Firmenlogo seinen dunklen
   Grund mitbringt (Sebastian). Rechts das Produktlogo aus dem Entwurf in der Fassung für dunklen Grund. */
.brand-banner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1rem;
  margin: calc(-1 * var(--auth-pad, 2rem)) calc(-1 * var(--auth-pad, 2rem)) 1.75rem; padding: 1rem 1.5rem;
  background: var(--band); color: var(--band-text); border-radius: 14px 14px 0 0;
}
.brand-banner img { display: block; width: auto; }
.brand-banner .brand-company { height: 36px; }
.brand-banner .brand-product { height: 17px; padding-left: 1rem; border-left: 1px solid var(--band-line); box-sizing: content-box; }
@media (max-width: 700px) {
  body.auth .container { padding-top: 24px; }
  .auth-card { --auth-pad: 22px; }
  .auth-card h1 { font-size: 24px; }
  .brand-banner { padding: 0.85rem 1.1rem; }
  .brand-banner .brand-company { height: 30px; }
  .brand-banner .brand-product { height: 14px; }
}
/* Anmelden mit Passkey (Auftrag 09) unter dem Formular mit Passwort. */
.divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0 1rem; color: var(--text-2); font-size: 0.85rem; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.passkey-button { width: 100%; justify-content: center; padding: 0.65rem; }
.passkey-login .flash { margin: 0.75rem 0 0; }
/* Download-Seite für Kunden: je Hypervisor eine Zeile mit Knopf */
.download-choice {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0; border-top: 1px solid var(--border);
}
.download-choice p { margin: 0.2rem 0 0; }
.download-choice button { white-space: nowrap; flex-shrink: 0; }
/* Hypervisor aus der Vorauswahl der Mail: oben und hinterlegt */
.download-choice.chosen { background: var(--accent-soft); border-radius: var(--radius); padding: 0.75rem; border-top-color: transparent; }
/* Ein Befehl für Proxmox (B11, 05.11.2026): bricht um statt quer zu scrollen, ein Klick markiert ihn ganz (zum Kopieren). */
.download-oneliner { margin: 0.25rem 0 0.75rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); }
.download-oneliner p { margin: 0 0 0.5rem; }
.copy-command { margin: 0 0 0.4rem; padding: 0.6rem 0.75rem; background: var(--surface-2); border-radius: 6px;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; user-select: all; font-size: 0.875rem; }
/* Download-Seite für Kunden: rund 70 % der Breite, links die Schritte und die Anleitung, rechts die Angaben zur Appliance.
   Die Spalte der Anleitung bleibt so lesbar breit. */
body.download-body .container { padding-top: 2rem; }
.auth-card.download-page { width: 70vw; max-width: none; }
.download-head p { max-width: 72ch; margin-bottom: 0; }
.download-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2.5rem; align-items: start; margin-top: 1.25rem; }
.download-main { min-width: 0; }
.download-facts { position: sticky; top: 1rem; padding-left: 1.5rem; border-left: 1px solid var(--border); }
.download-facts h2 { margin-top: 0; }
.download-facts .facts { grid-template-columns: 1fr; gap: 0.7rem; margin-bottom: 1rem; }
.download-page .guide { margin-top: 2rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.size-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 0.75rem; }
.size-choice a {
  display: flex; flex-direction: column; gap: 0.3rem; padding: 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none;
}
.size-choice a:hover { border-color: var(--accent); }
.size-choice a.current { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
@media (max-width: 1200px) {
  .auth-card.download-page { width: 100%; }
}
@media (max-width: 860px) {
  .download-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .download-facts { position: static; order: -1; padding-left: 0; border-left: 0; }
  .download-facts .facts { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .size-choice { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .download-choice { flex-direction: column; align-items: stretch; }
}
/* Seiten für Kunden: Anleitung lesbar, beim Drucken ohne Knöpfe */
.customer-page h2 { margin-top: 1.5rem; }
.customer-page .guide h3 { margin-top: 1rem; }
.customer-page li { margin-bottom: 0.3rem; }
/* Lange Befehle der Anleitung (scp …) brechen auf dem Handy um, statt die Seite breiter zu machen. */
.customer-page code, .customer-page li { overflow-wrap: anywhere; }
/* Hilfe für Kunden (/hilfe): Themen als Liste mit Kurzbeschreibung, Fragen und Antworten, Hinweis oben. */
.help-topics { list-style: none; padding: 0; margin: 0.5rem 0 0; }
.help-topics li {
  display: flex; flex-direction: column; gap: 0.1rem; margin: 0; padding: 0.55rem 0; border-top: 1px solid var(--border);
}
.help-topics li:first-child { border-top: none; }
.help-topics a, .help-topics strong { font-weight: 600; }
.help-page .table-wrap { margin: 0.5rem 0 0.75rem; }
.help-note { background: var(--accent-soft); border-radius: var(--radius); padding: 0.75rem 0.9rem; }
.faq dt { font-weight: 600; margin-top: 0.9rem; }
.faq dd { margin: 0.25rem 0 0; }
/* Verweis auf die Hilfe (help.help_link): die ganze Adresse nur im Druck */
.help-link { margin: 0.25rem 0 0.75rem; }
/* Weg zurück in die Anwendung (nur mit /hilfe?von=app, help/page.html). */
.help-back { margin: -0.5rem 0 1rem; }
.print-only { display: none; }
@media print {
  .print-only { display: inline; }
}
@media print {
  .download-choice, .topbar, .flash, .aside { display: none; }
  .page.with-aside { display: block; padding: 0; }
  .auth-card { border: none; max-width: none; padding: 0; box-shadow: none; }
  .auth-card.download-page { width: auto; }
  .download-steps, .print-hide { display: none; }
  .download-layout { display: block; }
  .download-facts { position: static; padding-left: 0; border-left: 0; }
  .brand-banner { margin: 0 0 1rem; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
.mfa-grid { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: start; margin-top: 1rem; }
.qr { background: var(--qr-bg); border-radius: 8px; padding: 6px; border: 1px solid var(--border); }
.qr svg { display: block; width: 100%; height: auto; }
.secret {
  display: block; padding: 0.6rem 0.75rem; margin-bottom: 1rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px;
  word-break: break-all; letter-spacing: 0.05em;
}
.secret.big { font-size: 1.25rem; text-align: center; }
/* Wiederherstellungscodes (GR-S3): nur einmal angezeigt, zum Abschreiben in zwei Spalten, auf dem Handy in einer. */
.recovery-codes {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1.5rem;
  margin: 0; padding: 0.75rem 1rem 0.75rem 2.25rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px;
}
.recovery-codes code { font-size: 1.05rem; letter-spacing: 0.05em; white-space: nowrap; }
@media (max-width: 640px) { .recovery-codes { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .mfa-grid { grid-template-columns: 1fr; } .qr { max-width: 240px; } }

/* --- Scans ---------------------------------------------------------------------- */
/* Fortschrittsbalken: das <progress>-Element, weil die CSP kein style="width: …" erlaubt. */
.progress { width: 7rem; height: 0.5rem; vertical-align: middle; accent-color: var(--accent); }
/* Markierung für einen Scan, der gerade unterwegs ist. */
.badge.run { background: var(--accent-soft); color: var(--accent); }
.card.attention { border-color: var(--warn); background: var(--warn-soft); }
/* Alarm oben auf einer Seite, z. B. Appliance ohne Verbindung: Die Angaben darunter sind veraltet. */
.card.alarm { border-color: var(--danger); background: var(--danger-soft); }
.card.alarm h2 { color: var(--danger); }
/* Seite „Zustand“ */
.badge.health-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.health-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.health-alarm { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 700; }

/* --- Bericht für den Kunden (report/) --------------------------------------------- */
.report { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 2.25rem; }
.report-section { margin-bottom: 1.75rem; }
.report-cover { padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.report-cover h1 { margin-bottom: 0.35rem; }
/* Logo auf dem Deckblatt. Das Bild hat seinen dunklen Grund selbst; im Druck mit Farbe (print-color-adjust). */
.report-logo { display: block; height: 44px; width: auto; border-radius: 6px; margin-bottom: 1.25rem;
  print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.report-lead { font-size: 1.15rem; font-weight: 600; }
.report-top li { margin-bottom: 0.3rem; }
.report-measure { margin-bottom: 1.1rem; }
.report-measure h3 { text-transform: none; letter-spacing: 0; font-size: 0.98rem; color: var(--text); }
.report-quote { border-left: 3px solid var(--border); padding-left: 0.75rem; margin: 0 0 0.5rem; }
/* Top 25 (Auftrag 65e): Wirkung in einem Satz über der Liste, Rang hervorgehoben; Kapitel je Appliance im Gesamtbericht (Auftrag 65). */
.report-impact { font-weight: 600; margin: 0.4rem 0 0.6rem; }
.report-top25 .report-rank { font-weight: 700; color: var(--text); }
.report-chapter-title { margin-top: 1.5rem; padding-top: 0.75rem; border-top: 2px solid var(--border); }
.report-sites .report-check { display: block; margin: 0.2rem 0; }
@media print { .report-chapter-title { break-before: page; border-top: 0; } }
.report-footer { margin-top: 2rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .report { padding: 1rem; } }

@page {
  size: A4; margin: 16mm 14mm 18mm;
  /* Im Druck gilt der helle Satz aus @media print unten; Chrome löst var() auch in den Randfeldern auf. */
  @bottom-left { content: "Vertraulich"; font-size: 8pt; color: var(--text-2); }
  @bottom-right { content: "Seite " counter(page) " von " counter(pages); font-size: 8pt; color: var(--text-2); }
}
@media print {
  /* Im Druck immer hell, auch wenn der Bildschirm dunkel ist: dieselben Werte wie oben in :root.
     :root:root, damit der Satz auch die dunklen Listen oben (Spezifität zwei Pseudoklassen bzw. Attribut) schlägt. */
  :root:root {
    --bg: #ffffff; --surface: #ffffff; --surface-2: #f8fafb; --border: #dce3e8; --text: #172a38; --text-2: #586b7a;
    --accent: #006d80; --accent-soft: #e5f3f4; --primary: #006d80; --primary-ink: #ffffff; --danger: #b4232c; --danger-soft: #fbe9ea; --danger-ink: #ffffff; --warn: #8a5a00;
    --warn-soft: #fff3d6; --high: #d9582b; --ok: #1d6b3a; --ok-soft: #e3f3e8; --info-soft: #e8eef9;
    color-scheme: light;
  }
  body.report-body { font-size: 10.5pt; background: var(--surface); }
  .report-body .topbar, .report-body .rail, .report-body .envbanner, .report-body .flash, .report-body .aside, .no-print { display: none; }
  .report-body .container { max-width: none; padding: 0; margin: 0; }
  .report { border: none; padding: 0; }
  .report-cover { break-after: page; border-bottom: none; padding-top: 30mm; }
  .report h2 { break-after: avoid; }
  .report-measure, .report-table tr, .report .facts > div { break-inside: avoid; }
  .report-table thead { display: table-header-group; }
  /* Im Druck nichts abschneiden: Die Hülle für breite Tabellen scrollt nur am Bildschirm. */
  .table-wrap, .table-scroll { overflow: visible; }
  .badge { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* htmx: Ladeanzeige. Steht hier, weil htmx wegen der CSP keine eigenen Styles einfügen darf. */
.htmx-indicator { opacity: 0; transition: opacity 0.2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }

/* Streifen ganz oben im Lab-Modus, damit niemand einen Teststand für den Betrieb hält. */
.envbanner { background: var(--warn-soft); color: var(--warn); text-align: center; font-size: 0.8rem; padding: 0.25rem 1rem; }

/* --- Funde ----------------------------------------------------------------------- */
/* Markierungen je Stufe. Farben kommen aus den vorhandenen Variablen. */
.badge.sev-critical, .badge.sev-high { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.sev-critical { font-weight: 700; }
.badge.sev-medium { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.sev-low { background: var(--info-soft); color: var(--text); border-color: transparent; }
.badge.sev-log, .badge.sev-false_positive { color: var(--text-2); }
/* Funde aus dem Abgleich CPE → CVE (Auftrag 22c-4): „neu durch Intel-Stand“ in der Akzentfarbe, nicht in einer Farbe
   der Stufen (es ist keine Schwere, sondern eine Herkunft). Nachweis kräftig, Herkunft gedämpft. */
.badge.intel-new { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.intel-origin { margin-top: 0.15rem; }
/* Nachweis eines Funds in Worten (`res.proof`, 05.11.2026): bestätigt kräftig, Hinweis gedämpft; die gepunktete Linie
   zeigt, dass der title eine Erklärung hat. Die sichtbare Erklärung steht in `.proof-legend` unter der Tabelle. */
.evidence { white-space: nowrap; text-decoration: underline dotted; text-underline-offset: 0.2em; cursor: help; }
.evidence-confirmed { font-weight: 600; }
.evidence-hint { color: var(--text-2); }
.proof-legend strong { font-weight: 600; }
/* Im Bericht (PDF ohne Hover) und im Druck keine Andeutung eines title: dort erklärt die Legende darunter. */
.report-section .evidence { text-decoration: none; cursor: auto; }
@media print { .evidence { text-decoration: none; } }
#vermutlich-behoben { margin-top: 0.85rem; }
.likely-reason { white-space: pre-line; min-width: 16rem; overflow-wrap: break-word; }

/* Geräteklassen (Auftrag 12d): Hauptklasse als Markierung, Gründe als kurze Liste. */
.badge.class-iomt { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 700; }
.badge.class-ot { background: var(--warn-soft); color: var(--warn); border-color: transparent; font-weight: 700; }
.badge.class-iot { background: var(--info-soft); color: var(--text); border-color: transparent; }
.badge.class-it { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.class-unknown { color: var(--text-2); }
ul.reasons { margin: 0.25rem 0 0.75rem; padding-left: 1.2rem; }
ul.reasons li { margin: 0.15rem 0; }
/* Blättern unter langen Tabellen. */
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 0.75rem; }
/* Filterzeile über der Fundliste: darf umbrechen, Checkboxen und Auswahl auf einer Höhe. */
#funde .filter { flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 0.75rem; }
/* Auswahl der beiden Scans über dem Vergleich. */
#vergleich-wahl { flex-wrap: wrap; align-items: end; gap: 0.75rem 1rem; }

/* Netzkarte (Auftrag 12e): SVG mit Klassen statt Inline-Stil. Farben aus den Variablen oben. */
/* 13i: Die Karte bleibt in einem Rahmen von höchstens drei Vierteln der Fensterhöhe und scrollt darin in beide Richtungen. */
.map-wrap { overflow: auto; max-height: 75vh; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.netmap { display: block; font-family: var(--sans); }
.netmap .map-edge { fill: none; stroke: var(--text-2); stroke-width: 1.4; }
.netmap rect { fill: var(--surface); stroke: var(--border); stroke-width: 1.2; }
.netmap .map-appliance rect { fill: var(--primary); stroke: var(--primary); }
.netmap .map-appliance text { fill: var(--primary-ink); }
.netmap .map-unknown rect, .netmap .map-nopath rect { stroke-dasharray: 4 3; }
.netmap .map-sensitive rect { stroke: var(--warn); stroke-width: 2; }
.netmap .map-segment > rect:first-of-type { stroke: var(--accent); }
.netmap .map-mixed > rect:first-of-type { stroke: var(--warn); stroke-width: 2.5; }
.netmap text { fill: var(--text); font-size: 12px; }
.netmap .map-title { font-weight: 600; font-size: 13px; }
.netmap .map-sub { fill: var(--text-2); }
.netmap a:hover rect:first-of-type { stroke: var(--accent); stroke-width: 2; }
rect.map-bar, .netmap rect.map-bar { stroke: none; }
rect.bar-it, .netmap rect.bar-it { fill: var(--accent); }
rect.bar-iot, .netmap rect.bar-iot { fill: var(--ok); }
rect.bar-ot, .netmap rect.bar-ot { fill: var(--warn); }
rect.bar-iomt, .netmap rect.bar-iomt { fill: var(--danger); }
rect.bar-unknown, .netmap rect.bar-unknown { fill: var(--text-2); }
rect.map-mixed-key { fill: var(--surface); stroke: var(--warn); stroke-width: 2.5; }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.6rem 0 0; }
.map-key { display: inline-flex; align-items: center; gap: 0.35rem; }
.report-map .map-wrap { overflow: visible; max-height: none; background: none; border: 0; }
.report-map .netmap { width: 100%; height: auto; }

/* Firewall-Vorschlag (Auftrag 12g): Auswahl des Herstellers, Hinweiszeile unter jeder Regel. */
.tabs a.current { font-weight: 700; color: var(--text); text-decoration: none; }
.table tr.rule-note td { border-top: 0; padding-top: 0; }

/* Layer-2-Karte (Auftrag 13d): Gateway dunkel wie die Appliance, Switches und Access Points mit Akzent. */
.netmap .map-l2-gateway rect { fill: var(--primary); stroke: var(--primary); }
.netmap .map-l2-gateway text { fill: var(--primary-ink); }
.netmap .map-l2-switch rect, .netmap .map-l2-ap rect { stroke: var(--accent); stroke-width: 1.6; }

/* Layer-2-Karte wie in UniFi (Auftrag 13h): Kreise statt Kästen, Clients farbig nach Hauptklasse, Kabel durchgezogen,
   WLAN gestrichelt, Kreis „−/+“ zum Auf- und Zuklappen, Details rechts daneben (auf schmalen Bildschirmen darüber). */
.map-views { margin: 0 0 0.75rem; }
.l2-view { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; position: relative; overflow-x: clip; }
/* Details von rechts (Auftrag 77b, Sebastian 17.11.2026): über der Karte, so breit wie die Spalte rechts (.page.with-aside: ein Viertel
   neben drei Vierteln, mindestens 15rem). Gleitet beim Öffnen herein (@starting-style); beim Wechsel von Knoten zu Knoten setzt ui.js
   kurz .l2-feld-wechsel, dann steht das Feld still. Ohne Bewegungswunsch erscheint es sofort. */
.l2-view .l2-details { position: absolute; top: 0; right: 0; z-index: 2; width: max(15rem, calc((100% - var(--gutter)) / 4));
  max-height: 100%; overflow-y: auto; box-shadow: var(--shadow-feld); transition: transform 0.28s ease, opacity 0.28s ease; }
@starting-style { .l2-view .l2-details { transform: translateX(calc(100% + 24px)); opacity: 0; } }
.l2-feld-wechsel .l2-view .l2-details { transition: none; }
/* Kleine Karte (netmap.js setzt mindestens 280px): Platz für die Details schaffen, damit sie nicht in einem schmalen Kasten scrollen. */
.l2-view.l2-with-details { min-height: min(36rem, 75vh); }
@media (prefers-reduced-motion: reduce) { .l2-view .l2-details { transition: none; } }
/* Details im Stil des Detailfelds (62j: Klassen .feld, .feld-head, .feld-wege aus „Ansicht und Konfiguration“); hier ohne
   Einblenden, weil htmx die Karte bei jedem Auf- und Zuklappen neu setzt, und mit h3 unter der Überschrift der Karte. */
.feld.l2-details { animation: none; }
.l2-details .feld-head { padding: 14px 16px 4px; }
.l2-details .feld-body { padding: 0 16px 16px; gap: 12px; }
.l2-details .feld-head h3 { margin: 0; font-size: 17px; color: var(--text); text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
.l2-details .site-facts > div { grid-template-columns: 6.5rem minmax(0, 1fr); }
/* Schmal: Details über der Karte, damit sie nach dem Antippen sofort zu sehen sind. */
@media (max-width: 960px) { .l2-view.l2-with-details { grid-template-columns: 1fr; }
  .l2-view.l2-with-details { min-height: 0; }
  .l2-view.l2-with-details .l2-details { order: -1; position: static; width: auto; max-height: none; box-shadow: none; transition: none; } }
.netmap .l2-edge, .l2-edge { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.netmap .l2-edge-wifi, .l2-edge-wifi { stroke: var(--ok); stroke-dasharray: 5 4; }
.netmap .l2-edge-unknown, .netmap .l2-edge-summary, .l2-edge-unknown,
.netmap .l2-edge-segment { stroke: var(--text-2); stroke-dasharray: 2 3; }
/* Schnittstelle eines Routers bzw. einer Firewall (laut ARP, Auftrag 27h/34): Ebene 3, Verkabelung dahinter unbekannt */
.netmap .l2-edge-interface { stroke: var(--accent); stroke-dasharray: 6 3; }
/* Kästchen an den Linien (wie UniFi): Port, Geschwindigkeit, SSID, VLAN, Netz; Schalter darüber (.l2-option). */
.netmap .l2-tag rect { fill: var(--surface); stroke: var(--border); stroke-width: 1; }
.netmap .l2-tag text { font-size: 12px; fill: var(--text-2); stroke: none; }
.netmap .l2-tag-port text { fill: var(--accent); }
.netmap .l2-tag-ssid rect { stroke: var(--ok); }
.netmap .l2-tag-ssid text { fill: var(--ok); }
.netmap .l2-node circle { stroke: var(--surface); stroke-width: 2; }
.netmap .l2-gateway circle { fill: var(--primary); stroke: var(--primary); }
.netmap .l2-switch circle, .netmap .l2-ap circle, .netmap .l2-device circle,
.netmap .l2-router circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2.2; }
/* 13m: die Appliance im Ersatzbaum (an ihrem Switch laut LLDP), hervorgehoben als Messpunkt. */
.netmap .l2-appliance circle { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2.2; }
.netmap .l2-unknown circle { fill: var(--surface); stroke: var(--text-2); stroke-dasharray: 3 2; }
/* Gerätesymbole (62j): einfarbig über color (die Pfade im <symbol> nehmen currentColor), Klicks gehen an den Link. */
.netmap .l2-icon { color: var(--accent); pointer-events: none; }
.netmap .l2-gateway .l2-icon { color: var(--primary-ink); }
.netmap .l2-unknown .l2-icon { color: var(--text-2); }
.netmap .l2-client .l2-icon { color: var(--surface); }
.l2-key-icon { color: var(--accent); }
.netmap .cls-it circle, circle.l2-key.cls-it { fill: var(--accent); }
.netmap .cls-iot circle, circle.l2-key.cls-iot { fill: var(--ok); }
.netmap .cls-ot circle, circle.l2-key.cls-ot { fill: var(--warn); }
.netmap .cls-iomt circle, circle.l2-key.cls-iomt { fill: var(--danger); }
.netmap .cls-unknown circle, circle.l2-key.cls-unknown { fill: var(--text-2); }
.netmap .l2-unscanned circle { stroke: var(--text); stroke-dasharray: 2 2; }
.netmap .l2-protected circle { stroke: var(--warn); stroke-width: 3.5; stroke-dasharray: none; }
.netmap .l2-selected circle, .netmap .l2-selected rect { stroke: var(--text); stroke-width: 3.5; }
.netmap .l2-group rect:first-of-type { fill: var(--surface); stroke: var(--accent); stroke-width: 1.4; }
.netmap .l2-group.l2-closed rect:first-of-type { stroke: var(--text-2); stroke-dasharray: 4 3; }
.netmap .l2-pill-mark { font-size: 14px; font-weight: 700; fill: var(--accent); }
.netmap .l2-label { font-size: 13px; font-weight: 600; }
.netmap .l2-sub { font-size: 12px; font-weight: 400; fill: var(--text-2); }
/* 62j: Art als Text unter dem Namen (Schalter „Art“), klein und gedämpft; Größe wie F_ART in services/layer2.py. */
.netmap .l2-art { font-size: 11px; font-weight: 500; fill: var(--text-2); }
/* 13j: Schrift mit einem Rand in der Farbe des Hintergrunds, damit Linien hinter der Beschriftung verschwinden. */
.l2tree text { paint-order: stroke; stroke: var(--surface-2); stroke-width: 3px; stroke-linejoin: round; }
.l2tree .l2-toggle text { stroke: none; }
.netmap .l2-toggle circle { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.netmap .l2-toggle text { fill: var(--surface); font-weight: 700; font-size: 13px; }
.netmap a:hover .l2-node circle, .netmap a:hover .l2-group rect:first-of-type { stroke-width: 3; }
.netmap a:hover .l2-toggle circle { fill: var(--text); }
circle.l2-key { fill: var(--surface); stroke: none; }
/* Funde am Knoten (Auftrag 77b): Marke mit Zahl, Farbe nach der Dringlichkeit wie bei den Maßnahmen (dringend, wichtig, später grau). Selektor spezifischer als die Regeln für Kapsel, Auswahl und
   Hover oben (die greifen sonst auf das erste rect der Marke). */
.netmap a .l2-node .l2-findings rect:first-of-type { fill: var(--text-2); stroke: var(--surface); stroke-width: 1.5; stroke-dasharray: none; }
.netmap a .l2-node .l2-findings.sev-urgent rect:first-of-type { fill: var(--danger); }
.netmap a .l2-node .l2-findings.sev-important rect:first-of-type { fill: var(--high); }
.l2tree .l2-node .l2-findings text { font-size: 10px; font-weight: 700; fill: var(--surface); stroke: none; }
rect.l2-findings-key { fill: var(--danger); }
.l2tree .l2-findings text { font-size: 10px; font-weight: 700; fill: var(--surface); stroke: none; }
.l2-search { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin: 0 0 0.5rem; }
.l2-search input[type="search"] { flex: 1 1 16rem; max-width: 28rem; }
.l2-hits, .l2-trail { margin: 0 0 0.5rem; }
.l2-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; margin: 0 0 0.5rem; }
.l2-options { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.l2-option { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 2rem; padding: 0 0.6rem; border: 1px solid var(--border); border-radius: 6px; color: var(--text-2); text-decoration: none; }
.l2-option::before { content: ""; width: 0.6rem; height: 0.6rem; border: 1px solid var(--text-2); border-radius: 2px; }
.l2-option.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.l2-option.is-on::before { border-color: var(--accent); background: var(--accent); }
.l2-hint { margin: 0 0 0.5rem; padding: 0.35rem 0.65rem; border-left: 3px solid var(--accent); border-radius: 4px; background: var(--accent-soft); }
/* Kopf der Karte: Quelle und Stand werden mit mehreren Systemen länger („UniFi und SNMP“, Auftrag 27f) und brechen dann um. */
#layer2 > .section-head { flex-wrap: wrap; row-gap: 0.25rem; }
/* Zoomen und Verschieben (13j, netmap.js): Rahmen so hoch wie das SVG (Attribut height, von netmap.js nach dem Inhalt
   gesetzt), das SVG füllt die Breite, der Ausschnitt kommt über viewBox. */
.map-controls { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-left: auto; }
.map-controls[hidden] { display: none; }
.map-wrap.l2-zoom { max-height: none; min-height: 0; overflow: hidden; cursor: grab; }  /* Mindesthöhe setzt netmap.js (LOW) */
.map-wrap.l2-zoom.l2-dragging { cursor: grabbing; }
.map-wrap.l2-zoom .netmap { width: 100%; touch-action: none; user-select: none; }

/* Geräte je Port und WLAN im Bericht (13i): eine Tabelle mit festen Spalten, jede Gruppe mit einer Zwischenzeile. */
.l2-groups { table-layout: fixed; }
.l2-groups col.col-device { width: 32%; }
.l2-groups col.col-address { width: 22%; }
.l2-groups col.col-type { width: 26%; }
.l2-groups col.col-vlan { width: 8%; }
.l2-groups col.col-findings { width: 12%; }
.table tr.group-row th { background: var(--surface); color: var(--text); text-transform: none; letter-spacing: 0; font-size: 0.9rem; padding-top: 1rem; border-top: 2px solid var(--border); }
.report-table tr.group-row { break-after: avoid; }
circle.l2-key-unscanned { stroke: var(--text); stroke-dasharray: 2 2; stroke-width: 1.5; }
circle.l2-key-protected { stroke: var(--warn); stroke-width: 2.5; }

/* Pakete (Auftrag 23f): Zahlen der Vorschau, Knöpfe, Wahl des Kunden. */
.package-customer { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; margin: 0 0 1rem; }
.package-figures { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem 2.5rem; margin: 0.5rem 0 1rem; }
.package-figures > div { display: flex; flex-direction: column-reverse; max-width: 16rem; }
.package-figures dt { color: var(--text-2); font-size: 0.9rem; font-weight: 400; }
.package-figures dd { margin: 0; font-size: 1.6rem; font-weight: 650; color: var(--text); }
.package-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 1rem 0 0.5rem; }
.package-example { margin: 0 0 0.5rem; padding-left: 1.4rem; }

/* --- Lage, Geräte, Netz prüfen (Auftrag 23b, 23d) ------------------------------------ */
/* Inhalt fließt mit dem Raster aus base.html; hier gibt es keine feste Breite. */
.page-sub { margin: 0.3rem 0 0; color: var(--text-2); font-size: 0.95rem; }
.lazy { color: var(--text-2); font-size: 0.85rem; }
li.lazy { list-style: none; padding: 0.4rem 0; }

/* Kennzahl-Kacheln (lg.tile): die Stufe trägt die Linie oben, die Beschriftung sagt es immer auch als Text. */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.tile { display: flex; flex-direction: column; gap: 0.2rem; padding: 1rem 1.2rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-top: 4px solid var(--border); border-radius: var(--radius); }
a.tile:hover { text-decoration: none; border-color: var(--text-2); }
.tile-label { font-size: 0.88rem; color: var(--text-2); }
.tile-value { font-size: 2.2rem; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-note { font-size: 0.85rem; color: var(--text-2); }
.tile-urgent { border-top-color: var(--danger); }
.tile-urgent .tile-value { color: var(--danger); }
.tile-important { border-top-color: var(--high); }
.tile-important .tile-value { color: var(--warn); }
.tile-later { border-top-color: var(--later-line); }
.tile-later .tile-value { color: var(--later); }
.tile-info { border-top-color: var(--accent); }
/* Null ist keine Warnung: Die Zahl tritt zurück, die Linie bleibt als Zuordnung. */
.tile.tile-zero .tile-value { color: var(--text-2); }
.tiles-note { margin: -0.6rem 0 1.25rem; }

/* Zu tun (lg.todo): eine Zeile, eine Aufgabe, rechts der nächste Schritt. Nur Dringendes ist hinterlegt. */
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.todo { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 8px; }
.todo-body { flex: 1 1 18rem; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; overflow-wrap: anywhere; }
.todo-text { font-size: 0.88rem; color: var(--text-2); }
.todo-badge { font-size: 0.8rem; font-weight: 600; padding: 0.15rem 0.6rem; border-radius: 6px; background: var(--surface-2); color: var(--text-2); }
.todo-action { font-weight: 600; min-height: 2.25rem; display: inline-flex; align-items: center; }
.todo-urgent { background: var(--danger-soft); border-color: var(--danger); }
.todo-urgent .todo-badge { background: var(--danger); color: var(--danger-ink); }
.todo-urgent .todo-text { color: var(--text); }
.todo-important .todo-badge, .todo-warn .todo-badge { background: var(--warn-soft); color: var(--warn); }
.todo-later .todo-badge { background: var(--info-soft); color: var(--later); }
.todo-new .todo-badge, .todo-run .todo-badge { background: var(--accent-soft); color: var(--accent); }
.todo-more { margin: 0.75rem 0 0; }

/* Seit der letzten Prüfung, Teaser eines Pakets (rechts im Untermenü). */
.since { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.92rem; }
.since p { margin: 0; }
.since-row { display: flex; justify-content: space-between; gap: 0.75rem; }
.since-row strong { font-variant-numeric: tabular-nums; }
.since-hint { display: block; font-size: 0.8rem; color: var(--text-2); }
.since-good { color: var(--ok); }
.since-warn { color: var(--warn); }
.teaser { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; padding: 1rem 1.1rem; color: var(--text); background: var(--surface); border: 1px dashed var(--later-line); border-radius: var(--radius); }
.teaser:hover { text-decoration: none; border-style: solid; }
.teaser-head { display: flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 600; color: var(--text-2); }
.teaser-action { font-size: 0.88rem; font-weight: 600; color: var(--accent); }

/* Zähler je Stufe in Tabellen: als Text, nur die Dringenden fallen auf. */
.count-urgent { font-size: 0.82rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 6px; background: var(--danger); color: var(--danger-ink); white-space: nowrap; }
.count-important { font-size: 0.82rem; font-weight: 600; padding: 0.1rem 0.5rem; border-radius: 6px; background: var(--warn-soft); color: var(--warn); white-space: nowrap; }
.count-later { font-size: 0.82rem; padding: 0.1rem 0.5rem; border-radius: 6px; background: var(--info-soft); color: var(--later); white-space: nowrap; }
.count-none { font-size: 0.82rem; color: var(--ok); }

/* Wahl des Standorts, Filter der Geräteliste: gleiche Reiterzeile, die Wahl hat aria-current. */
.site-switch, .filter-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1rem; }
.page-top .site-switch { margin: 0.75rem 0 0; }
.site-switch a, .filter-tabs a { padding: 0.3rem 0.8rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.88rem; color: var(--text); background: var(--surface); }
.site-switch a:hover, .filter-tabs a:hover { text-decoration: none; border-color: var(--text-2); }
.site-switch a[aria-current="page"], .filter-tabs a[aria-current="page"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* Einrichtung in vier Schritten. */
.setup-steps { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; }
.setup-step { display: flex; flex-direction: column; gap: 0.25rem; padding-top: 0.6rem; border-top: 4px solid var(--border); font-size: 0.95rem; }
.setup-state { font-size: 0.82rem; color: var(--text-2); }
.setup-done { border-top-color: var(--ok); }
.setup-done .setup-state { color: var(--ok); font-weight: 600; }
.setup-current { border-top-color: var(--accent); }
.setup-current .setup-state { color: var(--accent); font-weight: 600; }
.setup-later strong { color: var(--text-2); font-weight: 500; }
.setup-card h2 { margin-top: 0; }

/* Geräte: Sammelfreigabe oben, Liste darunter, Entscheidung je Zeile. */
.release-card { border: 2px solid var(--accent); }
.release-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; }
.release-head h2 { margin: 0 0 0.2rem; }
.release-head p { margin: 0; }
.chips { list-style: none; margin: 0.9rem 0 0.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { padding: 0.35rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; font-size: 0.88rem; overflow-wrap: anywhere; }
.chip-out { border-color: var(--danger); background: var(--danger-soft); }
.chip-more { align-self: center; }
.card.flush { padding: 0; }
.device-table td { vertical-align: top; }
/* Inventar (Sebastian, 14.11.2026): Zeilen nur Text; „mehr …“ klappt Einzelheiten in der Zelle auf, „Bearbeiten“ die Zeile .row-edit
   darunter über ihren Anker (:target, ohne JavaScript). Nach dem Speichern führt der Server auf den Anker der Zeile, das Formular ist zu. */
.device-table .row-more { margin-top: 0.25rem; }
.device-table .row-more > summary { cursor: pointer; color: var(--accent); font-size: 0.8rem; width: fit-content; }
.device-table .row-more[open] > summary { margin-bottom: 0.2rem; }
.device-table .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 0.4rem; }
.device-table .row-actions form { margin: 0; }
.device-table .row-edit { display: none; }
.device-table .row-edit:target { display: table-row; }
.device-table tr:has(+ .row-edit:target) > td { border-bottom-color: transparent; background: var(--accent-soft); }
.device-table .row-edit:target > td { background: var(--surface-2); border-left: 3px solid var(--accent); }
.row-edit-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem 1.25rem; padding: 0.25rem 0 0.4rem; }
.row-edit-form .row-edit-title { flex: 1 1 100%; margin: 0; }
.row-edit-form label { flex: 0 1 16rem; min-width: 0; }
.row-edit-form .rate-field { max-width: 9rem; }
.row-edit-form .row-edit-actions { display: flex; gap: 0.5rem; }
.row-edit-form > p { flex: 1 1 100%; margin: 0; }
/* Handy: Die Tabelle scrollt quer (ui.table_scroll); das Formular bleibt links im Bild und so breit wie der Schirm. */
@media (max-width: 700px) { .row-edit-form { position: sticky; left: 0.5rem; max-width: calc(100vw - 4rem); } }
.pager { display: flex; align-items: center; gap: 1rem; margin: 0.75rem 0 1.25rem; }

/* Netz prüfen: Wann, Wie gründlich. Die Felder für „regelmäßig“ und der passende Knopf kommen über :has, ohne JavaScript. */
.check-form { display: flex; flex-direction: column; gap: 1.4rem; }
.check-form fieldset { border: 0; margin: 0; padding: 0; }
.check-form legend { font-weight: 600; margin-bottom: 0.6rem; padding: 0; }
.when-choice { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pill { display: inline-flex; flex-direction: row; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 0.95rem; }
.pill:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 600; }
.when-regular { margin-top: 0.75rem; padding: 0.9rem 1rem; background: var(--surface-2); border-radius: 8px; }
@supports selector(:has(a)) {
  .when:not(:has(input[value="regelmaessig"]:checked)) .when-regular { display: none; }
  .check-form:has(input[value="regelmaessig"]:checked) .when-now-button { display: none; }
  .check-form:not(:has(input[value="regelmaessig"]:checked)) .when-plan-button { display: none; }
}
/* Scan-Start mit Kacheln (Auftrag 64) auf /scans: vier Schritte, Kacheln mit echtem Radio oder Checkbox (`ui.choice_tile`), gewählt
   über :has wie `.choice`. „später einmal“ und „regelmäßig“ blenden ihre Felder über :has ein; ältere Browser zeigen alles. */
.start-steps { display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: 1.5rem; }
.start-steps > h2 { margin: 0; }
.start-pick, .start-send { display: flex; flex-direction: column; gap: 1.2rem; }
.start-send { padding-top: 1.2rem; border-top: 1px solid var(--border); }
.start-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.start-step legend, .start-step > summary { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; margin-bottom: 0.6rem; padding: 0; }
.start-step > summary { cursor: pointer; }
.step-no { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.85rem; }
.start-sub { margin: 0.4rem 0; font-size: 0.9rem; color: var(--text-2); }
.choice-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: 0.6rem; }
.device-tiles { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.device-tiles .choice-tile { padding: 0.5rem 0.75rem; }
.choice-tile { min-width: 0; }
.choice-tile .choice-body { min-width: 0; overflow-wrap: anywhere; }
.choice-state { font-size: 0.85rem; color: var(--text-2); }
.choice-tile:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.start-next { display: flex; }
.start-search { max-width: 22rem; }
.start-plan { margin-top: 0.75rem; padding: 0.9rem 1rem; background: var(--surface-2); border-radius: 8px; display: flex; flex-direction: column; gap: 0.75rem; }
@supports selector(:has(a)) {
  .start-when:has(input[name="wann"][value="jetzt"]:checked) .start-plan { display: none; }
  .start-when:not(:has(input[name="wann"][value="spaeter"]:checked)) .when-later { display: none; }
  .start-when:not(:has(input[name="wann"][value="regelmaessig"]:checked)) .when-regular-only { display: none; }
  .start-send:has(input[name="wann"]:not([value="jetzt"]):checked) .when-now-button { display: none; }
  .start-send:not(:has(input[name="wann"]:not([value="jetzt"]):checked)) .when-plan-button { display: none; }
}
.start-result { margin-bottom: 1rem; }
.start-result h2 { margin: 0 0 0.5rem; }
.start-result-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.start-result-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.5rem; }
.start-running { margin-bottom: 1.5rem; }
.start-running progress { width: 8rem; }
.start-list-title { margin: 0 0 0.6rem; }
/* Scans mit Reitern (Auftrag 77d, Sebastian 17.11.2026: „weiter auseinander, da schwimmt manches ineinander“): Abschnitte mit festem
   Abstand statt einzelner Ränder, Filter mit Luft zur Tabelle, Schritte des Starts deutlich getrennt. */
.scans-page { display: flex; flex-direction: column; gap: 2rem; }
.scans-page > *, .scans-page .start-running, .scans-page .start-steps, .scans-page .start-result { margin-top: 0; margin-bottom: 0; }
.scans-page .start-list-title { margin: 0 0 -1rem; }
.scans-page #scan-filter { margin: 0; padding: 0.9rem 1rem; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; }
.scans-page .start-running h2 { margin: 0 0 0.9rem; }
.scans-page .table td, .scans-page .table th { padding-top: 0.7rem; padding-bottom: 0.7rem; }
.scans-page .start-steps { gap: 1.75rem; padding: 1.5rem 1.6rem; }
.scans-page .start-pick, .scans-page .start-send { gap: 1.75rem; }
.scans-page .start-send { padding-top: 1.75rem; }
.scans-page .choice-tiles { gap: 0.85rem; }
.depth-choices { display: flex; flex-direction: column; gap: 0.6rem; }
.choice { display: flex; flex-direction: row; align-items: flex-start; gap: 0.75rem; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-weight: 400; font-size: 0.95rem; }
.choice input { margin-top: 0.25rem; }
.choice:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); }
.choice-blocked { cursor: not-allowed; }
.choice-blocked strong, .choice-blocked .choice-text { color: var(--text-2); }
.choice-body { display: flex; flex-direction: column; gap: 0.15rem; }
.choice-text { font-size: 0.88rem; color: var(--text-2); }
.choice .profile-blocked, .choice .profile-note { font-weight: 400; }
.check-scope { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 0.4rem; font-size: 0.95rem; }
.check-status h2 { margin: 0 0 0.3rem; }
.check-status p { margin: 0.2rem 0; }
.check-rows { list-style: none; margin: 0 0 0.5rem; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.check-row { display: flex; flex-direction: column; gap: 0.1rem; font-size: 0.9rem; }
.check-row-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 0.6rem; }

/* Scan-Rate: eine Zeile je Netz oder Kategorie; die Warnung bleibt sichtbar. */
.rate-card > summary { cursor: pointer; list-style-position: inside; }
.rate-card > summary h2 { display: inline; margin: 0; font-size: 1.05rem; }
.rate-row { padding: 0.7rem 0; border-top: 1px solid var(--border); }
.rate-row h4 { margin: 0 0 0.4rem; }
.rate-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem 1rem; }
.rate-form > label:not(.check) { flex: 0 1 18rem; }
.rate-form > label.check { margin: 0 0 0.6rem; }
.rate-form > .flash { flex: 1 1 100%; margin: 0; }

/* --- Maßnahmen (Auftrag 23c) --------------------------------------------------------------
   Eigener Block, Klassen mit measure-. Farben nur aus den vorhandenen Variablen, damit Dunkel von selbst stimmt. */
.measure-page { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.measure-page > .card { margin: 0; }
.measure-lead { margin: 0; color: var(--text-2); }
.measure-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.measure-tabs a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--text); text-decoration: none; }
.measure-tabs a:hover { border-color: var(--accent); }
.measure-tabs a.current { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 600; }
.measure-tab-count { color: var(--text-2); font-variant-numeric: tabular-nums; }
.measure-list { display: flex; flex-direction: column; gap: 0.6rem; }
.measure-none { margin: 0; padding: 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2); }
.measure-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; padding: 0.9rem 1.15rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.measure-row:hover { border-color: var(--accent); }
.measure-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.measure-row-main { flex: 1 1 22rem; min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.measure-row-title { overflow-wrap: anywhere; }
.measure-row-meta { margin: 0; font-size: 0.875rem; color: var(--text-2); }
.measure-row-alert { font-size: 0.875rem; font-weight: 600; color: var(--danger); }
.measure-kev { font-weight: 600; color: var(--danger); }
.measure-chip { display: inline-block; min-width: 5rem; padding: 0.2rem 0.6rem; border-radius: 6px; font-size: 0.8125rem; font-weight: 600; text-align: center; }
.measure-urgency-3 { background: var(--danger); color: var(--danger-ink); }
.measure-urgency-2 { background: var(--warn-soft); color: var(--warn); }
.measure-urgency-1 { background: var(--info-soft); color: var(--text); }
.measure-status-open { background: var(--surface-2); color: var(--text-2); }
.measure-status-in_progress { background: var(--accent-soft); color: var(--accent); }
.measure-status-done { background: var(--ok-soft); color: var(--ok); }
.measure-exploited { background: var(--danger-soft); color: var(--danger); }
.measure-head h1 { margin: 0.5rem 0; overflow-wrap: anywhere; }
.measure-head-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.measure-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem 1.5rem; margin: 0.5rem 0 0; font-size: 0.875rem; }
.measure-legend dt { font-weight: 600; }
.measure-legend dd { margin: 0; color: var(--text-2); }
/* Details zum Aufklappen in der Maßnahmen-Liste (Sebastian, 05.11.2026): Die Zeile wächst weich mit (::details-content, wo es geht;
   sonst springt sie). Inhalt aus measures/_peek.html. */
.measure-peek { margin-top: 0.35rem; }
.measure-peek > summary { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 32px; cursor: pointer; color: var(--accent);
  font-size: 0.875rem; font-weight: 600; list-style: none; }
.measure-peek > summary::-webkit-details-marker { display: none; }
.measure-peek > summary::before { content: "▸"; transition: transform 0.2s ease; }
.measure-peek[open] > summary::before { transform: rotate(90deg); }
.measure-peek > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.measure-peek-body { max-width: 48rem; padding: 0.4rem 0 0.2rem; font-weight: normal; }
.measure-peek-content h3 { margin: 0.6rem 0 0.2rem; font-size: 0.875rem; }
.measure-peek-content h3:first-child { margin-top: 0; }
.measure-peek-devices { margin: 0; padding-left: 1.1rem; font-size: 0.875rem; }
.measure-peek-devices li { overflow-wrap: anywhere; }
@supports selector(::details-content) {
  .measure-peek { interpolate-size: allow-keywords; }
  .measure-peek::details-content { block-size: 0; overflow: hidden;
    transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete; }
  .measure-peek[open]::details-content { block-size: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .measure-peek::details-content, .measure-peek > summary::before { transition: none; }
}
.measure-uncounted ul { margin: 0.25rem 0 0; padding-left: 1.2rem; }
.measure-fold > summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.measure-state { display: flex; flex-direction: column; gap: 0.75rem; }
.measure-state-choice { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; padding: 0; border: 0; }
.measure-state-choice legend { font-weight: 600; margin-bottom: 0.3rem; padding: 0; }
.measure-state, .measure-aside-fold { padding: 0 0.6rem 0.4rem; }
.measure-aside-fold > summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.measure-aside-fold .measure-state { padding: 0.5rem 0 0; }
.measure-state-option input { width: auto; margin: 0; }
.measure-state-option { flex-direction: row; display: flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 0.75rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.measure-state-option:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); font-weight: 600; }
.measure-state-field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.875rem; }
.measure-state-field input { min-height: 44px; }

/* --- Berichte über das ganze Netz (Auftrag 23e) -------------------------------------------
   Eigener Block, Klassen mit report-… (Seite „Berichte“ und neue Abschnitte im Bericht). Farben nur aus vorhandenen Variablen. */
.report-page { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.report-page > .card { margin: 0; }
.report-new { display: flex; flex-direction: column; gap: 1rem; }
.report-new h2 { margin: 0; }
.report-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; margin: 0; padding: 0; border: 0; }
.report-choice legend { font-weight: 600; margin-bottom: 0.6rem; padding: 0; }
.report-choice-option { display: flex; flex-direction: row; gap: 0.6rem; align-items: flex-start; padding: 0.9rem; border: 1px solid var(--border);
  border-radius: 8px; cursor: pointer; font-weight: 400; }
.report-choice-option input { width: auto; margin: 0.2rem 0 0; }
.report-choice-option:has(input:checked) { border: 2px solid var(--accent); background: var(--accent-soft); }
.report-choice-text { display: flex; flex-direction: column; gap: 0.15rem; }
.report-choice-text span { font-size: 0.8125rem; color: var(--text-2); }
.report-check { display: flex; flex-direction: row; align-items: center; gap: 0.6rem; min-height: 44px; font-weight: 400; }
.report-check input, .report-check select { width: auto; margin: 0; }
.report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.report-ablage td { vertical-align: top; }
.report-share { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: baseline; }
.report-share .linkish { min-height: 0; padding: 0; border: 0; background: none; color: var(--danger); font: inherit; text-decoration: underline; cursor: pointer; }
.report-send > summary { cursor: pointer; color: var(--accent); }
.report-send form { margin-top: 0.5rem; min-width: 16rem; }
.report-status { font-size: 0.875rem; }
.report-status progress { width: 5rem; vertical-align: middle; }
.report-status-failed { color: var(--danger); font-weight: 600; }
/* Abschnitte im Bericht (auch PDF): ungeprüfte Bereiche, Kennzahlen, Entscheidungen. */
.report-unchecked { display: grid; gap: 0.4rem; margin: 0.5rem 0 0; }
.report-unchecked div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.report-unchecked dt { font-weight: 600; }
.report-unchecked dd { margin: 0; }
.report-kpis { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0.5rem 0; }
.report-kpis div { flex: 1 1 8rem; padding: 0.6rem 0.9rem; border: 1px solid var(--border); border-radius: 8px; }
.report-kpis dt { font-size: 0.8125rem; color: var(--text-2); }
.report-kpis dd { margin: 0; font-size: 1.5rem; font-weight: 700; }
.report-kpi-urgent dd { color: var(--danger); }
.report-kpi-important dd { color: var(--warn); }
.report-decisions li { margin-bottom: 0.35rem; }
@media (max-width: 640px) { .report-unchecked div { grid-template-columns: 1fr; gap: 0.2rem; } }
@media print { .report-kpis div, .report-unchecked div { break-inside: avoid; } }
/* PDF vom Server (WeasyPrint, report/pdf.html): Raster mit auto-fit kann es nicht verlässlich, die Angaben stehen deshalb als Flex. */
.report-pdf .facts { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.report-pdf .facts > div { flex: 1 1 40%; min-width: 0; }
.report-pdf .facts > div.full { flex-basis: 100%; }
.report-pdf .remediations td:nth-child(2) { width: 40%; }


/* ===== Design Kunden-Tenant (Auftrag 23g, docs/DESIGN-KUNDEN-TENANT.md) =====
   Tabellen im Stil der Maßnahmen-Seite, sortierbar über Links im Spaltenkopf (ohne JavaScript), Kacheln, Chips,
   zweispaltiges Raster. Makros dazu in _macros/dt.html. */
.tenant-name { padding-left: 1.1rem; border-left: 1px solid var(--topbar-line); color: var(--topbar-strong); font-size: 0.95rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 20rem; }

.title-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.title-row h1 { margin: 0; font-size: 1.85rem; line-height: 1.2; }
.title-row .lead { margin: 0.35rem 0 0; color: var(--text-2); font-size: 0.95rem; }
.title-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.title-actions form { display: flex; gap: 0.5rem; align-items: center; margin: 0; }
.title-actions label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--text-2); }
.title-actions select { min-height: 44px; }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tile { display: flex; flex-direction: column; gap: 0.25rem; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: var(--radius); padding: 1.1rem 1.25rem; color: var(--text); }
a.tile:hover { text-decoration: none; border-color: var(--accent); }
.tile-label, .tile-note { font-size: 0.88rem; color: var(--text-2); }
.tile-value { font-size: 2.25rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-urgent { border-top-color: var(--danger); } .tile-urgent .tile-value { color: var(--danger); }
.tile-important { border-top-color: var(--high); } .tile-important .tile-value { color: var(--warn); }
.tile-later { border-top-color: var(--later-line); } .tile-later .tile-value { color: var(--later); }

.split { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.split-main { flex: 999 1 40rem; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.split-side { flex: 1 1 22rem; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }

.dt-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.dt { width: 100%; border-collapse: collapse; }
.dt caption { text-align: left; padding: 1rem 1rem 0.5rem; font-size: 1.15rem; font-weight: 700; }
.dt-card.small .dt caption { font-size: 1.05rem; }
.dt th { text-align: left; font-size: 0.8rem; font-weight: 600; color: var(--text-2); padding: 0.25rem 0.5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dt th > span.th-plain { display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.5rem; }
.dt th a.sort { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px; padding: 0 0.5rem; border-radius: 6px; color: var(--text-2); }
.dt th a.sort:hover { text-decoration: none; color: var(--text); background: var(--sort-active); }
.dt th[aria-sort="ascending"] a.sort, .dt th[aria-sort="descending"] a.sort { color: var(--text); background: var(--sort-active); }
.sort-arrow { font-size: 0.7rem; color: var(--sort-arrow); }
.dt th[aria-sort="ascending"] .sort-arrow, .dt th[aria-sort="descending"] .sort-arrow { color: var(--text); }
.dt td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--row-line); vertical-align: middle; }
.dt tbody tr:last-child td, .dt tbody tr:last-child th { border-bottom: 0; }
.dt tbody th { text-align: left; font-weight: 400; font-size: 0.95rem; color: var(--text); padding: 0.65rem 1rem; border-bottom: 1px solid var(--row-line); white-space: normal; }
.dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.dt .mono { font-family: var(--mono); font-size: 0.88rem; }
.dt .muted { color: var(--text-2); font-size: 0.9rem; }
.dt .sub { display: block; font-size: 0.82rem; color: var(--text-2); margin-top: 0.1rem; }
.dt .strong, .dt a.strong { font-weight: 600; color: var(--text); }
.dt .end { text-align: right; white-space: nowrap; }
.dt-foot { padding: 0.6rem 1rem 1rem; font-size: 0.9rem; }
.dt-empty { margin: 0; padding: 1.25rem 1rem; color: var(--text-2); }
/* Releases der Mutter (mutter/releases.html): je Release eine Karte. Kopf mit Commit und Freigabe bricht auf dem Handy um;
   das Auswahlfeld wird nicht breiter als nötig (globales select { width: 100% } hätte die Zeile gesprengt). */
.release-card + .release-card { margin-top: 1rem; }
.release-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem 1.5rem; padding: 1rem; }
.release-title { min-width: 0; }
.release-title h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin: 0; font-size: 1.15rem; }
.release-title .sub { margin: 0.25rem 0 0; font-size: 0.85rem; color: var(--text-2); }
.release-actions, .wave-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.wave-form select { width: auto; min-width: 0; max-width: 100%; }
.release-card .dt { border-top: 1px solid var(--border); }
.release-card .dt td { padding: 0.75rem 0.6rem; }
.release-card .dt td:first-child { padding-left: 1rem; }
.release-card .dt td:last-child { padding-right: 1rem; }
.dt .end.wrap { white-space: normal; }

.chip { display: inline-block; font-size: 0.8rem; font-weight: 600; border-radius: 6px; padding: 0.2rem 0.6rem; white-space: nowrap; background: var(--neutral-soft); color: var(--neutral-ink); }
.chip.wide { min-width: 5.25rem; text-align: center; }
.chip-urgent { background: var(--danger); color: var(--danger-ink); }
.chip-important { background: var(--warn-soft); color: var(--warn); }
.chip-later { background: var(--info-soft); color: var(--later); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-info { background: var(--accent-soft); color: var(--accent); }

.teaser { display: flex; flex-direction: column; gap: 0.5rem; background: var(--surface); border: 1px dashed var(--later-line); border-radius: var(--radius); padding: 1.1rem 1.25rem; color: var(--text); }
a.teaser:hover { text-decoration: none; border-color: var(--accent); }
.teaser-kicker { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; color: var(--text-2); }
.teaser-cta { font-size: 0.9rem; font-weight: 600; color: var(--accent); }

.subtabs { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.subtabs a { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0 1rem; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--text-2); font-weight: 500; }
.subtabs a:hover { text-decoration: none; color: var(--text); }
.subtabs a[aria-current="page"] { color: var(--text); font-weight: 650; border-bottom-color: var(--brand-blue); }
.subtabs .count { font-size: 0.75rem; font-weight: 600; border-radius: 10px; padding: 0.05rem 0.5rem; background: var(--neutral-soft); color: var(--neutral-ink); }
/* Unternavigation in der rechten Spalte (Blueprint 12.11.2026): senkrechte Liste wie die Rail, aktiver Eintrag wie dort. */
.subnav { display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.subnav a { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 40px; padding: 0 0.75rem; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.subnav a:hover { text-decoration: none; color: var(--text); background: var(--surface-2); }
.subnav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.subnav .count { font-size: 0.75rem; font-weight: 600; border-radius: 10px; padding: 0.05rem 0.5rem; background: var(--neutral-soft); color: var(--neutral-ink); }
@media (max-width: 1100px) { .subnav { flex-direction: row; flex-wrap: wrap; } }

.site-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr)); gap: 1rem; }
.site-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.35rem; display: flex; flex-direction: column; gap: 0.9rem; }
.site-card h2 { margin: 0; font-size: 1.2rem; }
.site-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem; }
.site-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; text-align: center; }
.site-stats div { background: var(--surface-2); border-radius: 8px; padding: 0.6rem 0.4rem; display: flex; flex-direction: column; }
.site-stats strong { font-size: 1.35rem; }
.site-stats span { font-size: 0.75rem; color: var(--text-2); }
.site-links { display: flex; flex-wrap: wrap; gap: 0.9rem; border-top: 1px solid var(--row-line); padding-top: 0.75rem; font-size: 0.9rem; font-weight: 600; }
.site-card-sub { display: block; font-size: 0.88rem; color: var(--text-2); margin-top: 0.2rem; overflow-wrap: anywhere; }
.site-stats strong.site-stat-urgent { color: var(--danger); }
.site-facts { margin: 0; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.9rem; }
.site-facts > div { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline; }
.site-facts dt { color: var(--text-2); }
.site-facts dd { margin: 0; overflow-wrap: anywhere; }

/* Pfad über dem Titel (dt.path) und Piktogramme (dt.icon): einfarbig, Text steht immer daneben. */
.dt-path { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.88rem; color: var(--text-2); margin-bottom: 0.5rem; }
.dt-path [aria-current="page"] { color: var(--text); font-weight: 600; }
.dt-icon { flex: none; }

.dt .urgent-text { color: var(--danger); font-weight: 700; }
.dt tr.lazy td { color: var(--text-2); font-size: 0.88rem; }
.dt th .sub { font-weight: 400; }

.dt-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0.9rem 0 0; }
.dt-links-top { margin: 0 0 0.9rem; }  /* Linkleiste über einer Tabelle (Inventar) */

/* Warnung über einer Tabelle (z. B. Appliance ohne Verbindung): Symbol, Text, nächster Schritt. Farbe sagt es nicht allein. */
.dt-alert { display: flex; align-items: center; gap: 0.9rem; background: var(--warn-soft); color: var(--text); border: 1px solid var(--high); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin-bottom: 1rem; }
.dt-alert > svg { color: var(--warn); }
.dt-alert > div { flex: 1 1 auto; min-width: 0; }
.dt-alert .sub { display: block; font-size: 0.88rem; color: var(--text-2); }
.dt-alert > a { font-weight: 600; white-space: nowrap; }
.dt-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.dt-notes > section { display: flex; flex-direction: column; gap: 0.3rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.15rem; font-size: 0.9rem; }
.dt-notes > section span { color: var(--text-2); }

/* Seite eines Pakets (packages/page.html): Kopfzeile mit Zustand, rechts der Kasten mit Preis, Probe und Frage. */
.package-head .package-state { margin: 0 0 0.4rem; font-size: 0.88rem; }
.package-locked.split { max-width: none; }
.package-offer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.35rem; gap: 0.6rem; }
.package-offer h2 { margin: 0; font-size: 1.15rem; }
.package-price { margin: 0; font-size: 1.5rem; font-weight: 700; }
.package-offer .package-actions { flex-direction: column; align-items: stretch; margin: 0.5rem 0; }
.package-offer .package-actions form, .package-offer .package-actions button { width: 100%; justify-content: center; }

/* Stand der Schwachstellendaten mit „Neu bewerten“ (sites/detail.html, Reiter Befunde; 22c-4): Text links, Knopf daneben. */
.intel-stand { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: -0.6rem 0 1.25rem; }
.intel-stand p { margin: 0; flex: 1 1 20rem; }
.intel-stand .button svg { vertical-align: -2px; }

/* Seite „Datenquellen“ (datasources.html): Hinweistexte der Quellen, teils lange englische Lizenztexte. */
.datasource-notice { font-size: 0.88rem; color: var(--text-2); max-width: 70rem; }

/* Alte Liste der Freigabe (sites/geraete.html: ul.chips) behält ihr Aussehen neben den neuen Chips. */
.chips > .chip { display: block; white-space: normal; font-weight: 400; font-size: 0.88rem; padding: 0.35rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: inherit; }
.chips > .chip-out { border-color: var(--danger); background: var(--danger-soft); }

@media (max-width: 900px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .tenant-name { display: none; }
  .title-row h1 { font-size: 1.5rem; }
}


/* ===== Design 05.11.2026 (Rail) ==========================================================================================
   Übernahme des Entwurfs aus Ideen/Norynd-HTML-Export (Sebastian, 05.11.2026): Navigation links in der Rail, heller Kopf
   ohne Logo, ruhigere Karten und Tabellen, Kennzahlen als eine Leiste.
   Farben nur über die Variablen oben. Abweichungen vom Entwurf: Lab-Streifen bleibt sichtbar, Pakete als eigene
   Rail-Gruppe, Handy-Menü ohne JavaScript (Checkbox #nav-toggle), Aktionen rechts statt unten (siehe dort),
   .dt-Tabellen auf dem Handy ohne Mindestbreite. Anleitung: docs/UI-AENDERN.md. */
body { font-size: 14px; line-height: 1.55; min-height: 100vh; }
h1 { font-size: 30px; font-weight: 650; letter-spacing: -1px; line-height: 1.22; max-width: 1000px; }
h2 { font-size: 16px; letter-spacing: -0.2px; }
h3 { font-size: 12px; }
button, input, select, textarea { font-family: inherit; }
/* Links in Sätzen sind sonst nur an der Farbe zu erkennen (WCAG 1.4.1, Abnahme 05.11.2026 D-3): beim Überfahren unterstreichen,
   nicht in Rail, Reitern und Knöpfen. */
a:hover, a:focus-visible { text-decoration: underline; }
.rail a:hover, .tabs a:hover, a.button:hover, a.action:hover, .rail a:focus-visible, .tabs a:focus-visible,
a.button:focus-visible, a.action:focus-visible { text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button, .button, .action { min-height: 38px; }
input:not([type="checkbox"]):not([type="radio"]), select { min-height: 40px; border-radius: 7px; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

/* Kopf und Seite rechts neben der Rail. Nur mit Rail (angemeldet); Seiten ohne Anmeldung bleiben, wie sie sind. */
.rail ~ .topbar { margin-left: 222px; border-bottom: 1px solid var(--border); position: relative; z-index: 30; }
.rail ~ .envbanner { margin-left: 222px; }
.topbar-row { padding: 15px 32px; min-height: 73px; gap: 16px; }
.tenant-name { padding-left: 0; border-left: 0; }
.topbar-search input[type="search"] { width: 250px; font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.topbar-search input[type="search"]::placeholder { color: var(--text-2); }
.pick-button { background: transparent; border: 0; padding: 0; display: flex; gap: 10px; color: var(--text); }
.pick-label { font-size: 10px; }
.pick-value { font-size: 13px; }
.avatar { background: var(--accent-soft); color: var(--accent); border-radius: 8px; width: 32px; height: 32px; }
.menu[open] > .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.icon-button { border-radius: 8px; background: transparent; width: 32px; height: 32px; color: var(--text-2); border-color: var(--border); }
.icon-button:hover, .icon-button.current, .menu[open] > .icon-button { color: var(--text); border-color: var(--accent); }
.customer-pick:hover > .pick-button, .customer-pick[open] > .pick-button { color: var(--accent); }
.menu-panel { font-size: 13px; }
.mobile-nav-toggle { background: none; color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; cursor: pointer; line-height: 1.2; }
.mobile-close { cursor: pointer; }

.rail ~ .page, .rail ~ .page.with-aside { margin: 0 0 0 222px; padding: 32px; max-width: none; width: auto; display: block; }
.page-top { padding: 0 0 24px; margin: 0; border-bottom: 0; }
.page-head { gap: 20px; align-items: center; }
.page-head h1 { margin-bottom: 5px; }
.rail ~ .page .container { padding: 0; max-width: none; min-width: 0; width: 100%; margin: 0; }
.crumbs { font-size: 11px; margin-bottom: 14px; color: var(--text-2); }
.page-top .tabs { margin-top: 24px; margin-bottom: 0; }
.tabs { border-bottom: 1px solid var(--border); gap: 20px; }
.tabs a { border-radius: 0; font-size: 12px; padding: 12px 2px; }
.tabs a.current, .tabs a[aria-current="page"] { box-shadow: none; border-bottom: 2px solid var(--accent); background: transparent; color: var(--accent); }

/* Karten, Kästen, Tabellen: flach, feine Linie, kein Schatten. */
.card, .dt-card, .panel { box-shadow: none; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-bottom: 20px; }
.card { padding: 22px; }
.panel { padding: 18px; }
.card h2, .dt-card h2 { font-weight: 650; }
.section-head { margin-bottom: 18px; }
.table, .dt { font-size: 13px; }
.table thead th, .dt thead th { font-size: 10px; text-transform: uppercase; letter-spacing: 0.65px; color: var(--text-2); background: var(--surface-2); font-weight: 600; padding: 12px 16px; }
.table td, .dt td { padding: 15px 16px; border-bottom: 1px solid var(--row-line); vertical-align: middle; }
.table tbody tr:last-child td, .dt tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover, .dt tbody tr:hover { background: var(--surface-2); }
.table a, .dt a { font-weight: 550; }
.dt caption { padding: 20px 20px 16px; font-size: 16px; font-weight: 650; }
.dt-foot { padding: 14px 20px; border-top: 1px solid var(--row-line); font-size: 12px; }
/* Hülle für breite Tabellen (ui.table_scroll bzw. .table-wrap): scrollt waagrecht, per Tastatur erreichbar (tabindex).
   position: relative hält absolut gesetzte Kinder (.visually-hidden in Zellen) in der Hülle; sonst ragen sie über die Seite und
   die ganze Seite scrollt waagrecht (Sichtprüfung 62k–62p). */
.table-scroll { max-width: 100%; overflow: auto; position: relative; }
.table-scroll table { margin: 0; }
/* Kleiner Text in Tabellenzellen relativ zur Zelle (13px), nicht zur Seite (.small 0.85rem wäre größer als der Zellentext). Knöpfe,
   Feldelemente und .mono behalten ihre Größe; Kopfzeilen (10px) bleiben außen vor, damit dort nichts unleserlich wird. Nur am
   Bildschirm (PDF-Bericht und Rechnung laden style.css mit eigenen Größen); .small in .small wird nicht noch einmal kleiner. */
@media screen {
  :is(.table, .dt) :is(td, tbody th).small:not(.mono),
  :is(.table, .dt) :is(td, tbody th) .small:not(.mono, button, .button, input, select) { font-size: 0.85em; }
  :is(.table, .dt) :is(td, tbody th) .small .small, :is(.table, .dt) :is(td, tbody th).small .small { font-size: inherit; }
}
.badge, .chip { font-size: 11px; border-radius: 5px; padding: 3px 7px; font-weight: 550; border: 0; }
.chip-later, .sev-low, .sev-info { color: var(--text-2); background: var(--neutral-soft); }
.chip-info, .badge.run { background: var(--accent-soft); color: var(--accent); }

/* Kennzahlen und Kacheln als eine Leiste mit Trennstrichen; die Farbe der Zahl bleibt (Text daneben sagt die Bedeutung). */
.kpis, .tiles { display: flex; gap: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; padding: 20px 0; margin: 0 0 24px; overflow: hidden; }
.kpis > .kpi, .tiles > .tile { flex: 1; min-width: 0; background: none; border: 0; border-right: 1px solid var(--border); border-radius: 0; padding: 0 24px; box-shadow: none; }
.kpis > .kpi:last-child, .tiles > .tile:last-child { border-right: 0; }
.kpi-value, .tile-value, .tile .value { font-size: 32px; font-weight: 600; letter-spacing: -1px; }
.kpi-label, .tile-label { font-size: 11px; color: var(--text-2); }
.page .tile small { font-size: 11px; }
.kpi-note { margin-top: -12px; margin-bottom: 20px; font-size: 11px; }
.split { gap: 24px; }
.split-main, .split-side { min-width: 0; }
.grid-2 { gap: 20px; }

/* Aktionen (Block aside). Blueprint „Aufteilung und Benennung“ (Sebastian 12.11.2026): Workspace Header über die volle
   Breite, darunter Workspace (80 %) und rechts Unternavigation und Aktionen (20 %, mindestens 16rem, mitlaufend). Unter
   1101px wie bisher: Hauptknopf über dem Inhalt, Kästen mit Überschrift darunter. */
@media (min-width: 1101px) {
  .rail ~ .page.with-aside { display: grid; grid-template-columns: minmax(0, 4fr) minmax(16rem, 1fr); column-gap: 24px; align-items: start; }
  .rail ~ .page.with-aside .page-top { grid-column: 1 / -1; }
  .rail ~ .page.with-aside .container { grid-column: 1; }
  .rail ~ .page .aside { grid-column: 2; position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; }
  .rail ~ .page .aside > .panel, .rail ~ .page .aside > .secondary-section { margin: 0; }
}
@media (max-width: 1100px) {
  .rail ~ .page.with-aside { display: flex; flex-direction: column; align-items: stretch; }
  .rail ~ .page.with-aside .page-top { order: -2; }
  .rail ~ .page .aside { display: contents; }
  .rail ~ .page .aside > * { order: 1; margin: 20px 0 0; }
  .rail ~ .page .aside > .panel:not(:has(.panel-title)) { order: -1; margin: 0 0 20px; }
  .rail ~ .page .aside > .subnav { order: -2; margin: 0 0 12px; }
}
.aside .action { font-size: 12px; }
.facts { font-size: 12px; }
.facts dt { color: var(--text-2); }
.facts dd { margin-bottom: 10px; }
.hint, .flash { border-radius: 8px; font-size: 12px; padding: 14px 18px; }
.attention { background: var(--warn-soft); border: 1px solid var(--border); border-left: 3px solid var(--warn); }
.button.primary, .action.primary, button.primary { background: var(--primary); color: var(--primary-ink); border-radius: 7px; font-size: 12px; font-weight: 600; box-shadow: none; padding: 10px 16px; }
.button:not(.primary) { font-size: 12px; border-radius: 7px; }
.table td.num, .dt td.num { font-variant-numeric: tabular-nums; }
.muted, .small { line-height: 1.55; }
.sub { font-size: 11px; margin-top: 4px; }
.sort { font-size: inherit; }
.panel-title { font-size: 12px; text-transform: none; letter-spacing: 0; }
.fold summary { cursor: pointer; }
.fold[open] summary { margin-bottom: 12px; }
/* Nebenabschnitt zum Aufklappen (z. B. „So liest du den Nachweis“, „Gut zu wissen“): zu, bis man ihn braucht. */
.secondary-section { margin-top: 20px; }
.secondary-section > summary { font-size: 13px; font-weight: 600; padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.secondary-section[open] > summary { margin-bottom: 12px; }
.secondary-section > .card { margin-top: 12px; }
/* Der nächste Schritt auf der Seite eines Standorts (Ablauf): Strich links in der Akzentfarbe. */
.workflow-highlight { border-left: 3px solid var(--accent); }
.report { max-width: 1000px; margin: 0 auto; padding: 48px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.report h1 { font-size: 28px; }
.report-section { border-top: 1px solid var(--border); padding-top: 24px; margin-top: 28px; }
.report-toolbar { max-width: 1000px; margin: 0 auto 20px; }
/* Inhaltsverzeichnis des Berichts unter der Überschrift (report/_article.html, Anker #teil-<abschnitt>; auch im PDF klickbar).
   Ohne flex-gap, damit WeasyPrint es gleich setzt. */
.report-toc { margin: 20px 0 24px; padding: 12px 0 6px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 11px; }
.report-toc a { display: inline-block; margin: 0 18px 6px 0; color: var(--text-2); }
.report-toc a:hover { color: var(--accent); }
/* Deckblatt ohne eigene Linien: Die Linie des nächsten Abschnitts trennt (sonst doppelt unter dem Deckblatt, eine über dem Logo).
   Nur am Bildschirm: Im Druck bleibt der Abstand oben auf dem Deckblatt (30 mm, @media print). */
@media screen { .report .report-cover { border-top: 0; border-bottom: 0; margin-top: 0; padding-top: 0; } }
.l2-wrap, .map-wrap { min-height: 440px; }

@media (min-width: 1550px) {
  .rail ~ .page, .rail ~ .page.with-aside { padding: 40px 48px; }
  .topbar-row { padding-inline: 48px; }
}
@media (max-width: 1100px) {
  .rail { width: 190px; padding-inline: 12px; }
  .rail-logo { width: 160px; }
  .rail ~ .topbar, .rail ~ .envbanner, .rail ~ .page, .rail ~ .page.with-aside { margin-left: 190px; }
  .rail ~ .page, .rail ~ .page.with-aside { padding: 24px; }
  .topbar-row { padding: 15px 24px; }
  .split-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
  .topbar-search input[type="search"] { width: 190px; }
}
@media (max-width: 700px) {
  body { font-size: 14px; }
  /* Handy: Rail zu, der Knopf ☰ (Label der Checkbox) klappt sie über den Inhalt. Die Checkbox bleibt per Tastatur
     erreichbar (optisch versteckt, nicht display: none); ihr Fokus zeigt sich am Knopf. */
  .nav-toggle { display: block; position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
  .nav-toggle:focus-visible ~ .topbar .mobile-nav-toggle { outline: 3px solid var(--focus); outline-offset: 3px; }
  .rail { display: none; width: 250px; box-shadow: var(--shadow); }
  .nav-toggle:checked ~ .rail { display: flex; }
  .mobile-nav-toggle { display: inline-block; }
  .mobile-close { display: block; align-self: end; background: none; border: 0; color: var(--text); padding: 4px 8px; }
  .rail ~ .topbar, .rail ~ .envbanner, .rail ~ .page, .rail ~ .page.with-aside { margin-left: 0; }
  .topbar-row { padding: 12px 16px; gap: 12px; min-height: 60px; }
  .topbar-tools { gap: 4px; }
  .topbar-search { display: none; }
  .pick-label { display: none; }
  .pick-value { max-width: 145px; }
  .rail ~ .page, .rail ~ .page.with-aside { padding: 24px 16px; }
  h1 { font-size: 25px; letter-spacing: -0.7px; overflow-wrap: anywhere; }
  .page-head { align-items: start; }
  .page-head, .page-head .head-actions { flex-wrap: wrap; }
  .page-top { padding-bottom: 24px; }
  .kpis, .tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .kpis > .kpi, .tiles > .tile { padding: 16px; border-bottom: 1px solid var(--border); }
  .kpi-value, .tile-value { font-size: 28px; }
  .kpis > .kpi:last-child, .tiles > .tile:last-child { border-bottom: 0; }
  .card { padding: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .table-scroll { margin-inline: 0; }
  /* Abweichung vom Entwurf: .dt-Tabellen ohne Mindestbreite, sonst verschwinden schmale Tabellen (Zahlen) auf dem Handy rechts. */
  .table { min-width: 520px; }
  .dt-card .table-scroll { overflow: auto; }
  .split-side { display: block; }
  .report { padding: 24px 18px; }
  .report h1 { font-size: 24px; }
  .tabs { overflow: auto; white-space: nowrap; max-width: 100%; flex-wrap: nowrap; }
  .kpi-note { margin-top: 0; }
  .menu-panel { max-width: calc(100vw - 30px); }
  .table .nowrap { white-space: normal; }
}
@media print {
  .rail, .nav-toggle, .topbar, .aside { display: none !important; }
  .rail ~ .page, .rail ~ .page.with-aside { margin: 0; padding: 0; }
  /* Aktionen und Reiter nicht drucken, Lab-Streifen ohne Platz für die Rail, Tabellen ohne Scrollbalken (Abnahme 05.11.2026 D-2) */
  .page-head .head-actions, .page-top .tabs, .rail ~ .page .tabs { display: none !important; }
  .rail ~ .envbanner { margin-left: 0; }
  .table-wrap, .table-scroll, .dt-card .table-scroll { overflow: visible !important; }
  .report { border: 0; padding: 0; max-width: none; }
}

/* ===== Rechnung der Mutter (Auftrag 26, invoice/pdf.html, nur PDF über WeasyPrint) =====
   Eigene Seitenvorlage: Firmendaten als Fußzeile auf jeder Seite (running element), Seitenzahl oben rechts, kein „Vertraulich“. */
@page invoice {
  size: A4; margin: 16mm 18mm 34mm 22mm;
  @top-right { content: "Seite " counter(page) " von " counter(pages); font-size: 8pt; color: var(--text-2); }
  @bottom-left { content: none; }
  @bottom-right { content: none; }
  @bottom-center { content: element(invoicefoot); width: 100%; vertical-align: top; }
}
.invoice-pdf { page: invoice; font-size: 10pt; color: var(--text); background: var(--surface); }
.invoice { max-width: none; }
.invoice h1 { font-size: 15pt; margin: 8mm 0 3mm; }
.invoice-head { margin-bottom: 8mm; }
.invoice-logo { width: 52mm; height: auto; }
.invoice-top { display: flex; justify-content: space-between; gap: 10mm; }
.invoice-address { width: 85mm; min-height: 32mm; }
.invoice-address p { margin: 0; }
.invoice-sender { font-size: 7pt; color: var(--text-2); border-bottom: 1px solid var(--border); padding-bottom: 1mm; margin-bottom: 3mm !important; }
.invoice-meta { border-collapse: collapse; font-size: 9pt; }
.invoice-meta th { text-align: left; font-weight: 400; color: var(--text-2); padding: 0.4mm 4mm 0.4mm 0; }
.invoice-meta td { padding: 0.4mm 0; }
.invoice-lines, .invoice-totals { border-collapse: collapse; }
.invoice-lines { width: 100%; margin-top: 4mm; }
.invoice-lines th { text-align: left; font-size: 8.5pt; font-weight: 600; color: var(--text-2); border-bottom: 1.5px solid var(--text); padding: 1.5mm; }
.invoice-lines td { border-bottom: 1px solid var(--row-line); padding: 2mm 1.5mm; vertical-align: top; }
.invoice-lines .sub, .invoice-totals .sub { display: block; font-size: 8pt; font-weight: 400; color: var(--text-2); }
.invoice-pdf .num { text-align: right; white-space: nowrap; }
.invoice-totals { margin: 4mm 0 0 auto; width: 110mm; }
.invoice-totals th { text-align: left; font-weight: 400; padding: 1mm 1.5mm; }
.invoice-totals td { padding: 1mm 1.5mm; vertical-align: top; }
.invoice-net th, .invoice-net td { border-top: 1px solid var(--border); }
.invoice-grand th, .invoice-grand td { border-top: 1.5px solid var(--text); font-weight: 700; font-size: 11pt; }
.invoice-pay { margin-top: 8mm; padding: 3mm 4mm; background: var(--accent-soft); border-left: 3px solid var(--accent); break-inside: avoid; }
.invoice-pay p { margin: 0.5mm 0; }
.invoice-note { white-space: pre-line; font-size: 9pt; }
.invoice-foot { position: running(invoicefoot); display: flex; gap: 5mm; font-size: 7pt; color: var(--text-2); border-top: 1px solid var(--border); padding-top: 2mm; }
.invoice-foot div { flex: 1 1 0; }
.invoice-foot p { margin: 0 0 0.6mm; }

/* AttackPath (Auftrag 44f): fünf Ansichten der Leinwand „Attack Map Entwürfe“. SVG nur mit Klassen (CSP), Farben aus den
   Variablen oben, damit hell und dunkel ohne eigene Regeln stimmen. */
.ap-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ap-kpis .card { display: grid; gap: 2px; padding: 12px 16px; }
.ap-kpis strong { font-size: 24px; font-weight: 750; }
.ap-accent { color: var(--accent); }
@media (max-width: 760px) { .ap-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ap-map, .ap-flow { width: 100%; display: block; font-family: var(--sans); }
/* Höhe aus dem viewBox nur ohne Zoom: netmap.js setzt die Höhe als Attribut und ändert danach nur den viewBox. Mit height: auto
   folgte die Karte dem Ausschnitt und wuchs bei jedem Verschieben um den Rahmen (Sebastian 17.11.2026). */
.ap-flow, .map-wrap:not(.l2-zoom) .ap-map { height: auto; }
/* Auf sehr breiten Bildschirmen wüchse die Schrift mit der Breite; höchstens 1200 px breit, mittig (Sebastian 17.11.2026) */
.ap-flow { max-width: 1200px; margin-inline: auto; }
/* Auftrag 69: Fluss, Engpass und Ringe in Originalgröße (Schrift ≥ 11 px); schmaler Bildschirm: die Grafik scrollt waagerecht, die Seite nicht */
.ap-scroll { overflow-x: auto; max-width: 100%; }
.ap-scroll > svg { min-width: 680px; }
.ap-zone { fill: var(--surface-2); stroke: var(--border); }
.ap-zone-internet { fill: var(--neutral-soft); stroke-dasharray: 4 4; }
.ap-zone-identity { fill: var(--info-soft); stroke: var(--later-line); stroke-dasharray: 5 4; }
.ap-zone-label { font-size: 13px; font-weight: 700; fill: var(--text); }
.ap-zone-label-identity { fill: var(--later-line); }
.ap-firewall { fill: var(--text); }
.ap-map text.ap-firewall-label { font-size: 13px; font-weight: 700; fill: var(--surface); stroke: none; }
.ap-rule { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.ap-rule-label { font-size: 12px; font-weight: 800; fill: var(--accent); }
.ap-map text.ap-rule-label, .ap-map text.ap-choke-label, .ap-map .ap-point text { stroke: none; }
.ap-node { fill: var(--surface); stroke: var(--later-line); stroke-width: 2; }
.ap-node.ap-entry { fill: var(--danger-soft); stroke: var(--danger); }
.ap-node.ap-jewel { fill: var(--danger-soft); stroke: var(--danger); stroke-width: 2.5; }
.ap-kind-finding, .ap-kind-account { stroke: var(--high); }
.ap-node-label { font-size: 12px; font-weight: 700; fill: var(--text); }
.ap-node-sub { font-size: 11px; fill: var(--text-2); }
.ap-map .ap-node-label { font-size: 13px; }
.ap-map .ap-node-sub, .ap-map .ap-rule-label, .ap-map .ap-choke-label { font-size: 13px; }
.ap-sub-finding { fill: var(--danger); }
.ap-choke { fill: var(--accent); }
.ap-choke-label { font-size: 11px; font-weight: 800; fill: var(--accent-ink); }
.ap-path { fill: none; stroke: var(--later-line); stroke-width: 2; }
.ap-path-faint { stroke-opacity: 0.45; stroke-width: 1.5; }
.ap-path-main { stroke: var(--high); stroke-width: 2.5; stroke-opacity: 0.85; }
.ap-path-strong { stroke: var(--high); stroke-width: 4; }
.ap-arrowhead { fill: var(--high); }
.ap-arrowhead-faint { fill: var(--later-line); }
.ap-stage { font-size: 11px; font-weight: 700; fill: var(--text-2); }
.ap-legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.ap-legend li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ap-legend svg { width: 28px; height: 14px; flex: none; }
.ap-legend svg[viewBox="0 0 20 20"] { width: 14px; }
.ap-legend-mark { color: var(--danger); font-weight: 700; }
.ap-node.ap-node-choke { stroke: var(--accent); stroke-width: 2.5; }
.ap-sub-choke { fill: var(--accent); font-weight: 700; }
.ap-shortest { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; }
.ap-shortest li { display: grid; gap: 4px; border: 1px solid var(--border); border-radius: 8px; padding: 10px; }
.ap-band { fill: none; stroke: var(--later-line); stroke-opacity: 0.3; }
.ap-band-strong { stroke: var(--high); stroke-opacity: 0.38; }
.ap-flow .ap-stage { font-size: 12px; letter-spacing: 0.04em; }
.ap-sub-ok { fill: var(--ok); }
.ap-beforeafter { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13px; margin: 0; }
.ap-beforeafter dt { font-weight: 400; }
.ap-beforeafter dd { margin: 0; text-align: right; white-space: nowrap; }
.ap-beforeafter s { color: var(--text-2); }
.ap-plan { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
/* Auftrag 70c: Rangliste „Was bringt am meisten“ */
.ap-together { display: grid; gap: 8px; margin: 4px 0 14px; padding: 12px 16px; border-radius: var(--radius); background: var(--surface-2);
  border: 1px solid var(--border); }
.ap-together p { margin: 0; }
.ap-together-values { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 0; }
.ap-together-values div { display: grid; gap: 2px; }
.ap-together-values dt { font-size: 12px; color: var(--text-2); }
.ap-together-values dd { margin: 0; font-size: 18px; font-variant-numeric: tabular-nums; }
.ap-rank td { vertical-align: top; }
.ap-rank td:nth-child(2) { min-width: 13em; }
.ap-rank tr.selected td { background: var(--accent-soft); }
.ap-ok { color: var(--ok); }
.ap-count-danger { color: var(--danger); }
.ap-count-warn { color: var(--warn); }
.ap-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 12px 0 16px; }
.ap-step { border: 1px solid var(--border); border-top: 4px solid var(--high); border-radius: var(--radius); padding: 14px; background: var(--surface);
  display: grid; gap: 6px; align-content: start; }
.ap-step > * { margin: 0; }
.ap-step-gate { border-top-color: var(--accent); }
.ap-step-goal { border-top-color: var(--danger); }
/* Auftrag 69: Titel der Karten nicht im globalen h3-Format (Großbuchstaben) */
.ap-step h3.ap-step-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }
.ap-step-kicker { margin: 0; font-size: 11px; font-weight: 800; color: var(--high); text-transform: uppercase; letter-spacing: 0.04em; }
.ap-step-gate .ap-step-kicker { color: var(--accent); }
.ap-step-goal .ap-step-kicker { color: var(--danger); }
.ap-step-text { font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.ap-strip { list-style: none; margin: 12px 0 0; padding: 0; display: flex; border-radius: 10px; overflow: hidden; font-size: 12px; font-weight: 700; }
.ap-strip li { flex: 1 1 0; min-width: 0; padding: 8px; text-align: center; background: var(--accent-soft); color: var(--accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-strip li.ap-strip-internet { background: var(--neutral-soft); color: var(--text-2); }
.ap-strip li.ap-strip-firewall { background: var(--text); color: var(--surface); }
.ap-strip li.ap-strip-identity { background: var(--info-soft); color: var(--later-line); }
.ap-pathinfo { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; }
.ap-pathinfo > section { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: grid; gap: 8px; align-content: start; }
.ap-pathinfo h3 { margin: 0; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ap-pathinfo ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; color: var(--text-2); }
.ap-pathinfo p { margin: 0; }
.ap-pathlist a[aria-current="true"] { font-weight: 700; }
@media (max-width: 760px) { .ap-pathinfo { grid-template-columns: 1fr; } .ap-strip { flex-wrap: wrap; } .ap-strip li { flex: 1 1 40%; } }
.ap-chokes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ap-chokes li { display: grid; gap: 4px; }
.ap-chokes meter { width: 100%; }
.ap-setup-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.ap-pathlist { display: grid; gap: 4px; }
.ap-lage strong { font-size: 24px; font-weight: 750; }
/* Auftrag 70a: Zonenkarte über die volle Breite, Seitenspalte darunter (Karten nebeneinander). */
/* Knoten mit Feld: SVG-Links (Zonenkarte, Pfadfluss). Fokus und Auswahl über den Rahmen des Knotens, nicht nur über Farbe: die
   Auswahl ist zusätzlich dicker. Outline auf SVG-Links zeichnen nicht alle Browser. */
.ap-link, .ap-link:hover { cursor: pointer; text-decoration: none; }
.ap-link:focus { outline: none; }
.ap-link:hover .ap-node, .ap-link:hover .ap-rule { stroke: var(--accent); }
.ap-link:focus-visible .ap-node, .ap-link:focus-visible .ap-rule { stroke: var(--focus); stroke-width: 4; }
.ap-point.selected .ap-node, .ap-point.selected .ap-rule, .ap-flow-node.selected .ap-node { stroke: var(--accent); stroke-width: 4; }
/* Feld von rechts (an.feld, Auftrag 62/67) auf dieser Seite: immer über dem Inhalt, auch ab 1700px (dort steht das Feld der
   Standorte im Raster .ansicht, das es hier nicht gibt). --feld-top wie bei .ansicht. */
.ap-feld-slot { --feld-top: 89px; }
body:has(.envbanner) .ap-feld-slot { --feld-top: 116px; }
@media (max-width: 700px) { .ap-feld-slot { --feld-top: 72px; } body:has(.envbanner) .ap-feld-slot { --feld-top: 99px; } }
@media (min-width: 1700px) {
  #feld-slot.ap-feld-slot .feld { position: fixed; width: 400px; max-height: none; box-shadow: var(--shadow-feld); }
  @starting-style { #feld-slot.ap-feld-slot .feld { transform: translateX(calc(100% + 24px)); opacity: 0; } }
  #feld-slot.ap-feld-slot.htmx-swapping .feld { transform: translateX(calc(100% + 24px)); opacity: 0; }
}
.ap-feld-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.ap-feld-facts { display: grid; gap: 0; margin: 0; font-size: 13px; }
.ap-feld-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--row-line); }
.ap-feld-facts dt { color: var(--text-2); }
.ap-feld-facts dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.ap-feld-part { display: grid; gap: 6px; }
.ap-feld-part h3 { margin: 0; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); }
.ap-feld-part ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; overflow-wrap: anywhere; }
.ap-feld-part p { margin: 0; }
/* Auftrag 70d: Ansicht Kronjuwelen. Oben die festgelegten als Karten (Grund groß, Zahlen klein), darunter die Geräte als Tabelle;
   die gewählte Zeile bzw. Karte ist markiert (Rahmen bzw. Fläche, dazu aria-current). */
.ap-jewels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.ap-jewel { border: 1px solid var(--border); border-top: 4px solid var(--danger); border-radius: var(--radius); padding: 12px 14px;
  background: var(--surface); display: grid; gap: 6px; align-content: start; }
.ap-jewel.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.ap-jewel > * { margin: 0; }
.ap-jewel-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; overflow-wrap: anywhere; }
.ap-jewel-reason { font-size: 14px; overflow-wrap: anywhere; }
.ap-jewel-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0; font-size: 12px; }
.ap-jewel-facts dt { color: var(--text-2); }
.ap-jewel-facts dd { margin: 0; font-weight: 700; }
.ap-jewel-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ap-pick-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.ap-pick-filter input[type="search"] { flex: 1 1 14rem; max-width: 22rem; }
.ap-pick td { vertical-align: top; }
.ap-pick td:first-child { min-width: 11em; overflow-wrap: anywhere; }
.ap-pick tr.selected td { background: var(--accent-soft); }
.ap-pick-notes { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 2px; }
/* Auftrag 70b: Pfad & Was-wäre-wenn. Pfadgrafik mit fester Mindestbreite (attack_path_views.PATH_MIN_W): Schrift 12 bleibt nach
   Skalierung ≥ 11 px; auf schmalen Schirmen scrollt nur der Rahmen, nicht die Seite. Angenommen behoben: gestrichelter Rahmen und Text
   „angenommen behoben“ (nicht nur Farbe). */
.ap-pathgraph-wrap { overflow-x: auto; margin: 12px 0 4px; }
.ap-pathgraph { width: 100%; min-width: 880px; height: auto; display: block; font-family: var(--sans); }
.ap-pathgraph .ap-node-label { font-size: 13px; }
.ap-pathgraph .ap-node-sub { font-size: 12px; }
.ap-pathgraph .ap-sub-tech { fill: var(--high); font-weight: 600; }
.ap-pg-card.selected .ap-node { stroke: var(--accent); stroke-width: 4; }
.ap-node.ap-node-fixed { stroke-dasharray: 6 4; stroke: var(--ok); }
.ap-fixed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; }
.ap-fixed-title { margin: 0; font-weight: 700; font-size: 13px; }
.ap-fixed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ap-fixed-list li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px dashed var(--ok);
  border-radius: 999px; background: var(--ok-soft); font-size: 13px; max-width: 100%; }
.ap-fixed-name { overflow-wrap: anywhere; }
.ap-fixed-x { display: inline-grid; place-items: center; min-width: 28px; min-height: 28px; border-radius: 50%; color: var(--text-2);
  text-decoration: none; }
.ap-fixed-x:hover, .ap-fixed-x:focus-visible { background: var(--surface); color: var(--danger); }
.ap-kpis.ap-kpis-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ap-take-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; overflow-wrap: anywhere; }

/* Angriffsgraph (Auftrag 76): Reiter „Graph“ von AttackPath (attack_path/_graph.html, attackgraph.js). Spalten als Grid mit einer Liste je
   Spalte, Knoten als Karten; attackgraph.js legt die Kanten als SVG darunter (.ag-edges) und zoomt über transform (CSSOM, kein
   style-Attribut). Ohne Skript scrollt der Rahmen. Seitenfeld rechts ab 1400px, sonst darunter. Farben nur aus Variablen: Fund = --high,
   Regel = --accent, Konto = --warn, geschlossen = --ag-closed; Zustände stehen immer auch als Text da. */
.ag { display: flex; flex-direction: column; gap: 16px; }
.ag-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ag-kpi { display: grid; gap: 2px; padding: 12px 16px; }
.ag-kpi-v { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 4px 8px; }
.ag-kpi-was { font-size: 15px; font-weight: 500; color: var(--text-2); }
.ag-kpi-none { font-size: 15px; font-weight: 600; color: var(--warn); }
.ag-delta { font-size: 13px; font-weight: 650; border-radius: 999px; padding: 1px 8px; }
.ag-delta-good { color: var(--ok); background: var(--ok-soft); }
.ag-delta-bad { color: var(--danger); background: var(--danger-soft); }
/* Seitenkarten in der Grundspalte rechts (Block aside, Sebastian 17.11.2026: AttackPath .ap-side/.ag-side, andere Seiten .side-stack
   statt einer eigenen Seitenspalte im Inhalt). Die Spalte ist dann oft länger als der Bildschirm, darum läuft sie nicht mit (sonst
   wäre ihr unteres Ende nicht erreichbar). */
.ap-side, .ag-side, .side-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ap-side > .card, .ap-side > section, .ag-side > .card, .side-stack > .card, .side-stack > section { margin: 0; }
@media (min-width: 1101px) { .rail ~ .page .aside:has(.ap-side, .side-stack) { position: static; } }

.ag-graph { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.ag-tabs { display: flex; flex-wrap: wrap; margin: 0; }
.ag-tabs a { overflow-wrap: anywhere; }
.ag-tabs a[aria-current] { font-weight: 700; color: var(--text); text-decoration: none; box-shadow: inset 0 -2px 0 var(--accent); }
.ag-graph > p { margin: 0; }
.ag-zoom { display: inline-flex; gap: 6px; }
.ag-filter { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--info-soft); }
/* Fläche wie die Topologie von UniFi (Sebastian 17.11.2026): feste Höhe, Punktraster, Graph beim Laden ganz eingepasst und mittig;
   Mausrad zoomt, Ziehen verschiebt (attackgraph.js). */
.ag-viewport { display: flex; overflow: auto; max-height: min(74vh, 860px); min-height: 320px; border: 1px solid var(--row-line);
  border-radius: 10px; cursor: grab;
  background-color: var(--surface-2);
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1.2px); background-size: 22px 22px; }
.ag-viewport.ag-dragging { cursor: grabbing; user-select: none; }
.ag-canvas { flex: none; margin: auto; }
/* Feste Spaltenbreite; die Stufen sind Bahnen mit durchgezogener Trennlinie, der Kopf bleibt beim Scrollen stehen */
.ag-stage { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(5, 13.5rem); column-gap: 4.5rem;
  width: max-content; box-sizing: border-box; padding: 0 28px 28px; transform-origin: 0 0; }
.ag-col { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ag-col + .ag-col::before { content: ""; position: absolute; top: 0; bottom: -28px; left: -2.25rem; z-index: -1;
  border-left: 1px dashed var(--border); }
.ag-col-head { position: sticky; top: 0; z-index: 2; margin: 0 -10px; padding: 12px 10px 8px; text-align: center;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); font-weight: 650; }
.ag-col-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: center; gap: 18px; flex: 1; }
.ag-edges { position: absolute; inset: 0; overflow: visible; pointer-events: none; z-index: 0; }
.ag-edges-top { z-index: 3; }
.ag-edge { fill: none; stroke: var(--high); stroke-linecap: round; stroke-linejoin: round; opacity: 0.7;
  transition: opacity .3s ease, stroke-width .3s ease; }
/* Rückwege und Beschriftungen nur beim Zeigen auf einen Knoten oder eine Kette (Signal vs Noise) */
.ag-edge-back { stroke-dasharray: 2 5; opacity: 0.3; }
.ag-edge-label-start { text-anchor: start; }
.ag-edge-dead { stroke: var(--ag-closed); stroke-dasharray: 5 5; opacity: 0.6; }
.ag-edge-label { font-size: 11px; fill: var(--text); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round;
  text-anchor: end; font-family: var(--sans); opacity: 0; transition: opacity .3s ease; }
.ag-focus .ag-edge:not(.ag-hot) { opacity: 0.08; }
.ag-focus .ag-edge.ag-hot, .ag-edge-label.ag-hot { opacity: 1; }
.ag-focus .ag-edge-back.ag-hot { opacity: 0.8; }
/* Knoten kompakt: Symbol links, Name und Adresse rechts, darunter Erreichbarkeit und Tore */
.ag-node { position: relative; z-index: 1; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 10px; row-gap: 3px;
  align-items: center; padding: 9px 11px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; min-width: 0;
  transition: opacity .3s ease, border-color .2s ease; }
.ag-node > :not(.ag-ico) { grid-column: 2; }
.ag-ico { grid-column: 1; grid-row: 1 / span 3; align-self: start; display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; color: var(--accent); background: var(--accent-soft); }
.ag-node-jewel .ag-ico { color: var(--danger); background: var(--danger-soft); }
.ag-kind-account .ag-ico, .ag-kind-group .ag-ico { color: var(--warn); background: var(--warn-soft); }
.ag-node-entry .ag-ico { color: var(--text-2); background: var(--row-line); }
.ag-node:not(.ag-node-jewel) .ag-eyebrow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; }
.ag-node > .ag-gates, .ag-node > .ag-reach, .ag-node > .ag-state-text, .ag-node > .small { grid-column: 1 / -1; }
.ag-focus .ag-node:not(.ag-hot) { opacity: 0.35; }
.ag-node.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.ag-node-jewel { border: 2px solid var(--danger); }
.ag-node-entry { border-style: dashed; }
.ag-node-dead { opacity: 0.5; }
.ag-node-iso { border: 1px dashed var(--ok); }
.ag-node-iso .ag-label { text-decoration: line-through; }
.ag-eyebrow { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); font-weight: 650; }
.ag-node-jewel .ag-eyebrow { color: var(--danger); }
.ag-label { font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
.ag-label a { color: inherit; }
.ag-sub { font-size: 12px; color: var(--text-2); font-family: var(--mono); overflow-wrap: anywhere; }
.ag-reach { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.ag-reach-none { font-style: italic; }
.ag-state-text { font-size: 12px; font-weight: 650; color: var(--ok); }
.ag-node-dead .ag-state-text { color: var(--text-2); }
.ag-meter { flex: 1; min-width: 3rem; height: 0.3rem; border: 0; border-radius: 3px; background: var(--row-line); }
.ag-meter::-webkit-meter-bar { background: var(--row-line); border: 0; border-radius: 3px; height: 0.3rem; }
.ag-meter::-webkit-meter-optimum-value { background: var(--high); border-radius: 3px; }
.ag-meter::-moz-meter-bar { background: var(--high); border-radius: 3px; }
.ag-meter-ok::-webkit-meter-optimum-value { background: var(--ok); }
.ag-meter-ok::-moz-meter-bar { background: var(--ok); }
.ag-meter-risk::-webkit-meter-optimum-value { background: var(--danger); }
.ag-meter-risk::-moz-meter-bar { background: var(--danger); }
.ag-gates { list-style: none; margin: 3px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ag-gate { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 1.5; padding: 1px 6px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text); text-decoration: none; }
.ag-gate::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--high); flex: none; }
.ag-gate-rule::before { background: var(--accent); }
.ag-gate-account::before { background: var(--warn); border-radius: 50%; }
a.ag-gate:hover, a.ag-gate:focus-visible { border-color: var(--accent); }
.ag-gate-off { text-decoration: line-through; color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.ag-gate-off::before { background: var(--ok); }
.ag-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-2); }
.ag-legend li { display: inline-flex; align-items: center; gap: 6px; }
.ag-sw { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--high); }
.ag-sw-back { border-top: 2px dotted var(--high); }
.ag-sw-dead { border-top: 3px dashed var(--ag-closed); }
.ag-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--high); }
.ag-dot-rule { background: var(--accent); }
.ag-dot-account { background: var(--warn); border-radius: 50%; }
.ag-panel { display: grid; gap: 10px; }
.ag-panel > h2, .ag-panel p { margin: 0; }
.ag-jewels, .ag-tips, .ag-scenarios { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ag-jewels li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; font-size: 13px; }
.ag-jewels .ag-meter { grid-column: 1 / -1; }
.ag-jewel-name { overflow-wrap: anywhere; }
.ag-jewel-risk { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ag-tips li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 13px; }
.ag-tip-name { overflow-wrap: anywhere; }
.ag-tip-name .muted { display: block; }
.ag-tips .ag-meter { grid-column: 1 / -1; }
.ag-plan-head { margin: 4px 0 0; font-size: 13px; }
.ag-plan { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; font-size: 13px; }
.ag-scenarios li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; }
.ag-weights { gap: 12px; }
.ag-weight { display: grid; gap: 4px; font-size: 13px; }
.ag-weight label { display: flex; justify-content: space-between; gap: 8px; }
.ag-weight output { font-weight: 650; font-variant-numeric: tabular-nums; }
.ag-weight input[type="range"] { width: 100%; accent-color: var(--accent); }
.ag-chain-tools { display: inline-flex; gap: 14px; }
.ag-chains td { vertical-align: top; }
.ag-chains tr[data-ag-kette]:hover, .ag-chains tr[data-ag-kette]:focus-within { background: var(--accent-soft); }
.ag-chain-closed .ag-chain { color: var(--text-2); text-decoration: line-through; text-decoration-color: var(--ag-closed); }
.ag-arr { color: var(--text-2); }
.ag-chain-jewel { color: var(--danger); font-weight: 650; }
.ag-state { display: inline-block; font-size: 12px; font-weight: 650; border-radius: 6px; padding: 1px 7px; }
.ag-state-open { color: var(--danger); background: var(--danger-soft); }
.ag-state-shut { color: var(--ok); background: var(--ok-soft); }
.ag-state-new { color: var(--warn); background: var(--warn-soft); }
.ag-pages { display: flex; gap: 12px; align-items: center; }
.ap-graph-try { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
@media (max-width: 760px) { .ag-viewport { max-height: 70vh; } }
@media (prefers-reduced-motion: reduce) { .ag-edge, .ag-edge-label, .ag-node { transition: none; } }

/* Prüfauftrag für den Kunden (Auftrag 45c, orders/customer.html): Ablauf als nummerierte Schritte. */
.order-steps { counter-reset: order-step; list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.order-steps li { counter-increment: order-step; display: grid; grid-template-columns: 2rem 1fr; column-gap: 0.75rem; }
.order-steps li::before {
  content: counter(order-step); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
}
.order-steps li span { color: var(--text-2); }
/* Sandbox von AttackPath (Auftrag 47b): lange Liste der Maßnahmen scrollt für sich. */
.ap-sandbox-list { max-height: 22rem; overflow-y: auto; grid-template-columns: 1fr; display: grid; gap: 0.35rem; }
/* Regelvorschlag (Auftrag 47c): Vorschau der Befehle. */
.ap-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin: 0; }
/* Inventar bestätigen (Auftrag 45d): Abstand zwischen Einleitung und Liste. */
.inventory-form { margin-top: 1rem; }
/* Drei Felder nebeneinander (Prüfauftrag, Auftrag 45c); schmal untereinander wie .row. */
.row.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row.row-3:has(> :nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .row.row-3, .row.row-3:has(> :nth-child(4)) { grid-template-columns: 1fr; } }

/* Ebene „Verbindungen“ der Netzkarte (Auftrag 51a) */
.flowmap { width: 100%; max-width: 640px; height: auto; display: block; margin: 0 auto; }
.flowmap .flow-link { stroke: var(--accent); stroke-opacity: .55; }
.flowmap .flow-w1 { stroke-width: 1; }
.flowmap .flow-w2 { stroke-width: 3; }
.flowmap .flow-w3 { stroke-width: 6; }
.flowmap .flow-node circle { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.flowmap .flow-node text { fill: var(--text); font-size: 12px; }

/* Filterspalte auf weiteren Seiten (62i): Geräte und Maßnahmen eines Standorts nutzen das Raster .ansicht ohne Detailfeld, mit der
   Zusatzklasse .filter-seite. Ihre Tabellen sind breit; neben der 20-%-Spalte rechts bliebe ihnen mit der Filterspalte links zu wenig.
   Deshalb stehen die Gruppen bis 1599px offen als Leiste über der Tabelle (nebeneinander, Zähler sichtbar), erst darüber links.
   Schmal (bis 1100px) gilt die Regel des Bausteins: Knopf „Filter“ zum Aufklappen. Die Selektoren tragen :not(:has(#feld-slot .feld))
   mit, weil der Baustein-Block danach steht und sonst gewönne. */
.filter-seite { margin-bottom: 16px; }
.filter-seite-count { margin: 0 0 8px; }
@media (min-width: 1101px) and (max-width: 1599px) {
  .ansicht.filter-seite:not(:has(#feld-slot .feld)) { grid-template-columns: minmax(0, 1fr); }
  .ansicht.filter-seite:not(:has(#feld-slot .feld)) .filter-body { flex-direction: row; flex-wrap: wrap; gap: 4px 32px; padding: 4px 12px 8px; }
  .ansicht.filter-seite:not(:has(#feld-slot .feld)) .filter-group { flex: 1 1 11rem; }
}

/* Ansicht und Konfiguration (Auftrag 62c/62d, Bedienmuster nach UniFi, Design Rail). Raster .ansicht: Filterspalte | Inhalt |
   Detailfeld. Ohne JavaScript bedienbar (Links). Ob das Feld offen ist, steht nur im DOM (htmx tauscht #feld-slot), deshalb
   regelt alles Weitere :has(#feld-slot .feld). Schmal zuerst: Feld, Suche mit Knopf „Filter“, Inhalt untereinander.
   Ab 1101px Filterspalte links. Auftrag 67 (Sebastian 15.11.2026): Das Feld legt sich über den Inhalt (fest rechts, Schatten), das
   Raster bleibt beim Öffnen unverändert; erst ab 1700px rückt der Inhalt weich zur Seite (dritte Spalte 0 → 400px). */
.ansicht { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.ansicht-inhalt { min-width: 0; }
#feld-slot { min-width: 0; order: -2; }
.filterspalte { order: -1; }
.ansicht:not(:has(#feld-slot .feld)) #feld-slot { display: none; }
.view-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-bottom: 16px; }
.view-search { display: flex; gap: 0.5rem; flex: 1 1 18rem; max-width: 32rem; }
.view-search input { flex: 1; min-width: 0; }
.view-count { color: var(--text-2); font-size: 13px; }
.view-switch { display: inline-flex; margin-left: auto; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.view-switch a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 0.9rem; color: var(--text-2); font-weight: 550; font-size: 13px; }
.view-switch a + a { border-left: 1px solid var(--border); }
.view-switch a:hover { text-decoration: none; color: var(--text); background: var(--surface-2); }
.view-switch a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 650; }
.title-row .head-actions .action { width: auto; padding-inline: 16px; }

/* Filterspalte (an.filterspalte): schmal eine Zeile mit Suche und Knopf „Filter“ (Checkbox und <label> wie die Rail, ohne
   JavaScript), die Gruppen darunter nebeneinander; breit eine Spalte links. Option = Link mit Kästchen (Häkchen per CSS), Text
   und Zähler; gewählt zeigt es Kästchen, Farbe und versteckten Text „gewählt“. */
.filterspalte { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.filterspalte .view-search { flex: 1 1 16rem; }
.filter-toggle { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.filterspalte .filter-toggle-label { display: inline-flex; flex-direction: row; white-space: nowrap; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; cursor: pointer; }
.filter-toggle-label::after { content: "▾"; color: var(--text-2); }
.filter-toggle:checked + .filter-toggle-label::after { content: "▴"; }
.filter-toggle:focus-visible + .filter-toggle-label { outline: 3px solid var(--focus); outline-offset: 3px; }
.filter-active { color: var(--accent); }
.filter-body { display: none; flex-basis: 100%; flex-wrap: wrap; align-items: flex-start; gap: 4px 32px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.filter-toggle:checked ~ .filter-body { display: flex; }
.filter-group { flex: 1 1 12rem; min-width: 0; }
.filter-group summary { padding: 8px 6px 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.65px; text-transform: uppercase; color: var(--text-2); cursor: pointer; }
.filter-group ul { list-style: none; margin: 0 0 4px; padding: 0; }
.filter-option { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 6px; border-radius: 6px; color: var(--text); font-size: 13px; font-weight: 400; }
.filter-option:hover { background: var(--surface-2); text-decoration: none; }
.filter-label { min-width: 0; overflow-wrap: anywhere; }
.filter-box { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border: 1px solid var(--text-2); border-radius: 3px; font-size: 10px; line-height: 1; }
.filter-option[aria-current="true"] { color: var(--accent); font-weight: 600; }
.filter-option[aria-current="true"] .filter-box { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.filter-option[aria-current="true"] .filter-box::after { content: "✓"; }
.filter-count { margin-left: auto; padding-left: 8px; color: var(--text-2); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; }
.filter-reset { flex-basis: 100%; display: inline-flex; align-items: center; min-height: 32px; padding: 0 6px; font-size: 12px; font-weight: 600; }

/* Kacheln */
.ansicht .site-cards { grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.site-tile { position: relative; gap: 0.75rem; transition: border-color 0.15s ease; }
.site-tile:hover, .site-tile:focus-within { border-color: var(--accent); }
.site-tile.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.site-tile-link { color: var(--text); }
.site-tile-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.site-tile-link:focus-visible { outline: none; }
.site-tile:has(.site-tile-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.site-tile-appliance { margin: 0; display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--text-2); overflow-wrap: anywhere; }
.site-tile-appliance::before { content: ""; flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--text-2); }
.site-tile-ok::before { background: var(--ok); }
.site-tile-important::before { background: var(--warn); }
.site-tile-info::before { background: var(--accent); }
.site-tile-foot { margin: 0; font-size: 0.82rem; color: var(--text-2); }
/* Inventar als Kacheln (Auftrag 77a): „Alle Appliances“ zuerst mit Akzentlinie, je Kachel Netze und Ausnahmen in zwei Spalten. */
.inv-tile-all { border-top: 3px solid var(--accent); }
.inv-scopes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; border-top: 1px solid var(--border); padding-top: 0.75rem; }
.inv-scope h3 { margin: 0 0 0.35rem; font-size: 0.78rem; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; }
.inv-scope h3 .count { font-size: 0.72rem; font-weight: 600; border-radius: 10px; padding: 0.05rem 0.45rem; margin-left: 0.25rem; background: var(--neutral-soft); color: var(--neutral-ink); text-transform: none; letter-spacing: 0; }
.inv-scope-list { margin: 0; padding: 0; list-style: none; font-size: 0.85rem; line-height: 1.5; overflow-wrap: anywhere; }
.inv-scope p { margin: 0.2rem 0 0; }
@media (max-width: 520px) { .inv-scopes { grid-template-columns: minmax(0, 1fr); } }

/* Liste dicht wie bei UniFi: 13px, Zeilen um 32px, keine Zeilenlinien, Namen in einer Zeile (voller Name im Feld). Bei offenem
   Feld treten die Spalten mit Klasse col-opt zurück (Kunde, Geräte, offen, letzte Prüfung). */
.site-list-wrap { container-type: inline-size; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.dt.site-list { font-size: 13px; }
.dt.site-list thead th { padding: 4px 4px; }
.dt.site-list th a.sort, .dt.site-list th > span.th-plain { min-height: 30px; padding: 0 4px; }
.dt.site-list td { padding: 5px 8px; height: 32px; border-bottom: 0; white-space: nowrap; }
.dt.site-list .muted { font-size: 13px; }
.site-list-cut { display: block; max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-list-name { display: block; max-width: 13rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-list .site-tile-appliance { font-size: 13px; overflow-wrap: normal; }
.site-list tr.selected td { background: var(--accent-soft); }
/* Nach verfügbarer Breite statt nach Bildschirm (Laptop 1366px, Feld offen, Handy): erst Geräte und Datum, dann alle col-opt. */
@container (max-width: 940px) { .site-list .col-b { display: none; } }
@container (max-width: 760px) { .site-list .col-opt { display: none; } }
/* Handy: Name, Zustand und Appliance passen ohne Querblättern; voller Name im title und im Feld. */
@container (max-width: 560px) { .site-list-name { max-width: 8rem; } .site-list-cut { max-width: 7rem; } .site-list .site-tile-appliance .site-list-cut { max-width: 4.5rem; } }

/* Detailfeld (an.feld): Kasten im Fluss, ohne Schatten und ohne Abdunkeln; Inhalt daneben bleibt bedienbar. */
.feld { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.feld-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 20px 4px; }
.feld-head h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.feld-head h2:focus { outline: none; }
.feld-sub { margin: 4px 0 0; color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.feld-close { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 600; }
.feld-close:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.feld-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 20px 20px; display: flex; flex-direction: column; gap: 16px; }
/* Auftrag 70c: Teile eines langen Felds nicht stauchen (sonst schneidet .feld-wege mit overflow: hidden seine Links ab), der Körper scrollt */
.feld-body > * { flex-shrink: 0; }
.feld-tabs { margin-bottom: 0; }
.feld-state { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.feld-appliance { color: var(--text-2); font-size: 13px; overflow-wrap: anywhere; }
.feld-wege { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.feld-wege a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 14px; color: var(--text); font-size: 13px; font-weight: 500; }
.feld-wege a + a { border-top: 1px solid var(--row-line); }
.feld-wege a:hover { background: var(--surface-2); text-decoration: none; }
.feld-wege a::after { content: "›"; color: var(--text-2); font-size: 16px; }
.feld-weg-text { flex: 1 1 auto; min-width: 0; }
.feld-weg-hint { flex: 0 1 auto; color: var(--text-2); font-size: 12px; font-weight: 400; text-align: right; }
.feld-switch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.75rem; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; }
.feld-danger { margin: 0; padding-top: 0.75rem; border-top: 1px solid var(--row-line); }
/* Formular im Feld (Auftrag 62: „Formulare direkt im Feld“): Rückweg zu den Einstellungen und Titel oben, Felder untereinander
   (das Feld ist 400px breit, .row hätte zwei Spalten). */
.feld-form-head { display: flex; flex-direction: column; gap: 4px; }
.feld-form-head a { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font-size: 13px; font-weight: 600; }
.feld-form-head h3 { margin: 0; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--text); }
.feld-form .row { grid-template-columns: minmax(0, 1fr); }
.feld-form textarea { min-height: 7rem; }
.feld-form .actions { padding-top: 12px; border-top: 1px solid var(--row-line); background: var(--surface); }
/* Bewegung des Felds (Auftrag 67): unter 1700px fest rechts über dem Inhalt. Einblenden beim Einfügen (@starting-style), Ausblenden
   während htmx beim Schließen 280 ms wartet (#feld-slot.htmx-swapping, hx-swap „swap:280ms“ am Schließen-Link). Ersetzt ein Feld ein
   anderes (ui.js setzt #feld-slot.feld-wechsel), bleibt der Kasten stehen und nur der Inhalt blendet um. */
.ansicht:has(#feld-slot .feld) #feld-slot { display: contents; }
/* Unter dem Kopf (73px) bzw. dem Lab-Streifen, damit Suche und Konto sichtbar bleiben. */
.ansicht { --feld-top: 89px; }
body:has(.envbanner) .ansicht { --feld-top: 116px; }
#feld-slot .feld { position: fixed; z-index: 40; top: var(--feld-top); right: 16px; bottom: 16px; width: min(400px, calc(100vw - 32px));
  box-shadow: var(--shadow-feld);
  transition: transform 280ms cubic-bezier(.22, 1, .36, 1), opacity 170ms cubic-bezier(.22, 1, .36, 1); }
@starting-style { #feld-slot .feld { transform: translateX(calc(100% + 24px)); opacity: 0; } }
#feld-slot.htmx-swapping .feld { transform: translateX(calc(100% + 24px)); opacity: 0;
  transition: transform 280ms cubic-bezier(.4, 0, 1, 1), opacity 280ms cubic-bezier(.4, 0, 1, 1); }
#feld-slot.feld-wechsel .feld { transition: none; }
@starting-style { #feld-slot.feld-wechsel .feld { transform: none; opacity: 1; } }
#feld-slot .feld-body > * { transition: opacity 280ms cubic-bezier(.22, 1, .36, 1), transform 280ms cubic-bezier(.22, 1, .36, 1); }
@starting-style { #feld-slot .feld-body > * { opacity: 0; transform: translateY(6px); } }
#feld-slot .feld-body > :nth-child(2) { transition-delay: 40ms; }
#feld-slot .feld-body > :nth-child(3) { transition-delay: 80ms; }
#feld-slot .feld-body > :nth-child(n+4) { transition-delay: 120ms; }

@media (min-width: 1101px) {
  /* Filterspalte links, mit und ohne Feld (das Feld liegt darüber, Auftrag 67). */
  .ansicht { grid-template-columns: 14rem minmax(0, 1fr); }
  .ansicht .filterspalte { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; }
  /* Suche in einer Zeile: Feld und „Suchen“ nebeneinander, kurzer Platzhalter (an.suche, placeholder). */
  .ansicht .filterspalte .view-search { flex: none; max-width: none; gap: 6px; }
  .ansicht .filterspalte .view-search input { padding-inline: 8px; font-size: 13px; }
  .ansicht .filterspalte .view-search button { flex: none; padding-inline: 10px; font-size: 13px; }
  .ansicht .filter-toggle, .ansicht .filter-toggle-label { display: none; }
  .ansicht .filter-body { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: 4px 8px 8px; }
  .ansicht .filter-group { flex: none; }
  /* Speichern bleibt sichtbar, während das Feld blättert. */
  .feld-form .actions { position: sticky; bottom: -20px; margin: 0 -20px -20px; padding: 12px 20px; }
}
/* Weg B (Auftrag 67): breit genug für Liste und Feld nebeneinander. Dritte Spalte wächst weich auf 400px, das Feld steht darin
   (angeheftet beim Blättern), die Liste wird weich schmaler; die Spalten col-opt treten zurück. */
@media (min-width: 1700px) {
  .ansicht { grid-template-columns: 14rem minmax(0, 1fr) 0px; column-gap: 24px;
    transition: grid-template-columns 280ms cubic-bezier(.22, 1, .36, 1); }
  .ansicht:has(#feld-slot .feld) { grid-template-columns: 14rem minmax(0, 1fr) 400px; }
  .ansicht #feld-slot { grid-column: 3; grid-row: 1 / span 2; }
  .ansicht:has(#feld-slot .feld) #feld-slot { display: block; position: sticky; top: 16px; }
  .ansicht .filterspalte { grid-column: 1; grid-row: 1 / span 2; }
  .ansicht .ansicht-inhalt { grid-column: 2; grid-row: 1 / span 2; }
  #feld-slot .feld { position: static; width: 400px; max-height: calc(100vh - 32px); box-shadow: none; }
  @starting-style { #feld-slot .feld { transform: translateX(40px); opacity: 0; } }
  #feld-slot.htmx-swapping .feld { transform: translateX(40px); opacity: 0; }
  .ansicht:has(#feld-slot .feld) .site-list .col-opt { display: none; }
}
/* Bearbeiten in der Zeile (Auftrag 67): „Bearbeiten“ erscheint beim Überfahren bzw. Fokus der Zeile (Touch: immer). Die Zeile darunter
   klappt weich auf (grid-template-rows 0fr → 1fr beim Einfügen), das Formular blendet nach; ui.js klappt mit der Klasse „zu“ wieder
   zu. Die gespeicherte Zeile leuchtet kurz grün (tr.gespeichert). */
.site-list-namecell { display: flex; align-items: center; gap: 8px; }
.site-list-namecell .site-list-name { flex: 0 1 auto; min-width: 0; }
.zeile-bearbeiten { flex: none; margin-left: auto; padding: 2px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600; opacity: 0;
  transition: opacity 140ms ease, border-color 140ms ease; }
.zeile-bearbeiten:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.site-list tr:hover .zeile-bearbeiten, .site-list tr:focus-within .zeile-bearbeiten, .zeile-bearbeiten:focus,
.site-list tr.zeile-offen .zeile-bearbeiten { opacity: 1; }
@media (hover: none) { .zeile-bearbeiten { opacity: 1; } }
.dt.site-list tr.zeile-edit td { height: auto; padding: 0; white-space: normal; border-bottom: 1px solid var(--row-line); }
.zeile-edit .grow { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 280ms cubic-bezier(.22, 1, .36, 1); }
@starting-style { .zeile-edit .grow { grid-template-rows: 0fr; } }
.zeile-edit.zu .grow { grid-template-rows: 0fr; transition-timing-function: cubic-bezier(.4, 0, 1, 1); }
.zeile-edit .grow > div { min-height: 0; overflow: hidden; }
/* Blättert die Tabelle quer (Handy), bleibt das Formular in der sichtbaren Breite der Liste (Container .site-list-wrap). */
.zeile-form { position: sticky; left: 0; max-width: 100cqi; box-sizing: border-box; }
.zeile-form { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 1.3fr) minmax(12rem, 1.3fr); align-items: start;
  gap: 12px 16px; padding: 14px 12px 16px 15px; background: var(--surface-2);
  transition: opacity 280ms cubic-bezier(.22, 1, .36, 1), transform 280ms cubic-bezier(.22, 1, .36, 1); }
@starting-style { .zeile-form { opacity: 0; transform: translateY(-6px); } }
.zeile-edit.zu .zeile-form { opacity: 0; transform: translateY(-6px); }
.zeile-form label { min-width: 0; margin: 0; }
.zeile-form textarea { min-height: 2.6rem; }
.zeile-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
@container (max-width: 760px) { .zeile-form { grid-template-columns: minmax(0, 1fr); } }
.site-list tr.gespeichert td { animation: zeile-gespeichert 1.8s ease-out; }
@keyframes zeile-gespeichert { 0%, 35% { background: var(--ok-soft); } 100% { background: transparent; } }
/* Seitenwechsel (Auftrag 67): Der Browser blendet die neue Seite weich über die alte (View Transitions, gleiche Herkunft, ohne
   Skript). Ruhig und kurz; Browser ohne Unterstützung laden wie bisher. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .feld, #feld-slot .feld, #feld-slot.htmx-swapping .feld, #feld-slot .feld-body > *, .ansicht, .site-tile { transition: none; }
  .zeile-edit .grow, .zeile-form, .zeile-bearbeiten { transition: none; }
  .site-list tr.gespeichert td { animation: none; }
}

@media (max-width: 700px) {
  .ansicht { --feld-top: 72px; }
  body:has(.envbanner) .ansicht { --feld-top: 99px; }
  .view-switch { margin-left: 0; }
  .feld-head { padding: 14px 16px 4px; }
  .feld-body { padding: 0 16px 16px; }
  .feld-close { min-height: 40px; }
}
@media print { .feld, .view-bar, .filterspalte { display: none; } }

/* Rollen-Reiter (62p) */
.rollen-filter { margin: 0 0 1rem; color: var(--text-2); }
/* Bereich und Beispiele sind Fließtext, keine Spaltenköpfe: ohne Versalien und Sperrung aus .table th, mit Umbruch. */
.rollen-matrix th[scope="row"] { min-width: 10.5rem; font-weight: 400; }
.rollen-matrix thead th { white-space: normal; padding-left: 8px; padding-right: 8px; }
.rollen-matrix td { padding-left: 8px; padding-right: 8px; }
.rollen-matrix th[scope="row"], .rollen-beispiele li {
  text-transform: none; letter-spacing: normal; white-space: normal; font-size: inherit; color: var(--text);
}
.rollen-matrix thead th { vertical-align: bottom; }
.rollen-profil, .rollen-bereich { display: block; font-weight: 650; color: var(--text); }
.rollen-anzahl, .rollen-hinweis { display: block; font-weight: 400; }
.rollen-beispiele { margin: 0.35rem 0 0; padding-left: 1.1rem; color: var(--text-2); }
.rollen-beispiele li { color: var(--text-2); }
/* Wert darf in zwei Zeilen stehen („nicht / erlaubt“), damit alle fünf Rollen neben dem Bereich Platz haben. */
.rollen-ja { color: var(--ok); font-weight: 600; }
.rollen-nein { color: var(--text-2); }
/* Handy: je Bereich ein Block (Bereich, Hinweis, Beispiele), darunter die Rollen als zwei Spalten mit Namen (data-label) und Wert.
   Die Rollen im Kopf als Zeile mit Umbruch (Zahl der Personen bleibt verlinkt). Rollen im Template halten die Tabellen-Semantik. */
@media (max-width: 700px) {
  .rollen-matrix, .rollen-matrix thead, .rollen-matrix tbody, .rollen-matrix tr, .rollen-matrix th, .rollen-matrix td { display: block; }
  .table.rollen-matrix { min-width: 0; }
  .table.rollen-matrix th:first-child, .table.rollen-matrix td:first-child { position: static; box-shadow: none; }
  .rollen-matrix thead tr { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
  .rollen-matrix thead th { padding: 0; border: 0; background: none; }
  .rollen-matrix thead th:first-child { display: none; }
  .rollen-matrix tbody tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .rollen-matrix tbody tr:last-child { border-bottom: 0; }
  .rollen-matrix th[scope="row"] { grid-column: 1 / -1; min-width: 0; padding: 0 0 6px; border: 0; background: none; }
  .rollen-matrix td { padding: 4px 0; border: 0; }
  .rollen-matrix td::before { content: attr(data-label); display: block; font-size: 0.85em; color: var(--text-2); }
}

/* Zonen-Matrix (62k) – Firewall-Regeln je Zonenpaar (firewallregeln/_matrix.html); Zustand immer als Wort, Farbe nur zusätzlich */
.zm-table { width: auto; border-collapse: separate; border-spacing: 3px; }
.zm-table th, .zm-table td { border: 0; }
/* Zonennamen sind Daten (fremde Eingabe): nie Versalien (verfälscht Namen, ß → SS), lange Namen brechen um statt abgeschnitten. */
.zm-table .zm-head {
  max-width: 9rem; white-space: normal; overflow-wrap: break-word; text-transform: none; letter-spacing: normal;
  font-size: inherit; font-weight: 600; color: var(--text);
}
.zm-table thead .zm-head { text-align: center; vertical-align: bottom; }
.zm-table tbody .zm-head { text-align: right; padding-right: 0.5rem; }
.zm-corner { text-align: left; white-space: nowrap; }
.zm-corner .small { text-transform: none; letter-spacing: normal; font-size: 12px; }
.zm-table td.zm-cell { min-width: 6.5rem; text-align: center; border-radius: 6px; padding: 0; background: var(--neutral-soft); color: var(--neutral-ink); }
.zm-cell > a, .zm-cell > .zm-state { display: block; padding: 0.35rem 0.5rem; color: inherit; text-decoration: none; }
.zm-cell > a:hover, .zm-cell > a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }
.zm-cell .zm-state { font-weight: 600; }
.zm-cell .zm-count { display: block; font-size: 0.8em; color: var(--text-2); }
.zm-erlaubt, .zm-table td.zm-erlaubt { background: var(--ok-soft); color: var(--ok); }
.zm-blockiert, .zm-table td.zm-blockiert { background: var(--danger-soft); color: var(--danger); }
.zm-teilweise, .zm-table td.zm-teilweise { background: var(--warn-soft); color: var(--warn); }
.zm-keine, .zm-table td.zm-keine { background: transparent; color: var(--text-2); border: 1px dashed var(--border); }
/* „keine Regel“ ist der Normalfall ohne Aussage: leiser als die echten Zustände, damit erlaubt/teilweise/blockiert führen. */
.zm-cell.zm-keine .zm-state { font-weight: 400; font-size: 0.92em; }
.zm-legend { display: grid; gap: 0.35rem; margin: 0.75rem 0; }
.zm-legend > div { display: flex; gap: 0.6rem; align-items: baseline; }
.zm-legend dt { flex: 0 0 7.5rem; }
.zm-legend dd { margin: 0; color: var(--text-2); }
.zm-key { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 6px; font-weight: 600; }
.zm-pair { margin: 0 0 0.5rem; }
@media (max-width: 700px) {
  .zm .section-head { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .zm-table th.zm-corner { white-space: normal; max-width: 4.5rem; }
  .zm-table .zm-head { max-width: 6.5rem; }
  .zm-table tbody .zm-head { padding-left: 0.4rem; }
  .zm-table td.zm-cell { min-width: 4.5rem; }
  .zm-cell > a, .zm-cell > .zm-state { padding: 0.35rem 0.3rem; }
  .zm-legend dt { flex-basis: 6.5rem; }
}

/* Ereignisprotokoll (62l): Protokoll (/audit) und Befunde auf „Zustand“ nach dem Muster „System Log“. Tabelle .ev-table im Raster
   .ansicht.filter-seite, Spalten Zeit, Ereignis (Kategorie klein darunter), Beschreibung, Schwere. Schwere als <meter> 1 bis 4 mit
   Text daneben (nie nur Farbe), Farbe je Stufe über ev-sev-<stufe>, nur vorhandene Variablen. Benutzer und IP stehen klein unter der
   Beschreibung. Schlüssel (login.failed) brechen nur hinter „.“ und „_“ (<wbr> im Template). Unter 700 px wird jede Zeile ein Block:
   Zeit und Schwere oben, Beschreibung, darunter Ereignis und Kategorie klein; die Sortierlinks bleiben als Zeile darüber. */
.ev-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-bottom: 12px; }
.ev-bar .view-switch { margin-left: 0; }
.ev-count, .ev-legacy { margin: 0; }
.ev-legacy { margin-bottom: 12px; }
.card .filter-seite { margin-bottom: 8px; }
.ev-table { font-size: 13px; }
.ev-table td { vertical-align: top; padding-left: 0.75rem; padding-right: 0.75rem; }
.ev-table .ev-time { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text-2); }
.ev-table .ev-ev { min-width: 6.25rem; max-width: 13rem; }
.ev-table .ev-event { display: block; font-size: 0.85em; white-space: normal; overflow-wrap: break-word; }
.ev-table .ev-cat { display: block; margin-top: 2px; font-size: 11px; color: var(--text-2); }
.ev-table .ev-text { min-width: 9.5rem; overflow-wrap: anywhere; }
.ev-who { display: block; margin-top: 2px; }
/* IPv6 als Ganzes in die nächste Zeile; nur wenn sie dort nicht passt, bricht sie hinter „:“ (<wbr>). */
.ev-table .ev-who .ev-ip { display: inline-block; font-size: 0.95em; overflow-wrap: normal; }
.ev-sev-cell { white-space: nowrap; }
.ev-h-sep { color: var(--text-2); padding: 0 2px; }
/* Kopf „Ereignis“ wie die Zelle: Sortierlink Ereignis, darunter klein der Sortierlink Kategorie. */
.ev-table th.ev-h-event > a.sort, .ev-table th.ev-h-event > .th-plain { display: flex; width: max-content; min-height: 24px; }
.ev-table th.ev-h-event .ev-h-sep { display: none; }
/* Beide Sortierlinks stehen in einer Kopfzelle mit aria-sort: hervorgehoben nur der, nach dem sortiert ist. */
.ev-table th.ev-h-event[aria-sort] a.sort:not(.sort-on) { background: transparent; color: var(--text-2); }
.ev-table th.ev-h-event[aria-sort] a.sort:not(.sort-on) .sort-arrow { color: var(--text-2); }
.ev-sev { display: inline-flex; align-items: center; gap: 8px; }
.ev-meter { width: 2.75rem; height: 0.4rem; border: 0; border-radius: 3px; background: var(--border); }
.ev-meter::-webkit-meter-bar { background: var(--border); border: 0; border-radius: 3px; height: 0.4rem; }
.ev-meter::-webkit-meter-optimum-value { background: var(--text-2); border-radius: 3px; }
.ev-meter::-moz-meter-bar { background: var(--text-2); border-radius: 3px; }
.ev-sev-hinweis .ev-meter::-webkit-meter-optimum-value { background: var(--later-line); }
.ev-sev-hinweis .ev-meter::-moz-meter-bar { background: var(--later-line); }
.ev-sev-warnung .ev-meter::-webkit-meter-optimum-value { background: var(--warn); }
.ev-sev-warnung .ev-meter::-moz-meter-bar { background: var(--warn); }
.ev-sev-alarm .ev-meter::-webkit-meter-optimum-value { background: var(--danger); }
.ev-sev-alarm .ev-meter::-moz-meter-bar { background: var(--danger); }
.ev-sev-alarm .ev-sev-text { color: var(--danger); font-weight: 600; }
.ev-sev-warnung .ev-sev-text { color: var(--warn); font-weight: 600; }
/* Filterspalte (an.filterspalte mit kurz/schluessel): Schlüssel nur an „.“/„_“ umbrechen, Rest der Gruppe hinter „weitere zeigen“. */
.filter-keys .filter-label { overflow-wrap: break-word; }
.filter-more > summary { padding: 4px 6px; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--accent); }
@media (max-width: 700px) {
  .ev-table, .ev-table tbody { display: block; }
  .ev-table thead { display: block; border-bottom: 1px solid var(--border); }
  .ev-table thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; padding: 0 4px; }
  .ev-table thead th { display: block; border: 0; padding: 0.25rem 0.25rem; }
  .ev-table thead .ev-h-text { display: none; }
  .ev-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "time sev" "text text" "ev ev"; gap: 4px 12px; padding: 10px 12px; border-bottom: 1px solid var(--row-line); }
  .ev-table tbody tr:last-child { border-bottom: 0; }
  .ev-table.ev-ohne-zeit tbody tr { grid-template-areas: "sev sev" "text text" "ev ev"; }
  .ev-table tbody td { display: block; min-width: 0; max-width: none; padding: 0; border: 0; }
  .ev-table .ev-time { grid-area: time; font-size: 12px; }
  .ev-table .ev-sev-cell { grid-area: sev; }
  .ev-table .ev-text { grid-area: text; min-width: 0; font-size: 14px; }
  .ev-table .ev-ev { grid-area: ev; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: var(--text-2); }
  .ev-table .ev-event { font-size: 11px; }
  .ev-table .ev-cat { margin-top: 0; }
  .ev-table tbody tr.ev-leer { display: block; }
}

/* Alarmregeln (62m): Weg und Empfänger einmal über der Tabelle; Schlüssel klein unter dem Auslöser; Zustand und Knopf nebeneinander
   in der letzten Spalte. Unter 700 px wird jede Zeile ein Block: Auslöser links, Zustand und Knopf rechts oben, Kategorie und
   „zuletzt ausgelöst“ klein darunter. */
.alarmregeln-weg { margin: 0 0 8px; }
.alarmregeln-liste .ar-key { display: block; margin-top: 2px; font-size: 0.75rem; overflow-wrap: break-word; }
.alarmregeln-liste .ar-schalter { white-space: nowrap; }
/* Schmaler Inhalt (1200 px mit Spalte rechts): Kopf und Datum dürfen umbrechen, damit der Knopf im Bild bleibt. */
.alarmregeln-liste th { white-space: normal; }
.alarmregeln-liste td { padding-left: 0.75rem; padding-right: 0.75rem; }
.alarmregeln-liste .ar-last { min-width: 5.5rem; }
.ar-schalter-in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; } /* sehr schmal: Knopf unter dem Zustand */
.alarmregel-aus td:first-child .strong { color: var(--text-2); font-weight: 500; }
/* Sicherheitsalarm (fest an, ohne Knopf): ausgegraut, Hinweis statt Knopf, darf umbrechen. */
.alarmregel-fest td:first-child .strong { color: var(--text-2); }
.alarmregeln-liste .ar-fest { white-space: normal; max-width: 8.5rem; line-height: 1.3; }
@media (max-width: 700px) {
  .alarmregeln-liste,.alarmregeln-liste tbody { display: block; }
  .alarmregeln-liste thead { display: none; }
  .alarmregeln-liste tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "trigger schalter" "meta meta"; gap: 4px 12px; padding: 10px 12px; border-bottom: 1px solid var(--row-line); }
  .alarmregeln-liste tbody tr:last-child { border-bottom: 0; }
  .alarmregeln-liste tbody td { display: block; min-width: 0; padding: 0; border: 0; }
  .alarmregeln-liste .ar-trigger { grid-area: trigger; }
  .alarmregeln-liste .ar-schalter { grid-area: schalter; }
  .alarmregeln-liste .ar-cat, .alarmregeln-liste .ar-last { grid-row: 2; font-size: 12px; color: var(--text-2); }
  .alarmregeln-liste .ar-cat { grid-column: 1; }
  .alarmregeln-liste .ar-last { grid-column: 2; text-align: right; }
  .alarmregeln-liste tbody tr.ar-leer { display: block; }
}

/* Ports und Einstellungen (62n/62o, Sichtprüfung) */
.port-table .pe-device { min-width: 7rem; }
.port-table .pe-device-name { overflow-wrap: break-word; }
.pe-grouped tr.pe-group-start td { border-top: 2px solid var(--border); }
.pe-target { min-width: 6.5rem; }
.pe-name { min-width: 6.5rem; overflow-wrap: break-word; }
.pe-facts th[scope="row"] { white-space: nowrap; }
@media (min-width: 701px) { .pe-target { white-space: nowrap; } .pe-wbr { display: none; } }
@media (max-width: 700px) {
  .port-table td { padding: 10px 12px; }
  .pe-foot { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.35rem; padding-top: 6px; padding-bottom: 6px; }
  .pe-foot a { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; }
}

/* Hinweis „Strg + Mausrad zoomt“ über Karten und Graphen (netmap.js, attackgraph.js; Sebastian 17.11.2026): erscheint kurz, wenn das
   Mausrad über der Fläche die Seite scrollt; mittig im umgebenden Abschnitt (attackgraph.js setzt sie genauer über das CSSOM,
   netmap.js setzt keine Styles). */
.wheel-host { position: relative; }
.wheel-hint { position: absolute; z-index: 5; top: 50%; left: 50%; transform: translate(-50%, -50%); padding: 8px 14px; border-radius: 8px;
  background: var(--text); color: var(--surface); font-size: 13px; font-weight: 600; pointer-events: none; opacity: 0;
  transition: opacity .2s ease; }
.wheel-hint.is-on { opacity: 0.9; }
@media (prefers-reduced-motion: reduce) { .wheel-hint { transition: none; } }

/* Einheitlicher Seitenaufbau (Sebastian 17.11.2026, „Kacheln und Tabellen kreuz und quer“):
   1. Kennzahlen von AttackPath (.ap-kpis, .ag-kpis) wie überall als eine Leiste mit Trennstrichen (.kpis), nicht als lose Karten.
   2. Blöcke im Inhalt haben immer denselben Abstand nach unten, auch Raster ohne eigenen Rand (z. B. .site-cards über einer Tabelle).
      :where macht die Regel ganz schwach (Gewicht 0), eigene Abstände einzelner Bausteine gehen vor. */
.ap-kpis, .ag-kpis { display: flex; gap: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 10px;
  padding: 18px 0; margin: 0 0 20px; overflow: hidden; }
.ap-kpis > .card, .ag-kpis > .ag-kpi { flex: 1; min-width: 0; margin: 0; background: none; border: 0; border-right: 1px solid var(--border);
  border-radius: 0; padding: 0 22px; box-shadow: none; }
.ap-kpis > .card:last-child, .ag-kpis > .ag-kpi:last-child { border-right: 0; }
@media (max-width: 760px) {
  .ap-kpis, .ag-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .ap-kpis > .card, .ag-kpis > .ag-kpi { padding: 14px 16px; border-bottom: 1px solid var(--border); }
}
:where(.rail ~ .page .container > :is(div, section, article, nav, form, ul, ol, details):not(:last-child):not([hidden])) { margin-bottom: 20px; }
/* In der Grundspalte rechts (Berichte, Sebastian 17.11.2026) stehen die Auswahlkacheln untereinander statt umgebrochen nebeneinander */
.aside .report-choice { grid-template-columns: minmax(0, 1fr); }
/* Identity: Start, Läufe und Ausnahmen einer Quelle als gleichmäßige Reihe unter der Bewertung (Sebastian 17.11.2026) */
.source-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 16px; align-items: start; margin-top: 20px; }
.source-tools > * { margin: 0; }
/* Graph: Reiter je Kronjuwel mit Beschriftung, damit sie sich vom Filter „Nur Pfade über diesen Knoten“ unterscheiden (Sebastian 17.11.2026) */
.ag-tabs-label { align-self: center; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); font-weight: 650; }
/* Berichte in der Grundspalte rechts: Auswahl kompakter, die Erklärung kleiner (Sebastian 17.11.2026) */
.aside .report-choice-option { padding: 0.6rem 0.7rem; }
.aside .report-choice-text span { font-size: 12px; }
.aside .report-check { display: grid; gap: 4px; }
.aside .report-check select { width: 100%; max-width: 100%; }
/* Hilfe in der Anwendung (help/app.html): lange Befehle brechen um statt die Seite in Handybreite seitlich zu schieben */
.help-app code { overflow-wrap: anywhere; word-break: break-word; }
/* Berichte (Auftrag 77e): Berichtsarten als Kacheln im Inhalt, Vorschau als Hauptknopf, Beispiel-PDF daneben. */
.report-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 1rem; margin: 0 0 0.5rem; }
.report-tile { display: flex; flex-direction: column; gap: 0.6rem; margin: 0; }
.report-tile h3 { margin: 0; font-size: 1.05rem; color: var(--text); text-transform: none; letter-spacing: 0; }
.report-tile p { margin: 0; flex: 1; }
.report-tile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
