/* ================================================================
   IntrinsicIQ — Base layer
   ────────────────────────────────────────────────────────────────
   Reset, root element defaults, and the small set of typography/utility
   helpers shared by every page. Loads after tokens.css, before any
   component or shell stylesheet. Nothing here is page-specific.
   ================================================================ */

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Root elements ─────────────────────────────────────────────── */
html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: radial-gradient(1400px 900px at 50% -10%, #131313 0%, var(--bg) 55%) fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Vignette is a night-time device; paper is lit evenly. */
[data-theme="light"] body { background: var(--bg); }

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }

::selection {
  background: rgba(242,202,80,0.22);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ── Typography & colour helpers ───────────────────────────────── */
.mono   { font-family: var(--mono); }
/* Columns of figures must align across rows; without this, proportional
   digits in the sans stack ruin every table the moment one is used. */
.mono, .data-table, .sens-table, .stmt-table, .hist-table, .peer-table,
.num-input, .form-input, .price-display, .bbb-value, .wacc-big,
.ivps-main .value, .rail-result-val, .verdict-stat .sval {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}
.serif  { font-family: var(--serif); }
.amber  { color: var(--gold); }
.gold   { color: var(--gold); }
.green  { color: var(--green); }
.red    { color: var(--red); }
.muted  { color: var(--text-muted); }
.label  {
  font-size: 10px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--text-muted);
}

/* ── Utilities ─────────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
