/* Mithrandir Metrics — Design Tokens
   Blend: Observatory structure · Almanac type & voice · Scouting-Desk accents (reserved) */

:root {
  /* --- Surface (neutral ink-black, slight warm cast) --- */
  --mm-ink-900: oklch(16% 0.006 70);   /* page background */
  --mm-ink-850: oklch(19% 0.006 70);   /* card / panel */
  --mm-ink-800: oklch(22% 0.006 70);   /* raised card, active row */
  --mm-ink-750: oklch(26% 0.008 70);   /* hover row, input bg */
  --mm-ink-700: oklch(32% 0.008 70);   /* disabled surface */

  /* --- Rule lines (box-score feel) --- */
  --mm-rule-1:  oklch(100% 0 0 / 0.08);   /* hairline, intra-table */
  --mm-rule-2:  oklch(100% 0 0 / 0.14);   /* section divider */
  --mm-rule-3:  oklch(100% 0 0 / 0.22);   /* emphasis */

  /* --- Text --- */
  --mm-text-1:  oklch(96% 0.008 80);   /* primary ink (warm cream) */
  --mm-text-2:  oklch(78% 0.010 80);   /* secondary */
  --mm-text-3:  oklch(62% 0.010 80);   /* tertiary, captions */
  --mm-text-4:  oklch(50% 0.010 80);   /* disabled */

  /* --- Accents --- */
  /* Signal: projections, links, selected state, informational */
  --mm-signal:        oklch(78% 0.10 215);
  --mm-signal-strong: oklch(68% 0.12 215);
  --mm-signal-tint:   oklch(78% 0.10 215 / 0.12);

  /* Warn: alerts, market edges, injury flags, deltas < threshold */
  --mm-warn:          oklch(78% 0.12 65);
  --mm-warn-strong:   oklch(70% 0.14 65);
  --mm-warn-tint:     oklch(78% 0.12 65 / 0.14);

  /* Chalk: RESERVED for Daily-page live/today-only callouts */
  --mm-chalk:         oklch(90% 0.10 95);
  --mm-chalk-tint:    oklch(90% 0.10 95 / 0.14);

  /* Semantic outcomes (low-saturation — compete with lots of ink) */
  --mm-up:            oklch(72% 0.12 150);
  --mm-down:          oklch(68% 0.14 25);
  --mm-neutral:       var(--mm-text-3);

  /* --- Typography --- */
  --mm-font-display: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --mm-font-ui:      'Inter Tight', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mm-font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Type scale — conservative, built for density */
  --mm-fs-display-1: 44px;  /* page masthead */
  --mm-fs-display-2: 32px;  /* hub titles */
  --mm-fs-h1:        22px;
  --mm-fs-h2:        17px;
  --mm-fs-h3:        14px;
  --mm-fs-body:      14px;
  --mm-fs-body-sm:   13px;
  --mm-fs-caption:   12px;
  --mm-fs-micro:     10.5px; /* folio tags, ALL-CAPS mono */

  --mm-lh-tight:   1.15;
  --mm-lh-normal:  1.45;
  --mm-lh-loose:   1.6;

  /* --- Spacing (4-based, denser than default) --- */
  --mm-space-1: 4px;
  --mm-space-2: 8px;
  --mm-space-3: 12px;
  --mm-space-4: 16px;
  --mm-space-5: 20px;
  --mm-space-6: 24px;
  --mm-space-8: 32px;
  --mm-space-10: 40px;
  --mm-space-12: 48px;
  --mm-space-16: 64px;

  /* --- Radii (small, almanac-like) --- */
  --mm-radius-sm: 2px;
  --mm-radius-md: 4px;
  --mm-radius-lg: 6px;
  /* No pill-shaped containers except tags/chips */

  /* --- Layout --- */
  --mm-topbar-h:   56px;
  --mm-rail-w:    228px;
  --mm-page-max:  1440px;
  --mm-gutter:    24px;

  /* --- Elevation — use rule lines, not shadows, wherever possible --- */
  --mm-shadow-popover: 0 12px 32px oklch(0% 0 0 / 0.4);
}

/* Base */
html, body { background: var(--mm-ink-900); color: var(--mm-text-1);
  font-family: var(--mm-font-ui); font-size: var(--mm-fs-body); line-height: var(--mm-lh-normal);
  -webkit-font-smoothing: antialiased; max-width: 100%; overflow-x: hidden; }

/* Numerals are ALWAYS tabular */
.mm-num, table, .mm-mono, [data-num] { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "lnum" 1; }
