/* Book artwork and titles share the site's ink, serif and controls. */
.home-books, .book-hub, .book-guide {
  --book-ink: #182d36;
  --book-muted: #465656;
  --book-rule: #c6c8bd;
  --book-sheet: #fffdf7;
  --book-wash: #eee7d8;
}
body[data-theme="dropbox"]:has(.book-hub) {
  background-color: #f7f6f0;
  background-image: none;
}
.book-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.book-hub, .home-books { color: var(--book-ink); }
.book-hub .topic-index-intro, .home-books > header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 22px;
  border-bottom: 1px solid var(--book-ink);
}
.book-hub .topic-index-intro { padding: 0 0 clamp(12px, 1.6vw, 22px); }
.book-hub .topic-index-intro h1, .home-books h2 {
  margin: 0;
  font: 500 clamp(47px, 6vw, 88px)/.98 var(--serif);
  letter-spacing: -.055em;
}
.book-browse-link, .book-index-link, .book-back a {
  font-size: 15px;
  font-weight: 650;
  text-underline-offset: .25em;
}
.book-hub :is(a, summary):focus-visible, .home-books a:focus-visible, .book-guide :is(a, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* The opening comparison pairs an editorial photograph with the two editions. */
.comparison-shelf { margin: clamp(13px, 2vw, 28px) 0 clamp(40px, 5vw, 72px); }
.book-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.5vw, 36px); }
.book-pair { min-width: 0; color: var(--book-ink); }
.book-pair h3 {
  margin: 0 0 15px;
  font: 600 clamp(23px, 2.1vw, 34px)/1.1 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.book-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.7vw, 25px); }
