.nh-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: #111;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .28);
    font-family: var(--tg-font-sans, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}
.nh-header,
.nh-header * {
    box-sizing: border-box;
}
.nh-header a[href] {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}
.nh-header a[href]:hover {
    opacity: 1;
}
.nh-container {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
}
.nh-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 12px 0;
}
.nh-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.nh-brand__logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    padding: 4px;
    flex-shrink: 0;
    object-fit: contain;
}
.nh-brand__meta {
    min-width: 0;
}
.nh-brand__name {
    margin: 0;
    color: #fff;
    font-size: 19px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.nh-brand__tag {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    line-height: 1.3;
}
.nh-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}
.nh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.nh-btn:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .4);
}
.nh-btn--accent {
    border-color: #ffc52d;
    background: #ffc52d;
    color: #111 !important;
}
.nh-btn--accent:hover {
    background: #ffd96f;
    border-color: #ffd96f;
    color: #111 !important;
}
.nh-mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .05);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.nh-mobile-icon {
    display: block;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    font-weight: 700;
    user-select: none;
}
.nh-mobile-icon--close {
    display: none;
}
.nh-header.is-open .nh-mobile-icon--burger {
    display: none;
}
.nh-header.is-open .nh-mobile-icon--close {
    display: block;
}
.nh-nav-wrap {
    border-top: 1px solid rgba(255, 255, 255, .1);
}
.nh-nav-list {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nh-nav-item {
    position: relative;
}
.nh-nav-link,
.nh-nav-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: #f7f7f7;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.nh-nav-trigger:hover,
.nh-nav-link:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}
.nh-nav-link--login {
    border: 1px solid rgba(255, 255, 255, .26);
    justify-content: center;
}
.nh-mobile-only,
.nh-mobile-search {
    display: none;
}
.nh-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.nh-nav-item.is-open .nh-chevron {
    transform: rotate(-135deg) translateY(-1px);
}
.nh-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 320px;
    max-width: 420px;
    padding: 10px;
    background: #111;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
}
.nh-nav-item.is-open .nh-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.nh-dropdown ul {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nh-dropdown a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}
.nh-dropdown a:hover {
    background: rgba(255, 255, 255, .12);
}
.nh-dropdown--articles {
    min-width: 760px;
    max-width: 860px;
    padding: 12px;
}
.nh-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.nh-articles-col {
    padding: 8px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
}
.nh-articles-col-title {
    margin: 0 0 6px;
    padding: 4px 8px;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.nh-search {
    position: relative;
    width: min(32vw, 360px);
    min-width: 250px;
}
.nh-search__inner {
    display: flex;
    align-items: center;
    width: 100%;
    height: 42px;
    overflow: hidden;
    background: #fcfcfc;
    border: 1px solid #d1d1d1;
    border-radius: 999px;
}
.nh-search__field {
    flex: 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    padding: 0 8px 0 16px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111;
    font: inherit;
    font-size: 14px;
    line-height: 1;
}
.nh-search__field::-webkit-search-decoration,
.nh-search__field::-webkit-search-cancel-button {
    appearance: none;
}
.nh-search__button,
.nh-search__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin-right: 2px;
    border: 0;
    border-radius: 50%;
    background: #ffc52d;
    color: #111;
    cursor: pointer;
}
.nh-search__clear {
    display: none;
    margin: 0 0 0 2px;
}
.nh-search.has-value .nh-search__clear {
    display: inline-flex;
}
.nh-search.has-value .nh-search__field {
    padding-left: 8px;
}
.nh-search__clear svg {
    display: block;
    width: 16px;
    height: 16px;
}
.nh-search__button img {
    display: block;
    width: 18px;
    height: 18px;
}
.nh-search__results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    display: none;
    width: min(440px, 92vw);
    max-height: 70vh;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #111;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
.nh-search.is-open .nh-search__results {
    display: block;
}
.nh-search__results .live-search__list-item {
    list-style: none;
    padding: 0;
}
.nh-search__results .live-search__list-item a,
.nh-search__results .live-search__list-item span {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}
.nh-search__results .live-search__list-item a:hover {
    background: rgba(255, 255, 255, .12);
}
.nh-search__status {
    display: block;
    padding: 10px 12px;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
}
.nh-visually-hidden {
    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: 980px) {
    .nh-search {
        width: 290px;
        min-width: 220px;
    }
    .nh-dropdown--articles {
        min-width: 680px;
    }
}
@media (max-width: 860px) {
    .nh-container {
        width: min(1240px, calc(100% - 20px));
    }
    .nh-mobile-toggle {
        display: inline-flex;
    }
    .nh-controls .nh-btn,
    .nh-search--desktop {
        display: none;
    }
    .nh-header.is-open {
        max-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nh-nav-wrap {
        display: none;
        border-top: 0;
        padding-bottom: 10px;
    }
    .nh-header.is-open .nh-nav-wrap {
        display: block;
        max-height: calc(100dvh - 84px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nh-nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }
    .nh-mobile-only,
    .nh-mobile-search {
        display: block;
    }
    .nh-mobile-search {
        position: relative;
        z-index: 3;
        padding: 4px 0 8px;
    }
    .nh-mobile-search .nh-search {
        width: 100%;
        min-width: 0;
    }
    .nh-mobile-search .nh-search__results {
        position: static;
        width: 100%;
        max-height: min(54dvh, 360px);
        margin-top: 8px;
        background: #111;
        border: 1px solid rgba(255, 255, 255, .18);
        box-shadow: 0 12px 28px rgba(0, 0, 0, .42);
    }
    .nh-mobile-search .nh-search__results .live-search__list-item + .live-search__list-item {
        border-top: 1px solid rgba(255, 255, 255, .08);
    }
    .nh-nav-link,
    .nh-nav-trigger {
        width: 100%;
        justify-content: space-between;
    }
    .nh-dropdown {
        position: static;
        display: none;
        min-width: 0;
        max-width: none;
        margin-top: 6px;
        padding: 8px;
        border-radius: 12px;
        background: #1a1a1a;
        border-color: rgba(255, 255, 255, .15);
        box-shadow: none;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }
    .nh-nav-item.is-open .nh-dropdown {
        display: block;
    }
    .nh-dropdown--articles {
        min-width: 0;
        max-width: none;
    }
    .nh-articles-grid {
        grid-template-columns: 1fr;
    }
    .nh-articles-col {
        background: rgba(255, 255, 255, .04);
    }
}
@media (max-width: 520px) {
    .nh-top {
        gap: 10px;
    }
    .nh-brand {
        gap: 10px;
    }
    .nh-brand__logo {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
    .nh-brand__name {
        font-size: 17px;
    }
    .nh-brand__tag {
        max-width: 230px;
        font-size: 12px;
    }
}
@media (max-width: 390px) {
    .nh-brand__tag {
        display: none;
    }
}
