/* CERT-Portal – Gestaltung „Ruhig“ (Entwurf B, Nutzerentscheid 04.10.2026): helles Grau, weiße Flächen, feine
   Linien, Akzent Petrol nur für Aktionen; Dunkelmodus über prefers-color-scheme. Keine Inline-Styles (CSP),
   Schrift selbst ausgeliefert (Public Sans, OFL 1.1). Kontraste nach WCAG 2.2 AA, Fokus immer sichtbar. */

@font-face {
  font-family: "Public Sans"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/public-sans-5.3.0-latin-ext.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Public Sans"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/public-sans-5.3.0-latin.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f6f7f9; --surface: #ffffff; --ink: #15191e; --muted: #5f6774; --line: #e6e8ec; --soft: #f0f1f4;
  --field: #8b929d; --accent: #0e6b6b; --accent-hover: #0a5656; --accent-soft: #e5f1f0; --on-accent: #ffffff;
  --err: #b42318; --err-soft: #fdf0ef; --ok: #126b3f; --ok-soft: #ecf7f0; --warn: #7a4a00; --warn-soft: #fdf4e3; --info: #1f4fa8; --info-soft: #eaf0fb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .04);
  --radius: 10px; --radius-s: 8px;
  color-scheme: light dark;
}
/* Dunkel: nach Systemeinstellung, außer der Nutzer hat „Hell“ gewählt; oder ausdrücklich „Dunkel“ (theme.rs) */
@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    --bg: #0f1214; --surface: #171b1f; --ink: #e6e9ec; --muted: #9ea7b1; --line: #262c32; --soft: #1f252a;
    --field: #6b747e; --accent: #5cc8c0; --accent-hover: #7fd8d1; --accent-soft: #123432; --on-accent: #062b29;
    --err: #ff9c90; --err-soft: #3a1a17; --ok: #7fd6a3; --ok-soft: #12301f; --warn: #f2c27a; --warn-soft: #33260f; --info: #9dbcf5; --info-soft: #172741;
    --shadow: none;
  }
}
:root.theme-dark {
    --bg: #0f1214; --surface: #171b1f; --ink: #e6e9ec; --muted: #9ea7b1; --line: #262c32; --soft: #1f252a;
    --field: #6b747e; --accent: #5cc8c0; --accent-hover: #7fd8d1; --accent-soft: #123432; --on-accent: #062b29;
    --err: #ff9c90; --err-soft: #3a1a17; --ok: #7fd6a3; --ok-soft: #12301f; --warn: #f2c27a; --warn-soft: #33260f; --info: #9dbcf5; --info-soft: #172741;
    --shadow: none;
}
:root.theme-light { color-scheme: light; }
:root.theme-dark { color-scheme: dark; }

* { box-sizing: border-box; }
/* Das hidden-Attribut gilt immer (Knöpfe, die erst das Skript freischaltet) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
/* Links im Fließtext zusätzlich unterstrichen (WCAG 1.4.1: nicht nur über die Farbe erkennbar) */
main p a, main li a, main td a, main .hint a { text-decoration: underline; text-underline-offset: .15em; }
main a.tile, main a.tile *, main .start-facts a { text-decoration: none; }
main .start-facts a { text-decoration: underline; text-underline-offset: .15em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 .6rem; }
h2 { font-size: 1rem; font-weight: 700; margin: 2rem 0 .75rem; }
h3 { font-size: .95rem; font-weight: 600; margin: 1rem 0 .25rem; }
p { margin: 0 0 .9rem; }
.lead { font-size: 1.06rem; color: var(--muted); }
.hint { color: var(--muted); font-size: .875rem; }
.req { color: var(--err); }
.field-err { color: var(--err); font-size: .875rem; margin: -.35rem 0 .9rem; }
[aria-invalid=true] { border-color: var(--err) !important; box-shadow: 0 0 0 1px var(--err); }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
.break { overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.pre, .msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Marke und Kopf ---------- */
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: inline-flex;
  align-items: center; justify-content: center; flex: none; }
.mark svg { stroke: var(--on-accent); }

