.archive-filter-chip {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 9999px;
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    cursor: pointer;
    user-select: none;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.archive-filter-chip:hover {
    border-color: hsl(var(--gold));
    background: hsl(var(--gold) / 0.12);
    transform: translateY(-1px);
}

.archive-filter-chip[data-selected="true"] {
    border-color: hsl(var(--gold));
    background: hsl(var(--gold));
    color: hsl(var(--primary-foreground));
    box-shadow: 0 0 0 2px hsl(var(--background)), 0 0 0 4px hsl(var(--gold) / 0.55);
    font-weight: 700;
}

.archive-filter-chip[data-selected="true"]::before {
    content: "✓";
    margin-right: 0.35rem;
    font-weight: 800;
}

.archive-filter-chip:has(input:focus-visible) {
    outline: 3px solid hsl(var(--ring));
    outline-offset: 3px;
}

[data-result-card] > a:first-child {
    cursor: pointer;
}

.archive-result-title--compact,
.archive-result-metadata--compact {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
}

.archive-result-title--compact {
    max-height: 3rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.archive-result-metadata--compact {
    max-height: 4.5rem;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.archive-recently-viewed {
    margin-bottom: 1.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: 1rem;
    background: hsl(var(--card));
}

.archive-recently-viewed__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

.archive-recently-viewed__list {
    display: grid;
    grid-auto-columns: minmax(11rem, 13rem);
    grid-auto-flow: column;
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 0 0.7rem;
    scrollbar-color: hsl(var(--gold)) hsl(var(--muted));
    scrollbar-width: thin;
}

.archive-recently-viewed__list::-webkit-scrollbar {
    height: 0.55rem;
}

.archive-recently-viewed__list::-webkit-scrollbar-track {
    border-radius: 999px;
    background: hsl(var(--muted));
}

.archive-recently-viewed__list::-webkit-scrollbar-thumb {
    border: 2px solid hsl(var(--muted));
    border-radius: 999px;
    background: hsl(var(--gold));
}

.archive-recently-viewed__list a {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    min-height: 4rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.55rem;
    padding: 0.4rem;
    background: hsl(var(--background));
    text-decoration: none;
}

.archive-recently-viewed__list a:hover {
    border-color: hsl(var(--gold));
}

.archive-recently-viewed__list img,
.archive-recently-viewed__placeholder {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.4rem;
    object-fit: cover;
    background: hsl(var(--muted));
}

.archive-recently-viewed__placeholder {
    display: grid;
    place-items: center;
    padding: 0.25rem;
    color: hsl(var(--muted-foreground));
    font-size: 0.62rem;
    text-align: center;
}

.archive-recently-viewed__list small,
.archive-recently-viewed__list strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-recently-viewed__list small {
    color: hsl(var(--muted-foreground));
    font-size: 0.68rem;
}

.archive-recently-viewed__list strong {
    font: 600 0.86rem var(--font-heading);
}

.archive-pagination-footer {
    display: grid;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

.archive-pagination-footer [data-keyboard-pagination] {
    flex-wrap: wrap;
}

.archive-pagination-footer [data-keyboard-pagination] > a,
.archive-pagination-footer [data-keyboard-pagination] > span {
    border-radius: var(--radius);
}

.archive-page-size-control {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.45rem 0.5rem 0.45rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 0.65rem;
    background: hsl(var(--card));
    box-shadow: 0 0.25rem 0.8rem hsl(var(--foreground) / 0.05);
}

.archive-page-size-control label {
    margin: 0;
    color: hsl(var(--muted-foreground));
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.archive-page-size-select {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 4.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.archive-page-size-select:hover {
    border-color: hsl(var(--gold));
    background: hsl(var(--gold) / 0.08);
}

.archive-page-size-select select {
    width: 100%;
    min-height: 2.15rem;
    appearance: none;
    border: 0;
    border-radius: inherit;
    outline: 0;
    background: transparent;
    color: hsl(var(--foreground));
    color-scheme: light;
    cursor: pointer;
    padding: 0.3rem 1.8rem 0.3rem 0.7rem;
    font: inherit;
    font-weight: 700;
}

.dark .archive-page-size-select select {
    color-scheme: dark;
}

.archive-page-size-select select option {
    background: hsl(var(--popover));
    color: hsl(var(--popover-foreground));
}

.archive-page-size-select select option:checked,
.archive-page-size-select select option:hover {
    background: Highlight;
    color: HighlightText;
}

.archive-page-size-select > span {
    position: absolute;
    right: 0.55rem;
    pointer-events: none;
    color: hsl(var(--gold));
}

.archive-page-size-select:focus-within {
    border-color: hsl(var(--ring));
    outline: 3px solid hsl(var(--ring));
    outline-offset: 3px;
}

.archive-page-size-select select:focus-visible {
    outline: 0;
}

@media (min-width: 768px) {
    .archive-pagination-footer {
        grid-template-columns: minmax(8rem, 1fr) auto minmax(8rem, 1fr);
    }

    .archive-pagination-footer [data-keyboard-pagination] {
        grid-column: 2;
    }

    .archive-page-size-control {
        grid-column: 3;
        justify-self: end;
    }
}

.object-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.object-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid hsl(var(--gold));
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
}

.object-action-link:hover {
    background: hsl(var(--gold) / 0.14);
}


.archive-results-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.archive-results-heading__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.archive-compare-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid hsl(var(--gold));
    border-radius: var(--radius);
    background: hsl(var(--gold));
    color: hsl(var(--primary-foreground));
    font-weight: 700;
    text-decoration: none;
}

.archive-compare-link:hover {
    filter: brightness(1.07);
}

.archive-result-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr));
}

[data-result-card] {
    min-width: 0;
}

[data-result-card] > [data-search-result-link] {
    min-width: 0;
}

.archive-result-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
}


.archive-result-text-tile {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  gap: 0.55rem;
  padding: 1.25rem;
  text-align: center;
  color: hsl(var(--foreground));
  background:
    linear-gradient(145deg, hsl(var(--gold) / 0.16), transparent 58%),
    hsl(var(--muted));
}

.archive-result-text-tile strong {
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1rem, 2vw, 1.45rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.archive-result-text-tile small {
  color: hsl(var(--muted-foreground));
  font-size: 0.85rem;
}

.archive-result-text-tile--mobile {
  width: 5rem;
  height: 5rem;
  flex: 0 0 5rem;
  border-radius: 0.375rem;
  padding: 0.4rem;
}

.archive-result-text-tile--mobile strong {
  font-size: 0.72rem;
}

.archive-result-text-tile--mobile small {
  font-size: 0.65rem;
}
