.tools-site-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    margin: 0 0 26px;
    padding: 10px 0 18px;
    background: transparent;
    border-bottom: 1px solid var(--line, #d8e2dc);
}

.tools-logo {
    display: inline-flex;
    align-items: center;
    min-width: 168px;
}

.tools-logo img {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
}

.tools-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    min-width: 0;
}

.tools-nav a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 6px;
    color: var(--text, #14201a);
    background: transparent;
    border-bottom: 2px solid transparent;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.tools-nav a:hover,
.tools-nav a:focus,
.tools-nav a[aria-current="page"] {
    color: #ffffff;
    color: var(--brand, #147a4b);
    background: transparent;
    border-color: var(--brand, #147a4b);
}

.tools-language-switcher {
    display: inline-flex;
    width: 42px;
    height: 34px;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(18, 38, 30, 0.08);
}

.tools-language-switcher:hover,
.tools-language-switcher:focus {
    border-color: var(--brand, #147a4b);
    outline: 3px solid rgba(20, 122, 75, 0.16);
}

.tools-language-switcher img {
    display: block;
    width: 30px;
    height: 20px;
    border-radius: 2px;
}

.tools-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 860px) {
    .tools-site-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px;
    }

    .tools-logo {
        min-width: 0;
    }

    .tools-logo img {
        width: 158px;
    }

    .tools-nav {
        grid-column: 1 / -1;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }
}
