/*
 * The status page (status.getmaximal.com), rendered by src/status-page/render.ts.
 * Same look as the marketing site: the light paper scheme, near-black ink,
 * hairlines, and the brand green as a highlight. Values mirror lib/brand.ts,
 * components/marketing/tokens.ts and the light palette in lib/theme.ts;
 * test/status-page.test.ts fails if they drift.
 */
:root {
  --ink: #141613;
  --sand: #f4f2ec;
  --paper: #fbfaf7;
  --mint: #72e3a3;
  --green-ink: #0b7a4b;
  --red-ink: #b3261e;
  --amber-ink: #8a5a00;
  --blue-ink: #2f5d8a;
  --muted: rgba(20, 22, 19, 0.64);
  --faint: rgba(20, 22, 19, 0.44);
  --line: rgba(20, 22, 19, 0.12);
  --none: rgba(20, 22, 19, 0.1);
  --font: 'Geist', 'Inter', system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.site-nav { position: sticky; top: 0; z-index: 10; background: var(--sand); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.15rem; letter-spacing: -0.03em; }
.wordmark:hover { text-decoration: none; }
.nav-link { font-size: 0.9rem; color: var(--muted); }
.nav-link:hover { color: var(--ink); }

main.container { padding-top: 88px; padding-bottom: 96px; }
@media (max-width: 600px) { main.container { padding-top: 56px; padding-bottom: 72px; } }

.eyebrow { margin: 0; font-size: 0.875rem; color: var(--muted); }
.headline {
  margin: 16px 0 0;
  max-width: 900px;
  font-weight: 500;
  font-size: 4rem;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
@media (max-width: 900px) { .headline { font-size: 2.5rem; } }
.lede { margin: 24px 0 0; max-width: 640px; color: var(--muted); font-size: 1.2rem; line-height: 1.6; }
@media (max-width: 900px) { .lede { font-size: 1.05rem; } }

.stale {
  margin: 24px 0 0;
  max-width: 640px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber-ink);
  border-radius: 6px;
  background: var(--paper);
  color: var(--amber-ink);
}
.stale[hidden] { display: none; }

section { margin-top: 80px; }
@media (max-width: 600px) { section { margin-top: 56px; } }
h2 { margin: 0 0 24px; font-weight: 500; font-size: 2.25rem; letter-spacing: -0.04em; line-height: 1.02; }
@media (max-width: 900px) { h2 { font-size: 1.75rem; } }
h3 { margin: 0; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.02em; }
.muted, .meta { color: var(--muted); }
.meta { margin: 6px 0 0; font-size: 0.875rem; }
.component-head p { margin: 4px 0 0; font-size: 0.95rem; }

.components { list-style: none; margin: 0; padding: 0; }
.component { border-top: 1px solid var(--line); padding: 24px 0; }
.component-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.s-operational { color: var(--green-ink); }
.s-degraded { color: var(--amber-ink); }
.s-outage { color: var(--red-ink); }
.s-maintenance { color: var(--blue-ink); }
.s-operational .dot { background: var(--mint); }

.bars { display: flex; gap: 2px; height: 32px; margin-top: 16px; }
.bar { flex: 1; min-width: 2px; border-radius: 2px; background: var(--none); }
.bar:hover { opacity: 0.7; }
.l-operational { background: var(--mint); }
.l-degraded { background: #e8b04a; }
.l-outage { background: var(--red-ink); }
.l-maintenance { background: #9cc0e4; }
.bars-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.8rem; color: var(--faint); }
.bars-legend .narrow { display: none; }
@media (max-width: 600px) {
  .bar:nth-child(-n+60) { display: none; }
  .bars-legend .wide { display: none; }
  .bars-legend .narrow { display: inline; }
}

.notice { border-top: 1px solid var(--line); padding: 24px 0; }
.notice header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.notice.tone-outage h3 { color: var(--red-ink); }
.updates { list-style: none; margin: 16px 0 0; padding: 0 0 0 16px; border-left: 1px solid var(--line); }
.updates li + li { margin-top: 16px; }
.updates p { margin: 0; line-height: 1.6; white-space: pre-line; }

.footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--faint);
}
.footer a:hover { color: var(--ink); }
