/* RTL overrides for Arabic (html[dir="rtl"]).
   Loaded on every page; every rule here is scoped under [dir="rtl"], so it
   has no effect on the six LTR languages. [dir="rtl"] .foo always beats a
   plain .foo rule on specificity, regardless of stylesheet load order, so
   this file can safely sit anywhere in <head> relative to the per-page
   component stylesheets. */

/* Lists: bullets/numbers move to the right edge */
[dir="rtl"] ul,
[dir="rtl"] ol {
  padding-left: 0;
  padding-right: 1.2em;
}

/* Header / nav */
[dir="rtl"] .brand { margin-right: 0; margin-left: 4px; }
[dir="rtl"] .header-actions { margin-left: 0; margin-right: auto; }
[dir="rtl"] .skip-link { left: auto; right: 12px; }
[dir="rtl"] .nav-drawer-panel { right: auto; left: 0; box-shadow: 8px 0 30px rgba(0,0,0,.5); }
[dir="rtl"] .back-to-top { right: auto; left: 20px; }
@media (max-width:640px){ [dir="rtl"] .back-to-top { right: auto; left: 14px; } }

/* Tables explicitly left-aligned in the LTR design */
[dir="rtl"] .prose th,
[dir="rtl"] .prose td,
[dir="rtl"] .hm-sheet-table th,
[dir="rtl"] .hm-decay-table th,
[dir="rtl"] .pp-draft p {
  text-align: right;
}

/* Callout / quote boxes with a coral accent border on the leading edge */
[dir="rtl"] .cp-claim-card,
[dir="rtl"] .qc-callout,
[dir="rtl"] .sh-rule,
[dir="rtl"] .rs-callout {
  border-left: none;
  border-right: 3px solid var(--coral);
  border-radius: var(--radius) 0 0 var(--radius);
}

/* Home: "what people try to solve" step dividers */
[dir="rtl"] .hm-solve-step { border-left: 0; border-right: 1px solid var(--border); }
[dir="rtl"] .hm-solve-step:first-child { border-right: 0; }
@media (max-width:860px){ [dir="rtl"] .hm-solve-step:nth-child(2n+1){ border-right: 0; } }
@media (max-width:560px){ [dir="rtl"] .hm-solve-step{ border-right: 0 !important; } }

/* Home: community-signal-vs-evidence divider */
[dir="rtl"] .hm-signal-evidence { border-left: 0; padding-left: 0; border-right: 1px solid rgba(255,255,255,.12); padding-right: 28px; }
@media (max-width:760px){ [dir="rtl"] .hm-signal-evidence{ border-right: 0; padding-right: 0; } }

/* Home: hero mosaic corner tag */
[dir="rtl"] .hm-mos-tag { left: auto; right: 10px; }

/* Evidence ladder: staircase indent (rung 1 = shallowest, rung 5 = deepest) */
[dir="rtl"] .el-rung-1{ margin-left:0; margin-right:14%; }
[dir="rtl"] .el-rung-2{ margin-left:0; margin-right:10.5%; }
[dir="rtl"] .el-rung-3{ margin-left:0; margin-right:7%; }
[dir="rtl"] .el-rung-4{ margin-left:0; margin-right:3.5%; }
[dir="rtl"] .el-rung-5{ margin-left:0; margin-right:0; }
@media (max-width:700px){
  [dir="rtl"] .el-rung-1,[dir="rtl"] .el-rung-2,[dir="rtl"] .el-rung-3,[dir="rtl"] .el-rung-4,[dir="rtl"] .el-rung-5{ margin-right:0; }
}

/* FAQ accordion plus-icon spacing */
[dir="rtl"] .fq-item summary::after { margin-left: 0; margin-right: 12px; }

/* Community post: anatomy wireframe diagram */
[dir="rtl"] .cp-wf-row { padding-right: 0; padding-left: 150px; }
[dir="rtl"] .cp-wf-pill { margin-right: 0; margin-left: 8px; }
[dir="rtl"] .cp-wf-label { right: auto; left: 0; }
@media (max-width:560px){ [dir="rtl"] .cp-wf-row{ padding-left: 0; } }

/* Sizing diagram measurement callouts */
[dir="rtl"] .sz-mark { left: auto; right: 2px; }
[dir="rtl"] .sz-mark-shoulder { left: auto; right: 4px; }
[dir="rtl"] .sz-mark-length { left: auto; right: 30%; }
[dir="rtl"] .sz-mark-chest { left: auto; right: -6px; }

/* Shortlist: circular letter badge pinned to a card's leading corner */
[dir="rtl"] .bs-letter { left: auto; right: -10px; }

/* Reddit Spreadsheet: connector line between anatomy-diagram grid cells
   (grid reads right-to-left in RTL, so the line points the other way) */
[dir="rtl"] .rs-anatomy-cell::after { right: auto; left: -13px; }
