/* ==================================================================================================
   Public status pages. Standalone (does not load tokens.css: status pages carry the PRODUCT's brand,
   not Agent Pong's). OWNER: STATUS agent.
   Per page, <html style> sets: --accent, --accent-ink-l / -d (text-safe accent), --accent-fill-d,
   --on-accent / -d (text on an accent fill). Status colours mirror TONE_COLOR in src/lib/status-logic.ts.
   Principle: quiet when fine, loud when not.
   ================================================================================================== */

:root {
  --bg: #f6f6f7;
  --surface: #ffffff;
  --surface-2: #fafafb;
  --sunken: #f1f1f3;
  --line: #e5e5e8;
  --line-soft: #eeeef0;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #64646e;
  --faint: #6b6b76; /* >= 4.6:1 on every light surface (AA) */

  --accent-ink: var(--accent-ink-l, #3f3f46);
  --accent-fill: var(--accent, #52525b);
  --on-fill: var(--on-accent, #fff);

  --ok: #16a34a;
  --minor: #eab308;
  --major: #ea580c;
  --critical: #dc2626;
  --maint: #2563eb;
  --info: #0284c7;
  --neutral: #71717a;
  --nodata: #d4d4d8;
  --ok-ink: #15803d;
  --minor-ink: #a16207;
  --major-ink: #c2410c;
  --critical-ink: #b91c1c;
  --maint-ink: #1d4ed8;
  --info-ink: #0369a1;
  --neutral-ink: #52525b;
  --ok-bar: color-mix(in oklab, var(--ok) 58%, var(--surface));
  /* degraded / partial days are toned down so a short blip doesn't outshout the run of green; major stays full */
  --minor-bar: color-mix(in oklab, var(--minor) 75%, var(--surface));
  --major-bar: color-mix(in oklab, var(--major) 75%, var(--surface));
  --spark-fill: 13%;
  /* days without check data: hatched soft grey at full height, so the 90-day rhythm never breaks */
  --nodata-hatch: repeating-linear-gradient(135deg, color-mix(in oklab, var(--nodata) 75%, transparent) 0 1.5px, transparent 1.5px 4px);

  --shadow-sm: 0 1px 2px rgb(24 24 27 / 0.04);
  --shadow: 0 1px 2px rgb(24 24 27 / 0.04), 0 6px 20px -10px rgb(24 24 27 / 0.1);
  --shadow-lg: 0 2px 4px rgb(24 24 27 / 0.04), 0 18px 48px -12px rgb(24 24 27 / 0.22);
  --r-lg: 16px;
  --r: 12px;
  --r-sm: 8px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0d0f;
    --surface: #141417;
    --surface-2: #18181c;
    --sunken: #1d1d22;
    --line: #27272d;
    --line-soft: #202025;
    --ink: #f4f4f5;
    --ink-2: #d4d4d8;
    --muted: #a1a1aa;
    --faint: #8a8a94; /* >= 4.9:1 on every dark surface (AA) */
    --accent-ink: var(--accent-ink-d, #d4d4d8);
    --accent-fill: var(--accent-fill-d, #a1a1aa);
    --on-fill: var(--on-accent-d, #111114);
    --ok: #22c55e;
    --minor: #facc15;
    --major: #fb923c;
    --critical: #f87171;
    --maint: #60a5fa;
    --info: #38bdf8;
    --neutral: #9ca3af;
    --nodata: #4a4a52;
    --ok-ink: #4ade80;
    --minor-ink: #fde047;
    --major-ink: #fdba74;
    --critical-ink: #fca5a5;
    --maint-ink: #93c5fd;
    --info-ink: #7dd3fc;
    --neutral-ink: #a1a1aa;
    --ok-bar: color-mix(in oklab, var(--ok) 70%, var(--surface));
    --spark-fill: 8%;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.4), 0 24px 56px -16px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0d0f;
  --surface: #141417;
  --surface-2: #18181c;
  --sunken: #1d1d22;
  --line: #27272d;
  --line-soft: #202025;
  --ink: #f4f4f5;
  --ink-2: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #8a8a94; /* >= 4.9:1 on every dark surface (AA) */
  --accent-ink: var(--accent-ink-d, #d4d4d8);
  --accent-fill: var(--accent-fill-d, #a1a1aa);
  --on-fill: var(--on-accent-d, #111114);
  --ok: #22c55e;
  --minor: #facc15;
  --major: #fb923c;
  --critical: #f87171;
  --maint: #60a5fa;
  --info: #38bdf8;
  --neutral: #9ca3af;
  --nodata: #4a4a52;
  --ok-ink: #4ade80;
  --minor-ink: #fde047;
  --major-ink: #fdba74;
  --critical-ink: #fca5a5;
  --maint-ink: #93c5fd;
  --info-ink: #7dd3fc;
  --neutral-ink: #a1a1aa;
  --ok-bar: color-mix(in oklab, var(--ok) 70%, var(--surface));
  --spark-fill: 8%;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.4), 0 24px 56px -16px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

/* ---------- tones ---------- */
.tone-ok { --tone: var(--ok); --tone-ink: var(--ok-ink); }
.tone-minor { --tone: var(--minor); --tone-ink: var(--minor-ink); }
.tone-major { --tone: var(--major); --tone-ink: var(--major-ink); }
.tone-critical { --tone: var(--critical); --tone-ink: var(--critical-ink); }
.tone-maint { --tone: var(--maint); --tone-ink: var(--maint-ink); }
.tone-info { --tone: var(--info); --tone-ink: var(--info-ink); }
.tone-neutral, .tone-nodata { --tone: var(--neutral); --tone-ink: var(--neutral-ink); }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body.sp {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in oklab, var(--accent-fill) 24%, transparent); }
/* Times and ranges read as text (sans, tabular figures); mono is kept for figures such as uptime and latency. */
time { font-variant-numeric: tabular-nums; }
.mono, .num { font-family: var(--mono); font-size: 0.92em; letter-spacing: -0.01em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100; padding: 8px 14px; border-radius: 999px;
  background: var(--ink); color: var(--surface); font-size: 14px; transition: top 0.15s var(--ease);
}
.skip:focus { top: 12px; }
.muted { color: var(--muted); }

.wrap { width: min(100% - 32px, 768px); margin-inline: auto; }
.main { flex: 1; padding: 28px 0 72px; }

/* ---------- icons ---------- */
.ic { flex: none; color: var(--tone); }
.ic .ic-ring { fill: color-mix(in oklab, var(--tone) 14%, transparent); stroke: none; }
.ic.tone-ok .ic-ring { fill: var(--tone); }
.ic.tone-ok { color: var(--ok); }
.ic.tone-ok path { stroke: var(--surface); }
.chev { flex: none; transition: transform 0.2s var(--ease); }

/* ---------- header ---------- */
.hd { border-bottom: 1px solid var(--line-soft); background: color-mix(in oklab, var(--surface) 55%, var(--bg)); }
.hd-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; min-width: 0; border-radius: 8px; }
.logo { height: 28px; width: auto; max-width: min(200px, 46vw); object-fit: contain; object-position: left center; }
.logo-dark, .logo-fallback-dark { display: none; }
.brand-text { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.mark { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; flex: none; }
.mark-mono {
  display: inline-grid; place-items: center; background: var(--accent-fill); color: var(--on-fill);
  font-weight: 700; font-size: 15px;
}
.wordmark { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
  :root:not([data-theme="light"]) .logo-fallback-dark { display: inline-flex; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
:root[data-theme="dark"] .logo-fallback-dark { display: inline-flex; }

.hd-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.hd-link {
  padding: 6px 10px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500;
  transition: color 0.15s, background-color 0.15s;
}
.hd-link:hover { color: var(--ink); background: var(--sunken); }

.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 550;
  cursor: pointer; user-select: none; white-space: nowrap; transition: background-color 0.15s, border-color 0.15s, transform 0.15s var(--ease);
}
.btn:hover { border-color: color-mix(in oklab, var(--ink) 22%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-fill); border-color: transparent; color: var(--on-fill); margin-left: 6px; }
.btn-primary:hover { background: color-mix(in oklab, var(--accent-fill) 88%, var(--ink)); border-color: transparent; }

/* ---------- subscribe popover (works as <details> without JS) ---------- */
.sub { position: relative; }
.sub > summary { list-style: none; }
.sub > summary::-webkit-details-marker { display: none; }
.pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 380px; max-width: calc(100vw - 32px);
  padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); transform-origin: top right;
}
.sub[open] .pop { animation: pop-in 0.18s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.pop-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: -4px -6px 0 0; }
.pop-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.pop-close {
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
}
.pop-close:hover { background: var(--sunken); color: var(--ink); }
.sub-row { margin-top: 16px; }
.sub-row + .sub-row { padding-top: 16px; border-top: 1px solid var(--line-soft); }
.sub-row-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sub-row label { font-size: 14px; font-weight: 600; }
.sub-open { font-size: 13px; color: var(--accent-ink); font-weight: 500; }
.sub-open:hover { text-decoration: underline; text-underline-offset: 3px; }
.sub-hint { margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.copy { display: flex; gap: 6px; margin-top: 8px; }
.copy input, .copy textarea {
  flex: 1; min-width: 0; padding: 7px 10px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--sunken); color: var(--ink-2); font: 12px/1.5 var(--mono); resize: none;
}
.copy textarea { white-space: pre-wrap; word-break: break-all; field-sizing: content; min-height: 0; }
/* long URLs: keep the end (the part that differs: /feed.atom, /status.json) visible when they don't fit */
.copy input { direction: rtl; text-align: left; }
.copy input:focus { direction: ltr; }
.copy-btn {
  flex: none; align-self: flex-start; height: 32px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line);
  background: var(--surface); font-size: 13px; font-weight: 550; cursor: pointer;
}
.copy-btn:hover { border-color: color-mix(in oklab, var(--ink) 22%, var(--line)); }
.pop-links { display: none; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 14px; font-weight: 550; }
.pop-links a { color: var(--accent-ink); }
.pop-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.copy-btn.is-done { color: var(--ok-ink); border-color: color-mix(in oklab, var(--ok) 40%, var(--line)); }

/* ---------- hero ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 18px;
  padding: 24px 26px 24px 34px; border-radius: var(--r-lg); overflow: hidden;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in oklab, var(--tone) 11%, transparent), transparent 62%),
    var(--surface);
  border: 1px solid color-mix(in oklab, var(--tone) 20%, var(--line));
  box-shadow: var(--shadow);
}
.hero-glyph { position: relative; display: grid; place-items: center; width: 52px; height: 52px; }
.hero-glyph .ic { width: 52px; height: 52px; position: relative; z-index: 1; }
.hero-glyph .ic path { stroke-width: 1.6; }
.hero-ring {
  position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--tone); opacity: 0;
}
.hero.is-calm .hero-ring { animation: sonar 1.6s var(--ease) 0.25s 1; }
/* a few calm pulses, then still: it signals "live", it is not an alarm */
.hero.is-live .hero-ring { animation: sonar 2.4s var(--ease) 0.25s 3; }
@keyframes sonar { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(1.4); opacity: 0; } }
.hero-title { font-size: clamp(21px, 2.2vw + 12px, 27px); line-height: 1.2; font-weight: 640; letter-spacing: -0.024em; text-wrap: balance; }
.hero-sub { margin-top: 3px; color: var(--muted); font-size: 15px; }
.hero-meta { align-self: center; color: var(--muted); font-size: 13px; white-space: nowrap; }
.hero-meta time { color: var(--ink-2); font-family: var(--font); font-size: 1em; letter-spacing: 0; }
.page-desc { margin: 0 2px 16px; max-width: 64ch; color: var(--muted); font-size: 13.5px; line-height: 1.6; text-wrap: pretty; }

/* ---------- sections ---------- */
.sec { margin-top: 44px; }
.sec-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 12px; min-height: 30px; }
.sec-title { font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }
.sec-link { display: inline-flex; align-items: center; gap: 2px; color: var(--accent-ink); font-size: 14px; font-weight: 500; }
.sec-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.empty { padding: 28px 20px; color: var(--muted); text-align: center; font-size: 14px; }
.stack { display: grid; gap: 12px; }

/* ---------- pills + chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 24px; padding: 0 10px; border-radius: 999px;
  background: color-mix(in oklab, var(--tone) 12%, var(--surface)); color: var(--tone-ink);
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 8px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--ink-2);
}
.chip-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--tone); }

/* ---------- active incident + maintenance cards ---------- */
.inc { position: relative; padding: 18px 20px 18px 26px; }
.inc::before {
  content: ""; position: absolute; left: 10px; top: 16px; bottom: 16px; width: 4px; border-radius: 4px; background: var(--tone);
}
.inc-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.inc-title { font-size: 16.5px; line-height: 1.35; font-weight: 620; letter-spacing: -0.012em; }
.inc-title a:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.inc-window { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.range { font-variant-numeric: tabular-nums; }
.countdown {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--sunken);
  color: var(--ink-2); font-size: 12.5px; font-weight: 550;
}
.inc-latest { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.inc-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; margin-top: 8px; color: var(--muted); font-size: 13px; }
.inc-meta > * + *::before { content: "·"; margin: 0 8px; color: var(--faint); }
.inc-meta > span:first-child { color: var(--ink-2); font-weight: 550; }
.inc-age { color: var(--muted); }
.inc-more { margin-top: 12px; }
.inc-more > summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; color: var(--accent-ink);
  font-size: 14px; font-weight: 550; border-radius: 6px;
}
.inc-more > summary::-webkit-details-marker { display: none; }
.inc-more > summary .muted { font-weight: 400; }
.inc-more > summary .chev { transform: rotate(-90deg); }
.inc-more[open] > summary .chev { transform: none; }
.inc-more .tl { margin-top: 14px; }
/* the expanded timeline already starts with the latest update: don't show it twice */
.inc:has(.inc-more[open]) .inc-latest { display: none; }
.inc:has(.inc-more[open]) .inc-more { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }

/* ---------- markdown-lite ---------- */
.md { color: var(--ink-2); font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.md p + p, .md p + ul, .md ul + p { margin-top: 0.6em; }
.md ul { margin: 0.4em 0 0; padding-left: 1.2em; }
.md li + li { margin-top: 0.2em; }
.md strong { color: var(--ink); font-weight: 620; }
.md a { color: var(--accent-ink); text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--accent-ink) 35%, transparent); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: currentColor; }
.md code { font: 0.86em var(--mono); padding: 0.12em 0.4em; border-radius: 5px; background: var(--sunken); color: var(--ink); }

/* ---------- timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl-i { position: relative; padding: 0 0 20px 24px; }
.tl-i:last-child { padding-bottom: 0; }
.tl-i::before { content: ""; position: absolute; left: 4px; top: 16px; bottom: -2px; width: 1px; background: var(--line); }
.tl-i:last-child::before { display: none; }
.tl-dot {
  position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--tone);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--tone) 16%, var(--surface));
}
.tl-hd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.tl-status { font-size: 14px; font-weight: 620; color: var(--tone-ink); }
.tl-hd time { color: var(--muted); font-size: 12.5px; }
.tl-body { margin-top: 4px; }

/* ---------- components + 90-day bars ---------- */
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; color: var(--muted); font-size: 12.5px; }
.lg { width: 8px; height: 8px; border-radius: 2px; margin-left: 8px; }
.lg:first-child { margin-left: 0; }
.lg-ok { background: var(--ok-bar); }
.lg-minor { background: var(--minor-bar); }
.lg-major { background: var(--major-bar); }
.lg-critical { background: var(--critical); }
.lg-maint { background: var(--maint); }
.lg-nodata { background: var(--nodata-hatch), color-mix(in oklab, var(--nodata) 40%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--nodata) 90%, transparent); }

