/* Hallmark · shape: Index-First (archive search) · genre: playful · theme: Sticker (deal 1/3, seed tukda-free-open-source-collage-6f88·6cc0ff94·2026-11-29·r0) · job: try · draw: manual
 * hero: a search box under the page title · nav: shared with the landing page · footer: mast, shared · imagery: the archive itself, plain and captioned · signature: a quiet, gallery-clean grid where the prints carry the colour · sticker: sheet
 * axes: light/display-heavy/chromatic-magenta · posture: full-palette · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H3 E4 S4 R3 V4 · weakest: H, a utility page with no hero picture; the grid starts on the first screen */
:root { --sw-red: oklch(55% 0.2 27); --sw-orange: oklch(70% 0.17 55); --sw-yellow: oklch(86% 0.17 95); --sw-green: oklch(62% 0.15 145); --sw-blue: oklch(52% 0.15 255); }

.explore { padding-block: var(--space-xl) var(--section-gap-s); }
.explore__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap-columns); align-items: end; }
.explore__head h1 { font-size: min(var(--text-display-s), 3rem); }
.bigsearch { display: flex; height: 52px; border-radius: var(--radius-pill); background: var(--color-paper-3); box-shadow: inset 0 0 0 2px var(--color-ink); }
.bigsearch:focus-within { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.bigsearch input { flex: 1; min-width: 0; padding: 0 var(--space-lg); border: 0; background: transparent; color: var(--color-ink); font-size: var(--text-md); outline: none; }
.bigsearch input::placeholder { color: var(--color-muted); }
.bigsearch__go { margin: var(--space-2xs); padding: 0 var(--space-lg); border: 0; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font-weight: 700; cursor: pointer; }
.bigsearch__go:hover { background: var(--color-ink-2); }
.bigsearch__go:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

/* toolbar: pills left, view + sort right */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-md); margin-top: var(--space-2xl); }
.toolbar__filters, .toolbar__right { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.toolbar__right { gap: var(--space-lg); }
.tpill { display: inline-flex; align-items: center; gap: var(--space-xs); height: 40px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-weight: 600; font-size: var(--text-sm); cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--color-ink); }
.tpill:hover { background: var(--color-paper-2); }
.tpill:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.tpill--drop::after { content: ""; width: 7px; height: 7px; margin-left: var(--space-3xs); border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; translate: 0 -2px; }
.roundbtn::before { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: -45deg; translate: -2px 0; }
#d-prev::before, #i-prev::before { rotate: 135deg; translate: 2px 0; }
.tpill[aria-expanded="true"] { background: var(--color-ink); color: var(--color-paper); }
.tpill[data-count]::before { content: attr(data-count); display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-accent-2); color: var(--color-ink); font-size: var(--text-xs); font-weight: 700; }
.tlink { display: inline-flex; align-items: center; gap: var(--space-xs); padding: 0; border: 0; background: transparent; color: var(--color-ink); font-weight: 600; font-size: var(--text-sm); cursor: pointer; }
.tlink:hover { text-decoration: underline; text-decoration-color: var(--color-accent); }
.tlink:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.sort select { padding: 0; border: 0; background: transparent; color: var(--color-ink); font: inherit; font-weight: 600; cursor: pointer; }
.sort select:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

.drop { position: relative; }
.drop__panel { position: absolute; left: 0; top: calc(100% + 8px); z-index: var(--z-dropdown); min-width: 240px; padding: var(--space-md); border: 4px solid var(--color-white); border-radius: var(--radius-card); background: var(--color-paper-3); box-shadow: var(--shadow-card); }
.drop__panel--swatches { min-width: 0; }