.book-choice { min-width: 0; }
.paired-book { display: block; text-decoration: none; }
.paired-book strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(16px, 1.35vw, 22px);
  line-height: 1.16;
  letter-spacing: -.025em;
}
a.paired-book:hover strong, .book-teaser-list a:hover strong, .book-row h3 a:hover { text-decoration: underline; text-underline-offset: .18em; }
.book-choice p { margin: 6px 0 0; max-width: 39ch; color: var(--book-muted); font-size: 15px; line-height: 1.45; }
.book-jacket, .book-teaser-jacket, .book-cover {
  display: grid;
  place-items: end center;
  min-width: 0;
}
.book-jacket {
  height: clamp(160px, 14vw, 210px);
  padding: 15px 9px 12px;
  background: var(--book-jacket-paper, #e5ebe1);
  border-bottom: 2px solid #aab7a8;
}
.book-pairs > .book-pair:nth-child(odd) { --book-jacket-paper: #efe5d7; }
.book-jacket img, .book-cover img, .book-teaser-jacket img {
  display: block;
  height: auto;
  width: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(2px 5px 4px rgb(31 33 25 / .23));
}
.book-jacket img { height: 100%; min-height: 0; }
.book-pair--lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  grid-template-areas: "feature choices";
  isolation: isolate;
  background: #f3ead5;
}
.book-pair--lead .book-pair-heading, .book-feature-figure { grid-area: feature; }
.book-feature-figure { position: relative; min-width: 0; margin: 0; background: #223631; }
.book-feature-photo { position: absolute; width: 100%; height: 100%; inset: 0; object-fit: cover; object-position: 55% center; }
.book-feature-figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(12 24 24 / .92), rgb(12 24 24 / .70) 38%, transparent 72%);
  pointer-events: none;
}
.book-feature-credit {
  position: absolute;
  bottom: 9px;
  right: 13px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  color: #fff;
  background: #172827;
  font-size: 11px;
  line-height: 1.35;
}
.book-feature-credit a { display: inline-flex; align-items: center; min-height: 24px; color: inherit; }
.book-pair--lead .book-pair-heading {
  position: relative;
  align-self: end;
  z-index: 1;
  padding: clamp(23px, 3.2vw, 48px);
}
.book-pair--lead h3 {
  margin: 0;
  font-size: clamp(34px, 3.8vw, 61px);
  line-height: 1.02;
  font-weight: 500;
}
.book-pair--lead.has-feature-photo .book-pair-heading { align-self: start; padding: clamp(20px, 2.3vw, 34px); color: #fffdf1; }
.book-pair--lead .book-choices { grid-area: choices; padding: clamp(16px, 2.4vw, 35px); }
.book-pair-caption { grid-column: 1 / -1; margin: 0; padding: 10px clamp(16px, 2.4vw, 35px); color: var(--book-muted); font-size: 14px; line-height: 1.5; background: #eee9dc; }
.book-pair--lead .book-jacket { height: clamp(185px, 17.5vw, 266px); padding: 0 4px 13px; background: transparent; border-color: #c4b99e; }
.book-pair--lead .paired-book strong { font: 600 clamp(20px, 1.85vw, 29px)/1.12 var(--serif); letter-spacing: -.03em; }
.more-book-pairs { margin-top: clamp(17px, 2.5vw, 35px); border-block: 1px solid var(--book-rule); }
.more-book-pairs > summary, .book-premise summary, .book-row-signal summary { width: fit-content; cursor: pointer; font-weight: 600; }
.more-book-pairs > summary { padding: 13px 0; }
.more-book-pairs[open] .book-pairs { padding: 5px 0 24px; }

/* Covers form a browsable shelf; metadata expands in place. */
#book-list-title, .book-group h2, .book-sharing-shelf h2 {
  margin: 0;
  font: 500 clamp(30px, 3.5vw, 50px)/1.08 var(--serif);
  letter-spacing: -.04em;
}
.book-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 22px; padding: 18px 0; border-bottom: 1px solid var(--book-ink); }
.book-filters label { display: grid; gap: 5px; color: var(--book-muted); font-size: 13px; font-weight: 650; }
.book-filters select, .book-filters button {
  min-height: 40px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid #949e95;
  border-radius: 3px;
  background: var(--book-sheet);
  color: var(--book-ink);
  font: inherit;
}
.book-filters select { min-width: 12rem; }
.book-filters button { font-size: 14px; cursor: pointer; }
.book-filters p { margin: 0 0 8px auto; color: var(--book-muted); font-size: 13px; }
.book-group { margin: clamp(23px, 3vw, 44px) 0; }
.book-group > header { margin-bottom: 18px; }
.book-group h2 { font-size: clamp(23px, 2.45vw, 36px); }
.book-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: clamp(27px, 3vw, 44px) clamp(13px, 2vw, 30px);
  padding: 0;
  margin: 0;
  list-style: none;
}
.book-row { min-width: 0; }
.book-cover {
  height: clamp(180px, 17vw, 250px);
  padding: 15px 10px 12px;
  border-bottom: 2px solid #bbb9a6;
  background: #eae8db;
}
.book-row:nth-child(4n+2) .book-cover { background: #e4eae7; }
.book-row:nth-child(4n+3) .book-cover { background: #eee3da; }
.book-row:nth-child(4n) .book-cover { background: #e8e6ed; }
.book-cover img { height: 100%; min-height: 0; }
.book-row-copy { padding: 12px 1px 0; }
.book-row-copy .section-kicker { margin: 0 0 5px; font-size: 11px; line-height: 1.4; letter-spacing: .055em; }
.book-row h3 { margin: 0; font: 600 clamp(18px, 1.65vw, 25px)/1.12 var(--serif); letter-spacing: -.025em; }
.book-row h3 a { text-decoration: none; }
.book-author { margin: 5px 0; color: var(--book-muted); font-size: 14px; }
.book-takeaway { margin: 7px 0; font-size: 15px; line-height: 1.45; }
.book-row-links { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 13px; margin-top: 7px; font-size: 13px; }
.book-row-links > a { font-weight: 650; text-underline-offset: 3px; }
.book-interest-answer:not([hidden]) { display: block; margin: 7px 0; font-size: 14px; font-weight: 650; text-underline-offset: .2em; }
.book-interest-answer[hidden] { display: none; }
.book-row-signal, .book-row-signal summary { color: var(--book-muted); }
.book-row-signal p { margin: 5px 0; overflow-wrap: anywhere; }
.book-ranks { display: grid; gap: 7px; margin: 8px 0; }
.book-ranks dt { font-size: 12px; line-height: 1.4; color: var(--book-muted); }
.book-ranks dd { margin: 1px 0 0; font-weight: 650; }
.book-filters[hidden], .book-group[hidden], .book-row[hidden] { display: none; }

/* The home and book shelves share jackets and dated reader recommendations. */
.book-sharing-shelf { margin-block: clamp(22px, 3.3vw, 46px) clamp(32px, 4.5vw, 64px); }
.book-sharing-shelf h2 { text-wrap: balance; }
.home-books { margin-block: clamp(32px, 5vw, 72px); padding: var(--catalog-inset); background: #eeeadd; }
.home-books > header { padding-bottom: 16px; }
.home-books h2 { font-size: clamp(37px, 4.2vw, 62px); }
.book-teaser-list { display: grid; gap: clamp(15px, 2vw, 32px); padding: 0; margin: 22px 0 0; list-style: none; }
.book-teaser-list li { min-width: 0; }
.book-teaser-link { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(10px, 1.2vw, 18px); align-items: center; text-decoration: none; }
.book-teaser-jacket { height: clamp(145px, 12vw, 185px); align-items: center; }
.book-teaser-jacket img { height: 100%; min-height: 0; }
.book-teaser-list a > span:not(.book-teaser-jacket) { display: grid; gap: 4px; }
.book-teaser-list strong { font: 600 clamp(18px, 1.6vw, 25px)/1.12 var(--serif); letter-spacing: -.025em; }
.book-teaser-list small, .book-teaser-takeaway { font-size: 13px; line-height: 1.4; }
.book-teaser-list small { color: var(--book-muted); }
.book-teaser-sharing { margin: 12px 0 0; max-width: 54ch; padding-top: 9px; border-top: 1px solid var(--book-rule); font-size: 15px; line-height: 1.45; }
.book-teaser-sharing time { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 650; color: var(--book-muted); }
@media (min-width: 741px) {
  .book-teaser-list { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .book-teaser-list > li { display: grid; grid-column: span 2; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  /* Finish longer shelves with pairs, keeping a fourth title out of a row by itself. */
  .book-teaser-list:has(> li:nth-child(3n+1):last-child) > li:nth-last-child(-n+4),
  .book-teaser-list:has(> li:nth-child(3n+2):last-child) > li:nth-last-child(-n+2) { grid-column: span 3; }
}

/* The guide keeps Good Find's product layout and shopping controls. */
.book-notes { max-width: 1040px; margin: 0 auto; }
.book-notes h2 { margin: 0; font-size: clamp(24px, 2.8vw, 40px); line-height: 1.09; letter-spacing: -.045em; }
.book-notes > section, .book-edition-details > section { padding: clamp(24px, 3.4vw, 45px) 0; border-top: 1px solid var(--line); }
.book-notes p:not(.section-kicker) { max-width: 70ch; margin: 14px 0 0; font-size: 16px; line-height: 1.65; }
.book-notes p.book-source { font-size: 13px; color: var(--muted); }
.book-guide .book-intro { margin: 14px 0 0; max-width: 51ch; font-size: 16px; line-height: 1.5; }
.book-contents { display: flex; flex-wrap: wrap; gap: 4px 24px; padding: 14px 0; }
.book-contents a { font-size: 15px; font-weight: 650; padding: 4px 0; text-underline-offset: .25em; }
.book-notes :is(h2[id], .book-question[id], #reader-voice) { scroll-margin-top: 20px; }
.book-feature-copy { max-width: 63ch; }
.book-feature-split { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); gap: clamp(22px,4vw,58px); align-items: center; }
.book-feature-copy h2, .book-reader-voice > h2, .book-questions > h2 { font-family: var(--serif); font-weight: 600; }
.book-gallery { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,250px),1fr)); gap: 18px; margin-top: 20px; }
.book-feature-split .book-gallery { margin-top: 0; }
.book-gallery figure { margin: 0; min-width: 0; }
.book-gallery figure > a { display: grid; place-items: center; background: #efeee7; cursor: zoom-in; }
.book-gallery img { display: block; width: 100%; max-height: 390px; object-fit: contain; }
.book-gallery figcaption { margin-top: 8px; font-size: 15px; line-height: 1.45; }
.book-gallery figcaption small { display: block; margin-top: 4px; font-size: 12px; }
.book-question { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.4fr); gap: 18px 38px; padding: 19px 0; }
.book-question:first-of-type { margin-top: 13px; }
.book-question + .book-question, .book-voices > div + div { border-top: 1px solid var(--book-rule); }
.book-question h3 { margin: 0; font: 600 clamp(20px,2.1vw,27px)/1.15 var(--serif); color: var(--book-ink); }
.book-notes .book-question p { margin: 0; }
.book-notes .book-question .book-source, .book-notes .book-voices .book-source { margin-top: 6px; }
.book-review-layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(230px,.78fr); gap: clamp(20px,4vw,50px); align-items: start; margin-top: 20px; }
.book-voices > div { padding: 0 0 16px; }
.book-voices h3 { margin: 0; font: 600 22px/1.15 var(--serif); }
.book-voices > div + div { padding-top: 16px; }
.book-voices > div > p:first-child { margin-top: 0; }
.book-rating { padding: clamp(16px,2.4vw,28px); background: #e8eee9; color: var(--book-ink); min-width: 0; }
.book-rating h3 { margin: 0; font-size: 18px; }
.book-notes .book-rating p { margin: 4px 0; font-size: 13px; }
.book-rating-score strong { font: 600 38px/1.1 var(--serif); }
.book-rating-bars { display: grid; gap: 4px; margin: 13px 0; }
.book-rating-bars > div { display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 7px; font-size: 13px; }
.book-rating-bars dd { margin: 0; display: grid; grid-template-columns: 1fr 32px; align-items: center; gap: 7px; text-align: right; font-variant-numeric: tabular-nums; }
.book-rating-bars meter { appearance: none; width: 100%; height: 8px; border: 0; background: #d4dbd5; }
.book-rating-bars meter::-webkit-meter-bar { height: 8px; border: 0; border-radius: 0; background: #d4dbd5; }
.book-rating-bars meter::-webkit-meter-optimum-value { background: #365f52; }
.book-rating-bars meter::-moz-meter-bar { background: #365f52; }
.book-rating > a { font-size: 13px; text-underline-offset: .2em; }
.book-profile-pair .book-pair { padding: clamp(15px, 2vw, 30px); background: #f5f1e7; }
.book-profile-pair .paired-book { display: grid; grid-template-columns: clamp(65px, 7vw, 96px) minmax(0, 1fr); align-items: center; gap: 14px; }
.book-profile-pair .book-jacket { height: clamp(99px, 10vw, 148px); padding: 6px; }
.book-notes .book-choice p { margin-top: 8px; font-size: 15px; line-height: 1.45; }
.book-example figure { margin: 18px 0 0; }
.book-example img { display: block; width: auto; max-width: 100%; height: auto; max-height: 530px; object-fit: contain; }
.book-example figcaption { margin: 8px 0 0; max-width: 72ch; font-size: 15px; line-height: 1.5; }
.book-example figcaption small { display: block; margin-top: 4px; font-size: 12px; }
.book-edition-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); column-gap: clamp(24px, 4vw, 54px); }
.book-edition-details > section { min-width: 0; container: book-edition / inline-size; overflow-wrap: anywhere; }
.book-edition-details .book-ranks { margin: 18px 0; gap: 12px 18px; }
@container book-edition (min-width: 17rem) {
  .book-edition-details .book-ranks:has(> div:nth-child(2)) { grid-template-columns: minmax(7rem, .7fr) minmax(0, 1.3fr); }
}
.book-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: 14px 18px; padding: 0; margin: 18px 0; }
.book-facts dt { font-size: 12px; color: var(--muted); }
.book-facts dd { margin: 3px 0 0; font-weight: 650; }
.book-related li { margin: 8px 0; }
.book-guide .cta-row { margin-top: 22px; }
.book-back { max-width: 1040px; margin: 0 auto 42px; }

@media (max-width: 1000px) {
  .book-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .book-teaser-list a { grid-template-columns: 1fr; align-content: start; }
  .book-teaser-jacket { justify-content: start; }
}
@media (max-width: 740px) {
  .book-hub.topic-shell { padding-top: 10px; }
  .book-pairs, .book-feature-split, .book-review-layout, .book-question { grid-template-columns: 1fr; }
  .book-feature-split, .book-review-layout { gap: 18px; }
  .book-question { gap: 8px; }
  .book-contents { gap: 4px 16px; }
  .book-pair--lead { grid-template-columns: 1fr; grid-template-areas: "feature" "choices"; }
  .book-pair--lead h3 { font-size: clamp(25px, 5.3vw, 36px); text-wrap: pretty; }
  .book-pair--lead .book-pair-heading { padding: 16px; }
  .book-pair--lead.has-feature-photo .book-pair-heading { min-height: clamp(194px, 60vw, 270px); padding: 15px 16px; }
  .book-feature-photo { object-position: center 65%; }
  .book-feature-credit { right: 5px; bottom: 3px; max-width: calc(100% - 10px); padding: 0 4px; font-size: 10px; }
  .book-pair--lead .book-choices { padding: 15px; }
  .book-pair--lead .book-jacket { height: clamp(129px, 35vw, 185px); padding: 0 0 8px; }
  .book-pair--lead .paired-book strong { font-size: clamp(19px, 4.2vw, 24px); }
  .book-jacket { height: clamp(147px, 38vw, 210px); }
  .book-choice p, .book-takeaway { font-size: 14px; line-height: 1.42; }
  .book-filters label { flex: 1 1 135px; min-width: 0; }
  .book-filters select { width: 100%; min-width: 0; }
  .book-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-cover { height: clamp(148px, 43vw, 220px); padding: 12px 7px 10px; }
  .book-profile-pair .paired-book { grid-template-columns: 1fr; gap: 0; }
  .book-profile-pair .book-jacket { height: clamp(120px, 30vw, 162px); }
  .book-teaser-list { grid-template-columns: 1fr; margin-top: 14px; }
  .book-teaser-list a { grid-template-columns: clamp(82px, 23vw, 121px) minmax(0, 1fr); align-items: center; gap: 16px; }
  .book-teaser-jacket { height: clamp(116px, 33vw, 164px); justify-content: center; }
  .book-teaser-list li + li { padding-top: 14px; border-top: 1px solid var(--book-rule); }
}
