@font-face { font-family: "Unbounded"; src: url(assets/fonts/unbounded.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(assets/fonts/space-grotesk.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(assets/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #03040a;
  --ink: #e9ecfb;
  --ink-2: #a3a9cc;
  --ink-3: #646b94;
  --line: rgba(190, 200, 255, .08);
  --line-2: rgba(190, 200, 255, .16);
  --up: #5eead4;
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --pink: #f472b6;
  --amber: #fbbf24;
  --red: #f87171;
  --state: var(--cyan);
  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
body[data-state="operational"] { --state: var(--up); }
body[data-state="degraded"] { --state: var(--amber); }
body[data-state="outage"] { --state: var(--red); }

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 16px/1.55 var(--sans);
  color: var(--ink);
  background: radial-gradient(1200px 760px at 50% -8%, rgba(46, 56, 130, .3), transparent 64%), var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
::selection { background: rgba(167, 139, 250, .45); }

/* ---------- space ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.nebula { position: fixed; inset: -20vmax; z-index: 0; pointer-events: none; filter: blur(110px); opacity: .18; }
.nebula span { position: absolute; width: 50vmax; height: 50vmax; border-radius: 50%; animation: drift 60s ease-in-out infinite alternate; }
.nebula span:nth-child(1) { background: radial-gradient(circle, #5b3fd6, transparent 66%); top: 6%; left: 4%; }
.nebula span:nth-child(2) { background: radial-gradient(circle, #0e7490, transparent 66%); top: 30%; right: 0; animation-delay: -20s; }
.nebula span:nth-child(3) { background: radial-gradient(circle, #9d174d, transparent 66%); bottom: 0; left: 34%; animation-delay: -40s; opacity: .6; }
@keyframes drift { to { transform: translate3d(5vmax, -4vmax, 0) scale(1.1); } }

main { position: relative; z-index: 2; max-width: 1160px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 20px 64px; }

/* ---------- top bar ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-family: var(--display); font-weight: 500; font-size: 15px; }
.brand b { font-weight: 500; color: var(--ink-3); }
.brand-mark { display: block; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.live { display: grid; justify-items: end; gap: 5px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.live-track { width: 110px; height: 1px; background: var(--line-2); overflow: hidden; }
.live-track i { display: block; height: 100%; width: calc(var(--p, 0) * 1%); background: var(--ink); }
.live.is-stale .live-text { color: var(--amber); }
.live.is-stale .live-track i { background: var(--amber); }

/* ---------- hero ---------- */
.hero { text-align: center; padding-top: 4px; }
.orbit-wrap { position: relative; width: 100%; margin: 0 auto; }
#orbit { display: block; width: 100%; max-width: 900px; margin: 0 auto; height: auto; aspect-ratio: 2.1 / 1; }

.hud { position: absolute; inset: 0; pointer-events: none; }
.hud-item { position: absolute; display: grid; gap: 2px; padding: 12px 14px; text-align: left; min-width: 150px; }
.hud-item::before { content: ""; position: absolute; width: 14px; height: 14px; border: 0 solid var(--line-2); }
.hud-item.tl { top: 8%; left: 0; } .hud-item.tl::before { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.hud-item.tr { top: 8%; right: 0; text-align: right; } .hud-item.tr::before { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.hud-item.bl { bottom: 4%; left: 0; } .hud-item.bl::before { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.hud-item.br { bottom: 4%; right: 0; text-align: right; } .hud-item.br::before { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }
.hud-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.hud-val { font-family: var(--mono); font-weight: 600; font-size: 28px; letter-spacing: -.03em; line-height: 1.15; }
.hud-val small { font-size: .5em; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; font-weight: 500; }
.hud-foot { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.hud-item.is-warn .hud-val { color: var(--amber); }
.hud-item.is-bad .hud-val { color: var(--red); }

.headline { margin: 18px auto 0; font-family: var(--display); font-weight: 600; letter-spacing: -.025em; line-height: 1.05; font-size: clamp(2rem, 5.2vw, 3.9rem); text-wrap: balance; }
.headline .accent { color: var(--state); transition: color 1s; }
.sub { margin: 14px auto 0; color: var(--ink-3); font-family: var(--mono); font-size: 13px; }

/* ---------- sections ---------- */
.block { margin-top: 96px; }
.block-title { margin: 0 0 18px; font-family: var(--display); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.8rem); letter-spacing: -.015em; line-height: 1.15; }
.sub-title { display: flex; align-items: center; gap: 12px; margin: 40px 0 6px; font-family: var(--mono); font-weight: 500; font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3); }
.lan { padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-2); letter-spacing: .08em; font-size: 10px; color: var(--ink-2); }

/* ---------- service manifest ---------- */
.manifest { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 34px minmax(170px, 250px) minmax(0, 1fr) 72px 64px 64px; align-items: center; gap: 18px;
  padding: 13px 10px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: background .25s; outline: none; animation: row-in .6s var(--ease) backwards;
}
a.row:hover, a.row:focus-visible { background: rgba(190, 200, 255, .035); }
a.row:focus-visible { box-shadow: inset 0 0 0 1px var(--violet); }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }
.row .icon { width: 30px; height: 30px; display: grid; place-items: center; }
.row .icon img { width: 26px; height: 26px; display: block; }
.row .who { min-width: 0; }
.row .nm { display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 15.5px; line-height: 1.25; }
.row .ds { margin: 1px 0 0; font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .arrow { opacity: 0; transition: opacity .25s; color: var(--ink-3); font-weight: 400; }
a.row:hover .arrow, a.row:focus-visible .arrow { opacity: 1; }
.lock { width: 11px; height: 11px; color: var(--ink-3); flex: none; }
.row .num { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.row .num.u30 { color: var(--ink); }
.row .state { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); text-align: right; }
.row.is-down .state { color: var(--red); font-weight: 600; }
.row.is-down .nm { color: var(--red); }
.row.is-internal { padding-top: 10px; padding-bottom: 10px; }
.row.is-internal .nm { font-size: 14.5px; }

.bars { display: flex; align-items: flex-end; gap: 2px; height: 22px; }
.bar { flex: 1; min-width: 1px; height: 100%; border-radius: 1px; background: var(--c, rgba(190, 200, 255, .1)); transform-origin: bottom; animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 5ms); }
.bar.no-data { height: 28%; align-self: center; background: rgba(190, 200, 255, .08); }
.bar:hover { filter: brightness(1.45); }
@keyframes rise { from { transform: scaleY(.05); opacity: 0; } }

/* ---------- telemetry & backups ---------- */
.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.col { min-width: 0; }
.col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.col-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

.mods { border-top: 1px solid var(--line); }
.mod { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 4px 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.mod-head { display: grid; gap: 2px; }
.mod-name { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.mod-val { font-family: var(--mono); font-weight: 600; font-size: 26px; letter-spacing: -.03em; line-height: 1.1; }
.mod-val small { font-size: .5em; color: var(--ink-3); margin-left: 2px; }
.mod-spark { display: block; width: 100%; height: 40px; overflow: visible; }
.mod-spark .ln { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.mod-spark .base { stroke: rgba(190, 200, 255, .08); stroke-width: 1; vector-effect: non-scaling-stroke; }
.mod-bars, .mod-meta { grid-column: 2; }
.mod-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12.5px; color: var(--ink-3); }
.mod-meta b { font-family: var(--mono); font-weight: 500; color: var(--ink-2); }
.mod-meta .t-warm { color: var(--amber); }
.mod-meta .t-hot { color: var(--red); }
.mod-bars { display: grid; gap: 6px; margin: 4px 0 2px; }
.mbar { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-3); }
.mbar span:last-child { font-family: var(--mono); color: var(--ink-2); }
.track { position: relative; height: 3px; border-radius: 999px; background: rgba(190, 200, 255, .08); overflow: hidden; }
.track i { position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 1%); border-radius: inherit; background: var(--fill, var(--violet)); transition: width 1.2s var(--ease); }

.net { padding: 16px 0; border-bottom: 1px solid var(--line); }
.net-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.net-now { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.net-now i { width: 10px; height: 2px; border-radius: 1px; margin-left: 6px; }
.key-rx { background: var(--cyan); }
.key-tx { background: var(--pink); }
.spark { width: 100%; height: 80px; display: block; margin-top: 10px; overflow: visible; }
.spark[hidden], .spark-empty[hidden] { display: none; }
.spark .grid { stroke: rgba(190, 200, 255, .06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark .line { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark .line-rx { stroke: var(--cyan); }
.spark .line-tx { stroke: var(--pink); }
.spark-empty { margin: 10px 0 0; color: var(--ink-3); font-size: 13px; }

.disks { display: grid; gap: 12px; padding-top: 16px; }
.disk-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
.disk-row .dv { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.disk-row .track { grid-column: 1 / -1; }
.disk-row .track i { background: linear-gradient(90deg, var(--cyan), var(--violet)); }

.chip { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--tone, var(--ink-2)); }
.chip.ok { --tone: var(--ink-2); } .chip.warn { --tone: var(--amber); } .chip.bad { --tone: var(--red); } .chip.running { --tone: var(--cyan); }

.pipeline { border-top: 1px solid var(--line); padding-top: 18px; }
.pipeline svg { width: 100%; height: auto; display: block; overflow: visible; }
.pipeline .wire { fill: none; stroke: rgba(190, 200, 255, .12); stroke-width: 1.5; }
.pipeline .flow { fill: none; stroke: var(--cyan); stroke-width: 1.5; stroke-dasharray: 2 12; animation: flow 1.1s linear infinite; }
.pipeline .flow.off { stroke: rgba(190, 200, 255, .18); animation: none; stroke-dasharray: 2 8; }
@keyframes flow { to { stroke-dashoffset: -14; } }
.pipeline .node { fill: #07081a; stroke: var(--line-2); stroke-width: 1.2; }
.pipeline .node.ok { stroke: rgba(233, 236, 251, .5); }
.pipeline .node.off { stroke-dasharray: 3 4; }
.pipeline .glyph { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pipeline .glyph.off { stroke: var(--ink-3); }
.pipeline text { font-family: var(--sans); fill: var(--ink-3); font-size: 12px; text-anchor: middle; }
.pipeline text.t1 { fill: var(--ink); font-size: 13px; font-weight: 600; }

.vault { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: center; margin-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.vault-ring { position: relative; width: 150px; height: 150px; }
.vault-ring svg { width: 100%; height: 100%; overflow: visible; }
.vault-ring .ring-track { fill: none; stroke: rgba(190, 200, 255, .08); stroke-width: 4; }
.vault-ring .ring-arc { fill: none; stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1.6s var(--ease), stroke .6s; }
.vault-ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.vault-ring .big { font-family: var(--mono); font-weight: 600; font-size: 26px; letter-spacing: -.03em; line-height: 1; }
.vault-ring .small { margin: 6px auto 0; max-width: 96px; font-size: 10px; letter-spacing: .1em; line-height: 1.35; text-transform: uppercase; color: var(--ink-3); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.facts div { min-width: 0; }
.facts dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 2px 0 0; font-family: var(--mono); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nights { padding-top: 16px; }
.nights-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.nights-legend { display: inline-flex; align-items: center; gap: 6px; letter-spacing: .04em; text-transform: none; }
.nights-legend i { width: 8px; height: 8px; border-radius: 1px; margin-left: 8px; }
.nights-grid { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); gap: 3px; margin-top: 10px; }
.night { aspect-ratio: 1; border-radius: 2px; background: rgba(190, 200, 255, .07); animation: pop .5s var(--ease) both; animation-delay: calc(var(--i) * 16ms); }
.n-ok, .night.ok { background: var(--up); }
.n-failed, .night.failed { background: var(--red); }
.night.running { background: var(--cyan); }
.n-none { background: rgba(190, 200, 255, .14); }
.night.today { outline: 1px solid rgba(255, 255, 255, .35); outline-offset: 2px; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }

/* ---------- footer, tooltip, stale ---------- */
.foot { margin-top: 96px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.foot p { margin: 8px auto; max-width: 60ch; }
.foot-small { font-family: var(--mono); font-size: 12px; }
.foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.foot-line { position: relative; height: 1px; margin: 0 auto 26px; max-width: 520px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); overflow: hidden; }
.comet { position: absolute; top: 0; left: 0; width: 90px; height: 1px; background: linear-gradient(90deg, transparent, var(--violet)); animation: travel 5s ease-in-out infinite; }
@keyframes travel { from { transform: translateX(-90px); } to { transform: translateX(520px); } }

.tip { position: fixed; z-index: 50; pointer-events: none; padding: 6px 10px; border-radius: 6px; font: 500 12px/1.35 var(--mono); color: var(--ink); background: rgba(8, 10, 24, .95); border: 1px solid var(--line-2); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); }
.stale { position: fixed; z-index: 40; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; font-size: 13px; color: #1b1300; background: var(--amber); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .duo { grid-template-columns: minmax(0, 1fr); gap: 64px; }
}
@media (max-width: 860px) {
  .hud { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
  .hud-item { position: relative; inset: auto; min-width: 0; }
  .hud-item.tl, .hud-item.tr, .hud-item.bl, .hud-item.br { top: auto; bottom: auto; left: auto; right: auto; }
  .hud-item.tr, .hud-item.br { text-align: right; }
  .row { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 6px 14px; padding: 12px 4px; }
  .row .bars { grid-column: 1 / -1; grid-row: 2; }
  .row .num.u30 { grid-column: 1 / 3; grid-row: 3; text-align: left; }
  .row .num.lat { grid-column: 3; grid-row: 3; }
  .row .state { grid-column: 3; grid-row: 1; }
}
@media (max-width: 640px) {
  main { padding-left: 16px; padding-right: 16px; }
  #orbit { aspect-ratio: 1.35 / 1; }
  .block { margin-top: 72px; }
  .hud-val { font-size: 23px; }
  .vault { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .facts { width: 100%; }
  .mod { grid-template-columns: 86px minmax(0, 1fr); gap: 4px 12px; }
  .live-track { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
