/* ============================================================ THE ARABIC PAGE (2026-11-27) · ar.html
   Loaded after site.css, on ar.html only. Two jobs, nothing else:
   1 · the Arabic face. 29LT Kaff, the face of the Arabic stretch, in its two weights (Light 300, Medium 500),
       cut to Arabic and its punctuation (fonts/kaff-*-arabic.woff2, from _reference/cosmos/fonts/; the faces are
       declared in site.css, because the English page's «عربي» link is set in Kaff too). Kaff comes
       first in every stack and Jost second: an Arabic letter takes Kaff, a Latin letter or a digit takes Jost,
       so "hello@reglet.studio" and "01 / 07" are the English page's own. Kaff's Arabic body is as tall as Jost's
       x-height (measured: ه 538, Jost x 460, alef 725 = Jost's cap 700), so nothing is scaled.
       Arabic is cursive: tracking breaks the joins, so every letter-spacing is 0. It has no case, so lowercase
       is a no-op. Its marks stack above and below, so every display leading opens (.9 → 1.15 and up) and the
       character roll's clip box is 1.35em tall, not 1em (Kaff's tallest mark sits .9em above the baseline, its
       deepest tail .44em below).
   2 · the mirror. dir="rtl" flips every grid and flex row by itself. What is left is the page's physical
       lefts and rights, each turned here. Things that are not reading order stay as they are: the mark, the
       hard ink shadows (the light is still high on the left), the arrows poster, the media controls.     */

/* ---------------------------------------------------------------- the face */
html[dir=rtl] body{font-family:Kaff,Jost,ui-sans-serif,system-ui,sans-serif;font-synthesis:none;line-height:1.75}
html[dir=rtl] *{letter-spacing:0 !important}
html[dir=rtl] [lang=en]{font-family:Jost,ui-sans-serif,system-ui,sans-serif}
html[dir=rtl] .stamp{font-family:Kaff,Jost,ui-sans-serif,system-ui,sans-serif;font-weight:500}

/* display leading: Arabic needs room for its marks and its descenders */
html[dir=rtl] .display{line-height:1.12}
/* a chapter head is one line: it keeps the English box (.9), so the counter, the tabs and the cards sit where they
   do in English; its marks and tails hang past the box as Latin descenders do */
html[dir=rtl] .sh .display{line-height:.9;margin-left:0;margin-right:0;
  position:relative;top:.12em}   /* measured: in a .9 line Jost's baseline sits .79em down, Kaff's .67em: lowered onto Jost's */
html[dir=rtl] .tier h3{line-height:1.12}
html[dir=rtl] .tier h3 .or{line-height:1.3}
html[dir=rtl] .label{font-size:14px;line-height:17px;text-transform:none}
html[dir=rtl] .navlink{font-weight:500;font-size:15px}
html[dir=rtl] .navlink[lang=en]{font-weight:600;font-size:15px}
html[dir=rtl] .btn{font-size:15px;padding:19px 34px}   /* 59px tall, as the English button */

/* the character roll, a word at a time (js/site.js). Arabic is joined, so a letter in its own box would
   break the word apart: each word is one box, and the box is tall enough for the marks. */
html[dir=rtl] .roll{line-height:1.35}
html[dir=rtl] .roll i{height:1.35em;line-height:1.35}
html[dir=rtl] .roll i span b{height:1.35em;line-height:1.35}
html[dir=rtl] .btn:hover .roll i span,html[dir=rtl] .btn:focus-visible .roll i span,
html[dir=rtl] a:hover .roll i span,html[dir=rtl] a:focus-visible .roll i span,
html[dir=rtl] button.navlink:hover .roll i span,html[dir=rtl] button.navlink:focus-visible .roll i span{transform:translateY(-1.35em)}
html[dir=rtl] .cp i{height:1.35em;line-height:1.35}
html[dir=rtl] .cp b{height:1.35em;line-height:1.35}
html[dir=rtl] .cp-n b{transform:translateY(1.35em)}
html[dir=rtl] .cp.go .cp-o b{transform:translateY(-1.35em)} html[dir=rtl] .cp.go .cp-n b{transform:none}

/* numbers read left to right, even in an Arabic line */
html[dir=rtl] .stk-n,html[dir=rtl] .stk-meta span:first-child,html[dir=rtl] .ft-time,html[dir=rtl] .ft-tz{direction:ltr;unicode-bidi:isolate}
html[dir=rtl] .stk-m{line-height:1.25}

/* ---------------------------------------------------------------- the nav */
/* the sweep that uncovers the nav runs right to left here (js/stretch-ar.js): until it starts, every item is
   covered from the left */
html[dir=rtl].st:not(.st-in) #nav .mark,html[dir=rtl].st:not(.st-in) #nav .navlink{clip-path:inset(0 0 0 100%)}

/* ---------------------------------------------------------------- heads */
html[dir=rtl] .sh-m{text-align:left}
@media (max-width:900px){ html[dir=rtl] .sh-m{text-align:right} }

/* ---------------------------------------------------------------- 01 · the stack */
html[dir=rtl] .stk-tx{border-right:0;border-left:3px solid var(--ink)}
html[dir=rtl] .stk-ttl{margin-left:0;line-height:1.12}
html[dir=rtl] .stk-ttl .ln{padding:.22em 0 .34em .06em;margin:-.22em 0 -.34em}
html[dir=rtl] .stk-say{line-height:1.6}
html[dir=rtl] .stk-get{line-height:1.45}
html[dir=rtl] .stk-meta{line-height:1.45}
html[dir=rtl] .stk-go{font-family:Kaff,Jost,ui-sans-serif,system-ui,sans-serif;font-weight:500;line-height:1.4}
html[dir=rtl] .stk-go i{border-left:0;border-right:10px solid var(--verm)}
@media (max-width:820px),(max-aspect-ratio:4/5){
  html[dir=rtl] .stk-tx{border-left:0}
  html[dir=rtl] .stk-get{line-height:1.6}
}

