/* Megabyte.world — design tokens and base.
 *
 * The parent site is the operator, not a game. Everything here reads as a
 * machine room: dark indigo steel, monospace readouts, status lamps. Each game
 * brings its own accent, but only inside its own rack unit — the chrome around
 * it stays the logo's blue so the network reads as one thing.
 */

:root {
  /* Ground and steel. Indigo-black rather than pure black, so the logo's own
     glow has something to sit on instead of disappearing into a void. */
  --void: #0a0d16;
  --rack: #121727;
  --rack-hi: #171d31;
  --rail: #222b45;
  --chrome: #2f3a5c;

  --text: #e9ecf6;
  --dim: #8f9bb8;
  --faint: #55618044;

  /* The one brand accent: the electric blue of the orbit ring in the logo.
     Chrome, focus rings, section eyebrows. Taken from the logo rather than
     chosen next to it — the page and the mark have to read as one thing. */
  --brand: #2e9bff;
  --brand-dim: #1a4d80;

  /* Status colours, and only status colours. Green is a node answering, amber
     is a node answering badly, red is a node down — so a coloured pixel on
     this page always means a machine said something. Nothing decorative may
     use them, which is why the brand accent is a separate token. */
  --live: #4ee08a;
  --wait: #f5a623;
  --down: #ff5c47;

  --radius: 4px;
  --font: 'Prompt', 'Noto Sans Thai', 'Segoe UI', system-ui, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'Cascadia Code', Consolas, 'DejaVu Sans Mono', monospace;

  --shell: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The rack rails: two faint vertical lines the whole page hangs between. They
   are the only ambient decoration, and they are structural — every section
   aligns to them. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(var(--faint), var(--faint)) calc(50% - var(--shell) / 2) 0 / 1px 100% no-repeat,
    linear-gradient(var(--faint), var(--faint)) calc(50% + var(--shell) / 2) 0 / 1px 100% no-repeat;
}

@media (max-width: 1240px) {
  body::before { display: none; }
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.shell {
  width: min(100% - 40px, var(--shell));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* The utility voice: labels, counts, hostnames and unit numbers.
 *
 * Latin and digits only. Thai has no case and no word spaces, so uppercasing
 * does nothing and wide tracking pulls the marks of a cluster apart from the
 * consonant they belong to — it reads as damage, not as emphasis. Every Thai
 * string on this page stays in Prompt at normal tracking. */
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
