.knight-languages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .2rem .65rem;
    font-size: .82rem;
    line-height: 1.4;
}

.knight-languages a {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: .2em;
    white-space: nowrap;
}

.knight-languages a[aria-current="true"] {
    font-weight: 700;
    text-decoration-thickness: .15em;
}

.knight-languages a:focus-visible, .menu-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.main-nav .knight-languages {
    margin-top: .2rem;
    justify-content: flex-end;
}

.main-footer .knight-languages {
    margin: .75rem 0;
}

.main-header button.menu-toggle {
    background: transparent;
    border: 0;
    padding: .5rem;
}

.knight-error {
    min-height: 55vh;
    padding-block: 6rem 2rem;
}

.knight-error p {
    margin-block: 1rem;
}

.knight-form-error {
    padding: .75rem 1rem;
    border: 1px solid currentColor;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .main-nav .knight-languages {
        justify-content: center;
        margin-top: .75rem;
    }

    .knight-languages a {
        min-height: 40px;
    }
}

.knight-language-resume {
    display: block;
    text-align: end;
    font-size: .78rem;
    text-decoration: underline;
    color: inherit;
}

.knight-language-resume[hidden] {
    display: none;
}

@media (max-width: 768px) {
    .knight-language-resume {
        text-align: center;
    }
}

header .knight-languages {
    margin-bottom: .4rem;
}

.knight-language-resume {
    text-align: center;
}

footer .knight-languages {
    color: #dacba1;
}

/* Minimal selector for the institutional site only: no navigation/header added. */
.knight-languages--minimal {
    flex-wrap:nowrap; gap:6px; background:transparent; border:0; box-shadow:none;
    color:rgba(255,255,255,.85); line-height:1.4;
}
.knight-languages--minimal .knight-language-globe {
    width:18px; height:18px; flex:none; margin-inline-end:4px; color:var(--gold);
}
.knight-languages--minimal a {
    min-width:32px; min-height:32px; justify-content:center; padding:0 2px;
    font-weight:500; color:inherit; text-decoration:none;
}
.knight-languages--minimal a[aria-current="true"] {
    color:var(--gold); text-decoration:underline; text-decoration-thickness:2px;
    text-underline-offset:5px;
}
.knight-languages--minimal a:hover { color:var(--gold); }
.knight-languages--minimal .knight-language-divider { opacity:.25; font-size:.75rem; }
.knight-home-top {
    --selector-top-reduction:min(8px,1vh);
    padding-top:calc(2vh - var(--selector-top-reduction));
    /* Reserve the released space here: main/logo/cards/footer keep their flow positions. */
    padding-bottom:calc(var(--selector-top-reduction) + .15rem);
}
.knight-home-top .knight-languages--minimal { margin-bottom:.25rem; }
footer .knight-languages--minimal { color:rgba(255,255,255,.8); }
@media(max-width:768px) {
    .knight-languages--minimal a { min-width:40px; min-height:40px; }
}