/* facet controls (dropdowns and the all-filters drawer) */
.check { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-2xs) 0; cursor: pointer; white-space: nowrap; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-ink); }
.check input:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.check span { flex: 1; }
.check small { color: var(--color-muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.check:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.swatches { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.swatch { position: relative; width: 34px; height: 34px; border: 3px solid var(--color-white); border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1.5px var(--color-ink); }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked) { box-shadow: 0 0 0 1.5px var(--color-ink), 0 0 0 5px var(--color-accent-2); }
.swatch:has(input:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 6px; }
.swatch:has(input:disabled) { opacity: 0.3; cursor: not-allowed; }
.swatch--red { background: var(--sw-red); } .swatch--orange { background: var(--sw-orange); } .swatch--yellow { background: var(--sw-yellow); }
.swatch--green { background: var(--sw-green); } .swatch--blue { background: var(--sw-blue); } .swatch--bw { background: linear-gradient(135deg, var(--color-ink) 50%, var(--color-white) 50%); }

.filters { position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-modal); display: grid; gap: var(--space-lg); align-content: start; width: min(420px, 100%); padding: var(--space-xl); background: var(--color-paper); box-shadow: -6px 0 0 var(--color-ink); overflow-y: auto; }
.filters__head { display: flex; align-items: center; justify-content: space-between; }
.filters__title { font-size: var(--text-xl); }
.facet { margin: 0; padding: 0 0 var(--space-lg); border: 0; border-bottom: var(--rule-bar) dashed var(--color-rule); }
.facet legend { padding: 0; margin-bottom: var(--space-sm); font-weight: 700; }

/* results */
.results__count { margin-top: var(--space-xl); font-size: var(--text-sm); font-weight: 600; font-variant-numeric: tabular-nums; }
.active { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-sm); }
.active:empty { display: none; }
.pill { display: inline-flex; align-items: center; height: 32px; padding: 0 var(--space-sm); border: 0; border-radius: var(--radius-pill); background: var(--color-ink); color: var(--color-paper); font-weight: 600; font-size: var(--text-xs); cursor: pointer; }
.pill:hover { background: var(--color-ink-2); }
.pill:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.pill--clear { background: transparent; color: var(--color-ink); text-decoration: underline; }
.pill--clear:hover { background: var(--color-paper-2); }

.grid { columns: 4 230px; column-gap: var(--space-xl); margin: var(--space-lg) 0 0; padding: 0; list-style: none; }
.card { break-inside: avoid; margin-bottom: var(--space-xl); }
.card__pic { display: block; width: 100%; padding: 0; border: 0; background: var(--color-slot); cursor: pointer; }
.card__pic img { width: 100%; height: auto; transition: opacity var(--dur-micro) var(--ease-out); }
.card__pic:hover img { opacity: 0.88; }
.card__pic:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.card__title { margin-top: var(--space-sm); font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__date { color: var(--color-muted); font-style: italic; }
.card__meta { color: var(--color-muted); font-size: var(--text-sm); }
.empty { margin-top: var(--space-xl); color: var(--color-muted); font-weight: 600; }

/* detail view, like an artwork page */
dialog { color: var(--color-ink); }
.detail { width: 100%; max-width: 100%; height: 100dvh; max-height: 100%; margin: 0; padding: 0; border: 0; background: var(--color-paper); }
.detail[open] { display: grid; grid-template-rows: auto 1fr; }
.detail__bar { display: flex; align-items: center; justify-content: space-between; padding: var(--space-md) var(--space-xl); border-bottom: var(--rule-hair) solid var(--color-rule); }
.detail__nav { display: flex; gap: var(--space-sm); }
.detail__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-3xl); padding: var(--space-xl); overflow-y: auto; }
.detail__img { margin: 0; display: grid; place-items: start center; min-width: 0; }
.detail__img img { width: auto; max-width: 100%; max-height: calc(100dvh - 160px); }
.detail__text { display: grid; gap: var(--space-md); align-content: start; }
.detail__title { font-family: var(--font-body); font-weight: 600; font-size: var(--text-2xl); line-height: 1.2; max-width: none; letter-spacing: 0; }
.detail__sub { color: var(--color-muted); font-size: var(--text-lg); font-style: italic; }
.detail__actions { display: grid; gap: var(--space-sm); margin-block: var(--space-md); }
.btn--block { width: 100%; }
.detail__about { margin-top: var(--space-md); padding-bottom: var(--space-sm); border-bottom: var(--rule-hair) solid var(--color-rule); font-family: var(--font-body); font-weight: 600; font-size: var(--text-lg); letter-spacing: 0; }
.detail__facts { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); gap: var(--space-sm) var(--space-md); margin: 0; }
.detail__facts dt { color: var(--color-ink); }
.detail__facts dd { margin: 0; color: var(--color-muted); }
.detail__facts a { color: var(--color-muted); text-decoration-color: var(--color-rule); }
.detail__facts a:hover { color: var(--color-ink); text-decoration-color: var(--color-accent); }
.detail__facts a:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.roundbtn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--color-paper-3); color: var(--color-ink); font-size: var(--text-xl); line-height: 1; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--color-rule); }
.roundbtn:hover { box-shadow: inset 0 0 0 1.5px var(--color-ink); }
.roundbtn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.roundbtn:disabled { opacity: 0.35; cursor: not-allowed; }

