/* ============================================================
   Vazirmatn — the typeface for the Persian/Arabic/Urdu variants.

   Bundled locally on purpose. The app used to pull Vazir from jsDelivr, which
   is unreliable behind Iran's filtering: when the CDN fails the page renders in
   Tahoma, Persian digits included, and looks nothing like the product. A file
   we ship can't be blocked.

   One variable file covers weights 100–900, so headings at 600/700/800 get real
   weights instead of the browser's synthetic bold — which smears Persian joins.
   Vazirmatn carries Persian (۰-۹) and Arabic-Indic (٠-٩) digits as well as Latin,
   so numerals stay in the same typeface as the text around them.

   Vazirmatn v33.003 by Saber Rastikerdar, SIL Open Font License 1.1 (see
   fonts/OFL.txt). Only the @font-face lives here so print and sign-in pages,
   which do not load rtl.css, can pick up the face with one <link>.

   Cairo (below) is the face for the Arabic UI specifically — it is what Arabic
   readers see most on the web, so the product reads as native to them rather
   than Persian-flavoured. Two subsets of the variable font (Arabic + Latin,
   200–1000); Vazirmatn stays first for Farsi and Urdu. Cairo Project Authors,
   SIL OFL 1.1 (fonts/OFL.txt).
   ============================================================ */

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/explore/assets/4e3fa217d38fdafc1fea4414.woff2") format("woff2");
}

@font-face {
    font-family: "Cairo";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("/explore/assets/f8c2790bba35c6ff34816a2b.woff2") format("woff2");
    unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
    font-family: "Cairo";
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url("/explore/assets/ff64b48b1b800fb2ced52df3.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
}

/* ------------------------------------------------------------
   Persian digits inside form fields (Farsi only).

   fa-digits.js makes every digit a person READS Persian, but it must leave a field's value
   alone: the server, the page scripts that add up a form and <input type="number"> itself all
   need ASCII (a number input refuses ۱۲). So under Farsi the fields swap the glyphs instead of
   the characters — DD Fa Digits is Vazirmatn's ۰-۹ drawn at the code points 0-9 (and DD Fa
   Number adds ٫ at the full stop, for number fields). What is typed, stored, copied and posted
   stays 0-9; what the farmer sees, typing or reading a pre-filled value, is ۰-۹.

   DD Fa Digits: generated from Vazirmatn-Variable.woff2 (SIL OFL 1.1, fonts/OFL.txt) with
   fontTools — only the eleven glyphs, renamed as the licence asks of a modified version.

   Fields left alone, as the page text leaves them alone: passwords (also while the eye shows one
   as text — data-pwd-toggle-wired), e-mail addresses, URLs, login names, one-time codes (typed off
   an authenticator that shows 0-9), secrets and tokens, device ids (data-dd-latin on the field)
   and anything inside data-no-fa-digits.
   ------------------------------------------------------------ */
@font-face {
    font-family: "DD Fa Digits";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/explore/assets/fda21d1e4374808100b730e0.woff2") format("woff2");
    unicode-range: U+0030-0039;
}

@font-face {
    font-family: "DD Fa Number";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/explore/assets/fda21d1e4374808100b730e0.woff2") format("woff2");
    unicode-range: U+002E, U+0030-0039;
}

html[lang="fa"] :is(input, textarea, select):not(
        [type="password"], [data-pwd-toggle-wired], [autocomplete="current-password"], [autocomplete="new-password"],
        [type="email"], [inputmode="email"], [autocomplete="email"], [name="email"], [name$="Email"],
        [autocomplete="username"], [name="username"], [name$="Username"],
        [autocomplete="one-time-code"], [type="url"], [name*="secret" i], [name*="token" i],
        [data-dd-latin], [data-no-fa-digits], [data-no-fa-digits] *) {
    font-family: "DD Fa Digits", var(--font-rtl, "Vazirmatn"), "Vazirmatn", "Tahoma", system-ui, sans-serif;
}

html[lang="fa"] :is(input[type="number"], input[inputmode="decimal"]):not([data-no-fa-digits], [data-no-fa-digits] *) {
    font-family: "DD Fa Number", var(--font-rtl, "Vazirmatn"), "Vazirmatn", "Tahoma", system-ui, sans-serif;
}
