/* Paged book list (owner, 16-17 Nov 2026: "Page numbers"; version B; "Filter and Sort side by side"): search, sort
   and filters in the left column, 48 books a page and page numbers below; on a phone, search above the books with
   Filter and Sort side by side. Filters, search and pages work on the whole list, not one page.
   Markup from _includes/book-list.njk inside .listing-page (topic, author, All books, New, Sale); cards keep the
   site's .listing-grid style. No book counts anywhere (owner). */
.bl { --bl-line: var(--tmme-border, #e0e0e0); --bl-ink: var(--tmme-ink, #1a1a1a); --bl-muted: rgb(94, 94, 94); }
/* the list's own buttons (filters, sort, search, the empty message); the boxes' Add to Cart / Quick View keep
   product-card.css's look */
.bl-side button, .bl-empty button { font: inherit; color: var(--bl-ink); background: none; border: 0; padding: 0; cursor: pointer; }
.bl button:focus-visible, .bl select:focus-visible, .bl a:focus-visible, .bl input:focus-visible { outline: 2px solid var(--bl-ink); outline-offset: 3px; }
.bl:not(.bl-ready) .bl-js { display: none; }
/* without the script there is no left column: the books take the full width */
.bl:not(.bl-ready) .bl-wrap { display: block; }
.bl-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bl-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }

/* filters */
/* --bl-top: height of the site's fixed top bar (book-list.js), so the column sits below it */
.bl-side { position: sticky; top: calc(var(--bl-top, 0px) + 24px); max-height: calc(100vh - var(--bl-top, 0px) - 48px); overflow-y: auto; outline: none; scrollbar-width: thin; padding: 2px 5px; margin: -2px -5px; }
/* (5px at both sides: the focus ring reaches 4px out of a tick box and 5px out of the Show all buttons and Sort,
   and the old 2px at the left cut it; critics, 23 Nov 2026) */
.bl-side__head, .bl-side .bl-done { display: none; }
.bl-fs { border: 0; min-width: 0; margin: 0 0 24px; padding: 0 0 20px; border-bottom: 1px solid var(--bl-line); }
.bl-fs legend { padding: 0; margin: 0 0 10px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
.bl-box { display: flex; align-items: center; min-height: 36px; font-size: 15px; line-height: 1.3; cursor: pointer; }
.bl-box[hidden] { display: none; }
.bl-box input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bl-box span { display: inline-flex; align-items: center; gap: 12px; }
.bl-box span::before { content: ""; flex: none; width: 18px; height: 18px; border: 1px solid #9a9a9a; border-radius: 2px; background: #fff center / 12px no-repeat; transition: border-color .15s ease, background-color .15s ease; }
.bl-box:hover span::before { border-color: var(--bl-ink); }
.bl-box input:focus-visible + span::before { outline: 2px solid var(--bl-ink); outline-offset: 2px; }
.bl-box input:checked + span::before { background-color: var(--bl-ink); border-color: var(--bl-ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.2 4.8 9 10 3' fill='none' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E"); }
/* a long list once opened (Author, Series, Publisher: more than 20 choices) scrolls in a box of about nine rows, so the filters
   under it stay in reach; the height leaves part of a row showing at the bottom (36px rows, 44px on touch screens),
   so the box looks scrollable even where scroll bars stay hidden. Folded, it has no height limit (8 rows of 44px are
   more than 340px). position: the hidden tick boxes (position absolute) must sit inside the box, or they stretch
   the column and a tick deep in the list scrolls the column instead (critic, 23 Nov 2026). The padding keeps the
   focus ring inside the box. */
.bl-opts { position: relative; padding: 2px 4px; margin: -2px -4px; }
.bl-fs--open .bl-opts { max-height: 340px; overflow-y: auto; scrollbar-width: thin; }
.bl .bl-more { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; margin-top: 4px; font-size: 14px; font-weight: 700; }
.bl-chev { flex: none; width: 11px; height: 8px; transition: transform .25s ease; }
.bl-more[aria-expanded="true"] .bl-chev { transform: rotate(180deg); }
.bl .bl-link { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; border-bottom: 1px solid currentColor; padding: 0 0 3px; }
.bl-link[hidden] { display: none; }

/* Owner, 21 Nov 2026 (option 6 as revised): the column starts with FILTERS and CLEAR ALL FILTERS (option 1); on a
   topic page the topic itself is ticked, greyed out and locked at the top of Topic, with "Narrow down further" on
   a line under it (option 4); above the books "← All books" and the ticked filters as tags (book-list.js). */
.bl-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 12px; margin: 0 0 18px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: #6b6b6b; }
.bl-lock { cursor: default; color: #8f8f8f; }
.bl-box.bl-lock input:checked + span::before { background-color: #c6c6c6; border-color: #c6c6c6; }
.bl-lockicon { flex: none; margin-left: 10px; color: #a3a3a3; }
/* the grey of FILTERS (owner, 21 Nov 2026: "use the darker grey"; the lighter #9a9a9a was too faint to read) */
.bl-nd { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: #6b6b6b; white-space: nowrap; }
.bl-nd::after { content: ""; flex: 1; height: 1px; background: var(--bl-line); }
/* Nothing to filter (owner, 23 Nov 2026: "the filters should be greyed out as there is nothing to filter"; "Yes,
   same greyed column" for lists of 2 or more): Filter and every filter shown in the locked row's greys, reacting
   to nothing; with one book search and sort too */
.bl-fs--dim legend { color: #8f8f8f; }
.bl-fs--dim .bl-box { cursor: default; color: #8f8f8f; }
.bl-fs--dim .bl-box span::before, .bl-fs--dim .bl-box:hover span::before { border-color: #d6d6d6; background-color: #fafafa; }
.bl--single .bl-search input:disabled, .bl--single .bl-search input:disabled:hover { background: #fafafa; border-color: var(--bl-line); cursor: default; opacity: 1; }
.bl--single .bl-search input:disabled::placeholder { color: #b0b0b0; }
.bl--single .bl-search__icon, .bl--single .bl-sort .bl-chev { color: #b0b0b0; }
.bl--single .bl-sort select:disabled, .bl--single .bl-sort select:disabled:hover { background: #fafafa; border-color: var(--bl-line); color: #8f8f8f; cursor: default; opacity: 1; }
.bl--single .bl-sort > span { color: #a3a3a3; }
.bl .bl-open:disabled { color: #8f8f8f; border-color: #d6d6d6; background: #fafafa; cursor: default; opacity: 1; }
/* a page whose own filter is not offered (Bibles: Type instead of Topic) has the locked row in a part of its own */
.bl-fs--lock { margin-bottom: 12px; padding-bottom: 0; border-bottom: 0; }
.bl-ov { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 24px; }
.bl-ov[hidden] { display: none; }
.bl-chips { display: contents; }
.bl-ov button { font: inherit; color: var(--bl-ink); background: none; border: 0; padding: 0; cursor: pointer; }
.bl-back { display: inline-flex; align-items: center; min-height: 36px; margin-right: 12px; font-size: 14px; color: var(--bl-ink); text-decoration: none; white-space: nowrap; }
.bl-back:hover { text-decoration: underline; text-underline-offset: 4px; }
/* the space after the arrow is a margin: the build trims a space at the end of the arrow's span */
.bl-back > span[aria-hidden] { margin-right: 6px; }
.bl-ov .bl-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 1px solid var(--bl-line); border-radius: 999px; background: #fff; font-size: 14px; color: var(--bl-ink); }
.bl-ov button.bl-chip:hover { border-color: var(--bl-ink); }
.bl-chip > span[aria-hidden] { font-size: 17px; line-height: 1; color: #6b6b6b; }
.bl-ov .bl-chip--lock { background: rgb(242, 241, 239); border-color: rgb(242, 241, 239); color: #6b6b6b; cursor: default; }
.bl-chip--lock .bl-lockicon { margin: 0; }
.bl-chips .bl-clear { margin-left: 4px; }
/* on a computer Clear all filters ends the tags' line; the wrapper only matters on a phone */
.bl-clearline { display: contents; }

/* search and sort (the rules below place them in the left column or above the books) */
.bl-tools { display: flex; align-items: center; gap: 16px; margin: 0 0 32px; }
.bl-search { position: relative; flex: 1; max-width: 440px; }
.bl-search__icon { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--bl-muted); pointer-events: none; }
.bl .bl-search input { display: block; width: 100%; height: 44px; padding: 0 44px 0 42px; border: 1px solid var(--bl-line); border-radius: 2px; background: #fff; font: inherit; font-size: 15px; color: var(--bl-ink); transition: border-color .2s ease; }
.bl .bl-search input::placeholder { color: #8a8a8a; }
.bl .bl-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.bl .bl-search input:hover { border-color: #bdbdbd; }
.bl .bl-search input:focus { outline: none; border-color: var(--bl-ink); }
.bl .bl-search__x { position: absolute; right: 2px; top: 50%; display: grid; place-items: center; width: 40px; height: 40px; margin-top: -20px; font-size: 22px; line-height: 1; color: var(--bl-muted); }
.bl .bl-search__x:hover { color: var(--bl-ink); }
.bl-search__x[hidden] { display: none; }
.bl-sort { position: relative; display: inline-flex; align-items: center; gap: 10px; margin-left: auto; font-size: 14px; white-space: nowrap; }
.bl-sort > span { color: var(--bl-muted); }
.bl-sort select { appearance: none; -webkit-appearance: none; height: 44px; padding: 0 36px 0 14px; border: 1px solid var(--bl-line); border-radius: 2px; background: #fff; font: inherit; color: var(--bl-ink); cursor: pointer; }
.bl-sort select:hover { border-color: var(--bl-ink); }
.bl-sort .bl-chev { position: absolute; right: 14px; top: 50%; margin-top: -4px; pointer-events: none; }
.bl .bl-open { display: none; }
/* on a computer, search and sort sit at the top of the left column */
@media (min-width: 768px) {
  .bl-side .bl-tools { flex-direction: column; align-items: stretch; gap: 12px; margin: 0 0 24px; padding: 0 0 24px; border-bottom: 1px solid var(--bl-line); }
  .bl-side .bl-search { flex: none; max-width: none; }
  .bl-side .bl-sort { margin-left: 0; }
  .bl-side .bl-sort select { flex: 1; min-width: 0; }
}

.bl .listing-grid { min-height: 200px; }
/* listing.css sets display: grid, which would keep an empty grid on screen */
.bl .listing-grid[hidden] { display: none; }
.bl-empty { text-align: center; padding: 72px 20px; color: var(--bl-muted); font-size: 17px; }
.bl-empty[hidden] { display: none; }
.bl-empty p { margin: 0 0 18px; }
.bl-empty div { display: flex; justify-content: center; gap: 28px; }

/* Book boxes, the site's June look (owner, 17 Nov 2026: "yes"): each book stands in a light warm grey square
   (rgb(242,241,239), the site's cream) with a shadow, the title bold and centred, 20px between books. Measured from
   the 16 May version's homepage rows. On every book list, short ones too (book-list.njk loads this file for both). */
.listing-grid { gap: 24px 20px; }
.listing-grid .book-card { text-align: center; }
.listing-grid .book-card__image { position: relative; aspect-ratio: 1 / 1; background: rgb(242, 241, 239); padding: 14% 23%; margin-bottom: 10px; }
.listing-grid .book-card__image img { object-position: center; filter: drop-shadow(6px 6px 6px rgba(20, 16, 12, .26)) drop-shadow(1px 1px 1px rgba(20, 16, 12, .18)); }
.listing-grid .book-card__image .cover-missing { background: #fff; }
/* the box's two links (the cover, skipped by screen readers and Tab, and the title) look like the box */
.listing-grid .book-card a { color: inherit; text-decoration: none; }
.listing-grid .book-card__cover { display: block; height: 100%; }
/* Add to Cart and Quick View: the homepage's bar (product-card.css, added by js/quick-view-v2.js) shows inside
   the grey square when it is pointed at or reached with the keyboard */
.listing-grid .book-card__image:hover .product-figcaption, .listing-grid .product-figcaption:focus-within { opacity: 1; }
/* Phones and touch screens have no pointer to hover with: as on the homepage, a full-width Add to Cart sits
   under the cover (here under the grey square) and Quick View is left out */
@media (hover: none), (max-width: 767px) {
  /* min-height 0: with overflow visible the square would otherwise grow to fit a tall cover */
  .listing-grid .book-card__image { overflow: visible; min-height: 0; margin-bottom: 50px; }
  .listing-grid .product-figcaption { position: absolute; top: calc(100% + 8px); right: 0; bottom: auto; left: 0; opacity: 1; background: none; padding: 0; gap: 0; transition: none; }
  /* the homepage's soft-charcoal pill (owner, 19 Nov 2026: option 5, "same everywhere") */
  .listing-grid .product-figcaption .add-to-cart-btn { width: 86%; margin: 0 auto; padding: 8px 12px; font-size: 14px; letter-spacing: 0.3px;
    background: rgb(62, 62, 62); border-color: rgb(62, 62, 62); border-radius: 999px; }
  .listing-grid .product-figcaption .quick-view-btn { display: none; }
}
/* June's grey was rgb(133,134,135), too faint to read easily (3.7:1); the site's muted ink reads at 5.3:1 */
.listing-grid .book-card__title { font-size: 14.4px; font-weight: 700; line-height: 18px; letter-spacing: -.144px; color: #6b6b6b; margin: 0 0 4px; }
.listing-grid .book-card__author { font-size: 13px; color: #6b6b6b; }

/* a page with two lists (New Releases: Coming Soon, Out Now): each part titled like the homepage's book rows */
.bl-part { border-bottom: 0.8px solid rgb(156, 156, 156); margin: 0 0 28px; }
.listing-grid + .bl-part { margin-top: 64px; }
.bl-part__h { display: inline-block; margin: 0 0 -1px; padding: 12px 0; border-bottom: 2px solid rgb(40, 40, 40); font-size: 14.4px; font-weight: 700; line-height: 1.6; color: rgb(94, 94, 94); text-transform: uppercase; }

/* page numbers, in the site's existing style (listing.css) */
.bl .listing-page__pagination { align-items: center; flex-wrap: wrap; }
.bl .listing-page__pagination[hidden] { display: none; }
.bl .listing-page__pagination a, .bl .listing-page__pagination .is-current { min-width: 40px; text-align: center; transition: border-color .15s ease; }
.bl .listing-page__pagination a[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.bl-gap { padding: 8px 2px; color: var(--bl-muted); }

@media (max-width: 767px) {
  .listing-grid { gap: 24px 12px; }
  .listing-grid .book-card__title { font-size: 13px; line-height: 17px; }
  /* a book without a cover: its title tile is narrow inside the square on a phone, so smaller words */
  .listing-grid .book-card__image .cover-missing { padding: 8%; }
  .listing-grid .book-card__image .cover-missing__title { font-size: clamp(12px, 3.4vw, 18px); line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
  .bl-wrap { display: block; }
  .bl-tools { flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
  .bl-search { flex: 1 1 100%; max-width: none; }
  .bl .bl-open { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 1px solid var(--bl-ink); border-radius: 2px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; }
  .bl-dot { display: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .bl-on .bl-dot { display: inline-block; }
  /* Filter and Sort side by side, half the width each; "Sort" shows inside the box */
  .bl .bl-open { flex: 1 1 calc(50% - 5px); min-width: 0; justify-content: center; }
  .bl-sort { flex: 1 1 calc(50% - 5px); min-width: 0; margin-left: 0; }
  /* the box shows the chosen order without the word "Sort" in front, so the longest names ("Price: high to low")
     fit on a 360px phone; screen readers still hear "Sort" (the select's aria-label) */
  .bl-sort > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .bl-sort select { width: 100%; min-width: 0; padding: 0 30px 0 12px; }
  .bl-sort .bl-chev { right: 12px; }
  /* the column's search and sort show above the books (the column box itself steps aside); the rest of the
     column is the Filter panel. Nothing moves in the page, so typing and focus survive turning the phone. */
  .bl-side { display: contents; }
  .bl-side > :not(.bl-tools) { display: none; }
  .bl-sheet-open .bl-side > .bl-tools { display: none; }
  .bl-sheet-open .bl-side > .bl-side__head { display: flex; }
  .bl-sheet-open .bl-side > .bl-fs { display: block; }
  /* scroll-padding: the sticky heading and the fixed Show button never cover the checkbox that has the keyboard */
  .bl-sheet-open .bl-side { scroll-padding: 72px 0 112px; }
  .bl-sheet-open .bl-side { display: block; position: fixed; inset: 0; z-index: 1000; max-height: none; margin: 0; overflow-y: auto; background: #fff; padding: 0 20px 104px; }
  .bl-side__head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1; min-height: 64px; margin: 0 -20px 20px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--bl-line); font-family: var(--tmme-font-display, serif); font-size: 26px; }
  /* option 1 on phones: Clear all filters in the panel's heading, before its × */
  .bl .bl-side__head .bl-clear { margin: 0 14px 0 auto; font-family: var(--tmme-font-body, inherit); font-size: 11px; }
  .bl-ov { margin: 0 0 22px; }
  /* a list with nothing to filter: Sort takes the whole row */
  .bl--nofilters .bl-sort { flex: 1 1 100%; }
  /* room to tap, like the rest of the list on a phone (44px), without making the tags or links look bigger */
  .bl .bl-side__head .bl-clear { position: relative; }
  .bl .bl-side__head .bl-clear::after { content: ""; position: absolute; left: -6px; right: -6px; top: 50%; height: 36px; margin-top: -18px; }
  /* the panel's × (only inside its heading: the Show button below is also a .bl-close) */
  .bl .bl-side__head .bl-close { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; font-size: 28px; line-height: 1; }
  .bl-box { min-height: 44px; }
  .bl .bl-more { min-height: 44px; }
  /* .bl-done is also a .bl-close, so undo the 44px close-button box */
  .bl-sheet-open .bl-side .bl-done { display: flex; justify-content: center; align-items: center; position: fixed; left: 20px; right: 20px; bottom: 20px; width: auto; height: auto; margin: 0; min-height: 52px; background: var(--bl-ink); color: #fff; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; border-radius: 2px; }
  .bl .listing-page__pagination { gap: 6px; margin-top: 44px; }
  .bl .listing-page__pagination a, .bl .listing-page__pagination .is-current { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; }
  .bl-pl { display: none; }
}
/* Touch screens, phones and tablets alike (critics, 21 Nov 2026): a touch screen moves a tap that misses everything to
   the nearest button. Under the round end of a tag that was the tags line's Clear all filters (10px below), which wiped
   every filter, or the tag on the next row. So Clear takes a line of its own 20px below the tags and rows of tags sit
   14px apart; each tag's tap area reaches 4px past its border (a wider one made a phone pick the tag below more often:
   measured with real taps, 21 Nov 2026). */
@media (max-width: 767px), (pointer: coarse) {
  .bl-ov { row-gap: 14px; }
  .bl-ov .bl-chip, .bl-ov .bl-clear { position: relative; }
  .bl-ov .bl-clearline { display: block; flex-basis: 100%; margin-top: 6px; }
  .bl-ov .bl-clearline .bl-clear { margin-left: 0; }
  .bl-ov .bl-chip::after { content: ""; position: absolute; left: 0; right: 0; top: -5px; bottom: -5px; }
  .bl-ov .bl-clear::after { content: ""; position: absolute; left: -6px; right: -6px; top: -5px; bottom: -5px; }
}
@media (prefers-reduced-motion: reduce) { .bl * { transition: none !important; } }
