/* Arabic (RTL) pages only: loaded after the page stylesheets in /ar/.
   Layout mirroring is done by the stylesheets in /assets/css-rtl/ (generated with rtlcss from /assets/css/). */
html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea {
  font-family: 'IBM Plex Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
}
/* Headings and components that use Sora / Inter directly */
html[lang="ar"] body *:not(code):not(pre):not(kbd):not(samp):not(svg):not(svg *) {
  font-family: 'IBM Plex Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif !important;
  letter-spacing: 0 !important; /* letter-spacing breaks Arabic letter joining */
}
html[lang="ar"] body { line-height: 1.75; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 { line-height: 1.45; }
/* Keep code, commands, paths, URLs and version strings left-to-right */
html[lang="ar"] code, html[lang="ar"] pre, html[lang="ar"] kbd, html[lang="ar"] samp {
  direction: ltr; unicode-bidi: isolate;
}
html[lang="ar"] pre { text-align: left; }
html[lang="ar"] input[type="email"], html[lang="ar"] input[type="url"], html[lang="ar"] input[type="tel"] { direction: ltr; text-align: right; }
/* Hero 3D carousel: positioned by JS assuming left:50% — keep it LTR */
html[dir="rtl"] .carousel-3d { direction: ltr; }
html[dir="rtl"] .carousel-slide { left: 50%; right: auto; }
html[dir="rtl"] .carousel-nav.prev { left: -6px; right: auto; }
html[dir="rtl"] .carousel-nav.next { right: -6px; left: auto; }
/* Direction-dependent glyphs/icons */
html[dir="rtl"] svg:has(> path[d="m12 5 7 7-7 7"]) { transform: scaleX(-1); }
html[dir="rtl"] .col-archive a::before { content: "‹"; }
/* Blog series label ("Part N") */
html[lang="ar"] .col-body ol.col-series-list li::before { content: "الجزء " counter(series); }
html[dir="rtl"] svg:has(> path[d="m12 19-7-7 7-7"]) { transform: scaleX(-1); }
/* Version badges such as "v1.0.0+" */
html[dir="rtl"] .manual-section-version { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] .pricing-amount { direction: ltr; }
