/* EquityIQ — Stripe/Linear-grade refinement of Onni brand */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Onni brand (preserved) */
  --onni-primary: #002060;
  --onni-primary-dark: #001545;
  --onni-primary-light: #E6EBF5;
  --onni-secondary: #0070C0;
  --onni-secondary-dark: #0058A0;
  --onni-teal: #00C896;

  /* Evolved neutrals — Stripe-leaning */
  --ink-900: #0A1628;
  --ink-800: #17263D;
  --ink-700: #2D3D56;
  --ink-600: #4B5B73;
  --ink-500: #6B7A90;
  --ink-400: #9AA4B5;
  --ink-300: #C8CFD9;
  --ink-200: #E4E8EE;
  --ink-150: #EEF1F6;
  --ink-100: #F5F7FA;
  --ink-50:  #FAFBFC;
  --paper:   #FFFFFF;

  /* Decision colors */
  --buy:   #00A86B;
  --buy-soft: #E6F7EF;
  --pass:  #E5484D;
  --pass-soft: #FDECEC;
  --warn:  #D97706;
  --warn-soft: #FFF4E5;

  /* Semantic */
  --bull: #00A86B;
  --bear: #E5484D;

  /* Chart */
  --grid: #EEF1F6;
  --price-line: #002060;
  --sma-50: #0070C0;
  --sma-200: #9AA4B5;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-serif: 'Instrument Serif', Georgia, serif;

  /* Shadows */
  --sh-1: 0 1px 2px rgba(10, 22, 40, 0.04), 0 0 0 1px rgba(10, 22, 40, 0.04);
  --sh-2: 0 2px 6px rgba(10, 22, 40, 0.05), 0 0 0 1px rgba(10, 22, 40, 0.05);
  --sh-3: 0 8px 24px rgba(10, 22, 40, 0.08), 0 0 0 1px rgba(10, 22, 40, 0.06);

  /* Radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--ink-900);
  background: var(--ink-50);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Utility classes used across files */
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum', 'zero'; }
.tnum { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-serif); }

/* Decision badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  font-family: var(--font-mono);
}
.badge-buy { background: var(--buy-soft); color: var(--buy); }
.badge-pass { background: var(--pass-soft); color: var(--pass); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-neutral { background: var(--ink-100); color: var(--ink-600); }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes eq-fade-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: translateY(0); } }

/* Card */
.card {
  background: var(--paper);
  border: 1px solid var(--ink-200);
  border-radius: var(--r-lg);
}

/* ========== MOTION & POLISH ==========
   Subtle additions layered on top of the Stripe/Linear aesthetic.
   All utility classes — add opt-in on components rather than forcing
   via element selectors, so anything we don't want animated stays still.
===================================== */

/* Card hover lift — apply to any card surface that's interactive
   (stat cards, chart cards, report rows). Pure transform so it composites
   cheaply and does not reflow the layout. */
.card-hover {
  transition: transform 0.15s ease, box-shadow 0.18s ease, border-color 0.15s ease;
  will-change: transform;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
  border-color: var(--ink-200);
}

/* Table row hover — applied via `.row-hover` on `<tbody>` so the
   selector stays scoped and doesn't creep into tables we DIDN'T want
   styled this way. */
.row-hover tr {
  transition: background 0.12s ease;
}
.row-hover tr:hover {
  background: var(--ink-50);
}

/* Page fade-in — applied to the outermost div of each page. Gives a
   gentle sense of "arriving" when navigating between sidebar items,
   without blocking interactivity. */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-fade { animation: fadeInUp 0.22s ease-out; }

/* Live-status pulse — a softer, more specific pulse used on the
   "running" status chip. Distinct from the generic .pulse so we can
   tune the decision-relevant one independently. */
@keyframes pulseLive {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 168, 107, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(0, 168, 107, 0); }
}
.pulse-live {
  animation: pulseLive 1.8s ease-in-out infinite;
  border-radius: 999px;
}

/* Tabular numerics — make every animated counter feel locked in a grid. */
.stat-tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--ink-200); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-300); }
