.discovery {
  --front-ink: #1d332c;
  --front-green: #17352e;
  --front-green-deep: #112a24;
  --front-surface: #faf7ef;
  --front-muted: #5a655c;
  --front-line: #d9ded4;
  --front-gold: #efba79;
  --front-cream: #fff8e9;
  margin: 0;
  background: var(--front-surface);
  color: var(--front-ink);
}

.front-wrap { width: min(100% - 3.5rem, 75rem); margin-inline: auto; }
.discovery [id] { scroll-margin-top: 1.15rem; }
.discovery h1, .discovery h2 { line-height: 1.04; letter-spacing: -.045em; text-wrap: balance; }
.discovery h2 { font-size: clamp(2.25rem, 4.2vw, 3.95rem); }
.discovery h2 em { color: #825130; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  white-space: nowrap; clip-path: inset(50%); margin: -1px; padding: 0; border: 0;
}

.front-header { background: #fffdf8; }
.front-tools {
  min-height: 4.95rem; display: grid; grid-template-columns: auto minmax(12rem, 1fr) auto auto;
  gap: clamp(.85rem, 2.6vw, 2.2rem); align-items: center;
}
.front-wordmark {
  display: inline-flex; align-items: center; gap: .63rem;
  width: max-content; color: var(--front-ink); font: 700 1.22rem/1.025 var(--serif);
}
.wordmark-icon {
  display: inline-flex; flex: 0 0 auto; justify-content: center; align-items: center; gap: 2px;
  width: 2.1rem; height: 2.1rem; border-radius: .47rem; background: var(--front-green); color: #f1c58f;
}
.wordmark-icon i {
  width: .46rem; height: .66rem; border: 1.5px solid; border-radius: .11rem;
  transform: skewY(13deg);
}
.wordmark-icon i + i { transform: skewY(-13deg); }
.front-search {
  display: flex; align-items: center; min-width: 0; border-radius: .55rem;
  border: 1px solid #ced7ce; background: #f1f4ed;
}
.front-search:focus-within { outline: 2px solid #506e5d; outline-offset: 2px; }
.front-search input {
  flex: 1; width: 100%; min-width: 0; min-height: 2.72rem; padding: .48rem .8rem;
  border: 0; border-radius: inherit; background: transparent; color: var(--front-ink); font: 1rem var(--sans);
}
.front-search input::placeholder { color: #65736a; }
.front-search input:focus { outline: 0; }
.front-search button {
  display: grid; place-items: center; flex: 0 0 2.85rem; align-self: stretch;
  background: none; border: 0; border-radius: inherit; color: var(--front-ink); cursor: pointer;
}
.front-search button:hover { background: #e1e9dd; }
.search-icon {
  position: relative; display: block; width: .86rem; height: .86rem;
  margin-right: .14rem; border: 1.7px solid currentColor; border-radius: 50%;
}
.search-icon::after {
  content: ''; position: absolute; width: .39rem; height: 1.6px; top: .66rem; left: .58rem;
  border-radius: 1px; transform: rotate(45deg); transform-origin: left; background: currentColor;
}
.my-library { font-size: .95rem; font-weight: 720; white-space: nowrap; }
.my-library:hover, .front-nav a:hover { color: #8b4e2d; }

.front-button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 3.25rem; padding: .65rem 1.35rem;
  border: 1px solid transparent; border-radius: .5rem; background: var(--front-green); color: var(--front-cream);
  font: 740 .95rem/1.25 var(--sans); text-align: center; transition: background-color .18s;
}
.front-button:hover { background: #295044; }
.front-button-small { min-height: 2.65rem; padding-inline: 1rem; white-space: nowrap; }
.front-button-gold { background: var(--front-gold); color: #261e16; }
.front-button-gold:hover { background: #f9d2a1; }
.front-nav { border-block: 1px solid #e7e5da; }
.front-nav-links {
  display: flex; align-items: center; gap: clamp(1rem, 3.3vw, 2.7rem);
  min-height: 2.9rem; overflow-x: auto; scrollbar-width: thin;
}
.front-nav a { font-size: .9rem; font-weight: 650; flex: 0 0 auto; white-space: nowrap; }
.front-nav a:focus-visible { outline-offset: 2px; }

.front-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  min-height: 30rem; align-items: center; margin-top: 1.65rem;
  border-radius: 1.1rem; overflow: hidden; background: var(--front-green); color: var(--front-cream);
}
.front-hero-copy { position: relative; z-index: 1; padding: clamp(2rem, 4.4vw, 4.25rem); }
.front-hero h1 { max-width: 8.3em; font-size: clamp(3.1rem, 5.35vw, 5.25rem); }
.front-hero h1 em { color: #f0c691; font-weight: 500; }
.hero-description {
  margin-top: 1.15rem; max-width: 28rem;
  font-size: clamp(1.18rem, 2.05vw, 1.5rem); line-height: 1.45; color: #edf0e5;
}
.hero-description strong { color: var(--front-gold); font-weight: 800; }
.hero-access { margin-top: .7rem; max-width: 28rem; font-size: 1rem; color: #edf0e5; }
.hero-actions { margin-top: 1.5rem; }
.hero-refund { margin-top: .75rem; font-size: .92rem; color: #daddd0; }
.hero-refund a { text-decoration: underline; text-underline-offset: .2em; }

.hero-books {
  position: relative; isolation: isolate; display: grid; place-items: center; align-self: stretch; min-width: 0;
  padding: 1.75rem 1.5rem 2.4rem;
  background: radial-gradient(ellipse at 65% 45%, #53785f 0%, #315243 52%, #1d3b32 84%);
}
.hero-books::before, .hero-books::after {
  content: ''; position: absolute; z-index: -1; left: 50%; top: 50%;
  width: clamp(17rem, 36vw, 32rem); aspect-ratio: 1; border: 1px solid #cdd9b532; border-radius: 50%;
  transform: translate(-50%, -50%);
}
.hero-books::after { width: clamp(13rem, 28vw, 24rem); border-color: #cdd9b526; }
.hero-book-collage {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .48rem .9rem; align-items: center; width: min(87%, 16rem);
}
.art-cover {
  width: 100%; height: auto; border-radius: .3rem .38rem .38rem .24rem;
  box-shadow: .42rem .65rem 1.15rem #0c211cb0;
}
.hero-book-collage .cover-habitos { transform: translate(-.7rem, .75rem) rotate(-11deg); }
.hero-book-collage .cover-dinero { transform: translate(.5rem, -.65rem) rotate(10deg); }
.hero-book-collage .cover-soledad { transform: translate(-.75rem, .65rem) rotate(-8deg); }
.hero-book-collage .cover-principito { transform: translate(.53rem, -.85rem) rotate(12deg); }
.hero-books figcaption {
  position: absolute; bottom: .7rem; padding-inline: .45rem;
  color: #eff3e5; text-align: center; font-size: .81rem;
}
.hero-screenshot { width: min(100%, 25rem); height: auto; max-height: 28rem; object-fit: contain; border-radius: .6rem; }

.book-discovery { padding-block: clamp(2.8rem, 5vw, 4.8rem); }
.shelf-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; }
.shelf-heading p { color: var(--front-muted); margin-top: .55rem; }
.shelf-controls { display: flex; flex: 0 0 auto; gap: .5rem; }
.shelf-controls button {
  width: 2.65rem; height: 2.65rem; border: 1px solid #b3c0b2; border-radius: 50%;
  color: var(--front-green); background: #fffdf8; cursor: pointer; font: 1.65rem/1 var(--sans);
}
.shelf-controls button:hover { background: #e9eee5; }
.shelf-controls button:disabled { opacity: .45; cursor: default; }
.shelf-controls #shelf-rotation { display: grid; place-items: center; }
.rotation-icon { width: .65rem; height: .8rem; border-inline: 2px solid currentColor; }
#shelf-rotation[data-paused="true"] .rotation-icon {
  width: 0; height: 0; margin-left: .12rem;
  border: .39rem solid transparent; border-left: .62rem solid currentColor; border-right-width: 0;
}
.book-discovery .shelf-heading { margin-bottom: 1.25rem; }
.book-shelf {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--shelf-gap)) / 4);
  --shelf-gap: 1.15rem; gap: var(--shelf-gap); margin: 0; padding: .2rem 0 .55rem;
  list-style: none; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #899d8f #eef0e7;
  scroll-snap-type: x mandatory;
}
.shelf-card {
  display: flex; flex-direction: column; min-width: 0; padding: clamp(.6rem, 1.6vw, 1.2rem);
  border: 1px solid #dce0d4; border-radius: .75rem; background: #fffdf8; scroll-snap-align: start;
}
.shelf-cover {
  display: grid; justify-items: center; align-items: center;
  min-height: 0; padding: .95rem .45rem; border-radius: .44rem; background: #ebeee4;
}
.shelf-card img, .cover-placeholder { width: min(100%, 8.6rem); aspect-ratio: 280 / 468; }
.shelf-card img { filter: drop-shadow(.25rem .48rem .45rem #18312642); object-fit: contain; }
.cover-placeholder {
  display: grid; place-items: center; background: #496752; color: var(--front-cream);
  padding: .65rem; border-radius: .28rem; text-align: center; font: 650 1rem/1.15 var(--serif); overflow-wrap: anywhere;
}
.shelf-card h3 { margin-top: .8rem; font: 650 clamp(1.12rem, 2.1vw, 1.42rem)/1.16 var(--serif); overflow-wrap: anywhere; }
.shelf-card p { margin-top: .24rem; color: var(--front-muted); font-size: .92rem; overflow-wrap: anywhere; }
.catalog-empty { border: 1px solid var(--front-line); border-radius: .6rem; padding: 1rem; background: #fffdf8; }
.query-feedback { display: flex; flex-wrap: wrap; align-items: baseline; gap: .32rem 1rem; margin-bottom: .85rem; color: var(--front-muted); }
.query-feedback p { overflow-wrap: anywhere; }
.text-button {
  border: 0; padding: .45rem 0 0; background: none; color: #794d2d; cursor: pointer; font: 700 .95rem var(--sans);
  text-decoration: underline; text-underline-offset: .2rem;
}

.authors-feature {
  padding-block: clamp(2.5rem, 5vw, 4.1rem);
  background: #f2eee1; border-block: 1px solid #e3dfd2;
}
.author-shelf { grid-auto-columns: calc((100% - 4 * var(--shelf-gap)) / 5); margin-top: 1.35rem; padding-inline: .15rem; }
.author-card { min-width: 0; scroll-snap-align: start; }
.author-portrait { aspect-ratio: 4 / 5; border-radius: .58rem; overflow: hidden; background: #ddddcf; }
.author-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; filter: grayscale(1);
}
.author-card .author-photo-roxane {
  object-position: 61% 36%; transform-origin: 74% 23%; transform: translateX(-17%) scale(2);
}
.author-card .author-photo-stephen { filter: grayscale(1) brightness(1.27); }
.author-card h3 { margin-top: .8rem; font: 700 clamp(1.04rem, 1.7vw, 1.3rem)/1.2 var(--serif); }
.author-work {
  border: 0; padding: .35rem 0 .12rem; background: transparent; color: #74492e; cursor: pointer;
  text-align: start; text-decoration: underline; text-underline-offset: .2rem; font: .95rem/1.35 var(--sans);
}
.author-work:hover { color: var(--front-green); }
.portrait-credits { padding-block: clamp(2rem, 6vw, 5rem); }
.portrait-credits h1 { margin-top: 1.25rem; font-size: clamp(2rem, 5vw, 3.75rem); }
.portrait-credits ul { color: var(--front-muted); margin-block: 1rem; padding-inline-start: 1.2rem; }
.portrait-credits a { text-decoration: underline; text-underline-offset: .15em; }
.author-dialog {
  width: min(100% - 2rem, 30rem); border: 1px solid #c2c6b7; padding: 1.4rem 1.6rem 1.65rem;
  border-radius: .75rem; background: var(--front-surface); color: var(--front-ink);
}
.author-dialog::backdrop { background: #112a24a8; }
.author-dialog form { display: flex; justify-content: end; margin-bottom: .65rem; }
.author-dialog form button { padding: .3rem; }
.author-dialog-byline { color: var(--front-muted); font-weight: 700; }
.discovery .author-dialog h2 { margin-block: .4rem .72rem; font-size: clamp(1.8rem, 5vw, 2.6rem); }

.audio-feature { background: #e6ede1; padding-block: clamp(2.35rem, 6vw, 5rem); }
.audio-layout { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); align-items: center; gap: clamp(1.4rem, 6vw, 5.4rem); }
.audio-copy > p { max-width: 29rem; margin-top: .85rem; color: var(--front-muted); font-size: 1.06rem; }
.audio-copy .front-button { margin-top: 1.2rem; }
.audio-preview {
  max-width: 26rem; margin-top: 1.15rem; padding: .9rem;
  border: 1px solid #c7d5c6; border-radius: .75rem; background: #f8faf3;
}
.audio-sample-heading { display: flex; align-items: center; gap: .85rem; }
.audio-sample-cover {
  flex: 0 0 auto; width: clamp(4.6rem, 10vw, 6rem);
  border-radius: .2rem; box-shadow: 0 .22rem .6rem #17352e2b;
}
.audio-sample-title { font: 700 clamp(1.2rem, 2.45vw, 1.55rem)/1.16 var(--serif); }
.audio-sample-author { margin-top: .25rem; color: var(--front-muted); font-size: .95rem; }
.audio-preview audio { display: block; width: 100%; margin-top: .85rem; }
.audio-visual { overflow: hidden; border-radius: .75rem; }
.audio-visual img { width: 100%; height: auto; }

.front-offer-section { background: var(--front-green-deep); color: var(--front-cream); }
.front-offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .88fr); gap: clamp(1.5rem, 8vw, 7rem); align-items: center; padding-block: clamp(2.8rem, 6.5vw, 5.7rem); }
.front-offer h2 em { color: var(--front-gold); }
.offer-intro p { color: #dce2d4; margin-top: .9rem; max-width: 24rem; font-size: 1.06rem; }
.front-offer-card { padding: clamp(1.35rem, 3.9vw, 2.55rem); border-radius: .78rem; background: #f9f2e5; color: var(--front-ink); }
.front-offer-card h3 { font: 700 clamp(1.45rem, 3vw, 2.05rem)/1.08 var(--serif); }
.front-offer-card ul { padding: 0; margin-block: .95rem; list-style: none; }
.front-offer-card li { padding-block: .54rem; border-bottom: 1px solid #dbd5c4; }
.front-offer-card strong { color: #70492d; }
.offer-delivery, .refund-note { color: var(--front-muted); }
.front-price { margin-block: .75rem; color: #70492d; font: 700 2.35rem/1 var(--serif); }
.front-purchase { width: 100%; min-height: 3.4rem; cursor: pointer; }
.front-purchase:disabled { cursor: default; opacity: .65; }
.front-offer-status { margin-top: .65rem; padding: .7rem .85rem; border-radius: .37rem; background: #eee3ce; color: #594636; font-size: .94rem; }
.refund-note { margin-top: .85rem; font-size: .91rem; }
.refund-note a { text-decoration: underline; text-underline-offset: .19rem; }

.front-faq { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr); gap: 1.5rem clamp(2rem, 9vw, 7rem); padding-block: clamp(2.8rem, 6.5vw, 5.5rem); }
.discovery .faq-list p { color: var(--front-muted); }
.front-footer { border-top: 1px solid var(--front-line); background: #f0efe6; }
.front-footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.5rem; min-height: 6rem; padding-block: 1.2rem; }
.front-footer-inner .front-wordmark { margin-right: auto; }
.front-footer-inner > a:not(.front-wordmark) { color: var(--front-muted); font-size: .91rem; }
.discovery :is(.front-hero, .front-offer-section) :focus-visible { outline-color: var(--front-gold); }

@media (max-width: 62rem) {
  .front-tools { gap: .85rem; }
  .front-hero { min-height: 0; }
  .hero-book-collage { width: min(82%, 14rem); }
  .author-shelf { grid-auto-columns: calc((100% - 3 * var(--shelf-gap)) / 4); }
}
@media (max-width: 46rem) {
  .front-wrap { width: min(100% - 2rem, 37rem); }
  .front-tools { min-height: 0; grid-template-columns: auto 1fr auto; column-gap: .65rem; row-gap: .7rem; padding-block: .8rem; }
  .front-wordmark { font-size: 1.1rem; }
  .front-search { grid-row: 2; grid-column: 1 / -1; }
  .my-library { grid-column: 3; }
  .header-offer { display: none; }
  .front-nav-links { gap: clamp(.65rem, 2.7vw, 1.15rem); scrollbar-width: none; }
  .front-nav a { font-size: .88rem; }
  .front-hero { grid-template-columns: minmax(0, 1fr); margin-top: .9rem; }
  .front-hero-copy { padding: 1.65rem 1.3rem 1.4rem; }
  .front-hero h1 { max-width: 12em; font-size: clamp(2.65rem, 10vw, 4.1rem); }
  .hero-description { margin-top: .7rem; }
  .hero-actions { margin-top: 1rem; }
  .hero-books { padding: 1rem .95rem 1.4rem; }
  .hero-book-collage { grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(94%, 26rem); gap: .34rem; padding-block: .55rem; }
  .hero-book-collage .cover-habitos { transform: rotate(-8deg); }
  .hero-book-collage .cover-dinero { transform: translateY(.22rem) rotate(3deg); }
  .hero-book-collage .cover-soledad { transform: translateY(-.13rem) rotate(-4deg); }
  .hero-book-collage .cover-principito { transform: translateY(.15rem) rotate(7deg); }
  .hero-books figcaption { bottom: .35rem; font-size: .75rem; }
  .book-discovery .shelf-heading {
    flex-direction: column; align-items: stretch; gap: .7rem; margin-bottom: .65rem;
  }
  .book-discovery .shelf-heading h2 { font-size: clamp(1.9rem, 7.2vw, 2.85rem); line-height: 1.1; }
  .book-discovery .shelf-controls { align-self: flex-end; }
  .book-shelf { grid-auto-columns: clamp(8.5rem, 46%, 12rem); --shelf-gap: .7rem; }
  .author-shelf { grid-auto-columns: clamp(8.5rem, 43%, 12rem); }
  .shelf-card img, .cover-placeholder { width: min(100%, 7.25rem); }
  .shelf-controls { gap: .3rem; }
  .shelf-controls button { width: 2.45rem; height: 2.45rem; }
  .book-discovery .shelf-controls button { width: 2.75rem; height: 2.75rem; }
  .audio-layout, .front-offer, .front-faq { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 24rem) {
  .front-hero-copy { padding-inline: 1rem; }
  .hero-actions .front-button { min-height: 2.85rem; padding-inline: .8rem; font-size: .9rem; }
  .shelf-heading { align-items: start; }
  .shelf-heading h2 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .front-button { transition: none; }
}
