:root {
  --brand: #2f7078;
  --brand-light: #55a5ae;
  --bg: #f6f8f8;
  --text: #1a2e30;
  --muted: #5c7275;
  --operational: #2f7078;
  --instability: #c9a227;
  --outage: #b83b3b;
  --nodata: #8a9496;
  --maintenance: #55a5ae;
  --auto: #c9a227;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--brand);
}

header {
  background: var(--brand);
  color: #fff;
  padding: 1rem 1.25rem;
}

header .wrap {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

header img {
  height: 36px;
  width: auto;
}

header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border: 1px solid #e2e8e8;
}

.headline {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 0.5rem;
}

.updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.component-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid #eef1f1;
  gap: 0.75rem;
}

.component-row:last-child {
  border-bottom: none;
}

.component-name {
  font-weight: 500;
}

.badge {
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-operational { background: #e0eff0; color: var(--operational); }
.badge-instability, .badge-auto_issue { background: #faf3dd; color: #8a6d10; }
.badge-outage { background: #fce8e8; color: var(--outage); }
.badge-nodata { background: #eceeef; color: var(--nodata); }
.badge-maintenance { background: #dff0f2; color: var(--brand-light); }

.uptime-bar {
  display: flex;
  height: 10px;
  border-radius: 4px;
  overflow: hidden;
  background: #e8ecec;
  margin: 0.5rem 0;
}

.uptime-bar span { flex: 0 0 auto; min-width: 1px; }
.bar-up { background: var(--operational); }
.bar-degraded { background: var(--instability); }
.bar-down { background: var(--outage); }
.bar-nodata { background: #cfd4d4; }
.bar-maint { background: repeating-linear-gradient(45deg, var(--brand-light), var(--brand-light) 4px, #fff 4px, #fff 8px); }

.percent-row {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.incident-list li {
  margin-bottom: 0.75rem;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

nav.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  .component-row { flex-direction: column; align-items: flex-start; }
}
