/* Suomi (fi) overrides.
 *
 * Loaded by header.php only when the page is in this language, so no other visitor
 * downloads it. Everything is scoped to html[lang="fi"] and cannot leak.
 *
 * Finnish. Words are long -- agglutination as well as compounding -- and single
 * words regularly exceed a narrow card.
 * Measured against the English: the median string is 112% of the English length.
 */

/* Closed compounds do not break at a space, so without hyphenation one long word widens
   its container. Hyphenation only engages where the browser has data for this language;
   overflow-wrap is the fallback. */
html[lang="fi"] {
    hyphens: auto;
    -webkit-hyphens: auto;
}
html[lang="fi"] :is(input, textarea, select, code, pre, .pot-lang-name) {
    hyphens: manual;
}

/* Longer labels wrap inside their box instead of widening it. */
html[lang="fi"] :is(.nav-link, .btn, .pot-lang-name, .accordion-title, td, th, li,
        h1, h2, h3, h4, h5, h6) {
    overflow-wrap: break-word;
}

/* The shared stylesheet tightens headline tracking for English. Longer headlines
   in this language read better at the font's own spacing. */
html[lang="fi"] :is(h1, h2, .ls-minus-1px, .ls-minus-2px) {
    letter-spacing: -0.25px;
}

/* Buttons whose English label is one word and whose translation is two or three. */
html[lang="fi"] :is(.btn.btn-switch-text.btn-small, .btn.btn-switch-text.btn-very-small, .btn.btn-medium) > span {
    white-space: normal;
    line-height: 1.3;
}

/* The main nav carries the longest labels on the page; give it room on the widths where
   it is tightest, before it wraps to a second row. */
@media (min-width: 992px) and (max-width: 1399px) {
    html[lang="fi"] .navbar .navbar-nav .nav-link {
        font-size: 15px;
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Plan cards keep each feature on one line; translated feature names need a second
   line rather than an ellipsis. */
html[lang="fi"] :is(#vps-features-list li, .pot-plan-feature) {
    white-space: normal;
    line-height: 1.5;
}
