/* ══════════════════════════════════════════════════════════════════════
   ZYRN — THE ARABIC SITE   (loaded on /ar/ pages only, after every other
   sheet)

   The pages run dir="rtl", so flow, flex rows, grids and text alignment
   mirror on their own. This sheet carries what does not:

   1. TYPE. Arabic falls through Space Grotesk and Plex Mono (neither has
      it) to IBM Plex Sans Arabic, declared in lang.css as 'ZY Arabic' —
      and, inside mono metadata, as 'ZY Arabic Meta', the same face 28%
      larger, because a joined script at an 11px Latin size is unreadable.
      Latin letters and every digit keep the site's own two faces.
   2. SPACING. Tracking pulls joined letters apart, so it is zero on any
      element that can hold Arabic. The mark keeps its 0.06em: the shear
      is a drawing, not a word.
   3. LEADING. Arabic carries ascenders, dots and descenders a Latin
      display line-height of ~1.0 clips. Headings open up.
   4. THINGS THAT ARE PICTURES, NOT TEXT: instruments, diagrams, the
      wordmark, the switch, the coordinates — laid out left-to-right as
      drawn, with only their words set right-to-left inside them.
   5. ARROWS that mean "forward" point the other way.
   ══════════════════════════════════════════════════════════════════════ */

html[dir="rtl"]{
  --font-sans:'Space Grotesk','ZY Arabic',system-ui,sans-serif;
  --font-mono:'IBM Plex Mono','ZY Arabic Meta',ui-monospace,monospace;
}
html[dir="rtl"] body{font-family:var(--font-sans)}

/* 2. no tracking anywhere Arabic can land — except the mark */
html[dir="rtl"] body :not(.shear):not(.shear *):not(.lang):not(.lang *){letter-spacing:0 !important}
html[dir="rtl"] .mono,html[dir="rtl"] [class*="__h"]{text-transform:none}

/* 3. leading */
html[dir="rtl"] h1,html[dir="rtl"] h2,html[dir="rtl"] h3{line-height:1.32}
html[dir="rtl"] p,html[dir="rtl"] li{line-height:1.85}

/* 4. pictures stay as drawn */
html[dir="rtl"] .shear,html[dir="rtl"] .glitch,html[dir="rtl"] .lang,
html[dir="rtl"] .nav__coords,html[dir="rtl"] .cmdkbtn,html[dir="rtl"] kbd,html[dir="rtl"] code{direction:ltr;unicode-bidi:isolate}
html[dir="rtl"] .nav__sup{margin-left:0;margin-right:3px}

/* 5. arrows that point forward */
html[dir="rtl"] .arr,html[dir="rtl"] .btn svg:not(.no-flip),html[dir="rtl"] [data-arrow]{transform:scaleX(-1)}

/* 6. the phone bar. «احجز مقعدك» sets 12px wider than "Request access", and the bar's
   1fr / auto / 1fr grid gives both outer columns the width of the wider one — so 12px
   on the left became 86px of overflow, and in a right-to-left document overflow opens
   to the LEFT and drags the whole page sideways. Tighter on phones; on the narrowest,
   the button says only «احجز». */
@media (max-width:899px){
  html[dir="rtl"] .nav__end{gap:8px}
  html[dir="rtl"] .nav__end .btn{padding:9px 10px}
}
@media (max-width:420px){
  html[dir="rtl"] .nav__end .btn{font-size:0;padding:9px 12px}
  html[dir="rtl"] .nav__end .btn::after{content:'احجز';font-size:12px}
}
/* belt and braces: nothing may widen the page sideways */
html[dir="rtl"],html[dir="rtl"] body{overflow-x:clip}

/* 7. instruments whose geometry is drawn by script in left-to-right coordinates:
   the river's lanes run from their labels on the left; the handover's quarters run
   Q1 → Q8 under ribbons drawn left to right; the bay's pips step in the order the
   slabs stand. Mirroring only their HTML would set the labels against the drawing.
   They stay as drawn; each line of Arabic inside them still reads right to left. */
html[dir="rtl"] :is(.river,.hand,.bay__hud){direction:ltr}
html[dir="rtl"] :is(.river,.hand,.bay__hud) :is(span,b,i,em,p,small){unicode-bidi:plaintext}