.cmps { overflow: visible; }
.cmp { padding: 18px 20px 16px; }
.cmp + .cmp, .grp + .cmp, .cmp + .grp, .grp + .grp { border-top: 1px solid var(--line-soft); }
.cmp-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; }
.cmp-name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font-size: 15px; font-weight: 580; letter-spacing: -0.008em; }
.cmp-status { display: inline-flex; align-items: center; gap: 7px; flex: none; color: var(--tone-ink); font-size: 14px; font-weight: 550; }
.cmp.tone-ok .cmp-status { color: var(--muted); font-weight: 500; }

.info-wrap { position: relative; display: inline-flex; }
.info {
  display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--faint); cursor: help;
}
.info:hover, .info:focus-visible { color: var(--ink-2); background: var(--sunken); }
.info-tip {
  position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 30; width: max-content; max-width: 260px;
  padding: 8px 11px; border-radius: 9px; background: var(--ink); color: var(--surface); font-size: 13px; font-weight: 450;
  line-height: 1.45; letter-spacing: 0; box-shadow: var(--shadow-lg); pointer-events: none;
  opacity: 0; visibility: hidden; transform: translate(-50%, 3px); transition: opacity 0.15s, transform 0.15s var(--ease), visibility 0.15s;
}
.info:hover + .info-tip, .info:focus-visible + .info-tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

