/* ==========================================================================
   Greenlight Publishing — storefront
   AUTHORED BY HAND. build_site.py never writes this file.

   Two grounds, both taken from the product. The shop argues on INK, the warm
   brown-black of bookbinder's board. It reads on PAPER, the cream uncoated
   stock the paperbacks are actually printed on, and the free chapters are the
   only pages that use it — the switch means "you are now reading the book".

   The accent is not chosen. site_assets.py samples every jacket and writes
   three tones per title into site/data/covers.json; the builder sets them as
   --spine, --glow and --tint. 244 books supply the colour.

   Every pair named in site_audit.py CONTRAST is solved to 4.5:1 for text and
   3.0:1 for anything clickable. Do not nudge a token without re-running it.
   ========================================================================== */

:root {
  /* ink ground */
  --ink:          #1e1813;
  --ink-deep:     #17120c;
  --ink-raise:    #2a211a;
  --rule-line:    #3a2e25;   /* decorative hairlines only */
  --edge:         #7d6a58;   /* interactive borders on ink — 3.41:1 */
  --stock:        #f2ebe0;
  --stock-dim:    #bcab97;
  --stock-faint:  #9a8a7b;
  --stamp:        #e2694a;
  --stamp-deep:   #c9502f;

  /* paper ground */
  --paper:        #f0e7d7;
  --paper-raise:  #e7dbc6;
  --print:        #241d16;
  --print-dim:    #63513d;
  --paper-edge:   #8a7860;   /* interactive borders on paper — 3.0:1 */

  /* per-title, set by the builder from the sampled jacket */
  --spine: #7a6a5c;
  --glow:  #b3a294;
  --tint:  #241d18;

  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --max: 82rem;
  --hair: 1px solid var(--rule-line);
  --ease: cubic-bezier(.2, .7, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--stock);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* width/height attributes defeat aspect-ratio unless height is auto, and the
   attributes are what reserve the space. Keep both. */
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

:focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; border-radius: 1px; }

.skip { position: absolute; left: -100vw; top: 0; z-index: 100;
        background: var(--stock); color: var(--ink); padding: .75rem 1.25rem; }
.skip:focus { left: 0; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.underline { border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ── type ──────────────────────────────────────────────────────────────── */

.mono {
  font-family: var(--mono); font-size: .6875rem; font-weight: 400;
  letter-spacing: .1em; text-transform: uppercase; color: var(--stock-dim);
  line-height: 1.5; font-variant-numeric: tabular-nums;
}
.mono--tight { letter-spacing: .04em; text-transform: none; }

.coordinate {
  font-family: var(--display);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  font-weight: 800; line-height: .88; letter-spacing: -.025em;
  text-wrap: balance; margin: 0;
}
.serif-note { font-family: var(--display); font-variation-settings: "opsz" 24;
              font-style: italic; font-weight: 400; }

/* ── masthead ──────────────────────────────────────────────────────────── */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 92%, transparent);
  backdrop-filter: blur(14px); border-bottom: var(--hair);
}
.masthead__in {
  display: flex; align-items: center; gap: clamp(.75rem, 2.5vw, 2rem);
  max-width: var(--max); margin-inline: auto; padding: .7rem var(--gut);
}
.wordmark { display: flex; align-items: baseline; gap: .55rem; margin-right: auto; }
.wordmark__name { font-family: var(--display);
  font-variation-settings: "opsz" 24, "WONK" 1;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.wordmark .mono { letter-spacing: .16em; }
.wordmark__mark { width: .5rem; height: .5rem; background: var(--stamp);
  align-self: center; border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--stamp) 22%, transparent); }

.nav { display: flex; gap: clamp(.7rem, 1.8vw, 1.5rem); }
.nav a { font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--stock-dim); padding-block: .35rem;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--stock); border-bottom-color: var(--stamp); }

.cartbtn { display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em;
  text-transform: uppercase; border: 1px solid var(--edge); padding: .45rem .75rem;
  transition: border-color .2s var(--ease), background .2s var(--ease); }
.cartbtn:hover { border-color: var(--stock-dim); background: var(--ink-raise); }
.cartbtn__count { min-width: 1.25rem; height: 1.25rem; padding-inline: .3rem;
  display: grid; place-items: center; background: var(--stamp); color: #24170f;
  border-radius: 999px; font-size: .625rem; letter-spacing: 0; font-weight: 700; }
.cartbtn[data-empty="true"] .cartbtn__count { background: var(--rule-line); color: var(--stock-dim); }

/* ── breadcrumbs ───────────────────────────────────────────────────────── */

.crumbs { border-bottom: var(--hair); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none;
  margin: 0; padding: .7rem 0; font-family: var(--mono); font-size: .625rem;
  letter-spacing: .1em; text-transform: uppercase; }
.crumbs li { color: var(--stock-faint); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; opacity: .55; }
.crumbs a { color: var(--stock-dim); }
.crumbs a:hover { color: var(--stock); }
.crumbs [aria-current] { color: var(--stock); max-width: 40ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── buttons ───────────────────────────────────────────────────────────── */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-family: var(--mono); font-size: .6875rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; padding: .95rem 1.4rem;
  border: 1px solid var(--stock); background: var(--stock); color: var(--ink);
  transition: transform .18s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease); }
.btn:hover { transform: translateY(-2px); background: #fff; }
.btn:active { transform: translateY(0); }
.btn--ghost { background: none; color: var(--stock); border-color: var(--edge); }
.btn--ghost:hover { background: var(--ink-raise); border-color: var(--stock-dim); }
.btn--stamp { background: var(--stamp-deep); border-color: var(--stamp-deep); color: #fff; }
.btn--stamp:hover { background: var(--stamp); border-color: var(--stamp); color: #24170f; }
.btn--paper-ghost { background: none; color: var(--print); border-color: var(--paper-edge); }
.btn--paper-ghost:hover { background: var(--paper-raise); }
.btn--wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero { border-bottom: var(--hair); }
.hero__in { max-width: var(--max); margin-inline: auto;
  padding: clamp(3rem, 9vh, 6rem) var(--gut) clamp(2.5rem, 6vh, 4rem);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.hero__eyebrow { display: flex; align-items: center; gap: .7rem;
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem); }
.hero__eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule-line); }
.hero__title { font-size: clamp(2.6rem, 6.4vw, 5.6rem); max-width: 12ch; }
.hero__lede { margin: clamp(1.75rem, 4vh, 2.75rem) 0 0; max-width: 46ch;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--stock-dim); }
.hero__lede strong { color: var(--stock); font-weight: 500; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 0; }

