/* Self-hosted, upright variable fonts. See docs/FONT-LICENSES.md. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans Arabic";
  src: url("../fonts/NotoSansArabicVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --font-en: "Inter", "Noto Sans Arabic", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-ar: "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  font-family: var(--font-en);
  font-synthesis: none;
}

body, input, button, select, textarea {
  font-family: var(--font-en);
}

/* Preserve joined letters and vowel marks; Arabic is always upright. */
[lang|="ar"], .arabic, .arabic-text, .ar {
  font-family: var(--font-ar) !important;
  font-style: normal !important;
  font-synthesis: none;
  font-kerning: normal;
  letter-spacing: 0 !important;
  line-height: 1.8;
  text-transform: none;
  unicode-bidi: isolate;
}

[lang|="ar"]:not([dir="ltr"]) { direction: rtl; }

/* Mixed content retains the correct font when English is marked explicitly. */
[lang|="ar"] [lang|="en"] { font-family: var(--font-en) !important; direction: ltr; }
