/* Shared reading and locale controls; loaded after page styles on every route. */
html body { text-rendering: optimizeLegibility; }
html body :is(p, li, blockquote, .hero-lede, .section-intro, .page-intro, .card-copy) {
  font-size: max(16px, 1em);
  line-height: 1.65;
}
html body :is(label, input, select, textarea, button, .button, .nav-link, .nav-trigger) {
  font-size: max(14px, 1em);
}
html body :is(small, figcaption, .eyebrow, .menu-kicker, .article-meta, .breadcrumbs,
  .form-note, .tool-caveat, .platform-capability-index, .story-meta, .story-visual > small,
  .story-brand, .focus-sector-kicker, .principle-num, .evidence-gate) {
  font-size: max(12px, 1em);
  line-height: 1.5;
}
html body :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid #2473ee !important;
  outline-offset: 3px !important;
}
html body .site-header .language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-inline: 10px 0;
  padding: 0 16px;
  border: 1px solid #155dff;
  border-radius: 999px;
  background: #155dff;
  color: #fff !important;
  font: 700 15px/1.2 "DM Sans", "Cairo", sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 5px 16px #155dff2b;
}
html body .site-header .language-switch:hover {
  border-color: #1048c5;
  background: #1048c5;
  color: #fff !important;
}
/* Keep primary actions readable even when older page styles set a dark label. */
html body :is(.button-primary, .button-orange, .pub-download, .intake-submit,
  .sf-opening-primary, .site-header .button-nav) {
  color: #fff !important;
}
html body .hero-shell:has(.home-opening-art) .hero-actions .button-primary {
  color: #fff !important;
}
html[lang="ar"] body,
html[lang="ar"] body :is(button, input, select, textarea) {
  font-family: "Cairo", "DM Sans", Arial, sans-serif;
}
html[lang="ar"] .site-header .language-switch { font-family: "DM Sans", "Cairo", sans-serif; }
/* Arabic landing: preserve the blue glass identity while keeping every label high contrast. */
html[lang="ar"][dir="rtl"] body .ar-page main .ar-hero {
  background: linear-gradient(120deg, #123b68e8, #173f6be8 58%, #20558be8) !important;
  border: 1px solid #9fc8ff55 !important;
  color: #fff !important;
  box-shadow: 0 18px 50px #03152b38 !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-hero :is(h1, p, span, strong, small) {
  color: #f7fbff !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-hero .ar-lede {
  color: #dceaff !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions .ar-btn {
  background: #126d82 !important;
  border-color: #76d4e5 !important;
  color: #fff !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions .ar-btn:hover {
  background: #0e8093 !important;
  color: #fff !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions a.ar-btn:link,
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions a.ar-btn:visited,
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions a.ar-btn:hover,
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions a.ar-btn:active {
  color: #fff !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions .ar-btn-secondary {
  background: #0b2444 !important;
  border-color: #a9c9ed !important;
  color: #fff !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions a.ar-btn-secondary:link,
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions a.ar-btn-secondary:visited,
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions a.ar-btn-secondary:hover,
html[lang="ar"][dir="rtl"] body .ar-page main .ar-actions a.ar-btn-secondary:active {
  color: #fff !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-pathways .ar-pathway {
  background: linear-gradient(145deg, #163a61f2, #0b2544f2) !important;
  border-color: #9fc8ff78 !important;
  color: #fff !important;
  box-shadow: 0 12px 28px #03152b38 !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-pathways .ar-pathway :is(small, strong, span) {
  color: #f7fbff !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-pathways .ar-pathway small {
  color: #b9d7ff !important;
}
html[lang="ar"][dir="rtl"] body .ar-page main .ar-pathways .ar-pathway:hover {
  background: linear-gradient(145deg, #21528bf5, #11345cf5) !important;
  border-color: #a9d1ff !important;
}
@media (max-width: 1100px) {
  html body .site-header .language-switch { min-height: 42px; margin-inline: auto 8px; padding-inline: 13px; font-size: 14px; }
  html body .site-header .mobile-toggle { margin-left: 0 !important; }
}
@media (max-width: 520px) {
  html body .site-header .language-switch { min-height: 40px; margin-inline: auto 6px; padding-inline: 11px; font-size: 13px; }
}
