:root {
  color-scheme: light dark;
  --page: #f4f7f5;
  --surface: #ffffff;
  --ink: #17201c;
  --muted: #68736d;
  --line: #d8dfdb;
  --forest: #176b45;
  --forest-dark: #124a33;
  --mint: #dff4e8;
  --amber: #b86b14;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--page); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
}

a { color: inherit; }

.site-header,
main,
footer {
  width: min(100% - 32px, 980px);
  margin-inline: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 30px;
  color: #fff;
  background: var(--forest-dark);
  border-radius: 4px;
  font-size: 12px;
}

nav { display: flex; gap: 8px; }
nav a {
  padding: 8px 10px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
nav a:hover,
nav a.active { color: var(--ink); border-bottom-color: var(--forest); }

main { padding-block: 54px 72px; }

.status-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 42px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--forest);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
}

h1, h2, h3, p { letter-spacing: 0; }
h1 { margin: 0; font-size: 36px; line-height: 1.15; }
h2 { margin: 0; font-size: 20px; line-height: 1.25; }
h3 { margin: 0 0 3px; font-size: 16px; }
.summary { max-width: 640px; margin: 15px 0 0; color: var(--muted); }

.overall-state,
.state {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  color: var(--forest-dark);
  font-weight: 700;
}

.overall-state {
  padding: 12px 14px;
  background: var(--mint);
  border: 1px solid #b8dfca;
  border-radius: 6px;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #24a966;
  box-shadow: 0 0 0 3px rgba(36, 169, 102, .14);
}

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

.section-title,
.service-row,
.history-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.section-title { padding: 22px 0 14px; }
.section-title span { color: var(--muted); font-size: 14px; }
.service-row { min-height: 86px; border-top: 1px solid var(--line); }
.service-row p { margin: 0; color: var(--muted); font-size: 14px; }
.state { font-size: 14px; }

.incident-history { margin-top: 48px; }
.history-day { padding: 18px 0; border-top: 1px solid var(--line); }
.history-day time { min-width: 74px; color: var(--muted); font-size: 14px; }
.history-day strong { min-width: 52px; text-align: right; font-size: 14px; }
.uptime-bar { display: grid; grid-template-columns: repeat(16, minmax(5px, 1fr)); gap: 3px; flex: 1; height: 22px; }
.uptime-bar span { background: #35a56e; border-radius: 2px; }
.empty-state { margin: 0; padding: 18px 0; color: var(--muted); border-top: 1px solid var(--line); }

.document { max-width: 720px; margin-inline: auto; }
.document h1 { margin-bottom: 24px; }
.document h2 { margin-top: 34px; }
.document p, .document li { color: var(--muted); }
.document a { color: var(--forest-dark); font-weight: 650; }
.document li + li { margin-top: 8px; }
.not-found { min-height: 58vh; }
.text-link { display: inline-block; margin-top: 14px; }

footer {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}

@media (max-width: 680px) {
  .site-header { align-items: flex-start; flex-direction: column; padding-block: 18px; }
  nav { width: 100%; overflow-x: auto; }
  main { padding-block: 38px 56px; }
  .status-heading { flex-direction: column; gap: 24px; }
  h1 { font-size: 30px; }
  .service-row { align-items: flex-start; flex-direction: column; gap: 12px; padding-block: 18px; }
  .history-day { display: grid; grid-template-columns: 1fr auto; }
  .uptime-bar { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #101713;
    --surface: #16201b;
    --ink: #edf4f0;
    --muted: #a7b3ac;
    --line: #334139;
    --forest: #74d5a1;
    --forest-dark: #a0e6be;
    --mint: #173d2a;
  }
  .overall-state { border-color: #2f6245; }
  .brand-mark { color: #15221c; background: #9de0ba; }
}
