/* Right-to-left pages (ar site wave, 20 Nov 2026). Linked ONLY by pages whose <html> has dir="rtl" (scripts/build-i18n.mjs,
   lang-config rtl: true), last in <head>, so nothing here can change any other language's page. Every rule is scoped to
   [dir="rtl"] as well, in case the file is ever linked by mistake.

   Why a separate file instead of converting site.css, lp-2026.css and the pages' inline styles to logical properties: the
   shared stylesheets and every English page would have changed in the same commit, and a logical-property bug would have
   shown on all ten languages at once. Here a mistake can only reach the Arabic pages. Each rule below mirrors one physical
   rule elsewhere; the source is named so the pair can be kept in step.

   What is deliberately NOT mirrored (research section 4): the logo, product screenshots and the screen-recording video (they
   are real, left-to-right UI), the drawn desktop in the hero (a picture of a macOS/Windows screen; the cursor animation is
   positioned in physical coordinates by lp-hero-motion.js), play icons, code, keyboard shortcuts and URLs. */

/* ── type ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
   Geist (Google Fonts, already on every page) has no Arabic, so name system Arabic faces right after it: SF Arabic and Geeza
   Pro (Mac, iPhone), Segoe UI and Tahoma (Windows), Noto Sans Arabic (Android, Linux). No new font host: a webfont such as
   IBM Plex Sans Arabic was considered and rejected for now (another request on every page, see .docs/ar-wave-2026-11-20.md).
   Arabic needs more line height than Latin, never letter-spacing (it breaks the joins between letters) and no uppercase. */
