/* The site's tokens (server/src/app/globals.css): light on :root, dark under the media query, following the OS. */
/* Literata 500, Latin subset (SIL Open Font License), for the wordmark only, as on the site. */
@font-face { font-family: Literata; font-style: normal; font-weight: 500; font-display: swap; src: url("literata-500-latin.woff2") format("woff2"); }

:root {
  --ink: #fff; --ink-2: #f5f5f7; --tile: #f5f5f7; --tile-2: #e8e8ed; --rule: #d2d2d7; --hairline: rgb(0 0 0 / 0.08);
  --bone: #1d1d1f; --ash: #5f5f63; --vermilion: #d3392a;
  /* Type and icons (4.5:1 on white) */
  --state: #1b6f2f; --pending: #7a5000; --partial: #a14600; --major: #c4162a;
  /* Bars (3:1 against the page, as graphics need) */
  --bar-ok: #2f9e4f; --bar-degraded: #c98a00; --bar-partial: #e07400; --bar-major: #d3392a; --bar-maint: #8e8e93; --bar-none: #e8e8ed;
  --shadow: 0 8px 24px -8px rgb(0 0 0 / 0.25), inset 0 0 0 1px rgb(0 0 0 / 0.08);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #000; --ink-2: #0a0a0b; --tile: #161617; --tile-2: #1d1d1f; --rule: #2c2c2e; --hairline: rgb(255 255 255 / 0.08);
    --bone: #f5f5f7; --ash: #a1a1a6; --vermilion: #e34234;
    --state: #30d158; --pending: #ffc46b; --partial: #ff9f0a; --major: #ff5c70;
    --bar-ok: #30d158; --bar-degraded: #ffc46b; --bar-partial: #ff9f0a; --bar-major: #e34234; --bar-maint: #6e6e73; --bar-none: #2c2c2e;
    --shadow: 0 8px 24px -8px rgb(0 0 0 / 0.8), inset 0 0 0 1px rgb(255 255 255 / 0.1);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bone); text-decoration-color: color-mix(in oklab, var(--ash), transparent 50%); text-underline-offset: 4px; border-radius: 6px; }
a:hover { text-decoration-color: var(--bone); }
:focus-visible { outline: 3px solid color-mix(in oklab, #e34234, transparent 50%); outline-offset: 2px; }
main, .top, .foot { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.top { display: flex; align-items: baseline; gap: 10px; padding-top: 40px; padding-bottom: 28px; }
.brand { font: 500 26px/1 Literata, "Iowan Old Style", Georgia, serif; letter-spacing: -0.02em; text-decoration: none; }
.sub { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; color: var(--ash); }

h2 { font-size: 13px; font-weight: 600; color: var(--ash); margin: 40px 0 12px; }
h3 { font-size: 15px; font-weight: 600; margin: 0; }
.muted { color: var(--ash); }
.note { color: var(--ash); font-size: 13px; }

.icon { width: 18px; height: 18px; flex: none; display: block; }
.c-operational { color: var(--state); } .c-degraded { color: var(--pending); } .c-partial { color: var(--partial); }
.c-major { color: var(--major); } .c-maintenance, .c-unknown { color: var(--ash); }

.banner { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: 16px; background: var(--tile); font-size: 17px; font-weight: 600; }
.banner .icon { width: 22px; height: 22px; }
.banner .text { color: var(--bone); }
.banner.t-degraded, .banner.t-partial { background: color-mix(in oklab, var(--bar-degraded), var(--tile) 86%); }
.banner.t-major { background: color-mix(in oklab, var(--bar-major), var(--tile) 86%); }

.components { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hairline); border-radius: 16px; }
.component { padding: 16px 20px; }
.component + .component { border-top: 1px solid var(--hairline); }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.state .icon { width: 16px; height: 16px; }
.detail { margin: 4px 0 0; font-size: 13px; color: var(--ash); }

.bars { list-style: none; display: flex; gap: 2px; height: 32px; margin: 12px 0 0; padding: 0; }
.bar { flex: 1 1 0; min-width: 0; border-radius: 2px; cursor: default; }
.bar:hover, .bar:focus-visible { opacity: 0.7; }
.s-operational { background: var(--bar-ok); } .s-maintenance { background: var(--bar-maint); } .s-degraded { background: var(--bar-degraded); }
.s-partial { background: var(--bar-partial); } .s-major { background: var(--bar-major); } .s-none { background: var(--bar-none); }
.span { display: flex; justify-content: space-between; font-size: 11px; color: var(--ash); margin-top: 6px; }

.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; margin: 12px 0 0; font-size: 11px; color: var(--ash); }
.legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.incident { border: 1px solid var(--hairline); border-radius: 16px; padding: 16px 20px; }
.incident + .incident { margin-top: 12px; }
/* An open incident wears its real severity: amber for degraded or partial, red only for a major outage. */
.incident.open { border-color: transparent; background: var(--tile); }
.incident.open.i-degraded, .incident.open.i-partial { background: color-mix(in oklab, var(--bar-degraded), var(--tile) 88%); box-shadow: inset 3px 0 0 var(--bar-partial); }
.incident.open.i-major { background: color-mix(in oklab, var(--bar-major), var(--tile) 88%); box-shadow: inset 3px 0 0 var(--bar-major); }
.incident .head { display: flex; align-items: flex-start; gap: 8px; }
.incident .head .icon { margin-top: 1px; }
.meta { font-size: 13px; color: var(--ash); margin: 4px 0 0; }
.updates { list-style: none; margin: 12px 0 0; padding: 0 0 0 14px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 12px; }
.updates p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.updates .when { font-size: 13px; color: var(--ash); }
.updates strong { font-weight: 600; color: var(--bone); }
details summary { cursor: pointer; font-size: 13px; color: var(--ash); margin-top: 8px; border-radius: 6px; }

.foot { padding-top: 40px; padding-bottom: 48px; font-size: 13px; }
.foot p { margin: 4px 0; }
.stale { color: var(--pending); }

.tip { position: fixed; z-index: 10; pointer-events: none; padding: 6px 10px; border-radius: 10px; background: var(--tile-2); color: var(--bone); font-size: 13px; white-space: nowrap; box-shadow: var(--shadow); }
@media (max-width: 480px) { .bars { gap: 1px; height: 28px; } .banner { font-size: 16px; padding: 14px 16px; } .component, .incident { padding: 14px 16px; } }
.components:empty { display: none; }
