/* Design tokens — :root (dark) + html[data-theme=light]. Do not put layout here. */

/* â”€â”€ CSS Variables â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
    color-scheme: dark;
    /* Neutral near-black (avoid navy/blue cast under sticky ticker header) */
    --bg-primary:    #05070c;
    --bg-surface:    rgba(0, 240, 255, 0.02);
    --bg-card:       rgba(0, 240, 255, 0.03);
    --bg-hover:      rgba(0, 240, 255, 0.06);
    --bg-sidebar:    #05070c;
    --bg-input:      rgba(0, 240, 255, 0.05);
    --bg-header:     rgba(5, 7, 12, 0.97);
    --bg-elevated:   #0d121b;
    --bg-secondary:  var(--bg-elevated);
    --bg-chart:      #0a0e17;
    --overlay-scrim: rgba(0, 0, 0, 0.55);

    --border:        rgba(0, 200, 255, 0.10);
    --border-active: rgba(0, 240, 255, 0.30);

    --text-primary:  #e8e8e8;
    --text-secondary: rgba(255, 255, 255, 0.60);
    --text-muted:    rgba(255, 255, 255, 0.40);

    --neon-cyan:     #00f0ff;
    --neon:          var(--neon-cyan);
    --cyan:          #00f0ff;
    --neon-violet:   #a855f7;
    --gain:          #4d9e6e;
    --loss:          #b05252;
    --blue:          #3b82f6;

    --glow-sm:       0 0 10px rgba(0, 240, 255, 0.06);
    --glow-md:       0 0 20px rgba(0, 240, 255, 0.10);
    --glow-lg:       0 0 40px rgba(0, 240, 255, 0.08);
    --accent-primary: #00f0ff;

    --font-sans:     ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono:     ui-sans-serif, system-ui, sans-serif;
    --font-sherif:   ui-sans-serif, system-ui, sans-serif;

    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --radius-full:   9999px;

    --transition:    all 0.2s ease;

    /* Usage split on Integrations. Fills, not body text. */
    --usage-c0: #2ee6e6;
    --usage-c1: #4c8dff;
    --usage-c2: #f2a93b;
    --usage-c3: #b58cff;
    --usage-c4: #e86fb0;
    --usage-c5: #5b6b76;
    --usage-warn: #f2a93b;
    --tone-mixed: #d29922;
    --usage-danger: #ff7b7b;

    /* Heatmap scale. Same ramps as M.heatScale() in static/market-shared.js. */
    --heat-mid: #1e2028;
    --heat-svg-bg: #0d0e14;
    --heat-header-bg: rgba(10, 11, 16, 0.82);
    --heat-header-text: rgba(255, 255, 255, 0.88);
    --heat-header-muted: rgba(255, 255, 255, 0.5);
    --heat-gain-0: rgb(20, 32, 40);
    --heat-gain-1: rgb(93, 184, 127);
    --heat-loss-0: rgb(20, 32, 40);
    --heat-loss-1: rgb(196, 94, 94);
    --heat-stroke: #050a14;
    --heat-tip-bg: rgba(13, 14, 20, 0.96);
    --heat-tip-border: rgba(0, 240, 255, 0.2);
    --heat-tip-text: #fff;
    --heat-tip-muted: rgba(255, 255, 255, 0.5);
    --heat-logo-bg: #1a1b26;
    --heat-ink: #111827;
    --heat-ink-invert: rgba(255, 255, 255, 0.95);

    /* Fear-to-greed strip. Same five colors in light and dark. */
    --mood-0: #d9534f;
    --mood-1: #e8862a;
    --mood-2: #e9dcaa;
    --mood-3: #8fd1ad;
    --mood-4: #4d9e6e;
}

html[data-theme="light"] {
    color-scheme: light;
    --bg-primary:    #f4f6f8;
    --bg-surface:    #ffffff;
    --bg-card:       #ffffff;
    --bg-hover:      #e8ecf0;
    --bg-sidebar:    #eef1f4;
    --bg-input:      #e8ecf0;
    --bg-header:     rgba(255, 255, 255, 0.96);
    --bg-elevated:   #ffffff;
    --bg-secondary:  var(--bg-elevated);
    --bg-chart:      #f4f6f8;
    --overlay-scrim: rgba(15, 23, 42, 0.35);

    --border:        #d5dbe3;
    --border-active: #94a3b8;

    --text-primary:  #111827;
    --text-secondary:#374151;
    --text-muted:    #6b7280;

    --neon-cyan:     #0e7490;
    --neon:          var(--neon-cyan);
    --cyan:          #0e7490;
    --neon-violet:   #7c3aed;
    --gain:          #3d8b5c;
    --loss:          #b05252;
    --blue:          #2563eb;

    --glow-sm:       0 1px 2px rgba(15, 23, 42, 0.06);
    --glow-md:       0 2px 8px rgba(15, 23, 42, 0.08);
    --glow-lg:       0 8px 24px rgba(15, 23, 42, 0.08);
    --accent-primary: #0e7490;

    --usage-warn: #9a3412;
    --tone-mixed: #b45309;
    --mood-0: #c0392b;
    --mood-1: #d9731a;
    --mood-2: #a68a1f;
    --mood-3: #4f9f73;
    --mood-4: #2e7d4f;
    --usage-danger: #b05252;

    --heat-mid: #c5cad3;
    --heat-svg-bg: #eef1f4;
    --heat-header-bg: rgba(255, 255, 255, 0.9);
    --heat-header-text: #111827;
    --heat-header-muted: #6b7280;
    --heat-gain-0: rgb(197, 202, 211);
    --heat-gain-1: rgb(45, 138, 88);
    --heat-loss-0: rgb(197, 202, 211);
    --heat-loss-1: rgb(176, 82, 82);
    --heat-stroke: #eef1f4;
    --heat-tip-bg: rgba(255, 255, 255, 0.97);
    --heat-tip-border: #d5dbe3;
    --heat-tip-text: #111827;
    --heat-tip-muted: #6b7280;
    --heat-logo-bg: #eef1f4;
}
