/* Keep navigation and anchor offsets in sync at each breakpoint. */
html {
    scroll-behavior: smooth !important;
    scroll-padding-top: 136px;
}

body {
    height: auto;
    overflow: visible;
}

.index-header {
    position: fixed;
    top: 20px;
    right: 50px;
    left: 50px;
    display: flex;
    align-items: center;
    gap: 24px;
    width: auto;
    max-height: none;
    margin: 0;
    padding: 20px 40px;
    transition: none;
}

.index-header::before,
.index-header::after {
    display: none;
}

.index-header .index-logo {
    flex: 0 0 165px;
    width: 165px;
    height: 60px;
}

.index-header .index-nav {
    flex: 1;
    width: auto;
    min-width: 0;
}

.index-nav ul {
    display: flex;
    margin: 0;
    padding: 0;
}

.index-header .index-nav li {
    flex: 1;
    float: none;
    width: auto;
    padding: 0;
    font-size: 16px;
}

.index-nav li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px;
    white-space: nowrap;
}

.index-nav li a::after {
    bottom: 0;
}

.index-nav a[aria-current] {
    color: #3279e6;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 80px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #d4dce8;
    border-radius: 8px;
    background: #fff;
    color: #20385e;
    font: inherit;
    cursor: pointer;
}

.nav-toggle svg {
    width: 20px;
    height: 20px;
}

.index-header a:focus-visible,
.nav-toggle:focus-visible {
    outline: 3px solid #3279e6 !important;
    outline-offset: 3px;
}

@media (max-width: 991.98px) {
    html {
        scroll-padding-top: 96px;
    }

    body {
        padding-top: 92px;
    }

    .index-header {
        top: 12px;
        right: 16px;
        left: 16px;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
        padding: 8px 16px;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(19, 53, 80, .18);
    }

    .index-header .index-logo {
        flex-basis: 80px;
        width: 80px;
        height: 52px;
    }

    .nav-ready .nav-toggle {
        display: flex;
    }

    .index-header .index-nav {
        flex: 0 0 100%;
        padding: 12px 0 4px;
    }

    .nav-ready .index-nav {
        display: none;
    }

    .nav-ready.is-open .index-nav {
        display: block;
    }

    .index-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .index-nav li a {
        justify-content: flex-start;
        padding: 10px 16px;
        border-radius: 8px;
    }

    .index-nav li a:hover,
    .index-nav a[aria-current] {
        background: #eef5ff;
    }

    .index-nav li a::after {
        display: none;
    }

    .news-body {
        margin-top: 24px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
}
