/* Search results (8e) — mobile-first, tokens only. Avatars 50% only. */

.search-page {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--gutter) var(--space-8);
}

.search-page__header {
    padding: var(--space-5) 0 var(--space-4);
    border-bottom: var(--rule-strong) solid var(--ink);
}

/* 8e/5c: 2px ink box, magnifier on the left. The query's size is set on the
   form, not the input: tokens.css sizes every text input at
   max(16px, 1em), a selector more specific than any class here, so the input
   takes its size from the form through that 1em (16px phones, 19px wide). */
.search-page__form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border: 2px solid var(--ink);
    font-size: 16px;
}

.search-page__icon {
    flex: none;
    color: var(--ink);
}

.search-page__input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.4;
    color: var(--ink);
    background: transparent;
}

.search-page__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.search-page__tab {
    display: inline-flex;
    align-items: center;
    min-height: var(--target-min);
    padding: 6px 13px;
    border: var(--rule-hairline) solid var(--rule);
    font: 400 var(--text-meta) / 1 var(--font-sans);
    color: var(--body);
    text-decoration: none;
}

.search-page__tab:hover {
    border-color: var(--ink);
}

.search-page__tab--active {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--on-ink);
    font-weight: 600;
}

/* 5c's label and outlined button live inside the wide author card only. */
.search-author-hit__label,
.search-author-hit__action--wide {
    display: none;
}

/* Search rows (8e): 80×56 image and 15px title on phones; 132×84 and 22px
   from 640px (5c). Scoped to this page. */
.search-page .article-list__media {
    width: 80px;
}

.search-page .article-image--feed-row .article-image__mat {
    height: 56px;
}

.search-page .article-list__title {
    font-size: 15px;
    line-height: 1.24;
}

@media (min-width: 640px) {
    .search-page .article-list__media {
        width: 132px;
    }

    .search-page .article-image--feed-row .article-image__mat {
        height: 84px;
    }

    .search-page .article-list__title {
        font-size: 22px;
        line-height: 1.22;
    }
}

@media (min-width: 900px) {
    .search-page__form {
        gap: 12px;
        padding: 15px 18px;
        font-size: 19px;
    }

    .search-page__tab {
        min-height: 0;
    }

    .search-page__hint,
    .search-page__authors-heading {
        display: none;
    }
}

.search-page__clear {
    flex: none;
    font: 400 var(--text-meta) / 1 var(--font-sans);
    color: var(--meta);
    text-decoration: none;
}

.search-page__clear:hover,
.search-page__clear:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.search-page__hint,
.search-page__idle {
    margin: var(--space-3) 0 0;
    font: 400 var(--text-meta) / 1.6 var(--font-sans);
    color: var(--meta);
}

.search-page__section {
    margin-top: var(--space-6);
}

.search-page__authors,
.search-page__issues {
    margin: 0;
    padding: 0;
    list-style: none;
}

.search-author-hit,
.search-issue-hit {
    display: flex;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-4);
    border: var(--rule-hairline) solid var(--ink);
    text-decoration: none;
    color: inherit;
}

.search-page__authors li + li,
.search-page__issues li + li {
    margin-top: var(--space-3);
}

.search-author-hit:hover,
.search-author-hit:focus-visible,
.search-issue-hit:hover,
.search-issue-hit:focus-visible {
    border-color: var(--accent);
}

.search-author-hit__avatar {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--tint);
    font: 700 18px / 1 var(--font-serif);
    color: var(--ink);
}

.search-author-hit__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-author-hit__body,
.search-issue-hit__body {
    flex: 1;
    min-width: 0;
}

.search-author-hit__name,
.search-issue-hit__title {
    display: block;
    font: 700 var(--text-h3) / 1.25 var(--font-serif);
    color: var(--ink);
}

.search-author-hit__meta,
.search-issue-hit__meta {
    display: block;
    margin-top: var(--space-1);
    font: 400 var(--text-meta) / 1.4 var(--font-sans);
    color: var(--meta);
}

