header.header {
    overflow: visible;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: .55rem;
    line-height: 1;
    overflow: visible;
    z-index: 10050;
}

.header-actions > span {
    margin-left: 0 !important;
    padding: 0 !important;
}

.header-actions .header-search-btn,
.header-actions .header-theme-btn,
.header-actions .header-lang-btn,
.header-actions .home-link a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 2.35rem;
    height: 2.35rem;
    min-width: 2.35rem;
    color: #fff;
    line-height: 1;
    vertical-align: middle;
}

.header-actions .header-search-btn,
.header-actions .header-theme-btn,
.header-actions .header-lang-btn,
.header-actions .home-link a {
    cursor: pointer;
    position: relative;
    user-select: none;
    transition: color .2s ease, transform .2s ease;
}

.header-actions .header-search-btn .search-icon,
.header-actions .header-theme-btn > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    color: inherit;
    font-size: 1.55rem;
    line-height: 1;
}

.header-actions .header-lang-btn .lang-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 1.55rem;
    height: 1.55rem;
    color: inherit;
    border: 2px solid currentColor;
    border-radius: .24rem;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-decoration: none;
}

.header-actions .home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.35rem;
    min-width: 2.35rem;
    margin-left: 0 !important;
}

.header-actions .home-link .home-icon {
    display: block;
    width: 1.42rem;
    height: 1.42rem;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.header-actions [data-tooltip]::before,
.header-actions [data-tooltip]::after {
    position: absolute;
    left: 50%;
    z-index: 10040;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -.12rem);
    transition: opacity .12s ease, transform .12s ease;
}

.header-actions [data-tooltip]::before {
    content: "";
    top: calc(100% + .16rem);
    border: .25rem solid transparent;
    border-bottom-color: rgba(255, 255, 255, .96);
}

.header-actions [data-tooltip]::after {
    content: attr(data-tooltip);
    top: calc(100% + .64rem);
    padding: .32rem .5rem;
    color: #111827;
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 4px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
}

.header-actions [data-tooltip]:hover::before,
.header-actions [data-tooltip]:hover::after,
.header-actions [data-tooltip]:focus-visible::before,
.header-actions [data-tooltip]:focus-visible::after,
.header-actions [data-tooltip]:focus-within::before,
.header-actions [data-tooltip]:focus-within::after {
    opacity: 1;
    transform: translate(-50%, 0);
    transition-delay: .04s;
}

@media not all and (hover: none) {
    .header-actions .header-search-btn:hover,
    .header-actions .header-theme-btn:hover,
    .header-actions .header-lang-btn:hover,
    .header-actions .home-link a:hover {
        color: #f75357;
    }
}

@media (max-width: 640px) {
    .header-actions {
        right: .75rem;
        gap: .35rem;
    }

    .header-actions .header-search-btn,
    .header-actions .header-theme-btn,
    .header-actions .header-lang-btn,
    .header-actions .home-link a {
        width: 2rem;
        height: 2rem;
        min-width: 2rem;
    }

    .header-actions .home-link {
        display: inline-flex;
        height: 2rem;
        min-width: 2rem;
    }

    .header-actions .header-search-btn .search-icon,
    .header-actions .header-theme-btn > span {
        width: 1.3rem;
        height: 1.3rem;
        font-size: 1.3rem;
    }

    .header-actions .header-lang-btn .lang-text {
        width: 1.3rem;
        height: 1.3rem;
        border-radius: .2rem;
        font-size: .62rem;
    }

    .header-actions .home-link .home-icon {
        width: 1.2rem;
        height: 1.2rem;
    }
}

.search-popup-overlay.algolia-pop-overlay {
    position: fixed;
    inset: 0;
    z-index: 10020;
    background: rgba(15, 18, 23, .46);
    backdrop-filter: blur(10px);
}

.local-search-popup.popup {
    position: fixed;
    top: 7vh;
    left: 50%;
    right: auto;
    bottom: auto;
    z-index: 10030;
    display: none;
    width: min(760px, calc(100vw - 32px));
    height: auto;
    min-height: 0;
    max-height: min(78vh, 760px);
    margin: 0;
    padding: 0;
    transform: translateX(-50%);
    overflow: hidden;
    background: #fff;
    color: #1f2937;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .26);
}

