/* ============================================================
   tokens.css — the single source of design values.

   Two palettes, one semantic layer.

   PALETTES are raw values that never change:
     · "paper"  — the light surface used by / and /teams
     · "ink"    — the dark surface. Used BOTH for the dark inlays on the
                  light pages (.ledger, .section-ink) AND as the page-level
                  theme for /hermes. All three source files already used
                  identical values here, so this is a merge, not a change.

   The SEMANTIC layer (--surface, --fg, --accent, …) is what base.css and
   the components consume. /hermes swaps the semantic layer over to the ink
   palette via :root.theme-ink — it overrides tokens, it does not redefine
   components.
   ============================================================ */

:root {
  /* ── Paper palette ───────────────────────────────────────── */
  --paper: #ECEDE9;
  --paper-deep: #E2E4DE;
  --card: #F4F5F1;
  --ink: #161D26;
  --ink-soft: #3B4450;
  --ink-faint: #6C7480;
  --wax: #A33427;
  --wax-soft: #C4553F;
  --brass: #A8834B;
  --line: #C9CCC4;
  --ok: #3E6B4F;

  /* ── Ink palette ─────────────────────────────────────────── */
  --ink-bg: #12161D;
  --ink-bg-raise: #181E27;
  --ink-panel: #1C2430;
  --ink-line: #2A3340;
  --ink-rule: #222B37;        /* hairline between ledger entries */
  --ink-text: #D9DCD6;
  --ink-body: #C3C8CF;        /* body copy inside the ledger */
  --ink-text-soft: #9AA2AD;
  --ink-text-faint: #5F6975;
  --ink-bar: #8B94A0;         /* ledger bar label */
  --ink-heading: #F0F1EC;
  --ink-quiet: #B9BFC8;       /* .ceiling body copy */
  --ink-wax: #C4553F;
  --ink-brass: #C9A566;
  --ink-ok: #7FC79A;
  --ink-blue: #9FC0E8;
  --ink-hold: #E8A08F;

  /* ── Ledger tag chips ────────────────────────────────────── */
  --tag-research-bg: #243244;  --tag-research-fg: #9FC0E8;
  --tag-draft-bg:    #2C3A2E;  --tag-draft-fg:    #A9CBA4;
  --tag-sent-bg:     #1F3B2C;  --tag-sent-fg:     #7FC79A;
  --tag-hold-bg:     #4A231C;  --tag-hold-fg:     #E8A08F;
  --tag-policy-bg:   #3A3322;  --tag-policy-fg:   #D8BC7E;

  /* ── Type families ───────────────────────────────────────── */
  --display: "Instrument Serif", Georgia, serif;
  --body: "Instrument Sans", system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, monospace;

  /* ── Semantic layer — light theme (/ and /teams) ─────────── */
  --surface: var(--paper);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --fg-faint: var(--ink-faint);
  --rule: var(--line);
  --accent: var(--wax);
  --accent-2: var(--brass);
  --heading-color: var(--ink);
  --nav-bg: color-mix(in srgb, var(--paper) 88%, transparent);

  /* Scalars that differ between the light pages and /hermes. Tokenised so
     base.css can be shared verbatim rather than overridden. */
  --fs-base: 17px;
  --lh-base: 1.6;
  --lh-heading: 1.08;
  --h2-size: clamp(32px, 4.4vw, 52px);
  --h2-tracking: -.01em;
  --section-pad: 96px;
  --section-head-w: 640px;
  --section-head-mb: 56px;
  --section-head-p-mt: 16px;
  --nav-gap: 28px;
  --nav-fs: 15px;
  --footer-pad: 36px;
}

/* ── Semantic layer — ink theme (/hermes) ──────────────────── */
:root.theme-ink {
  --surface: var(--ink-bg);
  --fg: var(--ink-text);
  --fg-soft: var(--ink-text-soft);
  --fg-faint: var(--ink-text-faint);
  --rule: var(--ink-line);
  --accent: var(--ink-wax);
  --accent-2: var(--ink-brass);
  --heading-color: var(--ink-heading);
  --nav-bg: rgba(18, 22, 29, .9);

  --fs-base: 16.5px;
  --lh-base: 1.65;
  --lh-heading: 1.1;
  --h2-size: clamp(30px, 4vw, 46px);
  --h2-tracking: normal;
  --section-pad: 88px;
  --section-head-w: 660px;
  --section-head-mb: 52px;
  --section-head-p-mt: 14px;
  --nav-gap: 26px;
  --nav-fs: 14.5px;
  --footer-pad: 34px;
}
