/* ============================================================
   阿拉伯语 RTL 适配（build.py --lang ar 时在 style.css 之后加载）
   通用规则：flex/grid 随 dir 自动翻转，此处只修手工定向的部分
   ============================================================ */
html[dir="rtl"] *{letter-spacing:0}
html[dir="rtl"] body{direction:rtl;text-align:right}

/* 顶部功能条 */
html[dir="rtl"] .utility-in{flex-direction:row-reverse}
html[dir="rtl"] .lang-panel{left:auto;right:0;text-align:right}
html[dir="rtl"] .util-right{flex-direction:row-reverse}

/* 机构抬头 */
html[dir="rtl"] .masthead-in{flex-direction:row-reverse}
html[dir="rtl"] .masthead-side{margin-left:0;margin-right:auto;text-align:left}

/* 主导航与面包屑 */
html[dir="rtl"] .nav-in{flex-direction:row-reverse}
html[dir="rtl"] .nav a.portal{margin-left:0;margin-right:auto}
html[dir="rtl"] .breadcrumb .container{flex-direction:row-reverse}

/* 警示条 */
html[dir="rtl"] .alert-in{flex-direction:row-reverse}
html[dir="rtl"] .alert-body b{margin-right:0;margin-left:6px}
html[dir="rtl"] .alert-body .no{margin-right:0;margin-left:8px}
html[dir="rtl"] .alert-close{order:-1}

/* 面壁计划原则条 */
html[dir="rtl"] .principle-in{flex-direction:row-reverse}

/* 正文排版 */
html[dir="rtl"] .doc h2{padding-left:0;padding-right:10px;border-left:none;border-right:4px solid var(--blue-bright)}
html[dir="rtl"] .doc ul,html[dir="rtl"] .doc ol{margin-left:0;margin-right:24px}
html[dir="rtl"] .doc th{text-align:right}
html[dir="rtl"] .doc blockquote{border-left:none;border-right:3px solid var(--gray-2)}
html[dir="rtl"] .doc details>summary{direction:rtl}
html[dir="rtl"] .paper p{text-indent:0}

/* 侧栏 */
html[dir="rtl"] .side-nav a{border-left:none;border-right:3px solid transparent;text-align:right}
html[dir="rtl"] .side-nav a.active{border-right-color:var(--blue-bright)}

/* 数字/文号等保持 LTR 阅读 */
html[dir="rtl"] .mono,html[dir="rtl"] .an-date,html[dir="rtl"] .an-tag,
html[dir="rtl"] .fleet-v,html[dir="rtl"] .doc .meta-line,
html[dir="rtl"] .fc-card .fc-meta,html[dir="rtl"] .mc-len,
html[dir="rtl"] .receipt b,html[dir="rtl"] .cd-num{direction:ltr;unicode-bidi:isolate}

/* 卡片与组件 */
html[dir="rtl"] .q-card,html[dir="rtl"] .media-card,html[dir="rtl"] .contact-card{flex-direction:row-reverse}
html[dir="rtl"] .media-card .mc-len{margin-left:0;margin-right:auto}
html[dir="rtl"] .faq-q{flex-direction:row-reverse;text-align:right}
html[dir="rtl"] .prog-label{flex-direction:row-reverse}
html[dir="rtl"] .fleet-row{flex-direction:row-reverse}
html[dir="rtl"] .news-meta{flex-direction:row-reverse}
html[dir="rtl"] .foot-brand{flex-direction:row-reverse}
html[dir="rtl"] .foot-bottom{flex-direction:row-reverse}
html[dir="rtl"] .an-head{flex-direction:row-reverse}
html[dir="rtl"] .panel-head{flex-direction:row-reverse}
html[dir="rtl"] .form-field input,html[dir="rtl"] .form-field textarea,html[dir="rtl"] .form-field select,
html[dir="rtl"] .util-search input,html[dir="rtl"] .util-search button{text-align:right;direction:rtl}
html[dir="rtl"] input[type="text"]{text-align:right;direction:rtl}
html[dir="rtl"] .step{padding:0 44px 18px 0}
html[dir="rtl"] .step::before{left:auto;right:0}
