/* ============================================
   DIRHAM — Design Tokens
   The Mint: dark forge, gold stamp, precision
   ============================================ */

:root {
  /* Canvas — the forge floor */
  --color-canvas: #1c1917;
  --color-canvas-raised: #252220;
  --color-canvas-elevated: #302b27;
  --color-canvas-overlay: rgba(0, 0, 0, 0.6);

  /* Text */
  --color-text: #fafaf9;
  --color-text-muted: #a8a29e;
  --color-text-faint: #706862;

  /* Gold — the stamp */
  --color-gold: #f59e0b;
  --color-gold-hover: #fbbf24;
  --color-gold-dim: #b87333;
  --color-gold-faint: rgba(245, 158, 11, 0.15);

  /* Tier colors — fineness grades */
  --color-tier-pure: #f59e0b;
  --color-tier-strong: #94a3b8;
  --color-tier-compliant: #b87333;
  --color-gold-glow: rgba(245, 158, 11, 0.4);
  --color-tier-strong-faint: rgba(148, 163, 184, 0.12);
  --color-tier-compliant-faint: rgba(184, 115, 51, 0.12);
  --color-gain-border: rgba(34, 197, 94, 0.2);
  --color-loss-border: rgba(239, 68, 68, 0.2);
  --color-chart-line-faint: rgba(41, 98, 255, 0.12);
  --color-text-muted-faint: rgba(168, 162, 158, 0.1);

  /* Data — gain/loss */
  --color-gain: #22c55e;
  --color-gain-faint: rgba(34, 197, 94, 0.15);
  --color-loss: #ef4444;
  --color-loss-faint: rgba(239, 68, 68, 0.15);

  /* Chart */
  --color-chart-line: #2962FF;
  --color-chart-volume: rgba(41, 98, 255, 0.2);
  --color-bollinger-fill: rgba(41, 98, 255, 0.08);
  --color-bollinger-line: rgba(41, 98, 255, 0.4);

  /* Confidence bar gradient stops */
  --color-confidence-low: #ef4444;
  --color-confidence-mid: #f59e0b;
  --color-confidence-high: #22c55e;

  /* Borders */
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-subtle: rgba(255, 255, 255, 0.04);
  --color-border-gold: rgba(245, 158, 11, 0.3);

  /* Focus */
  --color-focus: rgba(245, 158, 11, 0.5);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', 'Monaco', 'Consolas', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.7;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* Canvas translucent */
  --color-canvas-translucent: rgba(28, 25, 23, 0.85);

  /* Spacing — 4px grid */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Icons */
  --icon-sm: 14px;
  --icon-base: 16px;
  --icon-lg: 32px;

  /* Touch */
  --touch-min: 44px;

  /* Radius */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);

  /* Transitions */
  --transition-fast: 100ms ease-out;
  --transition-base: 200ms ease-out;
  --transition-slow: 300ms ease-in-out;

  /* Z-index */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-overlay: 30;
  --z-modal: 40;
  --z-tooltip: 50;

  /* Layout */
  --header-height: 52px;
  --max-width: 1400px;
  --sidebar-width: 280px;
}
