/* Persian only. Load after the release/article CSS; preserve source and keyboard order. */
html:lang(fa) body.sl-wp-preview { direction: rtl; text-align: start; }
html:lang(fa) body.sl-wp-preview :is(.slh-home,.shh-hero,.sil-product,.pc-root,.sl-preserved-content,.slkh,.sl-nav-header) { text-align: start; }
/* Shared footer and article sources contain important per-element font rules. */
html:lang(fa) body.sl-wp-preview :is(.slh-home,.sl-nav-header,.sil-product,.pc-root,.sl-preserved-content,.slkh[data-resource-library],#site-footer) :is(h1,h2,h3,h4,h5,h6,p,li,dt,dd,th,td,label,input,textarea,select,button,summary,a,figcaption,span,strong) { font-family:var(--slml-persian-font) !important; letter-spacing:normal !important; }
html:lang(fa) body.sl-wp-preview :is(.slh-home,.sl-nav-header,.sil-product,.pc-root,.sl-preserved-content,.slkh[data-resource-library],#site-footer) :is(h1,h2,h3,h4,h5,h6,summary) { line-height:1.55 !important; }
html:lang(fa) body.sl-wp-preview :is(.slh-home #shh-title,.slkh[data-resource-library] .slkh-intro h1) { line-height:1.4 !important; }
html:lang(fa) body.sl-wp-preview .slml-ltr,
html:lang(fa) body.sl-wp-preview :is(code,pre,input[type=email],input[type=tel],input[type=url],input[type=number]) { direction:ltr; unicode-bidi:isolate; }
html:lang(fa) body.sl-wp-preview :is(code,pre,input[type=email],input[type=tel],input[type=url],input[type=number]) { text-align:left; }
html:lang(fa) body.sl-wp-preview :is(input,textarea)[dir=auto] { text-align:start; }
/* One mixed text run remains one flex/grid item; nested BDI stays inline. */
html:lang(fa) body.sl-wp-preview .slml-text-run { min-inline-size:0; }
html:lang(fa) body.sl-wp-preview .fluentform input[dir=ltr] { direction:ltr; unicode-bidi:isolate; text-align:left; }
html:lang(fa) body.sl-wp-preview .fluentform :is(.ff-el-input--label,.ff_submit_btn_wrapper,.ff-el-help-message,.error,.text-danger) { text-align:start; }

/* Header panels retain their centered geometry. Directional gutters follow the text. */
html:lang(fa) body.sl-wp-preview .sl-nav-desktop,
html:lang(fa) body.sl-wp-preview .sl-nav-shell .sl-nav-mobile-trigger { margin-left:0; margin-right:auto; }
html:lang(fa) body.sl-wp-preview .sil-language-panel { right:auto; left:0; text-align:start; }
html:lang(fa) body.sl-wp-preview .sil-language-panel a { white-space:normal; }
html:lang(fa) body.sl-wp-preview .sl-topic-menu-intro { border-right:0; border-left:1px solid #dbe4ea; padding-right:0; padding-left:28px; }
html:lang(fa) body.sl-wp-preview :is(.sl-nav-eyebrow,.sl-mobile-eyebrow,.sl-mobile-drawer-top p,.sl-size-group h3) { letter-spacing:normal; white-space:normal; }

/* Footer contact details remain LTR inside the Persian label/value layout. */
html:lang(fa) body.sl-wp-preview #site-footer.sl-footer,
html:lang(fa) body.sl-wp-preview #site-footer.sl-footer .footer-source > :is(div,nav) { text-align:start; }
html:lang(fa) body.sl-wp-preview #site-footer.sl-footer .sl-footer-qr-wrap { padding-left:0; padding-right:74px; }
html:lang(fa) body.sl-wp-preview #site-footer.sl-footer :is(a[href^="mailto:"],a[href^="tel:"]) { direction:ltr; unicode-bidi:isolate; text-align:right; }

/* Product and comparison tables mirror columns but keep technical tokens intact. */
html:lang(fa) body.sl-wp-preview :is(.sil-product,.pc-root,.sl-preserved-content) :is(th,td),
html:lang(fa) body.sl-wp-preview .pc-comparison-table caption,
html:lang(fa) body.sl-wp-preview .sloem-page [data-catalog] .pc-card-actions { text-align:start; }
html:lang(fa) body.sl-wp-preview .pc-breadcrumb > * + *::before { margin-right:0; margin-left:10px; }
html:lang(fa) body.sl-wp-preview :is(.pc-filter-body,.pc-results-toolbar) select { padding-left:28px; padding-right:10px; }
html:lang(fa) body.sl-wp-preview .pc-entry > div:first-child { margin-right:0; margin-left:auto; }
html:lang(fa) body.sl-wp-preview .sil-product :is(#enlarge,#close-dialog,.section-nav a:last-child) { margin-left:0; margin-right:auto; }
html:lang(fa) body.sl-wp-preview .sil-product .fit-note { border-left:0; border-right:1px solid var(--teal); }
html:lang(fa) body.sl-wp-preview .sil-product .dimension-notes > div { padding-left:0; padding-right:35px; }
html:lang(fa) body.sl-wp-preview .sil-product .dimension-notes > div > span { left:auto; right:0; }
html:lang(fa) body.sl-wp-preview .sil-product summary { padding-left:32px; padding-right:0; }
html:lang(fa) body.sl-wp-preview .sil-product summary::after { right:auto; left:5px; }
html:lang(fa) body.sl-wp-preview .sil-product .signal-details summary span { margin-left:0; margin-right:18px; }
html:lang(fa) body.sl-wp-preview .sil-product .faq-list p { padding-right:0; padding-left:23px; }

/* Retained article lists and the library use logical reading-edge spacing. */
html:lang(fa) body.sl-wp-preview .sl-preserved-copy :is(ul,ol) { padding-left:0; padding-right:1.5em; }
html:lang(fa) body.sl-wp-preview .sl-preserved-copy :is(.sl-article-toc,.slac-toc,.article-toc,.sl-content-toc) :is(ul,ol) { padding-inline:0; }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] :is(.slkh-topics,.slkh-list,.slkh-related ul) { padding-inline:0; }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-topics a { margin-left:0; margin-right:-.75rem; }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-result-bar p { text-align:end; }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-result-count a { margin-left:0; margin-right:.5rem; }
/* BDI tokens must remain in one text line, not become separately spaced flex items. */
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-entry h3 a { display:block; position:relative; padding-inline-end:2.5rem; }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-entry h3 a > svg { position:absolute; inset-inline-end:0; top:.3em; }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-related a { display:block; padding-block:.5rem; }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-contact > a { display:block; position:relative; padding-inline-end:3.25rem !important; }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-contact > a > svg { position:absolute; inset-inline-end:1rem; top:calc(50% - 10px); }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-entry p { padding-right:0; padding-left:2.5rem; }
html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-mobile-topics > summary > span { margin-right:0; margin-left:.5rem; }

/* Mirror navigation arrows only, never photographs, drawings or 3D controls. */
html:lang(fa) body.sl-wp-preview :is(.slkh-entry h3 a,.slkh-contact>a,.sl-footer-cta,.slh-text-link,.slh-button) > svg { transform:scaleX(-1); }

@media(max-width:1359px) {
  html:lang(fa) body.sl-wp-preview .sl-mobile-children .sl-topic-menu-intro { border:0; padding:0; }
  html:lang(fa) body.sl-wp-preview .sl-nav-header .sl-mobile-children { padding-inline:0; }
}
@media(max-width:1100px) {
  html:lang(fa) body.sl-wp-preview #site-footer.sl-footer .sl-footer-qr-wrap { padding-inline:0; }
}
@media(max-width:980px) {
  html:lang(fa) body.sl-wp-preview #site-footer.sl-footer .footer-source .footer-contact-list { padding-right:0; padding-left:126px; }
  html:lang(fa) body.sl-wp-preview #site-footer.sl-footer .sl-footer-qr-wrap { right:auto; left:0; }
}
@media(max-width:760px) {
  html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-topics a { margin-inline:0; }
  html:lang(fa) body.sl-wp-preview .slkh[data-resource-library] .slkh-entry p { padding-inline:0; }
}
@media(max-width:740px) {
  html:lang(fa) body.sl-wp-preview .sil-product .signal-details summary span { margin-inline:0; }
  html:lang(fa) body.sl-wp-preview .sil-product .card-icon { float:right; margin:0 0 8px 16px; }
}
@media(max-width:600px) {
  html:lang(fa) body.sl-wp-preview #site-footer.sl-footer .footer-source .footer-contact-list { padding-inline:0; }
  html:lang(fa) body.sl-wp-preview #site-footer.sl-footer .sl-footer-qr-wrap { padding-left:0; padding-right:74px; }
  html:lang(fa) body.sl-wp-preview .pc-results-toolbar select { padding-left:22px; padding-right:8px; }
}
