/* ──────────────────────────────────────────────────────────────────────────
   theme-retro-dark.css — Retro Dark theme (monochrome black chrome).
   Activates on body[data-theme="retro-dark"]. Two-tier tokens per theme axis.

   DESIGN DIRECTIVE (S61 operator-ratified):
     • CHROME (surface / border / text / accent) drained to monochrome greys.
     • STATUS (--success / --warning / --danger) preserves FUNCTIONAL
       red/green/orange for P&L + indicator-bubble comprehension. NOT drained.

   Palette adjustments from prior inline block:
     • --bg2 lifted off --card-bg (#111111 → #161616) — fixes toggle / drawer
       background collision flagged at S64.
   ────────────────────────────────────────────────────────────────────────── */

body[data-theme="retro-dark"] {

  /* Browser-native widget color scheme (number-input spinners, scrollbars, autofill) */
  color-scheme: dark;

  /* ─────── TIER 1: PRIMITIVES ─────── */

  /* Neutral scale (light → dark) */
  --neutral-50:  #f0f0f0;
  --neutral-100: #aaaaaa;
  --neutral-150: #8a8a8a;
  --neutral-200: #777777;
  --neutral-300: #333333;
  --neutral-400: #2a2a2a;
  --neutral-500: #222222;
  --neutral-600: #181818;
  --neutral-700: #161616;   /* FIX: was #111111 — collided with --card-bg */
  --neutral-800: #111111;
  --neutral-900: #080808;

  /* Brand & status (functional colors preserved per S61 directive — NOT drained) */
  --brand-base:     #09B040;
  --brand-emphasis: #F57D27;
  --success: #09B040;
  --warning: #F57D27;
  --danger:  #B01212;

  /* Per-strategy badge palette */
  --strategy-1: #2dc98a;
  --strategy-2: #6ba3f5;
  --strategy-3: #f57c2a;
  --strategy-4: #f06292;
  --strategy-5: #ffd23f;

  /* Monochrome chrome accent (intentional Retro Dark vibe — not blue) */
  --accent-grey: #aaaaaa;

  /* Drained green for non-status accent surfaces (preserved from prior block) */
  --accent-positive-mono: #4a8a3b;

  /* ─────── TIER 2: SEMANTICS ─────── */

  /* Surfaces */
  --surface-base:     var(--neutral-900);
  --surface-raised:   var(--neutral-800);
  --surface-elevated: var(--neutral-600);
  --surface-overlay:  var(--neutral-500);

  /* Borders */
  --border-subtle:   var(--neutral-400);
  --border-default:  var(--neutral-400);
  --border-emphasis: var(--neutral-300);

  /* Text */
  --text-primary:   var(--neutral-50);
  --text-secondary: var(--neutral-100);
  --text-muted:     var(--neutral-150);
  --text-on-accent: var(--neutral-900);

  /* Accent (monochrome grey — Retro Dark identity) */
  --accent:          var(--accent-grey);
  --accent-emphasis: var(--accent-grey);

  /* Status text (functional — operator-ratified) */
  --text-success: var(--success);
  --text-warning: var(--warning);
  --text-danger:  var(--danger);

  /* Status background tints */
  --bg-success: rgba(9,176,64,0.15);
  --bg-warning: rgba(245,125,39,0.15);
  --bg-danger:  rgba(176,18,18,0.15);

  /* Form inputs */
  --input-bg:     var(--surface-elevated);
  --input-border: var(--border-emphasis);
  --input-text:   var(--text-primary);

  /* Action buttons */
  --button-primary-bg:   var(--brand-base);
  --button-primary-text: var(--neutral-900);
  --btn-add-bg:          transparent;   /* S66 operator-deferred fix (c) — transparent-fill on Retro Dark */

  /* Effects */
  --overlay: rgba(0,0,0,0.65);
  --shadow:  rgba(0,0,0,0.4);

  /* ─────── TRANSITIONAL ALIASES (component CSS migration pending Phase D) ─────── */

  --bg:      var(--neutral-900);
  --bg2:     var(--neutral-700);   /* FIX: was #111111 (collided with --card-bg) */
  --bg3:     var(--neutral-600);
  --bg4:     var(--neutral-500);
  --card-bg: var(--neutral-800);

  --border:  var(--neutral-400);
  --border2: var(--neutral-300);

  --text:  var(--neutral-50);
  --text2: var(--neutral-100);
  --text3: var(--neutral-150);

  /* Status alias preserved at functional values */
  --green:  var(--success);
  --red:    var(--danger);
  --yellow: var(--warning);

  /* Retro-specific accents */
  --accent-positive: var(--accent-positive-mono);   /* drained green for non-status accent */
}

/* ──────────────────────────────────────────────────────────────────────────
   COMPONENT OVERRIDES (preserved from prior inline retro-dark block)
   ────────────────────────────────────────────────────────────────────────── */

body[data-theme="retro-dark"] .coord-alert-body { color: #a0a0a0; }

body[data-theme="retro-dark"] .btn-primary    { background: #222222; color: #ffffff; border: 1px solid #888888; }
body[data-theme="retro-dark"] .btn-add        { border-color: #888888; }
body[data-theme="retro-dark"] .edge-enter-btn { border-color: #888888; }
body[data-theme="retro-dark"] .tc-intel-btn,
body[data-theme="retro-dark"] .edge-intel-btn { background: #ffffff; color: #000000; border-color: #ffffff; }
