:root {
  color-scheme: light;
  --background: #f4f2ed;
  --surface: #fffdf8;
  --ink: #17221c;
  --muted: #667169;
  --line: #d8dbd5;
  --green: #1f7a4d;
  --amber: #a45e0a;
  --red: #a83632;
  --neutral: #78827c;
  --shadow: 0 18px 50px rgb(23 34 28 / 8%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--background);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

.shell {
  width: min(840px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 40px;
}

.masthead,
.section-heading,
.service-row,
.incident-row,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.masthead {
  align-items: end;
  margin-bottom: 40px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

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

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.updated,
.section-heading span,
footer {
  color: var(--muted);
  font-size: 0.82rem;
}

.updated {
  margin-bottom: 5px;
  text-align: right;
}

.summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 52px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.indicator,
.status-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neutral);
}

.indicator {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 7px rgb(120 130 124 / 12%);
}

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

.degraded {
  background: var(--amber);
}

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

.summary-title {
  margin-bottom: 2px;
  font-size: 1.08rem;
  font-weight: 700;
}

.summary-detail {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

section + section {
  margin-top: 42px;
}

.section-heading {
  margin-bottom: 12px;
}

.service-list,
.incident-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.service-row,
.incident-row {
  min-height: 64px;
  padding: 16px 18px;
}

.service-row + .service-row,
.incident-row + .incident-row {
  border-top: 1px solid var(--line);
}

.service-name,
.incident-title {
  margin-bottom: 2px;
  font-size: 0.94rem;
  font-weight: 650;
}

.service-meta,
.incident-meta {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.service-state {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.empty {
  margin: 0;
  padding: 20px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.error {
  color: var(--red);
}

footer {
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

footer p {
  margin-bottom: 0;
}

footer a {
  color: var(--ink);
  text-underline-offset: 3px;
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 24px, 840px);
    padding-top: 36px;
  }

  .masthead,
  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .updated {
    text-align: left;
  }

  .summary {
    margin-bottom: 40px;
  }

  .section-heading span {
    display: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #111713;
    --surface: #18201b;
    --ink: #eef3ef;
    --muted: #a5afa8;
    --line: #344039;
    --green: #61c790;
    --amber: #e4a450;
    --red: #e37973;
    --neutral: #89938d;
    --shadow: none;
  }
}
