/* ==========================================================================
   Laboratorio DICOFAR — Blog (listado + artículo)
   Requiere assets/styles.css (tokens, header, footer, botones y campos).
   Mobile-first. Puntos de corte: 480 · 672 · 1056 · 1200 (igual que el home).
   ========================================================================== */

:root {
  --measure: 70ch;
  --danger: #c4262e;
  --warn: #8a5300;
  --warn-bg: #fff6e0;
  --warn-line: #efd28f;
  --ok: #1f7a4d;
  --sk: #e9edf3;
  --sticky-gap: 32px;
}

/* ---------------------------------------------------------------- Header */
.nav__link[aria-current="page"],
.nav__link[aria-current="true"] { color: var(--ink); border-bottom-color: var(--blue); }
.drawer__link[aria-current="page"],
.drawer__link[aria-current="true"] { color: var(--blue); font-weight: 600; box-shadow: inset 3px 0 0 var(--blue); }

/* ----------------------------------------------------------- Utilidades */
.text-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; font-size: 14px; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.text-btn:hover { color: var(--blue-800); text-decoration-thickness: 2px; }
.block-title { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--ink); }

/* Categoría (cuadrado de color + nombre en mono) */
.cat { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); line-height: 1.3; }
.cat::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--c, var(--blue)); }
a.cat { min-height: 32px; }
a.cat:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* Avatar con iniciales */
.avatar { --s: 32px; width: var(--s); height: var(--s); flex: none; display: inline-grid; place-items: center; border-radius: 50%; background: var(--av, var(--blue)); color: var(--av-ink, #fff); font-size: calc(var(--s) * 0.36); font-weight: 600; letter-spacing: 0.02em; overflow: hidden; line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.byline { display: flex; align-items: center; gap: 10px; min-width: 0; }
.byline__text { display: grid; gap: 1px; min-width: 0; }
.byline__name { font-size: 14px; color: var(--ink); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.byline__meta, .byline__role { font-size: 13px; color: var(--muted); line-height: 1.35; }
.byline__meta { font-family: var(--mono); font-size: 12px; }
.byline--lg .byline__name { font-size: 15px; font-weight: 600; white-space: normal; }

/* Imágenes con relación fija (sin saltos de diseño) */
.media { position: relative; overflow: hidden; background: var(--blue-100); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.is-broken img { visibility: hidden; }
.media--empty, .media.is-broken { background: var(--navy); }
.media__ph { position: absolute; inset: 0; display: grid; place-items: end start; padding: 16px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: #a9b5cf; }
.media__ph::before { content: ""; position: absolute; left: 16px; top: 16px; width: 10px; height: 10px; background: var(--c, var(--teal)); }

/* Skeleton */
.sk { display: block; background: var(--sk); animation: sk-pulse 1.6s ease-in-out infinite; }
.sk--line { height: 12px; width: 100%; margin-top: 10px; }
.sk--title { height: 22px; width: 92%; margin-top: 12px; }
.sk--h1 { height: 40px; width: 100%; margin-top: 16px; }
@keyframes sk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Migas de pan */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; font-size: 13px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: var(--line-strong); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink-2); }
.crumbs a:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
/* Táctil: 44 px de alto sin cambiar el ritmo vertical (se compensa con márgenes negativos). */
@media (max-width: 1055px) {
  .crumbs a { min-height: 44px; }
  .post-head .crumbs { margin: -6px 0 2px; }
  .post-head a.cat { min-height: 44px; margin-block: -6px; }
}

/* =========================================================================
   LISTADO
   ========================================================================= */

/* Encabezado --------------------------------------------------------------- */
.blog-hero { padding-block: 40px 32px; border-bottom: 1px solid var(--line); }
@media (min-width: 1056px) { .blog-hero { padding-block: 72px 56px; } }
.blog-hero__grid { display: grid; gap: 32px; }
@media (min-width: 1056px) { .blog-hero__grid { grid-template-columns: 7fr 5fr; gap: 64px; align-items: end; } }
.blog-hero__text { display: grid; gap: 20px; }
.blog-hero__title { font-weight: 300; font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.08; letter-spacing: -0.015em; max-width: 16ch; }
.blog-hero .lead { max-width: 58ch; }

.blog-search { display: grid; gap: 10px; min-width: 0; }
.blog-search__label { font-size: 13px; color: var(--ink-2); }
.blog-search__box { position: relative; }
.blog-search__icon { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.blog-search input { width: 100%; min-height: 52px; padding: 12px 52px 12px 46px; background: var(--bg-alt); border: 0; border-bottom: 1px solid var(--ink-2); border-radius: 0; font-size: 16px; appearance: none; -webkit-appearance: none; transition: background-color 110ms; }
.blog-search input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.blog-search input::placeholder { color: #767d8c; }
.blog-search input:focus { outline: 2px solid var(--blue); outline-offset: -2px; background: #fff; }
.blog-search__clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink-2); }
.blog-search__clear:hover { color: var(--ink); background: var(--line); }
.blog-search__clear svg { width: 18px; height: 18px; }

.hot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; }
.hot[hidden] { display: none; }
.hot__label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hot__list { display: flex; flex-wrap: wrap; gap: 0 14px; }
.hot__list a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--blue); }
@media (min-width: 1056px) { .hot__list a { min-height: 36px; } }
.hot__list a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Destacado + más leídos ---------------------------------------------------- */
.blog-top { padding-block: 40px 48px; }
@media (min-width: 1056px) { .blog-top { padding-block: 56px 72px; } }
.blog-top[hidden] { display: none; }
.blog-top__grid { display: grid; gap: 40px; }
@media (min-width: 1056px) { .blog-top__grid { grid-template-columns: 8fr 4fr; gap: 48px; } }

.feature { position: relative; display: grid; }
.feature__media { aspect-ratio: 16 / 9; }
@media (min-width: 1056px) { .feature__media { aspect-ratio: 16 / 8.2; } }
.feature__media img { transition: transform 600ms var(--ease); }
.feature:hover .feature__media img { transform: scale(1.02); }
.feature__body { display: grid; gap: 14px; padding-top: 24px; align-content: start; }
@media (min-width: 672px) { .feature__body { padding-top: 28px; } }
.feature__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.flag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--navy); background: var(--teal); padding: 3px 8px; }
.feature__title { font-weight: 300; font-size: clamp(1.75rem, 3.3vw, 2.625rem); line-height: 1.14; letter-spacing: -0.01em; max-width: 26ch; text-wrap: balance; }
.feature__title a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 250ms var(--ease); }
.feature:hover .feature__title a { background-size: 100% 1px; }
.feature__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.feature__title a:focus-visible { outline: none; }
.feature:focus-within { outline: 2px solid var(--blue); outline-offset: 6px; }
.feature__excerpt { font-size: 1.0625rem; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.feature__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line); }
.feature__meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.feature--skeleton .feature__media { aspect-ratio: 16 / 9; }

