/* Reading refresh, 18 October 2026. Additive overrides for public collections.
   Keep this after the canonical stylesheet; no authentication or reader rules. */
.bg-reading-ui[data-reading-refresh] {
  font-size: 16px;
  line-height: 1.6;
  --reading-bg: #fbfaf8;
  --reading-muted: #5b6070;
  --reading-soft: #f0eef4;
  --reading-focus: #3d36aa;
}
html[data-theme="dark"] .bg-reading-ui[data-reading-refresh] {
  --reading-bg: #12131e;
  --reading-muted: #b8c1d1;
  --reading-soft: #242536;
  --reading-focus: #c9bfff;
}
.bg-reading-ui[data-reading-refresh] :focus-visible {
  outline: 3px solid var(--reading-focus);
  outline-offset: 4px;
}
.bg-reading-ui[data-reading-refresh] .reading-skip:focus { outline-offset: 2px; }
.bg-reading-ui[data-reading-refresh] :is(.reading-search, .hm-search-input, .kg-profile-search) input::placeholder {
  color: #606779;
  opacity: 1;
}
html[data-theme="dark"] .bg-reading-ui[data-reading-refresh] :is(.reading-search, .hm-search-input, .kg-profile-search) input::placeholder {
  color: #b8c1d1;
  opacity: 1;
}
.bg-reading-ui .hm-searchbar > .hm-button[type="submit"] { background: #24166a; border-color: #24166a; color: #fff; }
/* Covers, rather than nested panels, anchor each publication. */
.bg-reading-ui .bg-shelf { gap: 32px 24px; }
.bg-reading-ui .bg-book {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.bg-reading-ui .bg-book .bg-book__cover-link { border-radius: 5px; }
/* SIBI-like book depth: the whole volume turns around its spine. */
.bg-reading-ui .bg-book .bg-book__stage {
  height: 232px;
  padding: 12px 14px;
  background: transparent;
  border-radius: 0;
  perspective: 800px;
}
.bg-reading-ui .bg-book .bg-book__stage::before { content: none; }
.bg-reading-ui .bg-book .bg-book__volume {
  transform: rotateY(-3deg);
  transform-origin: left center;
  transform-style: preserve-3d;
  max-width: calc(100% - 14px);
  border-radius: 3px;
  box-shadow: 4px 5px 10px rgb(22 24 43 / 16%);
  transition: none;
}
/* Override the older whole-card hover/focus rule without opening other links. */
.bg-reading-ui .bg-book:hover .bg-book__volume,
.bg-reading-ui .bg-book:focus-within .bg-book__volume {
  transform: rotateY(-3deg);
  box-shadow: 4px 5px 10px rgb(22 24 43 / 16%);
}
.bg-reading-ui .bg-book .bg-book__volume::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(100deg, rgb(255 255 255 / 65%), transparent 12%, transparent 88%, rgb(0 0 0 / 12%));
  opacity: .16;
  pointer-events: none;
  transition: none;
}
.bg-reading-ui .bg-book .bg-book__volume::after {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 2px;
  right: -7px;
  width: 7px;
  background: repeating-linear-gradient(90deg, #e2e1db 0 1px, #f8f7f1 1px 2px);
  border: 1px solid rgb(0 0 0 / 10%);
  border-left: 0;
  border-radius: 0 2px 2px 0;
  z-index: -1;
  pointer-events: none;
  transition: none;
}
.bg-reading-ui .bg-book .bg-book__volume img {
  max-height: 208px;
  object-fit: contain;
  border-radius: 3px;
  transform: none;
  transform-origin: left center;
  transition: none;
}
/* Keyboard feedback targets the cover link; metadata/reader links stay still. */
@media (prefers-reduced-motion: no-preference) {
  .bg-reading-ui .bg-book .bg-book__volume { transition: transform .4s cubic-bezier(.25,.46,.45,.94), box-shadow .4s cubic-bezier(.25,.46,.45,.94); }
  .bg-reading-ui .bg-book .bg-book__volume img { transition: transform .4s cubic-bezier(.25,.46,.45,.94); }
  .bg-reading-ui .bg-book .bg-book__volume::before { transition: opacity .4s cubic-bezier(.25,.46,.45,.94); }
  .bg-reading-ui .bg-book .bg-book__volume::after { transition: width .4s cubic-bezier(.25,.46,.45,.94), right .4s cubic-bezier(.25,.46,.45,.94); }
  .bg-reading-ui .bg-book .bg-book__cover-link:focus-visible .bg-book__volume { transform: rotateY(-18deg) translateY(-2px); box-shadow: 8px 9px 18px rgb(22 24 43 / 22%); }
  .bg-reading-ui .bg-book .bg-book__cover-link:focus-visible .bg-book__volume img { transform: scaleX(.97); }
  .bg-reading-ui .bg-book .bg-book__cover-link:focus-visible .bg-book__volume::before { opacity: .4; }
  .bg-reading-ui .bg-book .bg-book__cover-link:focus-visible .bg-book__volume::after { width: 10px; right: -8px; }
}
/* Touch keeps the resting depth. A tap follows the cover link immediately. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .bg-reading-ui .bg-book .bg-book__cover-link:hover .bg-book__volume { transform: rotateY(-18deg) translateY(-2px); box-shadow: 8px 9px 18px rgb(22 24 43 / 22%); }
  .bg-reading-ui .bg-book .bg-book__cover-link:hover .bg-book__volume img { transform: scaleX(.97); }
  .bg-reading-ui .bg-book .bg-book__cover-link:hover .bg-book__volume::before { opacity: .4; }
  .bg-reading-ui .bg-book .bg-book__cover-link:hover .bg-book__volume::after { width: 10px; right: -8px; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-reading-ui .bg-book .bg-book__volume,
  .bg-reading-ui .bg-book:hover .bg-book__volume,
  .bg-reading-ui .bg-book:focus-within .bg-book__volume,
  .bg-reading-ui .bg-book .bg-book__volume img { transform: none; transition: none; }
  .bg-reading-ui .bg-book .bg-book__volume::before,
  .bg-reading-ui .bg-book .bg-book__volume::after { transition: none; }
}
.bg-reading-ui .bg-book .bg-book__body { padding: 12px 0 0; }
.bg-reading-ui .bg-book .bg-book__badges {
  flex-wrap: wrap;
  gap: 5px 6px;
  min-height: 24px;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.bg-reading-ui .bg-book .bg-book__format { padding: 1px 5px; font-weight: 600; }
.bg-reading-ui .bg-book .bg-book__category {
  flex: 1 0 100%;
  order: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.bg-reading-ui .bg-book .bg-book__year { display: inline; }
.bg-reading-ui .bg-book .bg-book__title {
  font-size: 16px;
  line-height: 1.4;
  min-height: 2.8em;
  font-weight: 500;
}
.bg-reading-ui .bg-book .bg-book__title a {
  -webkit-line-clamp: 3;
  max-height: 4.2em;
  overflow-wrap: anywhere;
}
.bg-reading-ui .bg-book .bg-book__author {
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  min-height: 30px;
  margin-top: 7px;
}
.bg-reading-ui .bg-book .bg-book__author-name { min-height: 28px; padding-block: 4px; }
.bg-reading-ui .bg-book .bg-book__author-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
}
.bg-reading-ui .bg-book .bg-book__resume { display: flex; margin-top: auto; padding-top: 12px; }
.bg-reading-ui .bg-book .bg-book__resume .bg-book__read { min-height: 44px; font-size: 14px; padding: 9px 12px; }
.bg-reading-ui .bg-book .bg-book__progress,
.bg-reading-ui .bg-book .bg-book__progress small { font-size: 12px; }
.bg-reading-ui .bg-book .bg-book__evidence { font-size: 13px; }
/* Search remains the primary homepage action, with a shorter introduction. */
.bg-reading-ui .bg-home-hero { padding: 28px 0 20px; }
.bg-reading-ui .bg-home-hero h1 { font-size: clamp(28px, 3.1vw, 38px); line-height: 1.2; }
.bg-reading-ui .bg-home-intro { font-size: 16px; line-height: 1.5; margin: 10px 0 18px; max-width: 760px; }
.bg-reading-ui .bg-home-browse { font-size: 13px; margin: 10px 0 0; color: #e0ddf4; }
.bg-reading-ui .bg-home-hero :focus-visible { outline-color: #d0c8ff; }
.bg-reading-ui .bg-home-hero input:focus-visible { outline-color: #3d36aa; }
html[data-theme="dark"] .bg-reading-ui .bg-home-hero input:focus-visible { outline-color: #c9bfff; }
.bg-reading-ui .bg-home-hero .hm-search-input:focus-within { outline: 3px solid #d0c8ff; outline-offset: 3px; }
.bg-reading-ui .bg-home-search:not(.hm-filter-form) { flex-wrap: wrap; }
.bg-reading-ui .bg-home-search:not(.hm-filter-form) > input { flex: 1 1 180px; }
.bg-reading-ui .bg-home-search:not(.hm-filter-form) .hm-home-filter-fallback { display: flex; gap: 12px; flex: 1 1 100%; flex-wrap: wrap; }
.bg-reading-ui .hm-home-filter-fallback label { display: grid; gap: 4px; flex: 1 1 130px; font-size: 13px; }
.bg-reading-ui .hm-home-filter-fallback select { min-width: 0; max-width: 100%; min-height: 44px; }
.bg-reading-ui .bg-section { padding-block: 28px 18px; }
.bg-reading-ui .bg-section .bg-section__heading h2 { font-size: 26px; line-height: 1.3; }
.bg-reading-ui .bg-section .bg-section__heading > a { font-size: 14px; min-height: 44px; }
.bg-reading-ui .bg-category-nav .bg-category-nav__chip,
.bg-reading-ui .bg-category-nav__more > summary,
.bg-reading-ui .bg-category-nav__menu a { font-size: 13px; }
.bg-reading-ui .bg-category-nav__list { scrollbar-color: var(--reading-muted) transparent; }
.bg-reading-ui .bg-discover { padding-block: 28px; margin-top: 20px; }
.bg-reading-ui .bg-discover h2 { font-size: 24px; }
.bg-reading-ui .bg-discover > p { margin: 0 0 16px; color: var(--reading-muted); font-size: 16px; max-width: 700px; }
.bg-reading-ui .bg-discover nav { gap: 10px 18px; }
.bg-reading-ui .bg-discover nav a { padding: 6px 0; border: 0; border-radius: 0; background: none; color: var(--reading-link); font-size: 15px; text-decoration: underline; text-underline-offset: 5px; }
/* Books-first profiles. Native details preserve access without JavaScript. */
.bg-reading-ui .bg-profile-reading { --kg-muted: #5c6778; }
html[data-theme="dark"] .bg-reading-ui .bg-profile-reading { --kg-muted: #b8c1d1; }
.bg-profile-reading .kg-breadcrumb { margin-bottom: 20px; font-size: 13px; }
.bg-profile-reading .kg-profile-summary { padding: 0; border: 0; border-radius: 0; background: none; }
.bg-profile-reading .kg-profile-heading { gap: 18px; align-items: center; }
.bg-profile-reading .kg-profile-heading > .kg-avatar { width: 64px; height: 64px; flex: 0 0 64px; font-size: 23px; }
.bg-profile-reading .kg-profile-heading h1 { margin-bottom: 7px; font-size: 32px !important; line-height: 1.2 !important; overflow-wrap: anywhere; }
.bg-profile-reading .kg-profile-heading .kg-eyebrow { margin-bottom: 5px; font-size: 12px; letter-spacing: .08em; }
.bg-profile-reading .kg-profile-heading .bg-profile-overview { display: flex; flex-wrap: wrap; gap: 3px 16px; margin: 0; font-size: 14px; color: var(--kg-muted); }
.bg-profile-reading .bg-profile-overview > span { white-space: nowrap; }
.bg-profile-reading .bg-profile-about { margin-top: 12px; font-size: 15px; }
.bg-profile-reading .bg-profile-about > summary { width: fit-content; max-width: 100%; min-height: 44px; padding: 9px 2px; color: var(--reading-link); cursor: pointer; }
.bg-profile-reading .bg-profile-about__content { padding: 14px 0 22px; }
.bg-profile-reading .bg-profile-description { margin: 0; font-size: 16px; color: var(--kg-muted); }
.bg-profile-reading .kg-profile-stats { margin: 20px 0; padding-block: 18px; }
.bg-profile-reading .kg-profile-stats strong { font-size: 22px; letter-spacing: 0; }
.bg-profile-reading .kg-profile-stats span { font-size: 13px; }
.bg-profile-reading .kg-profile-stats > * { min-width: 0; }
.bg-profile-reading .kg-profile-topics h2,
.bg-profile-reading .kg-profile-categories h2 { font-size: 16px; }
.bg-profile-reading .kg-goal-strip > div > span,
.bg-profile-reading .kg-caption { font-size: 13px; }
.bg-profile-reading .kg-tag-list a { font-size: 13px; min-height: 36px; }
.bg-profile-reading .rx-profile-tabs > .kg-profile-nav {
  margin: 8px 0 24px;
  border: 0;
  border-bottom: 1px solid var(--kg-line);
  border-radius: 0;
  background: none;
  gap: 24px;
}
.bg-profile-reading .rx-profile-tabs > .kg-profile-nav > a {
  padding: 12px 2px;
  min-height: 48px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: none;
  font-size: 15px;
  color: var(--kg-muted);
}
.bg-profile-reading .rx-profile-tabs > .kg-profile-nav > a[aria-selected="true"] { border-bottom-color: var(--reading-link); color: var(--reading-link); }
.bg-profile-reading .kg-profile-nav span,
.bg-profile-reading .kg-count { font-size: 12px; }
.bg-profile-reading .rx-profile-tabs > .kg-publications { padding: 0; border: 0; border-radius: 0; background: none; }
.bg-profile-reading .kg-panel-heading { margin-bottom: 20px; }
.bg-profile-reading .kg-panel-heading h2 { font-size: 24px; line-height: 1.3; }
.bg-profile-reading .kg-panel-heading > .kg-count { flex-shrink: 0; }
.bg-profile-reading .rx-profile-tabs .bg-profile-roles { margin: 0 0 20px; padding: 0; border: 0; background: none; gap: 8px; flex-wrap: wrap; }
.bg-profile-reading .rx-profile-tabs .bg-profile-roles > a { flex: 0 1 auto; padding: 10px 14px; min-height: 44px; border: 1px solid var(--kg-line); border-radius: 8px; font-size: 14px; white-space: normal; background: var(--reading-card); }
.bg-profile-reading .rx-profile-tabs .bg-profile-roles > a[aria-current="page"] { border-color: var(--reading-link); color: var(--reading-link); background: var(--reading-soft); }
.bg-profile-reading .kg-profile-search { margin-bottom: 22px; }
.bg-profile-reading .kg-profile-search input { font-size: 16px; }
.bg-profile-reading .kg-person-row strong,
.bg-profile-reading .kg-publisher-row strong { font-size: 15px; }
.bg-profile-reading .kg-person-row small,
.bg-profile-reading .kg-publisher-row small,
.bg-profile-reading .kg-source-note { font-size: 13px; }
/* Book-scoped editor credits share the compact publication layout, not identity claims. */
.bg-profile-reading .bg-credit-avatar { background: var(--reading-soft); border: 0; border-radius: 12px; color: var(--reading-link); }
.bg-profile-reading .bg-credit-note { max-width: 72ch; margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: var(--kg-muted); }
.bg-profile-reading .bg-credit-publications { margin-top: 28px; }
.bg-profile-reading .bg-credit-source { margin-top: 20px; font-size: 14px; }
.bg-profile-reading .bg-credit-source a { display: inline-flex; align-items: center; min-height: 32px; color: var(--reading-link); text-decoration: underline; text-underline-offset: 4px; }
/* Progressive mobile network toggle, inserted only by network-v16.js. */
.bg-reading-ui .rx-network-mode-v17 { margin: 14px 0; }
.bg-reading-ui .rx-network-show-v17 { min-height: 44px; padding: 10px 14px; border: 1px solid var(--reading-link); border-radius: 8px; background: var(--reading-card); color: var(--reading-link); font: 600 14px/1.5 Arial, Helvetica, sans-serif; }
.bg-reading-ui [data-network-mode="list"] :is(.rx-network-tools-v16, [data-network-stage], .rx-network-hint-v16) { display: none !important; }
/* The heading caption describes dragging the graph, so omit it in list mode. */
.bg-reading-ui .rx-network-panel-v16:has([data-network-mode="list"]) > .rx-network-heading-v16 .kg-caption { display: none; }
.bg-reading-ui [data-knowledge-network] [data-network-list] { font-size: 14px; }
.bg-reading-ui [data-knowledge-network] [data-network-list] > summary { min-height: 44px; padding-block: 10px; font-size: 15px; }
.bg-reading-ui .rx-network-list-grid-v16 h3 { font-size: 15px; }
.bg-reading-ui .rx-network-list-grid-v16 h3 span { font-size: 12px; }
.bg-reading-ui .rx-network-list-grid-v16 a { display: inline-block; min-height: 28px; padding-block: 4px; font-size: 14px; line-height: 1.5; }
@media (max-width: 800px) {
  .bg-reading-ui .reading-mobile-nav a { font-size: 12px; }
}
@media (max-width: 600px) {
  .bg-reading-ui[data-reading-refresh] { font-size: 16px; }
  .bg-reading-ui .bg-shelf { gap: 28px 16px; }
  .bg-reading-ui .bg-book .bg-book__stage { height: 184px; padding: 8px 6px; }
  .bg-reading-ui .bg-book .bg-book__volume img { max-height: 168px; }
  .bg-reading-ui .bg-book .bg-book__body { padding-top: 10px; }
  .bg-reading-ui .bg-book .bg-book__title { font-size: 15px; line-height: 1.4; }
  .bg-reading-ui .bg-book .bg-book__title a { max-height: 4.2em; }
  .bg-reading-ui .bg-book .bg-book__author { font-size: 13px; }
  .bg-reading-ui .bg-book .bg-book__badges { font-size: 12px; }
  .bg-reading-ui .bg-book .bg-book__resume .bg-book__read { font-size: 14px; padding-inline: 8px; }
  .bg-reading-ui .bg-home-hero { padding: 20px 0 14px; }
  .bg-reading-ui .bg-home-hero h1 { font-size: 28px; }
  .bg-reading-ui .bg-home-intro { margin: 9px 0 14px; font-size: 15px; line-height: 1.5; }
  .bg-reading-ui .bg-home-browse { font-size: 12px; margin-top: 9px; }
  .bg-reading-ui .bg-section { padding-block: 22px 12px; }
  .bg-reading-ui .bg-section .bg-section__heading h2 { font-size: 23px; }
  .bg-reading-ui .bg-section__heading { gap: 8px; margin-bottom: 16px; }
  .bg-reading-ui .bg-section .bg-section__heading > a { font-size: 13px; }
  .bg-reading-ui .bg-category-nav { gap: 7px; }
  .bg-reading-ui .bg-category-nav__more > summary { max-width: 92px; font-size: 12px; white-space: normal; line-height: 1.4; }
  .bg-reading-ui .bg-discover h2 { font-size: 23px; }
  .bg-reading-ui .bg-profile-reading { padding-top: 18px; }
  .bg-profile-reading .kg-breadcrumb { font-size: 12px; margin-bottom: 18px; }
  .bg-profile-reading .kg-profile-heading { gap: 14px; align-items: flex-start; }
  .bg-profile-reading .kg-profile-heading > .kg-avatar { width: 56px; height: 56px; flex-basis: 56px; font-size: 20px; }
  .bg-profile-reading .kg-profile-heading h1 { font-size: 26px !important; }
  .bg-profile-reading .kg-profile-heading .bg-profile-overview { font-size: 13px; gap: 2px 12px; }
  .bg-profile-reading .bg-profile-about { margin-top: 8px; font-size: 14px; }
  .bg-profile-reading .kg-profile-stats { grid-template-columns: 1fr; padding: 0; margin-block: 16px; }
  .bg-profile-reading .kg-profile-stats > * { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 4px 10px; padding: 12px 0; border: 0; }
  .bg-profile-reading .kg-profile-stats > * + * { border-top: 1px solid var(--kg-line); }
  .bg-profile-reading .kg-profile-stats .kg-icon { margin-top: 3px; }
  .bg-profile-reading .kg-profile-stats span { grid-column: 2; }
  .bg-profile-reading .rx-profile-tabs > .kg-profile-nav { gap: 12px; margin: 4px 0 20px; }
  .bg-profile-reading .rx-profile-tabs > .kg-profile-nav > a { flex: 1 1 auto; font-size: 14px; padding: 10px 0; gap: 5px; }
  .bg-profile-reading .kg-panel-heading { margin-bottom: 16px; }
  .bg-profile-reading .kg-panel-heading h2 { font-size: 22px; }
  .bg-profile-reading .rx-profile-tabs .bg-profile-roles > a { padding: 9px 11px; font-size: 13px; }
}
@media (max-width: 359px) {
  .bg-reading-ui .bg-shelf { grid-template-columns: minmax(0,1fr); }
  .bg-reading-ui .bg-book .bg-book__stage { height: 218px; }
  .bg-reading-ui .bg-book .bg-book__volume img { max-height: 202px; }
  .bg-profile-reading .kg-profile-heading h1 { font-size: 24px !important; }
  .bg-profile-reading .rx-profile-tabs > .kg-profile-nav { gap: 8px; }
  .bg-profile-reading .rx-profile-tabs > .kg-profile-nav > a { font-size: 13px; }
}
/* Reading coherence, 18 October: shared listing headers and shelf alignment. */
.bg-reading-ui[data-reading-refresh] .rx-directory-hero {
  padding: 18px 0 !important;
  background: var(--reading-bg);
  color: var(--reading-text);
  border-bottom: 1px solid var(--reading-line);
}
.bg-reading-ui[data-reading-refresh] .rx-directory-hero::after { content: none; display: none; }
.bg-reading-ui[data-reading-refresh] .rx-directory-hero .rx-directory-breadcrumb {
  margin: 0 0 8px;
  color: var(--reading-muted);
  font-size: 12px;
  line-height: 1.5;
}
.bg-reading-ui[data-reading-refresh] .rx-directory-hero .rx-directory-breadcrumb a { color: var(--reading-link); }
.bg-reading-ui[data-reading-refresh] .rx-directory-hero h1 {
  margin: 0 0 6px;
  color: var(--reading-text);
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.bg-reading-ui[data-reading-refresh] .rx-directory-hero h1 + p {
  max-width: 72ch;
  margin: 0 0 12px;
  color: var(--reading-muted);
  font-size: 14px;
  line-height: 1.5;
}
.bg-reading-ui[data-reading-refresh] .rx-directory-hero .reading-search:not(.hm-filter-form),
.bg-reading-ui[data-reading-refresh] .rx-directory-hero .rx-directory-search:not(.hm-filter-form) {
  background: var(--reading-card);
  color: var(--reading-text);
  border-color: var(--reading-line);
}
.bg-reading-ui[data-reading-refresh] .rx-directory-hero .reading-search input,
.bg-reading-ui[data-reading-refresh] .rx-directory-hero .rx-directory-search input { color: var(--reading-text); }
.bg-reading-ui[data-reading-refresh] .rx-directory-hero .hm-searchbar > .hm-button[type="submit"] {
  background: #24166a;
  border-color: #24166a;
  color: #fff;
}
/* A single flexible space before progress aligns bars across different title lengths. */
.bg-reading-ui .bg-shelf > .bg-book { align-self: stretch; }
.bg-reading-ui .bg-book .bg-book__progress {
  margin-top: auto;
  padding: 12px 0 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.bg-reading-ui .bg-book .bg-book__progress progress { min-width: 0; }
.bg-reading-ui .bg-book .bg-book__progress > span { white-space: nowrap; }
.bg-reading-ui .bg-book .bg-book__progress small { line-height: 1.6; }
.bg-reading-ui .bg-book .bg-book__progress + .bg-book__resume { margin-top: 0; }
/* Mixed library history rows may lack a resume file or a last-read timestamp.
   Reserve only the missing presentation space when that shelf uses the slot. */
@media (min-width: 360px) {
  .bg-reading-ui .bg-shelf:has(> .bg-book > .bg-book__resume) > .bg-book:has(> .bg-book__progress):not(:has(> .bg-book__resume))::after {
    content: "";
    display: block;
    flex: 0 0 56px;
    pointer-events: none;
  }
  .bg-reading-ui .bg-shelf:has(> .bg-book > .bg-book__progress > small) > .bg-book > .bg-book__progress:not(:has(> small))::after {
    content: "";
    grid-column: 1 / -1;
    min-height: 1.6em;
    pointer-events: none;
  }
}
/* Hairlines sit halfway across the 24px desktop gap, below covers only. */
.bg-reading-ui .bg-book .bg-book__body { position: relative; }
@media (min-width: 900px) and (max-width: 1199px) {
  .bg-reading-ui .bg-shelf > .bg-book:not(:nth-child(3n + 1)) > .bg-book__body::before {
    content: "";
    position: absolute;
    inset-inline-start: -12px;
    top: 12px;
    bottom: 0;
    width: 1px;
    background: var(--reading-line);
    pointer-events: none;
  }
}
@media (min-width: 1200px) {
  .bg-reading-ui .bg-shelf > .bg-book:not(:nth-child(4n + 1)) > .bg-book__body::before {
    content: "";
    position: absolute;
    inset-inline-start: -12px;
    top: 12px;
    bottom: 0;
    width: 1px;
    background: var(--reading-line);
    pointer-events: none;
  }
}
@media (max-width: 600px) {
  .bg-reading-ui[data-reading-refresh] .rx-directory-hero { padding: 16px 0 !important; }
  .bg-reading-ui[data-reading-refresh] .rx-directory-hero h1 { font-size: 24px; }
  .bg-reading-ui .bg-book .bg-book__progress { padding-top: 10px; }
}
