:root {
  color-scheme: light;
  --paper: #f3eddf;
  --paper-deep: #e6dbc8;
  --ink: #25271f;
  --muted: #6f6c60;
  --rule: #c9beaa;
  --red: #9c3f31;
  --green: #345c50;
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }

.masthead {
  min-height: 76px;
  padding: 18px clamp(22px, 5vw, 76px);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wordmark { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-family: var(--serif); font-size: 1.08rem; }
.wordmark__mark { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-family: var(--sans); font-size: .62rem; letter-spacing: .08em; }
.edition, .kicker { margin: 0; text-transform: uppercase; letter-spacing: .13em; font-size: .7rem; font-weight: 600; }
.edition { color: var(--muted); }

.hero {
  min-height: 570px;
  padding: clamp(80px, 12vw, 160px) clamp(22px, 8vw, 130px) 70px;
  position: relative;
  overflow: hidden;
}
.hero::after { content: ""; position: absolute; right: -8vw; top: 40px; width: min(36vw, 500px); aspect-ratio: 1; border: 1px solid var(--rule); border-radius: 50%; box-shadow: 0 0 0 55px rgba(201,190,170,.2), 0 0 0 110px rgba(201,190,170,.12); pointer-events: none; }
.hero .kicker { color: var(--red); margin-bottom: 25px; }
.hero h1 { max-width: 900px; margin: 0; font-family: var(--serif); font-size: clamp(3.15rem, 7.5vw, 7rem); font-weight: 500; line-height: .98; letter-spacing: -.045em; position: relative; z-index: 1; }
.hero h1 em { color: var(--red); font-weight: inherit; }
.hero__intro { max-width: 590px; margin: 34px 0 36px; color: var(--muted); font-family: var(--serif); font-size: clamp(1.08rem, 2vw, 1.32rem); line-height: 1.6; }
.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; position: relative; z-index: 2; }
.hero__jump, .hero__quiz-trigger { min-height: 48px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 2px; font-size: .78rem; font-weight: 600; }
.hero__jump { display: inline-flex; align-items: center; gap: 11px; background: var(--ink); color: var(--paper); }
.hero__quiz-trigger { background: rgba(243,237,223,.72); color: var(--ink); }
.hero__jump:hover { background: var(--red); border-color: var(--red); }
.hero__quiz-trigger:hover { color: var(--red); border-color: var(--red); }
.hero__jump:focus-visible, .hero__quiz-trigger:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.aperture-icon { width: 19px; aspect-ratio: 1; border: 1px solid currentColor; border-radius: 50%; background: repeating-conic-gradient(from 8deg, currentColor 0 2deg, transparent 2deg 60deg); position: relative; }
.aperture-icon::after { content: ""; position: absolute; inset: 5px; border: 1px solid currentColor; border-radius: 50%; }

.taste-quiz { width: min(880px, calc(100vw - 32px)); max-height: min(800px, calc(100vh - 32px)); padding: 0; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); box-shadow: 0 30px 100px rgba(20,22,18,.34); }
.taste-quiz::backdrop { background: rgba(24,26,21,.72); backdrop-filter: blur(5px); }
.taste-quiz__shell { padding: clamp(24px, 5vw, 52px); }
.taste-quiz__header { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--rule); }
.taste-quiz__header .kicker, .quiz-results .kicker { color: var(--red); margin-bottom: 9px; }
.taste-quiz h2, .quiz-results h3 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.035em; }
.taste-quiz h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
.quiz-close { width: 44px; height: 44px; flex: 0 0 auto; border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.7rem; line-height: 1; }
.quiz-close:hover { border-color: var(--red); color: var(--red); }
.quiz-form fieldset { margin: 0; padding: 25px 0; border: 0; border-bottom: 1px solid var(--rule); }
.quiz-form legend { width: 100%; margin-bottom: 15px; font-family: var(--serif); font-size: 1.2rem; }
.quiz-form legend span { display: inline-block; width: 34px; color: var(--red); font-family: var(--sans); font-size: .64rem; letter-spacing: .08em; }
.quiz-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.quiz-choices label { position: relative; }
.quiz-choices input { position: absolute; opacity: 0; }
.quiz-choices label span { min-height: 58px; display: grid; place-items: center; padding: 9px; border: 1px solid var(--rule); text-align: center; font-size: .74rem; line-height: 1.25; cursor: pointer; }
.quiz-choices input:checked + span { border-color: var(--red); background: var(--red); color: var(--paper); }
.quiz-choices input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.quiz-submit { min-height: 48px; margin-top: 25px; padding: 0 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 600; }
.quiz-submit:hover { background: var(--red); border-color: var(--red); }
.quiz-results { padding-top: 28px; }
.quiz-results h3 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.quiz-results__list { margin: 24px 0 20px; border-top: 1px solid var(--rule); }
.quiz-pick { width: 100%; display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 18px 4px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; color: var(--ink); text-align: left; }
.quiz-pick:hover { color: var(--red); }
.quiz-pick__number { color: var(--red); font-size: .65rem; letter-spacing: .08em; }
.quiz-pick__copy { display: grid; gap: 4px; }
.quiz-pick__copy strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.quiz-pick__copy small { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.quiz-pick__arrow { font-size: 1.2rem; }
.quiz-retake { padding: 0 0 4px; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--red); font-size: .75rem; font-weight: 600; }