.bars { display: flex; align-items: center; gap: 2px; height: 34px; margin-top: 12px; }
.bars:focus-within { outline: none; }
.b {
  flex: 1 1 0; min-width: 0; height: 100%; border-radius: 3px; background: var(--ok-bar);
  transition: opacity 0.14s, transform 0.14s var(--ease), background-color 0.14s;
}
.b.s-minor { background: var(--minor-bar); }
.b.s-major { background: var(--major-bar); }
.b.s-critical { background: var(--critical); }
.b.s-maint { background: var(--maint); }
.b.s-nodata { background: var(--nodata-hatch), color-mix(in oklab, var(--nodata) 40%, var(--surface)); }
/* days before the page's history begins: a quiet baseline, not "no data" bars (not focusable, no tooltip) */
.b-pre { flex: 1 1 0; min-width: 0; height: 2px; border-radius: 1px; background: var(--line); }
@media (hover: hover) {
  .bars:hover .b { opacity: 0.42; }
  .bars:hover .b:hover { opacity: 1; transform: scaleY(1.08); }
}
.bars.is-nav .b { opacity: 0.42; }
.bars .b.is-active { opacity: 1; transform: scaleY(1.08); outline: none; }
.bars .b:focus-visible { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-ink); border-radius: 3px; }
.cmp-ft { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--faint); font-size: 12px; }
.cmp-ft-rule { flex: 1; height: 1px; background: var(--line-soft); }
.cmp-ft-up { color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
.cmp-ft-up.is-collecting { font-family: var(--font); font-size: 12px; }
.d30, .u30 { display: none; }

/* groups */
.grp > summary { list-style: none; }
.grp > summary::-webkit-details-marker { display: none; }
.grp-hd { display: flex; align-items: center; gap: 8px; padding: 15px 20px; cursor: pointer; border-radius: var(--r-lg); }
.grp-hd .chev { color: var(--faint); transform: rotate(-90deg); }
.grp[open] > .grp-hd .chev { transform: none; }
.grp-name { font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }
.grp-count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--sunken); color: var(--muted); font-size: 12px; font-weight: 550;
}
.grp-status { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: var(--tone-ink); font-size: 14px; font-weight: 550; }
.grp-status:has(.tone-ok) { color: var(--muted); font-weight: 500; }
.grp[open] .grp-status { opacity: 0; visibility: hidden; transition: opacity 0.15s; }
.grp-body { border-top: 1px solid var(--line-soft); }
.grp-body .cmp { padding-left: 44px; }
.grp-body .cmp + .cmp { border-top: 1px solid var(--line-soft); }