.popular--rail { display: none; }
@media (min-width: 1056px) { .popular--rail { display: block; } }
.popular__list { counter-reset: pop; }
.popular__item { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 8px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.popular__item::before { counter-increment: pop; content: counter(pop, decimal-leading-zero); font-family: var(--mono); font-size: 13px; color: var(--blue); padding-top: 2px; }
.popular__item--sk { display: block; }
.popular__item--sk::before { content: none; }
.popular__title { font-size: 1rem; font-weight: 400; line-height: 1.4; }
.popular__title a::after { content: ""; position: absolute; inset: 0; }
.popular__item:hover .popular__title a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.popular__title a:focus-visible { outline: none; }
.popular__item:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.popular__meta { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.popular__empty { padding: 16px 0; color: var(--muted); font-size: 14px; }

/* Barra de filtros (sticky) -------------------------------------------------- */
.results-anchor { height: 0; }
.filterbar { position: sticky; top: var(--header-h); z-index: 30; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: box-shadow 150ms var(--ease); }
.filterbar.is-stuck { box-shadow: 0 10px 20px -16px rgba(14, 26, 51, 0.45); }
.filterbar__inner { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.cats { flex: 1 1 auto; min-width: 0; align-self: stretch; display: flex; }
.cats__list { position: relative; display: flex; align-items: center; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding-block: 10px; margin-left: calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: 8px; scroll-padding-inline: var(--gutter); }
.cats__list::-webkit-scrollbar { display: none; }
.cats__list > li { flex: none; }
.fchip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); background: #fff; font-size: 14px; color: var(--ink-2); white-space: nowrap; transition: background-color 110ms, border-color 110ms, color 110ms; }
@media (min-width: 1056px) { .fchip { min-height: 40px; } }
.fchip:hover { border-color: var(--ink-2); color: var(--ink); }
.fchip__dot { width: 8px; height: 8px; background: var(--c, var(--blue)); flex: none; }
.fchip__n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.fchip[aria-current="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.fchip[aria-current="true"] .fchip__n { color: #a9b5cf; }
.fchip[aria-current="true"] .fchip__dot { outline: 1px solid rgba(255, 255, 255, 0.5); }

.filterbar__tools { flex: none; display: flex; align-items: center; gap: 12px; padding-left: 12px; border-left: 1px solid var(--line); align-self: stretch; }
.sort { display: none; align-items: center; gap: 10px; }
@media (min-width: 672px) { .sort--inline { display: flex; } }
.sort__label { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.sort__select { min-height: 40px; padding: 0 36px 0 12px; border: 0; border-bottom: 1px solid var(--ink-2); border-radius: 0; background: var(--bg-alt) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 11 3 6l.7-.7L8 9.6l4.3-4.3L13 6z' fill='%23141821'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; font-size: 14px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.sort__select:focus { outline: 2px solid var(--blue); outline-offset: -2px; }

.tool-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); background: #fff; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
@media (min-width: 1056px) { .tool-btn { min-height: 40px; } }
.tool-btn:hover { border-color: var(--ink-2); color: var(--ink); }
.tool-btn[aria-expanded="true"] { background: var(--bg-alt); border-color: var(--ink-2); color: var(--ink); }
.tool-btn svg { width: 18px; height: 18px; }
.tool-btn__l--d { display: none; }
@media (min-width: 672px) { .tool-btn__l--m { display: none; } .tool-btn__l--d { display: inline; } }
.tool-btn__badge { min-width: 20px; height: 20px; padding: 0 5px; display: inline-grid; place-items: center; background: var(--blue); color: #fff; font-family: var(--mono); font-size: 11px; }
.tool-btn__badge[hidden] { display: none; }

.filterbar__panel { border-top: 1px solid var(--line); background: #fff; max-height: calc(100vh - var(--header-h) - 80px); max-height: calc(100dvh - var(--header-h) - 80px); overflow-y: auto; overscroll-behavior: contain; }
.filterbar__panel[hidden] { display: none; }
/* Celular: el panel termina arriba de la barra inferior de contacto (antes quedaba tapado). */
@media (max-width: 671px) { .filterbar__panel { max-height: calc(100dvh - var(--header-h) - 66px - var(--actionbar-h) - var(--safe-b)); } }
/* Categorías desplazables: el borde derecho se desvanece para indicar que hay más. */
@media (max-width: 1055px) {
  .cats__list { padding-right: 28px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
}
/* Pantallas bajas (celular apaisado): la barra no se fija para no comerse la mitad de la vista. */
@media (max-height: 520px) { .filterbar { position: relative; } }
.panel__inner { display: grid; gap: 20px; padding-block: 16px 20px; }
.panel__group { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.panel__group--sort { display: grid; }
@media (min-width: 672px) { .panel__group--sort { display: none; } }
.panel__legend { padding: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.panel__options { display: flex; flex-wrap: wrap; gap: 8px; }

.rchip { position: relative; }
.rchip input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.rchip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); font-size: 14px; background: #fff; }
.rchip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.rchip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

.tchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; background: var(--bg-alt); border: 1px solid transparent; font-size: 14px; color: var(--ink-2); text-align: left; }
@media (min-width: 1056px) { .tchip { min-height: 36px; } }
.tchip:hover { border-color: var(--line-strong); color: var(--ink); }
.tchip__n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tchip[aria-pressed="true"], .tchip[aria-current="true"] { background: var(--blue); color: #fff; }
.tchip[aria-pressed="true"] .tchip__n, .tchip[aria-current="true"] .tchip__n { color: var(--blue-100); }

/* Resultados ------------------------------------------------------------------ */
.results { padding-block: 40px 64px; }
@media (min-width: 1056px) { .results { padding-block: 56px 96px; } }
.results__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.results__heading { display: grid; gap: 8px; min-width: 0; }
.results__title { font-weight: 300; font-size: clamp(1.75rem, 3vw, 2.375rem); line-height: 1.15; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.results__title:focus { outline: none; }
.results__title:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
.results__desc { color: var(--muted); font-size: 15px; max-width: 70ch; }
.results__count { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.results__body { transition: opacity 150ms var(--ease); }
.results__body.is-loading { opacity: 0.45; pointer-events: none; }

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 0; margin-bottom: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.active-filters[hidden] { display: none; }
.active-filters__label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.active-filters__list { display: flex; flex-wrap: wrap; gap: 8px; }
.afchip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 8px 0 12px; background: var(--blue-50); color: var(--blue-800); font-size: 14px; border: 1px solid var(--blue-100); max-width: 100%; }
@media (max-width: 1055px) { .afchip { min-height: 44px; } }
.afchip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.afchip svg { width: 16px; height: 16px; flex: none; }
.afchip:hover { background: var(--blue-100); }

/* Grilla y tarjetas --------------------------------------------------------------- */
.post-grid { display: grid; gap: 40px; }
@media (min-width: 672px) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; } }
@media (min-width: 1056px) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; } }
.post-grid > li { display: flex; min-width: 0; }

.pcard { position: relative; display: flex; flex-direction: column; width: 100%; min-width: 0; }
.pcard__media { aspect-ratio: 16 / 9; margin-bottom: 20px; }
.pcard__media img { transition: transform 500ms var(--ease); }
.pcard:hover .pcard__media img { transform: scale(1.03); }
.pcard__body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.pcard__title { font-size: 1.25rem; line-height: 1.35; font-weight: 400; letter-spacing: -0.005em; overflow-wrap: break-word; }
.pcard__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard__title a:focus-visible { outline: none; }
@media (hover: hover) { .pcard:hover .pcard__title a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; } }
.pcard:focus-within { outline: 2px solid var(--blue); outline-offset: 6px; }
.pcard__excerpt { font-size: 15px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.pcard__body > .pcard__excerpt + .pcard__foot { margin-top: auto; }
.pcard__body .pcard__foot { margin-top: auto; }
.pcard__spacer { flex: 1; min-height: 6px; }
.pcard--skeleton .pcard__media { margin-bottom: 20px; }

.pstats { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pstats li { display: inline-flex; align-items: center; gap: 5px; }
.pstats svg { width: 15px; height: 15px; flex: none; }

/* Paginación ------------------------------------------------------------------------ */
.pager { margin-top: 56px; display: flex; justify-content: center; }
.pager[hidden] { display: none; }
.pager__list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
.pager__num, .pager__step, .pager__gap { min-width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: var(--ink-2); border-bottom: 2px solid transparent; }
@media (min-width: 1056px) { .pager__num, .pager__step, .pager__gap { min-width: 48px; height: 48px; } }
.pager__num { font-family: var(--mono); font-size: 14px; }
.pager__num:hover, .pager__step:hover { background: var(--bg-alt); color: var(--ink); }
.pager__num[aria-current="page"] { color: var(--ink); border-bottom-color: var(--blue); font-weight: 600; background: var(--blue-50); }
.pager__step { padding: 0 12px; }
.pager__step svg { width: 18px; height: 18px; }
.pager__step.is-disabled { color: var(--line-strong); cursor: default; background: none; }
.pager__gap { color: var(--muted); }
@media (max-width: 479px) { .pager__step span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } .pager__step { padding: 0; } }

/* Estados vacío / error -------------------------------------------------------------- */
.state { background: var(--bg-alt); padding: 32px 20px; display: grid; gap: 16px; justify-items: start; border-top: 3px solid var(--line-strong); }
@media (min-width: 672px) { .state { padding: 48px 40px; } }
.state--error { border-top-color: var(--danger); }
.state__icon { width: 28px; height: 28px; color: var(--muted); }
.state--error .state__icon { color: var(--danger); }
.state__title { font-size: clamp(1.25rem, 2.2vw, 1.625rem); font-weight: 400; line-height: 1.3; overflow-wrap: anywhere; }
.state__text { color: var(--ink-2); max-width: 62ch; }
.state__tips { display: grid; gap: 6px; color: var(--ink-2); font-size: 15px; }
.state__tips li { position: relative; padding-left: 18px; }
.state__tips li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; background: var(--blue); }
.state__tips a, .state__text a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.state__cats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.state__cats-label { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 4px; }

/* Bloques inferiores ------------------------------------------------------------------ */
.extras { display: grid; gap: 24px; }
@media (min-width: 672px) { .extras { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1056px) { .extras { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } .extras > .extra--popular { display: none; } }
.extra[hidden] { display: none !important; }
.extra { background: #fff; padding: 28px 24px 32px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 672px) { .extra { padding: 32px; } }
.extra__title { font-weight: 300; font-size: clamp(1.5rem, 2.4vw, 1.875rem); line-height: 1.2; letter-spacing: -0.005em; }
.extra__text { font-size: 15px; color: var(--ink-2); }
.extra__actions { display: grid; gap: 16px; justify-items: start; margin-top: auto; padding-top: 8px; }
.extra__actions .link, .related__head .link { min-height: 44px; }
.extra--cta { border-top: 3px solid var(--blue); }
.extra--popular .popular__list, .extra--tags .tagcloud { margin-top: 4px; }
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }

/* Newsletter (tarjeta navy) */
.nl-card { background: var(--navy); color: #fff; }
.nl-card .eyebrow { color: #a9b5cf; }
.nl-card .extra__text { color: #c9d2e6; }
.nl-form { display: grid; gap: 10px; margin-top: auto; }
.nl-form__label { font-size: 13px; color: #c9d2e6; }
.nl-form__row { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-form__row input { flex: 1 1 200px; min-width: 0; min-height: 52px; padding: 12px 14px; border: 0; border-bottom: 1px solid #8391ad; border-radius: 0; background: #fff; color: var(--ink); font-size: 16px; appearance: none; -webkit-appearance: none; }
.nl-form__row input:focus { outline: 2px solid var(--teal); outline-offset: 2px; }
.nl-form__row input[aria-invalid="true"] { outline: 2px solid #ff8389; outline-offset: 2px; }
.nl-form__row .btn { flex: 1 1 auto; gap: 16px; }
@media (min-width: 480px) { .nl-form__row .btn { flex: 0 0 auto; } }
.nl-form__legal { font-size: 12.5px; color: #a9b5cf; line-height: 1.5; }
.nl-form .newsletter__msg { font-size: 14px; min-height: 0; color: #c9d2e6; }
.nl-form .newsletter__msg:empty { display: none; }
.nl-form .newsletter__msg.is-error { color: #ffb3b8; }
.nl-form .newsletter__msg.is-success { color: var(--teal); }
.nl-form.is-done .nl-form__row, .nl-form.is-done .nl-form__legal { display: none; }
.nl-form .btn.is-loading { opacity: 0.7; cursor: progress; }

/* =========================================================================
   ARTÍCULO
   ========================================================================= */
.read-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); }
.read-progress.is-off { display: none; }

.preview-bar { background: var(--warn-bg); border-bottom: 1px solid var(--warn-line); color: #4a3200; }
.preview-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-block: 12px; font-size: 14px; }
.preview-bar__inner p { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.preview-bar__inner svg { width: 18px; height: 18px; flex: none; }
.preview-bar__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: #4a3200; text-decoration: underline; text-underline-offset: 3px; }

/* Grilla del artículo: [compartir] [contenido] [índice] */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1056px) {
  .post-layout { grid-template-columns: 56px minmax(0, 1fr) 240px; column-gap: 40px; }
  .post-layout--head > * { grid-column: 2 / 4; }
}
@media (min-width: 1200px) { .post-layout { grid-template-columns: 64px minmax(0, 1fr) 272px; column-gap: 56px; } }

.post-head { padding-block: 24px 32px; }
@media (min-width: 1056px) { .post-head { padding-block: 40px 48px; } }
.post-head__inner { display: grid; gap: 16px; justify-items: start; max-width: 900px; min-width: 0; }
.post-head .crumbs { margin-bottom: 8px; }
.post-title { font-weight: 300; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.1; letter-spacing: -0.015em; overflow-wrap: break-word; hyphens: manual; text-wrap: balance; }
.post-dek { font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.post-meta { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.post-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.post-facts li { display: inline-flex; align-items: center; gap: 6px; }
.post-facts svg { width: 15px; height: 15px; flex: none; }
.post-facts__k { color: var(--ink-2); }

.post-cover { margin-bottom: 40px; }
@media (min-width: 1056px) { .post-cover { margin-bottom: 64px; } }
.post-cover__img { aspect-ratio: 3 / 2; }
@media (min-width: 672px) { .post-cover__img { aspect-ratio: 2 / 1; } }
@media (min-width: 1056px) { .post-cover__img { aspect-ratio: 21 / 9; } }

.post-body { padding-bottom: 64px; }
@media (min-width: 1056px) { .post-body { padding-bottom: 96px; } }
.post-main { min-width: 0; }

/* Barra lateral de compartir (escritorio) */
.post-rail { display: none; }
@media (min-width: 1056px) { .post-rail { display: block; } }
.post-rail__inner { position: sticky; top: calc(var(--header-h) + var(--sticky-gap)); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rail-btn { position: relative; width: 48px; height: 48px; display: grid; place-items: center; color: var(--ink-2); transition: background-color 110ms, color 110ms; }
.rail-btn:hover { background: var(--bg-alt); color: var(--blue); }
.rail-btn svg { width: 20px; height: 20px; }
.rail-btn--count { height: auto; min-height: 56px; padding: 8px 0; gap: 2px; }
.rail-btn__n { font-family: var(--mono); font-size: 12px; color: var(--muted); line-height: 1; }
.rail-sep { width: 24px; height: 1px; background: var(--line); margin: 8px 0; }
.rail-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.rail-btn[data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 8px); top: 50%; transform: translate(-4px, -50%); background: var(--navy); color: #fff; font-size: 13px; line-height: 1.2; padding: 7px 10px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 120ms, transform 120ms; z-index: 5; }
.rail-btn[data-tip]:hover::after, .rail-btn[data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

/* Me gusta */
.like { --heart-fill: none; color: var(--ink-2); }
.like svg { transition: transform 200ms var(--ease); }
.like[aria-pressed="true"] { --heart-fill: currentColor; color: var(--danger); }
.like[aria-pressed="true"] .rail-btn__n, .like[aria-pressed="true"] .like__n { color: var(--danger); }
.like:disabled { opacity: 0.5; cursor: not-allowed; }
.like.is-pop svg { animation: like-pop 360ms var(--ease); }
@keyframes like-pop { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 70% { transform: scale(0.94); } 100% { transform: scale(1); } }

/* Índice (TOC) */
.post-toc { display: none; }
@media (min-width: 1056px) { .post-toc { display: block; } }
.toc { position: sticky; top: calc(var(--header-h) + var(--sticky-gap)); max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding-bottom: 8px; }
.toc__nav[hidden] { display: none; }
.toc__title { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc__list { border-left: 1px solid var(--line); }
.toc__link { display: block; margin-left: -1px; padding: 7px 0 7px 16px; border-left: 2px solid transparent; font-size: 14px; line-height: 1.4; color: var(--muted); transition: color 110ms, border-color 110ms; }
.toc__link:hover { color: var(--ink); }
.toc__link.is-active { color: var(--ink); border-left-color: var(--blue); font-weight: 600; }
.toc__sub .toc__link { padding-left: 30px; font-size: 13.5px; }
.toc__cta { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.toc__cta p { font-size: 14px; color: var(--ink-2); }
.toc__cta .link { font-size: 14px; }

.toc-m { border: 1px solid var(--line); margin-bottom: 32px; background: #fff; }
.toc-m[hidden] { display: none; }
@media (min-width: 1056px) { .toc-m { display: none; } }
.toc-m summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; cursor: pointer; }
.toc-m summary::-webkit-details-marker { display: none; }
.toc-m summary > svg { width: 18px; height: 18px; flex: none; color: var(--blue); }
.toc-m__label { display: grid; gap: 2px; flex: 1; min-width: 0; }
.toc-m__title { font-size: 15px; font-weight: 600; }
.toc-m__current { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toc-m__chev { transition: transform 150ms var(--ease); color: var(--ink-2) !important; }
.toc-m[open] .toc-m__chev { transform: rotate(180deg); }
.toc-m .toc__list { margin: 0 16px 16px; }
.toc-m .toc__link { padding-block: 11px; font-size: 15px; }
.toc-m .toc__sub .toc__link { font-size: 14px; }

/* Contenido editorial ------------------------------------------------------------ */
.prose { max-width: var(--measure); font-size: 17px; line-height: 1.7; color: var(--ink); overflow-wrap: break-word; }
@media (min-width: 672px) { .prose { font-size: 18px; } }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 1.25em; }
.prose h2 { position: relative; font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 400; line-height: 1.25; letter-spacing: -0.005em; margin: 2.2em 0 0.75em; padding-top: 20px; scroll-margin-top: 16px; }
.prose h2::before { content: ""; position: absolute; left: 0; top: 0; width: 32px; height: 2px; background: var(--blue); }
.prose h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.35; margin: 1.9em 0 0.6em; scroll-margin-top: 16px; }
.prose h4 { font-size: 1.0625rem; font-weight: 600; margin: 1.6em 0 0.5em; }
.prose h2:focus, .prose h3:focus { outline: none; }
.prose a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--blue-800); text-decoration-thickness: 2px; }
.prose strong, .prose b { font-weight: 600; }
.prose ul, .prose ol { margin: 0 0 1.4em; padding: 0; }
.prose li { position: relative; padding-left: 28px; margin-bottom: 0.5em; }
.prose ul > li::before { content: ""; position: absolute; left: 6px; top: 0.72em; width: 6px; height: 6px; background: var(--blue); }
.prose ol { counter-reset: li; }
.prose ol > li { counter-increment: li; padding-left: 40px; }
.prose ol > li::before { content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: 0.2em; font-family: var(--mono); font-size: 0.78em; color: var(--blue); }
.prose li > ul, .prose li > ol { margin: 0.5em 0 0; }
.prose blockquote { margin: 2em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--teal); font-size: 1.25em; font-weight: 300; line-height: 1.5; color: var(--ink); }
.prose blockquote p { margin-bottom: 0.6em; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose blockquote cite, .prose blockquote footer { display: block; margin-top: 12px; font-family: var(--mono); font-size: 13px; font-style: normal; font-weight: 400; color: var(--muted); }
.prose figure { margin: 2.2em 0; }
.prose img { width: 100%; height: auto; max-height: min(80vh, 760px); object-fit: cover; background: var(--blue-100); }
.prose figcaption { margin-top: 10px; font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 3em 0; }
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--bg-alt); padding: 2px 6px; }
.prose pre { font-family: var(--mono); font-size: 14px; line-height: 1.6; background: var(--navy); color: #e6ebf5; padding: 20px; overflow-x: auto; margin: 0 0 1.6em; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose mark { background: #fff1b8; color: inherit; padding: 0 2px; }
.prose small { font-size: 0.85em; color: var(--muted); }
.prose abbr[title] { text-decoration: underline dotted; cursor: help; }
.prose sup, .prose sub { font-size: 0.72em; line-height: 0; }
.prose dl { margin: 0 0 1.4em; }
.prose dt { font-weight: 600; }
.prose dd { margin: 0 0 0.8em; color: var(--ink-2); }
.prose .lead { font-size: 1.15em; color: var(--ink-2); }

/* Tablas: siempre dentro de un contenedor desplazable */
.table-wrap { margin: 2em 0; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); }
.table-wrap:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.prose table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.prose caption { caption-side: top; text-align: left; padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.prose th { text-align: left; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-2); background: var(--bg-alt); padding: 12px 14px; border-bottom: 1px solid var(--line-strong); vertical-align: bottom; }
.prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody th { background: none; text-transform: none; font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ink); }

/* Recuadros */
.prose aside, .prose .callout { margin: 2em 0; padding: 20px 24px; background: var(--blue-50); border-left: 3px solid var(--blue); font-size: 16px; line-height: 1.6; }
.prose aside > :last-child, .prose .callout > :last-child { margin-bottom: 0; }
.prose aside p, .prose .callout p { margin-bottom: 0.6em; }
.prose aside > strong:first-child, .prose .callout > strong:first-child { display: block; font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.05em; text-transform: uppercase; color: var(--blue-800); margin-bottom: 8px; }
.prose .callout--warning, .prose .warning { background: var(--warn-bg); border-left-color: #c27803; }
.prose .callout--warning > strong:first-child, .prose .warning > strong:first-child { color: var(--warn); }
.prose .callout--tip, .prose .tip, .prose .callout--success { background: #e7f8f7; border-left-color: var(--teal-700); }
.prose .callout--tip > strong:first-child, .prose .tip > strong:first-child { color: #075e5c; }

/* Bloque CTA que inserta el editor del CRM: <aside class="callout is-cta"><p><strong>Título</strong></p><p>Texto</p><p><a>Acción</a></p></aside> */
.prose aside.is-cta { padding: 24px 20px; background: var(--bg-alt); border-left: 0; border-top: 3px solid var(--blue); }
@media (min-width: 672px) { .prose aside.is-cta { padding: 28px 32px 32px; } }
.prose aside.is-cta > p:first-child > strong:only-child { display: block; font-size: 1.25rem; font-weight: 400; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.prose aside.is-cta p { color: var(--ink-2); }
.prose aside.is-cta p:last-child { margin: 20px 0 0; }
.prose aside.is-cta a { display: inline-flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 52px; max-width: 100%; padding: 12px 16px 12px 18px; background: var(--blue); color: #fff; font-size: 15px; line-height: 1.25; text-decoration: none; transition: background-color 110ms var(--ease); }
.prose aside.is-cta a::after { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M11.8 4.3 10.7 5.4l3.8 3.8H3v1.6h11.5l-3.8 3.8 1.1 1.1L17.5 10z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M11.8 4.3 10.7 5.4l3.8 3.8H3v1.6h11.5l-3.8 3.8 1.1 1.1L17.5 10z'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 150ms var(--ease); }
.prose aside.is-cta a:hover { background: var(--blue-700); color: #fff; text-decoration: none; }
.prose aside.is-cta a:hover::after { transform: translateX(3px); }
.prose aside.is-cta a:active { background: var(--blue-800); }
.prose aside.is-cta a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 479px) { .prose aside.is-cta a { width: 100%; } }

/* Video embebido */
.embed { position: relative; aspect-ratio: 16 / 9; margin: 2em 0; background: var(--navy); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Pie del artículo ------------------------------------------------------------------- */
.post-foot { max-width: var(--measure); margin-top: 48px; display: grid; gap: 40px; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-tags__label { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 4px; }

.useful { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding-block: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.useful__q { font-size: 17px; }
.useful__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.like-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); font-size: 15px; background: #fff; }
.like-btn:hover:not(:disabled) { border-color: var(--danger); }
.like-btn[aria-pressed="true"] { border-color: var(--danger); background: #fdf1f2; }
.like-btn svg { width: 20px; height: 20px; }
.like__n { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.share-row { display: flex; align-items: center; gap: 2px; }
.share-row__label { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 8px; }
.share-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink-2); }
.share-btn:hover { background: var(--bg-alt); color: var(--blue); }
.share-btn svg { width: 20px; height: 20px; }
.share-btn.is-done { color: var(--ok); }

.author-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 20px; padding: 24px; background: var(--bg-alt); }
@media (min-width: 672px) { .author-box { padding: 32px; gap: 20px 24px; } }
.author-box__kicker { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.author-box__name { font-size: 1.25rem; font-weight: 400; margin-top: 4px; }
.author-box__role { font-size: 14px; color: var(--muted); }
.author-box__bio { grid-column: 1 / -1; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
@media (min-width: 672px) { .author-box__bio { grid-column: 2; } }

.post-cta { background: var(--navy); color: #fff; padding: 32px 24px; display: grid; gap: 16px; position: relative; overflow: hidden; }
@media (min-width: 672px) { .post-cta { padding: 40px; } }
.post-cta::before { content: ""; position: absolute; left: 0; top: 0; width: 64px; height: 3px; background: var(--teal); }
.post-cta .eyebrow { color: #a9b5cf; }
.post-cta__title { font-weight: 300; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; }
.post-cta p { color: #c9d2e6; font-size: 15.5px; max-width: 56ch; }
.post-cta .btn-row { margin-top: 8px; }
.btn--outline-light { border-color: rgba(255, 255, 255, 0.5); color: #fff; background: transparent; }
.btn--outline-light:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; }

.post-nav { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (min-width: 672px) { .post-nav { grid-template-columns: 1fr 1fr; } }
.post-nav__item { background: #fff; padding: 20px; display: grid; gap: 8px; min-height: 112px; align-content: start; transition: background-color 110ms; }
.post-nav__item:hover { background: var(--bg-alt); }
@media (min-width: 672px) { .post-nav__item--next { text-align: right; justify-items: end; } }
.post-nav__k { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.post-nav__k svg { width: 16px; height: 16px; color: var(--blue); }
.post-nav__t { font-size: 16px; line-height: 1.4; color: var(--ink); }
.post-nav__item:hover .post-nav__t { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post-nav__empty { background: #fff; display: none; }
@media (min-width: 672px) { .post-nav__empty { display: block; } }

/* Comentarios ------------------------------------------------------------------------ */
.comments { max-width: var(--measure); margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--ink); scroll-margin-top: 12px; }
.comments__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.comments__title { font-weight: 300; font-size: clamp(1.625rem, 2.6vw, 2rem); line-height: 1.2; }
.comments__n { font-family: var(--mono); font-size: 0.55em; color: var(--muted); vertical-align: middle; margin-left: 4px; }
.comments__note { font-size: 14px; color: var(--muted); }
.comments__empty { padding: 24px; background: var(--bg-alt); color: var(--ink-2); font-size: 15px; margin-bottom: 32px; }
.comment-list { display: grid; gap: 0; margin-bottom: 40px; }
.comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.comment-list > .comment:first-child { padding-top: 0; }
.comment__main { min-width: 0; }
.comment__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.comment__name { font-weight: 600; font-size: 15px; }
.comment__role { font-size: 13px; color: var(--muted); }
.comment__time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.badge-team { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; background: var(--blue-50); color: var(--blue-800); border: 1px solid var(--blue-100); padding: 2px 7px; }
.badge-team::before { content: ""; width: 6px; height: 6px; background: var(--teal-700); }
.comment__body { margin-top: 8px; font-size: 16px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.comment__body p + p { margin-top: 0.7em; }
.comment__actions { margin-top: 6px; display: flex; gap: 8px; }
.comment__reply { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px; margin-left: -8px; font-size: 14px; color: var(--blue); }
.comment__reply:hover { background: var(--blue-50); }
.comment__reply svg { width: 16px; height: 16px; }
.comment__replies { margin-top: 16px; padding-left: 16px; border-left: 2px solid var(--line); display: grid; }
@media (min-width: 672px) { .comment__replies { padding-left: 24px; } }
.comment__replies .comment { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 0; border-top: 1px solid var(--line); }
.comment__replies .comment:first-child { border-top: 0; padding-top: 0; }
.comment--team > .comment__main > .comment__body { }
.comment--pending { position: relative; }
.comment--pending .comment__main { padding: 14px 16px; background: var(--warn-bg); border: 1px dashed var(--warn-line); }
.comment__pending { display: flex; gap: 8px; align-items: flex-start; margin-top: 6px; font-size: 13.5px; color: var(--warn); line-height: 1.45; }
.comment__pending svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.comment.is-flash .comment__main { animation: flash 1.6s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 3px rgba(60, 94, 168, 0.35); } 100% { box-shadow: 0 0 0 3px rgba(60, 94, 168, 0); } }
.comment__slot:empty { display: none; }
.comment__slot { margin-top: 16px; }
@media (max-width: 671px) {
  .comment > .comment__main > .comment__slot { margin-left: -54px; }
  .comment__slot .comment-form { padding: 20px 16px; }
  /* Respuestas: el hilo cuelga del centro del avatar y no de la columna de texto (gana ~40 px de ancho útil). */
  .comment > .comment__main > .comment__replies { margin-left: -35px; padding-left: 14px; }
}

.comment-form { border: 1px solid var(--line); padding: 24px 20px; display: grid; gap: 20px; background: #fff; scroll-margin-top: 12px; }
@media (min-width: 672px) { .comment-form { padding: 32px; } }
.comment__slot .comment-form { border-color: var(--blue-100); box-shadow: inset 3px 0 0 var(--blue); }
.comment-form__title { font-size: 1.25rem; font-weight: 400; }
.comment-form__replying { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 8px 12px; background: var(--blue-50); font-size: 14px; color: var(--blue-800); }
.comment-form__replying[hidden] { display: none; }
.comment-form .field { align-content: start; }
.comment-form .field textarea { min-height: 140px; }
.field.is-invalid textarea { outline: 2px solid var(--danger); outline-offset: -2px; }
.field__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.field__meta .error { flex: 1; }
.counter { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.counter.is-near { color: var(--warn); }
.comment-form__note { display: flex; gap: 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; padding: 12px 14px; background: var(--bg-alt); }
.comment-form__note svg { width: 18px; height: 18px; flex: none; color: var(--blue); margin-top: 1px; }
.comment-form .consent { font-size: 14px; }
.comment-form .form__submit .btn { min-width: 0; }
.form-status { font-size: 14.5px; line-height: 1.5; }
.form-status:empty { display: none; }
.form-status.is-success { display: flex; gap: 10px; padding: 14px 16px; background: #e8f6ee; color: #14532f; border-left: 3px solid var(--ok); }
.form-status.is-error { display: flex; gap: 10px; padding: 14px 16px; background: #fdecee; color: #8a1a20; border-left: 3px solid var(--danger); }
.form-status svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.comments__closed { padding: 20px 24px; background: var(--bg-alt); color: var(--ink-2); font-size: 15px; }
.btn.is-busy { opacity: 0.75; cursor: progress; }

/* Relacionados --------------------------------------------------------------------- */
.related__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 40px; }
.related[hidden] { display: none; }
.related .pcard { background: transparent; }

/* Newsletter en banda ------------------------------------------------------------------ */
.nl-band { background: var(--navy); color: #fff; padding-block: 56px; }
@media (min-width: 1056px) { .nl-band { padding-block: 72px; } }
.nl-band__grid { display: grid; gap: 28px; }
@media (min-width: 1056px) { .nl-band__grid { grid-template-columns: 6fr 5fr; gap: 64px; align-items: end; } }
.nl-band__text { display: grid; gap: 14px; }
.nl-band .eyebrow { color: #a9b5cf; }
.nl-band__title { font-weight: 300; font-size: clamp(1.75rem, 3vw, 2.375rem); line-height: 1.15; }
.nl-band__text p:last-child { color: #c9d2e6; max-width: 56ch; }

/* 404 ------------------------------------------------------------------------------------ */
.notfound { padding-block: 56px 72px; border-bottom: 1px solid var(--line); }
@media (min-width: 1056px) { .notfound { padding-block: 96px; } }
.notfound__inner { display: grid; gap: 20px; max-width: 760px; justify-items: start; }
.notfound__title { font-weight: 300; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.1; letter-spacing: -0.015em; }
.notfound .blog-search { width: 100%; max-width: 560px; margin-top: 8px; }
.notfound__search-row { display: flex; gap: 8px; }
.notfound__search-row .blog-search__box { flex: 1; min-width: 0; }
.notfound__search-row .btn { gap: 12px; }
.notice { display: flex; gap: 10px; padding: 14px 16px; background: var(--warn-bg); border-left: 3px solid #c27803; font-size: 14.5px; color: #4a3200; }
.notice a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* Barra inferior del artículo (celular) --------------------------------------------------- */
.sharebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 20px -16px rgba(14, 26, 51, 0.4); transition: transform 200ms var(--ease); }
.sharebar[hidden] { display: none; }
.sharebar.is-hidden { transform: translateY(calc(100% + 2px)); }
@media (min-width: 1056px) { .sharebar { display: none !important; } }
.sharebar__inner { display: flex; align-items: center; height: 56px; padding-left: max(8px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
.sb-btn { min-width: 48px; height: 48px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--ink-2); font-size: 14px; }
.sb-btn:active { background: var(--bg-alt); }
.sb-btn svg { width: 22px; height: 22px; flex: none; }
.sb-btn__n { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.sb-btn.is-done { color: var(--ok); }
.sharebar__sep { flex: 1; }
.sb-btn--share { color: var(--blue); font-weight: 600; padding-right: 12px; }
/* Celulares de 320-374 px: la etiqueta "Compartir" se cortaba; queda solo el ícono (el texto sigue para lectores de pantalla). */
@media (max-width: 374px) {
  .sharebar__inner { padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
  .sb-btn { min-width: 44px; padding: 0 6px; }
  .sb-btn--share span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 1055px) {
  body.has-sharebar { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  body[data-blog="article"] .wa { display: none; }
}

/* Hoja para compartir */
.sheet { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; max-height: 85vh; border: 0; padding: 0 0 env(safe-area-inset-bottom); background: #fff; color: var(--ink); box-shadow: 0 -12px 32px -12px rgba(14, 26, 51, 0.4); }
.sheet::backdrop { background: rgba(14, 26, 51, 0.55); }
@media (min-width: 672px) { .sheet { inset: 0; margin: auto; max-width: 420px; height: fit-content; } }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px var(--gutter); border-bottom: 1px solid var(--line); }
.sheet__title { font-size: 1.0625rem; font-weight: 600; }
.sheet__list { padding: 8px 0 16px; }
.sheet__item { width: 100%; display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 0 var(--gutter); font-size: 16px; text-align: left; }
.sheet__item:hover, .sheet__item:focus-visible { background: var(--bg-alt); }
.sheet__item svg { width: 22px; height: 22px; color: var(--ink-2); flex: none; }

/* Aviso flotante */
.blog-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 90; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 12px 18px; background: var(--navy); color: #fff; font-size: 14.5px; box-shadow: 0 12px 28px -12px rgba(14, 26, 51, 0.6); transform: translate(-50%, 12px); opacity: 0; pointer-events: none; transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
.blog-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.blog-toast svg { width: 18px; height: 18px; color: var(--teal); flex: none; }
@media (max-width: 1055px) { body.has-sharebar .blog-toast { bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* Esqueleto del artículo */
.post-skel { padding-block: 24px 40px; }
.post-skel .post-head__inner { margin-bottom: 32px; }
.post-skel .post-cover__img { aspect-ratio: 3 / 2; }
@media (min-width: 672px) { .post-skel .post-cover__img { aspect-ratio: 2 / 1; } }
@media (min-width: 1056px) { .post-skel { padding-top: 40px; } .post-skel .post-cover__img { aspect-ratio: 21 / 9; } }

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
  .pcard:hover .pcard__media img, .feature:hover .feature__media img { transform: none; }
}

/* Impresión: solo el artículo */
@media print {
  .header, .drawer, .footer, .wa, .sharebar, .post-rail, .post-toc, .toc-m, .read-progress, .related, .nl-band, .comments, .post-cta, .post-nav, .useful { display: none !important; }
  .post-layout { display: block; }
  .prose { max-width: none; font-size: 12pt; }
}
