/* v1.1.0: self-hosted pixel UI typeface, Silkscreen 400/700 (original files,
   SIL Open Font License 1.1 - static/fonts/silkscreen/OFL.txt, SOURCE.md). */
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/silkscreen/Silkscreen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("../fonts/silkscreen/Silkscreen-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   TVX design tokens — the single source of truth for color, space, and type.
   Every component in tvx.css references these variables; no hard-coded
   palette values outside this file (shadows/overlays excepted).
   Original TVX "Overworld Cyber" palette — evocative of blocks, ores, caves
   and forests, but an original composition (not Minecraft assets).
   ========================================================================== */

:root {
  /* ---- Surfaces: deep basalt cave -> mossy stone -> lit panel ------------- */
  --tvx-bg: #0b0f0e;
  --tvx-bg-deep: #070a09;
  --tvx-surface: #121816;
  --tvx-surface-2: #182019;
  --tvx-elevated: #1f2922;
  --tvx-overlay: rgba(7, 10, 9, 0.72);

  /* ---- World atmosphere tints (one world, subtle per-page weather) -------- */
  --tvx-world-glow: rgba(70, 224, 168, 0.08);
  --tvx-world-accent: var(--tvx-primary);

  /* ---- Brand ------------------------------------------------------------- */
  --tvx-primary: #46e0a8;        /* mint/diamond accent */
  --tvx-primary-dim: #1d7a5c;
  --tvx-primary-ink: #06231a;    /* text on primary fills */
  --tvx-secondary: #7bc96f;      /* moss green */
  --tvx-accent: #4de3ff;         /* diamond cyan */
  --tvx-gold: #ffc857;           /* xp / legendary */
  --tvx-ember: #ff7a59;          /* nether ember */
  --tvx-portal: #b48cff;         /* arcane violet */

  /* ---- Text -------------------------------------------------------------- */
  --tvx-text: #e8f1ec;
  --tvx-muted: #9db3a8;
  --tvx-faint: #6b7f74;
  --tvx-link: var(--tvx-accent);

  /* ---- Lines ------------------------------------------------------------- */
  --tvx-border: #2b3a32;
  --tvx-border-bright: #3f544a;
  --tvx-block-hi: rgba(255, 255, 255, 0.14);  /* top bevel light */
  --tvx-block-lo: rgba(0, 0, 0, 0.45);        /* bottom bevel shade */

  /* ---- Status ------------------------------------------------------------ */
  --tvx-success: #4ade80;
  --tvx-warning: #fbbf24;
  --tvx-danger: #ff5d5d;
  --tvx-info: #4de3ff;

  /* ---- Rarity ramp (Easy -> Insane) -------------------------------------- */
  --tvx-rarity-common: #9aa7b4;
  --tvx-rarity-uncommon: #4ade80;
  --tvx-rarity-rare: #4de3ff;
  --tvx-rarity-epic: #b48cff;
  --tvx-rarity-legendary: #ffc857;
  --tvx-rarity-insane: #ff5d5d;

  /* ---- Category biomes (original concepts, changeable) ------------------- */
  --tvx-cat-web: #5ac86e;        /* forest / vines / circuitry */
  --tvx-cat-crypto: #e0b34e;     /* desert / ancient structures */
  --tvx-cat-forensics: #9aa7b4;  /* mine / excavation */
  --tvx-cat-osint: #6fb7d6;      /* village / maps */
  --tvx-cat-reverse: #c26be8;    /* nether / machinery */
  --tvx-cat-pwn: #ff7a59;        /* fortress / obsidian ember */
  --tvx-cat-misc: #4de3ff;       /* laboratory (legacy, kept as fallback) */
  /* Phase 8: the eight official categories. dfir keeps the old forensics
     grey-blue; cloud + malware are new, chosen distinct from every other. */
  --tvx-cat-dfir: #9aa7b4;       /* mine / excavation */
  --tvx-cat-cloud: #8ec7ff;      /* sky islands / servers */
  --tvx-cat-malware: #e86bd0;    /* quarantine / biohazard */
  --tvx-cat-bonus: #2fe39a;      /* final2-dev: emerald bonus vault */

  /* ---- Medals (scoreboard top 3) ---------------------------------------- */
  --tvx-gold-1: #ffd76a;
  --tvx-silver-2: #cfd8dc;
  --tvx-bronze-3: #e0995c;

  /* ---- Shape / space (8px block unit) ------------------------------------ */
  --tvx-unit: 8px;
  /* v1.6.0 design system: game UI is square-cornered (docs/TVX-DESIGN-SYSTEM.md). */
  --tvx-radius: 0;
  --tvx-radius-sm: 0;
  --tvx-border-width: 2px;
  --tvx-bevel: 3px;
  --tvx-max-width: 1140px;

  /* ---- Type -------------------------------------------------------------- */
  --tvx-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  /* v1.1.0: Silkscreen (SIL OFL 1.1, self-hosted, see
     static/fonts/silkscreen/SOURCE.md) replaces the Courier New stack, which
     was a typewriter face, not a pixel face. */
  --tvx-font-pixel: "Silkscreen", "Courier New", ui-monospace, monospace;
  /* v1.4.0: fixed-width figures for countdowns, host:port and flags. */
  --tvx-font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, Menlo, "Liberation Mono", monospace;
  /* NOTE: headings use the pixel stack with uppercase + spacing + block shadow.
     A self-hosted pixel webfont (e.g. in static/fonts/) may replace this stack
     later without touching components — see docs/TVX-THEME.md. */

  /* ---- Motion ------------------------------------------------------------ */
  --tvx-ease: cubic-bezier(0.2, 0.9, 0.25, 1);
  --tvx-speed-fast: 120ms;
  --tvx-speed: 200ms;
  --tvx-speed-slow: 340ms;

  /* ---- v1.6.0 segmented pixel controls ---------------------------------- */
  --tvx-seg-count: 20;           /* slider track reads as 20 blocks */
  --tvx-seg-gap: 3px;
  --tvx-seg-on: #4de3ff;         /* lit segment */
  --tvx-seg-off: #23272d;        /* empty segment */
}

/* Light "surface torch" variant hook (default theme is dark; kept for the
   core color-mode toggle so it never renders unstyled). */
:root[data-tvx-torch="lit"] {
  --tvx-bg: #101512;
  --tvx-surface: #182019;
  --tvx-elevated: #26332b;
  --tvx-text: #eef5f0;
  --tvx-muted: #a9bfb3;
}
