/* ==========================================================================
   WILLA ROURKE — direct storefront
   --------------------------------------------------------------------------
   The page alternates between two surfaces, and the alternation is the point.

     .on-room   a deep aubergine night. This is where the books live. The
                jackets are warm, lamplit photographs, so the ground under
                them is cool and chromatic: on brown they sank, on plum they
                glow. That complement is the whole reason for the colour.
     .on-paper  a blush sheet. This is where the paperwork lives: the price
                ladder, the print spec, the order, the policies.

   Every one of these books is about a woman who keeps a record — an invoice,
   a time book, a clipboard, a hold item — so the transaction surface is a
   form and the story surface is the room she keeps it in.

   Colour, type and spacing are all declared here at the top. Nothing below
   invents a value.
   ========================================================================== */

:root {
  /* the night */
  --ink:      #17091C;   /* aubergine, unlit */
  --room:     #26102E;   /* a block raised out of it */
  --room-2:   #331641;   /* a card on that block */
  --pale:     #F8EBF1;
  --mute:     #C2A6CE;
  --edge:     rgba(248, 235, 241, .14);
  --edge-2:   rgba(248, 235, 241, .32);

  /* the paper */
  --paper:     #FBEFF4;
  --paper-2:   #F4E1EA;
  --paper-ink: #2A0F30;
  --paper-mute:#6E4F74;
  --paper-edge:rgba(42, 15, 48, .20);

  /* heat, and light */
  --flush:    #FF3D8B;   /* the heat: the action, the rule, the 18+ mark */
  --lamp:     #F6BC51;   /* the one practical lamp in every jacket */

  /* the four workplaces, from the jacket palettes in KDP_LISTINGS.md, lifted
     to sing on aubergine rather than on brown */
  --u-hartwell:   #6FBEF5;   /* night glass */
  --u-fenwick:    #FF7A52;   /* rust */
  --u-dryline:    #F0A93C;   /* copper */
  --u-blueticket: #E8DCC4;   /* dust */
  --accent: var(--flush);    /* per-section override */

  --display: "Gloock", Georgia, "Times New Roman", serif;
  --body:    "Manrope", "Helvetica Neue", Arial, sans-serif;
  --form:    "DM Mono", ui-monospace, Consolas, monospace;

  --wrap: 1180px;
  --gut:  clamp(1.15rem, 4vw, 2.75rem);
  --band: clamp(3.5rem, 8vw, 7rem);
  --pill: 999px;         /* chips and buttons */
  --r:    14px;          /* blocks that hold a photograph or a form */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--pale);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* height:auto is load-bearing: every <img> carries width and height
   attributes to reserve space, and without this they defeat the
   aspect-ratio on .cover and .plate. */
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--flush);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--paper); color: var(--paper-ink);
  padding: .8rem 1.2rem; z-index: 50;
  font-family: var(--form); font-size: .8rem;
}
.skip:focus { left: 0; }

.wrap {
  width: min(100% - (var(--gut) * 2), var(--wrap));
  margin-inline: auto;
}

/* --------------------------------------------------------------- surfaces */

.on-room  { background: var(--ink);  color: var(--pale); }
.on-room-2{ background: var(--room); color: var(--pale); }
.on-paper { background: var(--paper); color: var(--paper-ink); }

.band { padding-block: var(--band); }
.band--tight { padding-block: clamp(2.25rem, 5vw, 4rem); }
.band--flush-top { padding-top: 0; }

/* ------------------------------------------------------------------- type */

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.0;
  letter-spacing: -.028em;
  text-wrap: balance;
  margin: 0;
}
.display--xl { font-size: clamp(2.6rem, 7.4vw, 5.8rem); line-height: .94; }
.display--l  { font-size: clamp(1.95rem, 4.2vw, 3.3rem); line-height: 1.0; }
.display--m  { font-size: clamp(1.4rem, 2.4vw, 2.05rem); line-height: 1.06; }
.display--s  { font-family: var(--body); font-weight: 800;
               font-size: clamp(1.05rem, 1.5vw, 1.24rem); line-height: 1.2;
               letter-spacing: -.012em; }

.eyebrow {
  font-family: var(--form);
  font-size: .715rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 1.15rem;
}
.on-paper .eyebrow { color: var(--paper-mute); }

.lede {
  font-size: clamp(1.02rem, 1.35vw, 1.16rem);
  line-height: 1.62;
  color: rgba(248, 235, 241, .80);
  max-width: 48ch;
  margin: 1.5rem 0 0;
}
.on-paper .lede { color: rgba(42, 15, 48, .80); }

.prose p { margin: 0 0 1.05em; max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }
.prose--paper p { color: rgba(42, 15, 48, .86); }