/* bar tooltip (built by status.js) */
.bt {
  position: absolute; z-index: 70; min-width: 280px; width: max-content; max-width: min(340px, calc(100vw - 32px));
  padding: 12px 14px 13px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); font-size: 13px;
  opacity: 0; transform: translateY(4px); transition: opacity 0.12s, transform 0.12s var(--ease); pointer-events: none;
}
.bt.is-open { opacity: 1; transform: none; pointer-events: auto; }
.bt::after {
  content: ""; position: absolute; left: var(--arrow, 50%); bottom: -6px; width: 10px; height: 10px; margin-left: -5px;
  background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg);
}
.bt.is-below::after { bottom: auto; top: -6px; transform: rotate(225deg); }
.bt-date { font-weight: 620; color: var(--ink); }
.bt-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; color: var(--muted); white-space: nowrap; }
.bt-up { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.bt-st { display: inline-flex; align-items: center; gap: 6px; color: var(--tone-ink); font-weight: 550; }
.bt-st::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: var(--tone); }
.bt-list { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line-soft); display: grid; gap: 6px; }
.bt-list a { display: flex; align-items: flex-start; gap: 8px; color: var(--ink); line-height: 1.4; border-radius: 4px; }
.bt-list a:hover span { text-decoration: underline; text-underline-offset: 3px; }
.bt-list i { flex: none; width: 7px; height: 7px; margin-top: 5px; border-radius: 2px; background: var(--tone); }
.bt-none { margin-top: 8px; color: var(--muted); }

