/* ============================================================
   FORMA — a letterpress press for creative workshops
   Organizing idea: compositor's type case + pulled proof sheet
   ============================================================ */

/* ---------- Local fonts ---------- */
@font-face {
  font-family: "Alfa Slab One";
  src: url("./assets/fonts/alfa-slab-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bitter";
  src: url("./assets/fonts/bitter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bitter";
  src: url("./assets/fonts/bitter-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("./assets/fonts/courier-prime-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("./assets/fonts/courier-prime-bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("./assets/fonts/courier-prime-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #f2e8d5;
  --paper-2: #e9dcc0;
  --paper-3: #dfcfae;
  --ink: #1d1a15;
  --ink-soft: #4b443a;
  --ink-faint: #6f675a;
  --red: #b3241c;
  --red-deep: #8c1a14;
  --blue: #1f3f8f;
  --blue-deep: #16306e;
  --ochre: #a9741f;
  --wood: #5b3d24;
  --wood-dark: #3f2a18;
  --wood-light: #7a5533;
  --focus: #1450c8;
  --focus-on-ink: #ffcf33;

  --cat-baking: #8a4a12;
  --cat-ceramics: #97341f;
  --cat-floristry: #9c2c5b;
  --cat-painting: #1f5f6b;

  --font-display: "Alfa Slab One", "Rockwell", "Courier New", serif;
  --font-body: "Bitter", Georgia, "Times New Roman", serif;
  --font-mono: "Courier Prime", "Courier New", monospace;

  --wrap: 1260px;
  --gutter: clamp(1rem, 3.5vw, 2.5rem);
  --shadow-plate: 0 1px 0 rgba(255, 255, 255, 0.55), 0 6px 0 -2px rgba(63, 42, 24, 0.35);
  --ease-press: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 9rem;
}
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--paper);
  background-image:
    radial-gradient(120% 80% at 12% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(90% 70% at 100% 100%, rgba(169, 116, 31, 0.16), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Paper grain, purely decorative and click-through */
.press {
  position: relative;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 3rem) var(--gutter) 5rem;
}
.press::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
}

/* ---------- Focus + accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 1px;
}
.chancy:focus-visible,
.press-btn:focus-visible,
.specimen__open:focus-visible,
.detail button:focus-visible,
.forme__chip:focus-visible {
  outline-color: var(--focus-on-ink);
}
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  text-decoration: none;
  border: 2px solid var(--paper);
}
.skip-link:focus {
  top: 1rem;
}
.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 ---------- */
.masthead {
  border-bottom: 4px double var(--ink);
  padding-bottom: 1.25rem;
}
.masthead__rule {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.masthead__rule-mid {
  text-align: center;
}
.masthead__brand {
  display: grid;
  gap: 0.85rem;
}
.masthead__kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.wordmark {
  position: relative;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(4rem, 20vw, 13rem);
  line-height: 0.82;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: uppercase;
  isolation: isolate;
}
.wordmark__ink {
  position: relative;
  z-index: 3;
}
.wordmark__ghost {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.wordmark__ghost--red {
  color: var(--red);
  transform: translate(0.055em, 0.045em);
  z-index: 2;
  opacity: 0.9;
}
.wordmark__ghost--blue {
  color: var(--blue);
  transform: translate(-0.045em, 0.06em);
  opacity: 0.75;
}
.masthead__deck {
  max-width: 48ch;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.masthead__deck::first-letter {
  font-family: var(--font-display);
  font-size: 2.6em;
  float: left;
  line-height: 0.72;
  padding: 0.05em 0.1em 0 0;
  color: var(--red-deep);
}

@media (min-width: 1000px) {
  .masthead__brand {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 34ch);
    grid-template-areas:
      "kicker deck"
      "wordmark deck";
    align-items: end;
    column-gap: 2.5rem;
    row-gap: 1rem;
  }
  .masthead__kicker {
    grid-area: kicker;
  }
  .wordmark {
    grid-area: wordmark;
  }
  .masthead__deck {
    grid-area: deck;
  }
}

/* ---------- Bench (controls) ---------- */
.bench {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 1rem 1.25rem;
  align-items: end;
  padding: 1.15rem 0;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--ink);
}
.bench__field {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}
.bench__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.bench__input-wrap,
.bench__select-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #fbf5e8;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.bench__input-wrap .icon {
  margin-left: 0.7rem;
  color: var(--ink-soft);
}
.bench__input,
.bench__select {
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
}
.bench__input::placeholder {
  color: #847a68;
}
.bench__input:focus,
.bench__select:focus {
  outline: none;
}
.bench__input-wrap:focus-within,
.bench__select-wrap:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.bench__select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 55%, calc(100% - 0.8rem) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
  cursor: pointer;
}
.bench__input::-webkit-search-cancel-button {
  cursor: pointer;
}

/* press-lever toggle */
.chancy {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.5rem 0.9rem;
  background: #fbf5e8;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-align: left;
  transition: transform 0.12s var(--ease-press), box-shadow 0.12s var(--ease-press),
    background-color 0.12s var(--ease-press);
}
.chancy .icon {
  width: 1.35em;
  height: 1.35em;
}
.chancy:hover {
  background: #fffdf5;
}
.chancy:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--ink);
}
.chancy[aria-pressed="true"] {
  background: var(--red);
  color: #fff6e8;
  border-color: var(--red-deep);
  box-shadow: 3px 3px 0 var(--red-deep);
}
.chancy[aria-pressed="true"] .icon use {
  /* pressed = locked */
}
.chancy__count {
  display: inline-block;
  min-width: 1.5ch;
  margin-left: 0.3rem;
  padding: 0 0.3rem;
  font-weight: 700;
  text-align: center;
  background: var(--ink);
  color: var(--paper);
}
.chancy[aria-pressed="true"] .chancy__count {
  background: #fff6e8;
  color: var(--red-deep);
}

