/* Comparar Hojas de Cálculo – Página de cada artículo (prefijo .chcs) */
body.chcs-body { margin: 0; background: #fff; }
.chcs {
	--azul: #2156D9; --azul-h: #1A47B8; --menta: #2EC4A6; --menta-osc: #139A80;
	--marino: #0F1B3D; --pizarra: #5B6B82; --azul-claro: #EEF3FF; --menta-claro: #E7F8F3;
	--borde: #E4E9F2; --fondo: #F5F7FA;
	width: 100%; font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	color: var(--marino); background: #fff; line-height: 1.6; overflow-x: clip;
	-webkit-font-smoothing: antialiased;
}
.chcs *, .chcs *::before, .chcs *::after { box-sizing: border-box; }
.chcs a { text-decoration: none; }
.chcs__wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Barra de progreso de lectura */
.chcs__progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999; pointer-events: none; }
.chcs__progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--azul), var(--menta)); transition: width .1s linear; }

/* Cabecera del artículo */
.chcs__hero { background: linear-gradient(135deg, #0F1B3D 0%, #18307A 55%, #2156D9 100%); color: #fff; padding: 40px 0 120px; position: relative; overflow: hidden; }
.chcs__hero::after { content: ''; position: absolute; width: 520px; height: 520px; right: -140px; top: -220px; border-radius: 50%; background: rgba(46, 196, 166, .16); }
.chcs__hero .chcs__wrap { position: relative; z-index: 1; max-width: 900px; }
.chcs__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .7); margin-bottom: 22px; }
.chcs__crumbs a { color: rgba(255, 255, 255, .85) !important; }
.chcs__crumbs a:hover { color: #fff !important; text-decoration: underline; }
.chcs .chcs__cat { display: inline-block; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; padding: 5px 13px; border-radius: 999px; margin-bottom: 16px; background: rgba(46, 196, 166, .18) !important; color: #BFF3E7 !important; border: 1px solid rgba(46, 196, 166, .55); }
.chcs .chcs__title { font-family: inherit; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: #fff; margin: 0 0 16px; padding: 0; }
.chcs__lead { font-size: clamp(16px, 1.7vw, 19px); line-height: 1.6; color: rgba(255, 255, 255, .82); margin: 0 0 24px; max-width: 760px; }
.chcs__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: 14px; color: rgba(255, 255, 255, .8); }
.chcs__meta-item { display: inline-flex; align-items: center; gap: 7px; }
.chcs__meta svg { flex: 0 0 auto; opacity: .9; }
.chcs__lang { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff !important; font-weight: 500; border: 1px solid rgba(255, 255, 255, .25); }
.chcs__lang:hover { background: rgba(255, 255, 255, .22); }

/* Imagen destacada */
.chcs__cover { margin: -88px auto 0; position: relative; z-index: 2; max-width: 980px; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(15, 27, 61, .22); aspect-ratio: 16 / 9; background: var(--azul-claro); }
.chcs__cover img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }

/* Distribución: índice + contenido */
.chcs__layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; margin: 56px auto 0; max-width: 1120px; align-items: start; }
.chcs__layout--single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.chcs__side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
.admin-bar .chcs__side { top: 128px; }