.num { font-family: var(--form); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: .77rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .95em 1.8em;
  border: 1px solid var(--edge-2);
  border-radius: var(--pill);
  color: var(--pale);
  background: none;
  cursor: pointer;
  transition: border-color .18s, background-color .18s, color .18s,
              box-shadow .18s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--pale); }

.btn--solid {
  background: var(--flush);
  border-color: var(--flush);
  color: var(--ink);
  font-weight: 800;
}
/* White on this magenta is 3.3:1 and fails, so the solid button carries the
   night as its label colour and the button lightens rather than the type. */
.btn--solid:hover {
  background: #FF5C9E; border-color: #FF5C9E;
  box-shadow: 0 8px 26px color-mix(in srgb, var(--flush) 34%, transparent);
}

.on-paper .btn { border-color: var(--paper-edge); color: var(--paper-ink); }
.on-paper .btn:hover { border-color: var(--paper-ink); }
.on-paper .btn--solid {
  background: var(--paper-ink); border-color: var(--paper-ink); color: var(--paper);
}
.on-paper .btn--solid:hover { background: #12040F; border-color: #12040F; }

.btn--wide { display: block; width: 100%; text-align: center; }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .42; cursor: not-allowed; pointer-events: none;
}

.btns { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.25rem; }

/* ------------------------------------------------------------------ chips */

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }

.chip {
  font-family: var(--form);
  font-size: .68rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: .4em .82em;
  border: 1px solid var(--edge);
  border-radius: var(--pill);
  color: var(--mute);
  white-space: nowrap;
}
.chip--accent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chip--flush  { color: var(--flush); border-color: color-mix(in srgb, var(--flush) 55%, transparent); }
.on-paper .chip { border-color: var(--paper-edge); color: var(--paper-mute); }

/* -------------------------------------------------------------- the sheet */
/* Field and value on a dotted leader — the storefront's paperwork voice.    */

.sheet { margin: 0; }
.sheet__row {
  display: flex;
  align-items: baseline;
  gap: .7rem;
  padding: .62rem 0;
  border-bottom: 1px dashed var(--edge);
}
.sheet__row:first-child { border-top: 1px dashed var(--edge); }
.on-paper .sheet__row { border-color: var(--paper-edge); }

.sheet__k {
  font-family: var(--form);
  font-size: .69rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0;
  flex: 0 0 auto;
}
.on-paper .sheet__k { color: var(--paper-mute); }

.sheet__v {
  font-family: var(--form);
  font-size: .84rem;
  margin: 0 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sheet__v--em { font-weight: 700; }

/* ------------------------------------------------------------------ head */

/* The bar is always the dark surface, including on the paper pages, so it
   states its own colour rather than inheriting the body's. */
.head {
  position: sticky; top: 0; z-index: 30;
  background: rgba(23, 9, 28, .93);
  color: var(--pale);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--edge);
}
.on-paper .head .mark__sub, .on-paper .head .nav a { color: var(--mute); }
.on-paper .head .nav a:hover,
.on-paper .head .nav a[aria-current="page"] { color: var(--pale); }
.head__in {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; padding: .85rem 0;
}
.mark { text-decoration: none; display: block; line-height: 1.05; }
.mark__name {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.44rem;
  letter-spacing: -.022em;
}
.mark__sub {
  display: block;
  font-family: var(--form);
  font-size: .62rem;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: .28rem;
}

.nav { display: flex; align-items: center; gap: clamp(.7rem, 2vw, 1.7rem); }
.nav a {
  font-family: var(--form);
  font-size: .73rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mute);
  padding: .35rem 0;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--pale); border-bottom-color: var(--lamp); }
.nav__count {
  display: inline-block; min-width: 1.55em; text-align: center;
  background: var(--flush); color: var(--ink); font-weight: 700;
  border-radius: var(--pill); padding: .1em .45em;
  margin-left: .3em; font-variant-numeric: tabular-nums;
}
.nav__count[data-empty="1"] { background: none; color: var(--mute); }

@media (max-width: 720px) {
  .nav a[data-optional] { display: none; }
  .mark__sub { display: none; }
}

/* At phone width the bar has to stay one line: the wordmark must not break in
   half, and what is left of the nav has to fit beside it. */
@media (max-width: 520px) {
  .head__in { gap: .75rem; padding: .7rem 0; }
  .mark__name { font-size: 1.05rem; white-space: nowrap; }
  .nav { gap: .8rem; }
  .nav a { font-size: .64rem; letter-spacing: .08em; white-space: nowrap; }
  .nav__count { min-width: 1.35em; margin-left: .25em; }
}

/* ------------------------------------------------------------------ hero */

