/*!
 * Fresh Air — design tokens: the fonts, the two color themes, and
 * Bootstrap's variables pointed at them.
 *
 * Loaded by the public pages (the landing, sign-in pages, «Что мы храним»,
 * the Tailwind terms) and the cabinet, after base.css; the admin panel
 * doesn't load it.
 *
 * The theme follows theme.js: data-bs-theme="light" | "dark" on <html>,
 * set in <head> before the first paint (the system's choice until the
 * visitor picks). Colors only as --fa-* here; components use the tokens.
 *
 * Fonts: our own copies, SIL Open Font License (assets/fonts/OFL-*.txt) —
 * Unbounded (headings), Manrope (text), JetBrains Mono (labels). Latin and
 * Cyrillic subsets; a page downloads only the faces and subsets it uses.
 */

@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url("../fonts/unbounded-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url("../fonts/unbounded-latin-600-normal.woff2") format("woff2"); 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: "Manrope"; font-weight: 400; font-display: swap; src: url("../fonts/manrope-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); 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: "Manrope"; font-weight: 600; font-display: swap; src: url("../fonts/manrope-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); 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: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2"); 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; }

/* Light: high-altitude daylight. Dark: the night sky behind the globe. */
:root,
[data-bs-theme="light"] {
  --fa-bg: #eef3f9;          /* the page */
  --fa-bg-2: #ffffff;        /* cards, the ticker */
  --fa-ink: #0b1522;         /* text */
  --fa-mut: #475a70;         /* secondary text */
  --fa-dim: #6b7c91;         /* labels, rules' text */
  --fa-line: rgba(20, 40, 70, 0.14);
  --fa-chip: rgba(255, 255, 255, 0.86);
  --fa-lime: #c6ff3e;        /* the accent: the packet, the main button */
  --fa-lime-ink: #3f6a00;    /* the accent as text and links */
  --fa-lime-ink-rgb: 63, 106, 0;
  --fa-lime-line: rgba(63, 106, 0, 0.45);
  --fa-cyan: #0b7fa6;        /* the second leg: server -> internet */
  --fa-cyan-line: rgba(11, 127, 166, 0.5);
  --fa-on-lime: #0b1302;     /* text on the lime button */
  --fa-warn: #c4462f;        /* the log that shouldn't be there */
  --fa-glow: rgba(60, 140, 255, 0.16);
  --fa-grid: rgba(20, 40, 70, 0.05);
  --fa-wash-lime: rgba(198, 255, 62, 0.10);
  --fa-wash-cyan: rgba(11, 127, 166, 0.06);

  --fa-disp: "Unbounded", "Arial Black", system-ui, sans-serif;
  --fa-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --fa-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  color-scheme: light;
}

[data-bs-theme="dark"] {
  --fa-bg: #04080f;
  --fa-bg-2: #0a1220;
  --fa-ink: #eaf2fc;
  --fa-mut: #94a5ba;
  --fa-dim: #66778f;
  --fa-line: rgba(148, 165, 186, 0.16);
  --fa-chip: rgba(9, 17, 29, 0.78);
  --fa-lime-ink: #c6ff3e;
  --fa-lime-ink-rgb: 198, 255, 62;
  --fa-lime-line: rgba(198, 255, 62, 0.5);
  --fa-cyan: #7de3ff;
  --fa-cyan-line: rgba(125, 227, 255, 0.5);
  --fa-glow: rgba(63, 153, 255, 0.12);
  --fa-grid: rgba(148, 165, 186, 0.05);
  --fa-warn: #ef7a62;
  --fa-wash-lime: rgba(198, 255, 62, 0.07);
  --fa-wash-cyan: rgba(125, 227, 255, 0.06);

  color-scheme: dark;
}

/* Bootstrap reads these, so its components (forms, cards, alerts, the
   offcanvas menu) take the palette without per-component rules. */
:root,
[data-bs-theme="light"],
[data-bs-theme="dark"] {
  --bs-body-bg: var(--fa-bg);
  --bs-body-color: var(--fa-ink);
  --bs-body-font-family: var(--fa-body);
  --bs-secondary-color: var(--fa-mut);
  --bs-secondary-bg: var(--fa-bg-2);
  --bs-tertiary-bg: var(--fa-bg-2);
  --bs-secondary-text-emphasis: var(--fa-mut);
  --bs-emphasis-color: var(--fa-ink);
  --bs-border-color: var(--fa-line);
  --bs-heading-color: var(--fa-ink);
  --bs-link-color: var(--fa-lime-ink);
  --bs-link-color-rgb: var(--fa-lime-ink-rgb);
  --bs-link-hover-color: var(--fa-lime-ink);
  --bs-link-hover-color-rgb: var(--fa-lime-ink-rgb);
  --bs-primary: var(--fa-lime-ink);
  --bs-primary-rgb: var(--fa-lime-ink-rgb);
  --bs-primary-text-emphasis: var(--fa-lime-ink);
  --bs-focus-ring-color: var(--fa-lime-line);
  --nm-rule: var(--fa-line);
}
