:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #667085;
  --line: #d9e0ea;
  --green: #0abf53;
  --green-soft: #e8f8ee;
  --blue: #2563eb;
  --shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}

* {
  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;
}

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

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.brand {
  color: var(--text);
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.overall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(10, 191, 83, 0.28);
  border-radius: 999px;
  background: var(--green-soft);
  color: #067a37;
  font-weight: 700;
  white-space: nowrap;
}

.pulse {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(10, 191, 83, 0.14);
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.summary > div {
  min-height: 82px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
}

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

.summary strong {
  font-size: 18px;
}

.status-card,
.incidents {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.loading {
  padding: 22px;
  color: var(--muted);
  font-weight: 700;
}

details {
  border-bottom: 1px solid var(--line);
}

details:last-child {
  border-bottom: 0;
}

summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 0 22px;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.service-title {
  position: relative;
  padding-left: 22px;
  font-size: 17px;
  font-weight: 650;
}

.service-title::before {
  content: "+";
  position: absolute;
  left: 0;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translateY(-50%);
  border: 1px solid #aab4c3;
  color: #64748b;
  font-size: 11px;
  line-height: 11px;
  text-align: center;
}

details[open] .service-title::before {
  content: "-";
}

.state {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.state.operational {
  color: var(--green);
}

.state.degraded {
  color: #d97706;
}

.state.offline {
  color: #dc2626;
}

.service-list {
  padding: 8px 22px 18px 42px;
}

.service-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 45px;
  font-size: 16px;
}

.incidents {
  margin-top: 18px;
  padding: 22px;
}

.incidents h1 {
  margin: 0 0 14px;
  font-size: 18px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 82px;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
}

@media (max-width: 720px) {
  .page {
    width: min(100% - 24px, 960px);
    padding-top: 24px;
  }

  .hero,
  .summary {
    grid-template-columns: 1fr;
  }

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

  .overall {
    width: 100%;
    justify-content: center;
  }

  summary,
  .service-row {
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  summary {
    padding: 16px;
  }

  .service-list {
    padding: 0 16px 16px 38px;
  }
}
