/*
  RTL foundation — deliberately scoped to `dir="rtl"`.
  Arabic is a published layout variant. These rules provide real bidirectional
  structure instead of merely reversing glyph order at runtime.
*/

html[dir="rtl"] body {
  direction: rtl;
  text-align: start;
}

/* Reading order in the global shell follows the selected writing direction.
   The page-specific instruments stay geometrically stable; their labels use
   their own centred alignment where that is the intended reading surface. */
html[dir="rtl"] .site-header .header-inner,
html[dir="rtl"] .site-header .nav-links {
  flex-direction: row-reverse;
}

html[dir="rtl"] .site-header .nav-links a::after {
  left: auto;
  right: 0;
  transform-origin: right;
}

html[dir="rtl"] .language-switcher__menu {
  left: 0;
  right: auto;
}

html[dir="rtl"] .language-switcher__trigger,
html[dir="rtl"] .language-switcher__option,
html[dir="rtl"] .site-header .nav-links a,
html[dir="rtl"] .site-header .nav-links .nav-contact {
  direction: rtl;
}

html[dir="rtl"] :is(
  .personal-position,
  .closing-question,
  .project-lens,
  .systems-console > a,
  .method-route li,
  .business-context,
  .business-context__grid article,
  .process-artifacts-grid article,
  .contact-conversation-list span,
  .live-lab-orbit__core-copy,
  .live-lab-orbit__node-copy
) {
  text-align: start;
}

html[dir="rtl"] :is(
  .personal-position,
  .closing-question
) {
  padding-inline: var(--narrative-edge);
}

html[dir="rtl"] :is(
  .flagship-lab-card dl div,
  .business-context__grid article,
  .contact-conversation-list span,
  .narrative-hero__proof span
) {
  border-left: 0;
  border-right: 2px solid rgba(var(--accent-green-rgb), .36);
  padding-left: 0;
  padding-right: 14px;
}

html[dir="rtl"] .live-lab-orbit__core,
html[dir="rtl"] .live-lab-orbit__node-copy,
html[dir="rtl"] .opportunity-field .signal-deck__active-copy,
html[dir="rtl"] .opportunity-field .signal-deck__node > span:last-child {
  text-align: center;
}

@media (max-width: 760px) {
  html[dir="rtl"] .site-header .nav-links {
    text-align: start;
  }

  html[dir="rtl"] .language-switcher__menu {
    left: 0;
    right: auto;
  }
}
