/* Interface-languages section — 2026-08-14, revision e (supersedes
   languages-20260814d.css; build assets are immutable here, so every change
   ships under a new name).

   BUILT TO SCALE WITH THE LANGUAGE LIST. One fixed showcase — a single
   download row — re-renders in whichever language is picked, flipping wording,
   digits and direction (the app's .track-fill anchors to inset-inline-start,
   so the bar swings to the right edge in RTL languages by itself). The picker
   is the only thing that grows when a language is added, and it wraps; the
   showcase never gets taller. The row auto-cycles until the visitor first
   interacts, and not at all under prefers-reduced-motion.

   Kept from earlier revisions: Persian/Arabic text binds to Vazirmatn wherever
   it declares itself, because the English pages set body to Manrope, which has
   no Arabic-script glyphs. */

[lang="fa"],
[lang="ar"] {
    font-family: Vazirmatn, system-ui, sans-serif;
}

.lang-show {
    max-width: 640px;
    margin-inline: auto;
    padding: 28px 32px;
}

.lang-show-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.lang-show-row.is-in {
    animation: langIn .35s ease;
}

@keyframes langIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.lang-show-status {
    white-space: nowrap;
    font-size: 18px;
    font-weight: 800;
}

.lang-show-track {
    flex: 1;
    height: 10px;
    margin-top: 0;
}

.lang-show-pct {
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--muted);
}

/* Picker: the only part that grows with the language list — and it wraps. */
.lang-picker {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.lang-pick {
    font: inherit;
    cursor: pointer;
    padding: 8px 17px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    color: var(--muted);
    background: var(--chip);
    border: 1px solid var(--border);
    transition: color .15s, background .15s, box-shadow .15s;
}

.lang-pick:hover {
    color: var(--primary);
}

.lang-pick.is-active {
    color: #fff;
    background: var(--primary);
    border-color: transparent;
    box-shadow: 0 8px 18px var(--ring);
}

.lang-note {
    max-width: 62ch;
    margin: 24px auto 0;
    text-align: center;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.75;
    text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {
    .lang-show-row.is-in {
        animation: none;
    }

    .lang-pick {
        transition: none;
    }
}

@media (max-width: 560px) {
    .lang-show {
        padding: 20px 18px;
    }

    .lang-show-row {
        flex-wrap: wrap;
        gap: 10px 14px;
    }

    /* Status + pct on the first line, the bar full-width below. */
    .lang-show-track {
        order: 3;
        flex-basis: 100%;
    }
}