.hero { position: relative; overflow: hidden; padding-block: clamp(2.25rem, 4.5vw, 3.75rem) 0; }
.hero::before {
  content: "";
  position: absolute; left: 34%; top: -30%;
  width: 84vw; height: 84vw; max-width: 1120px; max-height: 1120px;
  background: radial-gradient(circle,
              color-mix(in srgb, var(--accent) 30%, transparent),
              color-mix(in srgb, var(--accent) 9%, transparent) 38%,
              transparent 64%);
  pointer-events: none;
  transition: background .7s ease;
}
.hero__in {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.rule { margin: 0; border: 0; }
.rule__line {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.05rem, 5.2vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0 0 1.35rem;
  text-wrap: balance;
  transition: opacity .45s ease;
  min-height: 2.1em;
}
.rule__line[data-out="1"] { opacity: 0; }
.rule__under {
  height: 3px; border-radius: var(--pill);
  background: var(--edge); position: relative;
}
.rule__under::after {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: 38%; border-radius: var(--pill);
  background: var(--accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 55%, transparent);
  transition: background .5s ease, box-shadow .5s ease;
  animation: draw 1.1s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes draw { from { width: 0; } }
.rule__from {
  font-family: var(--form);
  font-size: .74rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--mute);
  margin: .95rem 0 0;
  transition: opacity .45s ease;
}
.rule__from[data-out="1"] { opacity: 0; }
.rule__from a { color: var(--pale); text-decoration: none; border-bottom: 1px solid var(--edge-2); }
.rule__from a:hover { border-bottom-color: var(--accent); }

.hero__cover { position: relative; max-width: 300px; margin-left: auto; width: 100%; }
.hero__cover .cover {
  transition: opacity .45s ease, box-shadow .5s ease;
  box-shadow: 0 30px 70px rgba(9, 2, 13, .7),
              0 0 64px color-mix(in srgb, var(--accent) 24%, transparent);
}
.hero__cover .cover[data-out="1"] { opacity: 0; }

/* the 7 / 7 / 7 / 7 shape of the catalogue, made clickable */
.ticks {
  display: flex; gap: 1.15rem; flex-wrap: wrap; align-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0 0;
  position: relative;
}
.ticks__label {
  font-family: var(--form); font-size: .66rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--mute); margin: 0 .35rem 0 0;
}
.ticks__group { display: flex; gap: 4px; }
.tick {
  appearance: none; background: none; border: 0;
  padding: 10px 0; width: 22px; cursor: pointer;
}
.tick__bar {
  display: block; height: 3px; width: 100%;
  background: color-mix(in srgb, var(--tick) 30%, transparent);
  transition: background .2s;
}
.tick:hover .tick__bar { background: color-mix(in srgb, var(--tick) 65%, transparent); }
.tick[aria-current="true"] .tick__bar { background: var(--tick); }

@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; }
  .hero__cover { max-width: 210px; }
  .rule__line { min-height: 0; }
}

/* ----------------------------------------------------------------- covers */

/* A <span>, so it must be blockified by hand: aspect-ratio and a containing
   block for the two pseudo-elements both need a block box. */
.cover {
  display: block;
  position: relative;
  aspect-ratio: 1600 / 2560;
  background: color-mix(in srgb, var(--ink) 72%, var(--room));
  box-shadow: 0 18px 40px rgba(9, 2, 13, .6);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
/* the block of pages, so a card reads as a paperback and not a thumbnail */
.cover::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 8px;
  background: linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,.06) 65%, rgba(0,0,0,0));
  pointer-events: none;
}
.cover::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(248, 235, 241, .12);
  pointer-events: none;
}

/* ------------------------------------------------------------ book cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: clamp(1.4rem, 2.6vw, 2.4rem) clamp(1rem, 2vw, 1.8rem);
  margin: 0; padding: 0; list-style: none;
}
/* Two across on a phone. auto-fill would give one full-bleed card per row,
   which is a poster, not a shelf you can browse. */
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem .9rem; }
  .card__t { font-size: 1rem; }
  /* "In order · 2" must not break across two lines in a half-width card. */
  .card__add { font-size: .6rem; padding: .45em .6em; }
}

