/* Design tokens for RelicForge's operator-console UI. CSS custom
   properties only — no selectors beyond :root — so this file can be
   shared as-is by a future login screen (see the farming-screen redesign
   task). RelicForge is a fixed dark "mission control" theme by design;
   there is no light-mode variant to branch on.

   Palette: dark navy background, glassy panels with glowing cyan borders,
   an accent gradient (cyan -> violet -> magenta) matching the $REALM
   logo, and a small semantic color set reused consistently for meaning
   (never decoration): green = start/deposit/favorable, red =
   stop/disconnect/exhausted/resisted, violet = gacha/epic, gold = buy
   hero/legendary, cyan = primary/withdraw/neutral. */

:root {
  /* --- Base surfaces --- */
  --bg-void: #0a0e1a;
  --bg-panel: rgba(16, 22, 38, 0.78);
  --bg-panel-solid: #0f1526;
  --bg-panel-raised: rgba(22, 30, 50, 0.85);
  --bg-inset: rgba(4, 7, 14, 0.6);

  /* --- Borders / glow (cyan is the structural accent) --- */
  --border-subtle: rgba(120, 150, 190, 0.16);
  --border-cyan: rgba(56, 224, 255, 0.38);
  --border-cyan-bright: #4de8ff;
  --glow-cyan-sm: 0 0 8px rgba(56, 224, 255, 0.35);
  --glow-cyan-md: 0 0 16px rgba(56, 224, 255, 0.4), 0 0 2px rgba(56, 224, 255, 0.6);
  --glow-violet-md: 0 0 16px rgba(168, 85, 247, 0.45);
  --glow-gold-md: 0 0 16px rgba(245, 197, 24, 0.45);
  --glow-red-md: 0 0 16px rgba(255, 68, 102, 0.45);
  --glow-green-md: 0 0 16px rgba(43, 255, 140, 0.4);

  /* --- Brand gradient: cyan -> violet -> magenta --- */
  --gradient-brand: linear-gradient(90deg, #38e0ff 0%, #a855f7 55%, #ec4899 100%);
  --gradient-brand-soft: linear-gradient(90deg, rgba(56, 224, 255, 0.25) 0%, rgba(168, 85, 247, 0.25) 55%, rgba(236, 72, 153, 0.25) 100%);

  /* --- Semantic colors (meaning, not decoration) --- */
  --color-green: #2bff8c; /* start / deposit / favorable */
  --color-green-dim: #1a9d57;
  --color-red: #ff4466; /* stop / disconnect / exhausted / resisted */
  --color-red-dim: #b8283f;
  --color-violet: #a855f7; /* gacha / epic */
  --color-gold: #f5c518; /* buy hero / legendary */
  --color-cyan: #38e0ff; /* primary / withdraw / neutral */

  /* --- Rarity ramp (heroes + mechas share the same 5 tiers) --- */
  --rarity-common: #9aa5b8;
  --rarity-uncommon: #4ade80;
  --rarity-rare: #38e0ff;
  --rarity-epic: #a855f7;
  --rarity-legendary: #f5c518;

  /* --- Affinity matchup tiers (only 3 real tiers exist) --- */
  --tier-favorable: var(--color-green);
  --tier-neutral: #8aa0c0;
  --tier-resisted: var(--color-red);

  /* --- Text --- */
  --text-primary: #eaf2ff;
  --text-secondary: #9db0cc;
  --text-dim: #64748b;
  --text-on-accent: #04101a;

  /* --- Typography --- */
  --font-display: "Orbitron", "Chakra Petch", sans-serif; /* wordmark, big HUD numbers */
  --font-heading: "Rajdhani", "Chakra Petch", sans-serif; /* condensed uppercase labels */
  --font-body: "Chakra Petch", "Rajdhani", sans-serif; /* status lines, buttons */
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; /* addresses, tx hashes */

  /* --- Spacing scale --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  /* --- Radius --- */
  --radius-panel: 6px;
  --radius-sm: 4px;
  --radius-pill: 999px;

  /* --- Motion --- */
  --duration-fast: 120ms;
  --duration-med: 220ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Corner bracket accents (see .panel in console.css) --- */
  --bracket-size: 10px;
  --bracket-color: var(--border-cyan-bright);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-med: 0ms;
  }
}

/* Static public documents: existing palette, no game layout or scripts. */
* { box-sizing: border-box; }
.legal-page { margin: 0; background: radial-gradient(ellipse at top, #12283b, var(--bg-void) 65%); color: var(--text-primary); font: 17px/1.75 system-ui, sans-serif; }
.legal-header, .legal-footer { max-width: 1000px; margin: auto; padding: 28px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.legal-header nav, .legal-footer { display: flex; flex-wrap: wrap; gap: 24px; }
.legal-brand { color: var(--color-gold); font-weight: 800; letter-spacing: .08em; text-decoration: none; }
.legal-page a { color: var(--color-cyan); text-underline-offset: 4px; }
.legal-page a:focus-visible, .legal-table:focus-visible { outline: 2px solid var(--color-cyan); outline-offset: 4px; }
.legal-document { max-width: 952px; margin: 0 auto; padding: clamp(22px, 5vw, 56px); background: var(--bg-panel-solid); border: 1px solid var(--border-cyan); border-top: 3px solid var(--color-gold); border-radius: 16px; box-shadow: 0 24px 80px #0004; overflow-wrap: anywhere; }
.legal-document h1 { margin: 0 0 24px; font-size: clamp(28px, 4vw, 42px); line-height: 1.25; color: #ffe2a1; }
.legal-document h2 { margin: 40px 0 14px; font-size: 23px; line-height: 1.4; color: var(--color-cyan); scroll-margin-top: 24px; }
.legal-document p { margin: 16px 0; }
.legal-document li { padding-left: 5px; margin: 10px 0; }
.legal-document ol { padding-left: 25px; }
.legal-table { max-width: 100%; overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: 8px; margin: 24px 0; }
.legal-table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.legal-table th, .legal-table td { padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); text-align: left; vertical-align: top; }
.legal-table th { color: #ffe2a1; background: #16273a; }
.legal-table tbody tr:last-child td { border-bottom: 0; }
.legal-footer { justify-content: center; font-size: 15px; }
@media (max-width: 600px) { .legal-page { font-size: 16px; } .legal-header { padding: 20px 18px; } .legal-header nav { gap: 20px; font-size: 14px; } .legal-document { margin: 0 12px; border-radius: 12px; } .legal-document h2 { font-size: 21px; } }
@media print { .legal-page, .legal-document { color: #000; background: #fff; } .legal-document { box-shadow: none; border: 0; max-width: none; padding: 0; } .legal-header, .legal-footer { display: none; } .legal-document h1, .legal-document h2, .legal-table th { color: #000; } .legal-table { overflow: visible; } .legal-table table { min-width: 0; } }
