/* Shared Persian typography. The bundled, unmodified font uses SIL OFL 1.1;
   see ../fonts/vazirmatn/OFL.txt. Arabic-only selection preserves Latin faces. */
@font-face {
  font-family: 'Sephorizon Vazirmatn';
  src: url("../fonts/vazirmatn/variable.f6d31671339d.woff2") format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200D, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  --font-persian: 'Sephorizon Vazirmatn', Tahoma, 'Noto Sans Arabic', 'Noto Naskh Arabic', Arial, sans-serif;
}

/* Explicit Persian content can also appear inside an English/German page. */
[lang|='fa'] {
  --sans: var(--font-persian);
  --serif: var(--font-persian);
}
[lang|='fa']:not(:where(pre, code, kbd, samp)),
html:lang(fa) body {
  font-family: var(--font-persian);
  line-height: 1.75;
  letter-spacing: normal;
}
[lang|='fa']:is(h1, h2, h3, h4, h5, h6),
[lang|='fa'] :is(h1, h2, h3, h4, h5, h6):lang(fa) {
  font-family: var(--font-persian);
  line-height: 1.55;
}

/* These components choose their own Latin typefaces instead of inheriting. */
[lang|='fa'] :is(.photo-intro-mark, .photo-detail-caption-title,
    .photo-hero h1 em, .photo-collection h2 em, .photo-empty-copy h3 em,
    .photo-footer-statement em, .news-article-body, .news-field-body textarea,
    .news-preview-copy .prose, .privacy-controls, .privacy-choice,
    .privacy-choice h2, .privacy-choice p, .privacy-actions button):lang(fa),
.assistant-chat[data-language='fa'] {
  font-family: var(--font-persian);
}

/* Tracking separates joined Persian letters. Keep code and the Latin mark. */
[lang|='fa'] :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, a, label, summary,
    button, select, textarea, small, span, strong, em, blockquote, figcaption,
    th, td):lang(fa):not(:where(.brand-wordmark, .brand-wordmark *,
    pre, pre *, code, code *, kbd, kbd *, samp, samp *)) {
  letter-spacing: normal;
}