.card { display: flex; flex-direction: column; }
.card__link { text-decoration: none; display: block; }
.card__link .cover { transition: transform .2s ease, box-shadow .2s ease; }
.card__link:hover .cover {
  transform: translateY(-3px);
  box-shadow: 0 26px 52px rgba(9, 2, 13, .66),
              0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
}
.card__n {
  font-family: var(--form); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin: .85rem 0 .3rem;
}
.card__t {
  font-family: var(--body); font-weight: 800;
  font-size: 1.07rem; line-height: 1.18; letter-spacing: -.014em; margin: 0;
}
.card__sub {
  font-family: var(--form); font-size: .68rem; letter-spacing: .06em;
  color: var(--mute); margin: .32rem 0 0;
}
.card__foot {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .6rem; margin-top: auto; padding-top: .8rem;
}
.card__price { font-family: var(--form); font-size: .84rem; font-weight: 700; }
.card__add {
  appearance: none; background: none; border: 1px solid var(--edge-2);
  color: var(--pale); font-family: var(--form); font-size: .66rem;
  letter-spacing: .11em; text-transform: uppercase; padding: .45em .9em;
  border-radius: var(--pill);
  cursor: pointer; transition: background .18s, color .18s, border-color .18s;
}
.card__add:hover { background: var(--flush); border-color: var(--flush); color: var(--ink); }
.card__add { white-space: nowrap; }
.card__add[data-in="1"] { border-color: var(--lamp); color: var(--lamp); }

/* ------------------------------------------------------- universe blocks */

.uni { border-top: 1px solid var(--edge); padding-block: clamp(2.5rem, 5vw, 4rem); }
.uni:first-of-type { border-top: 0; }
.uni__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
.uni__n {
  font-family: var(--form); font-size: .7rem; letter-spacing: .17em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .7rem;
}
.uni__name { color: var(--pale); }
.uni__where {
  font-family: var(--form); font-size: .73rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mute); margin: .7rem 0 0;
}
.uni__strip {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(.4rem, 1vw, .85rem);
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
}
.uni__strip a { display: block; text-decoration: none; }
.uni__strip .cover { transition: transform .2s ease; }
.uni__strip a:hover .cover { transform: translateY(-4px); }
.uni__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem;
  margin-top: 1.6rem;
}
.uni__set {
  font-family: var(--form); font-size: .78rem; color: var(--mute);
}
.uni__set b { color: var(--pale); font-weight: 700; }

@media (max-width: 780px) {
  .uni__head { grid-template-columns: 1fr; }
  .uni__strip { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------------- two-up bed */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
}
.split--wide { gap: clamp(2rem, 6vw, 6rem); }

.trio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(1.75rem, 4vw, 3.25rem);
}
/* These three are used on both surfaces, so they are written for the dark one
   and re-stated for paper — not the other way round, which left them almost
   unreadable wherever a trio sat on the dark ground. */
.trio__k {
  font-family: var(--form); font-size: .69rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--mute);
  padding-bottom: .7rem; margin: 0 0 1.1rem;
  border-bottom: 1px solid var(--edge);
}
.trio__t { margin: 0 0 .7rem; }
.trio__d { margin: 0; color: rgba(248, 235, 241, .78); font-size: .97rem; }

.on-paper .trio__k { color: var(--paper-mute); border-bottom-color: var(--paper-edge); }
.on-paper .trio__d { color: rgba(42, 15, 48, .80); }

/* ------------------------------------------------------------ shop filter */

.filter {
  display: flex; flex-wrap: wrap; gap: .45rem;
  padding: 1.1rem 0; margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
  border-top: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
  align-items: center;
}
.filter__k {
  font-family: var(--form); font-size: .68rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--mute); margin: 0 .5rem 0 0;
}
.filter__b {
  appearance: none; background: none; border: 1px solid var(--edge);
  color: var(--mute); font-family: var(--form); font-size: .69rem;
  letter-spacing: .1em; text-transform: uppercase; padding: .45em .85em;
  cursor: pointer; transition: color .18s, border-color .18s, background .18s;
}
/* Stacked filter rows share one hairline instead of doubling it. */
.filter + .filter { border-top: 0; padding-top: 0; }
.filter__b:hover { color: var(--pale); border-color: var(--edge-2); }
.filter__b[aria-pressed="true"] {
  background: var(--paper); border-color: var(--paper); color: var(--paper-ink); font-weight: 700;
}
.filter__count {
  font-family: var(--form); font-size: .72rem; color: var(--mute); margin-left: auto;
}

/* --------------------------------------------------------------- offers */

.offer {
  border: 1px solid var(--edge-2);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  display: flex; flex-direction: column; gap: .9rem;
}
.offer__k {
  font-family: var(--form); font-size: .68rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--accent); margin: 0;
}
.offer__t { margin: 0; }
.offer__p { font-family: var(--form); font-size: 1.5rem; font-weight: 700; margin: 0; }
.offer__p small { font-size: .72rem; font-weight: 400; color: var(--mute); letter-spacing: .06em; }
.offer__d { margin: 0; font-size: .95rem; color: rgba(248, 235, 241, .74); }
.offer__b { margin-top: auto; }

