:root {
  --bg: #04060c;
  --ink: #eef2ff;
  --dim: #8b93b5;
  --c-backlog: #a78bfa;
  --c-building: #fbbf24;
  --c-qa: #22d3ee;
  --c-live: #34d399;
  --font: "Inter", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: var(--bg); overflow: hidden; }
body { font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }
html:not(.ready) #stage { visibility: hidden; }

#stage {
  position: absolute; left: 50%; top: 50%;
  width: 1920px; height: 1080px;
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% 38%, rgba(56, 70, 140, 0.28), transparent 70%),
    radial-gradient(900px 600px at 10% 90%, rgba(120, 60, 200, 0.14), transparent 70%),
    radial-gradient(900px 600px at 95% 85%, rgba(20, 160, 120, 0.12), transparent 70%),
    var(--bg);
}
#grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(140, 160, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 160, 255, 0.045) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(1000px 700px at 50% 45%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(1000px 700px at 50% 45%, #000 30%, transparent 85%);
  animation: gridDrift 40s linear infinite;
}
@keyframes gridDrift { to { background-position: 60px 0, 60px 0; } }
canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#fx { z-index: 1; }
#fxTop { z-index: 6; pointer-events: none; }

header {
  position: absolute; left: 70px; right: 70px; top: 44px; height: 90px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 22px; }
.logo {
  width: 58px; height: 58px; border-radius: 16px;
  background: conic-gradient(from 200deg, var(--c-backlog), var(--c-building), var(--c-qa), var(--c-live), var(--c-backlog));
  box-shadow: 0 0 30px rgba(120, 200, 255, 0.35);
  position: relative;
}
.logo::after { content: ""; position: absolute; inset: 7px; border-radius: 11px; background: #070a14; }
.logo::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px;
  border-radius: 50%; background: var(--c-live); z-index: 1; box-shadow: 0 0 16px var(--c-live);
  animation: breathe 3s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(0.7); opacity: 0.7; } }
