/* Verdict design tokens — warmer ink palette w/ acid yellow + signal red */
:root {
  /* Backgrounds: near-black with cool ink tone */
  --bg-base: #07090C;
  --bg-elev: #0C1014;
  --bg-elev-2: #11161B;
  --bg-elev-3: #181F26;

  --line-subtle: #1A2128;
  --line: #232C35;
  --line-strong: #38444F;

  --text: #F5F1E8;       /* warm off-white instead of pure white */
  --text-2: #99A1AA;
  --text-3: #5C656F;
  --text-4: #3A4148;

  /* Acid yellow = primary accent. YES = mint. NO = coral. */
  --acid: #E8FF52;
  --acid-dim: #A8B82F;
  --acid-bg10: rgba(232,255,82,0.10);
  --acid-bg20: rgba(232,255,82,0.20);

  --mint: #6BE5C1;        /* slightly more saturated, less tropical */
  --mint-dim: #3F9B82;
  --mint-bg10: rgba(107,229,193,0.10);
  --mint-bg20: rgba(107,229,193,0.20);

  --coral: #FF5C6E;       /* sharper, redder than coral pink */
  --coral-dim: #B84050;
  --coral-bg10: rgba(255,92,110,0.10);
  --coral-bg20: rgba(255,92,110,0.20);

  --amber: #F0B23F;
  --info:  #5FA8D9;

  --r-sm: 2px;
  --r:    3px;
  --r-lg: 4px;
  --r-xl: 6px;
  --r-full: 9999px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --d-fast: 120ms;
  --d-base: 200ms;
  --d-slow: 320ms;
  --d-draw: 720ms;
}

* { box-sizing: border-box; }
html, body { background: var(--bg-base); color: var(--text); margin: 0; padding: 0; }
body {
  /* Sans = IBM Plex Sans (technical, neutral, slightly humanist).
     Display = Instrument Serif (high-contrast editorial serif for hero numerics + headlines).
     Mono = JetBrains Mono (sharp tabular numerals). */
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Subtle dotted-grid background for the entire app — adds texture without noise */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(245,241,232,0.025) 1px, transparent 0);
  background-size: 24px 24px;
}
.serif {
  font-family: 'Instrument Serif', 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.num {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' on, 'zero' on, 'ss01' on;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace; }

.cap {
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
}
.cap-sm {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 500;
}

.h1 { font-family: 'Instrument Serif', serif; font-size: 44px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 400; margin: 0; }
.h2 { font-family: 'Instrument Serif', serif; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 400; margin: 0; }
.dxl { font-family: 'JetBrains Mono', monospace; font-size: 80px; line-height: 1; letter-spacing: -0.045em; font-weight: 500; }
.dlg { font-family: 'JetBrains Mono', monospace; font-size: 56px; line-height: 1; letter-spacing: -0.04em;  font-weight: 500; }
.dmd { font-family: 'JetBrains Mono', monospace; font-size: 36px; line-height: 1.05; letter-spacing: -0.025em; font-weight: 500; }
.dsm { font-family: 'JetBrains Mono', monospace; font-size: 28px; line-height: 1.1; letter-spacing: -0.025em; font-weight: 500; }

/* Scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* Selection */
::selection { background: var(--acid-bg20); color: var(--acid); }

/* Skeleton */
@keyframes vd-pulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }
.skel { background: var(--bg-elev-3); border-radius: 6px; animation: vd-pulse 1.5s var(--ease) infinite; }

/* Modal backdrop */
.vd-backdrop {
  position: fixed; inset: 0;
  background: rgba(7, 12, 14, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 80;
  display: flex; align-items: center; justify-content: center;
  animation: vd-fade var(--d-base) var(--ease);
}
@keyframes vd-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vd-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.vd-card-rise { animation: vd-rise var(--d-slow) var(--ease); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: var(--r);
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--line);
  background: var(--bg-elev-2);
  color: var(--text);
  transition: background var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.btn:hover { background: var(--bg-elev-3); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--acid); color: #07090C; border-color: var(--acid);
  font-weight: 600; letter-spacing: -0.01em;
}
.btn-primary:hover { background: #F2FF7A; border-color: #F2FF7A; }
.btn-primary-mint {
  background: var(--mint); color: #07090C; border-color: var(--mint);
}
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-elev-2); color: var(--text); }
.btn-lg { height: 44px; padding: 0 18px; font-size: 14px; }
.btn-xl { height: 52px; padding: 0 22px; font-size: 15px; border-radius: var(--r-lg); }
.btn-full { width: 100%; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  font-size: 12px; font-weight: 600;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--text-2);
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-active { background: var(--bg-elev-3); color: var(--text); border-color: var(--line-strong); }
.chip-mint.is-active { background: var(--mint-bg20); color: var(--mint); border-color: rgba(107,229,193,0.4); }
.chip-acid.is-active { background: var(--acid-bg20); color: var(--acid); border-color: rgba(232,255,82,0.4); }

