/* index.base.css — public terminal site (index.html): design tokens, reset and base. One of the index.*.css files, linked in order from index.html. */
/* Two layers, so it is never a question of which rule wins: "page" holds the normal stylesheet rules, "element" holds exact
   styles for single elements. Anything in "element" beats anything in "page", whatever the selectors look like. */
@layer page, element;

@layer page {
/* ─────────────────────────────────────────
   DESIGN TOKENS
   ───────────────────────────────────────── */
:root {
  --bg: #0a0a0a;
  --bg-surface: #111111;
  --bg-elevated: #1a1a1a;
  --text: #c8c8b4;
  --text-dim: #6a6a5e;
  --text-bright: #e0e0cc;
  --accent: #8b9a3c;
  --accent-dim: #5c6628;
  --danger: #9a3c3c;
  --border: #2a2a24;
  --font-mono: 'Courier New', 'Lucida Console', monospace;
  --grain-opacity: 0.04;
  --scanline-opacity: 0.03;
}

/* ─────────────────────────────────────────
   RESET + BASE
   ───────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* CRT grain */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
}

/* Scanlines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.15) 2px,
    rgba(0, 0, 0, 0.15) 4px
  );
  opacity: var(--scanline-opacity);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
}

/* elements that start hidden: see index.wire.js */
@layer element {
  [data-start-hidden] { display: none; }
}
