/* Arabic. Loaded only on right-to-left pages, so the English design is untouched.
   The Cairo font is attached by slx_cairo_css() once fonts/Cairo.ttf is in the plugin. */
/* joined letters must never be tracked apart */
html[dir=rtl] *{letter-spacing:0!important}
[dir=rtl] body{line-height:1.8}
[dir=rtl] :is(h1,h2,h3,.d,.mega,.iqf .big,.flow b,.ghost){font-weight:800;font-synthesis:none;line-height:1.3}
[dir=rtl] h1 span{padding-bottom:.12em}
[dir=rtl] footer .mega{line-height:1.3}
[dir=rtl] .orbit text{font-weight:600;font-size:16px}
[dir=rtl] .k,[dir=rtl] :is(.tag,label,footer h2.fh,.facts dt,.specs h3,.season thead th,.orchard button,.lang summary){font-size:14px}
[dir=rtl] .orchard button{line-height:1.6}

/* the hidden spam trap must not widen a right-to-left page */
[dir=rtl] .hp{left:auto!important;right:-9999px}

/* header */
[dir=rtl] nav{margin-left:0;margin-right:auto}
[dir=rtl] header .sub{left:auto;right:-18px;border-radius:0 0 0 40px}
[dir=rtl] header .item.has>a::after{margin-left:0;margin-right:7px}
[dir=rtl] .lang ul{right:auto;left:0;border-radius:0 0 0 30px}
[dir=rtl] .skip{left:auto;right:-999px}[dir=rtl] .skip:focus{right:8px}

/* opening: films on the left, words on the right */
[dir=rtl] .win{right:auto;left:max(64px,7vw)}
[dir=rtl] .veil{background:linear-gradient(270deg,#17301cf2 0,#17301cb8 36%,#17301c33 64%,#17301c14),linear-gradient(0deg,#17301c99,#17301c00 40%)}
[dir=rtl] .pause{right:auto;left:48px}
[dir=rtl] .d1{left:auto;right:-26px}[dir=rtl] .d2{right:auto;left:-10px}

/* decorative shapes move to the side the words are not on */
[dir=rtl] .s-leaf{right:auto;left:-60px}[dir=rtl] .s-quart{right:auto;left:210px}
[dir=rtl] .st-a{left:auto;right:-90px;border-radius:0 0 0 100%}[dir=rtl] .st-b{right:auto;left:-40px}
[dir=rtl] .ph-a{right:auto;left:-90px}[dir=rtl] .ph-b{left:auto;right:44%}
[dir=rtl] .al-a{right:auto;left:-70px;border-radius:0 100% 0 0}[dir=rtl] .dl-a{left:auto;right:-60px;border-radius:0 0 0 100%}
[dir=rtl] .card.plain::before{right:auto;left:-30px}
[dir=rtl] .ice{margin-left:0;margin-right:auto}
[dir=rtl] .p-gr .tx{padding-right:28px;padding-left:200px}
[dir=rtl] figcaption{text-align:left}
[dir=rtl] .msg{margin-left:0;margin-right:12px}
[dir=rtl] .who li:hover{padding-left:0;padding-right:22px}
[dir=rtl] .who li{background-position:100% 0}
[dir=rtl] .end a{margin-left:0;margin-right:18px}
[dir=rtl] .rib{transform:scaleX(-1)}

/* season chart reads from the right */
[dir=rtl] .season tbody th{text-align:right;padding-right:0;padding-left:12px}
[dir=rtl] .season td.first{border-radius:0 20px 20px 0/0 9px 9px 0}[dir=rtl] .season td.last{border-radius:20px 0 0 20px/9px 0 0 9px}[dir=rtl] .season td.first.last{border-radius:20px/9px}

/* numbers, codes and addresses keep their own order */
[dir=rtl] :is(.sizes span,.count,.huge,.two-col p,.addr,.cols>div,.facts dd,.sample){unicode-bidi:plaintext}
[dir=rtl] :is(.huge,.two-col p,.addr,.cols>div,.facts dd){text-align:right}
[dir=rtl] input[type=email],[dir=rtl] input[type=date]{direction:ltr;text-align:right}

@media(max-width:900px){
[dir=rtl] .win{left:0;right:0}[dir=rtl] .veil{background:linear-gradient(0deg,var(--deep) 18%,#17301cd9 44%,#17301c00 70%)}
[dir=rtl] .pause{left:16px}
[dir=rtl] .s-leaf{left:-20px}[dir=rtl] .s-quart{left:30px}
[dir=rtl] .ph-a{left:-30px}[dir=rtl] .ph-b{left:30px;right:auto}
[dir=rtl] .p-gr .tx{padding-left:70px}
[dir=rtl] header .sub{padding:10px 16px 0 0;right:auto}
[dir=rtl] .lang{margin-left:0;margin-right:auto}[dir=rtl] .burger{margin-right:0}
[dir=rtl] .end a{margin:0 0 0 16px}
[dir=rtl] .orbit text{font-size:22px}
}

/* any Latin-script sentence (a name, or text still awaiting translation) keeps its punctuation in place */
[dir=rtl] :is(p,h1 i,h2,h3,.big){unicode-bidi:plaintext;text-align:right}
[dir=rtl] .quote .msg{unicode-bidi:normal}

/* keep e-mail, telephone and address links in reading order, and give isolated numbers a stable box */
[dir=rtl] :is(a[href^="mailto:"],a[href^="tel:"],a[href*="wa.me"],a[href*="whatsapp"]){direction:ltr;unicode-bidi:isolate}
[dir=rtl] bdi[dir=ltr]{unicode-bidi:isolate}
[dir=rtl] :is(td,th,.sizes span,.count){font-variant-numeric:lining-nums}
/* long Arabic compounds wrap inside their own column on every shared component */
[dir=rtl] :is(h1,h2,h3,h4,p,li,dt,dd,.k){overflow-wrap:break-word;hyphens:manual}