/* ---------- Forme ---------- */
.forme {
  border: 2px solid var(--ink);
  background: repeating-linear-gradient(
      -45deg,
      rgba(179, 36, 28, 0.06) 0 10px,
      transparent 10px 20px
    ),
    #fbf5e8;
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 4px 4px 0 var(--ink);
}
.forme__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}
.forme__title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.forme__clear {
  min-height: 44px;
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0.15rem 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--red-deep);
}
.forme__clear:hover {
  color: var(--red);
}
.forme__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.forme__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  transition: transform 0.12s var(--ease-press);
}
.forme__chip:hover {
  transform: translateY(-2px);
}
.forme__chip .dot {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: var(--cat, var(--ochre));
}

/* ---------- Case heading ---------- */
.case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.9rem;
}
.case-head__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.case-head__status {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ---------- The type case ---------- */
.case {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  background: linear-gradient(180deg, var(--wood-light), var(--wood) 12%, var(--wood-dark));
  border: 3px solid var(--wood-dark);
  box-shadow: inset 0 0 0 2px rgba(255, 240, 210, 0.18), 0 14px 30px -18px rgba(0, 0, 0, 0.8);
}

.specimen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fbf5e8;
  border: 1px solid var(--wood-dark);
  box-shadow: inset 0 0 0 1px rgba(63, 42, 24, 0.35);
  overflow: hidden;
  transition: transform 0.18s var(--ease-press), box-shadow 0.18s var(--ease-press);
}
.specimen::before {
  /* category spine */
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  background: var(--cat, var(--ochre));
  z-index: 4;
}
.specimen:hover,
.specimen:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 16px 22px -14px rgba(0, 0, 0, 0.75);
}

.specimen__top {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem 0.55rem 1.05rem;
  border-bottom: 1px solid rgba(63, 42, 24, 0.35);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #f6eedb;
}
.specimen__number {
  font-weight: 700;
  color: var(--ink);
}
.specimen__cat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  color: #fff;
  background: var(--cat, var(--ochre));
  padding: 0.12rem 0.45rem;
}
.specimen__saved {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--red-deep);
  font-weight: 700;
}
.specimen__saved[hidden] {
  display: none;
}

.specimen__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-3);
  border-bottom: 1px solid rgba(63, 42, 24, 0.4);
}
.specimen__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.32) contrast(1.06) sepia(0.12);
  mix-blend-mode: multiply;
  transition: transform 0.4s var(--ease-press), filter 0.4s var(--ease-press);
}
.specimen:hover .specimen__photo img,
.specimen:focus-within .specimen__photo img {
  transform: scale(1.045);
  filter: grayscale(0) contrast(1.04) sepia(0.04);
}
.specimen__photo::after {
  /* halftone-ish dot screen + ink edge */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(29, 26, 21, 0.22) 0.6px, transparent 0.7px);
  background-size: 4px 4px;
  mix-blend-mode: multiply;
  opacity: 0.7;
}

