/* The catalogue at bookhawkpress.com/books/ (packages/edition/src/catalogue.ts), on top of the imprint's /assets/site.css:
   same paper, ink, serif and rule. The worker serves it as /books/_catalogue/catalogue.<sha10>.css.
   Phone first (390 px in the Facebook in-app browser): two book cards a row, so a screen shows four books, not 1.2;
   three a row from 48rem, four from 64rem. Sets get their own wide cards above the books. No inline styles (CSP). */
.catalogue { padding-block: 1.25rem 3.5rem; }
.catalogue h1 { font-weight: normal; color: var(--ink); font-size: clamp(1.6rem, 5.5vw, 3rem); line-height: 1.12; margin: 0 0 .5rem; letter-spacing: -.01em; }
.catalogue .lede { font-size: 1rem; line-height: 1.5; max-width: 40rem; margin: 0 0 1rem; }
.catalogue-empty { color: var(--muted); font-style: italic; max-width: 34rem; }
@media (min-width: 48rem) { .catalogue { padding-block: 3rem 4rem; } .catalogue .lede { font-size: 1.2rem; margin-bottom: 2rem; } }

/* Shelf chips: jump links, one row that scrolls sideways on a narrow phone rather than wrapping. */
.shelf-nav { display: flex; gap: .5rem; overflow-x: auto; margin: 0 0 1.25rem; padding-bottom: .25rem; }
.shelf-nav a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 .9rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-deep); color: var(--ink); text-decoration: none; font-size: .98rem; white-space: nowrap; }
.shelf-nav a:hover { border-color: var(--accent); color: var(--accent); }
.shelf { margin: 0 0 2.25rem; scroll-margin-top: 1rem; }
.shelf-title { font-weight: normal; color: var(--ink); font-size: 1.55rem; line-height: 1.2; margin: 0 0 .35rem; }
.shelf-lede { color: var(--muted); max-width: 40rem; margin: 0 0 .9rem; font-size: .95rem; line-height: 1.45; }
@media (min-width: 48rem) { .shelf-lede { font-size: 1.02rem; } }

/* Book cards. */
.books { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
@media (min-width: 48rem) { .books { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; } }
@media (min-width: 64rem) { .books { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.book { display: flex; flex-direction: column; padding: .6rem .6rem .7rem; background: var(--paper-deep); border: 1px solid var(--rule); }
.book:hover { border-color: var(--accent); }
.book-link { display: block; color: var(--text); text-decoration: none; flex: 1; }
.book-link:hover { color: var(--text); }
.book-link:hover .book-title { color: var(--accent); }
.book-img { display: block; aspect-ratio: 4 / 5; margin: 0 0 .55rem; }
.book-pic, .book-pic img { display: block; width: 100%; height: 100%; }
.book-pic img { object-fit: contain; }
.book p { margin: 0; }
.book-title { font-weight: normal; color: var(--ink); font-size: 1.12rem; line-height: 1.18; margin: 0; }
.book-subtitle { font-style: italic; color: var(--muted); font-size: .92rem; line-height: 1.3; margin-top: .15rem !important; }
.book-byline { margin-top: .25rem !important; font-size: .92rem; line-height: 1.3; color: var(--muted); }
/* The subhead sells, but at two columns it would make every card a screen tall: wider screens only. */
/* On a phone the pitch shows too, clamped to three lines (CONV-7); the whole of it from 48rem. */
.book-subhead { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; margin-top: .45rem !important; font-size: .92rem; line-height: 1.4; }
@media (min-width: 48rem) { .book { padding: 1rem; } .book-title { font-size: 1.35rem; } .book-subhead { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; margin-top: .6rem !important; font-size: 1rem; line-height: 1.5; } }
.book-prices { list-style: none; margin: .6rem 0 0; padding: .5rem 0 0; border-top: 1px solid var(--rule); font-size: .9rem; line-height: 1.35; }
.book-prices li { display: flex; justify-content: space-between; gap: .4rem; }
.book-prices b { font-weight: normal; color: var(--ink); white-space: nowrap; }
.book-foot { margin: .55rem 0 0 !important; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; }
/* Order is the card's button (CONV-7), in the imprint's .btn style. */
.book-order { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .4rem 1.1rem; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: 2px; font-size: 1rem; text-decoration: none; }
.book-order:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.set-see:hover { color: var(--accent); }

/* Set cards: the books' own renders side by side, the count, then every format with its price per book. */
.sets { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
@media (min-width: 48rem) { .sets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; } }
.set { padding: .9rem; background: var(--paper-deep); border: 1px solid var(--accent); min-width: 0; }
.set-link { display: block; color: var(--text); text-decoration: none; }
.set-link:hover .book-title { color: var(--accent); }
/* The strip fits any card: up to six 4.5rem books with a .6rem overlap need about 24rem, more than a phone card
   (about 20rem at 390 px) or a two-column card at 800 px. They shrink together, keeping the overlap, instead of
   widening the card or the page. */
.set-books { display: flex; align-items: flex-end; margin: 0 0 .6rem; padding-left: .6rem; overflow: hidden; min-width: 0; }
.set-pic { display: block; flex: 0 1 4.5rem; min-width: 0; margin-left: -.6rem; }
.set-pic img { display: block; width: 100%; height: auto; }
.set p { margin: 0; }
.set-count { color: var(--accent); font-variant: small-caps; letter-spacing: .08em; font-size: 1rem; }
.set .book-title { font-size: 1.35rem; }
.set-members { color: var(--muted); font-size: .95rem; line-height: 1.35; margin-top: .2rem !important; }
/* One row per format: its name, its price, its price per book, in columns so the prices line up. */
.set-prices { list-style: none; margin: .7rem 0 0; padding: .55rem 0 0; border-top: 1px solid var(--rule); font-size: .9rem; line-height: 1.5; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0 .6rem; }
.set-prices li { display: contents; }
.set-prices b { font-weight: normal; color: var(--ink); text-align: right; }
@media (min-width: 30rem) { .set-prices { font-size: .98rem; } }
.set-top b { font-weight: 600; }
.set-each { color: var(--muted); text-align: right; white-space: nowrap; }
/* The dearest format's saving, full width right under its row, and named for it: the list goes on to other formats. */
.set-prices li.set-top-saving { display: block; grid-column: 1 / -1; margin: 0 0 .3rem; font-size: .92rem; color: var(--accent); }
.set-top-saving b { font-weight: 600; color: var(--accent); text-align: left; }
.set-see { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }

/* What every book's page promises, once, under the lede (CONV-7, CONV-18). */
.catalogue-trust { list-style: none; margin: 0 0 1.5rem; padding: .7rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: .3rem 1.25rem; font-size: .92rem; line-height: 1.4; color: var(--muted); }
.catalogue-trust li { position: relative; padding-left: .9rem; }
.catalogue-trust li::before { content: ""; position: absolute; left: 0; top: .5em; width: .35rem; height: .35rem; border-radius: 50%; background: var(--accent); }
