@font-face {
  font-family: "Noto Sans Arabic";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: local("Noto Sans Arabic"), local("NotoSansArabic");
}

html[dir="rtl"],
html[dir="rtl"] body {
  overflow-x: clip;
}

html[dir="rtl"] body {
  direction: rtl;
  font-family: "Noto Sans Arabic", "Tahoma", sans-serif;
  line-height: 1.65;
  text-align: right;
}

html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] .brand,
html[dir="rtl"] .footer-brand {
  font-family: "Noto Sans Arabic", "Tahoma", sans-serif;
}

/* Arabic is a connected script: Latin-style tracking visually separates the
   letters and must never be inherited from the English editorial system. */
html[dir="rtl"] :where(h1, h2, h3, h4, h5, h6, p, a, span, strong, small, label, button, summary, legend, li, dt, dd, th, td, caption),
html:lang(ar) :where(h1, h2, h3, h4, h5, h6, p, a, span, strong, small, label, button, summary, legend, li, dt, dd, th, td, caption),
body.rtl :where(.eyebrow, .article-kicker, .article-type, .chapter-marker, .section-label, .section-number, .overline) {
  letter-spacing: normal !important;
}

/* Arabic labels need a slightly larger optical size than the Latin source
   system. Preserve hierarchy without relying on tracking in a joined script. */
html[dir="rtl"] :where(.eyebrow, .section-index p) {
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.7;
}

html[dir="rtl"] :where(.section-kicker, .article-kicker, .article-type, .chapter-marker, .section-label, .overline, .insights-content-type, .framework-ledger span, .insights-index span, .specialty-lens span, .pillar-definition small, .collection-grid small, .related-grid span) {
  font-size: 13px !important;
  line-height: 1.7;
}

html[dir="rtl"] body.insights-page-body .framework-ledger>a::before,
html[dir="rtl"] body.insights-page-body .framework-ledger>article::before {
  transform-origin: top right;
}

html[dir="rtl"] :where(.eyebrow, .article-kicker, .article-type, .chapter-marker, .section-label, .section-number, .overline)::before,
html[dir="rtl"] :where(.eyebrow, .article-kicker, .article-type, .chapter-marker, .section-label, .section-number, .overline)::after,
html:lang(ar) :where(.eyebrow, .article-kicker, .article-type, .chapter-marker, .section-label, .section-number, .overline)::before,
html:lang(ar) :where(.eyebrow, .article-kicker, .article-type, .chapter-marker, .section-label, .section-number, .overline)::after {
  letter-spacing: normal !important;
}

html[dir="rtl"] .brand,
html[dir="rtl"] .brand span,
html[dir="rtl"] .footer-brand,
html[dir="rtl"] .footer-brand span {
  letter-spacing: .34em !important;
}

html[dir="rtl"] .site-header,
html[dir="rtl"] .header-actions,
html[dir="rtl"] .desktop-nav,
html[dir="rtl"] .footer-bottom,
html[dir="rtl"] .hero-actions {
  flex-direction: row-reverse;
}

html[dir="rtl"] .language {
  direction: ltr;
}

.mobile-language-switcher {
  display: none;
}

@media (max-width: 1050px) {
  .mobile-language-switcher {
    display: block;
  }

  .mobile-language-switcher .language {
    display: block;
    color: #78dbea;
    font-weight: 600;
  }
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  direction: rtl;
  text-align: right;
}

/* Mirror the search affordance in RTL: Arabic text starts on the right, while
   the magnifier sits on the left in its own reserved space. */
html[dir="rtl"] .insights-search input[type="search"] {
  padding-right: 18px;
  padding-left: 58px;
}

html[dir="rtl"] .insights-search > div > span {
  right: auto;
  left: 20px;
}

html[dir="rtl"] picture,
html[dir="rtl"] img {
  max-width: 100%;
}

/* The patient-decision sequence starts at the right edge in Arabic and
   resolves toward the left. Mirror its line, separators, numbering and entry
   motion rather than relying on the grid's inherited writing direction. */
html[dir="rtl"] .decision-path::after {
  background: linear-gradient(270deg, #08798e, var(--cyan));
  transform-origin: right;
}

html[dir="rtl"] .decision-path span,
html[dir="rtl"] .decision-path strong {
  border-right: 0;
  border-left: 1px solid rgba(0, 73, 91, .18);
  text-align: right;
}

html[dir="rtl"] .decision-path strong {
  border-left: 0;
}

html[dir="rtl"] .decision-path span::before,
html[dir="rtl"] .decision-path strong::before {
  right: 24px;
  left: auto;
}

html[dir="rtl"].js .decision-path span,
html[dir="rtl"].js .decision-path strong {
  transform: translateX(18px);
}

html[dir="rtl"] .decision-path.is-visible span,
html[dir="rtl"] .decision-path.is-visible strong {
  transform: none;
}

html[dir="rtl"] .legal-toc nav::before {
  content: "في هذه الصفحة";
  text-transform: none;
}

/* Preserve the intended three-line Arabic homepage proposition. The closing
   phrase is short enough for narrow phones and must not split after "غير". */
html[dir="rtl"] body.home-refined .hero-title-closing {
  white-space: nowrap;
}

html[dir="rtl"] [aria-hidden="true"] {
  unicode-bidi: isolate;
}

@media (max-width: 760px) {
  html[dir="rtl"] .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  html[dir="rtl"] body.home-refined .system-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  html[dir="rtl"] body.home-refined .system-heading .system-heading-description {
    max-width: 100%;
  }

  html[dir="rtl"] .mobile-nav {
    text-align: right;
  }

  html[dir="rtl"] .decision-path span,
  html[dir="rtl"] .decision-path strong {
    justify-content: flex-start;
    padding-right: 62px;
    padding-left: 18px;
    border: 1px solid rgba(0, 73, 91, .18);
  }

  html[dir="rtl"] .decision-path span::before,
  html[dir="rtl"] .decision-path strong::before {
    right: 18px;
    left: auto;
  }
}