.specimen__plate {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
  padding: 0.9rem 0.95rem 1rem 1.05rem;
}
.specimen__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.03;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--ink);
}
.specimen__desc {
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.specimen__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.85rem;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(63, 42, 24, 0.4);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-soft);
}
.specimen__meta div {
  display: inline-flex;
  gap: 0.35rem;
}
.specimen__meta dt {
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.specimen__meta dd {
  font-weight: 700;
  color: var(--ink);
}
.specimen__price dd {
  font-family: var(--font-display);
  font-size: 1rem;
}

.specimen__open {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 48px;
  margin-top: 0.85rem;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.15s var(--ease-press);
}
/* stretched hit-area: whole compartment opens the proof */
.specimen__open::after {
  content: "";
  position: absolute;
  inset: 0;
  top: -1000px; /* extended upward over the card via parent clipping */
  bottom: -1000px;
  z-index: 5;
}
.specimen {
  overflow: hidden;
}
.specimen__open:hover {
  background: var(--red-deep);
}
.specimen__open .icon {
  transition: transform 0.18s var(--ease-press);
}
.specimen__open:hover .icon {
  transform: translateX(3px);
}
.specimen[data-saved="true"] .specimen__top {
  background: #f7e3df;
}

/* ---------- Empty state ---------- */
.empty {
  margin-top: 1.25rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  border: 2px dashed var(--ink);
  background: #fbf5e8;
}
.empty[hidden] {
  display: none;
}.empty__slug {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1;
  color: var(--red);
}
.empty__lead {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1.5rem;
  margin: 0.4rem 0;
}
.empty__body {
  max-width: 44ch;
  margin: 0 auto 1.1rem;
  color: var(--ink-soft);
}

/* ---------- Shared press button ---------- */
.press-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 48px;
  padding: 0.6rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--red-deep);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  transition: transform 0.12s var(--ease-press), box-shadow 0.12s var(--ease-press);
}
.press-btn:hover {
  background: var(--red-deep);
}
.press-btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 var(--red-deep);
}

/* ---------- Studio band ---------- */
.studio {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 2.75rem);
  align-items: center;
  margin-top: clamp(2.5rem, 7vw, 4.5rem);
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 4px double var(--ink);
}
.studio__figure {
  border: 1px solid var(--ink);
  background: var(--paper-2);
  box-shadow: var(--shadow-plate);
}
.studio__figure img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.06) sepia(0.14);
  mix-blend-mode: multiply;
}
.studio__figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 0.5rem 0.6rem;
  border-top: 1px solid rgba(63, 42, 24, 0.4);
}
.studio__copy {
  display: grid;
  gap: 0.75rem;
}
.studio__kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.studio__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  line-height: 1;
  text-transform: uppercase;
}
.studio__copy p {
  max-width: 52ch;
  color: var(--ink-soft);
}
.studio__copy em {
  font-style: italic;
  color: var(--ink);
  background: linear-gradient(transparent 62%, rgba(179, 36, 28, 0.28) 62%);
}

/* ---------- Colophon ---------- */
.colophon {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 4px double var(--ink);
  display: grid;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--ink-soft);
}
.colophon__mark {
  text-align: center;
  color: var(--red-deep);
  letter-spacing: 0.3em;
}

/* ============================================================
   Detail — the pulled proof
   ============================================================ */