/* ---------- response time ---------- */
.rng-input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line-soft); }
.seg label { padding: 3px 12px; border-radius: 999px; color: var(--muted); font-size: 13px; font-weight: 550; cursor: pointer; transition: color 0.15s, background-color 0.15s, box-shadow 0.15s; }
.seg label:hover { color: var(--ink); }
#rng-24:checked ~ .sec-hd label[for="rng-24"], #rng-7d:checked ~ .sec-hd label[for="rng-7d"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
#rng-24:focus-visible ~ .sec-hd label[for="rng-24"], #rng-7d:focus-visible ~ .sec-hd label[for="rng-7d"] { outline: 2px solid var(--accent-ink); outline-offset: 1px; }
#rng-24:checked ~ .metrics-grid .r7d, #rng-7d:checked ~ .metrics-grid .r24,
#rng-24:checked ~ .sec-hd .r7d, #rng-7d:checked ~ .sec-hd .r24 { display: none; }
.metrics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; }
.metric { margin: 0; padding: 18px 20px 14px; min-width: 0; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.metric:nth-child(-n + 2) { border-top: 0; }
.metric:nth-child(odd) { border-left: 0; }
.metric:only-child { grid-column: 1 / -1; }
.metric-hd { position: relative; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.metric-name { font-size: 14px; font-weight: 580; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-num { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--ink); }
.metric-u { margin-left: 3px; font-family: var(--font); font-size: 11px; font-weight: 450; color: var(--muted); }
.metric-unit { color: var(--faint); font-size: 12px; }
.metric-read { position: absolute; right: 0; top: 0; font-family: var(--mono); font-size: 12.5px; color: var(--ink); background: var(--surface); padding-left: 8px; display: none; white-space: nowrap; }
.metric.is-reading .metric-read { display: block; }
.metric.is-reading .metric-val { visibility: hidden; }
/* the scale labels live in a right-hand gutter so they never sit on top of the line */
.spark { position: relative; height: 56px; margin-top: 14px; padding-right: 44px; }
.spark svg { width: 100%; height: 100%; overflow: visible; }
.spark-line { fill: none; stroke: var(--accent-fill); stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: color-mix(in oklab, var(--accent-fill) var(--spark-fill), transparent); stroke: none; }
.spark-grid { stroke: var(--line); stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.metrics-scale { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
.spark-base { stroke: var(--line); vector-effect: non-scaling-stroke; }
.spark-max, .spark-mid { position: absolute; right: 0; width: 40px; font-family: var(--mono); font-size: 10px; color: var(--faint); line-height: 1; white-space: nowrap; }
.spark-max { top: 2px; }
.spark-mid { top: calc(54.2% - 5px); }
.spark-cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); pointer-events: none; }
.spark-dot { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; background: var(--accent-fill); box-shadow: 0 0 0 3px var(--surface); pointer-events: none; }
.metric-axis { display: flex; justify-content: space-between; margin-top: 6px; padding-right: 44px; color: var(--faint); font-size: 11.5px; }

/* ---------- how we monitor (public health checks) ---------- */
.hero-checks { margin-top: 8px; font-size: 13.5px; }
.hero-checks a {
  display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-weight: 520;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color 0.15s;
}
.hero-checks a:hover { text-decoration-color: var(--line); }
.hero-checks svg { color: var(--accent-ink); }
.sec-aside { margin-left: auto; color: var(--muted); font-size: 13px; text-align: right; }

.chks { overflow: hidden; }
.chks-intro { padding: 18px 20px 18px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); }
.chks-lead { max-width: 66ch; color: var(--ink-2); font-size: 14px; line-height: 1.6; text-wrap: pretty; }
.chks-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.chks-facts li {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 12.5px; font-weight: 520;
}
.chks-facts svg { color: var(--accent-ink); }

.chk-c + .chk-c { border-top: 1px solid var(--line-soft); }
.chk-c > summary { list-style: none; }
.chk-c > summary::-webkit-details-marker { display: none; }
.chk-c-hd { display: flex; align-items: center; gap: 8px; padding: 15px 20px; cursor: pointer; }
.chk-c-hd:hover .chk-c-name { color: var(--ink); }
.chk-c-hd .chev { color: var(--faint); transform: rotate(-90deg); }
.chk-c[open] > .chk-c-hd .chev { transform: none; }
.chk-c-name { font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }
.chk-c-sum { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: var(--tone-ink); font-size: 13.5px; font-weight: 550; }
.chk-c-sum.tone-ok, .chk-c-sum.tone-neutral, .chk-c-sum.tone-nodata { color: var(--muted); font-weight: 500; }
.chk-c-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone); }
.chk-c-sum.tone-ok .chk-c-dot { box-shadow: 0 0 0 3px color-mix(in oklab, var(--ok) 16%, transparent); }
.chk-c[open] .chk-list { animation: chk-in 0.2s var(--ease); }
@keyframes chk-in { from { opacity: 0; transform: translateY(-3px); } }
.chk-none { padding: 0 20px 18px 44px; color: var(--muted); font-size: 13.5px; }

