/* Arabic pages (/ar): right-to-left layout and an Arabic-friendly font stack. Loaded only on pages rendered with <html lang="ar" dir="rtl">.
   Most layout already uses flex/grid, which mirrors automatically with dir="rtl"; the rules below fix what does not. */
html[dir="rtl"] {
  --font-sans: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Naskh Arabic", "Geeza Pro", "Arial", system-ui, sans-serif;
}
html[dir="rtl"] body { font-family: var(--font-sans); letter-spacing: 0; }
html[dir="rtl"] :is(h1, h2, h3, h4, .hero-title, .workspace-tool-title) { letter-spacing: 0; line-height: 1.35; }
/* Arabic letters are joined; uppercase and wide letter spacing break them. */
html[dir="rtl"] :is(.eyebrow, .section-kicker, .badge, .chip, .pill, .tag, label, button, .btn) { letter-spacing: 0; text-transform: none; }
/* Numbers, sizes, file names, code and formats read left to right inside Arabic text. */
html[dir="rtl"] :is(code, pre, kbd, samp, .file-name, .queue-file-name, .file-size, .mono, input[type="number"], input[type="url"], input[type="email"]) { direction: ltr; unicode-bidi: isolate; }
html[dir="rtl"] input[type="number"] { text-align: right; }
/* Icons that point the way (arrows, chevrons, "next", "back") face the reading direction. */
html[dir="rtl"] :is(.icon-arrow, .arrow-icon, .chevron, .back-icon, .next-icon, [data-icon="arrow-right"], [data-icon="arrow-left"], [data-icon="chevron-right"], [data-icon="chevron-left"]) { transform: scaleX(-1); }
html[dir="rtl"] .tool-seo :is(ol, ul) { padding-inline-start: 1.25rem; padding-inline-end: 0; }
html[dir="rtl"] .tool-crumbs ol li + li::before { content: "‹"; }
