/* status.html — public service status. Self-contained: no fonts CDN, no app
   stylesheet, so it renders when those are what's failing. */
:root {
  --bg: #fcfbf8;
  --card: #ffffff;
  --text: #2a2822;
  --text-light: #6b665a;
  --border: #e6e1d6;
  --accent: #5b5bef;
  --ok: #2e7d4f;
  --ok-bg: #e3f0e4;
  --warn: #96690f;
  --warn-bg: #f6ecd2;
  --bad: #b3261e;
  --bad-bg: #f9e2df;
  --info: #3f4fb5;
  --info-bg: #e7e9fb;
  --muted: #8a8476;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17161b;
    --card: #201f26;
    --text: #ece9e2;
    --text-light: #b4afa4;
    --border: #34323c;
    --accent: #8f8cff;
    --ok: #7fd19b;
    --ok-bg: #1d3326;
    --warn: #f0c46b;
    --warn-bg: #3a2f17;
    --bad: #ff8a80;
    --bad-bg: #3d1f1d;
    --info: #a9b3ff;
    --info-bg: #252a4a;
    --muted: #8c877d;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17161b;
  --card: #201f26;
  --text: #ece9e2;
  --text-light: #b4afa4;
  --border: #34323c;
  --accent: #8f8cff;
  --ok: #7fd19b;
  --ok-bg: #1d3326;
  --warn: #f0c46b;
  --warn-bg: #3a2f17;
  --bad: #ff8a80;
  --bad-bg: #3d1f1d;
  --info: #a9b3ff;
  --info-bg: #252a4a;
  --muted: #8c877d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.st-wrap { max-width: 720px; margin: 0 auto; padding: 28px 16px 64px; }
.st-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.st-brand { font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.st-open { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 14px; }
.st-open:hover, .st-brand:hover { text-decoration: underline; }
.st-muted { color: var(--text-light); font-size: 14px; margin: 2px 0 0; }

.st-summary {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px 20px; margin-bottom: 18px;
}
.st-summary h1 { font-size: 20px; margin: 0; line-height: 1.3; }
.st-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); }
.st-summary[data-status="operational"] .st-dot { background: var(--ok); }
.st-summary[data-status="degraded"] .st-dot,
.st-summary[data-status="maintenance"] .st-dot { background: var(--warn); }
.st-summary[data-status="outage"] .st-dot { background: var(--bad); }

.st-notice {
  border-radius: 14px; padding: 14px 18px; margin-bottom: 18px;
  background: var(--info-bg); color: var(--text); border: 1px solid var(--border);
}
.st-notice[data-level="degraded"] { background: var(--warn-bg); }
.st-notice[data-level="outage"] { background: var(--bad-bg); }
.st-notice h2 { font-size: 15px; margin: 0 0 4px; }
.st-notice p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.st-notice .st-muted { margin-top: 6px; }

.st-section-h { font-size: 15px; margin: 26px 0 10px; color: var(--text-light); font-weight: 600; }
.st-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.st-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; }
.st-row + .st-row { border-top: 1px solid var(--border); }
.st-row-name { min-width: 0; overflow-wrap: anywhere; }
.st-row-state {
  flex: none; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
  background: var(--ok-bg); color: var(--ok);
}
.st-row[data-status="degraded"] .st-row-state,
.st-row[data-status="maintenance"] .st-row-state { background: var(--warn-bg); color: var(--warn); }
.st-row[data-status="down"] .st-row-state { background: var(--bad-bg); color: var(--bad); }
.st-row[data-status="off"] .st-row-state { background: transparent; color: var(--muted); font-weight: 500; }

.st-help p { color: var(--text-light); margin: 0 0 8px; }
.st-btn {
  margin-top: 6px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--accent); background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 14px; cursor: pointer;
}
.st-btn:hover { border-color: var(--accent); }
.st-btn:focus-visible, .st-open:focus-visible, .st-brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-btn:disabled { opacity: 0.6; cursor: default; }

@media (prefers-reduced-motion: no-preference) {
  .st-summary[data-status="checking"] .st-dot { animation: st-pulse 1.2s ease-in-out infinite; }
}
@keyframes st-pulse { 50% { opacity: 0.35; } }
