:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --border: #d7deea;
  --text: #152033;
  --muted: #5d6980;
  --shadow: 0 12px 30px rgba(18, 32, 59, 0.08);
  --green: #18a37a;
  --yellow: #e0a100;
  --red: #d64550;
  --gray: #bcc5d5;
  --neutral: #5d6980;
}

* {
  box-sizing: border-box;
}

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

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

.hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 40px;
  margin-bottom: 10px;
}

.subtitle,
.muted,
.meta {
  color: var(--muted);
}

.meta {
  padding-top: 6px;
  font-size: 14px;
}

.banner {
  border-radius: 16px;
  padding: 24px 28px;
  color: #fff;
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.banner-operational {
  background: var(--green);
}

.banner-degraded {
  background: var(--yellow);
}

.banner-major_outage {
  background: var(--red);
}

.banner-no_data,
.banner-neutral {
  background: var(--neutral);
}

.grid {
  display: grid;
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.pill-operational {
  background: var(--green);
}

.pill-degraded {
  background: var(--yellow);
}

.pill-major_outage {
  background: var(--red);
}

.pill-no_data,
.pill-neutral {
  background: var(--neutral);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fbfcfe;
}

.metric-label,
.detail-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 22px;
}

.detail-list {
  display: grid;
  gap: 12px;
}

code {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0f4fa;
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Consolas, monospace;
  word-break: break-word;
}

.uptime-value {
  font-size: 16px;
  font-weight: 700;
}

.uptime-grid {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 6px;
}

.uptime-cell {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background: var(--gray);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.uptime-cell:hover,
.uptime-cell:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(24, 163, 122, 0.2);
  outline: none;
}

.cell-operational {
  background: var(--green);
}

.cell-degraded {
  background: var(--yellow);
}

.cell-major_outage {
  background: var(--red);
}

.cell-no_data {
  background: var(--gray);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.dot-green {
  background: var(--green);
}

.dot-yellow {
  background: var(--yellow);
}

.dot-red {
  background: var(--red);
}

.dot-gray {
  background: var(--gray);
}

.grid-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 280px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(21, 32, 51, 0.96);
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-line;
  box-shadow: var(--shadow);
  pointer-events: none;
}

.grid-tooltip[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .hero,
  .card-header {
    flex-direction: column;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page {
    padding: 20px 14px 32px;
  }

  h1 {
    font-size: 30px;
  }

  .banner {
    font-size: 24px;
    padding: 18px 20px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .uptime-grid {
    gap: 4px;
  }
}
