:root {
  --bg: #efe6d4;
  --surface: #fbf7ee;
  --ink: #1d1a16;
  --muted: #5e554a;
  --accent: #c2371a;
  --accent-ink: #fff8ee;
  --rule: #1d1a16;
  --hole: #efe6d4;
  --display: "Avenir Next Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: Georgia, "Times New Roman", serif;
  --mono: "SF Mono", Menlo, Consolas, "Courier New", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }

.skip-link {
  position: absolute;
  left: var(--s4);
  top: -100px;
  background: var(--ink);
  color: var(--accent-ink);
  padding: var(--s3) var(--s5);
  z-index: 10;
}
.skip-link:focus-visible { top: var(--s2); }

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3) var(--s5);
  padding: var(--s3) clamp(var(--s5), 4vw, var(--s8));
  border-bottom: 2px solid var(--rule);
}
.wordmark {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  padding-block: var(--s2);
}
.site-header nav { display: flex; gap: var(--s2); }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--s3);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 180ms var(--ease), transform 180ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { border-bottom-color: var(--accent); }
}
.nav-link:active { transform: scale(0.97); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:focus:not(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--s7) var(--s6);
  align-items: center;
  padding: var(--s9) clamp(var(--s5), 4vw, var(--s8));
  padding-bottom: var(--s10);
}
.hero-copy { display: flex; flex-direction: column; gap: var(--s5); }
.hero h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 6.4vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-wrap: balance;
  animation: rise 700ms var(--ease) both;
}
.lede { max-width: 52ch; font-size: 18px; color: var(--ink); animation: rise 700ms 90ms var(--ease) both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); animation: rise 700ms 160ms var(--ease) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--s3) var(--s5);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}
.btn-primary { background: var(--ink); color: var(--accent-ink); }
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--accent); border-color: var(--accent); }
  .btn-ghost:hover { background: var(--ink); color: var(--accent-ink); }
}

.hero-stub {
  position: relative;
  display: grid;
  gap: var(--s2);
  padding: var(--s6);
  padding-bottom: var(--s7);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
  animation: rise 800ms 220ms var(--ease) both;
  transition: transform 220ms var(--ease);
}
.hero-stub:active { transform: scale(0.97); }
.stub-label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.stub-numeral {
  font-family: var(--display);
  font-size: clamp(7rem, 22vw, 17rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: var(--accent);
}
.stub-month {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.stub-title { font-family: var(--display); font-size: 36px; font-weight: 700; line-height: 1.02; letter-spacing: -0.01em; }
.stub-meta { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.stub-holes { display: flex; flex-wrap: wrap; gap: 6px; }
.stub-cta {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-top: 2px dashed var(--ink);
  padding-top: var(--s3);
  margin-top: var(--s2);
}
@media (hover: hover) and (pointer: fine) {
  .hero-stub:hover { transform: translateY(-2px); }
}
.hero-stub:focus-visible { outline-offset: 4px; }
.hero-stub-note { grid-column: 2; font-size: 14px; color: var(--muted); margin-top: calc(var(--s3) * -1); }

.hole {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hole);
  box-shadow: inset 0 0 0 1.5px var(--ink);
}
.hole.is-taken { background: var(--ink); box-shadow: none; }

.roll {
  padding: var(--s10) clamp(var(--s5), 4vw, var(--s8));
  border-top: 2px solid var(--rule);
}
.roll-head { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s7); }
.roll h2 {
  font-family: var(--display);
  font-size: clamp(2.25rem, 4.4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--s4);
  padding-bottom: var(--s5);
  border-bottom: 1px solid var(--ink);
}
.field { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.field label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.field input, .field select {
  min-height: 44px;
  padding: var(--s2) var(--s3);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-size: 16px;
}
.field-search { flex: 1 1 280px; }
.field-filter { flex: 0 1 220px; }
.field input:focus-visible, .field select:focus-visible { outline-offset: 0; }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 44px;
  padding: var(--s2) var(--s4);
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}
.toggle[aria-pressed="true"] { background: var(--ink); color: var(--accent-ink); }
.toggle:active { transform: scale(0.97); }
.saved-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding-inline: 6px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 13px;
}
.toggle[aria-pressed="true"] .saved-count { background: var(--accent-ink); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .toggle:hover { border-color: var(--accent); }
  .toggle[aria-pressed="true"]:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
}

.result-count {
  padding-block: var(--s4);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}

.stubs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.stub {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 230px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease);
  animation: rise 500ms var(--ease) both;
}
@media (hover: hover) and (pointer: fine) {
  .stub:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
}
.stub-date {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s2);
  padding: var(--s5);
  border-right: 2px dashed var(--ink);
  transition: transform 260ms var(--ease);
}
.stub.is-saved .stub-date { transform: translateX(-8px); }
.stub-date .stub-numeral { font-size: clamp(4.5rem, 6vw, 6rem); color: var(--ink); }
.stub.is-saved .stub-numeral { color: var(--accent); }
.stub-date .stub-month { font-size: 13px; }
.stub-day { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.stub-main { display: flex; flex-direction: column; gap: var(--s3); padding: var(--s5); min-width: 0; }
.stub-category { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.stub-main h3 { font-family: var(--display); font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1; letter-spacing: -0.01em; }
.stub-main p { max-width: 60ch; font-size: 16px; }
.stub-facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-family: var(--mono); font-size: 13px; color: var(--muted); }
.stub-main .holes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: var(--s2); }

