:root { color-scheme: dark; font-family: Georgia, 'Times New Roman', serif; background: #15120d; color: #f7f0df; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible { outline: 2px solid #efcc81; outline-offset: 6px; }
.library { max-width: 1440px; padding: 0 clamp(22px, 5vw, 80px); margin: auto; }
.home-nav { display: flex; justify-content: space-between; padding: 26px 0; border-bottom: 1px solid #dcc38d30; font: .9375rem/1.5 ui-sans-serif, system-ui, sans-serif; }
.home-nav a { text-decoration: none; }
.home-nav a:first-child { font-weight: 600; letter-spacing: -.045em; }
.library-heading { padding: clamp(48px, 7vw, 100px) 0 54px; }
.eyebrow { color: #c6bda7; font: .8125rem/1.5 ui-sans-serif, system-ui, sans-serif; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 24px; }
h1 { font-weight: 400; font-size: clamp(3.3rem, 7vw, 6.5rem); line-height: 1.04; letter-spacing: -.045em; margin: 0; }
h1 span { color: #efcc81; }
.library-intro { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-top: 38px; }
.library-intro p { margin: 0; line-height: 1.7; font-size: 1.125rem; }
.library-intro p:last-child { font: .9375rem/1.8 ui-sans-serif, system-ui, sans-serif; color: #c6bda7; }
.collection-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-top: 1px solid #dcc38d40; padding: 20px 0 25px; font: .8125rem/1.6 ui-sans-serif, system-ui, sans-serif; color: #c6bda7; }
.collection-heading p { margin: 0; text-transform: uppercase; letter-spacing: .1em; }
.chapter-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 42px 28px; }
.chapter-grid li { min-width: 0; }
.chapter-card { display: block; height: 100%; text-decoration: none; border-bottom: 1px solid #dcc38d30; }
.chapter-art { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 3px; background: #30281c; }
.chapter-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.chapter-art::after { content: ''; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #100d0999); pointer-events: none; }
.chapter-index { position: absolute; z-index: 1; bottom: 14px; left: 18px; font-size: 1.65rem; color: #fff3d9; }
.chapter-info { padding: 20px 0 22px; }
.chapter-meta { margin: 0 0 10px; display: flex; justify-content: space-between; color: #bfb49f; font: .75rem/1.5 ui-sans-serif, system-ui, sans-serif; letter-spacing: .04em; }
h2 { font-size: clamp(1.3rem, 1.7vw, 1.7rem); line-height: 1.2; font-weight: 400; margin: 0 0 12px; text-wrap: balance; }
.chapter-info > p:not(.chapter-meta) { color: #c6bda7; font-size: 1rem; line-height: 1.65; margin: 0; }
.read-chapter { display: flex; justify-content: space-between; margin-top: 24px; color: #efcc81; font: .8125rem/1.5 ui-sans-serif, system-ui, sans-serif; }
footer { padding: 54px 0 30px; margin-top: 40px; display: flex; justify-content: space-between; gap: 1rem; color: #c6bda7; font: .875rem/1.6 ui-sans-serif, system-ui, sans-serif; }
footer p { margin: 0; }
.skip-link { position: absolute; top: -100px; background: #211b12; padding: 1rem; z-index: 10; }
.skip-link:focus { top: 8px; }
@media (hover: hover) { .chapter-card:hover img { transform: scale(1.035); } .chapter-card:hover h2 { color: #efcc81; } }
@media (max-width: 950px) { .chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) {
  .home-nav { padding-block: 20px; }
  .library-heading { padding-top: 40px; padding-bottom: 36px; }
  h1 { font-size: clamp(2.9rem, 12.2vw, 4.4rem); }
  .library-intro { display: block; margin-top: 25px; }
  .library-intro p:last-child { margin-top: 18px; font-size: .875rem; }
  .collection-heading span { display: none; }
  .chapter-grid { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .chapter-info { padding-block: 16px 20px; }
  h2 { font-size: 1.65rem; }
  footer { flex-direction: column; padding-bottom: calc(25px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .chapter-art img { transition: none; } }