.local-search-popup.local-search-empty .local-search-results {
    display: none;
}

.local-search-popup .local-search-header {
    display: grid;
    grid-template-columns: 24px 1fr 40px;
    gap: 14px;
    align-items: center;
    height: auto;
    min-height: 68px;
    padding: 0 18px 0 22px;
    background: #fff;
    border-bottom: 1px solid #edf0f4;
}

.local-search-popup .algolia-search-input-icon {
    color: #8a94a6;
    line-height: 1;
}

.local-search-popup .local-search-input input {
    width: 100%;
    height: 68px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1f2937;
    font-size: 1.35rem;
    line-height: 1.2;
}

.local-search-popup .local-search-input {
    display: block;
}

.local-search-popup .local-search-input input::placeholder {
    color: #9aa3b2;
}

.local-search-popup .local-search-close {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9aa3b2;
    appearance: none;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease;
}

.local-search-popup .local-search-close i {
    font-size: 1rem;
}

.local-search-popup .local-search-close:hover {
    background: rgba(247, 83, 87, .1);
    color: #f75357;
}

.local-search-popup .local-search-results {
    max-height: calc(min(78vh, 760px) - 68px);
    overflow: auto;
    background: #fff;
}

.local-search-popup .local-search-results::-webkit-scrollbar {
    width: 10px;
}

.local-search-popup .local-search-results::-webkit-scrollbar-thumb {
    background: #d7dde7;
    border: 3px solid #fff;
    border-radius: 999px;
}

.local-search-popup .algolia-stats {
    min-height: 22px;
    padding: 14px 28px 10px;
    color: #667085;
    font-size: .95rem;
    line-height: 1.4;
    border-bottom: 1px solid #edf0f4;
}

.local-search-popup .algolia-hit-list {
    margin: 0;
    padding: 0;
}

.local-search-popup .algolia-hit-item {
    margin: 0;
    padding: 18px 28px;
    border-bottom: 1px solid #edf0f4;
    transition: background-color .16s ease;
}

.local-search-popup .algolia-hit-item:hover {
    background: #f8fafc;
}

.local-search-popup .algolia-hit-item-link {
    display: block;
    color: #1f2937;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.42;
}

.local-search-popup .algolia-hit-item-link:hover {
    color: #f75357;
}

.local-search-popup .local-search-excerpt {
    display: -webkit-box;
    margin-top: 7px;
    overflow: hidden;
    color: #5b6472;
    font-size: .96rem;
    line-height: 1.62;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.local-search-popup em {
    padding: 0 .08em;
    color: #f75357;
    background: rgba(247, 83, 87, .1);
    border-radius: 3px;
    font-style: normal;
    font-weight: 700;
}

.local-search-popup .algolia-hit-empty {
    padding: 44px 28px 52px;
    color: #667085;
    text-align: center;
}

@media (max-width: 640px) {
    .local-search-popup.popup {
        top: 12px;
        width: calc(100vw - 20px);
        max-height: calc(100vh - 24px);
    }

    .local-search-popup .local-search-header {
        grid-template-columns: 22px 1fr 36px;
        gap: 10px;
        min-height: 58px;
        padding: 0 12px 0 16px;
    }

    .local-search-popup .local-search-input input {
        height: 58px;
        font-size: 1.05rem;
    }

    .local-search-popup .local-search-results {
        max-height: calc(100vh - 82px);
    }

    .local-search-popup .algolia-stats {
        padding: 11px 18px 9px;
        font-size: .88rem;
    }

    .local-search-popup .algolia-hit-item {
        padding: 15px 18px;
    }

    .local-search-popup .algolia-hit-item-link {
        font-size: 1rem;
    }

    .local-search-popup .local-search-excerpt {
        font-size: .9rem;
        line-height: 1.55;
        -webkit-line-clamp: 3;
    }
}