/* ---------------------------------------------------------------- 02 · the work */
/* the swap's colour block crosses the other way (js/site.js) */
html[dir=rtl] .mc .shade{transform:translateX(101%)}

/* ---------------------------------------------------------------- 03 · the starts */
html[dir=rtl] .tier .stage{margin-right:0;padding-right:0;margin-left:calc(-1*var(--g));padding-left:var(--g)}
html[dir=rtl] .tier:last-child .stage{margin-right:0;padding-right:0;margin-left:calc(-1*var(--m));padding-left:var(--m)}
html[dir=rtl] .tier .go{transform:translateX(8px)}
html[dir=rtl] .tier:focus-visible .go,html[dir=rtl] .tier.pick .go,html[dir=rtl] .tier.cy .go{transform:none}
html[dir=rtl] .tier .go svg{transform:scaleX(-1)}
html[dir=rtl] .tier .n{font-weight:500}
@media (max-width:900px){
  html[dir=rtl] .tier:nth-child(2n) .stage{margin-right:0;padding-right:0;margin-left:calc(-1*var(--m));padding-left:var(--m)}
}
@media (hover:none){ html[dir=rtl] .tier .go{transform:none} }

/* ---------------------------------------------------------------- arrows point the way you read */
html[dir=rtl] .btn svg{transform:scaleX(-1)}
html[dir=rtl] .btn:hover svg,html[dir=rtl] .btn:focus-visible svg{transform:scaleX(-1) translateX(5px)}

/* ---------------------------------------------------------------- 04 · the close */
html[dir=rtl] #s06 .close-h{margin-left:0}
html[dir=rtl] #s06 .close-h.ask{line-height:1.16}
html[dir=rtl] .blank{line-height:1.1;padding-bottom:.03em}
html[dir=rtl] .blank select{line-height:1.1}
html[dir=rtl] #s06 .close-h .hand{float:left;margin:.08em .3em .08em 0}
@media (max-width:699px){ html[dir=rtl] #s06 .close-h .hand{float:none;margin:0 auto 14px 0} }
html[dir=rtl] #s06 .ask-tag{font-size:14px;line-height:1.4}
html[dir=rtl] .ft-c .copy::before{left:auto;right:-.95em}
html[dir=rtl] .ft-tz{font-size:15px}

/* ---------------------------------------------------------------- 07 · the eyes */
/* the word sits at the right; its turning slot is cut wide enough for the marks above and the tails below */
html[dir=rtl] .ey-word{margin-left:0;line-height:1.18}
html[dir=rtl] .ey-slot{clip-path:inset(-.12em -1em -.22em -100vw)}
html[dir=rtl] .ey-was{left:auto;right:0}

/* ---------------------------------------------------------------- 08 · the climb */
html[dir=rtl] .ar-by{left:auto;right:var(--bx)}
html[dir=rtl] .ar-say{left:auto;right:var(--m);line-height:1.3}
/* the label is the English label's box: 6.4em wide (the English one is held at its max-width and balances two
   lines of 439 and 430 inside it), two lines of 323 and 437, so the free paper at the end of the lines, where the
   arrows come over the box, is the same, mirrored (js/arrows.js picks them) */
html[dir=rtl] .ar-l2{width:6.4em;max-width:100%;line-height:.96}
html[dir=rtl] .ar-go{right:auto;left:var(--gx)}
html[dir=rtl] .ar-foot.up .ar-go{text-align:left}

/* ---------------------------------------------------------------- the cursor's pill */
html[dir=rtl] #cur .cur-t{font-family:Kaff,Jost,ui-sans-serif,system-ui,sans-serif;line-height:1.4}
html[dir=rtl] #cur .cur-sq{margin-right:0;margin-left:7px}

/* ---------------------------------------------------------------- the reel */
/* the plate lives in the bottom-left corner here (js/reel.js mirrors it); its controls are a media timeline,
   which reads left to right in every language */
html[dir=rtl] .rl-close{right:auto;left:clamp(8px,1.6vw,24px)}
html[dir=rtl] .rl-bar{direction:ltr}
html[dir=rtl] .rl-pill{font-family:Kaff,Jost,system-ui,sans-serif;font-weight:500;line-height:1.3}
html[dir=rtl] .rl-pill i{margin-left:0;margin-right:2px}
html[dir=rtl] .rl-spine b{font-family:Kaff,Jost,system-ui,sans-serif;font-weight:500}

/* ---------------------------------------------------------------- print */
@media print{
  html[dir=rtl] #proof{font-family:Kaff,Jost,sans-serif}
  html[dir=rtl] #proof .proof-say{left:auto;right:12mm;line-height:1.2;font-weight:500}
  html[dir=rtl] #proof .proof-list{left:auto;right:12mm;line-height:1.7}
  html[dir=rtl] #proof .proof-foot{text-transform:none}
}

/* the eyes' words, drawn from a distance field at their weight (js/eyes.js): the text stays, clear, for the
   layout and the turn; the drawing lies on it, its baseline on the text's */
html[dir=rtl] .ey-w:not(.ey-was){position:relative}
html[dir=rtl] .ey-w.ey-f{color:transparent;-webkit-text-stroke:0}
html[dir=rtl] .ey-fc{position:absolute;display:block;pointer-events:none;image-rendering:auto}