/* immersive view */
.immersive { width: 100%; max-width: 100%; height: 100dvh; max-height: 100%; margin: 0; padding: var(--space-lg); border: 0; background: var(--color-paper); }
.immersive[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-lg); }
.immersive::backdrop { background: var(--color-paper); }
.immersive__close { position: absolute; top: var(--space-lg); right: var(--space-lg); }
.immersive__fig { margin: 0; display: grid; justify-items: center; gap: var(--space-md); min-width: 0; }
.immersive__img img { width: auto; max-width: 100%; max-height: calc(100dvh - 140px); }
.immersive figcaption { max-width: 70ch; color: var(--color-muted); text-align: center; }
.nav__links a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--color-accent-2); }

/* save (heart) + share */
.heart { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
[aria-pressed="true"] > .heart { fill: var(--color-accent); stroke: var(--color-accent); }
.detail__head { display: flex; align-items: start; justify-content: space-between; gap: var(--space-md); }
.save { flex: none; display: inline-flex; align-items: center; gap: var(--space-xs); height: 40px; padding: 0 var(--space-md); border: 0; border-radius: var(--radius-pill); background: transparent; color: var(--color-ink); font-weight: 600; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--color-ink); }
.save:hover { background: var(--color-paper-2); }
.save:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.nav__links .nav__saved { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.nav__saved .heart { width: 18px; height: 18px; }
.nav__saved[aria-current="true"] .heart, .nav__saved.has-saved .heart { fill: var(--color-accent-2); stroke: var(--color-accent-2); }
.nav__count { font-variant-numeric: tabular-nums; }
.nav__count:not(:empty)::before { content: "("; } .nav__count:not(:empty)::after { content: ")"; }
.card__row { display: flex; align-items: start; justify-content: space-between; gap: var(--space-sm); }
.card__save { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-top: var(--space-2xs); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--color-ink); cursor: pointer; }
.card__save:hover { background: var(--color-paper-2); }
.card__save:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.toast { position: fixed; left: 50%; bottom: var(--space-xl); translate: -50% 0; z-index: var(--z-toast); padding: var(--space-sm) var(--space-lg); border: 4px solid var(--color-white); border-radius: var(--radius-pill); background: var(--color-accent-2); color: var(--color-ink); font-weight: 700; box-shadow: var(--shadow-card); opacity: 0; pointer-events: none; transition: opacity var(--dur-short) var(--ease-out); }
.toast.is-on { opacity: 1; }

@media (max-width: 60rem) {
  .explore__head { grid-template-columns: minmax(0, 1fr); }
  .toolbar { margin-top: var(--space-xl); }
  .drop { display: none; }
  .nav__links .nav__saved { display: inline-flex; }
  .grid { columns: 2; column-gap: var(--space-md); }
  .card { margin-bottom: var(--space-lg); }
  .card__title { font-size: var(--text-sm); }
  .detail__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); padding: var(--space-md); }
  .detail__bar { padding: var(--space-sm) var(--space-md); }
  .detail__img img { max-height: 55dvh; }
  .immersive[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; }
  .immersive__prev, .immersive__next { position: absolute; bottom: var(--space-lg); }
  .immersive__prev { left: var(--space-lg); } .immersive__next { right: var(--space-lg); }
  .filters { width: 100%; box-shadow: none; }
}
