/*
  Report Engine — theme tokens.

  House style: a technical, mono-led system. IBM Plex Mono for headings and
  labels, IBM Plex Sans for body, a deep sage-green accent. The type system is
  constant; colour varies per project (custom palettes map onto these tokens).

  Canonical palette tokens, read by report.css, proposal.css, and the figures:
    --paper --paper-2 --ink --ink-soft --accent --accent-deep --accent-wash
    --accent-2 --accent-2-wash --taupe --line --line-soft --flag
*/

:root {
  /* Type system — constant across projects. */
  --display: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --font-serif: var(--body);            /* intake-page alias (now sans) */

  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --step: 1.5rem;

  /* House palette: warm off-white, near-black ink, deep sage-green accent. */
  --paper:        #f3f2ec;
  --paper-2:      #e9e8df;
  --ink:          #16160f;
  --ink-soft:     #45453a;
  --accent:       #4e7a57;   /* deep sage green (reads green at small sizes) */
  --accent-deep:  #3c6a48;
  --accent-wash:  rgba(78,122,87,0.15);
  --accent-2:     #6f6f60;   /* muted taupe, the quiet secondary */
  --accent-2-wash:rgba(111,111,96,0.12);
  --taupe:        #86867a;
  --line:         rgba(20,20,12,0.16);
  --line-soft:    rgba(20,20,12,0.08);
  --flag:         #9a5a3c;   /* clay — estimates, inference, missing */

  /* Intake-page aliases — resolve against the active theme. */
  --bg:          var(--paper);
  --surface:     var(--paper-2);
  --muted:       var(--ink-soft);
  --rule:        var(--line);
  --accent-soft: var(--accent-wash);
}

/* Crisp paper-white variant. */
[data-theme="paper-white"] {
  --paper:   #ffffff;
  --paper-2: #f3f2ec;
}

/* Per-project colour is set by mapping custom hexcodes onto the tokens above
   (a [data-theme="<slug>"] block added at render time). The mono type system
   stays constant. */

/* ---- Circa theme ----------------------------------------------------------
   Mapped from Circa's own brand palette (the cream label on tobacco-brown knit).
   The mono type system stays constant; only colour changes per project.        */
[data-theme="circa"] {
  --paper:         #fbf9f6;
  --paper-2:       #f5f1ea;
  --ink:           #1e1913;
  --ink-soft:      #4e443a;
  --accent:        #8a4e24;
  --accent-deep:   #6d3d1e;
  --accent-wash:   rgba(138,78,36,0.13);
  --accent-2:      #6b5f50;
  --accent-2-wash: rgba(107,95,80,0.12);
  --taupe:         #7d7163;
  --line:          rgba(30,25,19,0.16);
  --line-soft:     rgba(30,25,19,0.07);
  --flag:          #973d2b;
}
