/* RJ Editions 1.2.2.3: reading type for the right-to-left editions (Arabic, Persian, Urdu). Loaded only on pages in
   those languages. Self-hosted, open-licence faces (SIL OFL 1.1, licences in fonts/), Arabic-script characters only
   (unicode-range): Latin words and digits keep the theme's own fonts.
   ar: Noto Naskh Arabic - a calm book Naskh, clear at phone sizes.
   fa: Vazirmatn - the standard modern Persian text face, light (21 KB) and very legible on screens.
   ur: Noto Nastaliq Urdu - the Nastaliq style Urdu readers expect for reading; it needs tall lines. */
@font-face { font-family: "RJ Naskh Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/noto-naskh-arabic-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "RJ Naskh Arabic"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/noto-naskh-arabic-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "RJ Vazirmatn"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/vazirmatn-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "RJ Vazirmatn"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/vazirmatn-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "RJ Nastaliq Urdu"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/noto-nastaliq-urdu-arabic-400-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "RJ Nastaliq Urdu"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/noto-nastaliq-urdu-arabic-700-normal.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

html:lang(ar) { --rj-rtl-face: "RJ Naskh Arabic"; --rj-rtl-lh: 1.95; --rj-rtl-hlh: 1.6; --rj-rtl-size: 1.08em; }
html:lang(fa) { --rj-rtl-face: "RJ Vazirmatn"; --rj-rtl-lh: 1.95; --rj-rtl-hlh: 1.6; --rj-rtl-size: 1.03em; }
html:lang(ur) { --rj-rtl-face: "RJ Nastaliq Urdu"; --rj-rtl-lh: 2.45; --rj-rtl-hlh: 2.1; --rj-rtl-size: 1.02em; }

/* The theme sets its families through --theme-font-family on body and on each heading; the Arabic-script face goes
   first, the theme's Latin faces stay behind it. */
html:lang(ar) body, html:lang(fa) body, html:lang(ur) body,
html:lang(ar) body :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote, figcaption, cite, td, th, caption, label, summary, input, textarea, select, button, .entry-title, .page-title, .ct-menu-link),
html:lang(fa) body :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote, figcaption, cite, td, th, caption, label, summary, input, textarea, select, button, .entry-title, .page-title, .ct-menu-link),
html:lang(ur) body :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, blockquote, figcaption, cite, td, th, caption, label, summary, input, textarea, select, button, .entry-title, .page-title, .ct-menu-link) {
	font-family: var(--rj-rtl-face), Commissioner, Arial, sans-serif;
	letter-spacing: 0;
}
/* Comfortable reading: a little larger and taller lines in the article text (the theme's .entry-content and the
   article layout's .rjcp-a; Nastaliq needs the tallest lines or its letters touch the line above). */
html:lang(ar) :is(.entry-content, .rjcp-a) :is(p, li, blockquote, td, th), html:lang(fa) :is(.entry-content, .rjcp-a) :is(p, li, blockquote, td, th), html:lang(ur) :is(.entry-content, .rjcp-a) :is(p, li, blockquote, td, th) {
	font-size: var(--rj-rtl-size);
	line-height: var(--rj-rtl-lh);
}
html:lang(ar) body :is(h1, h2, h3, h4, h5, h6, .entry-title, .rjcp-title, .rjcp-dek), html:lang(fa) body :is(h1, h2, h3, h4, h5, h6, .entry-title, .rjcp-title, .rjcp-dek), html:lang(ur) body :is(h1, h2, h3, h4, h5, h6, .entry-title, .rjcp-title, .rjcp-dek) {
	line-height: var(--rj-rtl-hlh);
	text-transform: none;
}
html:lang(ar) :is(.entry-content, .rjcp-a) figcaption, html:lang(fa) :is(.entry-content, .rjcp-a) figcaption, html:lang(ur) :is(.entry-content, .rjcp-a) figcaption { line-height: var(--rj-rtl-hlh); }
/* Arabic-script faces have no italic: a slanted copy reads badly, so text set in italics stays upright. */
html:lang(ar) body :is(em, i, cite, p, li, blockquote, figcaption), html:lang(fa) body :is(em, i, cite, p, li, blockquote, figcaption), html:lang(ur) body :is(em, i, cite, p, li, blockquote, figcaption) { font-style: normal; }
/* The article layout's English labels (dates, "17 min", "6 sections", "17 min left", card dates) keep their own word
   order on a right-to-left page; without this the numbers jump to the wrong end ("Nov 2026 18"). Their proper home is
   the layout plugin; kept here because it only matters on these pages. */
html[dir="rtl"] :is(.rjcp-a dd:not(.rjcp-body dd), [class*="rjcp-toc"] summary span, .rjcp-toc-head span, .rjcp-when, .rjcp-left-t) { unicode-bidi: isolate; direction: ltr; }
html[dir="rtl"] .rjcp-a dd:not(.rjcp-body dd) { text-align: right; }
