/* =====================================================================
   WOWNER · Blog · estilos del artículo (se carga después de wowner.css)
   ===================================================================== */
.post-hero { background: var(--c-navy); color: var(--c-white); padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 5vw, 3.5rem); }
.post-hero .container--narrow { max-width: 820px; }
.post-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -.02em; text-wrap: balance; margin-bottom: 1rem; }
.post-hero .lead { color: var(--c-muted-dark); max-width: 66ch; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 1.5rem; font-size: .9rem; color: var(--c-muted-dark); }
.post-meta time, .post-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.post-meta svg { width: 16px; height: 16px; color: var(--c-orange); }

/* Tarjeta de autor (firma) */
.author { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: inherit; }
.author__avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--c-orange); color: var(--c-white); display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; flex: 0 0 48px; }
.author b { display: block; font-size: .98rem; }
.author small { color: var(--c-muted-dark); font-size: .82rem; }
.author-card { display: flex; gap: 1.25rem; align-items: flex-start; background: var(--c-off); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.5rem; margin-top: 3rem; }
.author-card .author__avatar { width: 64px; height: 64px; flex-basis: 64px; font-size: 1.3rem; }
.author-card h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.author-card p { color: var(--c-muted); font-size: .95rem; margin: 0 0 .5rem; }
.author-card a { color: var(--c-orange-600); font-weight: 700; font-size: .9rem; }

/* Cuerpo */
.post { padding-block: clamp(2.5rem, 6vw, 4rem); }
.post__grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .post__grid { grid-template-columns: 1fr 300px; align-items: start; } }
.post__body { max-width: 720px; font-size: 1.06rem; line-height: 1.7; }
.post__body h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 2.5rem 0 .8rem; scroll-margin-top: 90px; }
.post__body h3 { font-size: 1.2rem; margin: 1.75rem 0 .6rem; }
.post__body p, .post__body ul, .post__body ol { margin-bottom: 1.1em; }
.post__body ul, .post__body ol { padding-left: 1.3rem; }
.post__body li { margin-bottom: .35em; }
.post__body a { color: var(--c-orange-600); text-decoration: underline; text-underline-offset: 3px; }
.post__body figure { margin: 1.75rem 0; }
.post__body figcaption { font-size: .85rem; color: var(--c-muted); margin-top: .5rem; }
.post__body table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--c-white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.post__body th, .post__body td { padding: .7rem .85rem; text-align: left; border-bottom: 1px solid var(--c-line); }
.post__body th { background: var(--c-navy); color: var(--c-white); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; }
.post__body td:not(:first-child), .post__body th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.post__body tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.post__body blockquote { margin: 1.75rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--c-orange); background: var(--c-orange-100); border-radius: 0 12px 12px 0; font-weight: 600; }
.post__body blockquote p { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: 1.5rem 0; }
.stat-row div { background: var(--c-off); border-radius: 12px; padding: .9rem 1rem; }
.stat-row strong { display: block; font-size: 1.7rem; color: var(--c-orange-600); line-height: 1.1; }
.stat-row small { color: var(--c-muted); font-size: .8rem; }
.key { background: var(--c-off); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.key h2, .key h3 { margin-top: 0; }
.key ul { margin-bottom: 0; }

/* Índice y lateral */
.post__aside { position: sticky; top: 90px; display: grid; gap: 1.25rem; }
.toc { background: var(--c-off); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.25rem; font-size: .92rem; }
.toc h2 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--c-muted); margin-bottom: .75rem; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: .5rem; }
.toc li::before { content: counter(toc, decimal-leading-zero); color: var(--c-orange); font-weight: 700; font-variant-numeric: tabular-nums; }
.toc a { color: var(--c-text); text-decoration: none; }
.toc a:hover { color: var(--c-orange-600); }
.aside-cta { background: var(--c-navy); color: var(--c-white); border-radius: var(--radius); padding: 1.4rem; }
.aside-cta h3 { font-size: 1.1rem; }
.aside-cta p { color: var(--c-muted-dark); font-size: .9rem; }
.aside-cta .btn { width: 100%; text-align: center; }
@media (max-width: 1023px) { .post__aside { position: static; } .aside-cta { display: none; } }