.hero__specimen { margin: 0; display: grid; gap: 1.15rem; justify-items: start;
  max-width: 17.5rem; justify-self: end; }
.hero__specimen a { display: block; width: 100%; }
.hero__specimen img { width: 100%; aspect-ratio: 1600 / 2560; object-fit: cover;
  transform: rotate(-1.6deg);
  box-shadow: 0 40px 70px -28px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.1);
  transition: transform .45s var(--ease); }
.hero__specimen a:hover img { transform: rotate(0) translateY(-6px); }
.hero__specimen figcaption { display: grid; gap: .3rem; }
.hero__specimen figcaption b { font-family: var(--display);
  font-variation-settings: "opsz" 40, "WONK" 1; font-weight: 700;
  font-size: 1.3rem; letter-spacing: -.02em; line-height: 1.1; }
.hero__specimen .serif-note { color: var(--stock-dim); }

/* ── the shelf ─────────────────────────────────────────────────────────── */

.shelf { padding: clamp(2.5rem, 6vh, 4rem) 0 0; background: var(--ink-deep);
  border-bottom: var(--hair); position: relative; }
.shelf__head { display: flex; flex-wrap: wrap; align-items: baseline;
  gap: .75rem 1.5rem; max-width: var(--max); margin-inline: auto;
  padding-inline: var(--gut); margin-bottom: 1.75rem; }
.shelf__head h2 { font-family: var(--display);
  font-variation-settings: "opsz" 40, "WONK" 1; font-weight: 700;
  font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0; letter-spacing: -.02em; }
.shelf__head p { margin: 0; }
.shelf__scroll { display: flex; align-items: flex-end; gap: 3px;
  padding: 0 var(--gut); overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; cursor: grab; }
.shelf__scroll::-webkit-scrollbar { display: none; }
.shelf__scroll::after { content: ""; flex: 0 0 var(--gut); }
.shelf__scroll[data-dragging="true"] { cursor: grabbing; }

.spine { --h: clamp(230px, 30vh, 320px); position: relative; flex: 0 0 auto;
  width: 30px; height: var(--h);
  background: linear-gradient(100deg,
      color-mix(in srgb, var(--spine) 62%, #000) 0 8%,
      var(--spine) 22% 78%,
      color-mix(in srgb, var(--spine) 55%, #000) 100%);
  border-radius: 1px 2px 2px 1px; display: grid; align-content: space-between;
  justify-items: center; padding: .55rem .2rem; transform-origin: bottom center;
  box-shadow: 0 10px 16px -10px rgba(0,0,0,.9);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease); }
.spine:nth-child(3n)   { --h: clamp(245px, 32vh, 340px); width: 26px; }
.spine:nth-child(5n)   { --h: clamp(222px, 28vh, 306px); width: 34px; }
.spine:nth-child(7n+2) { width: 22px; }
.spine__title { writing-mode: vertical-rl; text-orientation: mixed;
  font-family: var(--display); font-variation-settings: "opsz" 14;
  font-weight: 700; font-size: .6rem; color: #fff; mix-blend-mode: luminosity;
  overflow: hidden; max-height: calc(var(--h) - 2.4rem); white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.spine__foot { width: 60%; height: 1px; background: rgba(255,255,255,.5); }
.spine:hover, .spine:focus-visible { transform: translateY(-14px) rotate(-1.2deg);
  box-shadow: 0 18px 34px -12px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.14);
  z-index: 2; }
.shelf__base { height: clamp(14px, 2vh, 22px);
  background: linear-gradient(180deg, #4a3823 0 22%, #2a1f14 60%, #16100a);
  border-top: 1px solid #6a5031; box-shadow: inset 0 6px 12px -6px rgba(0,0,0,.9);
  margin-top: -2px; position: relative; z-index: 1; }
.shelf__hint { max-width: var(--max); margin-inline: auto; padding: .9rem var(--gut) 1.5rem; }
.shelf__peek { position: absolute; z-index: 5; width: 132px; pointer-events: none;
  opacity: 0; transform: translateY(8px) scale(.96);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
  box-shadow: 0 24px 50px -14px rgba(0,0,0,.85); }
.shelf__peek[data-on="true"] { opacity: 1; transform: none; }

/* ── bands ─────────────────────────────────────────────────────────────── */

.band { padding: clamp(3.5rem, 9vh, 6.5rem) 0; border-bottom: var(--hair); }
.band--deep { background: var(--ink-deep); }
.band--paper { background: var(--paper); color: var(--print); }
.band--paper .mono { color: var(--print-dim); }
.band--paper .band__head p { color: var(--print-dim); }

.band__head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 5vh, 3.25rem); }
.band__head h2 { font-family: var(--display);
  font-variation-settings: "opsz" 72, "WONK" 1; font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3.1rem); line-height: 1.02; letter-spacing: -.028em;
  margin: 0; max-width: 22ch; }
.band__head p { margin: 0; max-width: 56ch; color: var(--stock-dim); }
.band__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 0; }

/* ── spec sheets and fact grids ────────────────────────────────────────── */

.spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  border-top: 1px solid currentColor; margin: 0; }
.spec > div { padding: 1.5rem 1.25rem 1.75rem 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.spec dt { font-family: var(--mono); font-size: .625rem; letter-spacing: .14em;
  text-transform: uppercase; opacity: .68; margin-bottom: .85rem; }
.spec dd { margin: 0; font-size: 1.02rem; line-height: 1.5; max-width: 34ch; }
.spec dd b { font-family: var(--display); font-variation-settings: "opsz" 40;
  font-weight: 700; font-size: 1.6rem; display: block; letter-spacing: -.01em;
  margin-bottom: .3rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin: 0; background: var(--ink); border: 1px solid var(--rule-line); }
.facts > div { padding: .9rem 1rem 1rem; border-right: 1px solid var(--rule-line);
  border-bottom: 1px solid var(--rule-line); }
.facts dt { font-family: var(--mono); font-size: .5625rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--stock-faint); margin-bottom: .4rem; }
.facts dd { margin: 0; font-size: .95rem; line-height: 1.45; }
.facts a { border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent); }
.facts a:hover { color: var(--glow); }
.facts--stack { grid-template-columns: 1fr; }

/* ── tables. minmax(0,1fr) elsewhere keeps these from pushing the page. ── */

.ladder { margin: 1.5rem 0; font-variant-numeric: tabular-nums; }
.ladder caption { font-family: var(--mono); font-size: .625rem; letter-spacing: .14em;
  text-transform: uppercase; text-align: left; padding-bottom: .75rem;
  color: var(--stock-faint); }
.ladder th, .ladder td { text-align: left; padding: .6rem .9rem .6rem 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 20%, transparent); }
.ladder thead th { font-family: var(--mono); font-size: .5625rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 400; opacity: .7; }
.ladder tbody th { font-weight: 500; }
.ladder tbody td { font-family: var(--mono); font-size: .8125rem; }
.band--paper .ladder caption { color: var(--print-dim); }
.ladder--wide { display: block; overflow-x: auto; }

.indextable { padding-block: clamp(1.5rem, 4vh, 2.5rem) clamp(3rem, 8vh, 5rem);
  overflow-x: auto; }
.indextable table { font-variant-numeric: tabular-nums; min-width: 44rem; }
.indextable caption { font-family: var(--mono); font-size: .625rem;
  letter-spacing: .12em; text-transform: uppercase; text-align: left;
  color: var(--stock-faint); padding-bottom: 1rem; }
.indextable th, .indextable td { text-align: left; padding: .55rem .9rem .55rem 0;
  border-bottom: 1px solid var(--rule-line); vertical-align: baseline; }
.indextable thead th { font-family: var(--mono); font-size: .5625rem;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 400;
  color: var(--stock-faint); }
.indextable tbody th { font-family: var(--display);
  font-variation-settings: "opsz" 24, "WONK" 1; font-weight: 700;
  font-size: 1.02rem; letter-spacing: -.01em; }
.indextable tbody th a:hover { color: var(--glow); }
.indextable tbody td { color: var(--stock-dim); font-size: .92rem; }
.indextable .is-exception { background: var(--ink-raise); }
.indextable .is-exception th::after { content: " ▪"; color: var(--stamp); }

/* ── cards ─────────────────────────────────────────────────────────────── */

.cat { display: grid; grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.25rem); align-items: start;
  padding-block: clamp(2rem, 5vh, 3rem) clamp(4rem, 10vh, 7rem); }
.cat__bar { display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.cat__bar--rule { border-bottom: var(--hair); padding-bottom: .75rem; }
.cat__bar h2 { margin: 0; color: var(--stock); font-size: .75rem; }
.cat__bar p { margin: 0; }
.cat__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(166px, 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem) clamp(1rem, 1.6vw, 1.5rem); margin-top: 1.5rem; }

.card { display: grid; gap: .7rem; align-content: start; }
.card__cover { display: block; background: var(--tint); }
.card__cover img { width: 100%; aspect-ratio: 1600 / 2560; object-fit: cover;
  box-shadow: 0 12px 26px -14px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.06);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease); }
.card:hover .card__cover img { transform: translateY(-6px);
  box-shadow: 0 22px 40px -18px var(--glow), 0 0 0 1px rgba(255,255,255,.16); }
.card h3 { margin: 0; font-family: var(--display);
  font-variation-settings: "opsz" 30, "WONK" 1; font-weight: 700;
  font-size: 1.05rem; line-height: 1.1; letter-spacing: -.015em; }
.card h3 a:hover { color: var(--glow); }
.card__meta { display: flex; align-items: baseline; justify-content: space-between;
  gap: .75rem; }
