/*
 * Flux design tokens for the developer docs.
 *
 * Sources (ERP.BE/BRAND_GUIDELINES_PROMPT.md and ERP.FE, 2026-11-01). The brand kit
 * is being redesigned, so treat these as provisional and swap them here only:
 *   - Logo blue: a gradient from about #0878F8 (top) to #0048D8 (bottom).
 *   - Wordmark ink: near-black navy #182028.
 *   - App nav rail: #101924. The header uses it in both themes, so the white
 *     wordmark variant (assets/img/flux-logo-on-dark.png) always sits on it.
 *   - Type: Inter Variable, as in the app (OFL-1.1, copied from
 *     @fontsource-variable/inter 5.2.8). latin-ext carries the naira sign (U+20A6).
 *   - Code: the reader's system monospace font; no extra download.
 *
 * Contrast (WCAG 2.1) was checked for every text pair below; all are 4.5:1 or more.
 */

/* ---- Fonts ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

:root {
  /* ---- Brand palette ---- */
  --fx-blue-400: #3d8fff;      /* derived: hover on dark */
  --fx-blue-500: #0878f8;      /* logo gradient top; focus ring, accents */
  --fx-blue-600: #0058e0;      /* derived: button fill, 6.05:1 with white text */
  --fx-blue-700: #0048d8;      /* logo gradient bottom; links on white, 7.2:1 */
  --fx-blue-800: #0b3fa8;      /* derived: hover, inline code text */
  --fx-blue-tint: #eef3fb;     /* derived: callouts, selected rows */
  --fx-blue-tint-2: #dbe7fa;   /* derived: callout borders */
  --fx-navy: #182028;          /* wordmark ink */
  --fx-rail: #101924;          /* app nav rail: header, flow cards */
  --fx-ink: #182028;
  --fx-ink-mute: #556070;      /* 6.38:1 on white */
  --fx-surface: #f6f8fb;
  --fx-rule: #e3e8ef;
  --fx-white: #ffffff;

  /* ---- Typography ---- */
  --font-sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --fs-body: 1rem;
  --fs-small: 0.9rem;
  --fs-kicker: 0.72rem;
  --fs-h4: clamp(1.08rem, 1.4vw, 1.2rem);
  --lh-body: 1.65;
  --w-head: 650;
  --w-strong: 600;

  /* ---- Shape ---- */
  --radius-card: 16px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --btn-h: 40px;

  /* ---- Theme: light ---- */
  color-scheme: light dark;
  --bg: var(--fx-white);
  --bg-subtle: var(--fx-surface);
  --bg-raised: var(--fx-white);
  --text: var(--fx-ink);
  --text-mute: var(--fx-ink-mute);
  --rule: var(--fx-rule);
  --rule-strong: #c9d1dc;
  --link: var(--fx-blue-700);
  --link-hover: var(--fx-blue-800);
  --heading: var(--fx-navy);
  --accent: var(--fx-blue-500);
  --accent-ink: var(--fx-blue-700);
  --btn-bg: var(--fx-blue-600);
  --btn-bg-hover: var(--fx-blue-800);
  --callout-bg: var(--fx-blue-tint);
  --callout-rule: var(--fx-blue-tint-2);
  --chip-bg: var(--fx-blue-tint);
  --chip-text: var(--fx-blue-800);
  --ok: #0e7a43;
  --ok-bg: #e5f5ec;
  --bad: #b4232c;
  --bad-bg: #fdebec;
  --warn: #8a5300;
  --warn-bg: #fff3dc;
  --code-bg: #0e1621;
  --code-text: #e6ebf1;
  --code-mute: #8e9bad;
  --code-key: #7fb4ff;
  --code-str: #a8e1b5;
  --code-num: #f5b97a;
  --code-lit: #f0a0c8;
  --inline-code-bg: var(--fx-blue-tint);
  --inline-code-text: var(--fx-blue-800);
  --focus: var(--fx-blue-500);
  --header-bg: var(--fx-rail);
  --header-text: var(--fx-white);
  --header-mute: #b7c2d0;
  --shadow: 0 1px 2px rgba(16, 25, 36, 0.06), 0 8px 24px rgba(16, 25, 36, 0.06);
}

/* ---- Theme: dark ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1119;
    --bg-subtle: #0f1722;
    --bg-raised: #131d2a;
    --text: #e6ebf1;
    --text-mute: #9aa6b6;
    --rule: rgba(255, 255, 255, 0.1);
    --rule-strong: rgba(255, 255, 255, 0.3);
    --link: #6ea8ff;
    --link-hover: #a6c9ff;
    --heading: #ffffff;
    --accent: var(--fx-blue-500);
    --accent-ink: #6ea8ff;
    --btn-bg: var(--fx-blue-600);
    --btn-bg-hover: var(--fx-blue-500);
    --callout-bg: rgba(8, 120, 248, 0.1);
    --callout-rule: rgba(8, 120, 248, 0.4);
    --chip-bg: rgba(110, 168, 255, 0.14);
    --chip-text: #a6c9ff;
    --ok: #5fd39a;
    --ok-bg: rgba(95, 211, 154, 0.12);
    --bad: #ff8a92;
    --bad-bg: rgba(255, 138, 146, 0.12);
    --warn: #ffc266;
    --warn-bg: rgba(255, 194, 102, 0.12);
    --code-bg: #0e1621;
    --inline-code-bg: rgba(110, 168, 255, 0.12);
    --inline-code-text: #a6c9ff;
    --shadow: none;
  }
}