/* ------------------------------------------------------------ book page */

.book { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); }
.book__aside { position: relative; }
.book__aside::before {
  content: ""; position: absolute; inset: -12% -18% -8% -18%;
  background: radial-gradient(ellipse at 50% 42%,
              color-mix(in srgb, var(--accent) 20%, transparent), transparent 66%);
  pointer-events: none;
}
.book__aside .cover { position: relative; }
.book__rule {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.4rem, 2.8vw, 2.15rem); line-height: 1.14;
  letter-spacing: -.015em; margin: 0 0 1.9rem;
  padding-bottom: 1.5rem; border-bottom: 1px solid var(--edge);
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
.book__buy { margin-top: clamp(2rem, 4vw, 3rem); }
.qty {
  display: inline-flex; align-items: stretch; border: 1px solid var(--edge-2);
}
.qty button {
  appearance: none; background: none; border: 0; color: var(--pale);
  font-family: var(--form); font-size: 1rem; width: 2.6em; cursor: pointer;
  transition: background .15s;
}
.qty button:hover { background: rgba(248, 235, 241, .1); }
.qty input {
  appearance: none; background: none; border: 0; color: var(--pale);
  font-family: var(--form); font-size: .9rem; width: 3em; text-align: center;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

@media (max-width: 780px) {
  .book { grid-template-columns: 1fr; }
  .book__aside { max-width: 240px; }
}

/* ---------------------------------------------------------------- ladder */

.ladder { width: 100%; border-collapse: collapse; font-family: var(--form); }
.ladder caption {
  font-size: .69rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--paper-mute); text-align: left; padding-bottom: .8rem;
}
.on-room .ladder caption { color: var(--mute); }
.ladder th, .ladder td {
  text-align: left; padding: .68rem 0; font-weight: 400; font-size: .87rem;
  border-bottom: 1px dashed var(--paper-edge);
}
.on-room .ladder th, .on-room .ladder td { border-color: var(--edge); }
.ladder td:last-child, .ladder th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.ladder tr[data-best] td { font-weight: 700; }
.ladder small { color: var(--paper-mute); }

/* ------------------------------------------------------------------ cart */

.line {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto auto;
  gap: 1.1rem; align-items: center;
  padding: 1.1rem 0; border-bottom: 1px dashed var(--edge);
}
.line__t { font-family: var(--display); font-size: 1.05rem; margin: 0; font-weight: 600;
           font-variation-settings: "opsz" 36; }
.line__s { font-family: var(--form); font-size: .68rem; color: var(--mute); margin: .22rem 0 0;
           letter-spacing: .06em; }
.line__p { font-family: var(--form); font-size: .87rem; font-variant-numeric: tabular-nums; }
.line__x {
  appearance: none; background: none; border: 0; color: var(--mute);
  font-family: var(--form); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; cursor: pointer; padding: .3em;
}
.line__x:hover { color: var(--flush); }

.empty { padding: clamp(2.5rem, 6vw, 5rem) 0; text-align: center; }
.empty p { color: var(--mute); margin: 0 0 1.75rem; }

.totals { margin-top: 1.6rem; }
.totals .sheet__v--big { font-size: 1.25rem; font-weight: 700; }

.notice {
  border: 1px solid var(--edge-2);
  border-left: 3px solid var(--lamp);
  padding: 1.35rem 1.5rem;
  margin: 1.75rem 0;
}
.notice h2 {
  font-family: var(--form); font-size: .72rem; letter-spacing: .15em;
  text-transform: uppercase; margin: 0 0 .8rem; color: var(--lamp);
}
.notice p { margin: 0 0 .85rem; font-size: .95rem; color: rgba(248, 235, 241, .8); }
.notice p:last-child { margin-bottom: 0; }
.notice code { font-family: var(--form); font-size: .85em; color: var(--pale); }
.on-paper .notice { border-color: var(--paper-edge); border-left-color: var(--flush); }
.on-paper .notice h2 { color: var(--flush); }
.on-paper .notice p { color: rgba(42, 15, 48, .82); }

/* ------------------------------------------------------------------ form */

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--form); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mute);
}
.field input, .field select {
  appearance: none; background: rgba(248, 235, 241, .05);
  border: 1px solid var(--edge-2); color: var(--pale);
  font-family: var(--form); font-size: .88rem; padding: .78em .85em;
  border-radius: 0;
}
.field select { background-image: none; }
.field input:focus, .field select:focus { border-color: var(--lamp); outline: none; }

/* ---------------------------------------------------------------- footer */

.foot { border-top: 1px solid var(--edge); padding-block: clamp(2.75rem, 5vw, 4rem) 2rem; }
.foot__grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
}
.foot h2 { font-family: var(--display); font-size: 1.3rem; margin: 0 0 .8rem; font-weight: 600;
           font-variation-settings: "opsz" 48; }