html[dir="rtl"] {
  --sans: Geist, Inter, "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, "Noto Sans Arabic", -apple-system, BlinkMacSystemFont, sans-serif;
  /* The mono face (eyebrows, pills, the feedback label, system requirements) has no Arabic either; without this the browser
     picked a Naskh fallback that looked like a different site (seen in the first desktop screenshot, 20 Nov). */
  --mono: "Geist Mono", ui-monospace, Menlo, "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, "Noto Sans Arabic", monospace;
}
html[dir="rtl"] body { line-height: 1.75; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { line-height: 1.45; }
[dir="rtl"] body *:not(.gdm *):not(.gd-win *) { letter-spacing: 0 !important; }
[dir="rtl"] p, [dir="rtl"] li, [dir="rtl"] dd, [dir="rtl"] td, [dir="rtl"] blockquote, [dir="rtl"] figcaption { line-height: 1.8; }
[dir="rtl"] em, [dir="rtl"] i:not(.gdm *) { font-style: normal; }   /* no fake italics in Arabic */

/* Left-to-right islands: code, shortcuts, URLs, file names keep their own order inside Arabic text. */
[dir="rtl"] code, [dir="rtl"] kbd, [dir="rtl"] pre, [dir="rtl"] samp { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] bdi { unicode-bidi: isolate; }
[dir="rtl"] input[type="url"], [dir="rtl"] input[type="email"] { direction: ltr; }

/* ── site.css ─────────────────────────────────────────────────────────────────────────────────────────────────────── */
[dir="rtl"] .nav-right { margin-left: 0; margin-right: auto; }
[dir="rtl"] .post-card { transition: padding-right .15s ease; }
[dir="rtl"] .post-card:hover { padding-left: 0; padding-right: 6px; }
/* Direction arrows point the way Arabic reads: "back to all posts" points right. Brand and download icons are not arrows. */
[dir="rtl"] .read-more svg, [dir="rtl"] .backlink svg { transform: scaleX(-1); }
[dir="rtl"] .post-card:hover .read-more svg { transform: scaleX(-1) translateX(3px); }
[dir="rtl"] article ul, [dir="rtl"] article ol { padding-left: 0; padding-right: 22px; }
[dir="rtl"] article li { padding-left: 0; padding-right: 4px; }
[dir="rtl"] article th { text-align: right; }
[dir="rtl"] .faq-q { text-align: right; }
[dir="rtl"] .faq-icon { margin-left: 0; margin-right: auto; }
[dir="rtl"] .faq-a-inner ol, [dir="rtl"] .faq-a-inner ul { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .faq-a-inner li { padding-left: 0; padding-right: 3px; }
[dir="rtl"] .lp-prose ul { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .lp-cmp th:first-child, [dir="rtl"] .lp-cmp td:first-child { text-align: right; }
[dir="rtl"] .lp-note ul { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .lp-note li { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .lp-note li::before { left: auto; right: 0; }

/* The workplace policy note above article CTAs (site.css .policy-note: padding-left + border-left) */
[dir="rtl"] .policy-note { padding-left: 0; padding-right: 14px; border-left: 0; border-right: 2px solid var(--border-strong); }

/* ── lp-2026.css ──────────────────────────────────────────────────────────────────────────────────────────────────── */
[dir="rtl"] .v-list li { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .v-list li::before { left: auto; right: 0; }
[dir="rtl"] .v-band .dl-group, [dir="rtl"] .v-band .lp-ctas { text-align: right; }
[dir="rtl"] .v-card h3 .v-tag { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .v-table th, [dir="rtl"] .v-table td { text-align: right; }
[dir="rtl"] .v-prose ul { padding-left: 0; padding-right: 22px; }

/* ── inline <style> blocks of the keep-awake / Teams / mouse-mover / Windows pages ────────────────────────────────── */
[dir="rtl"] .sch-beta-pill { margin-left: 0; margin-right: 10px; }

/* ── the drawn desktop in the hero (lp-hero-motion.css / .js): a picture of a left-to-right screen, kept as drawn ──── */
[dir="rtl"] .gdm, [dir="rtl"] .gd-win { direction: ltr; }
[dir="rtl"] .gdm-bar { direction: rtl; }   /* the compact bar's own labels are Arabic: lay them out right to left */

/* ── blog-upsell.css / blog-upsell.js: the picked comparison row's green edge, and the corner card in the other margin ── */
[dir="rtl"] article table tr.gd-pick td:first-child { box-shadow: inset -3px 0 0 var(--green); }
[dir="rtl"] .gd-dc-x { right: auto; left: 8px; }
@media (min-width: 1280px) {
  [dir="rtl"] .gd-dc { right: auto; left: 24px; }
  [dir="rtl"] .gd-dc-head { padding-right: 0; padding-left: 30px; }
}
@media (max-width: 1279.98px) {
  [dir="rtl"] .gd-dc { padding: 8px 20px 8px 52px; }
  [dir="rtl"] .gd-dc-x { left: 10px; }
}

/* ── status-copy.js: the copy button sits at the end of each status line, which is the left in Arabic ───────────── */
[dir="rtl"] .status-list li.gd-sc-r { padding-right: 13px; padding-left: 30px; }
[dir="rtl"] .gd-sc-btn { right: auto; left: 0; }
[dir="rtl"] .gd-sc-over .gd-sc-btn { padding-left: 0; padding-right: 6px; border-radius: 8px 0 0 8px;
  background: linear-gradient(to left, transparent, var(--surface-alt, #f5f3ee) 10px); }
[dir="rtl"] .gd-sc-btn::after { right: auto; left: 0; }
[dir="rtl"] .gd-io .gd-io-dot { margin-right: 0; margin-left: 7px; }
[dir="rtl"] .gd-io a, [dir="rtl"] .gd-io button { margin-left: 0; margin-right: 2px; }

/* ── feedback-feed.css: the ticker drifts the way Arabic reads (to the right) and fades at its far (left) end ──────── */
[dir="rtl"] .fb-set { padding: 0 0 0 10px; }
[dir="rtl"] .fb-live .fb-viewport {
  -webkit-mask-image: linear-gradient(270deg, #000 0, #000 88%, transparent 100%);
          mask-image: linear-gradient(270deg, #000 0, #000 88%, transparent 100%);
}
[dir="rtl"] .fb-live .fb-rail { animation-name: fb-drift-rtl; }
@keyframes fb-drift-rtl { from { transform: translateX(0); } to { transform: translateX(50%); } }
