/* Plantilla de artículo del blog (prefijo bl-). El cuerpo viene tal cual del artículo vigente y se le da estilo aquí. */

/* Portada */
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: var(--t-small); color: #aeb9c7; }
.bl-meta span { display: inline-flex; align-items: center; gap: 6px; }
.bl-meta svg { width: 15px; height: 15px; }
.bl-cat { padding: 4px 12px 4px 8px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-weight: 600; }
.bl-h { font-size: clamp(2.25rem, 4vw, 3.75rem); }
.bl-inline { color: #dfe65a; }
html:not(.ph-oscura) .bl-stage { padding: clamp(28px, 3vw, 48px); min-height: 0; }
.bl-cover { position: relative; width: 100%; overflow: hidden; border-radius: 16px; box-shadow: 0 26px 64px rgba(29, 42, 61, .28); }
.bl-cover img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.bl-3d { width: clamp(80px, 7.6vw, 118px); right: clamp(6px, 1vw, 16px); top: clamp(-6px, -.4vw, 0px); z-index: 4; }
.bl-chip { position: absolute; z-index: 4; left: clamp(10px, 1.6vw, 24px); bottom: clamp(10px, 1.6vw, 24px); display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px; border-radius: 16px; box-shadow: 0 16px 40px rgba(29, 42, 61, .25); }
.bl-chip b { display: block; font-size: 1rem; }
.bl-chip > span:last-child { font-size: .875rem; color: var(--ui-soft); line-height: 1.25; }
.bl-chip-n { display: grid; place-items: center; min-width: 48px; height: 48px; padding: 0 8px; border-radius: 14px; background: var(--navy); color: var(--lime); font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Artículo y columna lateral */
.bl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(20px, 3vw, 48px); max-width: 1240px; margin-inline: auto; align-items: start; }
.bl-body { min-width: 0; padding: clamp(24px, 4vw, 64px); border-radius: var(--tile-r); background: var(--tile); color: var(--ink); font-size: clamp(1.0625rem, 1rem + .25vw, 1.1875rem); line-height: 1.7; transition: background-color .25s ease; }
.bl-body > * + * { margin-top: 1.1em; }
.bl-body h2 { margin-top: 2.2em; font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.25rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.12; scroll-margin-top: 80px; text-wrap: balance; }
.bl-body h3 { margin-top: 1.8em; display: flex; align-items: baseline; gap: 12px; font-size: clamp(1.1875rem, 1.05rem + .45vw, 1.4375rem); font-weight: 600; letter-spacing: -0.018em; line-height: 1.25; }
.bl-body h2 + *, .bl-body h3 + * { margin-top: .6em; }
.bl-n { flex: none; display: inline-grid; place-items: center; min-width: 40px; height: 32px; padding: 0 8px; border-radius: 10px; background: var(--lime); color: var(--on-lime); font-size: .9375rem; font-variant-numeric: tabular-nums; transform-origin: 50% 60%; }
.bl-body p, .bl-body li { color: var(--ink); }
.bl-body a:not(.btn-primary) { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.bl-body strong { font-weight: 600; }
.bl-body code { padding: .1em .4em; border-radius: 6px; background: var(--surface); font-size: .88em; }
.bl-body ul, .bl-body ol { display: grid; gap: .45em; padding-left: 0; list-style: none; }
.bl-body ul > li { position: relative; padding-left: 1.6em; }
.bl-body ul > li::before { content: ''; position: absolute; left: .2em; top: .62em; width: .55em; height: .55em; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 30%, transparent); }
.bl-body ol { counter-reset: bl; }
.bl-body ol > li { position: relative; padding-left: 2.4em; counter-increment: bl; }
.bl-body ol > li::before { content: counter(bl); position: absolute; left: 0; top: .1em; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--navy); color: var(--lime); font-size: .85em; font-weight: 600; }

