/* Hay Buenas Noticias — Diseño v2 (handoff "Portada", 2026-09-28). Tokens del handoff; Roboto autoalojada.
   Sobre Bootstrap 5.3 (subconjunto). Las clases se comparten entre portada, fichas, listados y páginas. */
:root {
  --bg: #FBF9F4;
  --paper: #FDFBF8;
  --sand-50: #FAF8F1;
  --sand-200: #EFE8D6;
  --sand-300: #EAE1CB;
  --olive-100: #E3E5CA;
  --olive-150: #DCE1C2;
  --olive-200: #CFD6AE;
  --olive-300: #A3A68A;
  --olive-500: #5F6E3A;
  --olive-600: #4C5A2F;
  --olive-700: #55603D;
  --olive-800: #3E4A26;
  --olive-900: #353D27;
  --ink: #2C3220;
  --text-muted: #545A48;
  --meta: #6B6C5A;
  --line: #E3E1D6;
  --smile: #EDD68F;
  --sun: #A87B14;            /* soles del felicitómetro (contraste AA sobre papel) */
  --radius: 4px;
  --shadow-nav: 0 2px 6px rgba(47, 53, 35, .06);
  font-size: 16px;
}
:root.font-lg body { zoom: 1.15; }

/* Tema claro siempre (paleta por defecto): no se sigue el modo oscuro del sistema ni el oscurecimiento automático de
   navegadores y apps de correo. El tema oscuro queda disponible solo de forma explícita con data-theme="dark". */
:root:not([data-theme="dark"]) { color-scheme: only light; }
:root[data-theme="dark"] {
  --bg: #1C2016; --paper: #22271B; --sand-50: #F4F1E6; --sand-200: #2E3424; --sand-300: #353C29; --olive-100: #2E3522; --olive-150: #343C26;
  --olive-200: #56603D; --olive-600: #B9C68E; --olive-500: #6E7F44; --ink: #EDEBDF; --text-muted: #C9C8B8; --meta: #AEAD9C;
  --line: #3A4030; --sun: #EDD68F;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Roboto, 'Roboto Fallback', Arial, sans-serif;
  -webkit-font-smoothing: antialiased; line-height: 1.5; }