.card__meta .mono { font-size: .625rem; }
.card__price { font-family: var(--mono); font-size: .6875rem; color: var(--stock);
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.card__note { margin: -.4rem 0 0; font-size: .5625rem; letter-spacing: .09em;
  color: var(--stock-faint); }

/* ── filters ───────────────────────────────────────────────────────────── */

.filters { position: sticky; top: 4.5rem; display: grid; gap: 1.75rem;
  max-height: calc(100vh - 6rem); overflow-y: auto; padding-right: .5rem; }
.filters__group { display: grid; gap: .55rem; }
.filters__group > .mono { padding-bottom: .5rem; border-bottom: var(--hair);
  margin: 0 0 .35rem; }
.filters label { display: flex; align-items: center; gap: .6rem; font-size: .9rem;
  color: var(--stock-dim); cursor: pointer; transition: color .18s var(--ease); }
.filters label:hover { color: var(--stock); }
.filters input[type="checkbox"] { accent-color: var(--stamp-deep);
  width: .95rem; height: .95rem; margin: 0; }
.filters label span:last-child { margin-left: auto; font-family: var(--mono);
  font-size: .625rem; color: var(--stock-faint); }

.search { display: flex; align-items: center; gap: .7rem;
  border-bottom: 1px solid var(--stock-faint); padding-bottom: .55rem; }
.search input { flex: 1; background: none; border: 0; font-size: 1.05rem;
  padding: .2rem 0; min-width: 0; }
.search input::placeholder { color: var(--stock-faint); }
.search input:focus { outline: none; }
.search:focus-within { border-bottom-color: var(--stamp); }

.empty { border: 1px solid var(--edge); padding: clamp(2rem, 6vw, 3.5rem);
  text-align: center; display: grid; gap: 1rem; justify-items: center; }
.empty h2 { font-family: var(--display);
  font-variation-settings: "opsz" 40, "WONK" 1; font-weight: 700;
  font-size: 1.5rem; margin: 0; }

/* ── page heads ────────────────────────────────────────────────────────── */

.pagehead { padding-block: clamp(3rem, 8vh, 5.5rem) clamp(2rem, 5vh, 3rem);
  border-bottom: var(--hair); }
.pagehead h1 { font-family: var(--display);
  font-variation-settings: "opsz" 144, "WONK" 1; font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: .95; letter-spacing: -.03em;
  margin: 1rem 0 0; max-width: 18ch; }
.pagehead p { margin: 1.35rem 0 0; max-width: 52ch; color: var(--stock-dim);
  font-size: 1.1rem; }
.pagehead--art { position: relative; overflow: hidden; }
.pagehead--art .wrap { position: relative; z-index: 1; }
.pagehead__art { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 40% 50%;
  /* the plates compose to the left; flipped, the objects land opposite the
     headline rather than underneath it */
  transform: scaleX(-1); opacity: .9; }
.pagehead--art::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(95deg, var(--ink) 20%,
      color-mix(in srgb, var(--ink) 78%, transparent) 42%, transparent 72%),
    linear-gradient(180deg, var(--ink) 0, transparent 22%,
      color-mix(in srgb, var(--ink) 82%, transparent) 100%); }
.pagehead--art h1, .pagehead--art p { text-shadow: 0 2px 18px rgba(12,8,5,.55); }

.plate { margin: 0 0 clamp(2rem, 5vh, 3.25rem); }
.plate img { width: 100%; }
.plate--wide img { aspect-ratio: 24 / 7; object-fit: cover; object-position: center 55%;
  box-shadow: 0 24px 48px -28px rgba(0,0,0,.8); }
.band--paper .plate--wide img { box-shadow: 0 24px 48px -26px rgba(60,40,20,.55); }

/* ── long-form pages ───────────────────────────────────────────────────── */

.longform { display: grid; grid-template-columns: 12rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); padding-block: clamp(2.5rem, 6vh, 4rem);
  border-bottom: var(--hair); align-items: start; }
.longform > h2 { margin: 0; }
.longform p { margin: 0 0 1.1em; max-width: 62ch; color: var(--stock-dim); }
.longform p:first-of-type { color: var(--stock); font-size: 1.1rem; }
.longform ul { margin: 0 0 1.1em; padding-left: 1.1rem; color: var(--stock-dim);
  max-width: 62ch; }
.longform li { margin-bottom: .55rem; }
.longform a { border-bottom: 1px solid color-mix(in srgb, currentColor 40%, transparent); }
.longform code { font-family: var(--mono); font-size: .82em; color: var(--stock); }

.prose { max-width: 62ch; }
.prose p { margin: 0 0 1.15em; color: var(--stock-dim); }
.prose p:first-child { font-size: 1.18rem; line-height: 1.55; color: var(--stock); }
.prose p:first-child::first-letter { font-family: var(--display);
  font-variation-settings: "opsz" 144, "WONK" 1; font-weight: 800;
  float: left; font-size: 3.6em; line-height: .78; padding: .06em .1em 0 0;
  color: var(--glow); }
.prose em { color: var(--stock); font-style: italic; }

.book { display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(2rem, 5vh, 3.5rem) clamp(4rem, 9vh, 6rem); align-items: start; }
.book__section { padding-block: clamp(2rem, 5vh, 3rem); border-bottom: var(--hair); }
.book__section > h2 { margin: 0 0 1.25rem; }
.book__section:last-child { border-bottom: 0; }
.book__head { border-bottom: var(--hair); padding-bottom: clamp(1.75rem, 4vh, 2.5rem); }
.book__num { display: flex; align-items: center; gap: .75rem; margin: 0 0 1.25rem; }
.book__num::after { content: ""; flex: 1; height: 1px; background: var(--rule-line); }
.book__num a { border-bottom: 1px solid currentColor; }
.book__title { font-size: clamp(2.4rem, 6vw, 4.75rem); }
.book__subject { margin: 1.1rem 0 0; font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  color: var(--glow); }
.book__subject b { font-weight: 500; }
.book__byline { margin: .5rem 0 0; }
.book__byline a { border-bottom: 1px solid currentColor; }

.buybox { position: sticky; top: 4.75rem; display: grid; gap: 1.5rem; }
.buybox__cover img { width: 100%; aspect-ratio: 1600 / 2560; object-fit: cover;
  box-shadow: 0 30px 60px -24px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.08); }
.buybox__note, .buybox__free { display: grid; gap: .5rem; }
.buybox__free .player { justify-self: start; }

.formats { display: grid; gap: 1px; background: var(--rule-line);
  border: 1px solid var(--rule-line); }
.format { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  gap: .35rem .75rem; align-items: center; background: var(--ink);
  padding: .85rem .9rem; cursor: pointer; transition: background .2s var(--ease); }
.format:hover { background: var(--ink-raise); }
.format input { margin: 0; accent-color: var(--stamp-deep); }
.format__name { font-family: var(--mono); font-size: .6875rem; letter-spacing: .1em;
  text-transform: uppercase; }
.format__price { font-family: var(--mono); font-size: .8125rem;
  font-variant-numeric: tabular-nums; }
.format__spec { grid-column: 2 / -1; font-size: .78rem; color: var(--stock-faint);
  line-height: 1.4; }
.format:has(input:checked) { background: var(--ink-raise);
  box-shadow: inset 3px 0 0 var(--stamp); }
.format:has(input:checked) .format__price { color: var(--stamp); }

.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
  background: var(--rule-line); border: 1px solid var(--rule-line); }
