/* KyberOS status page.
 *
 * Status pages fail when they become marketing pages. This keeps the KyberOS
 * visual language — warm paper, precise type, four product hues — but removes
 * every effect that competes with the answer to one question: is it us or you?
 *
 * No animation on health changes. A status moving from green to red is already
 * visually loud and should not pulse, shake or demand attention twice.
 */

:root {
  --canvas: oklch(97.2% 0.003 85);
  --paper: oklch(100% 0 0);
  --paper-2: oklch(98% 0.003 85);
  --paper-3: oklch(95.5% 0.004 85);
  --ink: oklch(15% 0.004 85);
  --ink-2: oklch(43% 0.006 85);
  --ink-3: oklch(62% 0.006 85);
  --line: oklch(93.5% 0.003 85);
  --line-2: oklch(89% 0.004 85);
  --slate: oklch(15% 0.008 85);
  --brand: oklch(86% 0.15 128);
  --ok: oklch(62% 0.14 150);
  --ok-tint: oklch(96% 0.035 150);
  --danger: oklch(57% 0.19 27);
  --danger-tint: oklch(96% 0.035 27);
  --warn: oklch(72% 0.15 68);
  --gate: oklch(58% 0.15 255);
  --access: oklch(60% 0.14 305);
  --watch: oklch(59% 0.15 30);
  --copy: oklch(57% 0.14 155);
  --font: "Inter var", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --shadow: 0 1px 2px oklch(0% 0 0 / .04), 0 10px 30px oklch(0% 0 0 / .055);
  --max: 62rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 48rem) { .wrap { padding-inline: 2rem; } }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--slate); color: white; padding: .75rem 1rem; }
.skip:focus { left: 0; }

.topbar { border-bottom: 1px solid var(--line); background: oklch(97.2% 0.003 85 / .88); backdrop-filter: blur(14px); }
.topbar-inner { height: 4.25rem; display: flex; align-items: center; gap: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .625rem; font-weight: 650; letter-spacing: -.025em; text-decoration: none; }
.mark { width: 1.75rem; height: 1.75rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px; padding: 4.5px; border-radius: .5rem; background: var(--slate); }
.mark i { border-radius: 1.5px; background: currentColor; }
.mark i:nth-child(1) { color: var(--gate); }.mark i:nth-child(2) { color: var(--access); }.mark i:nth-child(3) { color: var(--watch); }.mark i:nth-child(4) { color: var(--copy); }
.divider { height: 1.25rem; width: 1px; background: var(--line-2); }
.section-name { color: var(--ink-2); font-size: .875rem; }
.home-link { margin-left: auto; color: var(--ink-3); text-decoration: none; font-size: .8125rem; }
.home-link:hover { color: var(--ink); }

main { padding-block: 3rem 5rem; }
.hero { margin-bottom: 4.5rem; }
.overall { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; padding: 1.5rem; border-radius: 1.25rem; background: var(--ok-tint); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--ok) 20%, transparent); }
.overall.incident { background: var(--danger-tint); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--danger) 20%, transparent); }
.overall.loading { background: var(--paper); box-shadow: var(--shadow); }
.overall-icon { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; background: var(--ok); color: white; }
.incident .overall-icon { background: var(--danger); }
.loading .overall-icon { background: var(--paper-3); color: var(--ink-3); }
.overall-icon svg { width: 1.25rem; height: 1.25rem; }
.overall h1 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.75rem); line-height: 1.15; letter-spacing: -.03em; }
.overall p { margin: .35rem 0 0; color: var(--ink-2); font-size: .875rem; }
.updated { grid-column: 2; color: var(--ink-3); font-family: var(--mono); font-size: .6875rem; }
@media (min-width: 42rem) { .overall { grid-template-columns: auto 1fr auto; padding: 1.75rem 2rem; }.updated { grid-column: auto; } }

.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head.compact { margin-bottom: 1.25rem; }
.eyebrow { margin: 0 0 .5rem; color: var(--ink-3); font-size: .6875rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.12; letter-spacing: -.035em; }
.observed { margin: 0; color: var(--ink-3); font-size: .75rem; }

.services { margin-bottom: 4.5rem; }
.service-list { border-radius: 1.25rem; background: var(--paper); box-shadow: var(--shadow); overflow: hidden; }
.service { --accent: var(--ink-3); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .875rem; padding: 1.25rem; border-top: 1px solid var(--line); }
.service:first-child { border-top: 0; }
.service-mark { width: .625rem; height: 2.25rem; border-radius: 999px; background: var(--accent); }
.service-name { display: block; font-weight: 620; letter-spacing: -.015em; text-decoration: none; width: fit-content; }
.service-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.service-description { margin: .2rem 0 0; color: var(--ink-3); font-size: .8125rem; }
.service-meta { text-align: right; }
.service-status { display: inline-flex; align-items: center; gap: .45rem; font-size: .8125rem; font-weight: 580; color: var(--ok); }
.service-status::before { content: ""; width: .45rem; height: .45rem; border-radius: 999px; background: currentColor; }
.service.outage .service-status { color: var(--danger); }
.service-latency { display: block; margin-top: .25rem; color: var(--ink-3); font-family: var(--mono); font-size: .6875rem; }
.skeleton { height: 5rem; border-top: 1px solid var(--line); background: linear-gradient(90deg, var(--paper), var(--paper-2), var(--paper)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skeleton:first-child { border-top: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

.history-section { margin-bottom: 4.5rem; }
.history-grid { display: grid; gap: .75rem; }
.history-row { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: center; gap: 1rem; }
.history-label { font-size: .8125rem; font-weight: 550; }
.history-marks { display: flex; gap: 2px; height: 1.5rem; overflow: hidden; align-items: stretch; }
.history-mark { min-width: 3px; flex: 1 1 3px; max-width: 8px; border-radius: 2px; background: var(--ok); }
.history-mark.down { background: var(--danger); }
/* A slot with no sample yet. Drawn, not omitted: an empty track that is
   visibly filling says "this monitor is new", where a short row of green
   marks floating at the left edge reads as a rendering fault. */
.history-mark.pending { background: var(--paper-3); }
.empty { margin: 0; padding: 1.5rem; border-radius: 1rem; background: var(--paper); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); font-size: .875rem; }

.incidents-section { margin-bottom: 2rem; }
.incident-empty { display: flex; gap: .875rem; align-items: flex-start; padding: 1.5rem; border-radius: 1rem; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.check { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; flex-shrink: 0; border-radius: 999px; background: var(--ok-tint); color: var(--ok); font-weight: 700; }
.incident-empty strong { font-size: .9375rem; }.incident-empty p { margin: .25rem 0 0; color: var(--ink-2); font-size: .875rem; }
.incident { padding: 1.5rem; border-radius: 1rem; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.incident time { color: var(--ink-3); font-family: var(--mono); font-size: .6875rem; }.incident h3 { margin: .4rem 0; font-size: 1rem; }.incident p { margin: 0; color: var(--ink-2); font-size: .875rem; }

.footer { border-top: 1px solid var(--line); padding-block: 2rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--ink-3); font-size: .75rem; }
.footer nav { display: flex; gap: 1.25rem; }.footer a { text-decoration: none; }.footer a:hover { color: var(--ink); }

@media (max-width: 32rem) {
  .home-link { display: none; }
  .service { grid-template-columns: auto 1fr; }
  .service-meta { grid-column: 2; text-align: left; }
  .history-row { grid-template-columns: 5.5rem minmax(0, 1fr); gap: .625rem; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; } }
