.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;
}

.help-search {
    margin: 1.5rem 0 2rem;
}

.help-search-row {
    display: flex;
    gap: .5rem;
    align-items: stretch;
}

#help-search-input {
    flex: 1;
    min-width: 0;
    padding: .55rem .75rem;
    font-size: 16px;
    line-height: 1.4;
    border: 1px solid var(--tn-border-soft);
    border-radius: 6px;
    background: var(--tn-popup-bg);
    color: var(--tn-text-strong);
    transition: border-color .15s, box-shadow .15s;
}

#help-search-input:focus {
    outline: none;
    border-color: var(--tn-brand-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

#help-search-clear {
    padding: 0 .9rem;
    font-size: .85rem;
    border: 1px solid var(--tn-border-soft);
    border-radius: 6px;
    background: var(--tn-popup-bg);
    color: var(--tn-text-muted);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

#help-search-clear:hover {
    background: var(--tn-surface-card);
    color: var(--tn-text-strong);
    border-color: var(--tn-border-card);
}

#help-search-clear:focus-visible {
    outline: 2px solid var(--tn-brand-primary);
    outline-offset: 2px;
}

.help-search-privacy {
    color: var(--tn-text-muted);
    font-size: .8rem;
    margin: .4rem 0 0;
}

.help-search-box {
    margin-bottom: 1rem;
}

.help-filter-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem .85rem;
    margin: 0 0 1.25rem;
    background: var(--tn-surface-muted);
    border: 1px solid var(--tn-border-soft);
    border-radius: 8px;
    color: var(--tn-text-strong);
    font-size: .9rem;
}

.help-filter-banner #help-clear-all {
    flex: 0 0 auto;
    padding: .2rem .6rem;
    font-size: .8rem;
    color: var(--tn-brand-primary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.help-filter-banner #help-clear-all:hover {
    background: var(--tn-popup-bg);
    border-color: var(--tn-info-border);
}

.help-filter-banner #help-clear-all:focus-visible {
    outline: 2px solid var(--tn-brand-primary);
    outline-offset: 2px;
}

.help-browse {
    margin-top: 1rem;
}

.help-browse-heading {
    font-size: .75rem;
    font-weight: 600;
    color: var(--tn-text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 .65rem;
}

.help-chip-group {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    margin: 0 0 .55rem;
}

.help-chip-group-label {
    flex: 0 0 8.5rem;
    font-size: .82rem;
    color: var(--tn-text-body);
    font-weight: 500;
}

.help-chip-row {
    flex: 1 1 auto;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.help-chip {
    flex: 0 0 auto;
    min-height: 0;
    padding: .25rem .7rem;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--tn-text-strong);
    background: var(--tn-popup-bg);
    border: 1px solid var(--tn-border-soft);
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    margin: 0;
}

.help-chip:hover {
    border-color: var(--tn-brand-primary);
    color: var(--tn-brand-primary);
}

.help-chip:focus-visible {
    outline: 2px solid var(--tn-brand-primary);
    outline-offset: 2px;
}

.help-chip.is-active {
    background: var(--tn-brand-primary);
    color: var(--tn-brand-primary-on);
    border-color: var(--tn-brand-primary);
}

.help-chip.is-active:hover {
    background: var(--tn-brand-primary-strong);
    border-color: var(--tn-brand-primary-strong);
    color: var(--tn-brand-primary-on);
}

#help-search-results {
    margin-top: 1.25rem;
}

.help-search-count {
    color: var(--tn-text-muted);
    font-size: .85rem;
    margin: 0 0 .5rem;
}

.help-search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-search-result {
    padding: .85rem 0;
    border-bottom: 1px solid var(--tn-border-soft);
}

.help-search-result:last-child {
    border-bottom: none;
}

.help-search-result a {
    text-decoration: none;
    color: var(--tn-text-strong);
}

.help-search-result a:hover strong {
    color: var(--tn-brand-primary);
}

.help-search-result strong {
    font-weight: 500;
}

.help-search-result-subtitle {
    display: block;
    color: var(--tn-text-muted);
    font-size: .9rem;
    margin-top: .15rem;
}

.help-search-result-snippet {
    color: var(--tn-text-body);
    font-size: .85rem;
    margin: .35rem 0 0;
    line-height: 1.45;
}

.help-search-empty {
    color: var(--tn-text-muted);
    padding: 1rem 0;
}

#help-search-results mark,
.help-search-result mark {
    background: var(--tn-yellow-bg-soft);
    color: inherit;
    padding: 0 .15rem;
    border-radius: 2px;
}

@media (max-width: 600px) {
    #help-search-input {
        font-size: 16px;
    }
    .help-chip-group {
        flex-direction: column;
        align-items: stretch;
        gap: .3rem;
        margin-bottom: .85rem;
    }
    .help-chip-group-label {
        flex: 0 0 auto;
    }
    .help-chip-row {
        gap: .35rem;
    }
    .help-chip {
        font-size: .78rem;
        padding: .22rem .6rem;
    }
    .help-filter-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: .4rem;
    }
}
