:root {
  --ink: #1a1916;
  --muted: #5c574e;
  --paper: #f7f6f3;
  --line: #e4e1d8;
  --operational: #1f7a4d;
  --degraded: #8a5a00;
  --outage: #a3262c;
  --unknown: #c8c3b8;
  --display: clamp(2.5rem, 1.4rem + 3.4vw, 4.75rem);
  --body: 1.0625rem;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: var(--body);
  line-height: 1.5;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

.shell {
  display: grid;
  grid-template-columns: 1fr minmax(0, min(70rem, calc(100% - 3rem))) 1fr;
}

.shell > * { grid-column: 2; }

.shell > .bleed { grid-column: 1 / -1; }

.bleed {
  display: grid;
  grid-template-columns: 1fr minmax(0, min(70rem, calc(100% - 3rem))) 1fr;
}

.frame {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.span-all { grid-column: 1 / -1; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 4rem;
}

.brand {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.enter {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.status-band { padding: 4rem 0 6rem; }

.systems-band { padding: 0 0 4rem; }

.incidents-band { padding: 2rem 0 6rem; }

.intro { grid-column: 1 / -1; }

.eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 16px 0 0;
  max-width: min(16ch, 100%);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: var(--display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.tone-operational { color: var(--operational); }
.tone-degraded { color: var(--degraded); }
.tone-partial,
.tone-outage { color: var(--outage); }

.lede {
  margin: 24px 0 0;
  max-width: min(42ch, 100%);
  color: var(--muted);
}

h2 {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.group { margin-top: 32px; }

.group-label {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.system + .system { margin-top: 24px; }

.system-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
}

.system h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

.state,
.incident-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.875rem;
}

.latency {
  color: var(--muted);
}

.mark {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--unknown);
  flex: none;
}

.mark-operational { background: var(--operational); }
.mark-degraded { background: var(--degraded); }
.mark-outage { background: var(--outage); }
.mark-unknown { background: var(--unknown); }

.bars-scroll { margin-top: 12px; }

.bars {
  display: grid;
  grid-template-columns: repeat(90, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
  height: 32px;
}

.cell {
  display: block;
  height: 100%;
  border-radius: 1px;
  background: var(--line);
}

.cell-operational { background: var(--operational); }
.cell-degraded { background: var(--degraded); }
.cell-outage { background: var(--outage); }
.cell-unknown { background: var(--line); }

.incident-list {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.incident-list li + li { margin-top: 24px; }

.incident-title {
  margin: 8px 0 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.when,
.empty,
.site-footer {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.empty { margin-top: 24px; }

.site-footer { padding-bottom: 4rem; }

@media (min-width: 768px) {
  .frame {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .intro { grid-column: span 7; }

  .bars { gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