/* Logo button: hover = subtle lift + acid glow on the mark */
.vd-logo-btn:hover .vd-logo-mark {
  transform: rotate(-6deg) scale(1.06);
  filter: drop-shadow(0 0 10px rgba(232,255,82,0.55));
}
.vd-logo-mark { will-change: transform, filter; }

/* Subtle constant breath on the V's apex dot — adds a "live" pulse to the brand */
@keyframes vd-logo-breathe { 0%,100% { filter: none; } 50% { filter: drop-shadow(0 0 4px rgba(232,255,82,0.35)); } }
.vd-logo-mark { animation: vd-logo-breathe 3.6s var(--ease) infinite; }

/* Live dot */
.live-dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--acid);
  box-shadow: 0 0 0 0 var(--acid);
  animation: vd-live 2.4s var(--ease) infinite;
}
@keyframes vd-live {
  0% { box-shadow: 0 0 0 0 rgba(232,255,82,0.5); }
  70% { box-shadow: 0 0 0 6px rgba(232,255,82,0); }
  100% { box-shadow: 0 0 0 0 rgba(232,255,82,0); }
}

/* Hairline divider */
.hr { height: 1px; background: var(--line-subtle); border: 0; margin: 0; }

/* Card */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line-subtle);
  border-radius: var(--r-lg);
}

/* Toast */
.vd-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev-3);
  border: 1px solid var(--line);
  border-left: 2px solid var(--acid);
  padding: 12px 16px;
  border-radius: var(--r-lg);
  z-index: 200;
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  animation: vd-toast-in var(--d-slow) var(--spring);
}
@keyframes vd-toast-in {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Hover lift cards */
.lift {
  transition: transform var(--d-base) var(--ease), border-color var(--d-base) var(--ease), background var(--d-base) var(--ease);
}
.lift:hover {
  transform: translateY(-2px);
  border-color: rgba(232,255,82,0.30);
}

/* Tape ticker — for top of page */
.tape {
  border-top: 1px solid var(--line-subtle);
  border-bottom: 1px solid var(--line-subtle);
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-base) 100%);
  overflow: hidden;
  height: 30px; display: flex; align-items: center;
}
.tape-track { display: flex; gap: 36px; animation: vd-tape 60s linear infinite; padding-left: 24px; white-space: nowrap; }
@keyframes vd-tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tape-item { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-3); }
.tape-item .num { font-size: 11px; }

/* Pill labels */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}
.pill-acid { background: var(--acid-bg20); color: var(--acid); border: 1px solid rgba(232,255,82,0.3); }
.pill-mint { background: var(--mint-bg20); color: var(--mint); border: 1px solid rgba(107,229,193,0.3); }
.pill-coral { background: var(--coral-bg20); color: var(--coral); border: 1px solid rgba(255,92,110,0.3); }

/* Crosshair separator */
.xhair {
  position: relative;
}
.xhair::before, .xhair::after {
  content: ''; position: absolute; background: var(--line);
}

/* Acid focus ring */
:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; }



input.vd-input, textarea.vd-input {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--r);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition: border-color var(--d-fast) var(--ease);
}
input.vd-input:focus, textarea.vd-input:focus { border-color: var(--mint-dim); }

/* Asset glyph: subtle pop + glow on row hover */
.vd-row:hover .vd-glyph,
.vd-glyph:hover {
  transform: scale(1.08) rotate(-3deg);
  filter: drop-shadow(0 4px 10px rgba(232,255,82,0.18));
}
.vd-row:hover .vd-glyph svg circle,
.vd-row:hover .vd-glyph svg rect {
  filter: brightness(1.08);
}

/* Watchlist row chevron — slides in on hover */
.vd-row .vd-rowchev {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 200ms var(--ease), transform 240ms cubic-bezier(.2,1.2,.4,1);
}
.vd-row:hover .vd-rowchev {
  opacity: 1;
  transform: translateX(0);
}

/* Sparkline: ride into focus on hover */
.vd-row .vd-spark {
  transition: transform 280ms var(--ease), filter 280ms var(--ease);
}
.vd-row:hover .vd-spark {
  transform: scaleY(1.08);
  filter: brightness(1.15) drop-shadow(0 0 6px currentColor);
}
