:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --line: #d9e0ea;
  --text: #172033;
  --muted: #667085;
  --green-bg: #dff8ea;
  --green-text: #126b3a;
  --yellow-bg: #fff2cc;
  --yellow-text: #8a5a00;
  --orange-bg: #ffe1c2;
  --orange-text: #9a3f00;
  --red-bg: #ffd7d7;
  --red-text: #a11d24;
  --blue-bg: #dbeafe;
  --blue-text: #1d4ed8;
  --gray-bg: #e8edf4;
  --gray-text: #485467;
}

* {
  box-sizing: border-box;
}

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

.page-shell {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.status-header,
.status-summary,
.component-section,
.incident-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
}

.status-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

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

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 1rem;
  letter-spacing: 0;
}

.status-summary,
.component-section,
.incident-section {
  margin-top: 16px;
  padding: 24px 28px;
}

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

.component-list {
  display: grid;
  gap: 10px;
}

.component-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.component-row:first-child {
  border-top: 0;
}

.component-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 750;
  text-align: center;
  white-space: nowrap;
}

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

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

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

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

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

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

.incident-section {
  border-color: #f0b4b4;
}

.incident-section p {
  margin-bottom: 0;
}

.incident-updates {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.incident-update {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.incident-update p {
  margin: 0;
}

.incident-update-meta {
  margin-bottom: 4px;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 24px, 880px);
    padding: 24px 0;
  }

  .status-header {
    display: grid;
    padding: 22px;
  }

  .status-summary,
  .component-section,
  .incident-section {
    padding: 20px 22px;
  }

  .component-row {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .status-pill {
    justify-self: start;
  }
}
