.header-search {
    position: relative;
    width: clamp(190px, 16vw, 250px);
}
.header-search__form {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    transition: border-color .2s;
}
.header-search__form:focus-within {
    border-color: var(--gold);
    box-shadow: 0 1px 0 var(--gold);
}
/* focus is shown by the gold underline of the form, not by a box around the field */
.header-search__input:focus,
.header-search__input:focus-visible {
    outline: none;
}
.header-search__input {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 4px 0 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.header-search__input::placeholder {
    color: var(--muted);
    opacity: 1;
}
.header-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}
.header-search__submit {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-right: -8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--gold-dark);
    cursor: pointer;
}
.header-search__submit:hover {
    color: var(--ink);
}
.header-search.is-loading .header-search__submit {
    animation: search-pulse 1s ease-in-out infinite;
}
@keyframes search-pulse {
    50% { opacity: .35; }
}
.header-search__results {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 30;
    width: 380px;
    max-width: calc(100vw - 32px);
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 8px 0;
    background: #fffdf9;
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(70, 50, 30, .14);
}
.search-results {
    margin: 0;
    padding: 0;
    list-style: none;
}
.search-results__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 16px;
}
.search-results__item:hover,
.search-results__item.is-active {
    background: var(--paper-2);
}
.search-results__picture {
    flex: 0 0 48px;
    width: 48px;
    height: 72px;
    background: var(--paper-2);
}
.search-results__picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.search-results__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.search-results__name {
    font-size: 13px;
    line-height: 1.35;
}
.search-results__name b {
    font-weight: 600;
    color: var(--gold-dark);
}
.search-results__article {
    font-size: 11px;
    color: var(--muted);
}
.search-results__empty {
    margin: 0;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--muted);
}
.search-results__all {
    display: block;
    margin-top: 6px;
    padding: 12px 16px 6px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    color: var(--gold-dark);
}
.search-results__all:hover,
.search-results__all.is-active {
    color: var(--ink);
}
@media (max-width: 1080px) {
    .header-search {
        width: 100%;
    }
    .header-search__input {
        height: 46px;
        font-size: 16px;
    }
    .header-search__results {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
    }
}