/* Bloques del artículo vigente */
.bl-body .article-takeaways { padding: clamp(20px, 2.6vw, 32px); border-radius: 20px; background: var(--navy); color: #f2f5f8; }
.bl-body .article-takeaways li { color: #e6ecf2; }
.bl-body .tk-label, .bl-body .article-callout-label { display: flex; align-items: center; gap: .5em; margin-bottom: .7em; font-size: var(--t-small); font-weight: 600; letter-spacing: -0.005em; }
.bl-body .tk-label { color: var(--lime); }
.bl-body .tk-label::before { 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 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%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 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }
.bl-body .article-callout { position: relative; padding: clamp(18px, 2.2vw, 26px) clamp(18px, 2.2vw, 28px) clamp(18px, 2.2vw, 26px) clamp(24px, 2.6vw, 34px); border-radius: 18px; background: var(--c-lime, #eff3cf); overflow: hidden; }
.bl-body .article-callout::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--lime); transform-origin: 50% 0; transform: scaleY(var(--bar, 1)); }
.bl-body .article-callout-label { color: var(--brand); }
.bl-body .article-callout p { color: var(--ink); }
.bl-body .table-wrap, .bl-body .article-table { overflow-x: auto; }
.bl-body table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9375rem; line-height: 1.45; border-radius: 14px; overflow: hidden; }
.bl-body th { padding: 12px 14px; background: var(--navy); color: #f2f5f8; text-align: left; font-weight: 600; }
.bl-body td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.bl-body tr:nth-child(even) td { background: color-mix(in srgb, var(--surface) 45%, transparent); }
.bl-body td.winner, .bl-body .winner { font-weight: 600; color: var(--brand); }
.bl-body .answer-first { padding: 18px 20px; border-radius: 16px; background: var(--surface); }
.bl-body .btn-primary { display: inline-flex; align-items: center; gap: .4em; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--lime); color: var(--on-lime); font-weight: 600; text-decoration: none; transition: scale .1s ease-out, background-color .18s ease; }
.bl-body .btn-primary:hover { background: #d6e21a; }
.bl-body .btn-primary:active { scale: .97; }
.bl-body img { border-radius: 14px; }

/* Columna lateral: índice con avance y llamado */
.bl-side { position: sticky; top: 76px; display: grid; gap: var(--gap); }
.bl-toc { padding: 20px 20px 16px; border-radius: 20px; background: var(--tile); transition: background-color .25s ease; }
.bl-toc-h { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 10px; }
.bl-ring { width: 30px; height: 30px; flex: none; }
.bl-ring svg { width: 100%; height: 100%; rotate: -90deg; }
.bl-ring circle { fill: none; stroke-width: 4; }
.bl-ring-bg { stroke: var(--surface); }
.bl-ring-val { stroke: var(--lime); stroke-linecap: round; stroke-dasharray: 0 100; }
.bl-toc-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.bl-toc-list a { position: relative; display: flex; gap: 10px; padding: 8px 10px; border-radius: 12px; color: var(--soft); font-size: .9375rem; line-height: 1.3; counter-increment: toc; transition: background-color .2s ease, color .2s ease; }
.bl-toc-list a::before { content: counter(toc, decimal-leading-zero); flex: none; font-size: .8125rem; font-weight: 600; color: var(--soft); font-variant-numeric: tabular-nums; padding-top: .1em; }
.bl-toc-list a:hover { background: var(--surface); color: var(--ink); }
.bl-toc-list a.is-on { background: var(--lime); color: var(--on-lime); font-weight: 600; }
.bl-toc-list a.is-on::before { color: var(--on-lime); }
.bl-side-cta { padding: 22px; }
.bl-side-cta .kicker { color: var(--lime); }
.bl-side-p { margin: 8px 0 14px; color: #dbe2ea; font-size: var(--t-small); line-height: 1.4; padding-right: 48px; }
.bl-side-3d { width: 76px; right: 12px; top: 12px; }

/* Autor */
.bl-author { flex-direction: row; align-items: center; gap: clamp(16px, 2.4vw, 28px); max-width: 960px; margin-inline: auto; }
.bl-avatar { flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--navy); color: var(--lime); font-size: 1.5rem; font-weight: 600; }
.bl-author-name { font-size: var(--t-kicker); font-weight: 600; }
.bl-author-bio { margin-top: 4px; color: var(--soft); line-height: 1.45; }

/* Tarjetas de artículos */
.post-art.stage-soft { background: var(--surface); }
.post-art.stage-lime { background: var(--lime); }
.post-art.stage-navy { background: var(--navy); }

html.dark .bl-body .article-callout { background: #1d2410; }

@media (max-width: 1023px) {
  .bl-layout { grid-template-columns: minmax(0, 1fr); }
  .bl-side { position: static; grid-row: 1; }
  .bl-toc-list { grid-template-columns: 1fr 1fr; }
  .bl-side-cta { display: none; }
}
@media (max-width: 720px) {
  .bl-h { font-size: clamp(1.875rem, 8vw, 2.375rem); }
  .bl-toc-list { grid-template-columns: minmax(0, 1fr); }
  .bl-body { padding: 22px 18px; }
  .bl-author { flex-direction: column; align-items: flex-start; }
  .bl-chip { padding: 6px 12px 6px 6px; }
  .bl-chip-n { min-width: 38px; height: 38px; font-size: 1.125rem; }
  .bl-3d { width: 64px; }
}

/* El título del recuadro lateral no queda bajo el objeto 3D. */
.bl-side-cta .kicker { padding-right: 76px; }