.stub-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s5);
  border-left: 2px dashed var(--ink);
}
.price { font-family: var(--display); font-size: 3.25rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.stub-actions .btn, .stub-actions .toggle { width: 100%; }
.stub-actions .toggle { justify-content: center; }

.stub .btn, .stub .toggle { min-width: 44px; }
.btn:focus-visible, .toggle:focus-visible, .nav-link:focus-visible { outline-offset: 2px; }

.empty-state {
  margin-top: var(--s7);
  padding: var(--s7);
  border: 2px dashed var(--ink);
  border-radius: var(--radius);
  display: grid;
  gap: var(--s3);
  justify-items: start;
}
.empty-state h3 { font-family: var(--display); font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.05; }
.empty-state p { max-width: 52ch; }
.empty-state[hidden] { display: none; }

.studio {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--s7) var(--s8);
  align-items: center;
  padding: var(--s10) clamp(var(--s5), 4vw, var(--s8));
  background: var(--ink);
  color: var(--accent-ink);
}
.studio .kicker { color: #d7c9b0; }
.studio-figure { margin: 0; }
.studio-figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.studio-figure figcaption { margin-top: var(--s3); font-family: var(--mono); font-size: 12px; color: #d7c9b0; }
.studio-copy { display: flex; flex-direction: column; gap: var(--s4); }
.studio h2 { font-family: var(--display); font-size: clamp(2.25rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -0.02em; }
.studio-copy p:not(.kicker) { max-width: 58ch; font-size: 18px; color: #efe6d4; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3) var(--s5);
  padding: var(--s6) clamp(var(--s5), 4vw, var(--s8));
  font-size: 14px;
  color: var(--muted);
}
.wordmark-small { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--ink); }

.detail {
  width: min(960px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.detail::backdrop { background: rgb(29 26 22 / 0.6); }
.detail[open] { animation: rise 220ms var(--ease) both; }
.detail-inner { padding: var(--s6); overflow-y: auto; max-height: calc(100vh - 32px); }
.detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); padding-bottom: var(--s4); border-bottom: 2px solid var(--ink); }
.detail-body-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s6); padding-top: var(--s6); }
.detail-stub { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s5); border: 2px dashed var(--ink); border-radius: var(--radius); align-self: start; }
.detail-stub .stub-numeral { font-size: clamp(6rem, 10vw, 9rem); }
.detail-main { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }
.detail-main h2 { font-family: var(--display); font-size: clamp(2.25rem, 4vw, 3.5rem); line-height: 1; letter-spacing: -0.02em; }
.detail-body { font-size: 18px; line-height: 1.65; max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s5); margin: 0; }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 17px; font-weight: 700; }
.detail-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.save-item { align-self: flex-start; }
.noscript { padding: var(--s6); font-family: var(--mono); }

.stub[hidden] { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-block: var(--s7) var(--s8); }
  .hero-stub-note { grid-column: auto; margin-top: 0; }
  .studio { grid-template-columns: 1fr; }
  .stub { grid-template-columns: 1fr; }
  .stub-date { flex-direction: row; align-items: flex-end; border-right: 0; border-bottom: 2px dashed var(--ink); padding: var(--s4) var(--s5); }
  .stub-date .stub-numeral { font-size: 4.5rem; }
  .stub-actions { flex-direction: row; flex-wrap: wrap; border-left: 0; border-top: 2px dashed var(--ink); padding: var(--s4) var(--s5); }
  .stub-actions .btn, .stub-actions .toggle { width: auto; flex: 1 1 140px; }
  .detail-body-grid { grid-template-columns: 1fr; }
  .detail-stub { flex-direction: row; flex-wrap: wrap; align-items: baseline; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: clamp(2.6rem, 13vw, 3.4rem); }
  .lede, .hero-stub-note { font-size: 16px; }
  .hero-stub { padding: var(--s5); }
  .stub-title { font-size: 30px; }
  .controls { flex-direction: column; align-items: stretch; }
  .field-filter { flex-basis: auto; }
  .saved-toggle { justify-content: center; }
  .facts { grid-template-columns: 1fr; }
  .site-header nav { gap: 0; }
  .nav-link { padding-inline: var(--s2); }
}

@media (hover: hover) and (pointer: fine) {
  .stub:hover .stub-date { transform: translateX(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
  .stub:hover, .hero-stub:hover, .stub:hover .stub-date { transform: none; }
  .stub.is-saved .stub-date { transform: none; }
}
