/* Public status page — self-contained, no external assets.
 * Light/dark follow the operating system, typography follows the blog. */

:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1b1d21;
  --muted: #5d646e;
  --line: #d9dee5;
  --accent: #0a6b8a;
  --ok: #1a7f4b;
  --warn: #9a6b00;
  --bad: #b3261e;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .05);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151a;
    --panel: #191d24;
    --ink: #e8eaee;
    --muted: #9aa3b0;
    --line: #2a3038;
    --accent: #4cc2ff;
    --ok: #56d38b;
    --warn: #e2b341;
    --bad: #ff6b60;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 62rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.hero { margin-bottom: 2rem; }
.eyebrow {
  margin: 0 0 .25rem;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
h1 { margin: 0 0 .5rem; font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 600; letter-spacing: -.01em; }
h2 { margin: 0 0 .9rem; font-size: 1rem; font-weight: 600; }
.lede { margin: 0 0 1rem; max-width: 46rem; color: var(--muted); }
.stamp { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0; }
.muted { color: var(--muted); font-size: .875rem; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: .85rem;
  font-weight: 600;
}
.pill::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--muted);
}
.pill[data-state="ok"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.pill[data-state="ok"]::before { background: var(--ok); }
.pill[data-state="warn"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.pill[data-state="warn"]::before { background: var(--warn); }
.pill[data-state="bad"] { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); }
.pill[data-state="bad"]::before { background: var(--bad); }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-bottom: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
}
.grid .card { margin-bottom: 0; }

.triple { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: 0; }
.triple div { min-width: 0; }
.triple dt { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.triple dd { margin: .2rem 0 0; font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: .4rem; }

.hint { margin: .85rem 0 0; color: var(--muted); font-size: .8rem; }

.services { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.services li {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) auto auto;
  gap: .75rem;
  align-items: baseline;
  padding: .5rem .25rem;
  border-bottom: 1px solid var(--line);
}
.services li:last-child { border-bottom: 0; }
.services .dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--muted); align-self: center; }
.services .dot[data-state="ok"] { background: var(--ok); }
.services .dot[data-state="warn"] { background: var(--warn); }
.services .dot[data-state="bad"] { background: var(--bad); }
.services .name { font-weight: 600; }
.services .detail { color: var(--muted); font-size: .8rem; }
.services .ms { font-variant-numeric: tabular-nums; font-size: .9rem; }
.services .loading { color: var(--muted); display: block; border: 0; }

.spark { width: 100%; height: 120px; }
.spark svg { width: 100%; height: 100%; display: block; }
.spark .area { fill: color-mix(in srgb, var(--accent) 16%, transparent); }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark .axis { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }

.badge-row { display: flex; align-items: baseline; gap: .35rem; margin: .2rem 0 0; }
.score { font-size: 2.2rem; font-weight: 700; color: var(--ok); font-variant-numeric: tabular-nums; }

footer { margin-top: 2rem; color: var(--muted); font-size: .85rem; }
footer p { margin: 0 0 .6rem; max-width: 46rem; }

@media (max-width: 30rem) {
  .triple { grid-template-columns: 1fr 1fr; }
  .services li { grid-template-columns: 1.2rem minmax(0, 1fr) auto; }
  .services .detail { display: none; }
}
