/* Gargantua Fleet Observatory
   Space backdrop with a ray-traced black hole; projects orbit it - the closer to the event horizon,
   the more attention a project needs. Glass panels, accretion-gold accents, status colours. */

:root {
  --bg: #03040a;
  --ink: #eef1f8;
  --ink-2: #b9c1d2;
  --ink-3: #8089a0;
  --ink-4: #4d566b;
  --glass: rgba(13, 15, 26, 0.56);
  --glass-strong: rgba(9, 11, 19, 0.86);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --gold: #ffb84d;
  --gold-2: #ffdca3;
  --ember: #ff7a2f;
  --ok: #5ce1e6;
  --notice: #ffc457;
  --upgrade: #b18cff;
  --warning: #ff8a3d;
  --critical: #ff3d5a;
  --muted: #8a93a6;
  --radius: 20px;
  --radius-sm: 11px;
  --shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --topbar-h: 68px;
  --horizon-h: 46px;
  color-scheme: dark;
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--gold-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 8px;
}

[hidden] {
  /* biome-ignore lint/complexity/noImportantStyles: the hidden attribute must win over component display rules */
  display: none !important;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--glass-strong);
  border-radius: 10px;
}

.skip-link:focus {
  top: 16px;
}

.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ universe */

.cosmos,
.orbits,
.cosmos-fallback,
.vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cosmos {
  z-index: 0;
  display: block;
  opacity: 0;
  transition: opacity 1.8s var(--ease-out);
}

.has-webgl .cosmos {
  opacity: 1;
}

.orbits {
  z-index: 1;
  pointer-events: none;
}

.vignette {
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(to bottom, rgba(3, 4, 10, 0.55), transparent 18%, transparent 82%, rgba(3, 4, 10, 0.7));
}

/* CSS fallback when WebGL is unavailable */
.cosmos-fallback {
  z-index: 0;
  display: none;
  overflow: hidden;
}

.no-webgl .cosmos-fallback {
  display: block;
}

.cf-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 72% 18%, #cfe3ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 38% 74%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 88% 66%, #ffe9c4 50%, transparent 51%),
    radial-gradient(1px 1px at 55% 40%, #fff 50%, transparent 51%), radial-gradient(1px 1px at 22% 58%, #dbe6ff 50%, transparent 51%);
  background-size: 420px 420px;
  opacity: 0.6;
}