.title { font-size: 44px; font-weight: 800; letter-spacing: -0.5px; }
.title span { color: var(--dim); font-weight: 500; }
.meta { font-size: 19px; color: var(--dim); margin-top: 4px; letter-spacing: 0.2px; }
#runners { position: absolute; left: 70px; top: 132px; z-index: 10; font-size: 14px; color: var(--dim); }
#runners summary { cursor: pointer; padding: 4px 10px; border: 1px solid #ffffff20; border-radius: 8px; background: #080c18; width: fit-content; }
#runners.needs-attention summary { color: #fbbf24; }
.runner-details { position: absolute; top: 100%; left: 0; width: 520px; max-height: 360px; overflow: auto; margin-top: 8px; padding: 16px; background: #080c18; border: 1px solid #ffffff30; border-radius: 12px; box-shadow: 0 10px 30px #000a; line-height: 1.5; }
.runner-details p + p { margin-top: 10px; }
.clock { text-align: right; position: relative; }
.clock .time { font-size: 52px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.clock .date { font-size: 19px; color: var(--dim); margin-top: 2px; }
.countdown {
  position: absolute; right: 0; top: 100%; margin-top: 2px;
  font-size: 17px; color: var(--dim); letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap;
  animation: none; transition: none;
}
.countdown:empty { display: none; }

.label {
  position: absolute; width: 400px; text-align: center; z-index: 4;
  font-size: 30px; font-weight: 800; letter-spacing: 6px; text-transform: uppercase;
}
.node {
  position: absolute; width: 270px; height: 270px; border-radius: 50%; z-index: 3;
  transition: transform 0.6s cubic-bezier(.2, .9, .3, 1.3);
}
.node .ring {
  position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--c) 90deg, transparent 180deg, var(--c) 270deg, transparent 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: spin 9s linear infinite; opacity: 0.9;
}
.node:nth-of-type(2n) .ring { animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.node .core {
  position: absolute; inset: 6px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.07), rgba(8, 11, 22, 0.96) 60%), #070a14;
  box-shadow: inset 0 0 50px color-mix(in srgb, var(--c) 30%, transparent), 0 0 60px color-mix(in srgb, var(--c) 28%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  transition: box-shadow 0.6s ease;
}
.node .count {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 112px; font-weight: 800; letter-spacing: -3px; color: #fff;
  filter: drop-shadow(0 0 16px color-mix(in srgb, var(--c) 75%, transparent));
}
.node.bump { transform: scale(1.07); }
.node.bump .core { box-shadow: inset 0 0 70px color-mix(in srgb, var(--c) 55%, transparent), 0 0 110px color-mix(in srgb, var(--c) 55%, transparent); }
.node.dip { transform: scale(0.96); }
.sub { position: absolute; width: 400px; text-align: center; z-index: 4; font-size: 21px; color: var(--dim); font-weight: 500; }
.sub.shipped { color: var(--c-live); font-weight: 700; font-size: 23px; display: flex; justify-content: center; align-items: center; line-height: 1; white-space: pre; }
.sub.shipped .odo { font-size: 23px; }
.sub.shipped .dg { width: 0.6em; }

.odo { display: inline-flex; line-height: 1; height: 1em; overflow: hidden; font-variant-numeric: tabular-nums; vertical-align: top; }
.dg { display: inline-block; height: 1em; overflow: hidden; width: 0.62em; text-align: center; }
.strip { display: flex; flex-direction: column; transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.strip > span { height: 1em; display: block; }

.col { position: absolute; width: 400px; height: 420px; z-index: 4; }
.col-scroll {
  position: relative; height: 336px; overflow-x: hidden; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--c) 55%, transparent) transparent;
}
.col-spacer { width: 1px; pointer-events: none; }
a.chip { color: inherit; text-decoration: none; cursor: pointer; }
.chip {
  position: absolute; left: 0; top: 0; width: 400px; height: 74px;
  display: flex; align-items: center; gap: 14px; padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-left: 4px solid var(--c);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.7s cubic-bezier(.2, .8, .2, 1), opacity 0.5s ease, box-shadow 1.2s ease, border-color 1.2s ease;
  will-change: transform, opacity;
}
.chip .num { font-size: 22px; font-weight: 800; color: var(--c); font-variant-numeric: tabular-nums; flex: none; }
.chip .t {
  flex: 1; min-width: 0;
  font-size: 19px; line-height: 1.22; font-weight: 500; color: rgba(238, 242, 255, 0.9);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.chip .agent {
  flex: none; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 700; line-height: 1; letter-spacing: 0.02em; color: var(--c);
  background: color-mix(in srgb, var(--c) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: 999px; padding: 5px 8px;
}
.chip.fresh { box-shadow: 0 0 34px color-mix(in srgb, var(--c) 45%, transparent), 0 8px 24px rgba(0, 0, 0, 0.35); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.more { position: absolute; left: 0; top: 342px; width: 400px; text-align: center; font-size: 18px; color: var(--dim); transition: transform 0.7s cubic-bezier(.2, .8, .2, 1); }
.more:not(:empty) { cursor: pointer; }

.flyer {
  position: absolute; left: 0; top: 0; z-index: 7; width: 330px; height: 70px;
  display: flex; align-items: center; gap: 12px; padding: 0 18px; border-radius: 18px;
  background: linear-gradient(180deg, rgba(30, 38, 70, 0.96), rgba(14, 18, 36, 0.96));
  border: 1.5px solid var(--c);
  box-shadow: 0 0 40px color-mix(in srgb, var(--c) 60%, transparent), 0 14px 40px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}
.flyer .num { font-size: 23px; font-weight: 800; color: var(--c); flex: none; }
.flyer .t { font-size: 19px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

#ticker {
  position: absolute; left: 70px; right: 70px; bottom: 34px; height: 64px; z-index: 5;
  display: flex; align-items: center; gap: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 18px;
}
#ticker .lbl { font-size: 15px; font-weight: 800; letter-spacing: 3px; color: var(--dim); flex: none; }
#moves { position: relative; flex: 1; height: 40px; overflow: hidden;
  mask-image: linear-gradient(90deg, #000 75%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 75%, transparent); }
#moves .row { position: absolute; left: 0; top: 0; display: flex; gap: 46px; white-space: nowrap; transition: transform 0.9s cubic-bezier(.2, .8, .2, 1); }
.mv { font-size: 19px; color: rgba(238, 242, 255, 0.82); display: flex; gap: 10px; align-items: baseline; }
.mv .tm { color: var(--dim); font-variant-numeric: tabular-nums; }
.mv b { font-weight: 800; }
.mv .arrow { font-weight: 700; }
.mv.enter { animation: mvIn 0.9s cubic-bezier(.2, .8, .2, 1); }
@keyframes mvIn { from { opacity: 0; transform: translateY(14px); } }
#poll { font-size: 15px; color: var(--dim); flex: none; font-variant-numeric: tabular-nums; }
#live {
  display: flex; align-items: center; gap: 8px; max-width: 640px; overflow-x: auto;
  flex: none; scrollbar-width: thin;
}
#live:empty { display: none; }
.live-item {
  flex: none; font-size: 15px; font-weight: 700; border-radius: 999px; padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}
.live-item.working { color: var(--c-live); }
.live-item.blocked { color: #f87171; }

.chrome {
  position: absolute; left: 50%; top: 58px; z-index: 8;
  display: flex; align-items: center; gap: 12px;
  transform: translateX(-50%);
  opacity: 0; pointer-events: none;
  transition: opacity 0.45s ease;
}
html.chrome-hot .chrome { opacity: 1; pointer-events: auto; }
.chrome label { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 15px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.chrome select, .chrome button {
  font: 600 18px/1 var(--font); color: var(--ink);
  background: rgba(7, 10, 20, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px; padding: 10px 16px;
  color-scheme: dark; cursor: pointer;
}
.chrome select { min-width: 320px; }
.chrome button:hover, .chrome select:hover { border-color: rgba(255, 255, 255, 0.32); }
.chrome button:disabled,
.chrome button[aria-disabled="true"] { opacity: 0.38; cursor: default; }
.chrome button:disabled:hover,
.chrome button[aria-disabled="true"]:hover { border-color: rgba(255, 255, 255, 0.14); }
.replay-wrap { position: relative; }
.replay-status {
  position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%);
  margin: 0; white-space: nowrap; pointer-events: none;
  font: 600 15px/1.3 var(--font); color: var(--dim);
}
.replay-status:empty { display: none; }

#gate {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 50% 40%, rgba(56, 70, 140, 0.28), transparent 70%),
    var(--bg);
}
html.seed #gate, #gate[hidden] { display: none; }
html.seed .countdown { display: none; }
.gate-card { text-align: center; max-width: 640px; padding: 24px; }
.gate-card .logo { margin: 0 auto 22px; }
.gate-card h1 { font-size: 48px; font-weight: 800; letter-spacing: -0.5px; }
.gate-card h1 span { color: var(--dim); font-weight: 500; }
.gate-card button {
  margin-top: 28px; font: 700 20px/1 var(--font); color: white; cursor: pointer;
  padding: 16px 28px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18); background: #141a30;
}
.gate-card button:hover { border-color: rgba(255, 255, 255, 0.4); }
.gate-note { color: var(--dim); margin-top: 18px; font-size: 18px; line-height: 1.45; }

html.is-reduced .ring,
html.is-reduced #grid,
html.is-reduced .logo::before,
html.is-reduced .strip,
html.is-reduced .mv.enter,
html.is-reduced .countdown { animation: none; }
html.is-reduced .strip,
html.is-reduced .countdown { transition: none; }
html.kiosk:not(.chrome-hot),
html.kiosk:not(.chrome-hot) body { cursor: none; }

@media (prefers-reduced-motion: reduce) {
  .ring, #grid, .logo::before, .countdown { animation: none; }
  .countdown { transition: none; }
}

/* Geometry variables are set together with the canvas and flight coordinates. */
.col, .chip, .more { width: var(--column-width, 400px); }
.col { height: calc(var(--scroll-height, 336px) + 32px); }
.col-scroll { height: var(--scroll-height, 336px); }
.chip { height: var(--chip-height, 74px); }
.more { top: calc(var(--scroll-height, 336px) + 6px); }
.wide header { top: 20px; height: 80px; }
.wide .chrome { top: 30px; }
.wide #runners { top: 96px; }
.wide .label { font-size: 24px; letter-spacing: 4px; }
.wide .node .count { font-size: 76px; }
.wide .sub, .wide .sub.shipped, .wide .sub.shipped .odo { font-size: 18px; }
.wide #ticker { bottom: 12px; height: 46px; padding-top: 10px; }
.chrome:has(:focus-visible) { opacity: 1; pointer-events: auto; }
.fullscreen-status { position: absolute; top: 100%; right: 0; max-width: 420px; margin-top: 8px; color: var(--ink); font-size: 15px; }

/* Ambient motion is not evidence of work. Only leased execution starts a ring. */
#grid, .logo::before { animation: none; }
.node .ring { animation-play-state: paused; }
.node.is-working .ring { animation-play-state: running; }
.chip.is-working { border-color: var(--c); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 30%, transparent); }
.chip.is-blocked { border-left-color: #fbbf24; }
.execution-marker { flex: none; font-size: 12px; font-weight: 700; color: var(--c); }
.chip.is-blocked .execution-marker, .live-item.blocked { color: #fbbf24; }
.activity-status { flex: none; color: var(--dim); font-size: 15px; }
#live { max-width: 48%; }
