/* =========================================================
   Nerd@Heart — retro terminal tokens (second design set)
   Same token names as css/variables.css, phosphor values.
   Everything here only applies while <html data-ui="retro">.
   ========================================================= */
html[data-ui="retro"] {
  color-scheme: dark;

  /* Phosphor */
  --ph: #ff9f2e;
  --ph-dim: #d98b2b;
  --ph-bright: #ffc46b;
  --ph-faint: #8a5418;
  --ph-ink: #1c0900;
  --ph-glow: rgba(255, 159, 46, 0.55);
  --ph-glow-soft: rgba(255, 130, 26, 0.22);
  --ph-haze: rgba(255, 159, 46, 0.09);

  /* Surfaces — pure black, warm dust */
  --bg: #000000;
  --surface: #050302;
  --surface-2: #0b0703;
  --raised: #120a04;

  /* Ink */
  --fg: #ffb257;
  --muted: #c07d2b;
  --faint: #8a5418;

  /* Lines */
  --line: rgba(255, 159, 46, 0.26);
  --line-strong: rgba(255, 159, 46, 0.52);

  /* Accents */
  --accent: #ff9f2e;
  --accent-2: #ffc46b;
  --accent-3: #ff6b3d;
  --accent-soft: rgba(255, 159, 46, 0.1);
  --cream: #ff9f2e;

  /* Severity and TLP */
  --sev-critical: #ff5c47;
  --sev-high: #ff9f2e;
  --sev-medium: #ffcf6b;
  --sev-low: #5cff86;
  --tlp-red: #ff5c47;
  --tlp-amber: #ffcf6b;
  --tlp-green: #5cff86;
  --tlp-clear: #ffd9a8;

  /* Radii — the tube curves, the UI does not */
  --r-xs: 2px;
  --r-sm: 2px;
  --r-md: 2px;
  --r-lg: 3px;
  --r-xl: 4px;
  --r-window: 4px;
  --r-full: 2px;
  --r-tube: 22px;

  /* Type */
  --font-sans: 'VT323', 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-mono: 'VT323', 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --tracking-tight: 0.01em;

  /* Layout */
  --container: 1180px;
  --nav-height: 72px;

  /* Elevation */
  --shadow-card: inset 0 0 40px rgba(255, 130, 26, 0.05);
  --shadow-float: 0 0 24px rgba(255, 130, 26, 0.16);
  --glow-warm: radial-gradient(60% 60% at 50% 0%, rgba(255, 159, 46, 0.18), transparent 70%);
  --gradient-ember: none;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --blink: 1.06s steps(1) infinite;

  /* ---------- legacy aliases ---------- */
  --bg-primary: var(--bg);
  --bg-secondary: var(--surface);
  --bg-card: var(--surface);
  --text-primary: var(--fg);
  --text-secondary: var(--muted);
  --text-muted: var(--muted);
  --text-faint: var(--faint);
  --border: var(--line);
  --border-strong: var(--line-strong);

  --neon-cyan: var(--accent);
  --neon-magenta: var(--accent-3);
  --neon-green: var(--sev-low);
  --neon-dim: rgba(255, 159, 46, 0.15);
  --cyan: var(--accent);
  --magenta: var(--accent-3);

  --font-heading: var(--font-mono);
  --font-body: var(--font-sans);

  --fs-xs: 0.9375rem;
  --fs-sm: 1.0625rem;
  --fs-base: 1.3125rem;
  --fs-md: 1.3125rem;
  --fs-lg: 1.5rem;
  --fs-xl: 2rem;
  --fs-2xl: 2.75rem;
  --fs-hero: clamp(2.75rem, 7vw, 4.5rem);

  --text-xs: 0.9375rem;
  --text-sm: 1.0625rem;
  --text-base: 1.3125rem;
  --text-lg: 1.5rem;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --max-width: var(--container);
  --grid: rgba(255, 159, 46, 0.06);

  --transition-fast: 120ms var(--ease);
  --transition-base: 200ms var(--ease);
  --transition-slow: 380ms var(--ease);

  --glow-cyan: 0 0 24px -8px rgba(255, 159, 46, 0.6);
  --glow-magenta: 0 0 24px -8px rgba(255, 107, 61, 0.55);
  --glow-cyan-strong: 0 0 34px -8px rgba(255, 159, 46, 0.75);

  /* Tokens read by the globe page's page-scoped CSS */
  --neon: var(--ph);
  --neon2: var(--ph-bright);
  --text: var(--fg);
  --text-dim: var(--muted);
  --mono: var(--font-mono);
  --sans: var(--font-sans);
}

/* The tube itself */
html[data-ui="retro"] {
  background: #000;
  scrollbar-color: var(--ph-faint) #000;
  scrollbar-width: thin;
}

html[data-ui="retro"] ::-webkit-scrollbar { width: 10px; height: 10px; }
html[data-ui="retro"] ::-webkit-scrollbar-track { background: #000; }
html[data-ui="retro"] ::-webkit-scrollbar-thumb {
  background: var(--ph-faint);
  border: 2px solid #000;
}
