@font-face { font-family: "Library Serif"; src: local("Iowan Old Style"), local("Baskerville"); }

:root {
  --paper: #f1efe8;
  --ink: #11110f;
  --muted: #6b6962;
  --rule: rgba(17, 17, 15, 0.22);
  --blue: #1227d8;
  --pad: clamp(18px, 3vw, 44px);
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Library Serif", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.masthead {
  min-height: 118px;
  padding: 22px var(--pad);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
}
.wordmark { font-size: 18px; line-height: .84; letter-spacing: -.06em; font-weight: 700; text-decoration: none; width: max-content; }
.masthead-meta { display: flex; gap: clamp(24px, 7vw, 110px); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

.intro {
  min-height: min(64vh, 650px);
  padding: clamp(50px, 9vw, 130px) var(--pad) 46px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, .55fr);
  gap: 7vw;
  align-items: end;
  border-bottom: 1px solid var(--rule);
}
.intro h1 { margin: 0; max-width: 950px; font-size: clamp(58px, 9.7vw, 154px); line-height: .79; font-weight: 600; letter-spacing: -.075em; }
.intro h1 em { font-family: var(--serif); font-weight: 400; }
.intro p { margin: 0; max-width: 400px; font-size: clamp(15px, 1.4vw, 20px); line-height: 1.45; letter-spacing: -.02em; }

.library { padding: 0 var(--pad) 90px; }
.tools { position: sticky; top: 0; z-index: 4; margin: 0 calc(var(--pad) * -1); padding: 16px var(--pad); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(280px, .8fr) 1.7fr; gap: 20px; align-items: center; }
.search { height: 48px; border-bottom: 1px solid var(--ink); display: flex; align-items: center; gap: 10px; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search input::placeholder { color: var(--muted); opacity: 1; }
kbd { color: var(--muted); font-size: 11px; border: 1px solid var(--rule); padding: 2px 6px; border-radius: 2px; }
.tag-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.tag-filter { flex: 0 0 auto; min-height: 36px; padding: 7px 14px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; cursor: pointer; font-size: 12px; }
.tag-filter:hover, .tag-filter:focus-visible, .tag-filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.results-status { margin: 18px 0; min-height: 1em; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

.collection-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.collection-card { grid-column: span 12; border-top: 1px solid var(--ink); padding-top: 12px; }
.collection-open { width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.cover-frame { position: relative; margin: 0; overflow: hidden; background: #d8d6cf; aspect-ratio: 16 / 8.5; }
.cover-image { width: 100%; height: 100%; object-fit: cover; transition: transform 650ms cubic-bezier(.2,.75,.25,1), filter 300ms ease; }
.collection-open:hover .cover-image { transform: scale(1.015); }
.image-count { position: absolute; top: 12px; right: 12px; min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--paper); font-size: 11px; }
.card-copy { display: grid; grid-template-columns: 75px 1fr auto; gap: 20px; padding: 17px 0 28px; align-items: start; }
.card-index { margin: 3px 0 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.card-title { margin: 0; font-size: clamp(24px, 3vw, 44px); letter-spacing: -.045em; line-height: 1; }
.card-description { max-width: 760px; margin: 12px 0 16px; font-size: 14px; line-height: 1.5; color: #383731; }
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.card-tags li { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--rule); padding-bottom: 3px; }
.card-arrow { font-size: 25px; line-height: 1; transition: transform 200ms ease; }
.collection-open:hover .card-arrow { transform: translate(3px, -3px); }
.empty-state { border-top: 1px solid var(--ink); padding: 50px 0; }
.empty-state p { font-family: var(--serif); font-size: 34px; }
.empty-state button { min-height: 44px; padding: 0; border: 0; border-bottom: 1px solid; background: none; cursor: pointer; }

.collection-dialog { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); }
.collection-dialog::backdrop { background: var(--ink); }
.collection-dialog[open] { animation: reveal 320ms ease both; }
.dialog-shell { min-height: 100%; }
.dialog-header { position: sticky; top: 0; z-index: 5; min-height: 84px; padding: 18px var(--pad); display: flex; justify-content: space-between; border-bottom: 1px solid var(--rule); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(12px); }
.close-button { align-self: center; min-width: 96px; min-height: 44px; padding: 0 0 0 16px; border: 1px solid var(--ink); background: transparent; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.close-button span:last-child { padding: 0 13px; font-size: 22px; }
.detail-intro { padding: clamp(52px, 8vw, 110px) var(--pad) 52px; display: grid; grid-template-columns: 75px minmax(0, 1.4fr) minmax(270px, .6fr); gap: 22px; align-items: end; }
.detail-kicker { margin: 4px 0 0; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.detail-title { margin: 0; max-width: 900px; font-size: clamp(52px, 8.5vw, 136px); line-height: .83; letter-spacing: -.07em; }
.detail-title em { display: block; font-family: var(--serif); font-weight: 400; }
.detail-summary { margin: 0; font-size: clamp(16px, 1.5vw, 21px); line-height: 1.45; letter-spacing: -.02em; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 25px 0 0; padding: 0; list-style: none; }
.detail-tags li { padding: 7px 11px; border: 1px solid var(--rule); border-radius: 999px; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.image-sequence { padding: 0 var(--pad) 80px; }
.image-item { margin: 0 0 clamp(20px, 5vw, 72px); }
.image-item img { width: 100%; max-height: 92vh; object-fit: contain; object-position: left center; background: #dedbd2; }
.image-caption { display: grid; grid-template-columns: 75px 1fr auto; gap: 22px; padding-top: 10px; border-top: 1px solid var(--rule); margin-top: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.image-caption a { text-underline-offset: 3px; }
.source-note { padding: 22px var(--pad) 60px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 30px; font-size: 11px; color: var(--muted); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

@media (max-width: 760px) {
  .masthead { min-height: 88px; }
  .masthead-meta { min-width: 0; }
  .masthead-meta span:last-child { display: none; }
  .intro { min-height: 480px; grid-template-columns: minmax(0, 1fr); gap: 42px; }
  .intro > * { min-width: 0; }
  .intro h1 { max-width: 100%; font-size: clamp(48px, 14.5vw, 62px); }
  .tools { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .tools > * { min-width: 0; }
  .tag-filters { width: 100%; max-width: 100%; }
  .card-copy { grid-template-columns: 42px 1fr auto; gap: 10px; }
  .card-description { font-size: 13px; }
  .detail-intro { grid-template-columns: 42px minmax(0, 1fr); }
  .detail-intro > * { min-width: 0; }
  .detail-summary-wrap { grid-column: 2; min-width: 0; }
  .detail-title { font-size: clamp(48px, 15vw, 78px); }
  .detail-tags { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .detail-tags li { flex: 0 0 auto; }
  .image-caption { grid-template-columns: 42px 1fr; gap: 10px; }
  .image-caption a { grid-column: 2; }
  .source-note { flex-direction: column; }
}
