/* RTL + Farsi typography layer for /fa/ articles.
   Loaded after article.min.css, which is LTR and Latin-only. Only three rules
   in that file are direction-sensitive (all in the table of contents), so this
   stays deliberately small rather than restating the whole stylesheet. */

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/fonts/vazirmatn-arabic.woff2?v=1") format('woff2');
}

body {
  font-family: 'Vazirmatn', 'Geeza Pro', 'Noto Naskh Arabic', var(--sans);
  /* Persian script sits taller than Latin and needs more air between lines,
     especially at body size on a phone. */
  line-height: 1.95;
}

/* Playfair has no Persian glyphs, so headings would silently fall back to a
   system serif and break the page's voice. Vazirmatn carries them instead. */
.abody h2, .abody h3, .ahead h1, .toc-h, .kicker {
  font-family: 'Vazirmatn', 'Geeza Pro', 'Noto Naskh Arabic', var(--sans);
  letter-spacing: 0;
}

/* The TOC rail flips sides. These are the only left/right rules in
   article.min.css that matter. */
.toc nav { border-left: 0; border-right: 1px solid var(--line); }
.toc a { padding-left: 0; padding-right: 22px; border-left: 0; border-right: 2px solid transparent; margin-left: 0; margin-right: -1px; }
.toc a.active { border-right-color: var(--gold); }

/* Arrows in Farsi copy point the other way; keep the glyph, flip the box. */
.backlink, .join { unicode-bidi: isolate; }

/* Latin brand names and app names inside Farsi sentences render as isolated
   LTR runs so surrounding punctuation doesn't jump to the wrong end. */
.ltr { unicode-bidi: isolate; direction: ltr; display: inline-block; }

/* Comparison tables read right-to-left; the first column is the row label. */
.cmp { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 0.95rem; }
.cmp th, .cmp td { border: 1px solid var(--line); padding: 10px 12px; text-align: right; vertical-align: top; }
.cmp th { font-weight: 700; }
.cmp-wrap { overflow-x: auto; }