.toc li { background: var(--ink); display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: baseline;
  gap: .75rem; padding: .7rem .95rem; }
.toc__n { font-family: var(--mono); font-size: .625rem; color: var(--stock-faint); }
.toc__title { font-family: var(--display); font-variation-settings: "opsz" 24;
  font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.toc__len { font-size: .5625rem; color: var(--stock-faint); }
.toc__free { background: var(--ink-raise); box-shadow: inset 3px 0 0 var(--spine); }
.toc__flag { font-family: var(--mono); font-size: .5625rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--stamp); border-bottom: 1px solid currentColor;
  padding-bottom: 1px; }
.toc__foot { margin: 1rem 0 0; font-size: .9rem; color: var(--stock-dim); max-width: 60ch; }
.toc__foot a { border-bottom: 1px solid currentColor; }

.author { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem;
  align-items: start; }
.author__initial { width: 3.25rem; height: 3.25rem; display: grid; place-items: center;
  border: 1px solid var(--rule-line); color: var(--glow); font-family: var(--display);
  font-variation-settings: "opsz" 40, "WONK" 1; font-weight: 700; font-size: 1.35rem; }
.author p { margin: .5rem 0 0; color: var(--stock-dim); max-width: 60ch; font-size: .95rem; }
.author strong { font-family: var(--display); font-variation-settings: "opsz" 30;
  font-weight: 700; font-size: 1.1rem; }
.author strong a { border-bottom: 1px solid currentColor; }

.warnings { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.warnings li { list-style: none; font-family: var(--mono); font-size: .625rem;
  letter-spacing: .08em; text-transform: uppercase; border: 1px solid var(--edge);
  padding: .35rem .6rem; color: var(--stock-dim); }

.related { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem; }

.player { display: inline-flex; align-items: center; gap: .55rem;
  border: 1px solid var(--edge); padding: .4rem .8rem .4rem .55rem;
  transition: border-color .2s var(--ease); }
.player:hover { border-color: var(--stock-dim); }
.player__icon { width: 1.35rem; height: 1.35rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--spine); color: #fff; font-size: .55rem; }
.player[data-playing="true"] .player__icon { background: var(--stamp-deep); }
.player span:last-child { font-family: var(--mono); font-size: .625rem;
  letter-spacing: .1em; text-transform: uppercase; }

/* ── FAQ ───────────────────────────────────────────────────────────────── */

.faq { display: grid; gap: 1px; background: var(--rule-line);
  border: 1px solid var(--rule-line); }
.faq__item { background: var(--ink); }
.faq__item summary { display: flex; gap: 1rem; align-items: baseline;
  padding: 1.1rem 1.25rem; cursor: pointer; list-style: none;
  transition: background .2s var(--ease); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover, .faq__item[open] summary { background: var(--ink-raise); }
.faq__item summary .mono { color: var(--stamp); font-size: .625rem; }
.faq__item h3 { margin: 0; font-family: var(--display);
  font-variation-settings: "opsz" 30, "WONK" 1; font-weight: 700;
  font-size: 1.1rem; letter-spacing: -.015em; line-height: 1.25; }
.faq__item[open] h3 { color: var(--glow); }
.faq__item > p { margin: 0; padding: 0 1.25rem 1.35rem 4.25rem;
  color: var(--stock-dim); max-width: 72ch; }

/* ── shelf index cards ─────────────────────────────────────────────────── */

.sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  background: var(--ink); border: 1px solid var(--rule-line); }
.sections a { padding: 0 1.35rem 1.6rem; display: grid; gap: .5rem;
  align-content: start; overflow: hidden;
  border-right: 1px solid var(--rule-line); border-bottom: 1px solid var(--rule-line);
  transition: background .22s var(--ease); }
.sections a:hover { background: var(--ink-raise); }
.sections img { width: calc(100% + 2.7rem); max-width: none; margin: 0 -1.35rem 1.1rem;
  aspect-ratio: 5 / 4; object-fit: cover; object-position: 32% 46%;
  filter: brightness(.92) saturate(1.05);
  transition: transform .4s var(--ease), filter .3s var(--ease); }
.sections a:hover img { transform: scale(1.04); filter: brightness(1.08) saturate(1.12); }
.sections strong { font-family: var(--display);
  font-variation-settings: "opsz" 40, "WONK" 1; font-weight: 700;
  font-size: 1.3rem; letter-spacing: -.02em; }
.sections em { font-style: normal; color: var(--stock-faint); font-size: .82rem;
  line-height: 1.45; }

.shelfpage { display: grid; grid-template-columns: 15rem minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.25rem); align-items: start;
  padding-block: clamp(2rem, 5vh, 3rem) clamp(3rem, 7vh, 4.5rem); }
.shelfpage__meta { position: sticky; top: 4.75rem; display: grid; gap: 1.5rem; }
.shelfpage__meta h2 { margin: 0 0 -.75rem; }
.clusterlist { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.clusterlist li { display: flex; justify-content: space-between; gap: 1rem;
  font-size: .9rem; color: var(--stock-dim);
  border-bottom: 1px dotted var(--rule-line); padding-bottom: .4rem; }

.shelfnav { padding-block: clamp(2rem, 5vh, 3rem); border-top: var(--hair); }
.shelfnav h2 { margin: 0 0 1rem; }
.shelfnav div { display: flex; flex-wrap: wrap; gap: .5rem; }
.shelfnav a { display: inline-flex; align-items: baseline; gap: .5rem;
  border: 1px solid var(--edge); padding: .55rem .85rem; font-family: var(--mono);
  font-size: .625rem; letter-spacing: .1em; text-transform: uppercase;
  transition: border-color .2s var(--ease), background .2s var(--ease); }
.shelfnav a:hover { border-color: var(--stock-dim); background: var(--ink-raise); }
.shelfnav a span { color: var(--stock-faint); }

/* ── sets ──────────────────────────────────────────────────────────────── */

.sets { display: grid; gap: 1px; background: var(--rule-line);
  border: 1px solid var(--rule-line);
  margin-block: clamp(2rem, 5vh, 3rem) clamp(2rem, 5vh, 3rem); }
.setcard { background: var(--ink); display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem); padding: clamp(1.5rem, 3vw, 2.25rem);
  align-items: center; }
