/* Arabic page (/ar/) only: Arabic font and right-to-left layout.
   The page itself is generated from the English one at build time (scripts/i18n.mjs).
   live-styles.css stays the source of the design; these rules only mirror its few
   left/right-specific utilities and adapt type for Arabic script. */

/* IBM Plex Sans Arabic (SIL Open Font License, see fonts/IBM-Plex-Sans-Arabic-OFL.txt),
   subset to Arabic characters. Latin text on the page keeps using DM Sans. */
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap; src: url("./fonts/ibm-plex-sans-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap; src: url("./fonts/ibm-plex-sans-arabic-500.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap; src: url("./fonts/ibm-plex-sans-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF; }

html[lang="ar"] { --font-sans: "DM Sans", "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, sans-serif; }
html[lang="ar"] :is(input, select, textarea, button) { font-family: inherit; }

/* Arabic letters join: tracking breaks them, so letter-spacing is removed everywhere. */
html[lang="ar"] body * { letter-spacing: normal !important; }

/* Arabic script needs more room between lines than the Latin headings were set with. */
html[lang="ar"] :is(h1, h2, h3) { line-height: 1.35 !important; }

/* The tiny uppercase Latin labels (9-11px with wide tracking) are too small for Arabic. */
html[lang="ar"] .text-\[9px\] { font-size: 12px; }
html[lang="ar"] .text-\[10px\] { font-size: 12px; }
html[lang="ar"] .text-\[11px\] { font-size: 13px; }

/* Mirror the left/right-specific utilities used in the page. */
[dir="rtl"] .ml-auto { margin-left: 0; margin-right: auto; }
[dir="rtl"] .ml-1 { margin-left: 0; margin-right: .25rem; }
[dir="rtl"] .ml-1\.5 { margin-left: 0; margin-right: .375rem; }
[dir="rtl"] .left-5 { left: auto; right: 1.25rem; }
[dir="rtl"] .right-\[-30px\] { right: auto; left: -30px; transform: scaleX(-1); }
[dir="rtl"] .after\:left-0::after { left: auto; right: 0; }
[dir="rtl"] .after\:origin-left::after { transform-origin: right; }
@media (min-width: 768px) {
  [dir="rtl"] .md\:ml-\[168px\] { margin-left: 0; margin-right: 168px; }
  [dir="rtl"] .md\:pr-7 { padding-right: 0; padding-left: 1.75rem; }
  [dir="rtl"] .md\:border-r { border-right-width: 0; border-left-width: 1px; }
}
[dir="rtl"] .skip-link { left: auto; right: 24px; }
[dir="rtl"] .pact-label > span { margin-left: 0; margin-right: 2px; }
[dir="rtl"] .text-link:hover > span { transform: translate(-2px, -2px); }

/* Diagonal "go" arrows point the other way in right-to-left text (marked data-flip at build).
   The focus disclosures turn the mirrored arrow the other way when opened. */
[dir="rtl"] svg[data-flip] { transform: scaleX(-1); }
[dir="rtl"] .group[open] .group-open\:rotate-90 { --tw-rotate: -90deg; }

/* Email addresses are written left to right, aligned with the rest of the form. */
[dir="rtl"] input[type="email"] { text-align: right; }
