/* Language toggle and the Hebrew (right-to-left) layout. */
.lang-toggle { display: inline-grid; place-items: center; min-width: 44px; height: 40px; padding: 0 12px; margin-inline: auto 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255,255,255,.03); color: var(--text); font: 600 14px/1 'Heebo', var(--font); cursor: pointer; transition: border-color .2s, background-color .2s; }
.lang-toggle:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.desktop-nav ~ .lang-toggle { margin-inline: 0 10px; }
@media (max-width: 800px) { .lang-toggle { margin-inline: auto 10px !important; height: 44px; } .menu-toggle { margin-left: 0 !important; } }

html[lang="he"] body, html[lang="he"] button, html[lang="he"] input { font-family: 'Heebo', var(--font); }
html[lang="he"] :is(h1, h2, h3, blockquote, .manifesto-text, .tn-row dd > span, .hc blockquote, .door-copy h3) { letter-spacing: -.025em; }
html[lang="he"] .eyebrow, html[lang="he"] .lg-mono, html[lang="he"] .lab-mono, html[lang="he"] .tl-label, html[lang="he"] .tn-row dt, html[lang="he"] .fx-more, html[lang="he"] .ex-chip, html[lang="he"] .lab-chip, html[lang="he"] .lg-chip { letter-spacing: .04em; }

/* Numbers, code, charts and formulas stay left-to-right inside the Hebrew page. */
html[dir="rtl"] :is(.code-lines, .panel-head, .code-footer, svg, .fx-formula, .lab-plot, .lab-grid, .lab-chart, .lg-chart, .lg-daybars, .lg-cells, .lg-calendar, .tl-bars, .tl-curve, .ex-bt-chart, .ex-scatter, .analyzer-locked, .tl-input, .lg-kpi strong, .lab-read dd, .ex-bt-stats dd, .ex-curve-stats, .fx-vars dt) { direction: ltr; }
html[dir="rtl"] .tl-input { flex-direction: row; }
html[dir="rtl"] .hw-mini { text-align: right; }
html[dir="rtl"] .fx-vars div, html[dir="rtl"] .lx-item dd, html[dir="rtl"] .fx-body, html[dir="rtl"] .fx-why { text-align: right; }

/* Arrows point the way the page reads. */
html[dir="rtl"] :is(.button > span:last-child, .text-link > span, .door-cta > span, .rw-cta > span, .tile-cta > span, .why-arrow, .hw-steps i) { display: inline-block; transform: scaleX(-1); }
html[dir="rtl"] .tn-switch i { left: auto; right: 5px; }
html[dir="rtl"] .tn-card[data-tn="now"] .tn-switch i { transform: translateX(-100%); }
/* Hebrew has no glyphs in the mono and display fonts: set everything in Heebo, except code. */
html[lang="he"] body *:not(.code-lines):not(.code-lines *):not(code):not(.panel-head *):not(.code-footer *) { font-family: 'Heebo', 'Inter Tight', Arial, sans-serif !important; }
html[lang="he"] :is(.eyebrow, .lg-mono, .lab-mono, .tl-label, .tn-row dt, .fx-more, .ex-chip, .lab-chip, .lg-chip, .soon-badge, .tt-n, .hw-n, .lx-cat-n, .lx-count, .scroll-cue span, .tools-hint, .ex-score, .tl-n, .fx-n, .ex-tag, .door-n, .hw-mini span) { letter-spacing: .02em !important; }
