/* ==========================================================================
   Project Finance Atlas — design tokens
   Green is the ground. Yellow is a signal, never a surface.
   ========================================================================== */

:root {
  /* Brand */
  --forest:      #123C32;
  --deep:        #092B24;
  --emerald:     #17765D;
  --emerald-lo:  #1f8a6d;
  --solar:       #F2C94C;
  --warm-yellow: #FFD968;
  --cream:       #F6F2E8;
  --warm-white:  #FCFBF7;
  --charcoal:    #1D2522;
  --muted:       #66736D;

  /* Derived surfaces */
  --page:        var(--warm-white);
  --panel:       #ffffff;
  --panel-alt:   var(--cream);
  --sunk:        #F1EDE2;
  --line:        #E3DDCE;
  --line-strong: #D2CAB6;
  --line-dark:   rgba(255, 255, 255, 0.13);

  /* Text */
  --ink:         var(--charcoal);
  --ink-soft:    #3C4A44;
  --ink-muted:   var(--muted);
  --ink-invert:  #F3F0E6;
  --ink-invert-muted: rgba(243, 240, 230, 0.62);

  /* Accents used sparingly */
  --accent:      var(--solar);
  --accent-ink:  #4A3A05;
  --accent-wash: rgba(242, 201, 76, 0.16);
  --accent-line: rgba(242, 201, 76, 0.55);

  /* Semantic (kept desaturated so nothing shouts) */
  --ok:      #1F7A5C;
  --ok-wash: rgba(31, 122, 92, 0.10);
  --warn:      #A9741B;
  --warn-wash: rgba(169, 116, 27, 0.11);
  --stop:      #9A4232;
  --stop-wash: rgba(154, 66, 50, 0.10);
  --unknown:      #6B7A73;
  --unknown-wash: rgba(107, 122, 115, 0.10);

  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-xs:   0.7188rem;
  --fs-sm:   0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md:   1.0625rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.625rem;
  --fs-2xl:  2.125rem;
  --fs-3xl:  2.875rem;

  --lh-tight: 1.18;
  --lh-snug:  1.38;
  --lh-body:  1.62;

  /* Space */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 88px;

  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(9, 43, 36, 0.05), 0 1px 1px rgba(9, 43, 36, 0.04);
  --shadow:    0 2px 6px rgba(9, 43, 36, 0.06), 0 8px 22px -12px rgba(9, 43, 36, 0.18);
  --shadow-lg: 0 10px 40px -12px rgba(9, 43, 36, 0.28), 0 2px 8px rgba(9, 43, 36, 0.06);

  --sidebar-w: 250px;
  --topbar-h: 60px;
  --measure: 68ch;

  --t-fast: 140ms;
  --t:      190ms;
  --t-slow: 240ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Fit levels and status share one scale so the vocabulary reads consistently. */
[data-fit="likely"]                { --fit-ink: var(--ok);      --fit-wash: var(--ok-wash); }
[data-fit="potential"]             { --fit-ink: var(--accent-ink); --fit-wash: var(--accent-wash); }
[data-fit="requires-verification"] { --fit-ink: var(--warn);    --fit-wash: var(--warn-wash); }
[data-fit="unlikely"]              { --fit-ink: var(--stop);    --fit-wash: var(--stop-wash); }
[data-fit="unknown"]               { --fit-ink: var(--unknown); --fit-wash: var(--unknown-wash); }

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 1ms; --t: 1ms; --t-slow: 1ms; }
}
