/* MoFA brand typography - afghanmissionbonn.de (package of 19 Nov 2026, cache key 20261119-typo)
   Dari / Pashto = Bahij Mitra (Regular 400, Bold 700). English / German = Helvetica Neue (Medium for weights 300-500, Bold for 600-900).
   ONE layer, loaded LAST on every public page. It changes the font FAMILY only (never size, weight, colour, text, link or layout) and wins over page CSS,
   inline <style> blocks, rich-text news / notice HTML and browser control defaults. Same-origin /assets/fonts/*.woff only: no external font request. */
@font-face{font-family:'MoFA Bahij Mitra';src:url('/assets/fonts/BahijMitra-Regular.woff') format('woff');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'MoFA Bahij Mitra';src:url('/assets/fonts/BahijMitra-Bold.woff') format('woff');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'MoFA Helvetica Neue';src:url('/assets/fonts/HelveticaNeue-Medium.woff') format('woff');font-weight:300 500;font-style:normal;font-display:swap}
@font-face{font-family:'MoFA Helvetica Neue';src:url('/assets/fonts/HelveticaNeue-Bold.woff') format('woff');font-weight:600 900;font-style:normal;font-display:swap}

/* the two stacks (same variable names the site already uses): each carries the other brand family next, so mixed Arabic-script / Latin text stays on brand.
   The 'Font Awesome 6' names sit behind the brand fonts only for icon glyphs of legacy sub-pages (a private-use code point exists in no other font, a letter never reaches them);
   where that icon font is not on the page the names are skipped. Tahoma, Arial and sans-serif are the last resort when a font file cannot be loaded. */
:root{--font-en:'MoFA Helvetica Neue','MoFA Bahij Mitra','Font Awesome 6 Free','Font Awesome 6 Brands',Tahoma,Arial,sans-serif!important;--font-fa:'MoFA Bahij Mitra','MoFA Helvetica Neue','Font Awesome 6 Free','Font Awesome 6 Brands',Tahoma,Arial,sans-serif!important}

/* the page language decides: LTR pages = Helvetica Neue stack, Dari / Pashto pages = Bahij Mitra stack */
html:root{font-family:var(--font-en)!important}
html:root[dir=rtl],html:root[lang|=fa],html:root[lang|=ps]{font-family:var(--font-fa)!important}

/* blanket: every element, pseudo-element, control and placeholder takes the family of its parent. The :not(#mofa-typography) lifts the specificity above any class / tag rule of a page;
   elements that are themselves an icon font (class fa, fas, far, fab, fal, fad, fa-*) keep their own family. */
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"]){font-family:inherit!important}
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"])::before{font-family:inherit!important}
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"])::after{font-family:inherit!important}
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"])::placeholder{font-family:inherit!important}
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"])::marker{font-family:inherit!important}
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"])::first-letter{font-family:inherit!important}
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"])::first-line{font-family:inherit!important}
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"])::file-selector-button{font-family:inherit!important}

/* an explicit Dari / Pashto island inside an LTR page (news and notice text, lang="fa|ps" widgets) uses the Bahij Mitra stack; its descendants inherit it */
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"])[dir=rtl]{font-family:var(--font-fa)!important}
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"]):lang(fa){font-family:var(--font-fa)!important}
:root :not(#mofa-typography):not(.fa):not(.fas):not(.far):not(.fab):not(.fal):not(.fad):not([class^="fa-"]):not([class*=" fa-"]):lang(ps){font-family:var(--font-fa)!important}
