:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5d6573;
  --border: #e3e6eb;
  --ok: #1f9d55;
  --warn: #c98a00;
  --bad: #d13b3b;
  --none: #cfd4dc;
  --ok-tint: #e8f6ee;
  --warn-tint: #fdf4e0;
  --bad-tint: #fbe9e9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #1a1d23;
    --text: #e8eaee;
    --muted: #9aa2b1;
    --border: #2b3039;
    --ok: #34c274;
    --warn: #e2a72e;
    --bad: #ef5d5d;
    --none: #3a404b;
    --ok-tint: #15291e;
    --warn-tint: #2e2510;
    --bad-tint: #321818;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.page { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; }

.masthead h1 { margin: 0 0 24px; font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.masthead h1 span { color: var(--muted); font-weight: 500; }

h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 10px; }

.muted { color: var(--muted); margin: 0; }

/* Overall banner */
.overall {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
}
.overall__text { margin: 0; font-size: 18px; font-weight: 600; }
.overall__dot { width: 14px; height: 14px; border-radius: 50%; background: var(--none); flex: none; }
.overall--operational { background: var(--ok-tint); border-color: transparent; }
.overall--operational .overall__dot { background: var(--ok); }
.overall--degraded { background: var(--warn-tint); border-color: transparent; }
.overall--degraded .overall__dot { background: var(--warn); }
.overall--major_outage { background: var(--bad-tint); border-color: transparent; }
.overall--major_outage .overall__dot { background: var(--bad); }

.notice {
  margin: 12px 0 0; padding: 10px 14px; border-radius: 8px;
  background: var(--warn-tint); color: var(--text); font-size: 14px;
}

.block { margin-top: 32px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; }

/* Component row */
.component__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.component__name { font-weight: 600; }
.badge { font-size: 14px; font-weight: 600; }
.badge--operational { color: var(--ok); }
.badge--degraded { color: var(--warn); }
.badge--major_outage { color: var(--bad); }

.bars { display: flex; gap: 2px; height: 34px; margin: 14px 0 6px; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--none); }
.bar--ok { background: var(--ok); }
.bar--warn { background: var(--warn); }
.bar--bad { background: var(--bad); }
.bars__legend { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.bars__legend strong { color: var(--text); font-weight: 600; }
.component__month { margin-top: 10px; font-size: 14px; }

/* Incidents */
.incident { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; }
.incident--degraded { border-left: 4px solid var(--warn); }
.incident--major_outage { border-left: 4px solid var(--bad); }
.incident--resolved { border-left: 4px solid var(--border); }
.incident h3 { margin: 0 0 2px; font-size: 16px; }
.incident__meta { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { padding: 8px 0 0; border-top: 1px solid var(--border); margin-top: 8px; }
.updates li:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.update__status { font-weight: 600; margin-right: 6px; }
.update__time { display: block; font-size: 12px; color: var(--muted); }
.update__message { white-space: pre-wrap; overflow-wrap: anywhere; }

.footer { margin-top: 40px; font-size: 13px; }
.footer p + p { margin-top: 6px; }

@media (max-width: 480px) {
  .page { padding-top: 20px; }
  .overall { padding: 14px 16px; }
  .overall__text { font-size: 16px; }
  .bars { gap: 1px; height: 28px; }
}
