/* Dedicated library page: all layout overrides are scoped to this route. */
.library-page .header-wrap {
  position: relative;
  inset: auto;
  padding: 22px 28px 0;
  background: var(--forest);
}
.library-page .site-header {
  background: #17372a;
  border-color: rgba(229, 244, 218, .18);
}
.library-page .mobile-nav {
  background-color: #10281f;
}
.library-page .library-page-section {
  min-height: calc(100vh - 260px);
  padding: 46px 0 80px;
  background: #edf0e3;
  color: #284233;
}
.library-page .ebook-catalog-heading {
  max-width: 850px;
  margin: 0 auto 35px;
  padding: 0;
  border: 0;
  text-align: center;
}
.library-page .ebook-catalog-heading .eyebrow {
  margin-bottom: 13px;
  color: #587049;
}
.library-page .ebook-catalog-heading h1 {
  margin: 0 0 16px;
  color: #284233;
  font-family: var(--heading);
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -2px;
}
.library-page .ebook-catalog-heading > p:last-child {
  max-width: 680px;
  margin: 0 auto;
  color: #61715f;
  font-size: 14px;
  line-height: 1.8;
}
.library-page .ebook-card h2 {
  margin: 0 0 15px;
  color: #284233;
  font-family: var(--heading);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.8px;
}
.library-page .ebook-card h2[id] { scroll-margin-top: 24px; }
.library-page .library-back-link {
  margin: 30px 0 0;
  text-align: center;
}
.library-page .library-back-link .text-button {
  color: #526a45;
}
.library-page .site-footer {
  background: #0a1b15;
}
.library-page .site-footer .brand { color: var(--text); }
.library-page .site-footer nav a[aria-current="page"] {
  color: var(--sage);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.library-page .desktop-nav a[aria-current="page"] {
  color: var(--sage);
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.library-page .mobile-nav a[aria-current="page"] {
  color: var(--sage);
}
@media (max-width: 760px) {
  .library-page .header-wrap { padding: 16px 16px 0; }
  .library-page .library-page-section { min-height: 0; padding: 40px 0 60px; }
  .library-page .ebook-catalog-heading { margin-bottom: 27px; }
  .library-page .ebook-catalog-heading h1 { font-size: clamp(35px, 9vw, 48px); letter-spacing: -1.5px; }
  .library-page .ebook-catalog-heading > p:last-child { font-size: 12px; }
  .library-page .ebook-card h2 { font-size: 23px; }
}

/* Format navigation and the dedicated audiobook shelf. */
.library-page .library-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 32px;
}
.library-page .library-category-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid #b6c4aa;
  border-radius: 999px;
  color: #284233;
  background: #f7f9f0;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.library-page .library-category-link:hover { border-color: #526a45; background: #e3ead8; }
.library-page .library-category-status { color: #607255; font-size: 10px; font-weight: 400; }
.library-page .audiobooks-category, .library-page #ebooks { scroll-margin-top: 28px; }
.library-page .audiobooks-category {
  margin-top: 46px;
  padding: 32px;
  border: 1px solid #bfccb3;
  border-radius: 22px;
  background: linear-gradient(135deg, #e3ead8, #f4f6ed);
}
.library-page .audiobooks-heading { display: flex; align-items: center; gap: 18px; }
.library-page .audiobooks-icon { display: grid; width: 64px; height: 64px; flex: none; place-items: center; border: 1px solid #b0c09e; border-radius: 18px; background: #f7f9f0; color: #34553b; }
.library-page .audiobooks-icon .icon { width: 32px; height: 32px; }
.library-page .audiobooks-heading .eyebrow { margin: 0 0 8px; color: #607255; font-size: 9px; }
.library-page .audiobooks-heading h2 { margin: 0 0 6px; color: #284233; font-size: 32px; letter-spacing: -1px; }
.library-page .audiobooks-heading p:last-child { margin: 0; color: #5b6e57; font-size: 13px; line-height: 1.7; }
.library-page .audiobooks-badge { margin-left: auto; padding: 8px 13px; flex: none; border: 1px solid #aebe9a; border-radius: 999px; color: #43613a; background: #f5f8ec; font-size: 11px; }
.library-page .audiobooks-empty-state { margin-top: 24px; padding-top: 23px; border-top: 1px solid #c0cdb5; }
.library-page .audiobooks-empty-state h3 { margin: 0 0 12px; color: #34513a; font-family: var(--serif); font-size: 25px; font-weight: 400; }
.library-page .audiobooks-empty-state p { max-width: 730px; margin: 0 0 18px; color: #5b6e57; font-size: 13px; line-height: 1.85; }
.library-page .audiobooks-empty-state .text-button { color: #34553b; }
.library-page .audiobooks-intro { max-width: 760px; margin: 24px 0 0; padding-top: 23px; border-top: 1px solid #c0cdb5; color: #5b6e57; font-size: 13px; line-height: 1.85; }
.library-page .audiobooks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.library-page .audiobook-card { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; min-width: 0; padding: 18px; border: 1px solid #bdcaae; border-radius: 16px; background: rgba(250, 252, 245, .72); scroll-margin-top: 28px; }
.library-page .audiobook-concept-artwork { position: relative; align-self: start; margin: 0; }
.library-page .audiobook-concept-artwork img { display: block; width: 100%; height: auto; box-shadow: 0 8px 17px rgba(42, 64, 38, .16); filter: saturate(.82); }
.library-page .audiobook-cover-artwork .audiobook-cover-image { aspect-ratio: 1; object-fit: contain; }
.library-page .audiobook-concept-artwork figcaption { margin-top: 8px; color: #68775f; font-size: 8px; line-height: 1.45; text-align: center; }
.library-page .audiobook-card-copy .eyebrow { margin: 1px 0 9px; color: #607255; font-size: 8px; }
.library-page .audiobook-card h3 { margin: 0 0 9px; color: #284233; font-family: var(--heading); font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.5px; }
.library-page .audiobook-card-copy > p:not(.eyebrow) { margin: 0; color: #5b6e57; font-size: 12px; line-height: 1.7; }
.library-page .audiobook-card .audiobook-details { margin-top: 13px; color: #66765d; font-size: 10px; }
.library-page .audiobook-details span { margin-inline: 4px; }
.library-page .audiobook-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 15px; padding-top: 13px; border-top: 1px solid #d0dac5; }
.library-page .audiobook-state strong { color: #34513a; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.library-page .audiobook-state span { padding: 5px 9px; border: 1px solid #bdcaae; border-radius: 999px; color: #526a45; background: #f2f6e9; font-size: 9px; }
.library-page .audiobook-card .audiobook-unavailable { margin-top: 11px; color: #697960; font-size: 10px; }
.library-page .library-enquiry-link { display: inline-flex; margin-top: 13px; color: #34553b; }
.library-page .audiobook-preview { grid-column: 1 / -1; min-width: 0; padding: 16px; border: 1px solid #c0cdb5; border-radius: 12px; background: #f4f7ed; }
.library-page .audiobook-preview h4 { margin: 0 0 8px; color: #284233; font-family: var(--heading); font-size: 14px; font-weight: 600; line-height: 1.5; }
.library-page .audiobook-preview-note { margin: 0 0 13px; color: #5b6e57; font-size: 10px; line-height: 1.7; }
.library-page .audiobook-preview audio { display: block; width: 100%; max-width: 100%; min-width: 0; }
.library-page .audiobook-preview-transcript { margin-top: 15px; color: #34553b; font-size: 11px; }
.library-page .audiobook-preview-transcript summary { cursor: pointer; font-weight: 600; }
.library-page .audiobook-preview-transcript > div { margin-top: 12px; border-top: 1px solid #d0dac5; padding-top: 12px; }
.library-page .audiobook-preview-transcript p { margin: 0 0 12px; color: #5b6e57; font-size: 11px; line-height: 1.85; }
.library-page .audiobook-preview-transcript p:last-child { margin-bottom: 0; }
.library-page .audiobook-preview audio:focus-visible, .library-page .audiobook-preview-transcript summary:focus-visible { outline: 2px solid #34553b; outline-offset: 4px; }
.library-page .library-category-link:focus-visible, .library-page .audiobooks-category a:focus-visible { outline: 2px solid #34553b; outline-offset: 4px; }
@media (max-width: 760px) {
  .library-page .audiobooks-category { margin-top: 34px; padding: 25px; }
  .library-page .audiobooks-heading { flex-wrap: wrap; gap: 15px; }
  .library-page .audiobooks-icon { width: 52px; height: 52px; }
  .library-page .audiobooks-heading > div { flex: 1; min-width: 180px; }
  .library-page .audiobooks-heading h2 { font-size: 28px; }
  .library-page .audiobooks-badge { margin-left: 0; }
  .library-page .audiobooks-grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .library-page .library-category-link { padding: 11px 13px; font-size: 11px; }
  .library-page .library-category-status { font-size: 9px; }
  .library-page .audiobooks-category { padding: 22px 20px; }
  .library-page .audiobooks-empty-state h3 { font-size: 23px; }
  .library-page .audiobook-card { grid-template-columns: 92px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .library-page .audiobook-card h3 { font-size: 19px; }
}
