/* What layout needs beyond logical properties for other languages. */

/* Charts and progress marks place points by physical percentages. */
[dir="rtl"] .measure-chart,
[dir="rtl"] .report-chart,
[dir="rtl"] .print-chart,
[dir="rtl"] .fs-milestones { direction: ltr; }

/* The toast centres itself with a physical translate from a logical edge. */
[dir="rtl"] #toast { transform: translate(50%, 20px); }
[dir="rtl"] #toast.visible { transform: translate(50%, 0); }

/* Icons that point along the reading direction. */
[dir="rtl"] .icon[data-icon="arrow-right"],
[dir="rtl"] .icon[data-icon="arrow-up-right"],
[dir="rtl"] .icon[data-icon="caret-left"],
[dir="rtl"] .icon[data-icon="caret-right"] { transform: scaleX(-1); }

/* Tracking is tuned for Latin and Cyrillic: it breaks joined scripts and crowds the rest. */
:lang(ar) *, :lang(he) *, :lang(hi) *, :lang(th) *,
:lang(ja) *, :lang(ko) *, :lang(zh-Hans) *, :lang(zh-Hant) * { letter-spacing: 0 !important; }

/* Long German-style words must not push a tile or a button off the screen. */
html:not([lang="ru"]) :is(button, .btn, label, h1, h2, h3, h4, .nav-item, .feature-tile, .feature-panel) { overflow-wrap: break-word; hyphens: auto; }

.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lang-select { width: auto; max-width: 190px; min-height: 36px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); color: var(--ink); font: inherit; font-size: .875rem; }
