/* Arabic pages only (loaded after style.css on /ar/). Typography and right-to-left layout. */

/* Type: IBM Plex Sans Arabic carries the Arabic; Archivo stays first so Latin runs (PES, PTFE, 226, PUNO, numbers) keep the site's face. */
body{font-family:"Archivo","IBM Plex Sans Arabic","Noto Sans Arabic",system-ui,sans-serif;font-size:1.14rem;line-height:1.85}
/* Width axis and tight tracking are Latin devices; on Arabic they do nothing useful and tracking breaks letter joining. */
h1,h2,h3,tbody th,.mark,.guide-list a,.sample-form legend,ol.steps li::before{font-stretch:100%;letter-spacing:0}
h1,h2,h3{font-weight:700;line-height:1.35}
h1{font-size:clamp(2.1rem,5vw,3.6rem)}
h3{line-height:1.5}
summary,.guide-list a{line-height:1.6}
.top nav a,label,.note,.src,.crumbs,footer,figcaption,.gallery figcaption{font-size:1rem}
thead th{font-size:1rem}
.btn{line-height:1.6}

/* Tables: header cells and the first column align right; cell padding moves to the left side. */
th,td{text-align:right;padding:.9rem 0 .9rem 1.25rem}
caption{text-align:right}

/* Lists: markers sit on the right. */
.prose ul,.prose ol,.facts{padding-left:0;padding-right:1.4rem}
.guide-list{padding-right:0}

/* Buttons and the quiet link beside them. */
.quiet,.page-head .quiet{margin-left:0;margin-right:1.1rem}
@media (max-width:52rem){.quiet,.page-head .quiet{margin:1rem 0 0}}

/* Home page diagram: mirror its overhang, keep its Latin labels left-to-right. */
.pleat{margin-right:0;margin-left:-18%}
.pleat text{direction:ltr}
@media (max-width:52rem){.pleat{margin:0 auto}}

/* Header: keep the links off the screen edge on phones and let them wrap. */
.top{padding-left:1.25rem;padding-right:1.25rem;flex-wrap:wrap}
.top nav{gap:.6rem 1.25rem}

/* Runs that must never reorder inside Arabic text: email addresses, dates, and anything marked ltr. */
a[href^="mailto:"],time,[dir="ltr"]{direction:ltr;unicode-bidi:isolate}

/* Forms: free text is typed right-to-left; the email field stays left-to-right but lines up with the others. */
input,textarea,select{text-align:right}
input[type="email"]{direction:ltr;text-align:right}
.status,.note{text-align:right}

/* Footer and language switcher start from the right; Latin language names keep their own direction. */
footer .langs a{unicode-bidi:isolate}
