.header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid #e6eaf0;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(14px);
}

.header .wrap {
    width: min(1120px, calc(100% - 44px));
    margin-inline: auto;
}

.header-inner {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header .brand {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 11px;
    color: inherit;
    font-weight: 800;
    letter-spacing: -.03em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 39px;
    height: 39px;
    flex: none;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffbd55, #f17b36);
    box-shadow: 0 5px 12px rgba(227, 133, 54, .22);
}

.brand-mark svg {
    width: 100%;
    height: 100%;
}

.brand-name {
    display: grid;
    gap: 1px;
}

.brand-name strong {
    font-size: 15px;
}

.brand-name small {
    color: #8a94a5;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .01em;
}

.header .nav {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(8px, 1vw, 14px);
    color: #505c72;
    font-size: 13px;
    white-space: nowrap;
}

.header .nav a {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 7px;
    border-radius: 8px;
    color: inherit;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
}

.header .nav a:hover,
.header .nav a[aria-current="page"]:not(.nav-cta) {
    background: #f0f3ff;
    color: #3459df;
}

.header .nav .nav-cta {
    padding-inline: 13px;
    background: #3459df;
    color: #fff;
    font-weight: 700;
}

.header .nav .nav-cta:hover {
    background: #2343bd;
    color: #fff;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid #dce2ed;
    border-radius: 9px;
    background: #fff;
    color: #344057;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.header .brand:focus-visible,
.header .nav a:focus-visible,
.menu-toggle:focus-visible {
    outline: 3px solid rgba(52, 89, 223, .42);
    outline-offset: 2px;
}

@media (max-width: 1180px) {
    .header .wrap {
        width: min(1120px, calc(100% - 32px));
    }

    .header-inner {
        position: relative;
        min-height: 66px;
    }

    .menu-toggle {
        display: inline-flex;
        flex: none;
    }

    .header .nav {
        position: absolute;
        z-index: 1;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        align-items: stretch;
        gap: 2px;
        padding: 9px;
        border: 1px solid #e6eaf0;
        border-radius: 0 0 13px 13px;
        background: #fff;
        box-shadow: 0 14px 28px rgba(32, 45, 75, .12);
        font-size: 14px;
        white-space: normal;
    }

    .header .nav.is-open {
        display: flex;
        flex-direction: column;
    }

    .header .nav a {
        min-height: 44px;
        justify-content: flex-start;
        padding: 0 12px;
    }

    .header .nav .nav-cta {
        justify-content: center;
        margin-top: 4px;
    }
}

@media (max-width: 420px) {
    .header .wrap {
        width: min(1120px, calc(100% - 24px));
    }

    .brand-mark {
        width: 35px;
        height: 35px;
    }

    .brand-name strong {
        font-size: 14px;
    }

    .brand-name small {
        font-size: 9px;
    }

    .menu-toggle {
        gap: 5px;
        padding-inline: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header .nav a {
        transition: none;
    }
}
