/* RAKAN INTELLIGENCE · Arabic page (ar.html) only. Loaded after styles / scenes / demo / flow.
   Arabic font, no letter-spacing on Arabic text (it breaks the joined letters), flipped sides where the layout was written for left-to-right,
   and every address / number / code kept left-to-right. */

html[dir="rtl"] {
  --ar: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, system-ui, sans-serif;
  /* Latin words keep the site's fonts, Arabic letters fall through to IBM Plex Sans Arabic */
  --display: "Space Grotesk", "IBM Plex Sans Arabic", "Sora", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Sans Arabic", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
html[dir="rtl"] body { line-height: 1.75; }
html[dir="rtl"] body *:not(.brand):not(.brand *) { letter-spacing: normal; }
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3 { line-height: 1.35; }
html[dir="rtl"] .eyebrow, html[dir="rtl"] .vd-rank, html[dir="rtl"] .feat-label span, html[dir="rtl"] .cmp thead th:first-child { text-transform: none; }
html[dir="rtl"] .eyebrow { font-family: var(--ar); font-size: .86rem; font-weight: 600; }
html[dir="rtl"] .feat-label span { font-family: var(--ar); }
html[dir="rtl"] .h3-lead, html[dir="rtl"] .sec-head p, html[dir="rtl"] .feat p, html[dir="rtl"] .svc p, html[dir="rtl"] .faq p { font-family: var(--ar); }

/* left-to-right islands: addresses, code, numbers, the brand, English labels */
html[dir="rtl"] code, html[dir="rtl"] .hv-ca, html[dir="rtl"] .hv-sym, html[dir="rtl"] .hv-score, html[dir="rtl"] .hv-time,
html[dir="rtl"] .vd-ticks b, html[dir="rtl"] .amt b, html[dir="rtl"] .ms, html[dir="rtl"] bdi, html[dir="rtl"] .en {
  direction: ltr; unicode-bidi: isolate;
}
html[dir="rtl"] .brand { direction: ltr; }

/* header */
html[dir="rtl"] nav.links .x-btn { margin-left: 0; margin-right: 4px; }
html[dir="rtl"] nav.links a.opt::after { transform-origin: right; }
html[dir="rtl"] nav.links a.opt { font-family: var(--ar); font-size: .95rem; }
html[dir="rtl"] nav.links a.lang-sw { font-family: "Inter", system-ui, sans-serif; }

/* hero: the scan card keeps its own left-to-right reading (coin · network, gauge · checks), its words are Arabic */
html[dir="rtl"] .hv { text-align: right; }
html[dir="rtl"] .hv-card { direction: rtl; }
html[dir="rtl"] .hv-checks li span, html[dir="rtl"] .hv-checks li em, html[dir="rtl"] .hv-tg-t { font-family: var(--ar); font-style: normal; }
@media (max-width: 900px) {
  html[dir="rtl"] .hv-tg { margin: 10px 10px 0 0; }
}

/* services */
html[dir="rtl"] .new-dot, html[dir="rtl"] .bento4 .live-dot { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .feat-btn { align-self: flex-start; }
html[dir="rtl"] .xr3-find li { padding-left: 0; padding-right: 18px; }
html[dir="rtl"] .xr3-find li::before { left: auto; right: 0; }
html[dir="rtl"] .ev em { font-style: normal; }

/* verdict scale: best on the right, the same order as the cards */
html[dir="rtl"] .vd-bar { background: linear-gradient(270deg, #34d399 0%, #34d399 13%, #ffb547 17%, #ffb547 46%, #ff5a6a 52%, #ff5a6a 100%); }
html[dir="rtl"] .vd-pin { left: auto; right: 7%; margin: -10px -10px 0 0; animation-name: vdPinR; }
@keyframes vdPinR { 0%, 12% { right: 7%; } 33%, 45% { right: 31%; } 66%, 78% { right: 76%; } 100% { right: 7%; } }
html[dir="rtl"] .vd-ticks b { transform: translateX(50%); }
html[dir="rtl"] .vd-ticks b:nth-child(1) { left: auto; right: 0; transform: none; }
html[dir="rtl"] .vd-ticks b:nth-child(2) { left: auto; right: 15%; }
html[dir="rtl"] .vd-ticks b:nth-child(3) { left: auto; right: 50%; }
html[dir="rtl"] .vd-ticks b:nth-child(4) { left: 0; right: auto; transform: none; }
.vd-gloss { font: 600 .9rem/1.3 var(--ar); color: rgba(var(--c), 0.95); margin-top: -2px; }
@media (max-width: 680px) {
  html[dir="rtl"] .vdx { grid-template-areas: "b h" "b g" "b r" "b p"; }
  html[dir="rtl"] .vdx .vd-gloss { grid-area: g; margin-top: 0; font-size: .8rem; }
}

/* pricing */
html[dir="rtl"] .price-tag { left: auto; right: 24px; font-family: var(--ar); font-size: .74rem; }
html[dir="rtl"] .price li { padding-left: 0; padding-right: 24px; }
html[dir="rtl"] .price li::before { left: auto; right: 0; }
html[dir="rtl"] .grp-strip { background: linear-gradient(260deg, rgba(34, 195, 255, 0.1), rgba(10, 132, 255, 0.04)); }
html[dir="rtl"] .grp-strip.period-strip { background: linear-gradient(260deg, rgba(45, 212, 191, 0.1), rgba(10, 132, 255, 0.04)); }
html[dir="rtl"] .grp-strip.invite-strip { background: linear-gradient(260deg, rgba(245, 184, 75, 0.1), rgba(10, 132, 255, 0.04)); }
html[dir="rtl"] .cmp thead th:first-child, html[dir="rtl"] .cmp tbody th { text-align: right; }
html[dir="rtl"] .cmp thead th:first-child { font-family: var(--ar); font-size: .8rem; }
html[dir="rtl"] .cmp tbody th small { font-family: var(--ar); font-size: .74rem; }
html[dir="rtl"] .cmp-wrap { -webkit-overflow-scrolling: touch; }
html[dir="rtl"] .price-pay { font-family: var(--ar); }

/* FAQ: the +/− sign sits on the left */
html[dir="rtl"] summary { text-align: right; }

/* the Telegram phone stays a left-to-right screen (the bot answers in English); the paste chips are Arabic */
html[dir="rtl"] .ld-chips button { font-family: var(--ar); }
html[dir="rtl"] .ld-field { text-align: left; }
html[dir="rtl"] .ld-copy, html[dir="rtl"] .ld-note { text-align: right; }

/* footer */
html[dir="rtl"] .foot-col a, html[dir="rtl"] .foot-tag, html[dir="rtl"] .foot-safe { font-family: var(--ar); }
html[dir="rtl"] .en, html[dir="rtl"] bdi:not([dir]) { white-space: nowrap; }
