:root {
  --bg: #ffffff;
  --fg: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #f9fafb;
  --ok: #16a34a;
  --warn: #ea580c;
  --down: #dc2626;
  --nodata: #e5e7eb;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

header h1 {
  font-size: 26px;
  margin: 0 0 4px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

.banner {
  padding: 18px 22px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.04);
}

.banner.ok       { background: rgba(22, 163, 74, 0.08); color: var(--ok); }
.banner.degraded { background: rgba(234, 88, 12, 0.08); color: var(--warn); }
.banner.down     { background: rgba(220, 38, 38, 0.08); color: var(--down); }
.banner.loading  { background: var(--card); color: var(--muted); }
.banner.loading::before { background: var(--muted); }

#services {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
}

.service {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.service-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.service-name {
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 500;
}

.service-name a {
  color: inherit;
  text-decoration: none;
}
.service-name a:hover { text-decoration: underline; }

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.dot.up      { background: var(--ok); }
.dot.down    { background: var(--down); }
.dot.unknown { background: var(--muted); }

.state-label {
  font-size: 13px;
  color: var(--muted);
}
.state-label.up   { color: var(--ok); }
.state-label.down { color: var(--down); }

.bars {
  display: grid;
  grid-template-columns: repeat(90, 1fr);
  gap: 2px;
  height: 30px;
}

.bar {
  background: var(--ok);
  border-radius: 1px;
  transition: opacity 0.15s;
}
.bar:hover { opacity: 0.75; cursor: pointer; }
.bar.degraded { background: var(--warn); }
.bar.down     { background: var(--down); }
.bar.nodata   { background: var(--nodata); }

.scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}

#incidents-section {
  margin-top: 56px;
}

#incidents-section h2 {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 16px;
}

#incidents-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#incidents-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

#incidents-list li.muted {
  border: none;
  padding: 8px 0;
}

.incident-svc { font-weight: 500; }
.incident-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }

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

footer {
  margin-top: 56px;
  color: var(--muted);
  font-size: 12px;
}
footer a { color: var(--muted); }
.sep { margin: 0 8px; }

@media (max-width: 600px) {
  main { padding: 32px 16px 64px; }
  .bars { height: 24px; gap: 1px; }
  header h1 { font-size: 22px; }
}