.setcard:first-child { background: var(--ink-raise); }
.setcard__covers { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.setcard__covers img { width: 100%; aspect-ratio: 1600 / 2560; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.07); }
.setcard__body h2 { font-family: var(--display);
  font-variation-settings: "opsz" 72, "WONK" 1; font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.025em; line-height: 1;
  margin: .5rem 0 .75rem; }
.setcard__body > p { margin: 0 0 1rem; color: var(--stock-dim); max-width: 46ch; }
.setcard__what { list-style: none; margin: 0 0 1.25rem; padding: 0; display: grid;
  gap: .4rem; }
.setcard__what li { font-size: .92rem; color: var(--stock-dim);
  padding-left: 1.1rem; position: relative; }
.setcard__what li::before { content: "+"; position: absolute; left: 0;
  color: var(--stamp); font-family: var(--mono); font-size: .75rem; }
.setcard__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin: 0; }
.price { font-family: var(--mono); font-size: .85rem; color: var(--stock);
  font-variant-numeric: tabular-nums; }
.price b { color: var(--stamp); font-weight: 500; font-size: 1.15rem; }

.laddercard { border: 1px solid var(--rule-line); padding: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 5vh, 3rem); }
.laddercard h2 { margin: 0; }
.laddercard p { margin: 0; color: var(--stock-faint); }

/* ── writers, subjects ─────────────────────────────────────────────────── */

.writers { display: grid; grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  background: var(--ink); border: 1px solid var(--rule-line);
  margin-block: clamp(2rem, 5vh, 3rem) clamp(3rem, 8vh, 5rem); }
.writercard { padding: clamp(1.25rem, 2.5vw, 1.75rem); display: grid; gap: 1rem;
  align-content: start; border-right: 1px solid var(--rule-line);
  border-bottom: 1px solid var(--rule-line); transition: background .22s var(--ease); }
.writercard:hover { background: var(--ink-raise); }
.writercard__head { display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: .9rem; align-items: center; }
.writercard h2 { margin: 0; font-family: var(--display);
  font-variation-settings: "opsz" 40, "WONK" 1; font-weight: 700; font-size: 1.25rem;
  letter-spacing: -.02em; }
.writercard h2 a:hover { color: var(--glow); }
.writercard__head .mono { margin: .25rem 0 0; font-size: .5625rem; }
.writercard__bio { margin: 0; font-size: .9rem; color: var(--stock-dim); }
.writercard__books { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; }
.writercard__books img { width: 100%; aspect-ratio: 1600 / 2560; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.07); transition: transform .22s var(--ease); }
.writercard__books a:hover img { transform: translateY(-4px); }
.writercard__more { color: var(--stock-dim); }
.writercard__more:hover { color: var(--stock); }

.azbar { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: 1.75rem; }
.azbar a { min-width: 1.85rem; text-align: center; border: 1px solid var(--edge);
  padding: .35rem .3rem; font-family: var(--mono); font-size: .625rem;
  color: var(--stock-dim); transition: color .18s var(--ease), border-color .18s var(--ease); }
.azbar a:hover { color: var(--stock); border-color: var(--stock-dim); }

.az { padding-block: clamp(2rem, 5vh, 3rem) clamp(3rem, 8vh, 5rem); display: grid;
  gap: clamp(2rem, 5vh, 3rem); }
.az__group { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1.5rem;
  align-items: start; }
.az__letter { font-family: var(--display);
  font-variation-settings: "opsz" 144, "WONK" 1; font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem); margin: 0; line-height: .8;
  color: var(--stock-faint); position: sticky; top: 5rem; }
.az ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px;
  background: var(--rule-line); border-block: var(--hair); }
.az li { background: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .5rem 1.5rem; padding: .65rem .25rem; }
.az li a { display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem; }
.az__name { font-family: var(--display); font-variation-settings: "opsz" 30;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.az li a:hover .az__name { color: var(--glow); }
.az__title { color: var(--stock-dim); font-size: .9rem; }
.az__meta { font-size: .5625rem; color: var(--stock-faint); }

/* ── free-to-read band ─────────────────────────────────────────────────── */

.freegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  background: var(--ink); border: 1px solid var(--rule-line); }
.freecard { padding: 1.15rem 1.25rem 1.35rem; display: grid; gap: .4rem;
  align-content: start; border-right: 1px solid var(--rule-line);
  border-bottom: 1px solid var(--rule-line); transition: background .22s var(--ease); }
.freecard:hover { background: var(--ink-raise); }
.freecard strong { font-family: var(--display);
  font-variation-settings: "opsz" 40, "WONK" 1; font-weight: 700; font-size: 1.2rem;
  letter-spacing: -.02em; line-height: 1.05; }
.freecard:hover strong { color: var(--glow); }
.freecard__from { font-size: .85rem; color: var(--stock-dim); }
.freecard__from em { font-style: italic; color: var(--stock); }
.freecard__len { font-size: .5625rem; color: var(--stock-faint); margin-top: .3rem; }

/* ── features ──────────────────────────────────────────────────────────── */

.feature { display: grid; gap: clamp(2.5rem, 6vh, 4rem); }
.feature__row { display: grid; gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); align-items: start;
  padding-top: clamp(2rem, 5vh, 3rem); border-top: var(--hair); }
.feature__row:first-child { border-top: 0; padding-top: 0; }
.feature__cover img { width: 100%; aspect-ratio: 1600 / 2560; object-fit: cover;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.07);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.feature__cover:hover img { transform: translateY(-5px);
  box-shadow: 0 26px 52px -20px var(--glow), 0 0 0 1px rgba(255,255,255,.14); }
