:root {
  color-scheme: light dark;
  --ink: #00010f;
  --text: #172026;
  --muted: #65706b;
  --page: #f7f4e8;
  --surface: #fffef0;
  --raised: #ffffff;
  --border: #ded2b9;
  --border-strong: #c4b18f;
  --green: #1c5f4a;
  --green-soft: #d9eadf;
  --amber: #80621f;
  --amber-soft: #f1e4bf;
  --red: #9f3434;
  --red-soft: #f2dada;
  --gray-soft: #e6e5df;
  --focus: rgba(36, 120, 93, 0.35);
  --shadow: 0 12px 30px rgba(0, 1, 15, 0.07);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--page);
}

* {
  box-sizing: border-box;
}
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
}
a {
  color: var(--green);
  font-weight: 700;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  color: var(--ink);
  letter-spacing: -0.025em;
}
h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.05;
}
h2 {
  margin-bottom: 4px;
  font-size: 1.25rem;
}
h3 {
  margin-bottom: 4px;
  font-size: 1.06rem;
}
p {
  line-height: 1.6;
}

.site-header,
main,
footer {
  width: min(100% - 40px, 920px);
  margin-inline: auto;
}
.site-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 1.04rem;
  text-decoration: none;
}
.brand img {
  width: 42px;
  height: 38px;
  object-fit: contain;
}
.brand strong {
  color: var(--green);
}
nav {
  display: flex;
  gap: 22px;
  font-size: 0.9rem;
}
nav a {
  color: var(--muted);
  text-decoration: none;
}
nav a[aria-current="page"] {
  color: var(--ink);
}
main {
  display: grid;
  gap: 52px;
  padding: 28px 0 70px;
}

.status-hero,
.page-intro {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--raised);
  box-shadow: var(--shadow);
}
.status-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(28px, 6vw, 48px);
}
.status-hero > div:first-child {
  max-width: 620px;
}
.status-hero p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
}
.state-surface-operational {
  border-top: 5px solid var(--green);
}
.state-surface-possible_disruption,
.state-surface-unknown {
  border-top: 5px solid var(--amber);
}
.state-surface-degraded,
.state-surface-outage {
  border-top: 5px solid var(--red);
}
.page-intro {
  padding: clamp(28px, 6vw, 48px);
}
.page-intro p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
}
.page-intro.error {
  border-top: 5px solid var(--red);
}
.eyebrow {
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.freshness {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 750;
  white-space: nowrap;
}
.freshness-dot,
.state-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}
.freshness-delayed {
  color: var(--amber);
}
.freshness-stale {
  color: var(--red);
  font-weight: 850;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.section-heading a {
  font-size: 0.9rem;
}
.service-list,
.incident-list {
  display: grid;
  gap: 14px;
}
.service-card,
.incident-card,
.empty-state {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.service-card {
  padding: 24px;
}
.service-heading,
.incident-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.service-heading p,
.incident-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.77rem;
  font-weight: 800;
  white-space: nowrap;
}
.state-operational {
  color: var(--green);
  background: var(--green-soft);
}
.state-possible_disruption,
.state-unknown {
  color: var(--amber);
  background: var(--amber-soft);
}
.state-degraded,
.state-outage {
  color: var(--red);
  background: var(--red-soft);
}
.service-automation {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.history-strip {
  display: grid;
  grid-template-columns: repeat(90, minmax(1px, 1fr));
  gap: 2px;
  height: 34px;
  margin-top: 24px;
}
.history-day {
  min-width: 1px;
  border-radius: 2px;
  background: var(--gray-soft);
}
.history-green {
  background: #4c9a77;
}
.history-amber {
  background: #c3952d;
}
.history-red {
  background: #c75b5b;
}
.history-gray {
  background: #c4c3bd;
}
.history-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}
.history-meta strong {
  color: var(--text);
}

.incident-card {
  padding: 24px;
}
.incident-timing {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 0.8rem;
}
.incident-updates {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.incident-update {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.incident-update time {
  color: var(--muted);
  font-size: 0.78rem;
}
.prose > :last-child {
  margin-bottom: 0;
}
.prose p,
.prose li,
.prose blockquote {
  font-size: 0.92rem;
}
.prose blockquote {
  margin-left: 0;
  border-left: 3px solid var(--border-strong);
  padding-left: 14px;
  color: var(--muted);
}
.prose pre {
  overflow: auto;
  border-radius: 8px;
  padding: 12px;
  background: var(--page);
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
}
.empty-state {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
}
.empty-state > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-weight: 900;
}
.empty-state h3,
.empty-state p {
  margin-bottom: 0;
}
.empty-state p,
.muted {
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #fffef0;
    --text: #f4f1e4;
    --muted: #c2bda9;
    --page: #00010f;
    --surface: #101524;
    --raised: #171d2d;
    --border: #333947;
    --border-strong: #565d6d;
    --green: #8bc5a9;
    --green-soft: #203d34;
    --amber: #e1bd70;
    --amber-soft: #3c321e;
    --red: #e89b9b;
    --red-soft: #462526;
    --gray-soft: #343a47;
    --focus: rgba(139, 197, 169, 0.38);
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  }
  .history-green {
    background: #65ad8a;
  }
  .history-amber {
    background: #d6b56e;
  }
  .history-red {
    background: #d97d7d;
  }
  .history-gray {
    background: #565d6d;
  }
}

@media (max-width: 650px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 920px);
  }
  .site-header {
    min-height: 68px;
    align-items: flex-start;
    padding-top: 14px;
  }
  .brand img {
    width: 34px;
    height: 32px;
  }
  .brand span {
    max-width: 120px;
    line-height: 1.05;
  }
  nav {
    gap: 12px;
    font-size: 0.78rem;
  }
  main {
    gap: 40px;
    padding-top: 18px;
  }
  .status-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .section-heading {
    align-items: flex-start;
  }
  .service-heading,
  .incident-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .history-strip {
    gap: 1px;
    height: 28px;
  }
  .history-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .incident-update {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
