:root {
  color-scheme: light;
  --bg: #f8f7f2;
  --panel: #ffffff;
  --ink: #172016;
  --muted: #64705f;
  --line: #dedbd1;
  --green: #2f8f5b;
  --red: #c7513b;
  --amber: #c58727;
  --blue: #3c6f99;
  --unknown: #9a9487;
  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);
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 1rem;
  font-weight: 750;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.refresh,
.metric-label,
.eyebrow,
.service-url,
.incident-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  font-weight: 750;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(2.5rem, 8vw, 5.8rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.summary-copy {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.status-orb {
  display: grid;
  width: clamp(132px, 18vw, 190px);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(23, 32, 22, 0.08);
}

.status-orb span {
  display: grid;
  width: 74%;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 850;
}

body[data-status="degraded"] .status-orb span {
  background: var(--amber);
}

body[data-status="down"] .status-orb span {
  background: var(--red);
}

body[data-status="unknown"] .status-orb span {
  background: var(--unknown);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.stat-strip div {
  min-width: 0;
  padding: 20px;
  background: var(--panel);
}

.stat-strip strong {
  display: block;
  margin-top: 8px;
  font-size: 1.6rem;
}

.services,
.incidents {
  padding: 56px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

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

.service-card,
.incident-row,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.service-card {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(260px, 1.25fr) minmax(150px, 0.6fr);
  align-items: center;
  gap: 20px;
  padding: 18px;
}

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

.service-url {
  display: block;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eaf6ef;
  color: var(--green);
  font-size: 0.85rem;
  font-weight: 800;
}

.pill::before {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.pill.down {
  background: #fbecea;
  color: var(--red);
}

.pill.unknown {
  background: #efede7;
  color: var(--unknown);
}

.history {
  display: grid;
  grid-template-columns: repeat(48, minmax(3px, 1fr));
  gap: 3px;
  min-width: 0;
}

.bar {
  height: 36px;
  border-radius: 3px;
  background: var(--unknown);
}

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

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

.service-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

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

.incident-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 18px;
}

.incident-row.open {
  border-color: rgba(199, 81, 59, 0.45);
}

.empty-state {
  padding: 24px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .topbar,
  main {
    width: min(100% - 24px, 1120px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
  }

  .hero,
  .service-card,
  .incident-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 32px;
  }

  .status-orb {
    width: 136px;
  }

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

  .service-meta {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .stat-strip {
    grid-template-columns: 1fr;
  }

  .history {
    grid-template-columns: repeat(24, minmax(5px, 1fr));
  }

  .bar {
    height: 28px;
  }
}