.feature__body h3 { margin: .35rem 0 0; }
.feature__body h3 a { font-family: var(--display);
  font-variation-settings: "opsz" 72, "WONK" 1; font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: 1; letter-spacing: -.028em; }
.feature__body h3 a:hover { color: var(--glow); }
.feature__body > p { margin: .5rem 0 0; }
.feature__hook { color: var(--stock-dim); max-width: 58ch; }
.feature__meta { display: flex; flex-wrap: wrap; align-items: center;
  gap: .6rem 1.25rem; margin-top: 1.4rem !important; }

/* ── cart ──────────────────────────────────────────────────────────────── */

.checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
  padding-block: clamp(2.5rem, 6vh, 4rem) clamp(4rem, 9vh, 6rem); }
.checkout__lines { display: grid; gap: 1.5rem; }
.checkout__summary { display: grid; gap: 1rem; border: 1px solid var(--rule-line);
  padding: clamp(1.15rem, 2vw, 1.5rem); position: sticky; top: 4.75rem; }
.checkout__summary h2 { margin: 0; }

/* A line the catalogue no longer sells has already gone by the time this is
   read, so it states what happened rather than asking for a decision. */
.line__notice { margin: 0 0 1.25rem; padding: .7rem .9rem; font-size: .8125rem;
  color: var(--stamp); border-left: 2px solid var(--stamp);
  background: var(--ink-raise); }

.line { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 1.25rem;
  align-items: start; padding-bottom: 1.5rem; border-bottom: var(--hair); }
.line:last-child { border-bottom: 0; padding-bottom: 0; }
.line img { width: 100%; aspect-ratio: 1600 / 2560; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.line h3 { margin: 0 0 .25rem; font-family: var(--display);
  font-variation-settings: "opsz" 24, "WONK" 1; font-weight: 700; font-size: 1.05rem;
  line-height: 1.15; }
.line p { margin: 0; }
.line__qty { display: inline-flex; align-items: center; border: 1px solid var(--edge);
  margin-top: .5rem; }
.line__qty button { width: 1.7rem; height: 1.6rem; display: grid; place-items: center;
  color: var(--stock-dim); transition: color .15s var(--ease), background .15s var(--ease); }
.line__qty button:hover { color: var(--stock); background: var(--ink-raise); }
.line__qty span { min-width: 1.6rem; text-align: center; font-family: var(--mono);
  font-size: .6875rem; font-variant-numeric: tabular-nums; }
.line__price { font-family: var(--mono); font-size: .8125rem; text-align: right;
  font-variant-numeric: tabular-nums; }
.line__remove { display: block; margin-top: .4rem; font-family: var(--mono);
  font-size: .5625rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--stock-faint); }
.line__remove:hover { color: var(--stamp); }

.totals { display: grid; gap: .45rem; font-family: var(--mono); font-size: .6875rem;
  letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: 1rem;
  color: var(--stock-dim); }
.totals .totals__grand { color: var(--stock); font-size: .9375rem;
  padding-top: .5rem; border-top: var(--hair); }
.totals .totals__note { color: var(--stock-faint); letter-spacing: .02em;
  text-transform: none; }

.field { display: grid; gap: .4rem; }
.field select { background: var(--ink-raise); border: 1px solid var(--edge);
  padding: .6rem .7rem; width: 100%; }

/* ── the reading page: the paper ground ────────────────────────────────── */

body.on-paper { background: var(--paper); color: var(--print); }
.on-paper .masthead { background: color-mix(in srgb, var(--paper) 92%, transparent);
  border-bottom-color: var(--paper-edge); }
.on-paper .wordmark__name { color: var(--print); }
.on-paper .nav a { color: var(--print-dim); }
.on-paper .nav a:hover, .on-paper .nav a[aria-current="page"] { color: var(--print); }
.on-paper .cartbtn { border-color: var(--paper-edge); }
.on-paper .cartbtn:hover { background: var(--paper-raise); }
.on-paper .crumbs { border-bottom-color: var(--paper-edge); }
.on-paper .crumbs li { color: var(--print-dim); }
.on-paper .crumbs a { color: var(--print-dim); }
.on-paper .crumbs a:hover, .on-paper .crumbs [aria-current] { color: var(--print); }
.on-paper .mono { color: var(--print-dim); }
.on-paper .foot { background: var(--ink); color: var(--stock); }
.on-paper .foot .mono { color: var(--stock-faint); }
.on-paper .foot a { color: var(--stock-dim); }
.on-paper .foot a:hover { color: var(--stock); }

.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: var(--stamp-deep);
  transition: width .1s linear; }

.reader { max-width: 44rem; margin-inline: auto;
  padding: clamp(2.5rem, 7vh, 4.5rem) var(--gut) clamp(3rem, 8vh, 5rem); }
.reader__head { border-bottom: 1px solid var(--paper-edge);
  padding-bottom: clamp(1.5rem, 4vh, 2.25rem); margin-bottom: clamp(2rem, 5vh, 3rem); }
.reader__from { margin: .9rem 0 0; color: var(--print-dim); font-size: .95rem; }
.reader__from a { border-bottom: 1px solid var(--paper-edge); }
.reader__from a:hover { border-bottom-color: var(--print); }
.reader__head h1 { margin: 1.1rem 0 0; }
.reader__head h1 .mono { display: block; color: var(--print-dim); }
.reader__head h1 span:last-child { display: block; margin-top: .5rem;
  font-family: var(--display); font-variation-settings: "opsz" 144, "WONK" 1;
  font-weight: 800; font-size: clamp(2.2rem, 5.4vw, 3.6rem); letter-spacing: -.03em;
  line-height: .98; color: var(--print); }
.reader__by { margin: 1.1rem 0 0; font-family: var(--mono); font-size: .625rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--print-dim); }
.reader__label { font-family: var(--mono); font-size: .625rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--print-dim); margin: 0 0 1.5rem;
  padding-bottom: .6rem; border-bottom: 1px solid var(--paper-edge); }
