/* Palette: the same values as the app (web/src/index.css, design/outcomes-lol/README.md). Green, amber and red carry
   status; purple is links and brand only, never a status colour. No web fonts: nothing is loaded from third parties. */
:root {
  --bg: #07080c;
  --surface: #12141b;
  --surface-2: #1b1f29;
  --border: #282e3e;
  --fg: #f5f2ec;
  --muted: #8b94a6;
  --accent: #bb57fc;
  --focus: #d9a8ff;
  --yes: #2bfab3;
  --danger: #ff5c5c;
  --warn: #f5a623;
  --radius: 0.75rem;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.55 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; }
a { color: var(--accent); }
a:hover { color: var(--focus); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--fg);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}
.skip:focus { left: 0.5rem; }

.muted { color: var(--muted); }
.num { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 46rem; margin: 0 auto; padding: 0 1rem; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 3.5rem; flex-wrap: wrap; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.brand { display: flex; align-items: center; gap: 0.5rem; color: var(--fg); text-decoration: none; font-weight: 600; }
.brand:hover { color: var(--fg); }
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.brand b { color: var(--accent); font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 0.5rem 0.625rem; border-radius: 0.5rem; font-size: 0.9375rem; min-height: 2.5rem; display: inline-flex; align-items: center; }
.site-nav a:hover { color: var(--fg); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--fg); background: var(--surface-2); }

main { padding: 1.5rem 0 2.5rem; }
main .wrap > * + * { margin-top: 1.75rem; }

/* Summary banner */
.banner { --tone: var(--muted); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--tone); border-radius: var(--radius); padding: 1.125rem 1.25rem; }
.banner[data-state="ok"] { --tone: var(--yes); }
.banner[data-state="degraded"] { --tone: var(--warn); }
.banner[data-state="outage"] { --tone: var(--danger); }
.banner h1 { font-size: 1.375rem; line-height: 1.3; font-weight: 600; color: var(--fg); }
.banner p { margin-top: 0.375rem; font-size: 0.9375rem; }
.banner .updated { color: var(--muted); font-size: 0.875rem; }

.group h2, .section h2 { font-size: 1.0625rem; font-weight: 600; }
.group > p { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted); }
.group > p strong { color: var(--fg); font-weight: 500; }

/* Check rows */
.checks { margin-top: 0.75rem; display: grid; gap: 0.75rem; }
.check { --tone: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.875rem 1rem; }
.check[data-state="operational"] { --tone: var(--yes); }
.check[data-state="degraded"] { --tone: var(--warn); }
.check[data-state="outage"] { --tone: var(--danger); }
.check-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.check h3 { font-size: 0.9875rem; font-weight: 600; }
.check-name { min-width: 0; }
.check-name p { font-size: 0.8125rem; line-height: 1.4; }
.check-state { display: inline-flex; align-items: center; gap: 0.375rem; color: var(--tone); font-size: 0.875rem; font-weight: 500; white-space: nowrap; }
.dot { width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: var(--tone); flex: none; }
.check[data-state="unknown"] .dot { background: transparent; border: 2px solid var(--tone); }
.check-note { margin-top: 0.375rem; font-size: 0.8125rem; color: var(--fg); }
.check-meta { margin-top: 0.375rem; display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; font-size: 0.75rem; }

.bars { margin-top: 0.625rem; display: flex; gap: 1px; height: 1.625rem; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 1px; background: var(--border); }
.bar-none { background: var(--border); }
.bar-ok { background: var(--yes); }
.bar-deg { background: var(--warn); }
.bar-out { background: var(--danger); }
/* History stays visible when the status is unknown, but green must not read as "fine now". */
.is-stale .bars { filter: grayscale(1); opacity: 0.45; }

.legend { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.75rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 0.375rem; }
.legend i { width: 0.625rem; height: 0.625rem; border-radius: 2px; display: inline-block; }
.is-stale .legend i { filter: grayscale(1); opacity: 0.45; }

.incident-list { margin-top: 0.625rem; display: grid; gap: 0.5rem; }
.incident { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.625rem 0.875rem; font-size: 0.875rem; }
.incident strong { font-weight: 500; }
#no-incidents { margin-top: 0.375rem; color: var(--muted); font-size: 0.875rem; }

.section ul.points { margin-top: 0.5rem; list-style: disc; padding-left: 1.25rem; color: var(--fg); font-size: 0.9375rem; }
.section ul.points li + li { margin-top: 0.375rem; }

/* FAQ */
.page-title { font-size: 1.625rem; line-height: 1.25; font-weight: 600; }
.lede { margin-top: 0.5rem; color: var(--muted); }
.callout { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--warn); border-radius: var(--radius); padding: 0.875rem 1rem; font-size: 0.9375rem; }
.callout strong { font-weight: 600; }
.toc { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.toc a { border: 1px solid var(--border); border-radius: 999px; color: var(--muted); text-decoration: none; padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.toc a:hover { color: var(--fg); border-color: var(--muted); }
.qa { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.125rem; scroll-margin-top: 1rem; }
.qa h2 { font-size: 1.0625rem; line-height: 1.35; font-weight: 600; }
.qa p, .qa ul { margin-top: 0.5rem; font-size: 0.9375rem; color: #f5f2ecd9; }
.qa ul { list-style: disc; padding-left: 1.25rem; }
.qa li + li { margin-top: 0.25rem; }
.qa strong { color: var(--fg); font-weight: 600; }
.todo { margin-top: 0.625rem; border: 2px dashed var(--warn); border-radius: 0.5rem; padding: 0.625rem 0.75rem; color: var(--warn); font-size: 0.9375rem; font-weight: 500; }

.site-footer { border-top: 1px solid var(--border); padding: 1rem 0 1.5rem; font-size: 0.8125rem; color: var(--muted); }

@media (max-width: 30rem) {
  .check-top { flex-direction: column; gap: 0.25rem; }
}
