/* Right-to-left languages (dir "rtl" in content/i18n/locales.json; Arabic first). Linked after
   hunch.css only on those pages, and inlined after soon.css in their pre-launch home, so the
   left-to-right pages stay as they are. Flex and grid mirror by themselves; these are the few
   rules with a side in them, and the type: Arabic is joined, so no letter spacing, and it needs
   more room between lines than the tight Latin headings. */

/* the side-bound rules of hunch.css */
[dir="rtl"] .skip { left: auto; right: -9999px; }
[dir="rtl"] .skip:focus { right: var(--gutter); }
[dir="rtl"] .doc ul, [dir="rtl"] .doc ol { padding-left: 0; padding-right: 1.2em; }
[dir="rtl"] .doc blockquote { padding: 4px 24px 4px 0; border-left: 0; border-right: 2px solid var(--season); }
[dir="rtl"] th { text-align: right; padding: 8px 0 8px 16px; }
[dir="rtl"] td { padding: 10px 0 10px 16px; }
[dir="rtl"] .next-prev .next { text-align: left; }
[dir="rtl"] .rows li span:last-child { text-align: left; }

/* the full screen viewer: previous on the right, next on the left, arrows pointing that way,
   the close button in the top left corner (the swipe and the arrow keys turn round in the script) */
[dir="rtl"] .viewer-close { right: auto; left: 16px; }
[dir="rtl"] .viewer-prev { left: auto; right: 16px; }
[dir="rtl"] .viewer-next { right: auto; left: 16px; }
[dir="rtl"] .viewer-prev svg, [dir="rtl"] .viewer-next svg { transform: scaleX(-1); }
@media (max-width: 719px) { [dir="rtl"] .viewer-prev { left: auto; right: 16px; } [dir="rtl"] .viewer-next { right: auto; left: 16px; } }
[dir="rtl"] .dl { text-align: right; }

/* Arabic type: the Lore face has no Arabic, so Latin words (Hunch, Lore, Zen) keep it and the
   Arabic letters take the system's Arabic face (SF Arabic on Apple devices, then the usual ones). */
:root:lang(ar) {
  --calm: "Helvetica Neue", Helvetica, system-ui, "Geeza Pro", "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  --lore: "HunchLore", "Helvetica Neue", system-ui, "Geeza Pro", "Noto Kufi Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}
:lang(ar) body { font-family: var(--calm, "Helvetica Neue", Helvetica, system-ui, "Geeza Pro", "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif); }
:lang(ar) * { letter-spacing: 0 !important; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(ar) .stage-line, :lang(ar) .up-name, :lang(ar) .shot figcaption { line-height: 1.35; }
:lang(ar) .reel h2, :lang(ar) .saver h2, :lang(ar) .ups h2, :lang(ar) .worlds-wrap h2, :lang(ar) .hush-lines { line-height: 1.3; }
:lang(ar) .stage-title { line-height: 1; }
:lang(ar) body { line-height: 1.8; }