.cf-disk,
.cf-ring,
.cf-shadow {
  position: absolute;
  left: var(--cx, 50%);
  top: var(--cy, 50%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cf-disk {
  width: calc(var(--unit, 120px) * 6.2);
  height: calc(var(--unit, 120px) * 1.3);
  background: radial-gradient(ellipse at center, transparent 22%, #fff4d8 30%, var(--gold) 42%, var(--ember) 58%, transparent 72%);
  filter: blur(2px);
  animation: cf-shimmer 6s ease-in-out infinite alternate;
}

.cf-ring {
  width: calc(var(--unit, 120px) * 2.35);
  height: calc(var(--unit, 120px) * 2.35);
  box-shadow:
    0 0 0 2px rgba(255, 236, 200, 0.9),
    0 0 40px 10px rgba(255, 180, 80, 0.55),
    inset 0 0 30px 6px rgba(255, 180, 80, 0.45);
}

.cf-shadow {
  width: calc(var(--unit, 120px) * 2);
  height: calc(var(--unit, 120px) * 2);
  background: #000;
}

@keyframes cf-shimmer {
  to {
    filter: blur(2px) brightness(1.18);
  }
}

/* ------------------------------------------------------------------ worlds (projects) */

.worlds {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.world {
  --c: var(--ok);
  --s: 14px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 0.9s var(--ease-out);
}

.world.is-visible {
  opacity: 1;
}

/* behind the black hole: seen through the lensing glare, dimmed but never lost */
.world.is-occluded {
  opacity: 0.42;
  filter: blur(0.6px) saturate(0.7);
}

.world[data-tone="critical"].is-occluded {
  opacity: 0.75;
  filter: none;
}

.world.label-hidden .world__label,
.world.label-hidden:hover .world__label {
  opacity: 0;
}

.world__body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 34% 30%,
    color-mix(in oklab, var(--c) 30%, white) 0%,
    var(--c) 32%,
    color-mix(in oklab, var(--c) 35%, black) 74%,
    #020206 100%
  );
  box-shadow:
    0 0 calc(var(--s) * 0.9) color-mix(in oklab, var(--c) 55%, transparent),
    0 0 calc(var(--s) * 2.2) color-mix(in oklab, var(--c) 18%, transparent);
  transition: transform 0.35s var(--ease-spring);
}

/* terminator: the side away from the accretion disk is dark; rotated towards the black hole each frame */
.world__shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(90deg, rgba(255, 236, 200, 0.28) 0%, transparent 38%, rgba(0, 0, 0, 0.72) 82%);
  mix-blend-mode: multiply;
}

.world__ring {
  position: absolute;
  inset: -7px;
  width: calc(100% + 14px);
  height: calc(100% + 14px);
  transform: rotate(-90deg);
  overflow: visible;
}

.world__ring circle {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.world__ring .track {
  stroke: rgba(255, 255, 255, 0.1);
}

.world__ring .value {
  stroke: color-mix(in oklab, var(--c) 70%, white);
  transition: stroke-dashoffset 1.6s var(--ease-out);
}

.world__label {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  pointer-events: none;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.3s;
}

.world__label b {
  display: block;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.world__label span {
  color: color-mix(in oklab, var(--c) 75%, white);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.world.show-label .world__label,
.world:hover .world__label,
.world:focus-visible .world__label,
.world.is-selected .world__label {
  opacity: 1;
}

.world:hover .world__body,
.world:focus-visible .world__body,
.world.is-selected .world__body {
  transform: scale(1.45);
}

.world.is-dimmed {
  opacity: 0.28;
}

.world[data-tone="critical"]::after,
.world[data-tone="warning"]::after,
.world.is-probing::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--c);
  animation: pulse 1.8s var(--ease-out) infinite;
  pointer-events: none;
}

.world[data-tone="warning"]::after {
  animation-duration: 3.2s;
  opacity: 0.6;
}

.world.is-probing::after {
  border-color: var(--gold-2);
  animation-duration: 0.9s;
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: scale(3.4);
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ glass & controls */

.glass {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 550;
  letter-spacing: 0.01em;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s var(--ease-spring),
    box-shadow 0.3s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: progress;
}

.btn--primary {
  border: 0;
  color: #1a0f02;
  background: linear-gradient(120deg, #ffe6b8, var(--gold) 45%, var(--ember));
  box-shadow: 0 10px 34px -10px rgba(255, 150, 50, 0.7);
}

.btn--primary:hover {
  background: linear-gradient(120deg, #fff0d4, #ffc66b 45%, #ff8a45);
  box-shadow: 0 14px 40px -10px rgba(255, 150, 50, 0.85);
}

.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-2);
}

.btn--danger {
  border-color: color-mix(in oklab, var(--critical) 55%, transparent);
  color: #ffd0d7;
  background: color-mix(in oklab, var(--critical) 14%, transparent);
}

.btn--small {
  min-height: 32px;
  padding: 0 13px;
  font-size: 13px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.3s var(--ease-spring);
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn.is-spinning svg {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.input,
.select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.35);
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.input:focus,
.select:focus {
  border-color: color-mix(in oklab, var(--gold) 70%, transparent);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--gold) 16%, transparent);
}

.field {
  display: grid;
  gap: 6px;
  text-align: left;
}

.field__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.badge {
  --c: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: color-mix(in oklab, var(--c) 70%, white);
  background: color-mix(in oklab, var(--c) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--c) 32%, transparent);
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

.badge--plain::before {
  display: none;
}

.tone-ok {
  --c: var(--ok);
}
.tone-notice {
  --c: var(--notice);
}
.tone-upgrade {
  --c: var(--upgrade);
}
.tone-warning {
  --c: var(--warning);
}
.tone-critical {
  --c: var(--critical);
}
.tone-muted {
  --c: var(--muted);
}
.tone-gold {
  --c: var(--gold);
}

/* ------------------------------------------------------------------ top bar & hud */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  /* backwards, not both: a retained transform would turn the bar into the containing block of the fixed mobile nav */
  animation: drop-in 1.2s var(--ease-out) backwards 0.4s;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  justify-self: start;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle, #000 0 38%, #fff3d6 44%, var(--gold) 52%, rgba(255, 122, 47, 0.25) 66%, transparent 72%);
  box-shadow: 0 0 22px rgba(255, 170, 70, 0.55);
  position: relative;
}

.brand__mark::after {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: 50%;
  height: 4px;
  margin-top: 1px;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, var(--gold-2), transparent);
  opacity: 0.85;
}

.brand__text {
  display: grid;
  line-height: 1.1;
}

