/* ------------------------------------------------------------------
   PaperX landing — right-to-left overrides.

   Loaded only by the Arabic page, after landing.css. Everything that is
   direction-agnostic already lives in landing.css; this file exists for the
   handful of places that hard-code a physical direction.

   Kept deliberately small. If a rule here grows, the right fix is usually to
   make the base rule logical (margin-inline, inset-inline) rather than to add
   another override.
   ------------------------------------------------------------------ */

:root {
  /* Arabic needs a face with proper Arabic coverage; Montserrat has none, so
     headings would silently fall back to a system font and lose the brand
     weight. Cairo carries both scripts at the weights the design uses. */
  --font-display: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  --font-sans: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
}

body { text-align: right; }

/* Nav: the CTA cluster sits at the logical end either way. */
.nav-cta { margin-left: 0; margin-right: auto; }
.nav-links { margin-left: 0; margin-right: 12px; }
.lang-menu { right: auto; left: 0; }

/* The hero glow is anchored to the top-left corner in LTR; mirror it. */
.hero::before { inset: -30% -10% auto 0; }

/* Tick lists and feature rows read from the right. */
.ticks li, .hero-note span, .cap, .ai-item { text-align: right; }

/* The "most chosen" badge rides the logical start edge of its card. */
.tier-badge { left: auto; right: 20px; }

/* The editor mock stays left-to-right in its entirety.
   It is a picture of a LaTeX project: the source pane, the file tree and the
   PDF are all LTR content, and mirroring them would show a product that does
   not exist. Only the labels are translated. Actual class names checked
   against landing.css rather than guessed — an earlier version of this rule
   targeted `.mock code`, which matches nothing here. */
.mock, .mock-bar, .mock-body { direction: ltr; }
.mock-file, .code { direction: ltr; text-align: left; unicode-bidi: isolate; }
/* Column labels read right-to-left again, since they are Arabic words. */
.mock-label { direction: rtl; text-align: right; }
/* The border between columns follows the mock's own LTR flow. */
.mock-col { border-right: 1px solid var(--px-border); border-left: 0; }
.mock-col:last-child { border-right: 0; }

/* Prices are Latin numerals in a Latin currency; isolating them stops the
   bidi algorithm from moving the $ to the wrong side. */
.tier-price .amt, .tier-price .per { unicode-bidi: isolate; }
