/* PSFM bilingual typography contract: loaded after legacy theme styles. */
:root {
    --psfm-font-latin: "Inter", Arial, sans-serif;
    --psfm-font-arabic: "Noto Sans Arabic", Tahoma, Arial, sans-serif;
    --psfm-body-size: 16px;
    --psfm-body-line-height: 1.75;
}

html body,
html body button,
html body input,
html body select,
html body textarea {
    font-family: var(--psfm-font-latin) !important;
}

html[lang^="ar"] body,
html[dir="rtl"] body,
html[lang^="ar"] body button,
html[lang^="ar"] body input,
html[lang^="ar"] body select,
html[lang^="ar"] body textarea,
html[dir="rtl"] body button,
html[dir="rtl"] body input,
html[dir="rtl"] body select,
html[dir="rtl"] body textarea {
    font-family: var(--psfm-font-arabic) !important;
}

html body main {
    font-size: var(--psfm-body-size);
    line-height: var(--psfm-body-line-height);
}

html body :where(h1, h2, h3, h4, h5, h6, .site-title, .hero-main-title) {
    font-family: var(--psfm-font-latin) !important;
    font-style: normal;
    text-wrap: balance;
}

html[lang^="ar"] body :where(h1, h2, h3, h4, h5, h6, .site-title, .hero-main-title),
html[dir="rtl"] body :where(h1, h2, h3, h4, h5, h6, .site-title, .hero-main-title) {
    font-family: var(--psfm-font-arabic) !important;
}

html body h1 {
    font-size: clamp(2rem, 3.3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
}

html body h2 {
    font-size: clamp(1.625rem, 2.7vw, 2.1875rem);
    font-weight: 750;
    line-height: 1.22;
}

html body h3 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.3;
}

html[lang^="ar"] body :where(h1, h2, h3),
html[dir="rtl"] body :where(h1, h2, h3) {
    line-height: 1.45;
    letter-spacing: 0;
}

@media (max-width: 575.98px) {
    :root {
        --psfm-body-size: 15px;
        --psfm-body-line-height: 1.7;
    }
}