h1, h2, h3, h4 { font-family: inherit; color: var(--ink); text-wrap: pretty; }
a { color: var(--olive-600); text-decoration: none; }
a:hover { color: var(--olive-900); text-decoration: underline; }
/* Enlaces dentro de un párrafo: subrayados para distinguirlos sin depender del color (WCAG 1.4.1) */
p a:not(.pill):not(.chip):not(.value), .prose li a, figcaption a { text-decoration: underline; }
.muted { color: var(--meta); }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.skip { position: absolute; left: 1rem; top: .5rem; z-index: 100; background: var(--smile); color: var(--olive-900); padding: .5rem 1rem; }
button { font-family: inherit; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--olive-900); color: var(--sand-50); font-size: 13px; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.topbar__links { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.topbar a, .topbar .link-button { color: #FAF8F1; }
.topbar a.is-home { font-weight: 500; }
.topbar__social { display: flex; gap: 6px; }
.topbar__social a { width: 24px; height: 24px; border-radius: 50%; background: #55603D; color: #FAF8F1;
  display: flex; align-items: center; justify-content: center; }
.topbar__social svg { width: 13px; height: 13px; fill: currentColor; }
.topbar__social a:hover { background: #5F6E3A; text-decoration: none; }

/* ---------- Cabecera ---------- */
.masthead { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; flex-direction: column; gap: 2px; text-decoration: none !important; }
.logotype { display: flex; align-items: center; font-size: 36px; line-height: 1; font-weight: 900; letter-spacing: -.025em; color: #353D27; }
.logotype .b { color: #5F7A34; }
.logotype svg { flex: none; width: .78em; height: .78em; margin: 5px 1px 0; }
.brand__tag { font-size: 12px; letter-spacing: .04em; color: var(--meta); }
.addsite { flex: 0 1 728px; min-width: 260px; min-height: 90px; border-radius: 6px; background: var(--olive-100); border: 1px solid var(--olive-200);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 22px; }
.addsite__eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--olive-600); }
.addsite__title { display: block; font-size: 19px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.pill { border: 0; cursor: pointer; padding: 11px 20px; border-radius: 999px; background: #4C5A2F; color: #FAF8F1;
  font-size: 14px; font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; text-decoration: none; }
.pill:hover { background: #353D27; color: #FAF8F1; text-decoration: none; }
.pill--dark { background: #353D27; }
.pill--dark:hover { background: #4C5A2F; }
.pill--ghost { background: transparent; color: var(--olive-600); border: 1px solid var(--olive-300); }
.pill--ghost:hover { background: var(--olive-100); color: var(--ink); }

/* ---------- Navegación de categorías (sticky) ---------- */
.catnav { position: sticky; top: 0; z-index: 30; background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-nav); }
.catnav .wrap { display: flex; align-items: stretch; gap: 4px; }
.catnav__list { display: flex; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.catnav__list::-webkit-scrollbar { display: none; }
.catnav a, .catnav summary { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; padding: 15px 12px 13px;
  color: var(--ink); white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; min-height: 48px; display: flex; align-items: center; }
.catnav a:hover, .catnav summary:hover { color: var(--olive-600); text-decoration: none; }
.catnav a.is-active { color: var(--olive-600); border-bottom-color: var(--olive-500); }
.catnav__more { position: relative; flex: none; }
.catnav__more summary { list-style: none; cursor: pointer; }
.catnav__more summary::-webkit-details-marker { display: none; }
.catnav__panel { position: absolute; right: 0; top: 100%; z-index: 40; width: min(92vw, 34rem); background: var(--paper); border: 1px solid var(--line);
  border-radius: 0 0 6px 6px; box-shadow: 0 12px 28px rgba(30, 35, 20, .16); padding: 14px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 2px 14px; }
.catnav__panel h2 { grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--olive-600); margin: 8px 0 2px; }
.catnav .catnav__panel a { text-transform: none; font-weight: 500; font-size: 14px; letter-spacing: 0; padding: 7px 0; min-height: 36px; border: 0; }
.catnav__search { display: flex; align-items: center; }
.catnav__search form { display: flex; align-items: center; gap: 6px; }
.catnav__search input { width: 11rem; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font-size: 14px; background: var(--bg); color: var(--ink); }
.catnav__search button { border: 0; background: none; color: var(--ink); padding: 8px; cursor: pointer; }
.catnav__search svg { width: 18px; height: 18px; }

main.wrap { padding-top: 20px; padding-bottom: 40px; }

/* ---------- Contador "Llevamos X historias que alegran" ---------- */
.topbar__count { font-weight: 700; color: #EDD68F !important; white-space: nowrap; }
.topbar__count:hover { text-decoration: underline; }
.counter { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.counter__n { display: none; }
.counter__txt { font-size: 20px; color: var(--ink); }
.counter__txt strong { font-weight: 900; font-size: 26px; color: var(--olive-600); letter-spacing: -.01em; }
html[data-palette="sol"] .topbar__count { color: #FFDE21 !important; }
html[data-palette="sol"] .counter__txt strong { color: #221D05; background: #FFDE21; padding: 0 8px; border-radius: 4px; }

/* ---------- Franja "Buena noticia de hoy" ---------- */
.ticker { display: flex; align-items: center; background: var(--sand-200); border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.ticker__label { flex: none; background: #5F6E3A; color: #FAF8F1; font-size: 13px; font-weight: 700; padding: 8px 14px; }
.ticker__item { flex: 1; min-width: 0; padding: 0 14px; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticker__item[hidden] { display: none; }
.ticker__nav { flex: none; display: flex; }
.ticker__nav button { border: 0; background: none; color: var(--ink); font-size: 18px; width: 36px; height: 36px; cursor: pointer; }

/* ---------- Mosaico de portada ---------- */
.mosaic { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 4px; }
.mosaic__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; }
.tile { position: relative; display: block; min-height: 198px; overflow: hidden; color: #FAF8F1; background: #55603D; text-decoration: none !important; }
.tile--main { min-height: 400px; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover img { transform: scale(1.03); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(35, 40, 25, .92) 0%, rgba(35, 40, 25, .55) 35%, rgba(35, 40, 25, 0) 65%); }
.tile__body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tile--main .tile__body { padding: 22px; gap: 10px; }
.tile__title { margin: 0; color: #FAF8F1; font-size: 16px; line-height: 1.25; font-weight: 700; }
.tile--main .tile__title { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.tile__meta { font-size: 13px; color: #EDEBDF; }
.tile__meta strong { font-weight: 700; }
.tile .photo-credit { z-index: 3; top: 8px; bottom: auto; right: 8px; }
.slides { position: relative; min-height: 400px; }
.slides .tile { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.slides .tile.is-active { opacity: 1; pointer-events: auto; }
.slides__dots { position: absolute; top: 14px; left: 16px; z-index: 5; display: flex; gap: 2px; }
.slides__dots button { width: 24px; height: 24px; border: 0; padding: 7px; background: none; cursor: pointer; }
.slides__dots button::before { content: ""; display: block; width: 10px; height: 10px; border-radius: 50%; background: rgba(250, 248, 241, .5); }
.slides__dots button.is-active::before { background: #FAF8F1; }

/* Chips y etiquetas */
.chip { align-self: flex-start; display: inline-block; background: #CFD6AE; color: #3E4A26; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 2px; text-decoration: none; line-height: 1.5; }
.chip:hover { text-decoration: none; background: #DCE1C2; color: #353D27; }
.tile .chip { font-size: 10px; }
.tile--main .chip { font-size: 11px; }
.chip--region { background: var(--sand-200); color: var(--text-muted); }
.chip--lang { background: #4C5A2F; color: #FAF8F1; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.values { display: flex; gap: 2px 10px; flex-wrap: wrap; }
.value { font-size: 12px; color: var(--olive-600); font-weight: 500; text-decoration: none; }
.value:hover { color: var(--ink); text-decoration: underline; }
.value--lg { font-size: 14px; padding: 4px 12px; border: 1px solid var(--olive-300); border-radius: 999px; }
.happy { margin: 0; font-size: 12px; font-weight: 500; color: var(--text-muted); }
.suns { color: var(--sun); letter-spacing: 1px; }
.suns__off { opacity: .3; }
.photo-credit { position: absolute; right: 6px; bottom: 6px; z-index: 2; font-size: 10px; font-weight: 500; color: #fff; background: rgba(0, 0, 0, .6);
  padding: 1px 6px; border-radius: 2px; max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Cuerpo: columna principal + barra lateral ---------- */
.layout { display: flex; flex-wrap: wrap; gap: 36px; padding-top: 22px; }
.layout__main { flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.layout__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.sec-head { border-bottom: 2px solid #5F6E3A; display: flex; justify-content: space-between; align-items: flex-end; margin: 0 0 16px; }
.sec-head h2, .sec-head .sec-head__tab { margin: 0; background: #5F6E3A; color: #FAF8F1; font-size: 14px; font-weight: 700; padding: 6px 14px; }
.sec-head a.more { font-size: 13px; font-weight: 500; padding-bottom: 4px; }
.side-head { font-size: 16px; font-weight: 700; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }

/* Bloque destacado (patrón "Comunidad") */
.feature { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.story__img { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--olive-150); border-radius: 2px; }
.story__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story__title { margin: 12px 0 6px; font-size: 22px; line-height: 1.25; font-weight: 700; }
.story__title a, .mini__title a, .line__title a, .world__title a, .rank__title a { color: var(--ink); }
.story__title a:hover, .mini__title a:hover, .line__title a:hover, .world__title a:hover, .rank__title a:hover { color: var(--olive-600); }
.story__meta, .mini__meta { font-size: 12px; color: var(--meta); display: flex; gap: 6px; flex-wrap: wrap; }
.story__meta .src, .mini__meta .src { color: var(--olive-600); font-weight: 500; }
.story__dek { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 8px 0 0; }
.minis { display: flex; flex-direction: column; gap: 14px; }
.mini { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; }
.mini__img { position: relative; display: block; width: 112px; height: 74px; overflow: hidden; background: var(--olive-150); border-radius: 2px; }
.mini__img img { width: 100%; height: 100%; object-fit: cover; }
.mini__title { margin: 0 0 4px; font-size: 15px; line-height: 1.3; font-weight: 500; }
.duo { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; }
.duo .story__title { font-size: 19px; }
.lines { list-style: none; margin: 10px 0 0; padding: 0; }
.lines li { border-top: 1px solid var(--line); padding: 10px 0; }
.line__title { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.35; }
.world { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 18px; }
.world__img { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--sand-300); border-radius: 2px; }
.world__img img { width: 100%; height: 100%; object-fit: cover; }
.world__country { display: block; margin-top: 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--olive-600); }
.world__title { margin: 4px 0 0; font-size: 15px; font-weight: 500; line-height: 1.3; }

/* Barra lateral */
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.social-grid a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 3px; color: #fff; font-size: 13px; font-weight: 500; text-decoration: none; }
.social-grid a:hover { filter: brightness(1.1); text-decoration: none; color: #fff; }
.social-grid svg { width: 16px; height: 16px; fill: currentColor; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: 34px 1fr; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rank__n { font-size: 22px; font-weight: 300; color: var(--olive-300); line-height: 1.1; }
.rank__title { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.35; }
.rank__note { font-size: 12px; color: var(--meta); margin: -6px 0 4px; }
.newsletter { background: var(--olive-100); border-radius: 4px; padding: 22px; }
.newsletter h2 { font-size: 18px; margin: 0 0 6px; }
.newsletter p { font-size: 14px; color: var(--text-muted); margin: 0 0 14px; }
.newsletter form { display: grid; gap: 10px; }
.field { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--paper); color: var(--ink); font-size: 15px; font-family: inherit; }
.field:focus, .catnav__search input:focus { outline: 2px solid var(--olive-500); outline-offset: 1px; }
.aboutbox { border: 1px solid var(--line); border-radius: 4px; padding: 20px; }
.aboutbox h2 { font-size: 16px; margin: 0 0 8px; }
.aboutbox p { font-size: 14px; color: var(--text-muted); margin: 0 0 10px; line-height: 1.6; }
.aboutbox a { font-weight: 700; font-size: 14px; }
.box { background: var(--olive-100); border-radius: 4px; padding: 20px; }
.digest { padding-left: 1.2rem; margin: 0; }
.digest li { margin-bottom: .6rem; font-size: 14px; }
.region-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: 14px; }

/* ---------- Tarjeta genérica (listados, relacionadas) ---------- */
.news-card { background: var(--paper); border: 1px solid var(--line); border-radius: 3px; overflow: hidden; display: flex; flex-direction: column; }
.row > [class*="col-"] > .news-card:not(.news-card--big) { height: 100%; }
.news-card > * { min-width: 0; }
.news-card__img { position: relative; display: block; }
.news-card__img img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--olive-150); }
.news-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.news-card__title { font-size: 17px; line-height: 1.3; font-weight: 700; margin: 0; }
.news-card--big .news-card__title { font-size: 24px; }
.news-card__title a { color: var(--ink); }
.news-card__title a:hover { color: var(--olive-600); }
.news-card__why { margin: 0; font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.news-card__meta { margin: auto 0 0; font-size: 12px; color: var(--meta); display: flex; gap: 8px; flex-wrap: wrap; }
.source-badge { color: var(--olive-600); font-weight: 500; }

/* ---------- Páginas internas ---------- */
.page-title { font-size: clamp(26px, 4vw, 34px); font-weight: 900; letter-spacing: -.015em; margin: 0 0 8px; }
.lead { font-size: 17px; color: var(--text-muted); }
.crumbs { font-size: 13px; margin-bottom: 14px; color: var(--meta); }
.ficha__title { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; font-weight: 900; letter-spacing: -.015em; margin: 8px 0 16px; }
.ficha__photo { margin: 0 0 16px; }
.ficha__photo img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 3px; background: var(--olive-150); }
.ficha__photo figcaption { font-size: 12px; color: var(--meta); margin-top: 6px; }
.source-box { border-left: 4px solid #5F6E3A; padding: 10px 16px; background: var(--olive-100); border-radius: 0 4px 4px 0; margin-bottom: 18px; }
.source-box .muted { color: var(--text-muted); }
.happy-box { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; padding: 8px 14px; border-radius: 999px;
  background: var(--sand-200); color: var(--ink); text-decoration: none; font-size: 14px; }
.happy-box:hover { background: var(--sand-300); color: var(--ink); text-decoration: none; }
.happy-box .suns { font-size: 17px; }
.happy-box__label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--olive-600); }
.readers { margin: 0 0 22px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.readers__title { font-size: 16px; margin: 0 0 10px; }
.readers__faces { display: flex; flex-wrap: wrap; gap: 8px; }
.readers__faces button { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; min-height: 64px; padding: 8px 6px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); cursor: pointer; font-family: inherit; }
.readers__faces button span { font-size: 26px; line-height: 1; }
.readers__faces button small { font-size: 11px; color: var(--text-muted); }
.readers__faces button:hover { border-color: var(--olive-300); }
.readers__faces button[aria-pressed="true"] { border: 2px solid var(--ink); background: var(--olive-100); }
.readers__result { margin: 10px 0 0; font-size: 14px; color: var(--text-muted); }
.happy--readers { color: var(--olive-600); }
.why { margin-bottom: 20px; }
.why h2 { font-size: 17px; color: var(--olive-600); margin: 0 0 6px; }
.why p { font-size: 18px; line-height: 1.6; margin: 0; }
.share-msg { display: block; margin-top: 6px; color: var(--text-muted); }
/* Compartir: botones con ícono y color de cada red */
.share--box { margin-top: 1.5rem; padding: 1rem 1.25rem; border-radius: .75rem; background: var(--sand-50, #FFFBEA); border: 2px solid var(--smile); }
.share__head { margin: 0 0 .75rem; font-size: 1.05rem; }
.share__row { display: flex; flex-wrap: wrap; gap: .5rem; }
.share__btn { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border-radius: 999px; border: 0;
  font: 600 .9rem/1 inherit; color: #fff; text-decoration: none; cursor: pointer; transition: transform .12s, filter .12s; }
.share__btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.share__btn:hover, .share__btn:focus-visible { transform: translateY(-1px); filter: brightness(1.08); color: #fff; }
.share__btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.share__btn.is-whatsapp { background: #1F8A4C; }
.share__btn.is-facebook { background: #1864D6; }
.share__btn.is-x { background: #111; }
.share__btn.is-linkedin { background: #0A66C2; }
.share__btn.is-telegram { background: #1D86C4; }
.share__btn.is-instagram { background: linear-gradient(45deg, #F09433, #DC2743 50%, #BC1888); }
.share__btn.is-link, .share__btn.is-native { background: var(--smile); color: #221D05; }
.share__btn.is-link:hover, .share__btn.is-native:hover { color: #221D05; }
.share--compact { margin: .75rem 0 1rem; }
.share--compact .share__btn { padding: .5rem; }
.share--compact .share__btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.share--compact .share__btn.is-native span { position: static; width: auto; height: auto; clip: auto; }
.share--compact .share__btn.is-native { padding: .5rem .9rem; }
.prose { max-width: 44rem; }
.prose table { display: block; overflow-x: auto; max-width: 100%; }
.prose td, .prose th { min-width: 7rem; }
.prose h2 { font-size: 20px; margin-top: 28px; }
.empty { text-align: center; padding: 4rem 1rem; }
.btn { min-height: 44px; }
.btn-mar, .btn-sol { background: #4C5A2F; color: #FAF8F1; border: 0; font-weight: 700; border-radius: 999px; padding: 10px 20px; }
.btn-mar:hover, .btn-sol:hover { background: #353D27; color: #FAF8F1; }
.link-button { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }
.channel-card { display: block; height: 100%; padding: 18px; border-radius: 4px; background: var(--olive-100); color: var(--ink); text-decoration: none; border-top: 4px solid #5F6E3A; }
.channel-card:hover { background: var(--olive-150); color: var(--ink); text-decoration: none; }
.channel-card h2 { font-size: 18px; margin: 0 0 6px; }
.channel-card p { margin: 0 0 8px; font-size: 14px; color: var(--text-muted); }
.channel-card .n { font-size: 12px; color: var(--meta); }
.channels-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.channels-strip a { padding: 8px 14px; border-radius: 999px; background: var(--olive-100); border: 1px solid var(--olive-200); color: var(--ink);
  font-weight: 500; font-size: 14px; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; }
.channels-strip a:hover { background: #4C5A2F; color: #FAF8F1; text-decoration: none; }
.table { color: var(--ink); }

/* ---------- Pie ---------- */
.site-footer { background: #353D27; color: #D9D7C8; margin-top: 20px; }
.site-footer .wrap { padding-top: 28px; padding-bottom: 28px; }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
.site-footer .logotype { font-size: 24px; color: #FAF8F1; }
.site-footer .logotype .b { color: #EDD68F; }
.site-footer p { font-size: 13px; line-height: 1.6; max-width: 34rem; margin: 8px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.site-footer a, .site-footer .link-button { color: #EDEBDF; }
.site-footer a:hover { color: #EDD68F; }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 18px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(250, 248, 241, .12); font-size: 13px; }
.site-version { display: inline-block; margin-left: 8px; opacity: .75; font-variant-numeric: tabular-nums; }
.site-footer__cols h2 { color: #FAF8F1; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.site-footer__cols ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.site-footer__cols li { margin-bottom: 2px; }
.site-footer__cols li a, .site-footer__cols .link-button { display: inline-block; padding: 5px 0; }

/* ---------- Modal "Agrega tu sitio" ---------- */
.modal-hbn { position: fixed; inset: 0; z-index: 60; background: rgba(35, 40, 25, .55); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal-hbn[hidden] { display: none; }
.modal-hbn__panel { position: relative; width: 100%; max-width: 520px; background: var(--paper); border-radius: 8px; padding: 28px; box-shadow: 0 20px 50px rgba(30, 35, 20, .3); }
.modal-hbn__close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--sand-200); color: var(--ink); font-size: 20px; cursor: pointer; }
.modal-hbn h2 { font-size: 22px; margin: 0 0 6px; }
.modal-hbn p { font-size: 14px; color: var(--text-muted); margin: 0 0 16px; }
.modal-hbn form { display: grid; gap: 12px; }
.modal-hbn label { display: grid; gap: 5px; font-size: 13px; font-weight: 500; }
.modal-hbn .pill { width: 100%; margin-top: 4px; }
.success { background: var(--olive-100); border-radius: 4px; padding: 16px; font-size: 15px; }

/* ---------- Aviso de cookies ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 40rem; margin: 0 auto; background: var(--paper); color: var(--ink);
  border: 1px solid var(--olive-300); border-radius: 6px; padding: 16px 18px; box-shadow: 0 10px 30px rgba(30, 35, 20, .2); font-size: 14px; }
.consent p { margin: 0 0 10px; }
.consent[hidden] { display: none; }
.consent .pill { min-height: 40px; padding: 8px 18px; }

@media (max-width: 640px) {
  .logotype { font-size: 30px; }
  .addsite__title { font-size: 17px; }
  .tile--main, .slides { min-height: 320px; }
  .mosaic__grid .tile { min-height: 170px; }
  .mosaic__grid .tile__title { font-size: 14px; }
  .catnav__search input { display: none; }
  .ticker__label { font-size: 12px; padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { .slides .tile, .tile img { transition: none; } }

/* ============================================================================================
   PALETA "SOL" (prueba 2026-09-28): amarillo felicidad #FFDE21. Se activa con ?paleta=sol
   (html[data-palette="sol"]); ?paleta=oliva vuelve a la vigente. El amarillo va en fondos, botones
   y acentos con texto casi negro encima (el amarillo sobre blanco no cumple contraste para texto).
   ============================================================================================ */
html[data-palette="sol"] {
  --bg: #FFFDF3; --paper: #FFFFFF; --sand-50: #FFFBEA; --sand-200: #FFF6CC; --sand-300: #FFEFA6;
  --olive-100: #FFF6CC; --olive-150: #FFF0A6; --olive-200: #FFE766; --olive-300: #D9C25A;
  --olive-500: #FFDE21; --olive-600: #7A5F00; --olive-700: #3A3000; --olive-800: #4A3B00; --olive-900: #221D05;
  --ink: #221D05; --text-muted: #4D4527; --meta: #6B6340; --line: #F0E6BD; --smile: #FFDE21; --sun: #B08900;
}
html[data-palette="sol"] .topbar { background: #221D05; }
html[data-palette="sol"] .topbar__social a { background: #3A3000; }
html[data-palette="sol"] .logotype { color: #221D05; }
html[data-palette="sol"] .logotype .b { color: #A07F00; }
html[data-palette="sol"] .logotype svg circle:first-child { fill: #FFDE21; }
html[data-palette="sol"] .addsite { background: #FFF3B0; border-color: #FFE24D; }
html[data-palette="sol"] .pill, html[data-palette="sol"] .btn-mar, html[data-palette="sol"] .btn-sol { background: #FFDE21; color: #221D05; }
html[data-palette="sol"] .pill:hover, html[data-palette="sol"] .btn-mar:hover { background: #F2CC00; color: #221D05; }
html[data-palette="sol"] .pill--dark { background: #221D05; color: #FFDE21; }
html[data-palette="sol"] .pill--dark:hover { background: #3A3000; color: #FFDE21; }
html[data-palette="sol"] .pill--ghost { background: transparent; color: #4A3B00; border-color: #D9C25A; }
html[data-palette="sol"] .catnav a.is-active { color: #221D05; border-bottom: 3px solid #FFDE21; }
html[data-palette="sol"] .catnav a:hover, html[data-palette="sol"] .catnav summary:hover { color: #7A5F00; }
html[data-palette="sol"] .ticker { background: #FFF6CC; }
html[data-palette="sol"] .ticker__label { background: #FFDE21; color: #221D05; }
html[data-palette="sol"] .sec-head { border-bottom-color: #FFDE21; }
html[data-palette="sol"] .sec-head h2, html[data-palette="sol"] .sec-head .sec-head__tab { background: #FFDE21; color: #221D05; }
html[data-palette="sol"] .chip { background: #FFE766; color: #3A3000; }
html[data-palette="sol"] .chip:hover { background: #FFDE21; color: #221D05; }
html[data-palette="sol"] .chip--lang { background: #221D05; color: #FFDE21; }
html[data-palette="sol"] .tile { background: #3A3000; }
html[data-palette="sol"] .tile::after { background: linear-gradient(to top, rgba(34, 29, 5, .92) 0%, rgba(34, 29, 5, .55) 35%, rgba(34, 29, 5, 0) 65%); }
html[data-palette="sol"] .source-box { border-left-color: #FFDE21; background: #FFFBE0; }
html[data-palette="sol"] .newsletter { background: #FFF3B0; }
html[data-palette="sol"] .channel-card { border-top-color: #FFDE21; background: #FFFBE0; }
html[data-palette="sol"] .channels-strip a { background: #FFFBE0; border-color: #FFE766; }
html[data-palette="sol"] .channels-strip a:hover { background: #FFDE21; color: #221D05; }
html[data-palette="sol"] .site-footer { background: #221D05; }
html[data-palette="sol"] .site-footer .logotype { color: #FFFBEA; }
html[data-palette="sol"] .site-footer .logotype .b { color: #FFDE21; }
html[data-palette="sol"] .site-footer a:hover { color: #FFDE21; }
html[data-palette="sol"] .happy-box { background: #FFF3B0; }

/* Archivo por fecha (calendario) */
.cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.cal { border: 1px solid var(--line); border-radius: .75rem; padding: 1rem; background: var(--paper); }
.cal__title { font-size: 1.1rem; margin: 0 0 .75rem; display: flex; justify-content: space-between; align-items: baseline; }
.cal__title small { font-size: .8rem; font-weight: 500; opacity: .7; }
.cal__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: .25rem; text-align: center; }
.cal__dow { font-size: .75rem; font-weight: 600; opacity: .6; }
.cal__day { display: block; padding: .4rem 0; border-radius: .4rem; font-size: .9rem; min-width: 0; }
.cal__day.is-empty { opacity: .35; }
a.cal__day { text-decoration: none; color: var(--ink); font-weight: 600; background: var(--sand-200, #FFF6CC); }
a.cal__day.is-l2 { background: var(--sand-300, #FFEFA6); }
a.cal__day.is-l3 { background: var(--smile); color: #221D05; }
a.cal__day:hover, a.cal__day:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.daynav { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }

/* Nube de conceptos */
.cloud-box { margin-bottom: 2rem; }
.cloud { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: baseline; line-height: 1.3; }
.cloud__w { text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.cloud__w:hover, .cloud__w:focus-visible { text-decoration: underline; text-decoration-color: var(--smile); text-decoration-thickness: 3px; }
.cloud__w.is-l1 { font-size: .85rem; opacity: .7; }
.cloud__w.is-l2 { font-size: 1rem; opacity: .85; }
.cloud__w.is-l3 { font-size: 1.2rem; font-weight: 500; }
.cloud__w.is-l4 { font-size: 1.45rem; font-weight: 600; }
.cloud__w.is-l5 { font-size: 1.75rem; font-weight: 700; }
.cloud-smile svg { width: 100%; height: auto; display: block; max-width: 420px; margin: 0 auto; }
.cloud-smile a text { transition: opacity .12s; }
.cloud-smile a:hover text, .cloud-smile a:focus text { opacity: .7; text-decoration: underline; }
.cloud-smile a:focus { outline: none; }
.cloud-smile a:focus-visible text { outline: 2px solid var(--ink); }
/* Concepto del día y calendario bajo la nube */
.concept-day { display: block; margin: .25rem 0 .75rem; padding: .75rem 1rem; border-radius: .75rem; background: var(--smile); color: #221D05; text-decoration: none; }
.concept-day:hover, .concept-day:focus-visible { filter: brightness(1.04); color: #221D05; }
.concept-day__label { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.concept-day__word { display: block; font-size: 1.6rem; line-height: 1.15; font-weight: 900; }
.concept-day__note { display: block; font-size: .85rem; margin-top: .2rem; }
.minical { margin-top: 1rem; }
.minical__title { font-size: 1rem; margin: 0 0 .5rem; }
.minical__more { margin: .5rem 0 0; font-size: .85rem; }
.cal__day.is-today { box-shadow: inset 0 0 0 2px var(--ink); }

/* Archivo: lista de noticias + columna lateral */
.alist-day { margin-bottom: 1.5rem; }
.alist-day__title { font-size: 1.1rem; margin: 0 0 .5rem; padding-bottom: .35rem; border-bottom: 2px solid var(--smile); display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.alist-day__title a { color: var(--ink); text-decoration: none; }
.alist-day__concept { font-size: .75rem; font-weight: 700; background: var(--smile); color: #221D05; border-radius: 999px; padding: .1rem .6rem; }
.alist-day__more { font-size: .85rem; margin: .25rem 0 0; }
.alist { list-style: none; margin: 0; padding: 0; }
.alist__item { display: grid; grid-template-columns: 96px 1fr; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.alist__img { display: block; position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; background: var(--sand-200, #FFF6CC); }
.alist__img img { width: 100%; height: 100%; object-fit: cover; }
.alist__img .photo-credit { display: none; }
.alist__title { font-size: 1rem; line-height: 1.3; margin: 0 0 .2rem; }
.alist__title a { color: var(--ink); text-decoration: none; }
.alist__title a:hover { text-decoration: underline; }
.alist__meta { font-size: .8rem; color: var(--meta); margin: 0; }
.alist__happy { color: var(--sun); letter-spacing: -1px; }
.side-cal { margin-top: 1.5rem; }
.cal--side { margin-bottom: 1rem; padding: .75rem; }
.cal__day.is-current { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 900; }
/* Tooltip del calendario: concepto del día (n noticias) */
.cal__day[data-tip] { position: relative; }
.cal__day[data-tip]:hover::after, .cal__day[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 20;
  background: #221D05; color: #FFDE21; font-size: .75rem; font-weight: 600; line-height: 1.2; white-space: nowrap;
  padding: .35rem .55rem; border-radius: 6px; pointer-events: none; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.cal__day[data-tip]:hover::before, .cal__day[data-tip]:focus-visible::before {
  content: ""; position: absolute; bottom: calc(100% + 1px); left: 50%; transform: translateX(-50%); z-index: 20;
  border: 5px solid transparent; border-top-color: #221D05; pointer-events: none; }
@media (max-width: 575px) { .alist__item { grid-template-columns: 80px 1fr; } }

/* Contador de visitas (topbar) y lecturas de la noticia */
.topbar__visits { font-size: 13px; white-space: nowrap; }
[data-article-views]:not([hidden])::before { content: " · "; }
