/* ============================================================================
   tokens.css — the palette, type scale and spacing scale.
   Base is runway45 brass-on-olive; see MIGRATION-NOTES D2 for why.
   Part of the unified design system. The system is split across three files so
   that module iframes can take the tokens and the remaps WITHOUT inheriting the
   shell's own resets (* { box-sizing }, html/body margins, overflow rules),
   which would otherwise reflow every ported tool's layout.

     tokens.css        the palette and scales. loaded by the shell AND by every module.
     theme.css         shell chrome only. loaded by index.html.
     module-theme.css  per-module token remaps. loaded by every module.
   ============================================================================ */

:root {
  /* --- surfaces, darkest to lightest --------------------------------------- */
  --hd-bg:          #0E100D;
  --hd-surface:     #171A15;
  --hd-surface-2:   #1E2219;
  --hd-surface-3:   #242A1D;
  --hd-glass:       rgba(30, 34, 25, 0.58);
  --hd-glass-strong:rgba(30, 34, 25, 0.86);

  /* --- lines --------------------------------------------------------------- */
  --hd-border:      #2A2E22;
  --hd-border-soft: #20241A;
  --hd-hairline:    rgba(237, 232, 220, 0.08);
  --hd-glass-border:rgba(201, 162, 39, 0.16);

  /* --- text, strongest to weakest ------------------------------------------ */
  --hd-text:        #EDE8DC;
  --hd-text-dim:    #B8B2A0;
  --hd-text-mute:   #8A8474;

  /* --- accents. every accent has a dim companion for fills and borders ----- */
  --hd-brass:       #C9A227;   /* primary / brand */
  --hd-brass-soft:  #E0C05A;
  --hd-brass-dim:   #5C4E1E;
  --hd-moss:        #7BAE7B;   /* positive */
  --hd-moss-dim:    #3A5638;
  --hd-steel:       #8FB0CE;   /* informational */
  --hd-steel-dim:   #33475A;
  --hd-rust:        #D06B5C;   /* negative */
  --hd-rust-dim:    #5A2E27;
  --hd-amber:       #E0A83D;   /* warning */
  --hd-amber-dim:   #4A3718;

  /* --- type --------------------------------------------------------------- */
  --hd-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --hd-font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --hd-font-mono:    'IBM Plex Mono', 'SF Mono', Consolas, monospace;
  /* One handwritten accent face. Kept as a system token rather than flattened
     away, because 200 Day Mission uses it to mark hand-annotated journal notes
     and that distinction carries meaning. Used nowhere else. */
  --hd-font-hand:    'Caveat', 'Segoe Script', cursive;

  /* type scale — 1.200 minor third, 16px base */
  --hd-fs-xs:   0.694rem;
  --hd-fs-sm:   0.833rem;
  --hd-fs-base: 1rem;
  --hd-fs-md:   1.2rem;
  --hd-fs-lg:   1.44rem;
  --hd-fs-xl:   1.728rem;
  --hd-fs-2xl:  2.074rem;

  /* --- spacing scale — 4px base ------------------------------------------- */
  --hd-s1: 4px;
  --hd-s2: 8px;
  --hd-s3: 12px;
  --hd-s4: 16px;
  --hd-s5: 24px;
  --hd-s6: 32px;
  --hd-s7: 48px;

  /* --- shape and depth ---------------------------------------------------- */
  --hd-r-sm: 6px;
  --hd-r:    10px;
  --hd-r-lg: 18px;
  --hd-shadow:    0 1px 2px rgba(0, 0, 0, .30), 0 8px 28px rgba(0, 0, 0, .34);
  --hd-shadow-lg: 0 12px 40px rgba(0, 0, 0, .48);
  --hd-grad: linear-gradient(135deg, #C9A227 0%, #E0C05A 60%, #7BAE7B 100%);

  /* --- shell chrome ------------------------------------------------------- */
  --hd-nav-h:  56px;   /* top bar, mobile and desktop */
  --hd-rail-w: 248px;  /* side rail, desktop only */
  --hd-tabbar-h: 0px;  /* set by media query on mobile */

  color-scheme: dark;
}