.foot__blurb { color: var(--mute); font-size: .93rem; margin: 0; max-width: 40ch; }
.foot__k {
  font-family: var(--form); font-size: .66rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--mute); margin: 0 0 .9rem;
}
.foot__list { list-style: none; margin: 0; padding: 0; }
.foot__list li { margin-bottom: .5rem; }
.foot__list a { font-size: .93rem; text-decoration: none; color: rgba(248, 235, 241, .78); }
.foot__list a:hover { color: var(--pale); text-decoration: underline; text-underline-offset: 3px; }
.foot__base {
  display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; justify-content: space-between;
  margin-top: clamp(2.25rem, 4vw, 3.25rem); padding-top: 1.4rem;
  border-top: 1px solid var(--edge);
  font-family: var(--form); font-size: .68rem; letter-spacing: .08em; color: var(--mute);
}
.stamp {
  display: inline-flex; align-items: center; gap: .45em;
  color: var(--flush); border: 1px solid color-mix(in srgb, var(--flush) 55%, transparent);
  border-radius: var(--pill);
  padding: .32em .78em; font-family: var(--form); font-size: .66rem;
  letter-spacing: .13em; text-transform: uppercase;
}

/* ----------------------------------------------------------------- plates */
/* The section photographs. They set a room; they never carry information,   */
/* so they are always decorative alt-wise and always yield to the type.      */

.plate {
  width: 100%; height: auto; display: block;
  border-radius: var(--r);
  filter: saturate(1.02) contrast(1.02);
}
.plate__wide { position: relative; overflow: hidden; }
.plate__wide .plate { aspect-ratio: 16 / 6; object-fit: cover; }

/* The plate sits beside the type rather than under it. Text over a photograph
   needs a scrim, and a scrim heavy enough to carry type buries a picture this
   dim — so the room gets its own half of the grid and stays legible. */
.uni__banner { overflow: hidden; }
.uni__banner .plate { aspect-ratio: 16 / 10; object-fit: cover; }

@media (max-width: 640px) {
  .plate__wide .plate { aspect-ratio: 4 / 3; }
}

/* -------------------------------------------------------------- link reset */

.plain { text-decoration: none; color: inherit; }
.plain:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------- the free read */
/* Chapter one is set on the paper surface, because it is a preview of the   */
/* printed object as much as of the story.                                   */

.read { max-width: 40rem; }
.read__title { margin: .8rem 0 0; }
.read__sub {
  font-family: var(--form); font-size: .75rem; letter-spacing: .11em;
  text-transform: uppercase; color: var(--paper-mute); margin: .7rem 0 0;
}
.read__meta {
  font-family: var(--form); font-size: .72rem; color: var(--paper-mute);
  margin: 1.4rem 0 0; line-height: 1.75;
}
.read__rule { border: 0; border-top: 1px solid var(--paper-edge); margin: 2rem 0 0; }

.read__body {
  font-family: var(--display);
  font-variation-settings: "opsz" 14;
  font-size: 1.115rem;
  line-height: 1.72;
  margin-top: 2.25rem;
}
.read__body p { margin: 0 0 1.05em; }
.read__body p + p { text-indent: 1.4em; }
.read__body hr.scene {
  border: 0; margin: 2.1em auto; width: 100%;
  text-align: center; overflow: visible;
}
.read__body hr.scene::after {
  content: "\00a7";
  color: var(--paper-mute); font-family: var(--form); font-size: .9rem;
}
.read__body p + hr.scene + p { text-indent: 0; }
.read__end { border-top: 1px solid var(--paper-edge); }

/* ------------------------------------------------------------- read index */

.readlist { list-style: none; margin: 2rem 0 0; padding: 0; }
.readrow {
  display: grid; grid-template-columns: 90px minmax(0, 1fr);
  gap: 1.4rem; align-items: start;
  padding: 1.5rem 0; border-top: 1px solid var(--edge);
}
.readrow__cover { display: block; }
.readrow__rule {
  font-family: var(--display); font-size: 1.06rem; line-height: 1.35;
  color: rgba(248, 235, 241, .82); margin: .6rem 0 0; max-width: 54ch;
  font-variation-settings: "opsz" 36;
}
.readrow__meta {
  font-family: var(--form); font-size: .69rem; letter-spacing: .07em;
  color: var(--mute); margin: .75rem 0 0;
}
.readrow__meta a { color: var(--accent); }

/* ----------------------------------------------------------------- tropes */