.brand__name {
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.52em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #fff, var(--gold-2) 60%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand__sub {
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav {
  display: flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(10, 12, 20, 0.5);
  border: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 13.5px;
  font-weight: 550;
  letter-spacing: 0.02em;
  transition:
    color 0.2s,
    background 0.3s;
}

.nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: #1a0f02;
  background: linear-gradient(120deg, #ffe6b8, var(--gold));
  box-shadow: 0 6px 22px -8px rgba(255, 170, 70, 0.8);
}

.topbar__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

.live__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-4);
}

.live.is-live .live__dot {
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: breathe 2.4s ease-in-out infinite;
}

.live.is-error .live__dot {
  background: var(--critical);
  box-shadow: 0 0 10px var(--critical);
}

@keyframes breathe {
  50% {
    opacity: 0.35;
  }
}

.hud {
  position: fixed;
  z-index: 15;
  top: calc(var(--topbar-h) + 10px);
  right: 22px;
  display: grid;
  gap: 10px;
  width: 248px;
  animation: slide-left 1.2s var(--ease-out) both 0.7s;
}

.stat {
  padding: 14px 16px;
}

.stat__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}

.stat__value {
  margin-top: 2px;
  font-size: 30px;
  font-weight: 250;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.stat__value small {
  font-size: 13px;
  color: var(--ink-3);
  margin-left: 4px;
  font-weight: 400;
}

.stat__bar {
  display: flex;
  height: 5px;
  margin-top: 10px;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.stat__bar span {
  height: 100%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
  transition: width 1.2s var(--ease-out);
}

.stat__rows {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  font-size: 12.5px;
}

.stat__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-2);
}

.stat__row b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 8px;
  background: var(--c);
  box-shadow: 0 0 8px var(--c);
}

/* ------------------------------------------------------------------ views */

.views {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.view {
  position: absolute;
  inset: 0;
}

.view > * {
  pointer-events: auto;
}

.view--panel {
  overflow: auto;
  padding: calc(var(--topbar-h) + 18px) 22px calc(var(--horizon-h) + 26px);
  background: radial-gradient(ellipse at 50% 40%, rgba(3, 4, 10, 0.35), rgba(3, 4, 10, 0.82) 70%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
  animation: fade-up 0.6s var(--ease-out) both;
}

.panel {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 28px;
}

.panel + .panel {
  margin-top: 18px;
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--gold);
}

.title {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.lede {
  margin: 6px 0 0;
  color: var(--ink-3);
  max-width: 62ch;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar .input {
  width: 260px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  --c: var(--ink-3);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink-2);
}

.chip[aria-pressed="true"] {
  border-color: color-mix(in oklab, var(--c) 60%, transparent);
  background: color-mix(in oklab, var(--c) 16%, transparent);
  color: var(--ink);
}

/* table */
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: rgba(10, 12, 20, 0.92);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

th button {
  all: unset;
  cursor: pointer;
}

th button:focus-visible {
  outline: 2px solid var(--gold);
}

th[aria-sort="ascending"] button::after {
  content: " ↑";
}

th[aria-sort="descending"] button::after {
  content: " ↓";
}

tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

tbody tr:hover,
tbody tr:focus-visible {
  background: rgba(255, 255, 255, 0.04);
}

tbody tr:last-child td {
  border-bottom: 0;
}

.cell-title {
  display: grid;
  line-height: 1.25;
}

.cell-title small {
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 11.5px;
}

.score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.score__bar {
  width: 54px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.score__bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ember), var(--gold), var(--ok));
  background-size: 54px 100%;
}

.muted {
  color: var(--ink-3);
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--ink-3);
}

/* observatory overlays */
.legend {
  position: fixed;
  left: 22px;
  bottom: calc(var(--horizon-h) + 18px);
  max-width: 300px;
  padding: 16px 18px;
  font-size: 12.5px;
  color: var(--ink-2);
  animation: slide-right 1.2s var(--ease-out) both 0.9s;
}

.legend__title {
  margin: 0 0 4px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.legend__text {
  margin: 0 0 10px;
  color: var(--ink-3);
}

.legend__items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}

.legend__items span {
  display: flex;
  align-items: center;
}

.tooltip {
  position: fixed;
  z-index: 30;
  min-width: 220px;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 12.5px;
  pointer-events: none;
  transform: translate(18px, -50%);
  animation: fade-in 0.18s ease-out both;
}

.tooltip h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.tooltip dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin: 8px 0 0;
}

