/* ============================================================================
   HOUSE DESIGN SYSTEM — tokens.css
   Direction: "Charter-set academic prose on a warm dark-grey surface, with
   Bloomberg-style monospace data tables and charts. Objective, effortless,
   terminal-grade data."
   ---------------------------------------------------------------------------
   Everything is a variable. Artifacts import this file and never hard-code.
   Colour is grayscale-first (colour-blind safe); a single amber signal is
   reserved for the most important number/verdict only.
   ============================================================================ */

:root {
  /* --- Type families ------------------------------------------------------ */
  --font-serif: "Charter", Georgia, "Times New Roman", serif;   /* prose */
  --font-mono:  ui-monospace, "SF Mono", "Menlo", "Consolas", monospace; /* data, labels */

  /* --- Modular scale (base 17px, ratio 1.20 — minor third) ---------------- */
  --fs-50:  0.694rem;   /* micro label / footnote */
  --fs-100: 0.833rem;   /* caption, table cell */
  --fs-200: 0.926rem;   /* small body */
  --fs-300: 1rem;       /* body (17px) */
  --fs-400: 1.2rem;     /* lead / h5 */
  --fs-500: 1.44rem;    /* h4 */
  --fs-600: 1.728rem;   /* h3 */
  --fs-700: 2.074rem;   /* h2 */
  --fs-800: 2.488rem;   /* h1 */
  --fs-900: 2.986rem;   /* cover display */

  --lh-tight: 1.15;
  --lh-snug:  1.3;
  --lh-body:  1.55;

  --tracking-label: 0.08em;   /* small-caps / eyebrow tracking */
  --tracking-tight: -0.01em;  /* large display */

  /* --- Spacing scale (4px base) ------------------------------------------ */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* --- Measure / layout --------------------------------------------------- */
  --measure: 66ch;          /* ideal prose line length */
  --measure-wide: 100%;     /* full-width data grids */
  --radius: 2px;            /* shadow policy: almost none, radius: almost none */
  --rule-thin: 1px;
  --rule-hair: 0.5px;

  /* --- Signal accent (used sparingly, colour-blind-safe amber) ----------- */
  --amber:      #d9a441;
  --amber-dim:  #a67f30;

  /* Data-viz grayscale ramp (light→dark, theme-independent tints applied in components) */
  --data-1: #8b8f96;
  --data-2: #6f747c;
  --data-3: #565b63;
  --data-4: #3f444b;
}

/* ============================================================================
   SURFACE — SLATE is the locked home base (cool warm-grey). Applied on :root
   so artifacts get it by default with no data-theme needed. "paper" is the
   print/PDF variant only.
   ============================================================================ */

:root,
[data-theme="slate"] {
  --bg:        #34383f;
  --bg-raised: #3c414a;
  --bg-sunken: #2c3037;
  --ink:       #e8e6e0;
  --ink-muted: #c2bfb8;   /* lifted for contrast — never set body copy below this */
  --ink-faint: #8f8d86;
  --rule:      #4c5259;
  --rule-strong:#636971;
  --accent:    var(--amber);
}

/* PAPER — light, for printed reports / PDF output only */
[data-theme="paper"] {
  --bg:        #f4f2ec;
  --bg-raised: #faf9f5;
  --bg-sunken: #e9e6de;
  --ink:       #1e1f22;
  --ink-muted: #5c5d5f;
  --ink-faint: #8a8b8d;
  --rule:      #cfccc3;
  --rule-strong:#b0ada3;
  --accent:    #8a5d0f;   /* house light amber — matches report-light .signal */
}