.chk {
  display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 18px 28px;
  margin: 0 20px 0 44px; padding: 15px 0 16px; border-top: 1px dashed var(--line);
}
.chk-list > .chk:last-child { margin-bottom: 4px; }
.chk-name { font-size: 14.5px; font-weight: 600; letter-spacing: -0.006em; line-height: 1.35; }
.chk-desc { margin-top: 8px; max-width: 64ch; color: var(--muted); font-size: 13.5px; line-height: 1.55; text-wrap: pretty; }
.chk-expects { display: flex; align-items: flex-start; gap: 7px; margin-top: 10px; color: var(--ink-2); font-size: 13.5px; font-weight: 520; line-height: 1.45; }
.chk-expects svg { flex: none; margin-top: 2px; color: var(--ok-ink); }
.chk-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 9px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 12.5px; }
.chk-facts li { display: inline-flex; align-items: center; gap: 6px; }
.chk-facts svg { flex: none; color: var(--faint); }
.chk-stats dt { color: var(--faint); font-size: 11.5px; font-weight: 550; letter-spacing: 0.01em; }

.chk-side { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.chk-res { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 580; color: var(--tone-ink); }
.chk.tone-ok .chk-res { color: var(--ink-2); }
.chk-res-l { min-width: 0; }
.chk-lat { margin-left: auto; font-family: var(--mono); font-size: 12.5px; font-weight: 500; color: var(--ink); }
.rs svg { width: 100%; height: 28px; overflow: visible; }
.rs rect { transition: opacity 0.12s; }
.rs-pass { fill: var(--ok-bar); }
.rs-slow { fill: var(--minor); }
.rs-fail { fill: var(--critical); }
.rs-empty { fill: var(--line); }
/* a failure the confirmation re-check cleared: never counted against uptime, so an outline, not a red bar */
.rs-blip { fill: none; stroke: var(--minor); stroke-width: 1.5; }
@media (hover: hover) {
  .rs svg:hover rect:not(.rs-empty) { opacity: 0.45; }
  .rs svg:hover rect:hover { opacity: 1; }
}
.rs-cap { margin-top: 5px; color: var(--faint); font-size: 11.5px; }
.rs-cap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 10px; }
.rs-limit { display: inline-flex; align-items: center; gap: 4px; }
.rs-limit svg { flex: none; width: 12px; height: 12px; }
.rs-cap.rs-cap-blip { margin-top: 2px; color: var(--minor-ink); }
.chk-why { margin-top: -4px; color: var(--tone-ink); font-size: 12.5px; font-weight: 520; line-height: 1.4; }
.chk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0; }
.chk-stats dd { margin: 2px 0 0; color: var(--ink-2); font-size: 12.5px; }
.chk-stats dd time { font-family: var(--font); }
.chk-stats .num { font-size: 12px; }