/* Content upgrade: formulario en el cuerpo del artículo */
.upgrade { background: var(--c-navy); color: var(--c-white); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.2rem); margin: 2.5rem 0; }
.upgrade .eyebrow { color: var(--c-orange); }
.upgrade h2, .upgrade h3 { color: var(--c-white); margin-top: .25rem; }
.upgrade > p { color: var(--c-muted-dark); }
.upgrade .form__progress { display: none; }
.upgrade .field label { color: var(--c-white); }
.upgrade .consent { color: var(--c-muted-dark); font-size: .85rem; }
.upgrade .consent a { color: var(--c-white); }
.upgrade .form__note { color: var(--c-muted-dark); }
.upgrade .form__success { color: var(--c-white); }
.upgrade .form__success .muted { color: var(--c-muted-dark); }

/* Aviso de borrador (quitar antes de publicar) */
.draft { position: sticky; top: var(--header-h); z-index: 40; background: #FFF1D6; color: #8A5A00; font-size: .85rem; font-weight: 700; text-align: center; padding: .5rem 1rem; }

/* Relacionados y migas */
.crumbs { font-size: .82rem; color: var(--c-muted-dark); margin-bottom: 1.25rem; }
.crumbs a { color: var(--c-muted-dark); text-decoration: none; }
.crumbs a:hover { color: var(--c-white); }
.related { display: grid; gap: 1rem; }
@media (min-width: 720px) { .related { grid-template-columns: repeat(3, 1fr); } }
.related a { display: block; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 1.1rem 1.25rem; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.related a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.related small { display: block; color: var(--c-orange-600); font-weight: 700; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .3rem; }
.related b { font-size: 1rem; }

@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; }
  .author-card { flex-direction: column; }
}

/* Evita que las tablas fuercen el ancho de la columna en móvil */
.post__grid > * { min-width: 0; }

