/*
  سلسول — brand faces, served from our own origin.

  Self-hosted on purpose, not fetched from Google Fonts:
  - The PWA has to render correctly offline and on the flaky mobile networks a gathering
    actually sits on. A blocked font CDN must not turn the board into fallback glyphs.
  - Requests to fonts.gstatic.com leak player IPs to a third party on every session.
  - The shared-screen view and the room code are the two things people squint at from
    across a room; a fallback face changes their metrics.

  unicode-range splits Arabic from Latin, so a screen with no Latin on it never downloads
  the Latin file. Arabic is listed first because it is the primary script here.

  Both faces are SIL Open Font License 1.1 — see OFL.txt. The OFL requires the licence to
  travel with the fonts, which is why it sits in this folder rather than being assumed.
*/

/* ---------- Marhey — display. Variable file, one per subset, covers 300–700. ---------- */
@font-face {
  font-family: "Marhey";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/Marhey-variable-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF,
    U+102E0-102FB, U+10E60-10E7E, U+1EC71-1ECB4, U+1ED01-1ED3D, U+1EE00-1EEBB;
}

@font-face {
  font-family: "Marhey";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/Marhey-variable-latin.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;
}

/* ---------- IBM Plex Sans Arabic — UI and body. Static instances per weight. ---------- */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexSansArabic-400-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF,
    U+102E0-102FB, U+10E60-10E7E, U+1EC71-1ECB4, U+1ED01-1ED3D, U+1EE00-1EEBB;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/IBMPlexSansArabic-400-latin.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: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/IBMPlexSansArabic-500-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF,
    U+102E0-102FB, U+10E60-10E7E, U+1EC71-1ECB4, U+1ED01-1ED3D, U+1EE00-1EEBB;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/IBMPlexSansArabic-500-latin.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: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/IBMPlexSansArabic-600-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF,
    U+102E0-102FB, U+10E60-10E7E, U+1EC71-1ECB4, U+1ED01-1ED3D, U+1EE00-1EEBB;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/IBMPlexSansArabic-600-latin.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: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/IBMPlexSansArabic-700-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
    U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFF,
    U+102E0-102FB, U+10E60-10E7E, U+1EC71-1ECB4, U+1ED01-1ED3D, U+1EE00-1EEBB;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/IBMPlexSansArabic-700-latin.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;
}

/* ---------- KFGQPC HAFS — the Qur'an, and only the Qur'an. ----------

   Scripture is set in the mushaf face and everything else is not; which line is which is
   `segmentPrompt` in @salsool/core, shared with the wall, the phone and the workbench so the
   four of them cannot disagree. See #82.

   **No `unicode-range` here, deliberately.** Plex is split by range because a screen with no
   Latin on it should not fetch the Latin file. This face is applied to whole segments by class,
   never reached by fallback, so a range would only add a way to get it wrong — and this face has
   no Latin to fall back *from*: 608 codepoints, no a-z, none of . , : ; ! ? - /.

   **Never subset it.** Splitting by range across files is fine; `pyftsubset` over this one is
   Modification and outside KFGQPC's grant. It is the obvious optimisation for 87 KB, so it is
   said here as well as in KFGQPC-EULA.txt, which ships beside the font because the licence
   requires the licence to travel with it. */
@font-face {
  font-family: "KFGQPC HAFS";
  font-style: normal;
  font-weight: 400;
  /* `block`, not `swap`: an ayah flashing in Plex and reflowing into the mushaf face is worse
     than a beat of nothing, and it would land on the wall where a room is looking. */
  font-display: block;
  src: url("/fonts/UthmanicHafs1Ver18.woff2") format("woff2");
}
