/* ============================================================
   editorial-tokens.css
   Shared editorial finance theme tokens — cream paper, navy ink,
   brand blue + orange, Fraunces serif, JetBrains Mono.

   Source of truth: the funnel page (static/css/funnel.css), which
   was designed first. The /chat page mirrors this palette via
   static/css/chat-editorial.css (using --ed-* aliases for scoped
   !important overrides). Other templates consume these tokens
   directly off :root via the style bundle.

   Concatenated LAST into style-bundle.css so it has final say
   on any same-named tokens defined earlier in the bundle.
   ============================================================ */

:root {
  /* Ink + paper */
  --ink: #0b1b2b;
  --ink-soft: #1f3a5f;
  --paper: #faf7f2;
  --paper-2: #f3ede2;
  --rule: #c8c0b0;
  --rule-strong: #9c9080;

  /* Brand colors — pulled from the logo: bright royal blue (roof)
     and bright orange (door stripe). All contrast ratios on --paper
     hit WCAG AAA. */
  --brand-blue: #1a6db5;
  --brand-blue-soft: #4a9ad4;
  --brand-blue-deep: #11507f;
  --brand-orange: #ef7b1d;
  --brand-orange-soft: #f5a04a;
  --brand-orange-deep: #c95f0a;

  /* Back-compat aliases — older rules still reference --gold /
     --gold-soft. Mapped to the brand orange so the palette stays
     consistent. */
  --gold: var(--brand-orange);
  --gold-soft: var(--brand-orange-soft);

  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: "Fraunces", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Overrides for legacy bundle tokens — these names are referenced
     across style-sidebar.css / style-improvements.css / style-professional.css
     for the page body, .main-content, cards, and text colors.

     style-professional.css applies `body { background: var(--bg-primary)
     !important }`, so remapping --bg-primary is what actually shifts the
     page background to cream (--bg-main alone doesn't win against the
     !important rule). Same pattern for --text-* across the bundle. */

  /* Backgrounds */
  --bg-main: #faf7f2;        /* was #f8fafc — editorial paper */
  --bg-primary: #faf7f2;     /* was #ffffff — editorial paper (locked with !important on body) */
  --bg-secondary: #f3ede2;   /* was #f8fafc — editorial paper-2 */
  --bg-tertiary: #f3ede2;    /* was #f1f5f9 — editorial paper-2 */
  --bg-hover: #f3ede2;       /* was #f1f5f9 — editorial paper-2 */

  /* Text */
  --text-primary: #0b1b2b;   /* was #1e293b/#0f172a — editorial ink */
  --text-secondary: #1f3a5f; /* was #475569/#334155 — editorial ink-soft */
  --text-muted: #9c9080;     /* was #94a3b8/#64748b — editorial rule-strong */
}

/* Dark mode override — match editorial dark instead of older navies.
   Also remaps the editorial-specific tokens (--ink, --paper, --rule)
   so any rule using them directly stays readable on the dark surface.
   Without these, e.g. .eyebrow-page on the funnel hero stayed at
   --ink-soft=#1f3a5f (dark navy text) on a #0b1220 background. */
[data-theme="dark"] {
  /* Legacy bundle tokens */
  --bg-main: #0b1220;
  --bg-primary: #0b1220;
  --bg-secondary: #11192a;
  --bg-tertiary: #11192a;
  --bg-hover: #11192a;
  --text-primary: #f5efe2;
  --text-secondary: #b8c4d6;
  --text-muted: #6c7a90;

  /* Editorial tokens — dark variants */
  --ink: #f5efe2;          /* was #0b1b2b — now light cream for text */
  --ink-soft: #b8c4d6;     /* was #1f3a5f — now light blue-gray */
  --paper: #0b1220;        /* was #faf7f2 — now editorial deep ink */
  --paper-2: #11192a;      /* was #f3ede2 — now slightly lifted deep ink */
  --rule: rgba(126, 196, 245, 0.18);       /* was #c8c0b0 cream-rule */
  --rule-strong: rgba(126, 196, 245, 0.32); /* was #9c9080 */
}
