/* ============================================================================
   SolomonsSource / Envelope — canonical design tokens  (redesign R1)
   ----------------------------------------------------------------------------
   ONE source of truth for BOTH properties:
     - the Flask app  (envelope.solomonssource.com) — THIS file, served at
       /static/tokens.css, linked from app/templates/base.html.
     - the marketing site (solomonssource.com) — a BYTE-IDENTICAL copy at
       landing/tokens.css, served /tokens.css by the apex nginx vhost.
   The two vhosts have separate static roots (the app proxies /static to Flask;
   the apex serves landing/ straight from disk), so a single linked file cannot
   reach both — the copy is intentional, same reason the favicon is duplicated.
   scripts/check_tokens_sync.py asserts the two files are byte-identical AND that
   the --sol-cat-* block matches app/palette.py (canonical). Update all three
   together.

   Namespaced --sol-* so nothing here collides with dashboard.css's legacy dark
   theme (--bg/--text/--accent/--border). This file was visually INERT through
   R1/R2a except --sol-cat-*; as of R2b-2a dashboard.css consumes the surface,
   ink, border, shadow, radius and green-ramp tokens directly, so a value change
   here now MOVES THE APP. Only a handful of legacy names survive in
   dashboard.css, kept alive solely for the un-reskinned demo wallet (R3).
   landing/index.html still consumes no --sol-* at all — the landing redesign is
   R4 — so these values remain inert on the apex until then.

   Values are the existing brand ramp extracted from landing/index.html
   (BRAND.md hard rule #2 — canonize the real green, do not invent one).
   ============================================================================ */
:root {
  /* ---- surfaces + ink -------------------------------------------------- */
  --sol-canvas:        #FAFAF8;   /* near-white page canvas (== theme-color) */
  --sol-surface:       #FFFFFF;   /* card / raised surface */
  --sol-surface-alt:   #F7F7F5;   /* subtle inset panel */
  --sol-ink:           #0D1F2D;   /* primary text — deliberate cool near-black */
  --sol-ink-mid:       #4A5568;   /* secondary text */
  /* R2b-2a: #718096 -> #64748B. Measured 4.02:1 on --sol-surface — under the
     4.5:1 AA floor — while this token's own job description is "captions",
     i.e. small TEXT. A token that fails its own docstring is a trap for the
     next consumer, and with zero text consumers today it is free to correct.
     #64748B measures 4.76:1 on white and 4.55:1 on --sol-canvas. */
  --sol-ink-soft:      #64748B;   /* tertiary / captions — AA on white */
  /* Hairlines are tinted with the INK, not pure black (rgba(13,31,45,…) ==
     --sol-ink). Pure-black hairlines on a warm near-white canvas read as a
     dirty gray seam; an ink-tinted line stays in the same cool family as the
     type and disappears into the layout the way a hairline should. Chrome
     values taken from the v4 reskin reference (--line / --line-hi). */
  --sol-border:        rgba(13,31,45,0.10);
  --sol-border-strong: rgba(13,31,45,0.22);

  /* ---- brand green ramp — ACCENT ONLY (buttons, links, savings/growth) -- */
  /* NOT a category identity color: white text on #1D9E75 fails AA (~3.2:1), so
     brand green never carries a card face. moss (--sol-cat-moss) is the green
     family's card-legible sibling and the flagship CATEGORY default. */
  --sol-green-50:  #E1F5EE;
  --sol-green-100: #9FE1CB;
  --sol-green-400: #1D9E75;   /* brand green */
  --sol-green-600: #0F6E56;   /* deep — text-on-light */
  --sol-green-800: #085041;

  /* ---- semantic — STATUS ONLY, used sparingly (BRAND.md) --------------- */
  /* one amber for "low", one red for "empty/over". Never used for identity. */
  /* R2b-2a: darkened #B26B00 -> #8A5A00. The old value measured 4.20:1 on
     white — under the 4.5:1 AA floor — and R2b-2a is the first task to render
     it as TEXT (the payday preview's partial-fund line). #8A5A00 is 5.93:1
     and is the value the v4 reskin reference already used for --warn. */
  --sol-warn:   #8A5A00;   /* low / attention marker */
  --sol-danger: #C0392B;   /* empty / over / decline (== landing --red-tx) */

  /* ---- category identity palette (canonical source: app/palette.py) ----- */
  /* 16 tokens, one muted mid-dark family tuned for white-canvas card faces
     (white text >= ~4.3:1). First 8 are the default-assignment set. 16 EXIST
     and RESOLVE; 15 are user-selectable — crimson is resolution-only as of
     R2b-1 (red is reserved for decline/empty STATUS, never identity), so it
     stays here for legacy rows but is never offered in the picker. Color says
     WHICH envelope, never its status. Canonical set: app/palette.py. */
  --sol-cat-moss:     #2F7D57;
  --sol-cat-pine:     #276353;
  --sol-cat-teal:     #1C6E74;
  --sol-cat-sky:      #2C6B94;
  --sol-cat-steel:    #3A5C94;
  --sol-cat-indigo:   #544A9B;
  --sol-cat-violet:   #6A4790;
  --sol-cat-plum:     #7A3E70;
  --sol-cat-berry:    #93365C;
  --sol-cat-crimson:  #A33B44;
  --sol-cat-clay:     #9B4A3B;
  --sol-cat-rust:     #8A5230;
  --sol-cat-amber:    #8E6B26;
  --sol-cat-olive:    #5E7038;
  --sol-cat-stone:    #6E5D51;
  --sol-cat-graphite: #2E3A42;

  /* ---- type ------------------------------------------------------------ */
  /* display face = single dominant balance figure only (nothing stacks there).
     tabular figures for any stacked/aligned currency (bills, activity, summary
     band): font-variant-numeric: tabular-nums; — wired in R2. */
  --sol-font-display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --sol-font-sans:    'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --sol-font-mono:    'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --sol-fs-xs:   0.75rem;
  --sol-fs-sm:   0.875rem;
  --sol-fs-base: 1rem;
  --sol-fs-lg:   1.125rem;
  --sol-fs-xl:   1.5rem;
  --sol-fs-2xl:  2rem;
  --sol-fs-3xl:  2.75rem;

  --sol-lh-tight: 1.15;
  --sol-lh-base:  1.5;

  /* ---- spacing (4px base) ---------------------------------------------- */
  --sol-sp-1:  0.25rem;
  --sol-sp-2:  0.5rem;
  --sol-sp-3:  0.75rem;
  --sol-sp-4:  1rem;
  --sol-sp-6:  1.5rem;
  --sol-sp-8:  2rem;
  --sol-sp-12: 3rem;

  /* ---- radius + elevation — light, hairline, no glow (BRAND.md) -------- */
  --sol-radius-sm: 6px;
  --sol-radius:    14px;   /* v4 chrome --r; matches the shipped card radius */
  --sol-radius-lg: 20px;
  /* ONE resting elevation (BRAND.md: "hairline borders and/or one soft shadow
     level"). The wide, low-opacity second layer is what separates a white panel
     from a near-white canvas without a visible drop-shadow edge. */
  --sol-shadow:      0 1px 2px rgba(13,31,45,0.05), 0 8px 24px rgba(13,31,45,0.06);
  /* HOVER ONLY — not a second resting elevation. Used for the card lift, and
     suppressed under prefers-reduced-motion along with the transform. */
  --sol-shadow-lift: 0 2px 4px rgba(13,31,45,0.06), 0 14px 32px rgba(13,31,45,0.10);
}
