/*
 * Yalowi — sección «Costa Rica» (guías e historias)
 * Páginas propias, ligeras (sin Nicepage), con la paleta y las fuentes de la web.
 * Fuentes: Open Sans y Roboto autoalojadas (../Inicio-fonts.css) + Playfair Display cursiva para «Costa Rica».
 */

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/playfair-display-700-italic-latin.woff2') format('woff2');
}

:root {
  --green-950: #0b2a23;
  --green-900: #123f36;
  --green-700: #2d574d;
  --green-500: #316659;
  --cream: #fff8ea;
  --cream-2: #fbf1dc;
  --mint: #eaf6f1;
  --accent: #f1c50e;
  --accent-soft: #fdf3c7;
  --ink: #1a2420;
  --muted: #55645f;
  --line: #e4e0d4;
  --white: #fff;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18, 63, 54, 0.06), 0 14px 34px -18px rgba(18, 63, 54, 0.35);
  --head: 'Roboto', 'Open Sans', system-ui, sans-serif;
  --body: 'Open Sans', system-ui, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --reading: 19px;
  --header-h: 0px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 72px); }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img:not(.u-header img) { display: block; max-width: 100%; height: auto; }
a:not(.u-header a) { color: var(--green-700); font-size: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--accent); color: var(--green-950); font-weight: 700; border-radius: 999px; }
.skip:focus { top: 12px; }
.shell { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* «Costa Rica» destacado (misma regla que el resto de la web) */
strong.yd-cr { font-family: var(--serif); font-style: italic; font-weight: 700; color: inherit; letter-spacing: 0.005em; }
.on-dark strong.yd-cr, .cr-hero strong.yd-cr, .cta-band strong.yd-cr { color: var(--accent); }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgba(18, 63, 54, 0.08);
}
.site-header .shell { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.logo img { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  padding: 8px 14px; border-radius: 999px;
  color: var(--ink); font: 600 15px/1 var(--head); text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav a:hover { background: var(--mint); color: var(--green-900); }
.nav a[aria-current="page"] { color: var(--green-900); background: var(--mint); }
.nav .nav-cta { margin-left: 8px; padding: 12px 20px; background: var(--accent); color: var(--green-950); }
.nav .nav-cta:hover { background: #ffd633; color: var(--green-950); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--mint); color: var(--green-900); font-size: 22px; cursor: pointer; }

/* ---------- Portada de la sección ---------- */
.cr-hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(78vh, 720px);
  display: flex; align-items: flex-end;
  color: var(--white);
}
.cr-hero > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.cr-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, rgba(8, 28, 23, 0.88) 0%, rgba(8, 28, 23, 0.45) 45%, rgba(8, 28, 23, 0.1) 75%),
    linear-gradient(90deg, rgba(8, 28, 23, 0.55) 0%, rgba(8, 28, 23, 0) 60%);
}
.cr-hero .shell { padding: 120px 0 72px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 14px; color: var(--green-500);
  font: 700 12px/1.2 var(--head); letter-spacing: 0.16em; text-transform: uppercase;
}
.eyebrow::before { content: ''; width: 28px; height: 3px; border-radius: 3px; background: var(--accent); }
.on-dark .eyebrow, .eyebrow.on-dark { color: rgba(255, 255, 255, 0.85); }
.cr-hero h1 {
  margin: 0 0 18px;
  font: italic 700 clamp(3.2rem, 2rem + 6vw, 7rem)/0.95 var(--serif);
  color: var(--accent);
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}
.cr-hero .lead { max-width: 620px; margin: 0 0 28px; font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem); line-height: 1.55; color: rgba(255, 255, 255, 0.92); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 0;
  font: 700 16px/1 var(--head); text-decoration: none; cursor: pointer;
  transition: background-color 0.25s ease, translate 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
a.btn.btn-primary, .btn-primary { background: var(--accent); color: var(--green-950); }
a.btn.btn-primary:hover, .btn-primary:hover { background: #ffd633; translate: 0 -2px; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5); }
a.btn.btn-ghost, .btn-ghost { background: rgba(255, 255, 255, 0.12); color: var(--white); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8); }
a.btn.btn-ghost:hover, .btn-ghost:hover { background: var(--white); color: var(--green-950); }
a.btn.btn-dark, .btn-dark { background: var(--green-900); color: var(--white); }
a.btn.btn-dark:hover, .btn-dark:hover { background: var(--green-700); translate: 0 -2px; }