/* Fórmulas, listados del blog y avatar con foto */
.formula { background: var(--c-navy); color: var(--c-white); border-radius: 12px; padding: 1rem 1.25rem; margin: 1.25rem 0; text-align: center; font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }
img.author__avatar { object-fit: cover; }
.author__avatar--lg { width: 64px; height: 64px; flex-basis: 64px; font-size: 1.3rem; }
.post-list { display: grid; gap: 1rem; }
@media (min-width: 820px) { .post-list { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: flex; flex-direction: column; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.4rem; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-card small { color: var(--c-orange-600); font-weight: 700; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .5rem; }
.post-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.post-card p { color: var(--c-muted); font-size: .92rem; flex: 1; }
.post-card span { color: var(--c-orange-600); font-weight: 700; font-size: .88rem; }
.post-hero .sec-head { margin: 0; }

/* Los botones dentro del cuerpo no heredan el estilo de enlace */
.post__body .btn, .post__body .btn:hover { color: var(--c-white); text-decoration: none; }

/* ---------- Widgets del blog: iconos, barras, mini calculadoras, portada ---------- */
.ico { width: 22px; height: 22px; color: var(--c-orange); flex: 0 0 22px; }
.ico--s { width: 16px; height: 16px; flex-basis: 16px; margin-right: .3rem; vertical-align: -3px; }
.iconlist { list-style: none; padding: 0; display: grid; gap: .6rem; margin: 1.25rem 0 1.5rem; }
@media (min-width: 720px) { .iconlist { grid-template-columns: 1fr 1fr; } }
.iconlist li { display: flex; gap: .75rem; align-items: flex-start; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: .85rem 1rem; margin: 0; }
.iconlist .ico { margin-top: .15em; }
.iconlist b { display: block; font-size: .98rem; }
.iconlist span { color: var(--c-muted); font-size: .9rem; line-height: 1.45; }
.post-cover { margin: 0 0 2rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-cover img { display: block; width: 100%; height: auto; }

.bars { background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.25rem 1.25rem 1rem; margin: 1.75rem 0; box-shadow: var(--shadow); }
.bars__head { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; font-size: .95rem; }
.bars__series .chip span { font-size: .8rem; padding: .3rem .7rem; }
.bars__plot { position: relative; display: flex; align-items: flex-end; gap: clamp(.35rem, 1.5vw, .9rem); height: 220px; padding-top: 1.6rem; border-bottom: 1px solid var(--c-line); }
.bars__bar { --h: 0%; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.bars__bar i { display: block; width: min(100%, 64px); height: var(--h); border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, #FF8A3D, var(--c-orange) 60%, var(--c-orange-600)); transition: height .6s cubic-bezier(.2,.8,.2,1); }
.bars__bar:hover i { filter: drop-shadow(0 6px 10px rgba(227,100,20,.45)); }
.bars__val { position: absolute; bottom: calc(var(--h) + .35rem); left: 50%; transform: translateX(-50%); font-size: .82rem; white-space: nowrap; color: var(--c-text); transition: bottom .6s cubic-bezier(.2,.8,.2,1); }
.bars__lab { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: .5rem; font-size: .74rem; font-weight: 600; color: var(--c-muted); white-space: nowrap; display: inline-flex; align-items: center; }
.bars__threshold { position: absolute; left: 0; right: 0; bottom: var(--y, 0); border-top: 2px dashed var(--c-navy); pointer-events: none; }
.bars__threshold em { position: absolute; right: 0; top: -1.3rem; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--c-navy); background: var(--c-white); padding: 0 .3rem; }
.bars__note { margin: 2.6rem 0 0; font-size: .82rem; color: var(--c-muted); }
@media (max-width: 560px) { .bars__lab { font-size: .62rem; } .bars__lab .ico--s { display: none; } .bars__plot { height: 190px; } }

.mcalc { margin: 1.75rem 0; }
.mcalc__title { margin: 0 0 .75rem; font-size: 1.15rem; }
.mcalc__preset { margin-bottom: 1rem; }
.mcalc__preset .chip span { font-size: .8rem; padding: .3rem .7rem; }
.mcalc .field { margin-bottom: .9rem; }
.mcalc .field label { font-size: .9rem; }
.mcalc__out small { display: block; }
.mcalc__out strong { display: block; font-size: 1.4rem; line-height: 1.15; color: var(--c-white); margin: .1rem 0 .7rem; }
.mcalc__out--main strong { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--c-orange); }
.post__body .mcalc h3 { margin-top: 0; }

/* ---------- Gráfico de cabecera ---------- */
.hchart { margin: 0 0 2rem; background: var(--c-navy); color: var(--c-white); border-radius: var(--radius); padding: clamp(1.1rem, 2.5vw, 1.6rem); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.hchart::before { content: ""; position: absolute; left: 60%; top: -40%; width: 70%; height: 90%; background: radial-gradient(circle, rgba(227,100,20,.35), rgba(227,100,20,0) 65%); pointer-events: none; }
.hchart__head { position: relative; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; justify-content: space-between; margin-bottom: .9rem; }
.hchart__head { color: var(--c-white); }
.hchart__head b { font-size: 1.02rem; color: var(--c-white); }
.hchart__head small { color: var(--c-muted-dark); font-size: .82rem; }
.hchart__kpis { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1rem; }
.hchart__kpis div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: .6rem .8rem; }
.hchart__kpis strong { display: block; font-size: clamp(1.3rem, 3vw, 1.8rem); line-height: 1.1; color: var(--c-orange); font-variant-numeric: tabular-nums; }
.hchart__kpis small { color: var(--c-muted-dark); font-size: .74rem; line-height: 1.3; display: block; }
.hchart__plot { position: relative; }
.hchart__svg { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--ff); }
.hchart__grid line { stroke: rgba(255,255,255,.1); stroke-dasharray: 3 4; }
.hchart__grid text, .hchart__x { font-size: 11px; fill: var(--c-muted-dark); font-weight: 600; }
.hchart__x--b { fill: var(--c-white); font-size: 12px; font-weight: 700; }
.hchart__v { font-size: 12px; fill: var(--c-white); font-weight: 700; opacity: 0; transition: opacity .4s .7s; }
.hchart__num { font-size: 15px; fill: var(--c-white); font-weight: 700; }
.hchart__bar { transform: scaleY(0); transition: transform .8s cubic-bezier(.2,.8,.2,1), filter .2s, opacity .2s; }
.hchart__bar.is-active { filter: drop-shadow(0 0 12px rgba(255,138,61,.9)); }
.hchart:hover .hchart__bar:not(.is-active) { opacity: .75; }
.hchart__line { fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: stroke-dashoffset 1.4s ease .5s; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.hchart__line--2 { stroke: #A9B4C6; stroke-dasharray: 6 6 !important; stroke-dashoffset: 0 !important; opacity: 0; transition: opacity .6s 1.2s; }
.hchart__area { opacity: 0; transition: opacity .8s 1.2s; }
.hchart__dot { fill: var(--c-navy); stroke: #FFFFFF; stroke-width: 3; opacity: 0; transition: opacity .3s, r .15s; }
.hchart__dot.is-active { r: 8; stroke: var(--c-orange); }
.hchart__rail { stroke: rgba(255,255,255,.18); stroke-width: 4; stroke-linecap: round; }
.hchart__node { transform: scale(0); transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .2s; }
.hchart__node.is-active { filter: drop-shadow(0 0 14px rgba(255,138,61,.9)); }
.hchart__hit { fill: transparent; cursor: pointer; outline: none; }
.hchart__hit:focus-visible { fill: rgba(255,255,255,.06); }
.hchart.is-in .hchart__bar, .hchart.is-in .hchart__node { transform: none; }
.hchart.is-in .hchart__line { stroke-dashoffset: 0 !important; }
.hchart.is-in .hchart__dot, .hchart.is-in .hchart__v, .hchart.is-in .hchart__area, .hchart.is-in .hchart__line--2 { opacity: 1; }
.hchart__tip { position: absolute; transform: translate(-50%, calc(-100% - 6px)); background: var(--c-white); color: var(--c-text); border-radius: 10px; padding: .55rem .75rem; font-size: .8rem; line-height: 1.4; box-shadow: 0 10px 30px rgba(0,0,0,.35); pointer-events: none; min-width: 150px; max-width: 240px; z-index: 2; }
.hchart__tip b { display: block; color: var(--c-orange-600); margin-bottom: .15rem; }
.hchart__tip span { display: block; }
.hchart__legend { position: relative; display: flex; gap: 1.1rem; font-size: .76rem; color: var(--c-muted-dark); margin-top: .5rem; }
.hchart__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: linear-gradient(180deg, #FF8A3D, var(--c-orange)); margin-right: .35rem; vertical-align: -2px; }
.hchart__legend em { display: inline-block; width: 16px; height: 3px; border-radius: 2px; background: #FFFFFF; margin-right: .35rem; vertical-align: 3px; }
.hchart__foot { position: relative; color: var(--c-muted-dark); font-size: .78rem; margin: .6rem 0 0; }
@media (max-width: 560px) { .hchart__kpis { grid-template-columns: 1fr 1fr; } .hchart__kpis div:last-child { grid-column: 1 / -1; } .hchart__grid text, .hchart__x { font-size: 13px; } .hchart__v { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .hchart__bar, .hchart__node { transform: none; } .hchart__line { stroke-dashoffset: 0 !important; } .hchart__dot, .hchart__v, .hchart__area { opacity: 1; } }
/* Línea de tiempo: en móvil se desplaza en horizontal en vez de encogerse */
.hchart--steps .hchart__plot { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hchart--steps .hchart__svg { min-width: 600px; }
