/* Magna Bureau — Arabic (RTL) layer. Loaded ONLY on /ar/ pages.
   Pilot 2026-10-23. Logical-property overrides + mirroring fixes;
   charts/data scales are wrapped dir="ltr" in markup (geography and
   scales do not mirror — LANG-PLAN §2.5.3). */

@font-face {
  font-family: 'Noto Kufi Arabic';
  src: url('/assets/fonts/noto-kufi-arabic-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Noto Kufi Arabic';
  src: url('/assets/fonts/noto-kufi-arabic-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Noto Naskh Arabic';
  src: url('/assets/fonts/noto-naskh-arabic-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Noto Naskh Arabic';
  src: url('/assets/fonts/noto-naskh-arabic-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

html[dir="rtl"] body {
  font-family: 'Noto Naskh Arabic', 'Source Serif 4', serif;
  text-align: start;
}
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] h4, html[dir="rtl"] .brand-wordmark,
html[dir="rtl"] .site-nav, html[dir="rtl"] .footer-col-title,
html[dir="rtl"] .lead-h1, html[dir="rtl"] .lead-headline {
  font-family: 'Noto Kufi Arabic', 'Playfair Display', sans-serif;
}
/* Arabic script must never be letter-spaced (breaks joining). */
html[dir="rtl"] *, html[dir="rtl"] *::before, html[dir="rtl"] *::after {
  letter-spacing: normal !important;
}
html[dir="rtl"] p, html[dir="rtl"] li, html[dir="rtl"] td,
html[dir="rtl"] .dek, html[dir="rtl"] .lead-standfirst {
  line-height: 1.9;
}
/* Bidi discipline for Latin runs inside Arabic text. */
html[dir="rtl"] .brand-wordmark, html[dir="rtl"] .lang-switch a,
html[dir="rtl"] bdi { unicode-bidi: isolate; }
/* Tables: header alignment follows reading direction. */
html[dir="rtl"] th { text-align: start; }
html[dir="rtl"] .wcmp-neigh .s, html[dir="rtl"] .data-table td:last-child {
  text-align: end;
}
/* Chips, cards, flex rows mirror via flexbox automatically under dir=rtl;
   physical offsets used by the shared sheets get logical equivalents: */
html[dir="rtl"] .footer-slogan { border-inline-start: 3px solid var(--gold, #b8860b); padding-inline-start: .8rem; }
html[dir="rtl"] details > summary { padding-inline-start: .2rem; }
/* Search/theme icons stay at the reading-end edge (header-actions is flex). */
html[dir="rtl"] .site-header-inner { direction: rtl; }
/* Numeric data keeps Latin digits on a Latin baseline. */
html[dir="rtl"] .rlc-score, html[dir="rtl"] .rlc-rank,
html[dir="rtl"] .wcmp-stat .v, html[dir="rtl"] td {
  font-variant-numeric: tabular-nums;
}
