:root {
  color-scheme: light;
  --background: #f7f8fa;
  --surface: #ffffff;
  --surface-muted: #f3f5f7;
  --border: #dde3e8;
  --text: #18212b;
  --text-muted: #66717d;
  --operational-bg: #e8f5ee;
  --operational-text: #1e6b43;
  --degraded-bg: #fff4db;
  --degraded-text: #8a5a00;
  --major-outage-bg: #fde9e7;
  --major-outage-text: #a2332b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.5;
}

.page {
  padding: 40px 20px 56px;
}

.container {
  max-width: 880px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
}

.last-updated,
.muted {
  color: var(--text-muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
}

.panel + .panel {
  margin-top: 16px;
}

.panel-header {
  margin-bottom: 16px;
}

.overall-status {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stack {
  display: grid;
  gap: 16px;
}

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

.card-muted {
  background: var(--surface-muted);
}

.service-card-header,
.incident-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.service-metric,
.incident-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-operational {
  background: var(--operational-bg);
  color: var(--operational-text);
}

.status-degraded {
  background: var(--degraded-bg);
  color: var(--degraded-text);
}

.status-major_outage {
  background: var(--major-outage-bg);
  color: var(--major-outage-text);
}

.message {
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--surface-muted);
  color: var(--text-muted);
}

.message-error {
  margin-bottom: 20px;
  border: 1px solid #efc2bd;
  background: #fff4f2;
  color: var(--major-outage-text);
}

@media (max-width: 640px) {
  .page {
    padding-top: 32px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .panel {
    padding: 20px;
  }
}