.tooltip dt {
  color: var(--ink-3);
}

.tooltip dd {
  margin: 0;
}

.empty-state {
  position: fixed;
  left: 50%;
  top: 64%;
  transform: translateX(-50%);
  max-width: 460px;
  padding: 20px 24px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 6px;
  font-weight: 400;
  font-size: 19px;
}

.empty-state p {
  margin: 0;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ drawer */

.drawer {
  position: fixed;
  z-index: 25;
  top: calc(var(--topbar-h) + 10px);
  right: 16px;
  bottom: calc(var(--horizon-h) + 14px);
  width: min(500px, calc(100vw - 32px));
  overflow: auto;
  padding: 0;
  border-radius: 24px;
  background: var(--glass-strong);
  transform: translateX(calc(100% + 40px));
  transition: transform 0.7s var(--ease-out);
}

.drawer.is-open {
  transform: none;
}

.drawer__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 20px 22px 16px;
  background: linear-gradient(to bottom, rgba(9, 11, 19, 0.98) 70%, rgba(9, 11, 19, 0));
}

.drawer__planet {
  --c: var(--ok);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 34% 30%,
    color-mix(in oklab, var(--c) 30%, white) 0%,
    var(--c) 32%,
    color-mix(in oklab, var(--c) 35%, black) 74%,
    #020206 100%
  );
  box-shadow: 0 0 34px color-mix(in oklab, var(--c) 55%, transparent);
}

.drawer__title {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.drawer__sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--mono);
}

.drawer__body {
  display: grid;
  gap: 14px;
  padding: 0 22px 24px;
}

.section {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.drawer.is-entering .section {
  animation: fade-up 0.6s var(--ease-out) both;
}

.drawer.is-entering .section:nth-child(2) {
  animation-delay: 0.05s;
}
.drawer.is-entering .section:nth-child(3) {
  animation-delay: 0.1s;
}
.drawer.is-entering .section:nth-child(4) {
  animation-delay: 0.15s;
}
.drawer.is-entering .section:nth-child(5) {
  animation-delay: 0.2s;
}
.drawer.is-entering .section:nth-child(6) {
  animation-delay: 0.25s;
}

.section__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-3);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.facts div {
  min-width: 0;
}