.tropegrid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.tropecard { border-top: 1px solid var(--edge-2); padding-top: 1.1rem; }
.tropecard .card__n { color: var(--mute); margin-top: 0; }
.tropecard__books {
  font-family: var(--form); font-size: .72rem; line-height: 1.9;
  color: var(--mute); margin: 1rem 0 0;
}
.tropecard__books a { color: rgba(248, 235, 241, .84); text-decoration: none; }
.tropecard__books a:hover { color: var(--lamp); }

/* --------------------------------------------------------------- glossary */

.glosslist {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem);
}
.gloss { border-top: 2px solid var(--accent); padding-top: 1rem; }
.gloss__t { margin: 0 0 .6rem; }
.gloss__d { margin: 0; color: rgba(248, 235, 241, .80); font-size: .97rem; }
.gloss__d em { color: var(--pale); font-style: italic; }
.gloss__b {
  font-family: var(--form); font-size: .68rem; letter-spacing: .07em;
  color: var(--mute); margin: .9rem 0 0;
}
.gloss__b a { color: var(--accent); }

/* ---------------------------------------------------------- reading order */

.orderlist { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.orderrow {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1.3fr) minmax(0, 1fr) auto;
  gap: 1rem; align-items: baseline;
  padding: .8rem 0; border-bottom: 1px dashed var(--edge);
}
.orderrow__n { font-family: var(--form); font-size: .78rem; color: var(--accent); }
.orderrow__t { font-family: var(--display); font-size: 1.08rem; font-weight: 600;
               font-variation-settings: "opsz" 36; }
.orderrow__s, .orderrow__e {
  font-family: var(--form); font-size: .7rem; letter-spacing: .07em;
  text-transform: uppercase; color: var(--mute);
}
.orderrow__e { text-align: right; }
/* Same row, without the leading number column. */
.orderrow--noindex { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; }

@media (max-width: 640px) {
  .orderrow { grid-template-columns: 2rem minmax(0, 1fr) auto; }
  .orderrow__s { display: none; }
}

/* -------------------------------------------------------------------- FAQ */

.faqlist { margin-top: clamp(2rem, 4vw, 3rem); }
.faq { padding: 1.6rem 0; border-top: 1px solid var(--edge); }
.faq__q { margin: 0 0 .7rem; }
.faq__a { margin: 0; color: rgba(248, 235, 241, .80); max-width: 68ch; }

/* -------------------------------------------------------- card free link */

.card__free {
  font-family: var(--form); font-size: .64rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--mute); text-decoration: none;
  margin-top: .55rem; border-bottom: 1px solid transparent; align-self: start;
}
.card__free:hover { color: var(--lamp); border-bottom-color: var(--lamp); }

/* ------------------------------------------------------------- book rows */

.book--row { margin-bottom: clamp(2.5rem, 5vw, 4rem); grid-template-columns: minmax(0, 180px) minmax(0, 1fr); }
.book__rule--sm {
  font-size: clamp(1.1rem, 1.9vw, 1.45rem); margin: .9rem 0 1.25rem;
  padding-bottom: 1.25rem;
}

@media (max-width: 780px) {
  .book--row { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------ breadcrumbs */

.crumbs {
  border-bottom: 1px solid var(--edge);
  font-family: var(--form); font-size: .68rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--mute);
}
.crumbs .wrap { padding: .8rem 0; overflow-x: auto; white-space: nowrap; }
.crumbs a { color: var(--mute); text-decoration: none; }
.crumbs a:hover { color: var(--pale); }
.crumbs [aria-current] { color: var(--pale); }
.crumbs__sep { padding: 0 .6em; opacity: .5; }
.on-paper .crumbs { border-bottom-color: var(--paper-edge); color: var(--paper-mute); }
.on-paper .crumbs a { color: var(--paper-mute); }
.on-paper .crumbs a:hover, .on-paper .crumbs [aria-current] { color: var(--paper-ink); }

/* ---------------------------------------------------------------- scroller */
/* Wide content scrolls inside its own box; the page body never does.        */

.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scroller > table { min-width: 34rem; }

/* ------------------------------------------------------------------ pager */

.pager {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.25rem; border-top: 1px solid var(--edge);
}
.on-paper .pager { border-top-color: var(--paper-edge); }
.pager__a {
  font-family: var(--form); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; text-decoration: none; color: var(--mute);
}
.pager__a:hover { color: var(--pale); }
.on-paper .pager__a:hover { color: var(--paper-ink); }

/* --------------------------------------------------------------- register */
/* The signature object: twenty-eight books on one linear scale, the bar for
   the story and the tick for the measured audiobook at the house rate.     */

.reg { width: 100%; border-collapse: collapse; font-size: .86rem; }
.reg caption {
  font-family: var(--form); font-size: .69rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--mute); text-align: left;
  padding-bottom: 1rem;
}
.reg th, .reg td {
  padding: .55rem .8rem .55rem 0; text-align: left; font-weight: 400;
  border-bottom: 1px solid var(--edge); vertical-align: middle;
}
.reg thead th {
  font-family: var(--form); font-size: .64rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--mute);
  border-bottom-color: var(--edge-2);
}
.reg td.num, .reg thead th:nth-child(n+3) { text-align: right; padding-right: 0; }
.reg td.num { font-family: var(--form); font-variant-numeric: tabular-nums;
              white-space: nowrap; color: rgba(248, 235, 241, .82); }
