/* ============================================================
   FincoLedger — brand tokens
   帳務精準 · 申報安心

   Two scopes, deliberately separate:
     :root          marketing site (fincoledger.com)
     .fl-console    accounting engine chrome

   The marketing palette is burgundy + gold. The Console is NOT,
   because in an accounting UI red already means "error /
   unbalanced / failed validation". Brand red and alarm red in the
   same interface cancel each other out. The logo carries the
   brand into the Console; the chrome stays neutral.
   ============================================================ */

:root {
  /* --- burgundy: does all the functional work -------------- */
  --fl-ink:            #3F1018;  /* headings, dark section fills   12.9:1 on ivory */
  --fl-brand:          #5C1A24;  /* CTA fill, links, active nav    12.2:1 */
  --fl-brand-hover:    #7A2632;  /* hover / pressed                 8.4:1 */
  --fl-brand-subtle:   #F2E7E5;  /* tinted card / callout background */
  --fl-brand-border:   #E0CFCC;

  /* --- gold: decorative, rationed -------------------------- */
  --fl-bronze:         #6E5726;  /* eyebrow + small text ON IVORY   6.5:1 PASSES */
  --fl-bronze-lg:      #8E7333;  /* >=24px text, icons, rules ONLY  4.3:1 */
  --fl-gold:           #C0A566;  /* NEVER text on light. Rules, dark-section accents */
  --fl-gold-light:     #D6BE8C;  /* text ON burgundy                8.9:1 on --fl-ink */
  --fl-gold-pale:      #F2E4BE;  /* headings ON burgundy */

  /* --- surfaces: warm ivory, NOT green-tinted white -------- */
  --fl-surface:        #FBF8F3;  /* page background */
  --fl-surface-2:      #F4EEE4;  /* cards, alternating bands */
  --fl-surface-3:      #EBE3D6;  /* wells, table headers */
  --fl-hairline:       #E2DACD;

  /* --- text on light --------------------------------------- */
  --fl-text:           #241017;
  --fl-text-muted:     #6B5B5E;

  /* --- radii / shadow (rounded to echo Quicksand) ---------- */
  --fl-radius:         12px;
  --fl-radius-pill:    999px;
  --fl-shadow:         0 1px 2px rgba(63,16,24,.06), 0 8px 24px rgba(63,16,24,.06);
}

/* ============================================================
   CONSOLE — neutral warm-grey chrome.
   Brand appears only in the logo and the top bar rule.
   Every colour below is functional and unambiguous.
   ============================================================ */

.fl-console {
  --fl-c-bg:           #FFFFFF;
  --fl-c-surface:      #F7F6F4;  /* warm grey, ties to ivory without being brand */
  --fl-c-surface-2:    #EFEDEA;
  --fl-c-border:       #E3DFDA;
  --fl-c-text:         #1C1A19;
  --fl-c-muted:        #6B6560;

  /* primary action: neutral slate, deliberately NOT red ----- */
  --fl-c-primary:      #24303C;
  --fl-c-primary-hover:#111A23;
  --fl-c-link:         #1D4ED8;

  /* functional — reserved meanings, do not reuse for brand -- */
  --fl-c-danger:       #DC2626;  /* unbalanced journal, validation failure */
  --fl-c-danger-bg:    #FEF2F2;
  --fl-c-warning:      #B45309;  /* pending, needs review */
  --fl-c-warning-bg:   #FFFBEB;
  --fl-c-success:      #15803D;  /* balanced, posted, reconciled */
  --fl-c-success-bg:   #F0FDF4;
  --fl-c-info:         #0369A1;
  --fl-c-info-bg:      #F0F9FF;

  /* journal state machine: draft → approved → posted → voided | reversed */
  --fl-state-draft:    #6B6560;
  --fl-state-approved: #0369A1;
  --fl-state-posted:   #15803D;  /* immutable — the "safe" terminal state */
  --fl-state-voided:   #9A9490;
  --fl-state-reversed: #B45309;

  /* ledger figures */
  --fl-debit:          #1C1A19;
  --fl-credit:         #1C1A19;
  --fl-negative:       #DC2626;  /* the ONLY red in the Console */
}

/* ------------------------------------------------------------
   Guardrails. Uncomment during review to catch misuse:

   .fl-console [style*="#5C1A24"],
   .fl-console [style*="#C0A566"] { outline: 3px dashed magenta; }

   Rule of thumb:
   - Gold is never text on a light background.
   - Burgundy never appears in the Console except in the logo.
   - #DC2626 never means "brand" anywhere.
   ------------------------------------------------------------ */