.search-author-hit__action,
.search-issue-hit__action {
    flex: none;
    font: 400 var(--text-meta) / 1 var(--font-sans);
    color: var(--accent);
}

.search-issue-hit__cover {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 58px;
    background: var(--tint);
}

.search-issue-hit__cover img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.search-issue-hit__cover-fallback {
    font: 600 var(--text-kicker-small) / 1 var(--font-sans);
    color: var(--meta);
}

.search-page__issues-note {
    margin: var(--space-3) 0 0;
    font: 400 var(--text-meta) / 1.6 var(--font-sans);
    color: var(--meta);
}

.search-empty {
    padding: var(--space-6) 0;
}

.search-empty__kicker {
    margin: 0;
    font: 600 var(--text-kicker) / 1 var(--font-sans);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.search-empty__title {
    margin: var(--space-3) 0 0;
    font: 700 var(--text-h1) / var(--leading-tight) var(--font-serif);
    color: var(--ink);
}

.search-empty__lead {
    margin: var(--space-3) 0 0;
    max-width: var(--measure);
    font-size: var(--text-lead);
    line-height: 1.65;
    color: var(--body);
}

.search-empty__chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-5);
}

.search-empty__chip {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 var(--space-3);
    border: var(--rule-hairline) solid var(--rule);
    font: 400 var(--text-ui) / 1 var(--font-sans);
    color: var(--ink);
    text-decoration: none;
}

.search-empty__chip:hover,
.search-empty__chip:focus-visible {
    border-color: var(--ink);
}

.search-empty__archive {
    margin: var(--space-5) 0 0;
    font: 600 var(--text-ui) / 1 var(--font-sans);
}

.search-empty__archive a {
    color: var(--ink);
}

.search-empty__archive a:hover,
.search-empty__archive a:focus-visible {
    color: var(--accent);
}

/* ---------------------------------------------------------------------------
   Author and issue hit sizes. Kept at the END of the file on purpose: the
   shared `.search-author-hit__name, .search-issue-hit__title` rule above sets
   the `font` shorthand, and an override placed earlier in the file (same
   specificity) silently lost to it — the 5c name stayed 21px.
   --------------------------------------------------------------------------- */

/* 8e: 17px author name, 15px issue title. */
.search-author-hit__name {
    font-size: 17px;
}

.search-issue-hit__title {
    font-size: 15px;
}

@media (min-width: 900px) {
    /* 5c: the author branch is a tint panel with an accent edge. */
    .search-author-hit {
        align-items: flex-start;
        gap: 18px;
        padding: 20px;
        border: 0;
        border-left: 3px solid var(--accent);
        background: var(--tint);
    }

    .search-author-hit:hover,
    .search-author-hit:focus-visible {
        border-left-color: var(--ink);
    }

    /* On the tint panel a tint avatar disappears; the mat reads against it. */
    .search-author-hit__avatar {
        width: 68px;
        height: 68px;
        background: var(--mat);
        font-size: 24px;
    }

    .search-author-hit__label {
        display: block;
        font: 600 var(--text-kicker-small) / 1 var(--font-sans);
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--accent);
    }

    .search-author-hit__name {
        margin-top: 6px;
        font-size: 26px;
    }

    .search-author-hit__meta {
        margin-top: 6px;
        font: 400 14px / 1.6 var(--font-serif);
        color: var(--body);
    }

    .search-author-hit__action--narrow {
        display: none;
    }

    .search-author-hit__action--wide {
        display: block;
        align-self: center;
        padding: 11px 16px;
        border: var(--rule-medium) solid var(--ink);
        font: 600 12px / 1 var(--font-sans);
        color: var(--ink);
    }
}

/* Phone touch targets (design-principles section 6: hit targets at least 44px).
   Found under 44px by the 2026-11-02 UI audit at 390px; from 900px the old
   compact sizes stand (pointer, and the utility bar is fixed at 34px there). */
@media (max-width: 899px) {
    .search-page__clear {
        display: inline-flex;
        align-items: center;
        min-height: var(--target-min);
    }
}