.shutter-transition { position: fixed; left: 50%; top: 50%; z-index: 100; width: 220vmax; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 220vmax #171914; pointer-events: none; opacity: 0; }
.is-shuttering .shutter-transition { animation: shutter-aperture .92s cubic-bezier(.7,0,.3,1) both; }
@keyframes shutter-aperture {
  0% { width: 220vmax; opacity: 1; }
  43%, 57% { width: 0; opacity: 1; }
  100% { width: 220vmax; opacity: 0; }
}

.notebook { padding: 70px clamp(22px, 5vw, 76px) 110px; background: #ebe2d2; border-top: 1px solid var(--rule); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 30px; }
.section-heading .kicker { color: var(--red); margin-bottom: 9px; }
.section-heading h2 { font-family: var(--serif); font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 500; margin: 0; letter-spacing: -.035em; }
.result-count { color: var(--muted); font-size: .8rem; }

.filters { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: minmax(230px, 1.5fr) repeat(3, minmax(140px, .72fr)); gap: 12px; margin-inline: calc(-1 * clamp(22px, 5vw, 76px)); padding: 18px clamp(22px, 5vw, 76px); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: rgba(235,226,210,.96); box-shadow: 0 8px 18px rgba(37,39,31,.08); backdrop-filter: blur(10px); }
.filters label { display: grid; gap: 7px; color: var(--muted); font-size: .67rem; text-transform: uppercase; letter-spacing: .08em; }
.filters input, .filters select { width: 100%; min-height: 44px; padding: 0 12px; color: var(--ink); background: rgba(255,255,255,.28); border: 1px solid var(--rule); border-radius: 2px; outline: none; text-transform: none; letter-spacing: 0; }
.filters input:focus, .filters select:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(156,63,49,.12); }
.filter-actions { grid-column: 1 / -1; display: flex; gap: 10px; padding-top: 5px; }
.primary-button, .quiet-button { min-height: 42px; border: 1px solid var(--ink); padding: 0 17px; border-radius: 2px; }
.primary-button { background: var(--ink); color: var(--paper); }
.quiet-button { background: transparent; color: var(--ink); }
.primary-button:disabled { opacity: .55; cursor: wait; }

.status { min-height: 28px; margin: 26px 0 18px; color: var(--muted); font-family: var(--serif); font-style: italic; }
.status--busy::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; border: 1px solid var(--red); border-top-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
.status--error { color: #8a2f25; }
.status--empty { padding: 24px; border: 1px dashed var(--rule); text-align: center; }
@keyframes spin { to { transform: rotate(360deg); } }

.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.card { display: grid; grid-template-columns: minmax(135px, .62fr) 1fr; min-height: 390px; padding: 24px; gap: 25px; border-bottom: 1px solid var(--rule); opacity: 0; animation: arrive .45s ease forwards; animation-delay: calc(var(--card-index) * 70ms); }
.card:nth-child(odd) { border-right: 1px solid var(--rule); padding-left: 0; }
.card:nth-child(even) { padding-right: 0; }
@keyframes arrive { to { opacity: 1; } }
.card__poster { aspect-ratio: 3 / 4; max-height: 340px; background: var(--paper-deep); overflow: hidden; }
.card__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__poster--fallback { display: grid; place-items: center; background: linear-gradient(145deg, #3e5b55, #a16850); position: relative; }
.card__poster--fallback::before { content: ""; position: absolute; width: 55%; aspect-ratio: 1; border: 1px solid rgba(243,237,223,.55); border-radius: 50%; box-shadow: 0 0 0 18px rgba(243,237,223,.08); }
.poster-mark { color: var(--paper); font-family: var(--serif); font-size: 2rem; z-index: 1; }
.card__body { padding: 6px 0; display: flex; flex-direction: column; align-items: start; }
.card__eyebrow { width: 100%; display: flex; justify-content: space-between; gap: 12px; color: var(--red); text-transform: uppercase; letter-spacing: .09em; font-size: .62rem; font-weight: 600; }
.card__eyebrow .date { color: var(--muted); white-space: nowrap; }
.card__title { margin: 18px 0 10px; font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1; font-weight: 500; letter-spacing: -.035em; }
.card__buyer { margin: 0 0 19px; font-size: .82rem; }
.card__buyer .label { display: block; margin-bottom: 2px; color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; }
.card__synopsis { margin: 0; color: #555549; font-family: var(--serif); line-height: 1.55; font-size: .96rem; }
.card__meta { width: 100%; display: grid; grid-template-columns: auto 1fr; gap: 4px 15px; margin: auto 0 18px; padding-top: 18px; font-size: .7rem; border-top: 1px solid var(--rule); }
.card__meta dt { color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.card__meta dd { margin: 0; }
.card__detail { margin-bottom: 14px; padding-left: 12px; border-left: 2px solid var(--red); color: var(--muted); font-family: var(--serif); font-size: .9rem; line-height: 1.5; }
.card__detail-copy { margin: 0 0 10px; }
.card__source-link { color: var(--red); font-family: var(--sans); font-size: .72rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
.card__detail--busy { font-style: italic; }
.card__detail--error { color: var(--red); }
.text-button { padding: 0 0 4px; border: 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--red); font-size: .75rem; font-weight: 600; }
.text-button:disabled { cursor: wait; opacity: .58; }

.back-to-top { position: fixed; right: clamp(16px, 3vw, 34px); bottom: clamp(16px, 3vw, 32px); z-index: 30; min-width: 48px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 13px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); box-shadow: 0 8px 24px rgba(37,39,31,.22); font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.back-to-top[hidden] { display: none; }
.back-to-top:hover { background: var(--red); border-color: var(--red); }
.back-to-top:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.back-to-top span:first-child { font-size: 1rem; line-height: 1; }

footer { min-height: 150px; padding: 38px clamp(22px, 5vw, 76px); display: flex; justify-content: space-between; border-top: 1px solid var(--rule); font-family: var(--serif); }
footer p:last-child { color: var(--muted); font-size: .85rem; }

@media (max-width: 940px) {
  .filters { display: flex; align-items: end; gap: 10px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
  .filters label { flex: 0 0 155px; }
  .filters .search-field { flex-basis: 220px; }
  .filter-actions { grid-column: auto; flex: 0 0 auto; padding-top: 0; }
  .filter-actions button { white-space: nowrap; }
  .results { grid-template-columns: 1fr; }
  .card:nth-child(odd) { border-right: 0; padding-left: 0; }
  .card:nth-child(even) { padding-right: 24px; padding-left: 0; }
}

@media (max-width: 600px) {
  .masthead { min-height: 64px; padding-block: 13px; }
  .edition { display: none; }
  .hero { min-height: 510px; padding-top: 90px; }
  .hero::after { width: 240px; right: -100px; top: 100px; }
  .hero h1 { font-size: clamp(2.85rem, 14vw, 4.2rem); }
  .hero__actions { align-items: stretch; flex-direction: column; }
  .hero__jump, .hero__quiz-trigger { justify-content: center; width: 100%; }
  .taste-quiz { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  .taste-quiz__shell { padding: 22px 18px 28px; }
  .quiz-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quiz-choices label:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .notebook { padding-top: 54px; padding-bottom: 75px; }
  .section-heading { align-items: start; }
  .filters { padding-block: 13px; }
  .card, .card:nth-child(even) { grid-template-columns: 112px minmax(0, 1fr); gap: 17px; padding: 22px 0; min-height: 330px; }
  .card__poster { max-height: 220px; }
  .card__title { font-size: 1.8rem; margin-top: 13px; }
  .card__synopsis { font-size: .88rem; }
  .card__meta { grid-column: 1 / -1; }
  footer { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
