/* rtl.css — GENERATED by scripts/build_rtl.py. Do not edit by hand.
   Mirrors every direction-sensitive rule the site ships, scoped to
   [dir="rtl"] so only Arabic is affected. Re-run the script after
   changing any stylesheet. */

/* from styles.css */
[dir="rtl"] .nav-lang-select{margin-right:4px;margin-left:0}
[dir="rtl"] .undo-banner{right:50%;left:auto;transform:translateX(50%)}
[dir="rtl"] .compare-note-match{border-right:3px solid #4ade80;border-left:0}
[dir="rtl"] .compare-note-diff{border-right:3px solid #fb923c;border-left:0}
[dir="rtl"] .compare-note-only{border-right:3px solid #60a5fa;border-left:0}
[dir="rtl"] .theme-toggle-knob{right:2px;left:auto}
[dir="rtl"] .theme-toggle.light-on .theme-toggle-knob{transform:translateX(-16px)}
[dir="rtl"] #forum-view .reply-card{border-right:3px solid var(--border2);border-left:0;border-radius:8px 0 0 8px}
[dir="rtl"] #forum-view .reply-card.op-reply{border-right-color:var(--accent);border-left-color:transparent}
[dir="rtl"] #forum-view .char-count{text-align:left}
[dir="rtl"] #forum-view .toast{right:50%;left:auto;transform:translateX(50%)}
[dir="rtl"] div[class*="bg-stone-800/80"][class*="rounded-xl"]{border-right:3px solid rgba(234,88,12,0.7) !important;border-left:1px solid rgba(13,37,80,0.6) !important;border-radius:8px 0 0 8px !important}
[dir="rtl"] div[class*="bg-stone-800/80"] > div[class*="justify-between"]{padding-left:1.75rem !important;padding-right:0 !important}
[dir="rtl"] div[class*="bg-stone-800/80"] > div[class*="justify-between"] > div[class*="shrink-0"]{flex-direction:row-reverse !important}
[dir="rtl"] .fn-peek-btn{margin-right:var(--sp-1);margin-left:0}
[dir="rtl"] .smt-peek-label{text-align:right}
[dir="rtl"] .nav-unread-dot{left:4px;right:auto}
[dir="rtl"] .feat-new-dot{margin-right:var(--sp-1);margin-left:0}
[dir="rtl"] .feat-tip-list li{padding-right:10px;padding-left:0}
[dir="rtl"] .feat-tip-list li::before{right:0;left:auto}
[dir="rtl"] div[class*="border-t-4"][class*="border-t-blue-500"]{border-right:3px solid var(--color-blue) !important;border-left:0 !important;border-radius:var(--radius-lg) 0 0 var(--radius-lg) !important}
[dir="rtl"] div[class*="border-t-4"][class*="border-t-pink-500"]{border-right:3px solid #ec4899 !important;border-left:0 !important;border-radius:var(--radius-lg) 0 0 var(--radius-lg) !important}
[dir="rtl"] div[class*="border-t-4"][class*="border-t-amber-500"]{border-right:3px solid #f59e0b !important;border-left:0 !important;border-radius:var(--radius-lg) 0 0 var(--radius-lg) !important}
[dir="rtl"] div[class*="border-t-4"][class*="border-t-emerald-600"]{border-right:3px solid var(--color-green) !important;border-left:0 !important;border-radius:var(--radius-lg) 0 0 var(--radius-lg) !important}
[dir="rtl"] div[class*="bg-stone-800/80"][class*="rounded-xl"]{border-right:3px solid rgba(234,88,12,.5) !important;border-left:1px solid var(--color-border) !important;border-radius:var(--radius-sm) 0 0 var(--radius-sm) !important}
[dir="rtl"] #landing-howto-btn::after{right:-150%;left:auto}
[dir="rtl"] .site-nav-wrapped::after{right:-80%;left:auto}
[dir="rtl"] .nav-btn-wrapped::after{right:-80%;left:auto}
[dir="rtl"] .jw-demo-loading::after{margin-right:8px;margin-left:0}
[dir="rtl"] #jw-demo-banner{right:50%;left:auto;transform:translateX(50%)}
[dir="rtl"] .jw-demo-toast{right:50%;left:auto;transform:translateX(50%)}
[dir="rtl"] .jwc-close, [dir="rtl"] .jwrg-close{left:12px;right:auto}
[dir="rtl"] .jwc-donate a::before{right:-120%;left:auto}
[dir="rtl"] .jwc-donate a strong{margin-left:2px;margin-right:0}
[dir="rtl"] .jwrg-steps{padding-right:20px;padding-left:0;padding:16px 20px 16px 14px}
[dir="rtl"] .jwrg-actions{text-align:left}
[dir="rtl"] .jwc-stat-ring{right:50%;left:auto;transform:translate(50%, -50%)}
[dir="rtl"] .jwc-stat-ring::before{border-left-color:rgba(52,211,153,.3);border-right-color:transparent}
[dir="rtl"] .jwc-stat-check{right:50%;left:auto;margin-right:-10px;margin-left:0}
[dir="rtl"] .landing-steps li{padding:16px 56px 16px 18px}
[dir="rtl"] .landing-steps li::before{right:16px;left:auto}
@media (max-width: 560px){[dir="rtl"] .nav-theme-btn{margin-right:auto;margin-left:0}}
@media (max-width: 600px){[dir="rtl"] .nav-theme-btn{margin-right:auto;margin-left:0}}
@media (max-width: 600px){[dir="rtl"] .site-nav-links{margin-right:0}}
[dir="rtl"] .svc-card{text-align:right}
[dir="rtl"] .svc-card-new{left:12px;right:auto}
[dir="rtl"] .svc-card::after{right:-60%;left:auto}
[dir="rtl"] .landing-hero::before{right:50%;left:auto;transform:translateX(50%)}
[dir="rtl"] .landing-section-title::after{right:50%;left:auto;transform:translateX(50%)}
[dir="rtl"] html.jw-beta .privacy-pill{margin-right:auto;margin-left:0}

/* from tailwind.css */
[dir="rtl"] .left-1\/2{right:50%;left:auto}
[dir="rtl"] .left-3{right:.75rem;left:auto}
[dir="rtl"] .right-2{left:.5rem;right:auto}
[dir="rtl"] .right-3{left:.75rem;right:auto}
[dir="rtl"] .ml-1{margin-right:.25rem;margin-left:0}
[dir="rtl"] .ml-2{margin-right:.5rem;margin-left:0}
[dir="rtl"] .ml-auto{margin-right:auto;margin-left:0}
[dir="rtl"] .border-l{border-right-width:1px;border-left-width:0}
[dir="rtl"] .border-l-4{border-right-width:4px;border-left-width:0}
[dir="rtl"] .border-r{border-left-width:1px;border-right-width:0}
[dir="rtl"] .pl-1{padding-right:.25rem;padding-left:0}
[dir="rtl"] .pl-9{padding-right:2.25rem;padding-left:0}
[dir="rtl"] .pr-2{padding-left:.5rem;padding-right:0}
[dir="rtl"] .pr-4{padding-left:1rem;padding-right:0}
[dir="rtl"] .pr-6{padding-left:1.5rem;padding-right:0}
[dir="rtl"] .pr-9{padding-left:2.25rem;padding-right:0}
[dir="rtl"] .text-left{text-align:right}
@media (min-width:640px){[dir="rtl"] .sm\:flex-row{flex-direction:row-reverse}}

/* from index.html <style> #2 */
[dir="rtl"] #forum-view .pill svg{margin-left:4px;margin-right:0}

/* from index.html <style> #4 */
@media (min-width:880px){[dir="rtl"] .landing-hero-split{flex-direction:row-reverse;text-align:right}}
[dir="rtl"] .landing-hero-split::before{right:50%;left:auto;transform:translateX(50%)}
@media (min-width:880px){[dir="rtl"] .lhv-copy h1::after{margin-right:0;margin-left:auto}}

/* from index.html <style> #8 */
[dir="rtl"] #fn-popup{right:50%;left:auto;transform:translate(50%, -50%)}
[dir="rtl"] .fn-peek-btn{margin-right:4px;margin-left:0}
[dir="rtl"] .mode-seg-ctrl{margin-left:6px;margin-right:0}
[dir="rtl"] .mode-seg-ctrl::after{left:-10px;right:auto}
[dir="rtl"] .feat-tip-list{padding-right:14px;padding-left:0}

/* from index.html <style> #9 */
[dir="rtl"] .jb-head-count{margin-right:8px;margin-left:0}
[dir="rtl"] .jb-head-close{margin-right:auto;margin-left:0}
[dir="rtl"] .jb-note.jb-selectable{padding-right:42px;padding-left:0}
[dir="rtl"] .jb-check{right:13px;left:auto}
[dir="rtl"] .jb-check.jb-check-on::after{right:4px;left:auto}
[dir="rtl"] .jb-list{border-left:1px solid #1f2a3d;border-right:0}
[dir="rtl"] .jb-note.active{border-right:3px solid #ea580c;border-left:0;padding-right:15px;padding-left:0}
[dir="rtl"] .jb-hl-swatch{margin-left:4px;margin-right:0}
[dir="rtl"] .jb-edit-rte ul, [dir="rtl"] .jb-edit-rte ol{padding-right:22px;padding-left:0}
[dir="rtl"] .jb-tag-rm{padding:3px 9px 3px 4px}
[dir="rtl"] .jb-dirty-badge{margin-right:4px;margin-left:0}
[dir="rtl"] .jb-ask-model-btn{text-align:right}
[dir="rtl"] .jb-ask-score{margin-right:auto;margin-left:0}

/* from index.html <style> #10 */
[dir="rtl"] .jcr-close{left:14px;right:auto}
[dir="rtl"] .jcr-suggestion-badge{margin-right:6px;margin-left:0}
[dir="rtl"] .jcr-btn-suggest{margin-left:auto;margin-right:0}

/* from index.html <style> #12 */
[dir="rtl"] .jsh-fab{left:18px;right:auto}
[dir="rtl"] .jsh-reminder{right:50%;left:auto;transform:translateX(50%)}

/* from index.html <style> #14 */
[dir="rtl"] .jwr-toast{right:50%;left:auto;transform:translateX(50%)}
[dir="rtl"] .jwr-mb{text-align:right}
[dir="rtl"] .jwr-x{left:13px;right:auto}

/* from index.html <style> #15 */
[dir="rtl"] .jw-wiz-card{text-align:right}
[dir="rtl"] .jw-wiz-x{left:14px;right:auto}

/* from index.html <style> #16 */
[dir="rtl"] .jbd-cta{text-align:right}
[dir="rtl"] .jbd-cta:hover .jbd-cta-arrow{transform:translateX(-3px)}
[dir="rtl"] .jbd-x{left:12px;right:auto}

/* from index.html <style> #17 */
[dir="rtl"] [data-jwtool] > :first-child{padding-left:44px !important;padding-right:0 !important}
[dir="rtl"] [data-jwtool] > :first-child::after{left:18px;right:auto;border-left:2px solid rgba(148,163,184,.75);border-right:0}

/* from highlights.html <style> #1 */
[dir="rtl"] .jww-delta-up{margin-right:7px;margin-left:0}
[dir="rtl"] .jww-delta-dn{margin-right:7px;margin-left:0}
[dir="rtl"] .jww-delta-eq{margin-right:7px;margin-left:0}
[dir="rtl"] .jww-hbar-val{margin-right:10px;margin-left:0}
[dir="rtl"] .jww-tag{padding:7px 14px 7px 8px}
[dir="rtl"] .jww-color-pct{text-align:left}
[dir="rtl"] .jww-otnt-legend i{margin-left:5px;margin-right:0}
[dir="rtl"] .jww-ring-legend i{margin-left:7px;margin-right:0}
@media (max-width:520px){[dir="rtl"] .jww-ring-legend{flex-direction:row-reverse}}
[dir="rtl"] .jww-medal-disc{box-shadow:inset 3px -4px 8px rgba(0,0,0,.55), inset -3px 4px 8px rgba(255,255,255,.05)}
[dir="rtl"] .jww-medal-on .jww-medal-disc{box-shadow:inset 3px -4px 8px rgba(124,45,18,.4), inset -3px 4px 9px rgba(255,255,255,.7), 0 7px 16px -6px rgba(217,119,6,.7), 0 0 18px -4px rgba(251,191,36,.6)}
[dir="rtl"] .jww-ap{left:-5px;right:auto}
[dir="rtl"] .jww-mp-close{left:14px;right:auto}
[dir="rtl"] .jww-story{padding-right:2px;padding-left:0}
[dir="rtl"] .jww-st-item{padding:0 46px 22px 0}
[dir="rtl"] .jww-st-item::before{right:15px;left:auto}
[dir="rtl"] .jww-st-dot{right:6px;left:auto}
[dir="rtl"] .jww-x{left:14px;right:auto}
[dir="rtl"] .jww-cel-block{text-align:right}
[dir="rtl"] .jww-rung-name em{margin-right:6px;margin-left:0}
[dir="rtl"] .jww-map-strength{margin-right:auto;margin-left:0}
[dir="rtl"] .jww-mapcta-btn{margin-right:auto;margin-left:0}
[dir="rtl"] .jww-medal-on .jww-medal-disc::after{right:8px;left:auto}

/* from share.html <style> #1 */
[dir="rtl"] .sh-card{text-align:right}
[dir="rtl"] .sh-item.sel .sh-check::after{right:4px;left:auto}

/* from forum.html <style> #1 */
[dir="rtl"] .char-count{text-align:left}
[dir="rtl"] .toast{right:50%;left:auto;transform:translateX(50%)}

/* ── Hand-written rules the mirror cannot derive ───────────────────────── */

/* Arabic needs a font stack that actually has Arabic glyphs; the site's
   -apple-system/Segoe/Roboto stack falls back inconsistently across
   platforms and renders Arabic at a noticeably smaller optical size. */
[dir="rtl"], [dir="rtl"] body {
  font-family: "Noto Naskh Arabic", "Geeza Pro", "Segoe UI", Tahoma,
               "Arabic Typesetting", -apple-system, BlinkMacSystemFont, sans-serif;
}
/* Naskh faces sit smaller on the em than Latin faces at the same size. */
[dir="rtl"] body { font-size: 1.05em; line-height: 1.85; }

/* Latin runs (file names, .jwlibrary, JW Sync, URLs, version numbers) must not
   have their punctuation dragged to the wrong end by the bidi algorithm. */
[dir="rtl"] code, [dir="rtl"] kbd, [dir="rtl"] samp, [dir="rtl"] pre,
[dir="rtl"] input[type="file"], [dir="rtl"] .file-name, [dir="rtl"] .jb-meta-pub {
  unicode-bidi: isolate;
}

/* Numeric readouts (stat counters, percentages, dates) stay LTR internally. */
[dir="rtl"] .stat-value, [dir="rtl"] .jb-tab-count, [dir="rtl"] .jb-head-count,
[dir="rtl"] .num, [dir="rtl"] time {
  unicode-bidi: isolate;
  direction: ltr;
  display: inline-block;
}

/* Form controls and progress bars fill from the right. */
[dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] select { text-align: right; }
[dir="rtl"] input[type="date"], [dir="rtl"] input[type="number"] {
  direction: ltr;
  text-align: right;
}

/* Native scrollbars and overflow containers. */
[dir="rtl"] .jb-list, [dir="rtl"] .jb-detail { direction: rtl; }

/* User-written content takes its direction from its own first strong
   character, not from the UI language. Without this, an English note read in
   the Arabic UI has its full stop dragged to the left-hand edge
   (".This is my note") because trailing punctuation is bidi-neutral. Arabic
   notes in the same list still render RTL — `plaintext` decides per
   paragraph, which is exactly the mixed-language case this app creates. */
[dir="rtl"] .jb-note-title, [dir="rtl"] .jb-note-excerpt,
[dir="rtl"] .jb-detail-title, [dir="rtl"] .jb-detail-content,
[dir="rtl"] .jb-detail-hl-block, [dir="rtl"] .jb-edit-input,
[dir="rtl"] .jb-edit-textarea, [dir="rtl"] .jb-edit-rte,
[dir="rtl"] .jb-tag, [dir="rtl"] .jb-pub, [dir="rtl"] .jb-detail-pub,
[dir="rtl"] .jb-if-tag, [dir="rtl"] .jb-bm-slot,
[dir="rtl"] .sh-item-title, [dir="rtl"] .sh-item-ex, [dir="rtl"] .sh-item-body,
[dir="rtl"] .sh-ntitle, [dir="rtl"] .sh-nex, [dir="rtl"] .sh-nbody,
[dir="rtl"] .sh-pill-pub, [dir="rtl"] .sh-taglabel {
  unicode-bidi: plaintext;
}

/* The step counter badge in the guides is absolutely positioned at left:0. */
[dir="rtl"] ol.steps li { padding: 0 52px 20px 0; }
[dir="rtl"] ol.steps li::before { left: auto; right: 0; }

/* Breadcrumb separators point the other way. */
[dir="rtl"] .crumbs { direction: rtl; }

/* Language picker keeps its flag emoji on the leading edge. */
[dir="rtl"] .nav-lang-select { background-position: left 8px center; padding: 6px 10px 6px 28px; }