/* ---------- past incidents ---------- */
.days { display: grid; gap: 0; }
.day { padding: 16px 2px; border-top: 1px solid var(--line-soft); }
.day:first-child { border-top: 0; padding-top: 4px; }
.day-title { font-size: 14px; font-weight: 600; color: var(--ink); letter-spacing: -0.005em; }
.day.is-quiet .day-title { color: var(--ink-2); font-weight: 550; }
.day-none { margin-top: 4px; color: var(--muted); font-size: 14px; }
.day.is-quiet { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 2px; }
.day.is-quiet:first-child { padding-top: 4px; }
.day.is-quiet .day-none { margin: 0; font-size: 13.5px; color: var(--faint); white-space: nowrap; }
.pi { margin-top: 12px; }
.pi-title { display: flex; align-items: baseline; gap: 10px; font-size: 15px; font-weight: 600; letter-spacing: -0.008em; line-height: 1.4; }
.pi-title a:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.pi-mark { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--tone); transform: translateY(-1px); }
.pi-body { margin: 4px 0 0 18px; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pi-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; margin: 6px 0 0 18px; color: var(--muted); font-size: 12.5px; }
.pi-meta > * + *::before, .hist-meta > * + *::before { content: "·"; margin: 0 8px; color: var(--faint); }
.pi-state { color: var(--tone-ink); font-weight: 600; }
.pi-comps { color: var(--muted); }