/* ---------- Destacado ---------- */
.featured { margin-top: clamp(40px, 5vw, 64px); position: relative; z-index: 2; }
.featured a {
  display: grid; grid-template-columns: 1.15fr 1fr; overflow: hidden;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
}
.featured .ph { position: relative; min-height: 360px; overflow: hidden; }
.featured .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 0.8s var(--ease); }
.featured a:hover .ph img { scale: 1.04; }
.featured .tx { padding: clamp(28px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; }
.featured h2 { margin: 0 0 14px; font: 700 clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem)/1.12 var(--head); color: var(--green-900); }
.featured p { margin: 0 0 22px; color: var(--muted); font-size: 1.05rem; }

/* ---------- Colección ---------- */
.collection { padding: clamp(64px, 8vw, 104px) 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; font: 700 clamp(1.9rem, 1.3rem + 2vw, 2.8rem)/1.1 var(--head); color: var(--green-900); }
.section-head p { max-width: 460px; margin: 0; color: var(--muted); }

.controls {
  position: sticky; top: var(--header-h); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 -8px 32px; padding: 12px 8px;
  background: rgba(255, 248, 234, 0.94); backdrop-filter: blur(8px);
}
.search {
  flex: 1 1 240px; min-height: 46px; padding: 0 18px 0 44px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--white) no-repeat 16px 50% / 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355645f' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  font: 15px var(--body); color: var(--ink);
}
.search:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(49, 102, 89, 0.18); }
.filter {
  min-height: 42px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); color: var(--green-900);
  font: 600 14px/1 var(--head); cursor: pointer; transition: all 0.2s ease;
}
.filter:hover { border-color: var(--green-500); }
.filter[aria-pressed="true"] { background: var(--green-900); border-color: var(--green-900); color: var(--white); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
/* Colección: filas de 2 · 3 · 3 · 2 (las dos primeras y las dos últimas guías, más anchas) */
.grid[data-collection] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid[data-collection] .card { grid-column: span 2; }
.grid[data-collection] .card:nth-child(-n+2),
.grid[data-collection] .card:nth-child(n+9) { grid-column: span 3; }
.grid[data-collection] .card:nth-child(-n+2) .ph,
.grid[data-collection] .card:nth-child(n+9) .ph { aspect-ratio: 16 / 9; }
.card a {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  color: inherit; text-decoration: none;
  transition: translate 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card a:hover { translate: 0 -6px; box-shadow: 0 1px 2px rgba(18, 63, 54, 0.06), 0 24px 44px -20px rgba(18, 63, 54, 0.45); }
.card .ph { aspect-ratio: 4 / 3; overflow: hidden; background: var(--mint); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.7s var(--ease); }
.card a:hover .ph img { scale: 1.05; }
.card .tx { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.tag {
  align-self: flex-start; margin-bottom: 12px; padding: 5px 11px; border-radius: 999px;
  background: var(--mint); color: var(--green-700); font: 700 11px/1 var(--head); letter-spacing: 0.08em; text-transform: uppercase;
}
.card h3 { margin: 0 0 10px; font: 700 1.3rem/1.25 var(--head); color: var(--green-900); }
.card p { margin: 0 0 18px; color: var(--muted); font-size: 0.97rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--green-700); font: 700 14px/1 var(--head); }
.more::after { content: '→'; transition: translate 0.25s var(--ease); }
a:hover .more::after { translate: 4px 0; }
.meta-line { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }
.no-results { display: none; padding: 40px 0; text-align: center; color: var(--muted); }

/* ---------- Banda de llamada a la acción ---------- */
.cta-band { background: var(--green-900); color: var(--white); }
.cta-band .shell { display: grid; grid-template-columns: 1.3fr auto; align-items: center; gap: 24px 48px; padding: clamp(48px, 6vw, 80px) 0; }
.cta-band h2 { margin: 0 0 10px; font: 700 clamp(1.8rem, 1.2rem + 2vw, 2.6rem)/1.12 var(--head); }
.cta-band p { margin: 0; max-width: 620px; color: rgba(255, 255, 255, 0.85); font-size: 1.08rem; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Artículo ---------- */
.progress { position: fixed; top: 0; left: 0; z-index: 60; height: 3px; width: 0; background: var(--accent); }
.article-head { padding: clamp(40px, 6vw, 72px) 0 28px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; font-size: 0.9rem; color: var(--muted); }
.crumbs a { color: var(--green-700); text-decoration: none; font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.article-head h1 {
  max-width: 900px; margin: 0 0 18px;
  font: 700 clamp(2.1rem, 1.4rem + 2.8vw, 3.6rem)/1.08 var(--head); color: var(--green-900); letter-spacing: -0.01em;
}
.deck { max-width: 780px; margin: 0 0 22px; color: var(--muted); font-size: clamp(1.08rem, 1rem + 0.35vw, 1.28rem); line-height: 1.6; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.article-meta span { padding: 6px 12px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); color: var(--green-700); font: 600 13px/1 var(--head); }

.hero-figure { margin: 0 auto; }
.hero-figure img { width: 100%; max-height: 640px; object-fit: cover; border-radius: var(--radius); }
.hero-figure figcaption, .story-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 0.86rem; }
.story-figure figcaption span { margin-left: 6px; opacity: 0.8; }

.tools {
  position: sticky; top: var(--header-h); z-index: 30;
  margin: 28px 0 0; background: rgba(255, 248, 234, 0.95); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.tools .shell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.tools-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tool {
  min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--white); color: var(--green-900);
  font: 600 13px/1 var(--head); cursor: pointer;
}
.tool:hover { border-color: var(--green-500); }
.tool.primary { background: var(--green-900); border-color: var(--green-900); color: var(--white); }
.tool:disabled { opacity: 0.5; cursor: not-allowed; }
.listen-status { color: var(--muted); font-size: 0.85rem; }

.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding: 48px 0 24px; }
.toc { position: sticky; top: calc(var(--header-h) + 76px); align-self: start; max-height: calc(100vh - var(--header-h) - 100px); overflow: auto; padding-right: 8px; }
.toc .label { margin-bottom: 12px; color: var(--green-900); font: 700 12px/1 var(--head); letter-spacing: 0.14em; text-transform: uppercase; }
.toc a {
  display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--line);
  color: var(--muted); font-size: 0.9rem; line-height: 1.35; text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.toc a:hover { color: var(--green-900); }
.toc a.is-active { color: var(--green-900); border-left-color: var(--accent); font-weight: 600; }
.toc-mobile { display: none; margin-bottom: 28px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.toc-mobile summary { padding: 14px 18px; cursor: pointer; font: 700 15px var(--head); color: var(--green-900); }
.toc-mobile nav { padding: 0 18px 14px; }
.toc-mobile a { display: block; padding: 7px 0; color: var(--green-700); text-decoration: none; border-top: 1px solid var(--line); font-size: 0.95rem; }

.prose { width: 100%; min-width: 0; max-width: 720px; font-size: var(--reading); line-height: 1.75; color: #24302b; }
.prose > p { margin: 0 0 1.05em; }
.prose h2 {
  margin: 2.1em 0 0.6em; padding-top: 0.2em;
  font: 700 clamp(1.5rem, 1.2rem + 0.9vw, 1.95rem)/1.2 var(--head); color: var(--green-900);
}
.prose h3 { margin: 1.7em 0 0.5em; font: 700 1.22em/1.3 var(--head); color: var(--green-700); }
.prose .sci-name { margin-top: -0.35em; color: var(--muted); font-size: 0.95em; }
.prose ul, .prose ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--green-700); font-weight: 700; }
.prose .detail-label { margin-bottom: 0.5em; color: var(--green-900); font-weight: 600; }
.prose table { width: 100%; margin: 1.4em 0; border-collapse: collapse; font-size: 0.9em; background: var(--white); border-radius: var(--radius-sm); overflow: hidden; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--mint); color: var(--green-900); }
.prose .story-figure { margin: 2em 0; }
.prose .story-figure img { width: 100%; border-radius: var(--radius); }
.prose .story-figure.wide { margin-left: 0; margin-right: clamp(-140px, -10vw, 0px); }
.prose .brand-ending { margin-top: 2em; font: italic 700 1.15em var(--serif); color: var(--green-900); }

/* Consejo YALOWI */
.prose .tip {
  position: relative; margin: 1.8em 0; padding: 22px 24px 22px 60px;
  border-radius: var(--radius-sm); background: var(--accent-soft); border-left: 4px solid var(--accent);
  font-size: 0.95em;
}
.prose .tip::before {
  content: ''; position: absolute; left: 20px; top: 22px; width: 24px; height: 24px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123f36' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.3 1 2.3h6c0-1 .4-1.8 1-2.3A7 7 0 0 0 12 2z'/%3E%3C/svg%3E");
}
.prose .tip span { display: block; margin-bottom: 6px; color: var(--green-900); font: 700 12px/1 var(--head); letter-spacing: 0.14em; }
.prose .tip p { margin: 0; color: #2c3833; }

/* Tablas anchas: desplazamiento horizontal en móvil */
.prose .table-scroll { overflow-x: auto; margin: 1.4em 0; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.prose .table-scroll table { margin: 0; min-width: 560px; }

/* Pausa visual interactiva */
.reveal-moment {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 2.4em clamp(-140px, -10vw, 0px) 2.4em 0; min-height: 380px; border-radius: var(--radius);
  display: flex; align-items: flex-end; background: var(--green-900); color: var(--white);
}
.reveal-photo { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: 0.35; scale: 1.06; transition: opacity 0.9s var(--ease), scale 1.4s var(--ease); }
.reveal-moment::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 28, 23, 0.85), rgba(8, 28, 23, 0.2)); }
.reveal-inner { padding: clamp(24px, 4vw, 44px); transition: translate 0.8s var(--ease); }
.reveal-label { display: block; margin-bottom: 10px; color: var(--accent); font: 700 12px/1 var(--head); letter-spacing: 0.14em; text-transform: uppercase; }
.reveal-moment h2 { margin: 0 0 10px; font: 700 clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem)/1.15 var(--head); color: var(--white); }
.reveal-moment h2 em { font-family: var(--serif); color: var(--accent); }
.reveal-moment p { margin: 0 0 16px; color: rgba(255, 255, 255, 0.85); font-size: 1rem; }
.reveal-toggle { min-height: 42px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--white); color: var(--green-900); font: 700 14px var(--head); cursor: pointer; }
@media (hover: hover) {
  .reveal-moment:hover .reveal-photo { opacity: 1; scale: 1; }
  .reveal-moment:hover .reveal-inner { translate: 0 8px; }
}
.reveal-moment.is-active .reveal-photo { opacity: 1; scale: 1; }