.chcs__toc { background: var(--fondo); border: 1px solid var(--borde); border-radius: 16px; padding: 18px 18px 14px; }
.chcs__toc summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--pizarra); }
.chcs__toc summary::-webkit-details-marker { display: none; }
.chcs__toc ol { list-style: none; margin: 12px 0 0; padding: 0; counter-reset: toc; max-height: calc(100vh - 360px); overflow-y: auto; }
.chcs__toc li { counter-increment: toc; margin: 0; padding: 0; }
.chcs__toc li a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 9px; font-size: 14px; line-height: 1.4; color: var(--marino) !important; border-left: 3px solid transparent; }
.chcs__toc li a::before { content: counter(toc) '.'; color: var(--pizarra); font-weight: 600; min-width: 18px; }
.chcs__toc li a:hover { background: #fff; color: var(--azul) !important; }
.chcs__toc li a.is-active { background: #fff; color: var(--azul) !important; border-left-color: var(--menta); font-weight: 500; }

/* Llamadas a la acción */
.chcs__cta { border-radius: 16px; }
.chcs__cta-title { font-weight: 700; font-size: 16px; margin: 0 0 10px; }
.chcs__cta--side { background: linear-gradient(160deg, var(--azul-claro), var(--menta-claro)); border: 1px solid var(--borde); padding: 18px; }
.chcs__cta--side ul { list-style: none; margin: 0 0 14px; padding: 0; }
.chcs__cta--side li { margin: 0; }
.chcs__cta--side li a { display: block; padding: 6px 0; font-size: 14px; color: var(--azul) !important; font-weight: 500; }
.chcs__cta--side li a::before { content: '→ '; color: var(--menta-osc); }
.chcs__cta--side li a:hover { text-decoration: underline; }
.chcs__btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 20px; border-radius: 12px; background: var(--azul); color: #fff !important; font-weight: 600; font-size: 14.5px; transition: background .2s, transform .2s; text-align: center; }
.chcs__btn:hover { background: var(--azul-h); transform: translateY(-1px); }
.chcs__cta--side .chcs__btn { width: 100%; }
.chcs__cta--end { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin: 48px 0 0; padding: 28px 32px; background: linear-gradient(135deg, #0F1B3D, #2156D9); color: #fff; }
.chcs__cta--end .chcs__cta-title { font-size: 20px; color: #fff; }
.chcs__cta--end p { margin: 0; color: rgba(255, 255, 255, .85); font-size: 15px; }
.chcs__btn--light { background: var(--menta); color: var(--marino) !important; flex: 0 0 auto; }
.chcs__btn--light:hover { background: #fff; }

/* Contenido del artículo */
.chcs__content { font-size: 17.5px; line-height: 1.8; color: #24324F; }
.chcs__content > *:first-child { margin-top: 0; }
.chcs__content p { margin: 0 0 1.25em; }
.chcs__content h2 { font-family: inherit; font-size: clamp(23px, 2.4vw, 29px); line-height: 1.3; font-weight: 700; letter-spacing: -.01em; color: var(--marino); margin: 2.1em 0 .7em; padding: 0 0 0 16px; border-left: 4px solid var(--menta); scroll-margin-top: 110px; }
.chcs__content h3 { font-family: inherit; font-size: clamp(19px, 1.8vw, 21px); line-height: 1.4; font-weight: 600; color: var(--marino); margin: 1.7em 0 .5em; padding: 0; }
.chcs__content a { color: var(--azul) !important; text-decoration: underline; text-decoration-color: rgba(33, 86, 217, .35); text-underline-offset: 3px; font-weight: 500; }
.chcs__content a:hover { text-decoration-color: var(--azul); }
.chcs__content strong { color: var(--marino); font-weight: 600; }
.chcs__content ul, .chcs__content ol { margin: 0 0 1.4em; padding: 0; list-style: none; }
.chcs__content li { position: relative; padding-left: 32px; margin: 0 0 .6em; }
.chcs__content ul > li::before { content: ''; position: absolute; left: 8px; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--menta); }
.chcs__content ol { counter-reset: chcs; }
.chcs__content ol > li { counter-increment: chcs; }
.chcs__content ol > li::before { content: counter(chcs); position: absolute; left: 0; top: .2em; width: 23px; height: 23px; border-radius: 50%; background: var(--azul-claro); color: var(--azul); font-size: 13px; font-weight: 700; line-height: 23px; text-align: center; }
.chcs__content code { font-family: 'JetBrains Mono', 'Cascadia Code', Consolas, Menlo, monospace; font-size: .86em; background: var(--azul-claro); color: #1A3FA6; padding: .15em .45em; border-radius: 6px; border: 0; word-break: break-word; white-space: normal; }
.chcs__content p.chcs-code code { display: block; padding: 12px 16px; font-size: .9em; border-left: 3px solid var(--azul); border-radius: 8px; overflow-x: auto; white-space: pre-wrap; }
.chcs__content blockquote { margin: 1.6em 0; padding: 18px 22px; background: var(--menta-claro); border-left: 4px solid var(--menta); border-radius: 0 12px 12px 0; font-style: normal; }
.chcs__content img { max-width: 100%; height: auto; border-radius: 12px; }
.chcs__content figure { margin: 1.6em 0; }

/* Tablas */
.chcs__content .wp-block-table { margin: 1.8em 0; }
.chcs-table { width: 100%; overflow-x: auto; border: 1px solid var(--borde); border-radius: 14px; margin: 1.8em 0; -webkit-overflow-scrolling: touch; }
.chcs__content .wp-block-table .chcs-table { margin: 0; }
.chcs-table table { width: 100%; border-collapse: collapse; margin: 0; font-size: 15px; line-height: 1.5; min-width: 520px; border: 0; }
.chcs-table th { background: var(--marino); color: #fff; font-weight: 600; text-align: left; padding: 12px 16px; border: 0; white-space: nowrap; }
.chcs-table td { padding: 11px 16px; border: 0; border-top: 1px solid var(--borde); vertical-align: top; }
.chcs-table tr:nth-child(even) td { background: var(--fondo); }
.chcs-table td:first-child { font-weight: 600; color: var(--marino); }

/* Preguntas frecuentes */
.chcs-faq { display: flex; flex-direction: column; gap: 12px; margin: 0 0 1.4em; }
.chcs-faq__item { border: 1px solid var(--borde); border-radius: 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.chcs-faq__item[open] { border-color: rgba(33, 86, 217, .35); box-shadow: 0 10px 26px rgba(15, 27, 61, .07); }
.chcs-faq__item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; font-weight: 600; font-size: 16.5px; line-height: 1.45; color: var(--marino); }
.chcs-faq__item summary::-webkit-details-marker { display: none; }
.chcs-faq__item summary svg { flex: 0 0 auto; color: var(--azul); transition: transform .2s; }
.chcs-faq__item[open] summary svg { transform: rotate(180deg); }
.chcs-faq__a { padding: 0 20px 6px; font-size: 16px; }

/* Compartir */
.chcs__share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 32px 0 0; padding: 22px 0 0; border-top: 1px solid var(--borde); }
.chcs__share > span { font-weight: 600; font-size: 14px; color: var(--pizarra); margin-right: 4px; }
.chcs__share a, .chcs__share button { display: inline-flex; align-items: center; gap: 7px; height: 40px; min-width: 40px; justify-content: center; padding: 0 12px; border-radius: 10px; border: 1px solid var(--borde); background: #fff; color: var(--marino) !important; font: 500 14px/1 inherit; font-family: inherit; cursor: pointer; transition: all .2s; }
.chcs__share a:hover, .chcs__share button:hover { border-color: var(--azul); color: var(--azul) !important; background: var(--azul-claro); }
.chcs__share button.is-done { border-color: var(--menta); color: var(--menta-osc) !important; background: var(--menta-claro); }

/* Relacionados */
.chcs__related { max-width: 1120px; margin: 72px auto 0; padding: 0 0 80px; }
.chcs__related-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.chcs .chcs__related-head h2 { font-family: inherit; font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; margin: 0; padding: 0; color: var(--marino); }
.chcs__related-head a { color: var(--azul) !important; font-weight: 600; font-size: 15px; white-space: nowrap; }
.chcs__related-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.chcs__related-grid li { margin: 0; padding: 0; }
.chcs__rcard { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--borde); border-radius: 18px; overflow: hidden; background: #fff; transition: transform .25s, box-shadow .25s, border-color .25s; }
.chcs__rcard:hover { transform: translateY(-4px); border-color: rgba(33, 86, 217, .3); box-shadow: 0 18px 40px rgba(15, 27, 61, .10); }
.chcs__rmedia { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--azul-claro); overflow: hidden; }
.chcs__rmedia img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.chcs__rbody { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.chcs__rtitle { font-size: 17px; font-weight: 600; line-height: 1.4; color: var(--marino); }
.chcs__rcard:hover .chcs__rtitle { color: var(--azul); }
.chcs__rmeta { margin-top: auto; font-size: 13px; color: var(--pizarra); }
.chcs .chcb__cat { display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px; line-height: 1.4; }

/* Tableta */
@media (max-width: 1024px) {
	.chcs__layout { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 760px; margin-top: 36px; }
	.chcs__side { position: static; order: -1; }
	.chcs__cta--side { display: none; }
	.chcs__toc ol { max-height: none; }
	.chcs__related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.chcs__related { max-width: 760px; }
}
/* Móvil */
@media (max-width: 640px) {
	.chcs__wrap { padding: 0 16px; }
	.chcs__hero { padding: 26px 0 84px; }
	.chcs__cover { margin-top: -60px; border-radius: 14px; }
	.chcs__content { font-size: 16.5px; line-height: 1.75; }
	.chcs__content h2 { padding-left: 12px; }
	.chcs__cta--end { flex-direction: column; align-items: flex-start; padding: 24px 22px; }
	.chcs__cta--end .chcs__btn { width: 100%; }
	.chcs__related-grid { grid-template-columns: minmax(0, 1fr); }
	.chcs__related-head { flex-direction: column; gap: 6px; }
	.chcs__share button span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.chcs *, .chcs *::before { transition: none !important; }
}
@media print {
	.chcs__progress, .chcs__side, .chcs__share, .chcs__cta, .chcs__related { display: none !important; }
	.chcs__hero { background: none; color: #000; padding: 0; }
	.chcs .chcs__title, .chcs__lead, .chcs__meta { color: #000; }
	.chcs__layout { display: block; }
}
