.books-page {
  color-scheme: light;
  --bg: #fff;
  --surface: #fff;
  --ink: #171717;
  --muted: #525252;
  --line: #e5e5e5;
  --accent: #1e4baf;
  --accent-ink: #fff;
  --accent-soft: #eff8ff;
  --radius: 8px;
  --max: 1280px;
  font-size: 16px;
}

.books-page .wrap {
  padding-inline: clamp(16px, 2.5vw, 32px);
}

.books-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgb(0 0 0 / 5%);
}

.books-header .top {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 10px;
}

.books-header .top nav {
  gap: 2px 20px;
}

.books-header .top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.books-header .top nav a[aria-current="page"],
.books-header .top nav a:hover {
  color: var(--accent);
}

.books-page :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.book-breadcrumb {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding-top: 26px;
  color: var(--muted);
  font-size: 14px;
}

.book-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.book-breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.book-breadcrumb [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.reading-header {
  padding: 18px 0 26px;
}

.reading-header h1 {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -.025em;
}

.reading-header .lead {
  max-width: 72ch;
}

.affiliate-disclosure {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.book-feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, .85fr);
  gap: clamp(24px, 4vw, 54px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.reading-feature {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 30px;
  align-items: start;
  padding: 0;
  border: 0;
}

.book-feature-copy {
  min-width: 0;
}

.book-cover-feature,
.book-cover {
  display: grid;
  place-items: center;
}

.book-cover-feature img,
.book-cover img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  box-shadow: 0 10px 24px rgb(0 0 0 / 15%);
}

.book-cover-feature img {
  max-height: 470px;
}

.reading-feature h2,
.reading-list h2,
.book-index h2,
.reading-list .book h3 {
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.reading-feature h2 {
  font-size: clamp(26px, 3vw, 33px);
}

.reading-feature .eyebrow {
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.reading-feature .sub {
  font-size: 17px;
  margin-bottom: 10px;
}

.reading-feature .lead {
  font-size: 15px;
  margin-bottom: 16px;
}

.book-index h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.book-index ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-index li {
  border-bottom: 1px solid var(--line);
}

.book-index a {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 8px 0;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.book-index a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.book-index img {
  width: 46px;
  height: 65px;
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgb(0 0 0 / 15%));
}

.book-index small {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.book-editions {
  padding: 12px;
  background: #fafafa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.book-editions .edition-market {
  margin: 0 0 8px;
  font-size: 13px;
}

.edition-links {
  display: grid;
  gap: 7px;
}

.edition-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  text-decoration: none;
}

.edition-links a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: underline;
}

.edition-links a::after {
  content: '↗' / '';
  font-size: 15px;
}

.books-page .btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
}

.books-page .btn.ghost:hover {
  background: var(--accent-soft);
}

.books-page .btn.primary:hover {
  background: #183d91;
}

.reading-list {
  margin-top: 34px;
  padding: 24px 0 0;
}

.reading-list h2 {
  margin-bottom: 16px;
  font-size: 24px;
}

.reading-list .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.reading-list .book {
  padding: 0;
}

.book-cover {
  min-height: 212px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
  border-radius: var(--radius) var(--radius) 0 0;
}

.book-cover img {
  max-height: 182px;
}

.book-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 18px;
}

.reading-list .book h3 {
  margin-bottom: 5px;
  font-size: 20px;
}

.reading-list .book .tag {
  font-style: normal;
}

.reading-list .book--clinical {
  display: grid;
  grid-template-columns: minmax(0, 210px) minmax(0, 1fr);
  max-width: 760px;
}

.book--clinical .book-cover {
  border-right: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.catalogue-footer {
  margin-top: 34px;
  padding: 22px 0 34px;
}

.books-footer {
  background: #171717;
  color: #f5f5f5;
}

.books-footer a {
  color: inherit;
}

.books-footer :focus-visible {
  outline-color: #bfdbfe;
}

.books-page :is(#for-readers, .reading-feature h2, .book h3) {
  scroll-margin-top: 106px;
}

@media (max-width: 1020px) {
  .book-feature-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .book-index {
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }

  .book-index ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
}

@media (max-width: 760px) {
  .books-header .top {
    flex-wrap: wrap;
    min-height: 64px;
  }

  .reading-list .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .book-cover-feature img {
    max-height: 380px;
  }

  .books-page :is(#for-readers, .reading-feature h2, .book h3) {
    scroll-margin-top: 136px;
  }
}

@media (max-width: 560px) {
  .books-header .top nav {
    gap: 0 14px;
  }

  .books-header .top nav a {
    min-height: 32px;
    font-size: 13px;
  }

  .reading-feature,
  .reading-list .grid,
  .reading-list .book--clinical {
    grid-template-columns: minmax(0, 1fr);
  }

  .reading-feature {
    gap: 22px;
  }

  .book-cover-feature img {
    max-height: 280px;
  }

  .book--clinical .book-cover {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius) var(--radius) 0 0;
  }
}

@media (max-width: 420px) {
  .book-index ul {
    grid-template-columns: minmax(0, 1fr);
  }
}
