:root {
  color-scheme: dark;
  --ops-background: #080a09;
  --ops-text: #e7e9e5;
  --ops-muted: #8d948f;
  --ops-green: #75d69a;
  --ops-focus: #c5f8d6;
}

* { box-sizing: border-box; }

.ops-root {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--ops-background);
  color: var(--ops-text);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  line-height: 1.6;
}

.ops-shell {
  width: min(100% - 3rem, 58rem);
  margin-inline: auto;
  padding-block: clamp(5rem, 14vh, 10rem) 4rem;
}

.ops-shell h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}

/*
 * Masthead interference, shared with Sundial's NULL//OPS lockup (#398,
 * site/public/sundial/sundial.css; keep the timings in step). Two colour-split
 * copies of the wordmark tear sideways in short bursts, and a scanline band
 * wipes through it. Each burst is two ~90 ms frames, seconds apart: well under
 * three flashes a second. The copies come from `data-text` on the lockup and
 * carry empty alt text, and the heading keeps its own aria-label, so a screen
 * reader hears NULL//OPS once. signal.js keeps the heading's ::after for its
 * tear, so these live on the lockup and the heading's ::before.
 */
.ops-lockup {
  position: relative;
  isolation: isolate;
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
}

.ops-lockup::before,
.ops-lockup::after {
  content: attr(data-text);
  content: attr(data-text) / "";
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.ops-lockup::before {
  color: rgb(255 40 90);
  clip-path: inset(8% 0 57% 0);
  animation: ops-tear-a 8.5s steps(1, end) infinite;
}

.ops-lockup::after {
  color: rgb(40 220 255);
  clip-path: inset(58% 0 8% 0);
  animation: ops-tear-b 8.5s steps(1, end) infinite;
}

.ops-lockup h1 { position: relative; }

.ops-lockup h1::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(180deg, transparent 0 43%, var(--ops-background) 43% 49%, transparent 49% 100%);
  opacity: 0;
  pointer-events: none;
  animation: ops-scan 11s steps(1, end) infinite;
}

@keyframes ops-tear-a {
  0%, 11%, 14%, 54%, 57%, 100% { opacity: 0; transform: translate(0); }
  12% { opacity: 0.85; transform: translate(-0.22rem, -0.03rem); }
  13% { opacity: 0.65; transform: translate(0.3rem, 0.03rem); }
  55% { opacity: 0.75; transform: translate(0.18rem); }
  56% { opacity: 0.45; transform: translate(-0.1rem); }
}

@keyframes ops-tear-b {
  0%, 12%, 15%, 55%, 58%, 100% { opacity: 0; transform: translate(0); }
  13% { opacity: 0.75; transform: translate(0.28rem, 0.04rem); }
  14% { opacity: 0.55; transform: translate(-0.16rem); }
  56% { opacity: 0.8; transform: translate(-0.24rem); }
  57% { opacity: 0.5; transform: translate(0.12rem); }
}

@keyframes ops-scan {
  0%, 30%, 33%, 78%, 81%, 100% { opacity: 0; transform: translateY(-70%); }
  31% { opacity: 0.9; transform: translateY(10%); }
  32% { opacity: 0.55; transform: translateY(70%); }
  79% { opacity: 0.7; transform: translateY(-5%); }
  80% { opacity: 0.4; transform: translateY(55%); }
}

.eyebrow,
.status h2,
.ops-footer {
  color: var(--ops-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}

.eyebrow { margin: 1.25rem 0 0; }

.brief {
  max-width: 43rem;
  margin-top: clamp(5rem, 12vh, 9rem);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.brief p { margin: 0 0 1.5rem; }

.status { margin-top: clamp(5rem, 12vh, 8rem); }

.status h2 {
  margin: 0 0 0.75rem;
  font-weight: 400;
}

.status p {
  margin: 0;
  color: var(--ops-green);
  font-size: 0.875rem;
  letter-spacing: 0.14em;
}

.status-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.65rem;
  border-radius: 50%;
  background: currentcolor;
  box-shadow: 0 0 0.4rem rgb(117 214 154 / 60%);
}

/* A small green status light: the normal state reads healthy/online. */
.ops-led {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--ops-green);
  box-shadow: 0 0 0.35rem rgb(117 214 154 / 65%);
}

.subsystems {
  display: grid;
  gap: 0.2rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--ops-muted);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

/* Fixed tracks, packed to the start: with `auto` tracks and the default
 * `justify-content: normal`, the grid stretched the light and value columns
 * across the whole row and left the lights stranded at the far left. */
.subsystems li {
  display: grid;
  grid-template-columns: 0.45rem 19ch max-content;
  justify-content: start;
  align-items: center;
  column-gap: 1rem;
}


.subsystems [data-sig-status] { color: var(--ops-green); opacity: 0.8; }

/*
 * Signal primitives. signal.js toggles these classes briefly at random,
 * independent intervals; without the script (or with reduced motion) the page
 * is static. Reusable on any public NullOps surface via data-sig attributes.
 */
.ops-root { overflow-x: clip; }

.sig-chroma {
  text-shadow:
    calc(-1 * var(--sig-chroma-x, 4px)) 0 rgb(255 40 90 / 80%),
    var(--sig-chroma-x, 4px) 0 rgb(40 220 255 / 80%);
}

.sig-tear { position: relative; }

.sig-tear::after {
  content: attr(data-sig-text);
  position: absolute;
  inset: 0;
  background: var(--ops-background);
  text-shadow: -2px 0 rgb(255 40 90 / 60%), 2px 0 rgb(40 220 255 / 60%);
  clip-path: inset(var(--sig-tear-top, 40%) 0 var(--sig-tear-bottom, 45%) 0);
  transform: translateX(var(--sig-tear-x, 12px));
  pointer-events: none;
}

.sig-shift > * { transform: translateX(var(--sig-shift-x, 8px)); }

.sig-flicker { animation: sig-flicker 400ms steps(1, end); }

@keyframes sig-flicker {
  0% { opacity: 0.05; }
  35% { opacity: 1; }
  60% { opacity: 0.1; }
  100% { opacity: 1; }
}

.sig-blank { visibility: hidden; }

.sig-led-off { background: #1d2420; box-shadow: none; }

.sig-led-fault {
  background: #d6a64a;
  box-shadow: 0 0 0.35rem rgb(214 166 74 / 65%);
}

.ops-footer {
  width: min(100% - 3rem, 58rem);
  margin-inline: auto;
  padding-block: 1.5rem 2.25rem;
}

.ops-footer p { margin: 0; }

.ops-footer a {
  color: inherit;
  text-underline-offset: 0.25em;
}

.ops-footer a:hover { color: var(--ops-text); }

.ops-footer a:focus-visible {
  outline: 2px solid var(--ops-focus);
  outline-offset: 0.35rem;
}

@media (max-width: 36rem) {
  .ops-shell,
  .ops-footer { width: min(100% - 2rem, 58rem); }
  .ops-shell { padding-block: 4rem 3rem; }
  .brief,
  .status { margin-top: 4.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .ops-lockup::before,
  .ops-lockup::after,
  .ops-lockup h1::before { content: none; animation: none; }
  .sig-chroma { text-shadow: none; }
  .sig-tear::after { content: none; }
  .sig-shift > * { transform: none; }
  .sig-flicker { animation: none; }
  .sig-blank { visibility: visible; }
  .sig-led-off,
  .sig-led-fault {
    background: var(--ops-green);
    box-shadow: 0 0 0.35rem rgb(117 214 154 / 65%);
  }
}