/* ---------- permalink ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 22px -4px; padding: 4px 8px 4px 4px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500; }
.back:hover { color: var(--ink); background: var(--sunken); }
.detail-hd { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.detail-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-title { margin-top: 14px; font-size: clamp(23px, 2.4vw + 13px, 30px); line-height: 1.2; font-weight: 650; letter-spacing: -0.026em; text-wrap: balance; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px 24px; margin: 22px 0 0; }
.facts dt { color: var(--muted); font-size: 12.5px; }
.facts dd { margin: 2px 0 0; font-size: 14px; color: var(--ink); }
.detail-aff { margin-top: 20px; }
.detail-label { color: var(--muted); font-size: 12.5px; }
.detail-aff .chips { margin-top: 8px; }
.detail-also { margin-top: 14px; font-size: 13.5px; }
.detail-sec { margin-top: 32px; }
.detail-sec > .sec-title { margin-bottom: 16px; }
.postmortem { padding: 22px 24px; }

/* ---------- history ---------- */
.page-title { font-size: clamp(23px, 2.4vw + 13px, 30px); line-height: 1.2; font-weight: 650; letter-spacing: -0.026em; }
.month { margin-top: 32px; }
.month-title { margin: 0 2px 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.hist-i { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; align-items: start; gap: 14px; padding: 16px 18px; }
.hist-i + .hist-i { border-top: 1px solid var(--line-soft); }
.hist-mark { align-self: stretch; border-radius: 4px; background: var(--tone); }
.hist-title { font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: -0.008em; }
.hist-title a:hover { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.hist-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0; margin-top: 4px; color: var(--muted); font-size: 13px; }
.hist-comps { margin-top: 2px; color: var(--muted); font-size: 13px; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-top: 28px; }
.pager > :last-child { justify-self: end; }
.pager-n { color: var(--muted); font-size: 13px; }

/* ---------- not found ---------- */
.nf { display: grid; justify-items: start; gap: 12px; padding: 72px 4px; }
.nf-code { font-family: var(--mono); color: var(--faint); font-size: 14px; }
.nf .btn { margin: 8px 0 0; }

/* ---------- footer ---------- */
.ft { border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 13px; }
.ft-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 26px 0 40px; }
.ft-left, .ft-right, .ft-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.ft a:hover { color: var(--ink); }
.powered { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 550; }
.powered-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 3px var(--sunken); }
.theme { display: inline-flex; padding: 2px; border-radius: 999px; border: 1px solid var(--line); }
.theme button { padding: 2px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.theme button[aria-checked="true"] { background: var(--sunken); color: var(--ink); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .main { padding-top: 18px; }
  .hd-in { min-height: 60px; }
  .hd-website { display: none; }
  .hd-link { padding: 6px 8px; }
  .logo { max-width: 34vw; }
  .wordmark { max-width: 34vw; }
  .pop-links { display: flex; }
  .metrics-scale { display: none; }
  /* wrapped meta lines would start with a stray "·": use plain gaps on phones */
  .inc-meta > * + *::before, .pi-meta > * + *::before, .hist-meta > * + *::before { content: none; }
  .inc-meta, .pi-meta, .hist-meta { column-gap: 12px; }
  .pop { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; max-width: none; max-height: calc(100vh - 80px); overflow: auto; }
  .hero { grid-template-columns: auto 1fr; padding: 20px 18px; gap: 4px 14px; }
  .hero-glyph, .hero-glyph .ic { width: 44px; height: 44px; }
  .hero-meta { grid-column: 1 / -1; margin-top: 12px; padding-top: 12px; border-top: 1px solid color-mix(in oklab, var(--tone) 14%, var(--line-soft)); }
  .sec { margin-top: 36px; }
  .legend { display: none; }
  .cmp { padding: 16px 16px 14px; }
  .grp-hd { padding: 14px 16px; }
  .grp-body .cmp { padding-left: 16px; }
  .cmp-status { font-size: 13.5px; }
  .b:nth-child(-n + 60) { display: none; }
  .bars { gap: 3px; }
  .d90, .u90 { display: none; }
  .d30, .u30 { display: inline; }
  .inc { padding: 16px 16px 16px 24px; }
  .inc::before { left: 9px; }
  .inc-hd { flex-direction: column; gap: 8px; }
  .metrics-grid { grid-template-columns: minmax(0, 1fr); }
  .metric, .metric:nth-child(-n + 2) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .metric:first-child { border-top: 0; }
  .metric { padding: 16px 16px 12px; }
  .spark { height: 52px; }
  .ft-left { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ft-links { gap: 8px 16px; }
  .ft-right { gap: 10px 16px; }
  /* light backdrop behind the subscribe sheet */
  .sub[open]::before { content: ""; position: fixed; inset: 0; z-index: 55; background: rgb(0 0 0 / 0.18); }
  .sec-aside { display: none; }
  .chks-intro { padding: 16px; }
  .chk-c-hd { padding: 14px 16px; }
  .chk { grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0 16px; padding: 14px 0 16px; }
  .chk-facts { flex-direction: column; gap: 5px; }
  .chk-none { padding: 0 16px 16px; }
  .chk-side { padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-soft); }
  .hist-i { grid-template-columns: 4px minmax(0, 1fr); padding: 14px 16px; }
  .hist-i .pill { grid-column: 2; justify-self: start; }
  .postmortem { padding: 18px; }
}
@media (max-width: 380px) {
  .wordmark { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
  .hd-nav, .ft .theme, .skip { display: none !important; }
  body.sp { background: #fff; }
}