.detail {
  width: min(820px, 94vw);
  max-width: 100%;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.detail::backdrop {
  background: rgba(29, 26, 21, 0.62);
  backdrop-filter: blur(2px);
}
.detail__roller {
  height: 16px;
  background: repeating-linear-gradient(
    90deg,
    #2a1c10 0 6px,
    #4a3220 6px 12px
  );
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.detail__sheet {
  position: relative;
  margin: -4px 0;
  background: #fbf6e9;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent 12%),
    repeating-linear-gradient(
      0deg,
      transparent 0 27px,
      rgba(31, 63, 143, 0.05) 27px 28px
    );
  border: 1px solid var(--ink);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
  max-height: 88vh;
  overflow: hidden;
}
.detail__scroll {
  max-height: 88vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.2rem, 4vw, 2.4rem);
}
.detail__reg {
  position: absolute;
  width: 20px;
  height: 20px;
  z-index: 5;
  pointer-events: none;
  color: var(--red);
}
.detail__reg::before,
.detail__reg::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.detail__reg::before {
  left: 9px;
  top: 0;
  width: 2px;
  height: 20px;
}
.detail__reg::after {
  top: 9px;
  left: 0;
  height: 2px;
  width: 20px;
}
.detail__reg--tl { top: 10px; left: 12px; }
.detail__reg--tr { top: 10px; right: 12px; }
.detail__reg--bl { bottom: 10px; left: 12px; }
.detail__reg--br { bottom: 10px; right: 12px; }

/* proof slide-in (only when open) */
.detail[open] .detail__sheet {
  animation: pull-proof 0.5s var(--ease-press) both;
}
.detail[open] .detail__roller--top {
  animation: roller-in 0.5s var(--ease-press) both;
}
.detail[open] .detail__roller--bottom {
  animation: roller-in 0.55s 0.05s var(--ease-press) both;
}
@keyframes pull-proof {
  from {
    transform: translateY(42px) rotate(-0.6deg) scale(0.985);
    opacity: 0;
    filter: blur(2px);
  }
  to {
    transform: none;
    opacity: 1;
    filter: none;
  }
}
@keyframes roller-in {
  from { transform: scaleX(0.2); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.proof__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.6rem;
}
.proof__stamp {
  color: #fff;
  background: var(--red);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--red-deep);
  transform: rotate(-2deg);
}
.proof__head {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
}
.proof__title {
  position: relative;
  isolation: isolate;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 0.98;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.proof__title .misreg {
  position: absolute;
  inset: 0;
  color: var(--red);
  z-index: -1;
  transform: translate(3px, 3px);
  opacity: 0.5;
}
.proof__cat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: start;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--cat, var(--ochre));
  padding: 0.2rem 0.55rem;
}
.proof__body {
  margin: 1rem 0 0;
  font-size: 1.08rem;
  color: var(--ink);
  max-width: 60ch;
}
.proof__figure {
  margin: 1.3rem 0;
  border: 1px solid var(--ink);
  background: var(--paper-2);
}
.proof__figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: grayscale(0.2) contrast(1.03) sepia(0.08);
}
.proof__figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 0.45rem 0.6rem;
  border-top: 1px solid rgba(63, 42, 24, 0.4);
}
.proof__specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: rgba(63, 42, 24, 0.45);
  border: 1px solid rgba(63, 42, 24, 0.45);
  margin-bottom: 1.4rem;
}
.proof__specs div {
  background: #fbf6e9;
  padding: 0.7rem 0.8rem;
}
.proof__specs dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.2rem;
}
.proof__specs dd {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.98rem;
}
.proof__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 2px solid var(--ink);
  padding-top: 1.2rem;
}
.proof__save {
  flex: 1 1 220px;
}
.proof__close {
  flex: 0 1 auto;
  background: #fbf6e9;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.proof__close:hover {
  background: var(--paper-3);
}
.proof__savenote {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  min-height: 1.2em;
}

.notice {
  border: 2px solid var(--ink);
  background: #fbf5e8;
  padding: 1rem;
  font-family: var(--font-mono);
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .case {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 721px) {
  .bench {
    position: sticky;
    top: 0;
    z-index: 40;
    background: linear-gradient(180deg, var(--paper) 78%, rgba(242, 232, 213, 0));
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
    padding-left: var(--gutter);
    padding-right: var(--gutter);
  }
}
@media (max-width: 720px) {
  html {
    scroll-padding-top: 1rem;
  }
  .bench {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .bench__field--toggle .chancy {
    width: 100%;
    justify-content: center;
  }
  .case {
    grid-template-columns: 1fr;
    padding: 9px;
    gap: 9px;
  }
  .masthead__rule {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    font-size: 0.64rem;
  }
  .masthead__rule-mid {
    order: -1;
    flex-basis: 100%;
  }
  .wordmark {
    font-size: clamp(2.8rem, 22vw, 5rem);
  }
  .masthead__deck::first-letter {
    font-size: 2.2em;
  }
  .detail {
    width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
  }
  .detail__roller {
    display: none;
  }
  .detail__sheet,
  .detail__scroll {
    max-height: 100vh;
    max-height: 100dvh;
    height: 100vh;
    height: 100dvh;
  }
  .detail__sheet {
    margin: 0;
    border-left: 0;
    border-right: 0;
  }
  .proof__actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(0deg, #fbf6e9 70%, rgba(251, 246, 233, 0));
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    margin-top: 0.5rem;
  }
  .proof__close {
    flex: 1 1 100%;
    justify-content: center;
  }
  .studio {
    grid-template-columns: 1fr;
  }
  .studio__figure {
    order: 2;
  }
  .studio__copy {
    order: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .specimen:hover,
  .specimen:focus-within {
    transform: none;
  }
  .specimen__photo img {
    transition: none;
  }
}
