/* BOB public status page. Colours come from packages/design (palette.ts,
   light theme); fonts are the system stack so the page loads nothing
   third-party (strict CSP: default-src 'none'). */

:root {
  --bg: #f8fafc;
  --bg-soft: #edf2f8;
  --bg-tint: #f1ecfb;
  --line: rgba(15, 23, 42, 0.09);
  --line-strong: rgba(15, 23, 42, 0.16);
  --text: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --violet: #5921E8;
  --amber: #d59b1e;
  --danger: #ef4444;
  --green: #2f8f3f;
  --green-bg: #e8f6ea;
  --amber-bg: #fbf3df;
  --danger-bg: #fde8e8;
  --neutral-bg: rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; }

header.site, main, footer.site {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

header.site {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 64px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}
.brand img { display: block; border-radius: 6px; }
.site-title { color: var(--muted); }
.site-home { margin-left: auto; font-size: 14px; }

main { padding-top: 24px; padding-bottom: 40px; }

h1 { margin: 0; font-size: 22px; font-weight: 700; }
h2 { margin: 32px 0 12px; font-size: 14px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }

.overall {
  border: 1px solid var(--line);
  border-left: 6px solid var(--line-strong);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--bg-soft);
}
.overall.ok   { border-left-color: var(--green);  background: var(--green-bg); }
.overall.warn { border-left-color: var(--amber);  background: var(--amber-bg); }
.overall.down { border-left-color: var(--danger); background: var(--danger-bg); }
.overall .meta { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.component-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.component { padding: 14px 16px; border-top: 1px solid var(--line); }
.component:first-child { border-top: 0; }
.component-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.component-name { font-weight: 600; }
.component-uptime { color: var(--muted-2); font-size: 14px; }
.component-status { margin-left: auto; font-size: 14px; font-weight: 600; }
.component-status.ok   { color: var(--green); }
.component-status.warn { color: var(--amber); }
.component-status.down { color: var(--danger); }

.uptime-bar { display: flex; gap: 2px; margin-top: 10px; height: 28px; }
.uptime-bar i { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--neutral-bg); }
.uptime-bar i.ok   { background: var(--green); }
.uptime-bar i.warn { background: var(--amber); }
.uptime-bar i.down { background: var(--danger); }
.uptime-axis { display: flex; justify-content: space-between; margin-top: 4px; font-size: 12px; color: var(--muted-2); }

.legend { margin: 12px 4px 0; font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--neutral-bg); }
.swatch.ok { background: var(--green); }
.swatch.warn { background: var(--amber); }
.swatch.down { background: var(--danger); }

.incident-list { list-style: none; margin: 0; padding: 0; }
.incident { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 14px 16px; margin-bottom: 12px; }
.incident-title { margin: 0; font-size: 16px; font-weight: 600; }
.incident-meta { margin: 4px 0 10px; color: var(--muted); font-size: 14px; }
.incident-updates { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line-strong); }
.incident-updates li { padding: 4px 0 4px 12px; font-size: 14px; }
.incident-updates time { display: block; color: var(--muted-2); font-size: 12px; }
.incident.resolved .incident-title { color: var(--muted); }

.empty { color: var(--muted-2); font-size: 14px; margin: 0; }

footer.site {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 16px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 13px;
}
.sep { color: var(--line-strong); }

@media (max-width: 480px) {
  body { font-size: 15px; }
  header.site { height: 56px; }
  h1 { font-size: 19px; }
  .component-head { gap: 8px; }
  .component-status { margin-left: 0; flex-basis: 100%; }
  .uptime-bar { height: 20px; gap: 1px; }
  .uptime-bar i { min-width: 1px; }
}
