:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --link: #1d4ed8;
  --ok: #15803d;
  --ok-bg: #f0fdf4;
  --warn: #b45309;
  --warn-bg: #fffbeb;
  --bad: #b91c1c;
  --bad-bg: #fef2f2;
  --unknown: #64748b;
  --unknown-bg: #f1f5f9;
  --todo-bg: #fde68a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --surface: #111827;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --border: #1f2937;
    --link: #93c5fd;
    --ok: #4ade80;
    --ok-bg: #052e16;
    --warn: #fbbf24;
    --warn-bg: #451a03;
    --bad: #f87171;
    --bad-bg: #450a0a;
    --unknown: #94a3b8;
    --unknown-bg: #1e293b;
    --todo-bg: #854d0e;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); }
code { font-size: 0.9em; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.top { border-bottom: 1px solid var(--border); background: var(--surface); }
.top .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
nav { display: flex; gap: 16px; }
nav a { text-decoration: none; }
section { margin: 32px 0; }
h2 { font-size: 1.35rem; margin: 0 0 12px; }
h3 { font-size: 1.05rem; margin: 28px 0 8px; }
.muted { color: var(--muted); font-size: 0.9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.banner {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; border-radius: 12px; font-weight: 600; font-size: 1.15rem;
  border: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: currentColor; }
[data-level="operational"] { color: var(--ok); background: var(--ok-bg); }
[data-level="degraded"] { color: var(--warn); background: var(--warn-bg); }
[data-level="down"] { color: var(--bad); background: var(--bad-bg); }
[data-level="unknown"] { color: var(--unknown); background: var(--unknown-bg); }

.components { list-style: none; padding: 0; margin: 16px 0 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.components li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 14px 18px; border-top: 1px solid var(--border); }
.components li:first-child { border-top: 0; }
.components .name { font-weight: 600; }
.components .detail { color: var(--muted); font-size: 0.9rem; flex-basis: 100%; }
.pill { font-size: 0.85rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; }

.incident { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 14px 18px; margin-bottom: 12px; }
.incident h3 { margin: 0 0 4px; }
.incident ol { margin: 8px 0 0; padding-left: 18px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-top: 1px solid var(--border); }
thead th { border-top: 0; color: var(--muted); font-weight: 600; }
mark.todo { background: var(--todo-bg); color: inherit; padding: 0 4px; border-radius: 4px; }
footer { padding-bottom: 40px; }

/* Smalle schermen: tabel als gestapelde kaarten, zonder horizontaal scrollen. */
@media (max-width: 640px) {
  table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr { border-top: 1px solid var(--border); padding: 10px 14px; }
  tbody tr:first-child { border-top: 0; }
  td { border: 0; padding: 2px 0; }
  td::before { content: attr(data-label); display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
  td:first-child { font-weight: 700; }
  td:first-child::before { display: none; }
}