header.site .inner { max-width: 70rem; margin: 0 auto; padding: 1.5rem 1.5rem; display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
header.site nav { display: flex; gap: 1.5rem; font-size: .9rem; flex-wrap: wrap; }
header.site nav a { color: var(--muted); display: inline-block; padding: .2rem 0; }
/* Sprunglink (WCAG 2.4.1): erst bei Tastaturfokus sichtbar */
.skip { position: absolute; left: 1rem; top: -3rem; z-index: 10; background: var(--surface); color: var(--accent); padding: .5rem .9rem;
  border-radius: var(--radius-s); box-shadow: var(--shadow); }
.skip:focus { top: 1rem; }
header.site nav a:hover { color: var(--ink); }
body.public main { max-width: 70rem; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; }
body.public main.narrow { max-width: 44rem; }
footer.site { max-width: 70rem; margin: 0 auto; padding: 1.5rem; display: flex; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
footer.site p { margin: 0; }
footer.site a { color: var(--muted); }

/* ---------- Startseite: Einleitung links, Formular rechts ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); gap: 4rem; align-items: start; padding-top: 1.5rem; }
.hero h1 { font-size: 2.4rem; line-height: 1.12; letter-spacing: -0.025em; margin-bottom: 1rem; }
.facts { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; font-size: .93rem; color: var(--muted); }
.facts li { display: flex; gap: .75rem; }
.facts b { display: block; color: var(--ink); font-weight: 600; }
.facts .ic { flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--accent-soft); display: inline-flex;
  align-items: center; justify-content: center; }
.facts .ic svg { stroke: var(--accent); }
@media (max-width: 56rem) { .hero { grid-template-columns: minmax(0, 1fr); gap: 2rem; } .hero h1 { font-size: 2rem; } }

/* ---------- Flächen ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 1.5rem 1.75rem; }
.card + .card { margin-top: 1.5rem; }
.card > h2:first-child { margin-top: 0; }
form.card { padding: 2rem 2.25rem; }
.block { padding-bottom: 1.6rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.block:last-of-type { border-bottom: 0; margin-bottom: .5rem; padding-bottom: 0; }
.block > h2 { margin: 0 0 1rem; font-size: .95rem; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
@media (max-width: 40rem) { .two { grid-template-columns: minmax(0, 1fr); } form.card { padding: 1.5rem 1.25rem; } }

/* ---------- Formulare ---------- */
label { display: block; font-size: .875rem; font-weight: 500; margin: 1rem 0 .35rem; }
.two label { margin-top: 0; }
.block > h2 + label, .block > h2 + .two { margin-top: 0; }
.two + label { margin-top: 1.1rem; }
label.choice { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .93rem; margin: .6rem 0; }
input, select, textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--field); border-radius: var(--radius-s); padding: .6rem .75rem; min-height: 2.75rem;
}
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 0;
  border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: 1.1rem; height: 1.1rem; min-height: 0; margin: .2rem 0 0; flex: none; accent-color: var(--accent); }
input[type=file] { padding: .5rem; background: var(--soft); border-style: dashed; }
input[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--err); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: .875rem; font-weight: 500; padding: 0; margin-bottom: .5rem; }

/* Auswahl als Segmente (Art der Meldung); das Optionsfeld bleibt fokussierbar */
/* Meldeart: zwei klar unterscheidbare Karten (Nutzerbefund 11.10.2026), Auswahl mit Rahmen, Hintergrund und Häkchen */
.kinds { border: 0; padding: 0; margin: 0; }
.kinds legend { font-weight: 700; font-size: 1.05rem; margin-bottom: .25rem; }
.kind-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: .75rem; margin-top: .6rem; }
.kind-card { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 1rem; border: 2px solid var(--line); border-radius: var(--radius);
  background: var(--surface); cursor: pointer; font-weight: 400; margin: 0; }
.kind-card:hover { border-color: var(--field); }
.kind-card input { width: 1.15rem; height: 1.15rem; margin: .2rem 0 0; flex: none; accent-color: var(--accent); }
.kind-card .kind-ic { flex: none; width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.kind-card .kind-ic svg { stroke: currentColor; }
.kind-vuln .kind-ic { background: var(--accent-soft); color: var(--accent); }
.kind-incident .kind-ic { background: var(--err-soft); color: var(--err); }
.kind-card .kind-text { display: flex; flex-direction: column; gap: .2rem; font-size: .92rem; color: var(--muted); }
.kind-card .kind-text strong { color: var(--ink); font-size: 1rem; line-height: 1.35; }
.kind-vuln:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.kind-incident:has(input:checked) { border-color: var(--err); background: var(--err-soft); }
.kind-card:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.kinds[data-invalid] .kind-card { border-color: var(--err); }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 4px; padding: 4px; background: var(--soft); border-radius: var(--radius); }
.seg label.choice { margin: 0; padding: .55rem .8rem; border-radius: 7px; color: var(--muted); font-size: .88rem; line-height: 1.35; cursor: pointer;
  justify-content: center; align-items: center; text-align: center; }
