:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f6f8;
  color: #14171c;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #4b5563; text-decoration: none; }
a:hover { text-decoration: underline; }

.shell {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.header, .service-header, .section-title, .location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #737b88;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(30px, 5vw, 46px); letter-spacing: -0.04em; }
h2 { margin-bottom: 6px; font-size: 24px; letter-spacing: -0.02em; }
h3 { margin-bottom: 0; font-size: 15px; }

.updated { margin: 14px 0 30px; color: #737b88; font-size: 13px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: #e7e9ed;
  color: #505866;
}

.status-badge.operational, .status-inline.up { background: #e7f7ed; color: #16763a; }
.status-badge.degraded { background: #fff4d6; color: #946600; }
.status-badge.outage, .status-inline.down { background: #fde8e8; color: #b42318; }
.status-badge.unknown, .status-inline.unknown { background: #eceef1; color: #667085; }

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.tab {
  border: 1px solid #d9dde4;
  background: #fff;
  color: #555e6b;
  padding: 9px 14px;
  border-radius: 9px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active { color: #111827; border-color: #8c96a6; box-shadow: 0 1px 2px rgb(16 24 40 / 8%); }

.panel {
  background: #fff;
  border: 1px solid #e2e5ea;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 8px 30px rgb(16 24 40 / 5%);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0;
}

.metric {
  padding: 16px;
  border-radius: 12px;
  background: #f7f8fa;
}
.metric span { display: block; margin-bottom: 7px; color: #737b88; font-size: 12px; }
.metric strong { font-size: 20px; }

.section { padding-top: 24px; margin-top: 24px; border-top: 1px solid #eceef2; }
.section-title { margin-bottom: 14px; }
.section-title span { color: #838b97; font-size: 12px; }

.locations { display: grid; gap: 8px; }
.location-row { padding: 11px 0; font-size: 13px; }
.status-inline { display: inline-flex; gap: 7px; align-items: center; padding: 5px 9px; border-radius: 999px; font-weight: 650; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.history { display: grid; grid-template-columns: repeat(auto-fit, minmax(4px, 1fr)); gap: 4px; height: 44px; align-items: stretch; }
.history-bar { border-radius: 3px; background: #d8dce2; }
.history-bar.operational { background: #31a05d; }
.history-bar.degraded { background: #d7a41c; }
.history-bar.outage { background: #d34d45; }
.history-bar.unknown { background: #d8dce2; }
.history-scale { display: flex; justify-content: space-between; margin-top: 8px; color: #9097a2; font-size: 11px; }

.empty { padding: 36px 12px; text-align: center; color: #737b88; }

@media (max-width: 640px) {
  .shell { padding-top: 30px; }
  .header, .service-header { align-items: flex-start; }
  .header { flex-direction: column; }
  .panel { padding: 20px; }
  .metrics { grid-template-columns: 1fr; }
  .service-header { flex-direction: column; }
}

.maintenance-list {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.maintenance-card {
  padding: 18px;
  border: 1px solid #e2e5ea;
  border-left: 4px solid #98a2b3;
  border-radius: 12px;
  background: #fff;
}
.maintenance-card.scheduled { border-left-color: #d7a41c; }
.maintenance-card.active { border-left-color: #b42318; }
.maintenance-card.completed { border-left-color: #31a05d; }

.maintenance-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.maintenance-header h2 { margin-bottom: 0; font-size: 16px; }

.maintenance-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #eceef1;
  color: #667085;
}
.maintenance-badge.scheduled { background: #fff4d6; color: #946600; }
.maintenance-badge.active { background: #fde8e8; color: #b42318; }
.maintenance-badge.completed { background: #e7f7ed; color: #16763a; }

.maintenance-message {
  margin: 12px 0 0;
  color: #505866;
  font-size: 13px;
  line-height: 1.5;
}

.maintenance-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  color: #737b88;
  font-size: 12px;
}

.status-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 14px 0 30px;
}
.status-meta .updated { margin: 0; }
.machine-readable {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
}

.incidents {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}
.incident-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.incident-section-title h2 { margin: 0; font-size: 17px; }
.incident-section-title span { color: #838b97; font-size: 12px; }
.incident-list { display: grid; gap: 10px; }
.incident-card {
  padding: 18px;
  border: 1px solid #e2e5ea;
  border-left: 4px solid #d7a41c;
  border-radius: 12px;
  background: #fff;
}
.incident-card.resolved { border-left-color: #31a05d; }
.incident-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.incident-header h3 { font-size: 16px; }
.incident-badge {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fff4d6;
  color: #946600;
}
.incident-badge.monitoring { background: #e8f1ff; color: #175cd3; }
.incident-badge.resolved { background: #e7f7ed; color: #16763a; }
.incident-message {
  margin: 12px 0 0;
  color: #505866;
  font-size: 13px;
  line-height: 1.5;
}
.incident-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  color: #737b88;
  font-size: 12px;
}
.incident-updates {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eceef2;
}
.incident-update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 4px;
  color: #838b97;
  font-size: 11px;
}
.incident-update p {
  margin: 0;
  color: #505866;
  font-size: 13px;
  line-height: 1.5;
}
.incident-empty {
  margin: 0;
  padding: 16px 18px;
  border: 1px solid #e2e5ea;
  border-radius: 12px;
  background: #fff;
  color: #737b88;
  font-size: 13px;
}