/* Preguntas frecuentes */
.faq-list { margin-top: 3em; padding-top: 0.5em; }
.faq-list details { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); margin-bottom: 10px; }
.faq-list summary { position: relative; padding: 16px 48px 16px 20px; cursor: pointer; list-style: none; font: 700 1rem/1.4 var(--head); color: var(--green-900); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 18px; top: 50%; translate: 0 -50%; font-size: 1.4rem; color: var(--green-500); transition: rotate 0.25s ease; }
.faq-list details[open] summary::after { rotate: 45deg; }
.faq-list details p { margin: 0; padding: 0 20px 18px; font-size: 0.95em; }

.article-cta { margin-top: 56px; }
.article-cta .box { padding: clamp(32px, 5vw, 56px); border-radius: var(--radius); background: var(--green-900); color: var(--white); text-align: center; }
.article-cta h2 { margin: 0 0 12px; font: 700 clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem)/1.15 var(--head); }
.article-cta h2 em { font-family: var(--serif); color: var(--accent); }
.article-cta p { max-width: 640px; margin: 0 auto 24px; color: rgba(255, 255, 255, 0.86); }
.article-cta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.related { padding: 72px 0 96px; }
.related-title { margin: 0 0 28px; font: 700 clamp(1.7rem, 1.2rem + 1.5vw, 2.3rem)/1.15 var(--head); color: var(--green-900); }
.related .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; }
.pager a { color: var(--green-700); font-weight: 700; text-decoration: none; }
.pager a:hover { text-decoration: underline; }

