/* Right-to-left editions (Arabic, Urdu, Persian). Loaded only on those pages, after site.css.
   The fonts are subset to the Arabic-script blocks (unicode-range tells the browser so), and Latin text,
   card names and digits fall back to the site's own Public Sans. */
@font-face {
  font-family: NcfArabic;
  src: url("/assets/rtl-fonts/noto-sans-arabic.v2.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+25CC, U+FB50-FDFF, U+FE70-FEFF;
}
@font-face {
  font-family: NcfUrdu;
  src: url("/assets/rtl-fonts/noto-nastaliq-urdu.v2.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+200C-200F, U+25CC, U+FB50-FDFF, U+FE70-FEFF;
}
html[dir="rtl"] { --rtl-font: "NcfArabic", "Public Sans", system-ui, sans-serif; }
html[lang="ur"] { --rtl-font: "NcfUrdu", "Public Sans", system-ui, sans-serif; }
html[dir="rtl"] body { font-family: var(--rtl-font); line-height: 1.7; }
html[lang="ur"] body { line-height: 2; }

/* Every element, including buttons, form fields and bold text that site.css sets in Bricolage Grotesque,
   uses the Arabic-script font. The logo and the card pictures keep their own lettering. */
html[dir="rtl"] body *:not(.logo, .logo *, .art, .art *, svg, svg *) {
  font-family: var(--rtl-font);
  /* Letter spacing breaks the joined letters of Arabic script. */
  letter-spacing: normal !important;
}
/* Arabic script has no italics; a slanted copy of the letters is hard to read. */
html[dir="rtl"] :is(i, em, cite) { font-style: normal; }
html[dir="rtl"] :is(h1, h2, h3, .post h1, .post h2, .home-intro h1) { line-height: 1.55; }
html[lang="ur"] :is(h1, h2, h3, .post h1, .post h2, .home-intro h1) { line-height: 1.9; }
html[dir="rtl"] :is(input[type="number"], input[type="date"], input[type="email"], .art, .col-map svg, .qr) {
  direction: ltr;
  unicode-bidi: isolate;
}
html[dir="rtl"] :is(.home-link, .home-guides, .hguides) span[aria-hidden="true"],
html[dir="rtl"] :is(.ckarr, .prev, .next) {
  display: inline-block;
  transform: scaleX(-1);
}
html[dir="rtl"] .home-fan .art:nth-child(1) { transform: rotate(6deg); }
html[dir="rtl"] .home-fan .art:nth-child(2) { transform: rotate(2deg); }
html[dir="rtl"] .home-fan .art:nth-child(3) { transform: rotate(-4deg); }
html[dir="rtl"] .chk.nx { box-shadow: inset -4px 0 0 var(--gold); }