.seg label.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label.choice:has(input:checked) { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
.seg label.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 1px; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.75rem;
  font: inherit; font-size: .95rem; font-weight: 600; padding: .55rem 1.25rem; margin-top: 1.25rem;
  border: 1px solid transparent; border-radius: var(--radius-s); background: var(--accent); color: var(--on-accent); cursor: pointer;
}
button:hover, .btn:hover { background: var(--accent-hover); color: var(--on-accent); text-decoration: none; }
button.secondary, .btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--field); }
button.secondary:hover, .btn.secondary:hover { background: var(--soft); color: var(--ink); }
button.danger { background: var(--surface); color: var(--err); border-color: var(--err); }
button.danger:hover { background: var(--err-soft); color: var(--err); }
button.link { background: none; border: 0; color: var(--muted); padding: 0; margin: 0; min-height: 0; font-weight: 500; font-size: inherit; }
button.link:hover { color: var(--ink); text-decoration: underline; background: none; }
button.block-btn { width: 100%; }
form.inline { display: inline; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.inline-buttons { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- Hinweise ---------- */
.notice { background: var(--soft); border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1.25rem 0; font-size: .93rem; }
.notice p:last-child { margin-bottom: 0; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.err { background: var(--err-soft); color: var(--err); }
.notice.warn a { color: inherit; text-decoration: underline; }
.flash { border-radius: var(--radius); padding: .8rem 1.1rem; margin: 0 0 1.25rem; font-size: .93rem; }
.flash.err { background: var(--err-soft); color: var(--err); }
.flash.ok { background: var(--ok-soft); color: var(--ok); }

/* ---------- Tabellen ---------- */
.scroll { overflow-x: auto; }
table.grid { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.grid th { text-align: left; font-weight: 600; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: .7rem 1rem; }
table.grid td { text-align: left; vertical-align: top; padding: .85rem 1rem; border-top: 1px solid var(--line); }
table.grid tbody tr:hover td { background: var(--soft); }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .bar { padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
table.kv { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.kv th { text-align: left; font-weight: 500; color: var(--muted); padding: .4rem 1rem .4rem 0; vertical-align: top; width: 9.5rem; }
table.kv td { padding: .4rem 0; }
.dl-overdue, tr.dl-overdue td { color: var(--err); font-weight: 600; }
tr.dl-done td, tr.dl-waived td { color: var(--muted); }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
tr.muted td { color: var(--muted); }

/* ---------- Bearbeitung: Seitenleiste und Inhalt ---------- */
body.staff { display: flex; min-height: 100vh; }
.side { width: 15rem; flex: none; background: var(--surface); border-right: 1px solid var(--line); padding: 1.5rem 1rem;
  display: flex; flex-direction: column; gap: .2rem; }
.side .brand { padding: 0 .5rem 1.5rem; }
.side nav { display: flex; flex-direction: column; gap: .2rem; }
.side nav a { padding: .5rem .7rem; border-radius: var(--radius-s); color: var(--muted); font-size: .9rem; font-weight: 500; }
.side nav a:hover { background: var(--soft); color: var(--ink); text-decoration: none; }
.side nav a[aria-current=page] { background: var(--accent-soft); color: var(--accent); }
.side .spacer { flex: 1; }
.side .me { border-top: 1px solid var(--line); padding: .9rem .5rem 0; font-size: .85rem; color: var(--muted); }
.side .me a { color: var(--ink); font-weight: 600; }
.side .me form { display: block; margin-top: .3rem; }
body.staff main { flex: 1; min-width: 0; padding: 2rem 2.5rem 4rem; max-width: 84rem; }
.crumbs { font-size: .875rem; margin: 0 0 .5rem; }
.crumbs a { color: var(--muted); }
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.pagehead h1 { margin: 0; }
.pagehead .hint { margin: .25rem 0 0; }
.filters { display: flex; gap: .75rem 1rem; flex-wrap: wrap; align-items: flex-end; margin: 0 0 1.25rem; }
.filters label { margin: 0; font-size: .8rem; color: var(--muted); }
.filters select { width: auto; min-width: 9rem; min-height: 2.4rem; padding: .35rem .6rem; margin-top: .25rem; }
.filters button { margin: 0; min-height: 2.4rem; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.5rem; align-items: start; }
.cols aside .card { padding: 1.25rem 1.4rem; }
@media (max-width: 72rem) { .cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 56rem) {
  body.staff { display: block; }
  .side { width: auto; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; padding: .75rem 1rem; }
  .side .brand { padding: 0 1rem 0 0; }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  .side .spacer { display: none; }
  .side .me { border-top: 0; padding: 0 0 0 .5rem; }
  body.staff main { padding: 1.5rem 1rem 3rem; }
}

/* Aufklappbare Aktionen */
details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: .7rem 1rem; margin: .6rem 0; }
details summary { cursor: pointer; font-weight: 600; font-size: .92rem; list-style-position: inside; }
details[open] summary { margin-bottom: .5rem; }
details form button { margin-top: 1rem; }
details.danger summary { color: var(--err); }
td details { margin: 0; padding: .35rem .7rem; }
td.actions form.inline { margin-right: .5rem; }
td.actions button { margin-top: 0; min-height: 2.2rem; padding: .3rem .9rem; font-size: .85rem; }

/* Inhalt von außen */
.untrusted { background: var(--soft); border-radius: var(--radius); padding: .25rem 1.1rem 1rem; }
.untrusted-label { display: inline-flex; align-items: center; gap: .4rem; font-size: .78rem; font-weight: 600; color: var(--warn);
  background: var(--warn-soft); border-radius: 6px; padding: .25rem .6rem; margin: .9rem 0 .25rem; }
.untrusted h3 { font-size: .85rem; color: var(--muted); font-weight: 600; margin: 1rem 0 .2rem; }

/* Nachrichten, Notizen, Verlauf */
.msg, .note { background: var(--soft); border-radius: var(--radius); padding: .75rem 1rem; margin: .6rem 0; }
.msg-to_reporter { background: var(--accent-soft); }
.msg-meta { color: var(--muted); font-size: .8rem; margin-bottom: .2rem; }
.msg button { margin-top: .6rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .6rem 0; border-top: 1px solid var(--line); }
ul.plain li:first-child { border-top: 0; }
ol.history { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
ol.history li { padding: .5rem 0 .5rem 1rem; border-left: 2px solid var(--line); margin-left: .3rem; }

/* Anmeldung und kleine Einzelseiten */
body.auth main { min-height: calc(100vh - 9rem); display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 27rem; }
.auth-card h1 { font-size: 1.5rem; }
.auth-card .sep { height: 1px; background: var(--line); margin: 1.75rem 0 1rem; }

/* Beschriftungen, die das Feld umschließen (Bearbeitung) */
label > input:not([type=checkbox]):not([type=radio]), label > select, label > textarea { display: block; margin-top: .35rem; font-weight: 400; }
.form-card { max-width: 48rem; }
.form-card > h2:first-child, .form-card > form > h2:first-of-type { margin-top: 0; }
.auth-card .brand { margin-bottom: 1.75rem; }

/* Aufklapper in Tabellenzeilen: schmal, ohne Rahmen */
details.inline-details { border: 0; background: none; padding: 0; margin: .3rem 0 0; }
details.inline-details summary { font-size: .85rem; font-weight: 500; color: var(--accent); white-space: nowrap; }
details.inline-details[open] { min-width: 15rem; }
aside table.kv th { width: 7rem; }
.filters button { padding: .35rem 1rem; }
table.grid td.actions { width: 1%; white-space: nowrap; }

/* Umschalter Erscheinungsbild */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--soft); border-radius: 999px; margin: 0; }
.theme-switch button { width: 30px; height: 30px; min-height: 0; padding: 0; margin: 0; border-radius: 999px; background: none;
  color: var(--muted); border: 0; }
.theme-switch button svg { stroke: currentColor; }
.theme-switch button:hover { background: var(--surface); color: var(--ink); }
.theme-switch button[aria-pressed=true] { background: var(--surface); color: var(--accent); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }
header.site nav { align-items: center; }
.corner { position: absolute; top: 1.25rem; right: 1.5rem; z-index: 1; }
@media (max-width: 56rem) { .corner { position: static; display: flex; justify-content: flex-end; padding: .5rem 1rem 0; } }

/* Meldepflicht-Assistent */
.duties .duty { border-top: 1px solid var(--line); padding: .9rem 0; }
.duties .duty:first-of-type { border-top: 0; }
.duties .duty h3 { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: 0 0 .3rem; }
.duties .duty-overdue h3 { color: var(--err); }
.duties textarea.mono { font-size: .85rem; }

/* ---------- Berichte (C5.3, staff_stats.html): Kennzahlen-Kacheln, Druckansicht und Druck ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .75rem; margin: 0 0 1rem; }
.kpi { background: var(--soft); border-radius: var(--radius); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .15rem; }
.kpi-value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.kpi-label { font-size: .85rem; color: var(--muted); }
.stats .filters a { align-self: center; font-size: .9rem; }
.stats tr.total td { font-weight: 700; }
.stats ul.hint { margin: 1rem 0 0; padding-left: 1.2rem; }
body[data-nav=print] .corner { display: none; }
body[data-nav=print] main { max-width: 60rem; margin: 0 auto; }
@media print {
  :root, :root.theme-dark, :root:not(.theme-light) {
    --bg: #ffffff; --surface: #ffffff; --ink: #000000; --muted: #444444; --line: #cccccc; --soft: #f2f2f2;
    --accent: #000000; --err: #8a1c12; --shadow: none; color-scheme: light;
  }
  body, body.staff { display: block; background: #ffffff; color: #000000; font-size: 11pt; }
  .side, .corner, .no-print, form, button, .btn, .flash { display: none !important; }
  body.staff main { padding: 0; max-width: none; }
  .card { box-shadow: none; border: 1px solid #cccccc; padding: .8rem 1rem; break-inside: avoid; }
  .card + .card { margin-top: .8rem; }
  .scroll { overflow: visible; }
  table.grid th, table.grid td { padding: .3rem .5rem; }
  table.grid tbody tr:hover td { background: none; }
  a { color: #000000; text-decoration: none; }
  @page { margin: 15mm; }
}
/* ---------- Ende Berichte ---------- */

/* ---------- Vorfilter (Startseite) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.start-head { max-width: 46rem; padding: 2rem 0 2.25rem; }
.eyebrow { font-size: .85rem; font-weight: 600; color: var(--accent); margin: 0 0 .6rem; letter-spacing: .01em; }
.start-head h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 1rem; }
.start-head .lead { font-size: 1.1rem; margin: 0; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem; }
.tile { display: flex; flex-direction: column; gap: .75rem; height: 100%; box-sizing: border-box; padding: 1.75rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); color: var(--ink); }
.tile:hover { border-color: var(--accent); color: var(--ink); text-decoration: none; }
.tile:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.tile-main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.tile strong { font-size: 1.15rem; line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; }
.tile .d { color: var(--muted); font-size: .95rem; line-height: 1.5; flex: 1; margin-top: -.55rem; }
.tile .go { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--accent); font-size: .95rem; }
.tile:hover .go { color: var(--accent-hover); }
.tile .arr { transition: transform .15s; }
.tile:hover .arr { transform: translateX(3px); }
.tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.tile .badge { align-self: flex-start; text-align: right; font-size: .75rem; font-weight: 600; color: var(--accent-hover); background: var(--accent-soft);
  border-radius: 999px; padding: .15rem .6rem; }
.tile-ic { width: 60px; height: 60px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.tile-ic svg { stroke: currentColor; }
.tile-ic-sec { background: var(--accent); color: var(--on-accent); }
.tile-ic-bug { background: var(--warn-soft); color: var(--warn); }
.tile-ic-help { background: var(--info-soft); color: var(--info); }
.start-facts { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.25rem;
  margin: 2.5rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--line); }
.start-facts li { display: flex; gap: .75rem; font-size: .92rem; color: var(--muted); }
.start-facts b { display: block; color: var(--ink); font-weight: 600; }
.fi { flex: none; width: 32px; height: 32px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--accent); }
.fi svg { stroke: currentColor; }
.start .more { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; margin: 2rem 0 .5rem; font-size: .92rem; }
.start-note { color: var(--muted); font-size: .85rem; margin: 0; }
@media (prefers-reduced-motion: reduce) { .tile .arr { transition: none; } }
dialog.info { max-width: min(40rem, calc(100vw - 2rem)); max-height: calc(100vh - 4rem); overflow: auto; padding: 1.5rem 1.75rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog.info::backdrop { background: rgba(16, 24, 40, .45); }
dialog.info > h1 { font-size: 1.25rem; margin-top: 0; padding-right: 2rem; }
dialog.info .dialog-close { position: sticky; top: 0; float: right; margin: -.5rem -.75rem 0 0; }
dialog.info .dialog-close button { font-size: 1.5rem; line-height: 1; padding: .25rem .5rem; }
/* ---------- Ende Vorfilter ---------- */
