/* ZAMTEK — Arabic RTL layer. Loaded only on /ar/ pages (html[dir=rtl]).
   Barlow Condensed / IBM Plex Sans have no Arabic; swap the font tokens to
   Cairo + IBM Plex Sans Arabic. --mono stays LTR for data readouts. */
:root[dir="rtl"], html[dir="rtl"], [dir="rtl"]{
  --disp:'Cairo','IBM Plex Sans Arabic',sans-serif;
  --body:'IBM Plex Sans Arabic',system-ui,sans-serif;
}
html[dir="rtl"] body{font-family:var(--body);text-align:right}
html[dir="rtl"] h1,html[dir="rtl"] h2,html[dir="rtl"] h3,
html[dir="rtl"] h4,html[dir="rtl"] h5,html[dir="rtl"] h6{
  font-family:var(--disp);letter-spacing:0}

/* keep engineering data / codes / telemetry left-to-right inside RTL text */
html[dir="rtl"] code,html[dir="rtl"] kbd,html[dir="rtl"] samp,
html[dir="rtl"] pre,html[dir="rtl"] time,
html[dir="rtl"] [class*="mono"],html[dir="rtl"] .live,
html[dir="rtl"] .tag,html[dir="rtl"] .k,html[dir="rtl"] .cap{
  direction:ltr;unicode-bidi:isolate}

/* lists + bullets on the correct side */
html[dir="rtl"] ul,html[dir="rtl"] ol{padding-right:1.1em;padding-left:0}

/* the sticky nav: mirror the logo/links row */
html[dir="rtl"] .nav-links{margin-right:6px;margin-left:0}
html[dir="rtl"] .nav-cta{margin-right:auto;margin-left:0}
html[dir="rtl"] .mnav{margin-right:auto;margin-left:0}
html[dir="rtl"] .mnav .mm{right:auto;left:0}

/* Arabic reads slightly larger x-height; nudge body up for legibility */
html[dir="rtl"] p,html[dir="rtl"] li{line-height:1.75}

/* CRITICAL RTL FIX: the skip-link hides via left:-9999px, which under RTL
   creates a huge leftward overflow that shifts the viewport onto empty space
   and blanks the page. Hide it off the TOP instead (never shifts horizontally),
   and reveal it on the right (RTL start) on focus. */
html[dir="rtl"] .skip{left:auto;right:12px;top:-9999px}
html[dir="rtl"] .skip:focus{left:auto;right:12px;top:12px}
/* belt-and-braces: clip any residual horizontal overflow from mirrored insets */
html[dir="rtl"] body{overflow-x:hidden}
/* bullet markers sit on the right in RTL lists */
html[dir="rtl"] .pane li,html[dir="rtl"] .bundle li{padding-right:18px;padding-left:0}
html[dir="rtl"] .pane li::before,html[dir="rtl"] .bundle li::before{left:auto;right:0}
