/* Arabic (right-to-left) mirrors of the study pages under /ar/, generated by site/build-pages.py.
   Loaded after app.css and pages.css; only the Arabic pages link it. /web/** is cached as immutable, so bump
   AR_CSS_V in build-pages.py whenever this file changes. Modelled on pages-ur.css, but Arabic is set in Naskh
   (Noto Naskh Arabic, loaded once the page is idle), never the Urdu Nastaliq font, and needs shorter lines. */

/* Latin letters and digits stay in Plus Jakarta Sans; Arabic letters fall through to Noto Naskh Arabic, or to the
   system Arabic font until it arrives */
html[lang="ar"] body { font-family: "Plus Jakarta Sans", "Noto Naskh Arabic", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif; line-height: 1.75; }
/* letter-spacing breaks the joins between Arabic letters, and Arabic has no case */
html[lang="ar"] body * { letter-spacing: 0 !important; text-transform: none !important; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.7; font-weight: 700; }
html[lang="ar"] .btn { line-height: 1.7; font-weight: 600; }
html[lang="ar"] .logo-text { line-height: 1.5; }
html[lang="ar"] .logo-text small { font-size: 11.5px; }
html[lang="ar"] .eyebrow { font-size: 13px; font-weight: 600; }
html[lang="ar"] .page-hero h1 { font-size: 30px; line-height: 1.7; }
html[lang="ar"] .page-hero .lede { font-size: 17px; line-height: 1.8; }
html[lang="ar"] .qa h3 { font-size: 17px; line-height: 1.75; }
html[lang="ar"] .qa .qn { margin-right: 0; margin-left: 6px; }
html[lang="ar"] .chip { line-height: 1.7; }
html[lang="ar"] .sign h3 { line-height: 1.7; }
html[lang="ar"] .fine, html[lang="ar"] .crumbs { line-height: 1.8; }

/* lists: the generic rules use padding-left */
html[lang="ar"] .toc ol, html[lang="ar"] .qa .opts { padding-left: 0; padding-right: 24px; }
/* the entries already carry their number (1.1, 1.2 ...); a list number in front reads as "1.1.1" right to left */
html[lang="ar"] .toc ol { list-style: none; padding-right: 0; }
html[lang="ar"] .prose ul, html[lang="ar"] .prose ol { padding-left: 0; padding-right: 24px; }
/* options are lettered أ، ب، ج، د as in Arabic multiple-choice papers */
@counter-style ar-options { system: fixed; symbols: "أ" "ب" "ج" "د" "ه" "و"; prefix: "("; suffix: ") "; }
html[lang="ar"] .qa .opts { list-style: ar-options; padding-right: 36px; }
html[lang="ar"] .qa details p b { margin-left: 4px; }

/* English pieces inside an Arabic page: a fallback question card */
html[lang="ar"] [lang="en"] { font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; line-height: 1.55; }
html[lang="ar"] [dir="ltr"].qa .opts { padding-right: 0; padding-left: 24px; list-style: upper-alpha; }
html[lang="ar"] [dir="ltr"].qa .qn { margin-left: 0; margin-right: 4px; }

@media (max-width: 860px) {
  html[dir="rtl"] .top-actions { margin-left: 0; margin-right: auto; }
}
@media (max-width: 600px) {
  html[lang="ar"] .page-hero h1 { font-size: 24px; }
  html[lang="ar"] .lang-switch { font-size: 13px !important; }
}
