/*
 * Cyrillic faces for the DBX web UI. Added by this deployment, not upstream.
 *
 * Why this exists
 * ---------------
 * DBX bundles Geist Variable in two subsets only — `geist-latin` and
 * `geist-latin-ext`. Their @font-face unicode-ranges stop at U+2FF / U+206F,
 * so no bundled face covers Cyrillic (U+0400-U+04FF). Every Russian label
 * therefore fell through to the next family in DBX's own stack, which is the
 * CJK fallback list: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei".
 *
 * Those CJK fonts do contain Cyrillic glyphs, so nothing broke — text rendered
 * — but it rendered in a Chinese UI face whose Cyrillic is a low-priority
 * afterthought. Latin stayed in Geist, so every label came out two typefaces.
 * On Linux it landed on Noto Sans instead, purely by accident of what was
 * installed.
 *
 * The fix
 * --------
 * Declare Cyrillic-subset faces under the *same* family names ("Geist
 * Variable", "Geist Variable Tabular") and the *same* unicode-ranges Google
 * uses for Inter. Latin keeps rendering in Geist; only Cyrillic is served by
 * Inter, a geometric grotesque drawn for the same design language as Geist, so
 * the two sit together without a visible seam.
 *
 * This is deliberately done at the @font-face level rather than by rewriting
 * DBX's font stacks:
 *   - every DBX font setting still resolves, because they all name
 *     "Geist Variable" instead of hard-coding a file path;
 *   - the canvas data grid resolves families through the same cascade, so
 *     table cells are fixed too, not just DOM text;
 *   - the app's own Settings → Appearance font pickers keep working.
 *
 * The alternative — overriding --font-sans and friends with !important — would
 * have pinned the stacks and silently disabled those pickers.
 *
 * Faces: Inter and JetBrains Mono, SIL Open Font License 1.1 (inter-OFL.txt,
 * jbmono-OFL.txt next to this file).
 */

/* ---- UI sans: "Geist Variable" -------------------------------------- */

@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Geist Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./fonts/inter-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ---- Data grid: "Geist Variable Tabular" (font-feature-settings: tnum) - */

@font-face {
  font-family: "Geist Variable Tabular";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-feature-settings: "tnum";
  src: url("./fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Geist Variable Tabular";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-feature-settings: "tnum";
  src: url("./fonts/inter-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ---- SQL editor / monospace ------------------------------------------
 * DBX never bundles a mono face; it names system fonts and then the same CJK
 * fallbacks, so Cyrillic in the editor hit PingFang SC / Microsoft YaHei too.
 * JetBrains Mono is already one of the editor fonts DBX offers, and it has a
 * real Cyrillic cut. Declared under every mono family in the default stack so
 * the fallback lands the same way whichever of them the machine actually has.
 */

@font-face {
  font-family: "Fira Code";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("./fonts/jbmono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Fira Code";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("./fonts/jbmono-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("./fonts/jbmono-cyrillic.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-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("./fonts/jbmono-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Cascadia Code";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("./fonts/jbmono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Cascadia Code";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("./fonts/jbmono-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Cascadia Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("./fonts/jbmono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Cascadia Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url("./fonts/jbmono-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}