/* Chivo — SIL Open Font License 1.1. Vendored rather than fetched from a CDN:
   this page must render with no third-party request, since it is read exactly
   when other things are failing. */
@font-face {
  font-family: Chivo;
  src: url('/fonts/chivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Brand tokens taken from tellusapp.com. Status colors are the reserved status
   palette, validated against these exact surfaces — never themed, never reused. */
:root {
  color-scheme: light;
  --surface:       #ffffff;
  --plane:         #f1f5f9;  /* background */
  --card:          #ffffff;
  --ink:           #0e0f0f;  /* base-graphite */
  --ink-secondary: #424653;  /* base-steel-dark */
  --ink-muted:     #7b8190;
  --border:        #e4e9ef;
  --border-strong: #d2d9e1;  /* base-steel-light */
  --accent:        #0067ff;  /* accent-blue */

  --good: #0ca30c; --info: #0067ff; --warning: #fab219; --serious: #ec835a; --critical: #d03b3b;

  --r-card: 1rem;
  --r-pill: 999px;
  --nav-h: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #0e0f0f; --plane: #080908; --card: #151716;
    --ink: #f9f9f9; --ink-secondary: #c9ced6; --ink-muted: #8b9099;
    --border: #23262a; --border-strong: #33383e; --accent: #4d94ff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #0e0f0f; --plane: #080908; --card: #151716;
  --ink: #f9f9f9; --ink-secondary: #c9ced6; --ink-muted: #8b9099;
  --border: #23262a; --border-strong: #33383e; --accent: #4d94ff;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--plane);
  color: var(--ink);
  font-family: Chivo, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Full-bleed sticky nav, matching tellusapp.com */
header.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
header.nav .inner {
  max-width: 60rem; margin: 0 auto; height: 100%;
  padding: 0 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
header.nav .logo { display: flex; align-items: center; gap: .75rem; color: var(--ink); text-decoration: none; }
header.nav .logo svg { height: 1.5rem; width: auto; display: block; }
header.nav .logo .sub {
  font-size: .8125rem; letter-spacing: .02em; color: var(--ink-muted);
  padding-left: .75rem; border-left: 1px solid var(--border-strong);
}

/* Pill CTA, matching the site's OPEN FREE ACCOUNT button */
.pill {
  display: inline-flex; align-items: center; gap: .5rem;
  border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  background: transparent; color: var(--ink);
  font: inherit; font-size: .6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em;
  padding: .5rem 1rem; cursor: pointer; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.pill:hover { border-color: var(--ink); }
.pill .arw { width: .875rem; height: .875rem; }

.wrap { max-width: 60rem; margin: 0 auto; padding: 2.5rem 1.25rem 5rem; }

/* Overall status — the site's display treatment: large, light, bold emphasis */
.hero { margin-bottom: 3rem; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-muted); margin-bottom: 1rem;
}
.hero .eyebrow .mark { width: 1rem; height: 1rem; color: var(--s-color); }
.hero h1 {
  margin: 0; font-size: clamp(1.75rem, 4.5vw, 2.75rem); font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.15;
}
.hero h1 strong { font-weight: 700; }
.hero .meta { color: var(--ink-muted); font-size: .875rem; margin: .75rem 0 0; }

[data-status="operational"] { --s-color: var(--good); }
[data-status="maintenance"] { --s-color: var(--info); }
[data-status="degraded"]    { --s-color: var(--warning); }
[data-status="partial"]     { --s-color: var(--serious); }
[data-status="major"]       { --s-color: var(--critical); }

/* Shape + label carry the meaning. Color is the third channel, never the first:
   warning and serious measure dE 13.6 apart in normal vision. */
.mark { flex: none; width: 1.125rem; height: 1.125rem; color: var(--s-color); }
.mark svg { display: block; width: 100%; height: 100%; }

section.group { margin-bottom: 2.5rem; }
section.group > h2 {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--ink-muted); font-weight: 700; margin: 0 0 .75rem .125rem;
}
ul.components {
  list-style: none; margin: 0; padding: 0;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card);
  overflow: hidden;
}
ul.components > li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
ul.components > li:last-child { border-bottom: 0; }
.cname { font-size: .9375rem; font-weight: 500; }
.cstatus {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8125rem; font-weight: 600; color: var(--s-color); white-space: nowrap;
}
/* On the light surface warning (1.74:1) and serious (2.51:1) fall under 3:1,
   so the label is set in ink and only the mark carries the hue. */
:root:not([data-theme="dark"]) .cstatus[data-status="degraded"],
:root:not([data-theme="dark"]) .cstatus[data-status="partial"] { color: var(--ink-secondary); }

/* Uptime strip: one cell per day, 90 days. The cell is the hit target and
   carries its own tooltip; hovering lifts it. Not keyboard-focusable by design —
   12 components x 90 days would put 1080 tab stops in front of a screen-reader
   user. The strip carries an aria-label summary and the incident list below is
   the accessible long form. */
ul.components > li { flex-wrap: wrap; }
.crow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; }
.uptime { font-size: .75rem; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.strip { display: flex; gap: 2px; width: 100%; margin-top: .75rem; height: 2rem; }
.strip .cell {
  flex: 1 1 0; min-width: 0; border-radius: 2px;
  background: color-mix(in oklab, var(--s-color) 62%, var(--card));
  transition: transform .1s ease, background .1s ease;
}
.strip .cell[data-status="nodata"] { background: var(--border); }
.strip .cell:hover {
  background: var(--s-color);
  transform: scaleY(1.14);
}
.strip .cell[data-status="nodata"]:hover { background: var(--border-strong); }
.legend {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 100%;
  margin-top: .375rem; font-size: .6875rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-muted);
}
.legend > :last-child { text-align: right; }
.legend .uptime { text-transform: none; letter-spacing: 0; font-size: .75rem; }

.incident {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 1.5rem; margin-bottom: 1rem;
  position: relative; overflow: hidden;
}
.incident::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--s-color);
}
.incident h3 { margin: .5rem 0 .375rem; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.01em; }
.incident h3 a { color: var(--ink); text-decoration: none; }
.incident h3 a:hover { color: var(--accent); }
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.badge {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  padding: .3125rem .6875rem; border: 1px solid var(--border-strong);
  border-radius: var(--r-pill); color: var(--ink-secondary);
}
.badge .mark { width: .8125rem; height: .8125rem; }
.affected { color: var(--ink-muted); font-size: .8125rem; }
.updates { margin: 1.25rem 0 0; padding: 0 0 0 1.25rem; border-left: 1px solid var(--border-strong); }
.update { margin-bottom: 1.125rem; }
.update:last-child { margin-bottom: 0; }
.update .when { font-size: .75rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.update .state {
  font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink); margin-left: .375rem;
}
.update p { margin: .25rem 0 0; font-size: .9375rem; color: var(--ink-secondary); }

h1.page { font-size: 2rem; font-weight: 400; letter-spacing: -0.02em; margin: 0 0 2rem; }
.empty {
  color: var(--ink-muted); font-size: .9375rem; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 2.5rem 1.25rem; text-align: center;
}

footer.site {
  margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center;
  font-size: .8125rem; color: var(--ink-muted);
}
footer.site a { color: var(--ink-secondary); text-decoration: none; }
footer.site a:hover { color: var(--accent); }
footer.site .spacer { flex: 1 1 auto; }

@media (max-width: 34rem) {
  header.nav .logo .sub { display: none; }
  ul.components > li { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .incident { padding: 1.25rem; }
}