.facts dt {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.facts dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.gauge {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
}

.gauge svg {
  width: 112px;
  height: 112px;
  transform: rotate(-90deg);
}

.gauge circle {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
}

.gauge .track {
  stroke: rgba(255, 255, 255, 0.07);
}

.gauge .value {
  stroke: url(#gauge-gradient);
  transition: stroke-dashoffset 1.8s var(--ease-out);
}

.gauge__center {
  position: relative;
}

.gauge__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 30px;
  font-weight: 250;
  font-variant-numeric: tabular-nums;
}

.gauge__label small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.list li > span:first-child {
  overflow-wrap: anywhere;
}

.spark {
  width: 100%;
  height: 64px;
  overflow: visible;
}

.spark .area {
  fill: url(#spark-gradient);
}

.spark .line {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.spark .pt {
  fill: var(--gold-2);
}

.probe-strip {
  display: flex;
  gap: 2px;
  height: 16px;
  margin-top: 10px;
}

.probe-strip span {
  flex: 1;
  border-radius: 2px;
  background: var(--c);
  opacity: 0.75;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: end;
}

.inline-form .field {
  flex: 1;
}

.callout {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid color-mix(in oklab, var(--c, var(--gold)) 40%, transparent);
  background: color-mix(in oklab, var(--c, var(--gold)) 10%, transparent);
  color: var(--ink-2);
}

.secret-box {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px dashed color-mix(in oklab, var(--gold) 50%, transparent);
  font-family: var(--mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.secret-box code {
  flex: 1;
}

pre.snippet {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink-2);
}

/* dependency search */
.big-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.big-number {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.big-number b {
  display: block;
  font-size: 40px;
  font-weight: 200;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.big-number span {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

.big-number.tone-critical b {
  color: #ffb3bf;
}

/* ------------------------------------------------------------------ event horizon ticker */

.horizon {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--horizon-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  border-top: 1px solid var(--line);
  background: linear-gradient(to top, rgba(3, 4, 10, 0.92), rgba(3, 4, 10, 0.55));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 12.5px;
  animation: rise 1.2s var(--ease-out) both 1s;
}

.horizon__label {
  flex: none;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
}

.horizon__track {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.horizon__lane {
  display: inline-flex;
  gap: 34px;
  white-space: nowrap;
  animation: ticker var(--ticker-duration, 60s) linear infinite;
}

.horizon__track:hover .horizon__lane {
  animation-play-state: paused;
}

.horizon__event {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
}

.horizon__event time {
  color: var(--ink-4);
}

.horizon__registry {
  flex: none;
  color: var(--ink-3);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------------ login */

.login {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at center, transparent 20%, rgba(3, 4, 10, 0.55) 75%);
}

.login__card {
  width: min(400px, 100%);
  display: grid;
  gap: 14px;
  padding: 34px 32px 26px;
  text-align: center;
  animation: arrive 1.4s var(--ease-out) both 0.6s;
}

.login__mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 4px;
  border-radius: 50%;
  background: radial-gradient(circle, #000 0 36%, #fff3d6 42%, var(--gold) 50%, rgba(255, 122, 47, 0.3) 64%, transparent 71%);
  box-shadow: 0 0 50px rgba(255, 170, 70, 0.5);
  animation: breathe-glow 5s ease-in-out infinite;
}

@keyframes breathe-glow {
  50% {
    box-shadow: 0 0 80px rgba(255, 170, 70, 0.75);
  }
}

.login__title {
  margin: 0;
  font-size: 26px;
  font-weight: 200;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #fff, var(--gold-2) 55%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login__sub {
  margin: -8px 0 10px;
  font-size: 11px;
  letter-spacing: 0.38em;
  text-indent: 0.38em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.login__error {
  margin: 0;
  color: #ffb3bf;
  font-size: 13px;
}

.login__hint {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--ink-4);
}

/* ------------------------------------------------------------------ misc */

.toasts {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(var(--horizon-h) + 20px);
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  justify-items: center;
  pointer-events: none;
}

.toast {
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--line-2);
  font-size: 13.5px;
  box-shadow: var(--shadow);
  animation: toast 4.2s var(--ease-out) both;
}

.toast.tone-critical {
  border-color: color-mix(in oklab, var(--critical) 50%, transparent);
}

@keyframes toast {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  8%,
  88% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.noscript {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@keyframes drop-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes slide-left {
  from {
    opacity: 0;
    transform: translateX(26px);
  }
}

@keyframes slide-right {
  from {
    opacity: 0;
    transform: translateX(-26px);
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
    filter: blur(8px);
  }
}

body.is-booting .topbar,
body.is-booting .hud,
body.is-booting .horizon {
  visibility: hidden;
}

body.drawer-open .hud,
body.view-panel .worlds,
body.view-panel .legend,
body.view-panel .hud {
  opacity: 0;
  pointer-events: none;
}

.worlds,
.hud,
.legend {
  transition: opacity 0.5s var(--ease-out);
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .hud {
    width: 210px;
  }
  .legend {
    display: none;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar-h: 60px;
  }
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 14px;
  }
  .brand__sub {
    display: none;
  }
  .nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--horizon-h) + 10px);
    justify-content: space-between;
    overflow-x: auto;
  }
  .nav a {
    padding: 8px 10px;
    font-size: 12.5px;
  }
  .hud {
    left: 12px;
    right: 12px;
    width: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .hud .stat:nth-child(n + 3) {
    display: none;
  }
  .hud {
    top: calc(var(--topbar-h) + 22px);
  }
  .stat {
    padding: 10px 12px;
  }
  .stat__value {
    font-size: 22px;
  }
  .stat__rows {
    font-size: 11.5px;
  }
  .live__text {
    display: none;
  }
  .drawer {
    inset: 8px;
    width: auto;
    top: 8px;
    bottom: 8px;
    z-index: 50;
  }
  .view--panel {
    padding: calc(var(--topbar-h) + 10px) 12px calc(var(--horizon-h) + 80px);
  }
  .panel {
    padding: 20px 16px;
  }
  .toolbar .input {
    width: 100%;
  }
  .big-numbers {
    grid-template-columns: 1fr;
  }
  .horizon__registry {
    display: none;
  }
  .facts {
    grid-template-columns: 1fr;
  }
  .world__label {
    display: none;
  }
  .world[data-tone="critical"] .world__label {
    display: block;
  }
}

/* biome-ignore-start lint/complexity/noImportantStyles: reduced motion overrides every animation */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .horizon__lane {
    animation: none !important;
    flex-wrap: wrap;
  }
}
/* biome-ignore-end lint/complexity/noImportantStyles: reduced motion overrides every animation */
