:root {
  color-scheme: light;
  --ink: #10231d;
  --muted: #5d6d67;
  --line: #d9e2de;
  --paper: #f5f8f6;
  --panel: #ffffff;
  --green: #0f7a52;
  --green-soft: #dff3e9;
  --red: #b64035;
  --red-soft: #f8e5e2;
  --amber: #9b6815;
  --amber-soft: #f8eed6;
  --navy: #173a50;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.site-header, main, footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 750; letter-spacing: -0.02em; }
.signal-mark { width: 24px; height: 24px; border-radius: 50%; background: var(--green); box-shadow: inset 0 0 0 7px var(--green-soft); }
.freshness { color: var(--muted); font-size: .9rem; text-align: right; }

main { padding-block: 48px 72px; }
.overview { display: grid; grid-template-columns: 1.18fr .82fr; gap: 48px; padding: clamp(28px, 5vw, 58px); background: var(--navy); color: white; border-radius: 28px; box-shadow: 0 28px 80px rgba(16,35,29,.12); }
.eyebrow { margin: 0 0 10px; color: #6f817a; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.overview .eyebrow { color: #9fbbc9; }
.status-line { display: flex; align-items: flex-start; gap: 14px; }
.status-line h1 { margin: 0; font-size: clamp(2rem, 5vw, 4.2rem); line-height: .99; letter-spacing: -.055em; max-width: 680px; }
.status-dot { width: 15px; height: 15px; margin-top: .55em; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 6px rgba(255,255,255,.08); }
.status-dot.healthy { background: #52d39b; }
.status-dot.degraded { background: #f5bf57; }
.status-dot.outage, .status-dot.stale { background: #ff7467; }
.status-dot.pending { background: #9fbbc9; }
.uptime { margin: 24px 0 0; font-size: clamp(1.15rem, 2.4vw, 1.55rem); font-weight: 680; color: #d7e8df; }
.intro { margin: 18px 0 0; max-width: 68ch; color: #b9ced6; }
.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-content: start; }
.metric { min-height: 126px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); background: rgba(255,255,255,.07); }
.metric span { color: #b9ced6; font-size: .86rem; }
.metric strong { font-size: clamp(1.2rem, 2.5vw, 1.9rem); line-height: 1.1; letter-spacing: -.03em; }

.section { margin-top: 58px; }
.section-heading { display: grid; grid-template-columns: 1fr minmax(280px, .7fr); align-items: end; gap: 32px; margin-bottom: 18px; }
h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.4rem); line-height: 1.08; letter-spacing: -.035em; }
.section-heading > p { margin: 0; color: var(--muted); }
.table-shell { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.checks-shell { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #edf3f0; color: #455a52; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #f9fbfa; }
td { font-size: .92rem; }
.checks-table { min-width: 980px; }
.loading, .empty { padding: 30px; text-align: center; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 7px; min-width: 62px; font-size: .76rem; font-weight: 750; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #9aa7a2; }
.pill.ok { color: var(--green); }
.pill.ok::before { background: var(--green); }
.pill.fail { color: var(--red); }
.pill.fail::before { background: var(--red); }
.pill.na { color: #7c8984; }
.latency { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; font-variant-numeric: tabular-nums; }
.incident-label { font-weight: 700; }
.duration { font-variant-numeric: tabular-nums; white-space: nowrap; }
.legend { display: flex; gap: 18px; margin: -2px 0 12px; color: var(--muted); font-size: .82rem; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.legend-ok { background: var(--green); }.legend-fail { background: var(--red); }.legend-na { background: #9aa7a2; }
.load-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; color: var(--muted); font-size: .85rem; }
button { border: 1px solid #bfcfc8; border-radius: 10px; background: white; color: var(--ink); padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
button:disabled { cursor: default; opacity: .5; }

.methodology { padding: clamp(26px, 5vw, 50px); border: 1px solid var(--line); border-radius: 24px; background: #ebf1ee; }
.method-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 28px; }
.method-grid article { padding: 20px; border-radius: 15px; background: white; }
.method-grid article > span { color: var(--green); font-size: .8rem; font-weight: 850; }
h3 { margin: 12px 0 6px; font-size: 1rem; }
.method-grid p { margin: 0; color: var(--muted); font-size: .9rem; }
.note { margin: 24px 0 0; color: var(--muted); font-size: .9rem; }
footer { display: flex; justify-content: space-between; gap: 24px; padding-block: 24px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }

@media (max-width: 820px) {
  .overview, .section-heading { grid-template-columns: 1fr; }
  .overview { gap: 32px; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 24px, 1180px); }
  .site-header { align-items: flex-start; padding-block: 18px; }
  .freshness { max-width: 150px; }
  main { padding-top: 22px; }
  .overview { padding: 25px 20px; border-radius: 20px; }
  .metric-grid, .method-grid { grid-template-columns: 1fr; }
  .metric { min-height: 98px; }
  .section { margin-top: 42px; }
  th, td { padding: 12px; }
  footer { flex-direction: column; }
}

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