/* YFI V53 - Accessible RTL typography, Persian and Arabic only.
   Estedad by Amin Abedi + Vazirmatn by Saber Rastikerdar, both SIL OFL 1.1.
   Actual WOFF2 font resources are served by Fontsource/jsDelivr CDN and
   optionally Google Fonts, not packaged in this ZIP. font-display:swap.
   ONLY used on html[lang="fa"] and html[lang="ar"] pages. */

/* Pinned immutable version from official Fontsource variable font CDN.
   Primary Arabic glyphs; optional Latin glyphs for names and digits.
   Do not activate any Persian-digit-forcing variant in Arabic. */
@font-face{
  font-family:'YFI Estedad';font-style:normal;font-weight:700;font-display:swap;
  src:url('https://cdn.jsdelivr.net/fontsource/fonts/estedad:vf@5.3.0/arabic-wght-normal.woff2') format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF;
}
@font-face{
  font-family:'YFI Estedad';font-style:normal;font-weight:700;font-display:swap;
  src:url('https://cdn.jsdelivr.net/fontsource/fonts/estedad:vf@5.3.0/latin-wght-normal.woff2') format('woff2');
  unicode-range:U+0000-024F,U+1E00-1EFF,U+2000-206F,U+20AC,U+2122;
}
@font-face{
  font-family:'YFI Vazirmatn';font-style:normal;font-weight:400 700;font-display:swap;
  src:url('https://cdn.jsdelivr.net/fontsource/fonts/vazirmatn:vf@5.3.0/arabic-wght-normal.woff2') format('woff2');
  unicode-range:U+0600-06FF,U+0750-077F,U+08A0-08FF,U+200C-200F,U+FB50-FDFF,U+FE70-FEFF;
}
@font-face{
  font-family:'YFI Vazirmatn';font-style:normal;font-weight:400 700;font-display:swap;
  src:url('https://cdn.jsdelivr.net/fontsource/fonts/vazirmatn:vf@5.3.0/latin-wght-normal.woff2') format('woff2');
  unicode-range:U+0000-024F,U+1E00-1EFF,U+2000-206F,U+20AC,U+2122;
}

:is(html[lang="fa"],html[lang="ar"]){
  direction:rtl;
  text-size-adjust:100%;
  -webkit-text-size-adjust:100%;
  font-kerning:normal;
}
:is(html[lang="fa"],html[lang="ar"]) body{
  font-family:'YFI Vazirmatn','Vazirmatn',Tahoma,sans-serif !important;
  font-size:18px;
  line-height:1.8;
  letter-spacing:normal !important;
  font-feature-settings:normal;
  font-variant-numeric:normal;
  overflow-wrap:break-word;
}
/* Existing components sometimes hard-code fonts: override those, not layouts. */
:is(html[lang="fa"],html[lang="ar"]) :is(p,li,blockquote,dd,dt,td,th,figcaption,small,span,strong,em,time,summary,legend,label,input,textarea,select,button,a){
  font-family:'YFI Vazirmatn','Vazirmatn',Tahoma,sans-serif !important;
  letter-spacing:normal !important;
  font-feature-settings:normal;
}
:is(html[lang="fa"],html[lang="ar"]) :is(h1,h2),
:is(html[lang="fa"],html[lang="ar"]) :is(.section-title,.section-heading h2,.ab-section-title,.partners h2,.yfi-v47-articles h2){
  font-family:'YFI Estedad','Estedad','YFI Vazirmatn',Tahoma,sans-serif !important;
  font-weight:700 !important;
  letter-spacing:normal !important;
  line-height:1.4 !important;
  word-break:normal !important;
  overflow-wrap:break-word !important;
  hyphens:none;
  text-transform:none;
}
:is(html[lang="fa"],html[lang="ar"]) :is(h3,h4,h5,h6,.section-subtitle,.ab-section h3,.i18n-programs h3){
  font-family:'YFI Vazirmatn','Vazirmatn',Tahoma,sans-serif !important;
  font-weight:700 !important;
  letter-spacing:normal !important;
  line-height:1.55 !important;
  overflow-wrap:break-word;
  word-break:normal;
}
/* Main texts and article paragraphs: consistently legible, without altering colors. */
:is(html[lang="fa"],html[lang="ar"]) :is(.prose,.prose p,.ab-prose,.ab-body p,.intro-copy p,.editorial-copy p,.para-copy p,.i18n-section p,.i18n-about p,.i18n-feature p,.i18n-global p,.lead){
  font-family:'YFI Vazirmatn','Vazirmatn',Tahoma,sans-serif !important;
  font-weight:400;
  font-size:clamp(17.5px,1.4vw,19px);
  line-height:1.85 !important;
  letter-spacing:normal !important;
  text-align:start;
  word-break:normal;
  overflow-wrap:break-word;
}
:is(html[lang="fa"],html[lang="ar"]) :is(nav,nav a,header a,footer a,button,input,select,textarea,label,.btn,.cta,.top nav a,.i18n-nav a,.ab-nav a,.i18n-menu-button,.yfi-v33-language summary,.v26-nav a){
  font-family:'YFI Vazirmatn','Vazirmatn',Tahoma,sans-serif !important;
  font-weight:500;
  letter-spacing:normal !important;
  text-transform:none;
}
:is(html[lang="fa"],html[lang="ar"]) :is(input,select,textarea){line-height:1.65; font-size:max(16px,1em);}
:is(html[lang="fa"],html[lang="ar"]) :is(a,button,input,select,textarea):focus-visible{outline-offset:3px;}
/* Respect actual language: don't convert or replace digit characters.
   Never force Farsi numeral features on Arabic; let the font shape text naturally. */
html[lang="ar"]{font-variant-numeric:normal;font-feature-settings:normal;}
html[lang="fa"]{font-variant-numeric:normal;font-feature-settings:normal;}
@media(max-width:680px){
  :is(html[lang="fa"],html[lang="ar"]) body{font-size:17.5px;line-height:1.83;}
  :is(html[lang="fa"],html[lang="ar"]) h1{font-size:clamp(32px,8.25vw,49px) !important;line-height:1.35 !important;}
  :is(html[lang="fa"],html[lang="ar"]) h2{font-size:clamp(24px,6.1vw,35px) !important;line-height:1.45 !important;}
  :is(html[lang="fa"],html[lang="ar"]) h3{font-size:clamp(19px,4.9vw,28px) !important;line-height:1.5 !important;}
  :is(html[lang="fa"],html[lang="ar"]) :is(.prose,.prose p,.ab-prose,.ab-body p,.intro-copy p,.editorial-copy p,.para-copy p,.i18n-section p,.i18n-about p,.i18n-feature p,.i18n-global p,.lead){font-size:17.5px;line-height:1.85 !important;}
  :is(html[lang="fa"],html[lang="ar"]) :is(nav a,.i18n-nav a,.ab-nav a,.v26-nav a,button,.btn){line-height:1.55;}
}
@media(prefers-reduced-motion:reduce){
  :is(html[lang="fa"],html[lang="ar"]) *{scroll-behavior:auto;}
}