.reader__body { margin-bottom: clamp(2rem, 5vh, 3rem); }
.reader__body p { font-family: var(--display);
  font-variation-settings: "opsz" 14, "SOFT" 0; font-weight: 400; font-size: 1.135rem;
  line-height: 1.72; color: var(--print); margin: 0 0 1.35em; text-wrap: pretty; }
.reader__body h3 { font-family: var(--display);
  font-variation-settings: "opsz" 40, "WONK" 1; font-weight: 700; font-size: 1.35rem;
  margin: 2.25rem 0 1rem; }
.reader__body blockquote { margin: 1.75rem 0; padding-left: 1.25rem;
  border-left: 2px solid var(--paper-edge); font-family: var(--display);
  font-style: italic; font-size: 1.1rem; line-height: 1.6; color: var(--print-dim); }
.reader__body .scene { border: 0; margin: 2.25rem 0; text-align: center; }
.reader__body .scene::after { content: "· · ·"; letter-spacing: .5em;
  color: var(--paper-edge); font-size: .85rem; }
#chapter > p:first-of-type::first-letter,
#foreword > p:first-of-type::first-letter { font-family: var(--display);
  font-variation-settings: "opsz" 144, "WONK" 1; font-weight: 800; float: left;
  font-size: 3.4em; line-height: .8; padding: .05em .09em 0 0; color: var(--spine); }

.reader__end { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.25rem); align-items: start;
  padding: clamp(1.5rem, 4vw, 2.25rem); background: var(--paper-raise);
  border: 1px solid var(--paper-edge); }
.reader__end img { width: 100%; box-shadow: 0 12px 26px -14px rgba(60,40,20,.6); }
.reader__end h2 { font-family: var(--display);
  font-variation-settings: "opsz" 72, "WONK" 1; font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.025em; margin: .5rem 0 .75rem;
  line-height: 1; }
.reader__end p { margin: 0 0 .9rem; color: var(--print-dim); }
.reader__end em { font-style: italic; color: var(--print); }
.reader__buy { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.25rem 0 0; }

.reader__toc { margin-top: clamp(2.5rem, 6vh, 4rem); }
.reader__toc h2 { margin: 0 0 1rem; padding-bottom: .6rem;
  border-bottom: 1px solid var(--paper-edge); }
.reader__toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 2.5rem; }
.reader__toc li { display: flex; gap: .75rem; padding: .3rem 0; color: var(--print-dim);
  font-size: .92rem; break-inside: avoid; }
.reader__toc li span { font-family: var(--mono); font-size: .625rem;
  color: var(--paper-edge); padding-top: .18rem; }
.reader__toc li[data-read="true"] { color: var(--print); font-weight: 600; }

/* ── footer ────────────────────────────────────────────────────────────── */

.foot { padding-block: clamp(3rem, 7vh, 4.5rem) 2.5rem; }
.foot__grid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr));
  gap: 2rem clamp(1.5rem, 3vw, 3rem); }
.foot__grid h2 { font-family: var(--mono); font-size: .625rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--stock-faint); margin: 0 0 1rem;
  font-weight: 400; }
.foot__links { display: grid; gap: .55rem; }
.foot__links a { color: var(--stock-dim); font-size: .92rem; }
.foot__links a:hover { color: var(--stock); }
.foot__mark { font-family: var(--display); font-variation-settings: "opsz" 72, "WONK" 1;
  font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; margin: 0 0 .75rem; }
.foot__note { margin: 0; color: var(--stock-faint); font-size: .88rem; max-width: 34ch; }
.foot__base { display: flex; flex-wrap: wrap; gap: .75rem 1.75rem;
  justify-content: space-between; margin-top: clamp(2.5rem, 6vh, 4rem);
  padding-top: 1.5rem; border-top: var(--hair); }
.foot__base p { margin: 0; }

/* ── motion. CSS only, and already finished if animations never run. ───── */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero__copy > * { animation: rise .7s var(--ease) backwards; }
.hero__copy > *:nth-child(2) { animation-delay: .06s; }
.hero__copy > *:nth-child(3) { animation-delay: .12s; }
.hero__copy > *:nth-child(4) { animation-delay: .18s; }
.hero__specimen { animation: rise .8s var(--ease) .1s backwards; }

/* ── responsive ────────────────────────────────────────────────────────── */

@media (max-width: 62rem) {
  .hero__in { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero__specimen { justify-self: start; max-width: 13rem; }
  .book { grid-template-columns: minmax(0, 1fr); }
  .buybox { position: static; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
            gap: 1.5rem 2rem; align-items: start; }
  .buybox__cover { grid-row: span 3; }
  .cat, .shelfpage, .checkout { grid-template-columns: minmax(0, 1fr); }
  .filters, .shelfpage__meta, .checkout__summary { position: static; max-height: none;
    overflow: visible; }
  .longform { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .setcard { grid-template-columns: minmax(0, 1fr); }
  .reader__end { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 44rem) {
  .nav { display: none; }
  .hero__title { max-width: none; }
  .feature__row { grid-template-columns: minmax(0, 1fr); }
  .feature__cover { max-width: 11rem; }
  .buybox { grid-template-columns: minmax(0, 1fr); }
  .buybox__cover { grid-row: auto; max-width: 14rem; }
  .cat__grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
  .prose p:first-child::first-letter { font-size: 3em; }
  .az__group { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .az__letter { position: static; }
  .reader__toc ol { columns: 1; }
  .faq__item > p { padding-left: 1.25rem; }
  .toc li { grid-template-columns: 2rem minmax(0, 1fr); }
  .toc__len, .toc__flag { grid-column: 2; }
  .pagehead__art { object-position: 50% 50%; opacity: .42; }
  .plate--wide img { aspect-ratio: 16 / 9; }
  .setcard__covers { grid-template-columns: repeat(4, 1fr); }
  .writercard__books { grid-template-columns: repeat(6, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
