:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #14213d;
  --muted: #64748b;
  --line: #dbe3ef;
  --ok: #18864b;
  --warn: #ad6800;
  --bad: #b42318;
  --info: #2457c5;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
.page-shell { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 28px; }
.status-header { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 24px; }
.brand { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #2356c4; }
h1 { margin: 6px 0 6px; font-size: clamp(32px, 5vw, 48px); }
.lede { margin: 0; color: var(--muted); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin: 18px 0; box-shadow: 0 10px 30px rgba(15, 23, 42, .05); }
.panel-heading { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 14px; }
h2 { margin: 0; font-size: 20px; }
.timestamp, footer { color: var(--muted); font-size: 13px; }
.overall-card { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; background: var(--panel); font-weight: 700; white-space: nowrap; }
.status-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--muted); }
.overall-card[data-status="operational"] .status-dot, .status-pill[data-status="operational"] { background: var(--ok); }
.overall-card[data-status="degraded_performance"] .status-dot, .status-pill[data-status="degraded_performance"],
.overall-card[data-status="maintenance"] .status-dot, .status-pill[data-status="maintenance"] { background: var(--warn); }
.overall-card[data-status="partial_outage"] .status-dot, .status-pill[data-status="partial_outage"],
.overall-card[data-status="major_outage"] .status-dot, .status-pill[data-status="major_outage"] { background: var(--bad); }
.component-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.component-row:first-child { border-top: 0; }
.component-name { font-weight: 700; }
.component-detail { margin-top: 3px; color: var(--muted); font-size: 14px; }
.status-chip { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 700; }
.status-pill { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.incident-card { border-top: 1px solid var(--line); padding: 16px 0; }
.incident-card:first-child { border-top: 0; }
.incident-title-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.incident-title { font-weight: 800; }
.incident-summary { margin: 8px 0; color: var(--muted); line-height: 1.55; }
.incident-update { border-left: 3px solid var(--line); margin: 10px 0 0; padding-left: 12px; }
.incident-update time { color: var(--muted); font-size: 12px; }
.empty { color: var(--muted); padding: 10px 0; }
footer { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 18px 0; }

@media (prefers-color-scheme: dark) {
  :root { --bg: #0b1220; --panel: #111b2d; --text: #eef4ff; --muted: #a6b3c7; --line: #26344a; }
  .panel { box-shadow: none; }
}

@media (max-width: 700px) {
  .status-header { flex-direction: column; }
  .overall-card { align-self: stretch; justify-content: center; }
  .panel-heading, .incident-title-row { align-items: flex-start; flex-direction: column; }
}