.reg__t { font-family: var(--body); font-size: .97rem; font-weight: 700;
          letter-spacing: -.01em; min-width: 12rem; }
.reg__s {
  display: block; font-family: var(--form); font-size: .62rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--mute);
  font-weight: 400; margin-top: .15rem;
}
.reg__plot { position: relative; width: 40%; min-width: 9rem; }
.reg__bar {
  display: block; height: 9px; border-radius: var(--pill);
  background: var(--accent);
}
.reg__tick {
  position: absolute; top: 50%; width: 2px; height: 20px;
  transform: translateY(-50%);
  background: var(--pale);
}

/* ----------------------------------------------------------- the scene map */
/* The numbers here are a real sequence — scene one through five, in the order
   the book takes them — so they are numbered. Nothing else on the site is.   */

.scenes { list-style: none; margin: 1.6rem 0 0; padding: 0;
          counter-reset: none; }
.scene {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr) auto;
  gap: 0 1.1rem;
  align-items: baseline;
  padding: 1.05rem 0;
  border-top: 1px solid var(--edge);
}
.scene:first-child { border-top: 0; padding-top: .4rem; }
.on-paper .scene { border-top-color: var(--paper-edge); }

.scene__n {
  grid-row: span 2;
  align-self: start;
  display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem;
  border-radius: var(--pill);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent);
  font-family: var(--form); font-size: .82rem;
  font-variant-numeric: tabular-nums;
}
.scene__where {
  margin: 0; font-weight: 700; font-size: 1.02rem; line-height: 1.4;
}
.scene__beat {
  grid-column: 2; margin: .3rem 0 0;
  font-size: .93rem; color: var(--mute);
}
.on-paper .scene__beat { color: var(--paper-mute); }
.scene__ch {
  grid-row: span 2; align-self: start;
  font-family: var(--form); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mute); white-space: nowrap;
  padding-top: .55rem;
}
.on-paper .scene__ch { color: var(--paper-mute); }

@media (max-width: 560px) {
  .scene { grid-template-columns: 2rem minmax(0, 1fr); }
  .scene__n { width: 2rem; height: 2rem; font-size: .74rem; }
  .scene__ch { grid-row: auto; grid-column: 2; padding-top: .45rem; }
}

.declared { list-style: none; margin: 1.3rem 0 0; padding: 0; max-width: 62ch; }
.declared li {
  padding: .7rem 0; border-top: 1px solid var(--edge);
  font-size: .97rem; color: var(--mute);
}
.declared li:first-child { border-top: 0; }
.declared b { color: var(--pale); font-weight: 800; }
.on-paper .declared li { border-top-color: var(--paper-edge); color: var(--paper-mute); }
.on-paper .declared b { color: var(--paper-ink); }

.scene__src {
  font-family: var(--form); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mute);
  margin: 1.1rem 0 0;
}
.on-paper .scene__src { color: var(--paper-mute); }

/* --------------------------------------------------------------- the answer */
/* The block a search result lifts: the whole answer, above everything else.  */

.answer {
  border-left: 3px solid var(--accent);
  padding: .1rem 0 .1rem 1.35rem;
  margin: 1.75rem 0 0;
  max-width: 60ch;
}
.answer p { margin: 0; font-size: clamp(1.06rem, 1.5vw, 1.24rem);
            line-height: 1.55; }
.answer b { font-weight: 800; }

/* ----------------------------------------------------------------- notice */

.notice--flush { margin: 2rem 0 0; }

/* ------------------------------------------------------------ ruled bands */

.band--ruled { border-top: 1px solid var(--edge); }
.on-paper.band--ruled, .on-paper .band--ruled { border-top-color: var(--paper-edge); }

/* --------------------------------------------------------- policy headings */

.prose h2.display { margin: 2.5rem 0 1rem; }
.prose h2.display:first-child { margin-top: 0; }

/* ------------------------------------------------------------ housekeeping */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .head, .nav, .btn, .foot__base { display: none; }
  body { background: #fff; color: #000; }
}