/* ---------- Pie ---------- */
.site-footer { background: var(--green-950); color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; }
.site-footer .shell { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 32px 48px; padding: 64px 0 40px; }
.site-footer h3 { margin: 0 0 14px; color: var(--white); font: 700 1rem var(--head); }
.site-footer p { margin: 0; max-width: 420px; line-height: 1.7; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .bottom { display: block; padding: 20px 0 28px; border-top: 1px solid rgba(255, 255, 255, 0.12); text-align: center; font-size: 0.88rem; }

/* Botones flotantes */
.wa-float, .backtop {
  position: fixed; right: 24px; z-index: 40;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.45); border: 0; cursor: pointer;
}
.wa-float { bottom: 24px; background: #25d366; color: var(--white); }
.wa-float svg { width: 26px; height: 26px; fill: currentColor; }
.backtop { bottom: 24px; background: var(--white); color: var(--green-900); font-size: 20px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.backtop.visible { opacity: 1; pointer-events: auto; }

/* ---------- Adaptación ---------- */
@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .toc-mobile { display: block; }
  .prose { margin-inline: auto; }
  .prose .story-figure.wide, .reveal-moment { margin-inline: 0; }
  .grid, .grid[data-collection] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid[data-collection] .card,
  .grid[data-collection] .card:nth-child(-n+2),
  .grid[data-collection] .card:nth-child(n+9) { grid-column: auto; }
}
@media (max-width: 860px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 20px;
    background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -20px rgba(0, 0, 0, 0.3);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 16px; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
  .featured a { grid-template-columns: 1fr; }
  .featured .ph { min-height: 260px; }
  .cta-band .shell { grid-template-columns: 1fr; }
  .site-footer .shell { grid-template-columns: 1fr 1fr; }
  .site-footer .shell > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  :root { --reading: 17.5px; }
  .logo img { width: 124px; }
  .grid, .related .grid, .grid[data-collection] { grid-template-columns: minmax(0, 1fr); }
  .cr-hero { min-height: 560px; }
  .cr-hero .shell { padding: 96px 0 72px; }
  .controls { position: static; }
  .tools .listen-status { display: none; }
  .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
  .backtop { right: 16px; bottom: 16px; width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .card a:hover, .btn:hover { translate: none; }
}
@media print {
  .site-header, .tools, .toc, .toc-mobile, .wa-float, .backtop, .related, .article-cta, .site-footer { display: none !important; }
  .prose { max-width: none; }
}

/* Cabecera compartida con la portada (Nicepage): mismo fondo blanco */
body > header.u-header { background-color: #fff; color: #111; font: 400 16px/1.6 "Open Sans", sans-serif; }

/* Con índice lateral y poco ancho: las imágenes anchas no sobresalen por la derecha */
@media (min-width: 1101px) and (max-width: 1240px) {
  .prose .story-figure.wide, .reveal-moment { margin-right: 0; }
}

/* ---------- CTA: halo verde (hover, teclado y pulsación táctil) ----------
 * Misma regla que yalowi-dynamic.css; se repite aquí porque en esta sección
 * yalowi-dynamic.css va dentro de @layer y los estilos propios lo taparían.
 */
:root { --cta-glow: 145, 198, 76; } /* #91C64C, verde hierba */

body :is(a.btn.btn-primary, a.btn.btn-ghost, a.btn.btn-dark, a.pill.light, a.pill.ghost, a.pill.solid, a.whatsapp-btn) {
  --cta-ring: 0 0 #0000;
  transition-property: box-shadow, background-color, color, border-color, translate, transform;
  transition-duration: 0.3s;
  transition-timing-function: ease;
  -webkit-tap-highlight-color: transparent;
}
body :is(a.btn.btn-ghost) { --cta-ring: inset 0 0 0 2px rgba(255, 255, 255, 0.8); }

@media (hover: hover) {
  body :is(a.btn.btn-primary, a.btn.btn-ghost, a.btn.btn-dark, a.pill.light, a.pill.ghost, a.pill.solid, a.whatsapp-btn):hover {
    box-shadow: 0 0 30px rgba(var(--cta-glow), 0.85);
  }
}
body :is(a.btn.btn-primary, a.btn.btn-ghost, a.btn.btn-dark, a.pill.light, a.pill.ghost, a.pill.solid, a.whatsapp-btn):focus-visible {
  outline: 2px solid rgb(var(--cta-glow));
  outline-offset: 4px;
  box-shadow: var(--cta-ring), 0 0 30px rgba(var(--cta-glow), 0.85);
}
body :is(a.btn.btn-primary, a.btn.btn-ghost, a.btn.btn-dark, a.pill.light, a.pill.ghost, a.pill.solid, a.whatsapp-btn):active {
  box-shadow: var(--cta-ring), 0 0 15px rgba(var(--cta-glow), 0.7);
  transition-duration: 0s;
}
@media (prefers-reduced-motion: reduce) {
  body :is(a.btn.btn-primary, a.btn.btn-ghost, a.btn.btn-dark, a.pill.light, a.pill.ghost, a.pill.solid, a.whatsapp-btn) { transition: none; }
}
