:root {
  --ink: #1c1b18;
  --muted: #686760;
  --cream: #f7f5ef;
  --paper: #fffefa;
  --line: #ded9cf;
  --teal: #514b3f;
  --teal-dark: #24231f;
  --gold: #b69b70;
  --shadow: 0 18px 40px rgba(39, 32, 22, .1);
}

body { background: var(--cream); color: var(--ink); }
.eyebrow { color: #8b6e42; }

.site-header { background: #f7f5ef; color: var(--ink); border-bottom: 1px solid #ded9cf; }
.header-inner { max-width: 1500px; padding: 10px 5%; min-height: 84px; }
.brand { gap: 11px; color: var(--ink); text-decoration: none; letter-spacing: 0; font-weight: 400; }
.brand-logo, .footer-logo { display: block; position: relative; flex: none; }
.brand-logo .copyright-symbol, .footer-logo .copyright-symbol { position: absolute; right: 2px; bottom: 1px; padding: 0 2px; background: #fff; color: #111; font: 700 12px/1 Arial, sans-serif; }
.brand img { display: block; width: 78px; height: 52px; object-fit: contain; border: 1px solid #e2ded6; background: white; }
.brand-name { font: 400 1.38rem/.9 Georgia, 'Times New Roman', serif; text-transform: uppercase; letter-spacing: -.035em; }
.brand-name small { font: 650 .61rem/1.1 'Segoe UI', Arial, sans-serif; text-transform: uppercase; letter-spacing: .43em; color: #786f62; margin: 7px 0 0 2px; }
.header-nav { display: flex; align-items: center; gap: clamp(14px, 2.3vw, 36px); margin: 0 auto; }
.header-nav a { text-decoration: none; font-size: .79rem; font-weight: 650; color: #56534d; white-space: nowrap; }
.header-nav a:hover, .site-footer a:hover { color: #a57f46; }
.header-action { display: inline-flex; align-items: center; gap: 15px; background: var(--ink); color: white; text-decoration: none; padding: 11px 15px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.header-action:hover { background: #654f32; }

.editorial-note { max-width: 1500px; margin: auto; padding: 29px 5%; display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; align-items: center; gap: 34px; background: #24231f; color: #fffdf7; }
.note-label { color: #c0a575; font-size: .62rem; font-weight: 800; letter-spacing: .18em; }
.editorial-note p { margin: 0; font: 400 clamp(1.12rem, 1.65vw, 1.65rem)/1.35 Georgia, 'Times New Roman', serif; max-width: 830px; }
.editorial-note a { color: #f4ead9; text-underline-offset: 4px; font-size: .77rem; font-weight: 700; white-space: nowrap; }

.featured { max-width: 1500px; margin: auto; padding: 106px 5% 77px; }
.featured-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 35px; }
.featured-heading h2, .reading-guide h2 { font: 400 clamp(2.8rem, 4.2vw, 4.8rem)/1.05 Georgia, 'Times New Roman', serif; letter-spacing: -.048em; margin: 0; }
.featured-heading p:last-child { max-width: 355px; margin: 0 0 4px; color: #77736a; font-size: .86rem; line-height: 1.6; }
.featured-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.featured-loading { color: #76736d; }
.feature-item { min-width: 0; border: 1px solid #e0dbd1; background: #fffcf7; padding: 19px; transition: transform .2s, box-shadow .2s; }
.feature-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-number { display: block; border-bottom: 1px solid #ddd7cb; color: #9c8156; padding-bottom: 10px; margin-bottom: 19px; font: 400 1rem Georgia, serif; }
.feature-item .book-card { display: grid; grid-template-columns: minmax(115px, 42%) minmax(0, 1fr); gap: 0 18px; width: 100%; align-items: start; }
.feature-item .cover-wrap { grid-row: 1 / 4; aspect-ratio: 3 / 4.2; box-shadow: 5px 9px 16px rgba(39, 32, 22, .13); }
.feature-item .book-meta { margin: 2px 0 10px; align-self: end; }
.feature-item .book-title { min-height: 0; font-size: clamp(1.16rem, 1.6vw, 1.62rem); line-height: 1.13; }
.feature-item .book-formats { align-self: start; margin: 13px 0 0; }
.feature-item .book-formats span { font-size: .6rem; }
.feature-access { margin: 17px 0 0; color: #675c48; font-size: .7rem; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; }

.stats { max-width: 1500px; margin: 0 auto; padding: 0 5% 95px; }
.stats div { border-color: #d5cec1; padding: 24px 20px; align-items: baseline; }
.stats div + div { border-left-color: #d5cec1; }
.stats strong { color: #2a2924; font-size: 3rem; }
.stats span { color: #777168; }

.reading-guide { max-width: 1500px; margin: auto; padding: 83px 5% 81px; display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 8vw, 115px); background: #211f1b; color: #f9f6ef; }
.reading-guide .eyebrow { color: #c6a978; }
.reading-guide h2 { margin-bottom: 25px; }
.reading-guide h2 em { color: #c7ad7e; font-style: italic; }
.reading-guide-copy > p:last-child { color: #c5c1b6; line-height: 1.72; max-width: 440px; font-size: .91rem; }
.reading-steps { border-top: 1px solid #5b574e; }
.reading-steps > div { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 17px; border-bottom: 1px solid #5b574e; padding: 19px 0; }
.reading-steps > div > span { color: #c4a575; font: 400 1rem Georgia, serif; }
.reading-steps > div p { margin: 0; color: #cbc7be; font-size: .86rem; line-height: 1.62; }
.reading-steps strong { color: #fffdf6; font-weight: 700; }
.reading-steps .reading-note { color: #a8a396; font-size: .72rem; margin: 17px 0 0 59px; }
.reading-steps .rights-inline { margin: 10px 0 0 59px; font-size: .75rem; line-height: 1.5; color: #cbc7be; }
.rights-inline a { color: #e9d3a9; text-underline-offset: 3px; }
.rights-inline a:hover { color: #fff7e5; }

.library { max-width: 1500px; padding: 0 5% 115px; }
.section-intro { margin-bottom: 40px; }
.section-intro h2 { color: #1e1e1a; font-size: clamp(2.7rem, 4.4vw, 4.7rem); }
.section-intro > p { color: #777169; }
.side-nav { border-top-color: #3b3832; }
.side-nav button { color: #706b61; }
.side-nav button:hover, .side-nav button.selected { background: #e9e2d4; color: #2b281f; }
.side-note { background: #f1ede4; border-color: #d9d2c6; }
.side-note > span { color: #aa8c5c; }
.side-note p { color: #6e685f; }
.toolbar, .results-bar { border-color: #d8d1c4; }
.search-field { background: #fffcf7; border-color: #d3cbbd; }
.search-field:focus-within { border-color: #a78a58; box-shadow: 0 0 0 3px rgba(167, 138, 88, .15); }
.search-field > span:first-child { color: #9b865e; }
.format-switch { background: #ebe5d9; }
.format-switch button { color: #6d675d; }
.format-switch button.selected { background: #fffcf7; color: #28251f; box-shadow: 0 1px 5px #d2cbbd; }
.group-title h3 { color: #22211e; }
.series-title { color: #947b52; }
.series-title:after { background: #dbd4c7; }
.book-title { color: #24231e; }
.result-hint a { color: #795e37; text-underline-offset: 3px; }
.book-meta { color: #8c7a5e; }
.book-formats span { border-color: #d3c9b7; color: #695f50; }
.book-formats span.digital { background: #eee8db; color: #514734; }
.book-formats .free-badge { background: #e1eee1; border-color: #a9c6aa; color: #315c37; }
.book-card-shell { min-width: 0; }
.download-link { display: inline-flex; margin-top: 11px; align-items: center; justify-content: center; min-height: 36px; padding: 8px 12px; width: 100%; border: 1px solid #b8a680; background: #fffaf0; color: #4d3f2b; text-decoration: none; font-size: .72rem; font-weight: 750; }
.download-link:hover, .download-link:focus-visible { background: #e9ddc5; }
.cover-wrap { box-shadow: 7px 11px 20px rgba(31, 26, 19, .14); }
.empty button { background: #2b2923; }

.rights { max-width: 1500px; margin: 0 auto; padding: 70px 5% 85px; border-top: 1px solid #d8d1c5; display: grid; grid-template-columns: minmax(220px, .52fr) minmax(0, 1fr); gap: clamp(30px, 6vw, 95px); scroll-margin-top: 30px; }
.rights-heading .eyebrow { margin-bottom: 13px; }
.rights-heading h2 { margin: 0; font: 400 clamp(2.2rem, 3.4vw, 3.8rem)/1.08 Georgia, 'Times New Roman', serif; letter-spacing: -.045em; }
.rights-copy { max-width: 850px; color: #4f4b43; font-size: .9rem; line-height: 1.75; }
.rights-copy p { margin: 0 0 18px; }
.rights-copy ul { margin: -4px 0 20px; padding-left: 1.45em; }
.rights-copy li { padding-left: .25em; margin: 6px 0; }
.rights-copy li::marker { color: #9a7d50; }

.site-footer { max-width: 1500px; margin: auto; background: #211f1b; color: #c8c2b6; border: 0; padding: 34px 5%; display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 25px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { display: block; width: 87px; height: 58px; object-fit: contain; background: white; }
.footer-brand > span { color: #fffaf0; font: 400 1.37rem/.9 Georgia, serif; }
.footer-brand small { display: block; color: #c7aa76; font: 650 .61rem 'Segoe UI', Arial, sans-serif; text-transform: uppercase; letter-spacing: .38em; margin-top: 7px; }
.site-footer p { margin: 0; font-size: .77rem; line-height: 1.5; }
.site-footer a { color: #e7ddca; font-size: .75rem; white-space: nowrap; }
.footer-links { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }

.reader-header { background: #24231f; }
.reader-toolbar > a { color: #795e37; }
.reader-toolbar #download-book { margin-left: 0; padding: 8px 11px; border-radius: 3px; background: #e8ddc6; color: #3d3528; }
.reader-toolbar #download-book:hover { background: #d8c69e; text-decoration: none; }

@media (max-width: 1100px) {
  .header-nav { gap: 15px; }
  .header-nav a { font-size: .72rem; }
  .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-item:last-child { grid-column: span 2; }
  .feature-item:last-child .book-card { max-width: 480px; }
}

@media (max-width: 950px) {
  .library-layout { grid-template-columns: minmax(0, 1fr); }
  .side-nav, .catalog-main { min-width: 0; }
  .side-nav { max-width: 100%; overflow: hidden; }
  .side-nav nav { max-width: 100%; overflow-x: auto; }
}

@media (max-width: 800px) {
  .header-nav { display: none; }
  .header-action { margin-left: auto; }
  .editorial-note { grid-template-columns: 1fr auto; gap: 15px 25px; }
  .editorial-note p { grid-column: 1 / -1; grid-row: 2; }
  .featured-heading { align-items: start; }
  .reading-guide { grid-template-columns: 1fr; gap: 30px; }
  .reading-guide-copy > p:last-child { max-width: 600px; }
  .rights { grid-template-columns: 1fr; gap: 25px; padding-top: 54px; padding-bottom: 65px; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer p { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 650px) {
  .header-inner { padding: 9px 5%; min-height: 70px; }
  .brand img { width: 66px; height: 44px; }
  .brand-name { font-size: 1.12rem; }
  .brand-name small { font-size: .52rem; }
  .header-action { padding: 10px 12px; }
  .editorial-note { padding: 25px 5%; }
  .editorial-note p { font-size: 1.16rem; }
  .featured { padding: 73px 5% 56px; }
  .featured-heading { display: block; }
  .featured-heading p:last-child { margin-top: 17px; }
  .featured-grid { grid-template-columns: 1fr; }
  .feature-item:last-child { grid-column: auto; }
  .feature-item .book-card { grid-template-columns: minmax(120px, 43%) minmax(0, 1fr); }
  .stats { padding: 0 5% 68px; }
  .stats div { padding: 16px 7px; }
  .stats strong { font-size: 2.05rem; }
  .stats span { font-size: .65rem; }
  .reading-guide { padding: 65px 5%; }
  .library { padding: 0 5% 78px; }
  .section-intro h2 { font-size: 2.8rem; }
  .site-footer { padding: 28px 5%; grid-template-columns: 1fr; }
  .site-footer p { grid-column: auto; grid-row: auto; }
  .footer-links { align-items: flex-start; }
}

@media (max-width: 400px) {
  .brand-name { font-size: 1rem; }
  .brand-name small { letter-spacing: .28em; }
  .header-action { font-size: .7rem; }
  .header-action span { display: none; }
  .feature-item .book-card { gap: 0 12px; }
  .feature-item .book-title { font-size: 1.18rem; }
  .feature-item .book-formats span { font-size: .54rem; }
  .editorial-note { grid-template-columns: 1fr; }
  .editorial-note p { grid-column: auto; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .feature-item, .cover-wrap { transition: none; }
}

/* Publicación: disponibilidad, rendimiento y accesibilidad */
.noscript { margin: 0; padding: 12px 5%; background: #24231f; color: #fffdf7; font-size: .82rem; line-height: 1.5; }
.noscript a { color: #f0d6a4; }
.book-card:disabled { cursor: default; opacity: .82; }
.book-card:disabled .cover-wrap { filter: saturate(.75); }
.book-availability { display: block; margin-top: 8px; color: #8a6a3d; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.group { content-visibility: auto; contain-intrinsic-size: auto 640px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
.rights--flush { padding-left: 0; padding-right: 0; }
.site-notice { max-width: 1500px; margin: 0 auto; padding: 18px 5%; background: #f3e6cc; border-bottom: 1px solid #d9c49a; color: #4e3a1d; display: flex; align-items: baseline; gap: 20px; }
.site-notice strong { flex: none; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; }
.site-notice p { margin: 0; font-size: .84rem; line-height: 1.55; }
@media (max-width: 650px) { .site-notice { display: block; padding: 14px 5%; } .site-notice strong { display: block; margin-bottom: 5px; } }
