/* The static pages in other languages: no flash of English, the language switcher, right-to-left fixes for the parts
   that are positioned rather than flowed, and the script rules (no tracking or capitals where a script has none,
   taller lines for scripts with marks above and below, long words that wrap). Shared by home, about, terms and privacy;
   assets/i18n.js turns the language on by setting <html lang> and dir. */

/* A non-English visitor sees nothing until their words are in (i18n.js removes this after at most 1.2 s). */
html.i18n-wait body { visibility: hidden; }

/* ---------- The language switcher (footers) ---------- */
.lang-pick { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text2, #b4aabf); }
.lang-pick[hidden] { display: none; }
.lang-pick label { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-height: 44px; }
.lang-pick select {
  max-width: min(100%, 280px); min-height: 44px; padding-block: 8px; padding-inline: 14px; border-radius: 12px;
  border: 1px solid var(--line, #2b2338); background: var(--s1, #17121f); color: var(--text, #f3eef5);
  font: 500 14px/1.3 var(--body, system-ui, sans-serif); cursor: pointer; text-overflow: ellipsis;
}
.lang-pick select:hover { border-color: var(--magenta, #ff3e9d); }
.lang-pick select:focus-visible { outline: 2px solid var(--magenta, #ff3e9d); outline-offset: 3px; }
.lang-pick option { background: var(--s1, #17121f); color: var(--text, #f3eef5); }

/* ---------- Text that has to wrap instead of overflow, in any language ---------- */
h1, h2, h3, h4, .mega, .big, .lede, summary, .btn, .apk-btn, .code-chip, .get-label, .eyebrow, .step-n, .fine, .theme-cap,
.lang-pick label, .foot-nav a, .nav a, .toc a { overflow-wrap: anywhere; }
p, li, dd, summary { overflow-wrap: break-word; }
p, li, dd, .lede, .a { hyphens: auto; }
.btn, .apk-btn, .code-chip, .get-more a, .menu { min-width: 0; }
.btn, .code-chip { height: auto; }
.nav a, .foot-nav a, .get-more a { white-space: normal; }

/* A tracked-out, upper-case label is a Latin habit: scripts without case (and Turkish, Azeri and Lithuanian, whose
   capitals CSS gets wrong) read as they are written, with no added spacing. */
:root:lang(ja) *, :root:lang(zh) *, :root:lang(ko) *, :root:lang(ar) *, :root:lang(fa) *, :root:lang(ur) *, :root:lang(he) *, :root:lang(yi) *,
:root:lang(ps) *, :root:lang(sd) *, :root:lang(ug) *, :root:lang(ckb) *, :root:lang(dv) *, :root:lang(th) *, :root:lang(lo) *, :root:lang(km) *, :root:lang(my) *,
:root:lang(hi) *, :root:lang(mr) *, :root:lang(ne) *, :root:lang(bn) *, :root:lang(gu) *, :root:lang(pa) *, :root:lang(ta) *, :root:lang(te) *, :root:lang(kn) *,
:root:lang(ml) *, :root:lang(si) *, :root:lang(ka) *, :root:lang(hy) *, :root:lang(am) *,
:root:lang(tr) *, :root:lang(az) *, :root:lang(lt) * { text-transform: none !important; }
:root:lang(ja) *, :root:lang(zh) *, :root:lang(ko) *, :root:lang(ar) *, :root:lang(fa) *, :root:lang(ur) *, :root:lang(he) *, :root:lang(yi) *,
:root:lang(ps) *, :root:lang(sd) *, :root:lang(ug) *, :root:lang(ckb) *, :root:lang(dv) *, :root:lang(th) *, :root:lang(lo) *, :root:lang(km) *, :root:lang(my) *,
:root:lang(hi) *, :root:lang(mr) *, :root:lang(ne) *, :root:lang(bn) *, :root:lang(gu) *, :root:lang(pa) *, :root:lang(ta) *, :root:lang(te) *, :root:lang(kn) *,
:root:lang(ml) *, :root:lang(si) *, :root:lang(ka) *, :root:lang(hy) *, :root:lang(am) *,
:root:lang(ja) *::before, :root:lang(ar) *::before { letter-spacing: 0 !important; word-spacing: normal; }

/* Scripts with marks above and below the line, or tall glyphs, need more room than the tight display line heights
   the Latin headings use; the headline's masked lines would otherwise cut them off. */
:root:lang(ja) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(zh) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(ko) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary),
:root:lang(ar) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(fa) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(ur) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(he) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary),
:root:lang(th) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(hi) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(bn) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(ta) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary),
:root:lang(te) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(mr) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(ne) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(gu) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary),
:root:lang(pa) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(kn) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(ml) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(km) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary),
:root:lang(lo) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(my) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary), :root:lang(si) :is(h1, h2, h3, .mega, .big, dt, .step-n, summary) { line-height: 1.3 !important; }
:root:lang(th) body, :root:lang(hi) body, :root:lang(mr) body, :root:lang(ne) body, :root:lang(bn) body, :root:lang(ta) body, :root:lang(te) body, :root:lang(gu) body,
:root:lang(pa) body, :root:lang(kn) body, :root:lang(ml) body, :root:lang(km) body, :root:lang(lo) body, :root:lang(my) body, :root:lang(si) body { line-height: 1.8; }
:root:lang(ar) body, :root:lang(fa) body, :root:lang(ur) body, :root:lang(ps) body, :root:lang(ku) body, :root:lang(ckb) body, :root:lang(he) body, :root:lang(ja) body, :root:lang(zh) body, :root:lang(ko) body { line-height: 1.75; }
/* The big masked headline lines (the hero) clip anything past their box, so give them the room. */
:root:lang(ja) .mega .line, :root:lang(zh) .mega .line, :root:lang(ko) .mega .line, :root:lang(ar) .mega .line, :root:lang(fa) .mega .line, :root:lang(ur) .mega .line, :root:lang(he) .mega .line,
:root:lang(th) .mega .line, :root:lang(hi) .mega .line, :root:lang(bn) .mega .line, :root:lang(ta) .mega .line, :root:lang(te) .mega .line, :root:lang(mr) .mega .line { padding-block: .12em; }

/* Chinese, Japanese: break between characters, but never inside a word of Latin; Korean keeps words whole. */
:root:lang(ja), :root:lang(zh) { line-break: strict; word-break: normal; }
:root:lang(ko) { word-break: keep-all; }
:root:lang(ja) p, :root:lang(zh) p, :root:lang(ja) li, :root:lang(zh) li { hyphens: manual; }

/* ---------- Right to left ---------- */
/* Flowed layout (flex, grid, text, logical margins and padding) turns round by itself. What is placed with left and
   right, and the arrows and progress that imply a direction, is turned here. */
:root[dir="rtl"] .skip { left: auto; right: -999px; }
:root[dir="rtl"] .skip:focus { right: 16px; left: auto; }
:root[dir="rtl"] .tour-rail { right: auto; left: var(--gut, 20px); }
:root[dir="rtl"] .spec-row::before { transform-origin: right; }
:root[dir="rtl"] .spec-row:hover dt { transform: translateX(-10px); }
:root[dir="rtl"] .path li::before { left: auto; right: -27px; }
:root[dir="rtl"] .faq summary::after { right: auto; left: 6px; }
:root[dir="rtl"] .fly-bar i { transform-origin: right; }
:root[dir="rtl"] .fly-cap.right { text-align: start; }
:root[dir="rtl"] .fly-cap.left { text-align: end; }
:root[dir="rtl"] svg:has(> use[href="#i-chev"]), :root[dir="rtl"] .mirror { transform: scaleX(-1); }
/* Things that are the same in every language: the code, the manifest, the version, the ticker's marquee. */
.code, .code-keys, .code-demo, .code-chip b, [data-code], [data-version], [data-size], .mono b, .mono.code { direction: ltr; unicode-bidi: isolate; }
.code { text-align: left; }
:root[dir="rtl"] .ticker, :root[dir="rtl"] .tick-row { direction: ltr; }
:root[dir="rtl"] .tick-row span { unicode-bidi: plaintext; }
/* An email address or address in running text keeps its own order inside right-to-left words. */
.mono { unicode-bidi: isolate; }

/* The note at the top of Terms and Privacy: the words below stay English, and say so in the reader's language. */
.binding { display: block; margin: 0 0 18px; padding: 10px 14px; border-radius: 12px; border-inline-start: 3px solid var(--magenta, #ff3e9d);
  background: rgba(255, 255, 255, .05); color: var(--text, #f3eef5); font-size: .95rem; line-height: 1.5; max-width: none; }

/* A grid or flex item won't shrink below its longest word unless told it may: long addresses and long words in other
   languages wrap inside the column rather than pushing the page wider. */
ul, ol, dl { grid-template-columns: minmax(0, 1fr); }
li, dd, dt, p, summary, .a, .spec-row > *, .get-card, .sec-head, .faq-grid > *, .tour-steps li { min-width: 0; }
li, .mono { overflow-wrap: anywhere; }

/* The headline lines are masks that clip what goes past their box: room above for capitals with accents (É, Ô, Ä, Đ, Ṽ)
   in the languages that have them, taken back with a negative margin so English doesn't move. */
.mega .line { padding-top: .22em; margin-top: -.22em; }
