/* Recursys status page. Same tokens as the marketing site (site.css), light and
   restrained. No inline styles anywhere: the page's CSP allows 'self' only. */
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/geist-var-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/assets/fonts/geist-mono-var-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --ink: #161b26;
  --ink-soft: #4a5261;
  --muted: #666c78;
  --line: #e6e3dd;
  --line-soft: #efede8;
  --paper: #f4f3f0;
  --surface: #ffffff;
  --blue: #1f4fa0;
  --good: #17804a;
  --good-soft: #e6f4ec;
  --warn: #855000;
  --warn-soft: #fbf1da;
  --warn-bar: #d08a1c;
  --bad: #a51f14;
  --bad-soft: #fdecea;
  --idle: #666c78;
  --idle-soft: #efede8;
  --radius: 12px;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }

.top { padding: 28px 0 8px; }
.brand { display: inline-flex; }
.lockup { display: block; height: 24px; width: auto; }

h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 28px 0 22px;
}
h2 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 36px 0 12px;
}
.lede { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------- overall ---------- */
.overall {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 1px 2px rgba(22, 27, 38, 0.04);
}
.overall-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.overall-message {
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-top: 14px;
  max-width: 34em;
}
.checked { margin-left: auto; font-size: 13px; color: var(--muted); }

.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--idle); flex: none; }
.pill {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--idle-soft);
  color: var(--idle);
  white-space: nowrap;
}
[data-state='operational'] .pill, [data-state='operational'].component .pill { background: var(--good-soft); color: var(--good); }
[data-state='degraded'] .pill, [data-state='degraded'].component .pill { background: var(--warn-soft); color: var(--warn); }
[data-state='outage'] .pill, [data-state='outage'].component .pill { background: var(--bad-soft); color: var(--bad); }
.overall[data-state='operational'] .dot { background: var(--good); }
.overall[data-state='degraded'] .dot { background: var(--warn-bar); }
.overall[data-state='outage'] .dot { background: var(--bad); }

/* ---------- components ---------- */
.components { list-style: none; display: grid; gap: 12px; }
.component {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 14px;
}
.component.is-stale { opacity: 0.7; }
.component-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.component-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.component-message { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }

.strip { display: flex; gap: 1px; height: 28px; margin-top: 14px; align-items: stretch; }
.tick { flex: 1 1 0; min-width: 2px; border-radius: 1px; background: var(--line); }
.tick.ok { background: var(--good); }
.tick.slow { background: var(--warn-bar); margin-top: 8px; }
.tick.fail { background: var(--bad); }
.tick.none { background: var(--line-soft); margin-top: 20px; }

.axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}
.axis-summary { text-align: center; flex: 1 1 auto; }

.note, .notice { font-size: 13.5px; color: var(--ink-soft); margin-top: 20px; }
.notice { background: var(--warn-soft); border-radius: var(--radius); padding: 12px 16px; color: var(--warn); }
.note[hidden], section[hidden] { display: none; }

.foot { margin-top: 48px; padding: 24px 0 36px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot p + p { margin-top: 6px; }
.foot a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 560px) {
  .overall { padding: 18px 18px; }
  .component { padding: 16px 16px 12px; }
  .checked { margin-left: 0; flex-basis: 100%; }
  .axis { flex-wrap: wrap; }
  .axis-summary { order: 3; flex-basis: 100%; text-align: left; }
}
