:root {
  color-scheme: light;
  --bg: #f7f8f9;
  --panel: #ffffff;
  --ink: #181a1f;
  --muted: #60646c;
  --line: #dcdee3;
  --line-strong: #c4c8d0;
  --green: #30a46c;
  --yellow: #d5a021;
  --orange: #e06c3d;
  --red: #d92d20;
  --gray: #8a8f98;
  --focus: #1f6feb;
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration-color: rgba(24, 26, 31, 0.35);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-color: currentColor;
}

.inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 20px;
}

.brand {
  font-size: 1rem;
  font-weight: 750;
  text-decoration: none;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
}

.summary-band {
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.summary-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 24px;
  padding: 46px 0 34px;
}

.status-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-dot {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gray);
  box-shadow: 0 0 0 5px rgba(138, 143, 152, 0.16);
}

.status-dot.status-operational {
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(48, 164, 108, 0.16);
}

.status-dot.status-degraded_performance,
.status-dot.status-maintenance {
  background: var(--yellow);
  box-shadow: 0 0 0 5px rgba(213, 160, 33, 0.18);
}

.status-dot.status-partial_outage {
  background: var(--orange);
  box-shadow: 0 0 0 5px rgba(224, 108, 61, 0.18);
}

.status-dot.status-major_outage {
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(217, 45, 32, 0.16);
}

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

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

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

h3 {
  margin-bottom: 4px;
  font-size: 1rem;
  letter-spacing: 0;
}

.lead {
  max-width: 740px;
  margin: 14px 0 0 32px;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
}

.summary-meta {
  display: grid;
  gap: 10px;
  min-width: 230px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfbfc;
}

.summary-meta div {
  display: grid;
  gap: 3px;
}

.summary-meta dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-meta dd {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 650;
}

.section {
  padding: 30px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.incident-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

.incident-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

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

.incident-row p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.systems {
  display: grid;
  gap: 12px;
}

.group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.group summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  cursor: pointer;
  list-style: none;
}

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

.group-title {
  min-width: 0;
}

.group-title p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  min-width: 180px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.pill.status-operational {
  border-color: rgba(48, 164, 108, 0.28);
  background: rgba(48, 164, 108, 0.11);
  color: #17643f;
}

.pill.status-degraded_performance,
.pill.status-maintenance {
  border-color: rgba(213, 160, 33, 0.36);
  background: rgba(213, 160, 33, 0.14);
  color: #7b5700;
}

.pill.status-partial_outage {
  border-color: rgba(224, 108, 61, 0.32);
  background: rgba(224, 108, 61, 0.13);
  color: #8a391b;
}

.pill.status-major_outage {
  border-color: rgba(217, 45, 32, 0.3);
  background: rgba(217, 45, 32, 0.11);
  color: #8f1d16;
}

.pill.status-unknown,
.pill.status-not_monitored {
  border-color: rgba(138, 143, 152, 0.35);
  background: rgba(138, 143, 152, 0.12);
  color: #4e535b;
}

.component-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.component {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-top: 1px solid var(--line);
}

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

.component-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.component p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.uptime {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650;
  white-space: nowrap;
}

.history-bars {
  display: grid;
  grid-template-columns: repeat(90, minmax(2px, 1fr));
  gap: 2px;
  min-height: 28px;
}

.bar {
  min-height: 28px;
  border-radius: 2px;
  background: var(--gray);
}

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

.bar.status-degraded_performance,
.bar.status-maintenance {
  background: var(--yellow);
}

.bar.status-partial_outage {
  background: var(--orange);
}

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

.bar.status-unknown,
.bar.status-not_monitored {
  background: #c9ccd2;
}

.probe-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.probe-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
}

.probe-marker {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray);
}

.probe-marker.ok {
  background: var(--green);
}

.probe-marker.failed {
  background: var(--red);
}

.empty-state,
.error-state {
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--panel);
}

.history-table {
  display: grid;
  gap: 12px;
}

.history-row {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.history-name {
  min-width: 0;
  font-weight: 750;
}

.history-name span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 550;
}

.timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.site-footer {
  padding: 30px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

@media (max-width: 760px) {
  .site-header .inner,
  .summary-layout,
  .section-head,
  .group summary,
  .component-head,
  .incident-row,
  .history-row {
    grid-template-columns: 1fr;
  }

  .site-header .inner {
    align-items: start;
    padding: 14px 0;
  }

  .top-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .summary-layout {
    padding-top: 32px;
  }

  .lead {
    margin-left: 0;
  }

  .summary-meta {
    min-width: 0;
  }

  .status-line {
    justify-content: start;
    min-width: 0;
  }

  .history-bars {
    grid-template-columns: repeat(45, minmax(3px, 1fr));
  }

  .history-row .history-bars {
    grid-column: 1;
  }
}
