/* Generated copy of sites/shared/fonts.css — edit the source, then run scripts/sync_kit.js */
/* ==========================================================================
   The apps' own faces, served from our own origin
   --------------------------------------------------------------------------
   The Flutter app's default pairing ("KolSans") is declared in pubspec.yaml:
   Inter for Latin and Cyrillic, Assistant for Hebrew, Noto Sans Arabic for
   Arabic, Noto Sans SC for Simplified Chinese. The web now uses the same
   families, subset from the same .ttf files by build-fonts.py, so a page and
   the app never disagree about what our text looks like.

   Nothing here touches a third party. The sites used to pull six families from
   fonts.googleapis.com, which was a different typeface from the product and a
   request to Google on every page view; no property needs
   fonts.googleapis.com or fonts.gstatic.com in its CSP any more.

   Two weights only: 400 for text, 600 for headings. `unicode-range` means an
   English page downloads 63 KB of Latin and nothing else.

   Simplified Chinese has no web font on purpose: the source is 10.6 MB, and
   splitting CJK properly needs per-glyph slicing. zh falls back to the system
   faces named in --kol-font-sans, which every zh device already has.

   Regenerate:  python3 sites/shared/build-fonts.py
   ========================================================================== */

/* --- Inter: Latin -------------------------------------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400.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+2074, 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: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600.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+2074, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Inter: Latin Extended ---------------------------------------------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-ext-400.woff2") format("woff2");
  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";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-ext-600.woff2") format("woff2");
  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;
}

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

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

/* --- Assistant: Hebrew --------------------------------------------------- */
@font-face {
  font-family: "Assistant";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/assistant-hebrew-400.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
  font-family: "Assistant";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/assistant-hebrew-600.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

/* --- Noto Sans Arabic ---------------------------------------------------- */
@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/noto-sans-arabic-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/noto-sans-arabic-arabic-600.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF,
    U+FE70-FE74, U+FE76-FEFC;
}

/* ==========================================================================
   Per-script stacks. The document's own language picks the family; Latin words
   inside Hebrew or Arabic copy fall through to Inter, which is why the Hebrew
   and Arabic subsets carry no Latin of their own.
   ========================================================================== */
html:lang(he),
[lang="he"] {
  --kol-font-sans: "Assistant", "Inter", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Arial, sans-serif;
}

html:lang(ar),
[lang="ar"] {
  --kol-font-sans: "Noto Sans Arabic", "Inter", ui-sans-serif, system-ui,
    -apple-system, "Segoe UI", Arial, sans-serif;
}

html:lang(zh),
[lang="zh"] {
  --kol-font-sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
}

/* Hebrew and Arabic carry more ink per line than Latin at the same size. */
html:lang(he) body,
html:lang(ar) body {
  --kol-leading: 1.65;
  --kol-tracking-tight: 0;
}
