:root { --ink: #e7ebe7; --panel: #070a07; --dek: #c9d0c9; --glass: rgba(2, 2, 2, 0.9); --on-accent: #041006; }

/* Modo de lectura claro: solo el contenido; la cabecera y el pie siguen oscuros. */
html[data-tema="claro"] main {
  --bg: #f5f6f2;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --line: rgba(14, 32, 18, 0.12);
  --text: #0e1510;
  --muted: #5a645d;
  --accent: #128237;
  --accent-soft: #128237;
  --ink: #26302a;
  --panel: #eceee9;
  --dek: #3a453d;
  --glass: rgba(245, 246, 242, 0.94);
  --on-accent: #ffffff;
  color-scheme: light;
  background: var(--bg);
  color: var(--text);
}
html[data-tema="claro"] main .headline-glow, html[data-tema="claro"] main .emphasis-script, html[data-tema="claro"] main .post-dato-valor { text-shadow: none; }
html[data-tema="claro"] main .button-dark { background: linear-gradient(135deg, #1a9b46, #128237); color: #fff; box-shadow: 0 10px 30px -14px rgba(18, 130, 55, 0.6); }
html[data-tema="claro"] main .card, html[data-tema="claro"] main .box, html[data-tema="claro"] main .vs-col, html[data-tema="claro"] main .post-figures li { box-shadow: 0 1px 2px rgba(14, 32, 18, 0.05), 0 12px 32px -20px rgba(14, 32, 18, 0.25); }
html[data-tema="claro"] main .post-cover img { box-shadow: 0 30px 80px -40px rgba(14, 32, 18, 0.45); }
html[data-tema="claro"] main .post-body h2::before, html[data-tema="claro"] main .post-body > ul:not([class]) > li::before { box-shadow: none; }
html[data-tema="claro"] main .vs-badge, html[data-tema="claro"] main .yt-play { box-shadow: 0 0 0 8px rgba(18, 130, 55, 0.14); }
html[data-tema="claro"] main .post-dato, html[data-tema="claro"] main .post-cta, html[data-tema="claro"] main .blog-band { background: radial-gradient(600px 220px at 0% 0%, rgba(18, 130, 55, 0.1), transparent 70%), var(--surface); }
html[data-tema="claro"] main .chart-bar.s2, html[data-tema="claro"] main .chart-swatch.s2, html[data-tema="claro"] main .chart-path.s2 { fill: #9aa59d; background: #9aa59d; }
html[data-tema="claro"] main .chart-path.s2 { stroke: #9aa59d; fill: none; }
html[data-tema="claro"] main .chart-point.s2 { fill: #9aa59d; }
html[data-tema="claro"] main .post-figure svg g[fill="#ffffff"] { fill: var(--text); }
html[data-tema="claro"] main .post-figure svg [stroke="#ffffff"] { stroke: var(--text); }
html[data-tema="claro"] main .post-figure svg path[fill="#ffffff"], html[data-tema="claro"] main .post-figure svg rect[fill="#ffffff"] { fill: var(--text); }
html[data-tema="claro"] main .post-figure svg [stroke="#6dff8b"] { stroke: var(--accent); }
html[data-tema="claro"] main .post-figure svg path[fill="#6dff8b"], html[data-tema="claro"] main .post-figure svg rect[fill="#6dff8b"] { fill: var(--accent); }
html[data-tema="claro"] main .post-figure svg text[fill="#b8c0b8"] { fill: var(--muted); }
html[data-tema="claro"] main .post-body .vs-col li::before { background-color: rgba(18, 130, 55, 0.1); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23128237' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
html[data-tema="claro"] main .post-draft { border-color: #b86a00; color: #8a4f00; }
html[data-tema="claro"] main .post-byline img { background: #0e1510; }
html[data-tema="claro"] main .post-progress { background: linear-gradient(90deg, #128237, #1fbf55); }
@media (prefers-reduced-motion: no-preference) {
  main { transition: background-color 0.4s var(--ease), color 0.4s var(--ease); }
}

.theme-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle-icon { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: inset 0 0 0 0 var(--surface), 0 0 0 3px rgba(109, 255, 139, 0.2); transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease); }
html[data-tema="claro"] .theme-toggle-icon { box-shadow: inset -6px -2px 0 0 var(--surface), 0 0 0 0 transparent; transform: rotate(-20deg); }
.theme-toggle[hidden] { display: none; }
.post-meta .theme-toggle { margin-left: auto; }
.blog-theme { margin: 22px 0 0; }
.post-meta > .theme-toggle::before { content: none; }

.post-head { padding-block: 0 clamp(28px, 4vw, 40px); }
.post-head > * { max-width: 900px; }
.post-head .crumbs { padding-top: 28px; margin-bottom: clamp(28px, 5vw, 52px); flex-wrap: wrap; }
.post-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 18px; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.post-kicker > span:not(.post-type) { color: var(--muted); letter-spacing: 0.08em; }
.post-head h1 { font-size: clamp(38px, 5.6vw, 68px); line-height: 1.04; letter-spacing: -0.02em; }
.post-head h1 .emphasis-script { display: block; margin-top: 0.06em; }
.post-dek { max-width: 760px; margin: 22px 0 0; color: var(--dek); font-size: clamp(19px, 2vw, 22px); line-height: 1.55; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; margin: 26px 0 0; color: var(--muted); font-size: 15px; }
.post-meta > * + *::before { content: "·"; margin: 0 12px; color: rgba(255, 255, 255, 0.25); }
.post-byline { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.post-byline img { width: 34px; height: 34px; padding: 6px; object-fit: contain; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); }
.post-byline:hover span { color: var(--accent); }

.post-cover { margin: 0 auto; }
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; object-position: top center;border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: 0 40px 120px -40px rgba(109, 255, 139, 0.18); }
.post-cover figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; }
.post-cover figcaption a { color: inherit; }

.post-layout { display: grid; grid-template-columns: 236px minmax(0, 720px); justify-content: center; gap: clamp(40px, 6vw, 72px); padding-top: clamp(36px, 5vw, 64px); padding-bottom: var(--section); }
.post-body { font-size: 18.5px; line-height: 1.72; }
.post-body > p, .post-body li { color: var(--ink); }
.post-body h2 { font-size: clamp(26px, 3vw, 34px); margin: 2em 0 0.6em; scroll-margin-top: 90px; }
.post-body h3 { font-size: 21px; margin: 1.6em 0 0.5em; scroll-margin-top: 90px; }
.post-body a { color: var(--accent-soft); }
.post-body a.button { color: var(--text); }
.post-body a.button-dark { color: var(--on-accent); }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li { margin-bottom: 0.45em; }
.post-body code { padding: 2px 6px; border-radius: 6px; background: var(--surface-strong); font-size: 0.9em; }

.box { margin: 28px 0; padding: 20px 24px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 16px; background: var(--surface); }
.box ul { margin: 0; }
.box p { margin: 0; color: var(--ink); }
.box-title { display: block; margin-bottom: 10px; color: var(--accent); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.box-accent { background: linear-gradient(120deg, rgba(109, 255, 139, 0.08), var(--surface)); }

.post-figure { margin: 32px 0; }
.post-figure svg { width: 100%; height: auto; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.post-figure figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }
.post-figure small { opacity: 0.8; }

.post-table { margin: 28px 0; overflow-x: auto; }
.post-table table { width: 100%; border-collapse: collapse; font-size: 16px; }
.post-table th, .post-table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-table thead th { color: var(--accent); }
.post-table tbody th { color: var(--muted); font-weight: 600; width: 28%; }

.post-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 40px 0; padding: 26px; border: 1px solid rgba(109, 255, 139, 0.35); border-radius: var(--radius); background: radial-gradient(circle at 10% 0%, rgba(109, 255, 139, 0.16), transparent 55%), var(--surface); }
.post-cta p { margin: 0; max-width: 520px; }
.post-sources { margin-top: 48px; font-size: 15px; color: var(--muted); }
.post-sources h2 { font-size: 20px; margin-top: 0; }

.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 40px 0 24px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.post-share .button { min-height: 40px; font-size: 14px; padding: 0 16px; }
.post-author { display: flex; gap: 16px; align-items: center; padding: 20px; }
.post-author img { width: 48px; height: auto; }
.post-author p { margin: 0; color: var(--muted); font-size: 16px; }

.post-aside { position: sticky; top: 96px; align-self: start; display: grid; gap: 24px; font-size: 14.5px; }
.post-toc strong { display: block; margin-bottom: 12px; color: var(--muted); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; }
.post-toc ol { margin: 0; padding: 0; list-style: none; border-left: 2px solid var(--line); }
.post-toc a { display: block; margin-left: -2px; padding: 7px 0 7px 16px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.35; text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.post-toc a:hover { color: var(--text); }
.post-toc a.is-active { border-color: var(--accent); color: var(--text); font-weight: 700; }
a.post-service { display: grid; gap: 6px; padding: 20px; text-decoration: none; }
.post-service span:last-child { color: var(--muted); font-size: 14px; }
.post-toc-mobile { display: none; margin: 0 0 28px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.post-toc-mobile summary { cursor: pointer; font-weight: 700; }
.post-toc-mobile ol { margin: 12px 0 4px; padding-left: 20px; display: grid; gap: 8px; }
.post-toc-mobile a { color: var(--muted); text-decoration: none; }

.post-body > p:first-of-type { font-size: 1.08em; color: var(--text); }
.post-body > ul:not([class]) { padding-left: 0; list-style: none; }
.post-body > ul:not([class]) > li { position: relative; padding-left: 26px; }
.post-body > ul:not([class]) > li::before { content: ""; position: absolute; top: 0.68em; left: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(109, 255, 139, 0.5); }
.post-body blockquote { margin: 36px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--accent); color: var(--text); font-size: 1.2em; line-height: 1.5; }
.post-body h2::before { content: ""; display: block; width: 36px; height: 3px; margin-bottom: 18px; border-radius: 3px; background: var(--accent); }

.blog-hero { padding-bottom: clamp(32px, 5vw, 56px); }
.blog-topics { display: flex; gap: 8px; margin-top: 30px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.blog-topics::-webkit-scrollbar { display: none; }
.blog-topics button { flex: 0 0 auto; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; }
.blog-topics button:hover { border-color: rgba(109, 255, 139, 0.4); color: var(--text); }
.blog-topics button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.blog-list { padding-bottom: clamp(56px, 8vw, 96px); }
.blog-list .post-grid, .post-related .post-grid { gap: 28px 22px; }
.post-card[hidden] { display: none; }
.blog-list .post-card.is-lead { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; }
.blog-list .post-card.is-lead .post-card-media { border-bottom: 0; border-right: 1px solid var(--line); }
.blog-list .post-card.is-lead .post-card-body { padding: clamp(24px, 4vw, 44px); gap: 14px; }
.blog-list .post-card.is-lead h3 { font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -0.01em; }
.blog-list .post-card.is-lead p { font-size: 17px; }
.blog-list .post-grid[data-filtered] .post-card.is-lead { grid-column: auto; display: block; }
.blog-list .post-grid[data-filtered] .post-card.is-lead .post-card-media { aspect-ratio: 1200 / 630; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
.blog-list .post-grid[data-filtered] .post-card.is-lead .post-card-body { padding: 20px 22px 24px; }
.blog-list .post-grid[data-filtered] .post-card.is-lead h3 { font-size: 20px; }
.blog-list .post-card .post-card-body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-empty { color: var(--muted); }

.blog-band { padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); background: radial-gradient(800px 260px at 85% 0%, rgba(109, 255, 139, 0.12), transparent 70%); }
.blog-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.blog-band-inner > div:first-child { max-width: 640px; }
.blog-band h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.1; }
.blog-band h2 .emphasis-script { display: block; }
.blog-band p:not(.post-kicker) { margin: 14px 0 0; color: var(--muted); font-size: 17px; }
.blog-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .js [data-words].is-split .word { display: inline-block; overflow: hidden; padding: 0 0.08em 0.2em 0; margin: 0 -0.08em -0.2em 0; vertical-align: top; }
  .js [data-words].is-split .word > span { display: inline-block; transform: translateY(105%); transition: transform 0.7s var(--ease) calc(var(--i) * 32ms); }
  .js [data-words].is-split.is-in .word > span { transform: none; }
  .js .post-dek, .js .post-meta, .js .post-kicker, .js .blog-hero .hero-lead, .js .blog-topics { animation: post-rise 0.7s var(--ease) both; }
  .js .post-dek, .js .blog-hero .hero-lead { animation-delay: 0.2s; }
  .js .post-meta, .js .blog-topics { animation-delay: 0.3s; }
  .js .post-cover img { transform: translateY(18px) scale(0.985); transition: transform 1s var(--ease); }
  .js .post-cover.is-in img { transform: none; }
  .post-body h2::before { transform: scaleX(0.2); transform-origin: left center; transition: transform 0.8s var(--ease); }
  .post-body h2.is-in::before { transform: none; }
  @supports (animation-timeline: view()) {
    .post-cover img { animation: post-cover-drift linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  }
}
@keyframes post-cover-drift { from { scale: 1; filter: brightness(1); } to { scale: 0.96; filter: brightness(0.55); } }
@keyframes post-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .post-layout { grid-template-columns: minmax(0, 720px); }
  .post-aside { position: static; order: 2; }
  .post-toc { display: none; }
  .post-toc-mobile { display: block; }
}
@media (max-width: 900px) {
  .blog-list .post-card.is-lead { display: block; }
  .blog-list .post-card.is-lead .post-card-media { aspect-ratio: 1200 / 630; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) {
  .post-cover { padding-inline: 0; }
  .post-cover img { border-radius: 0; border-inline: 0; }
  .post-cover figcaption { padding-inline: var(--gutter); }
  .post-meta { font-size: 14px; }
}
@media (max-width: 900px) {
  .post-body { font-size: 17.5px; }
}
@media (max-width: 640px) {
  .post-table thead { display: none; }
  .post-table tr { display: block; margin-bottom: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
  .post-table th, .post-table td, .post-table tbody th { display: block; width: auto; padding: 4px 0; border: 0; }
  .post-table td::before { content: attr(data-col) ": "; color: var(--accent); font-weight: 700; }
}

.box-example { border-left-color: var(--accent-soft); background: linear-gradient(120deg, rgba(146, 255, 171, 0.06), var(--surface)); }
.box-definition { border-left-color: var(--muted); }
.box p + p, .box p + ul, .box ul + p { margin-top: 10px; }
.box-accent p { color: var(--text); }

.post-figures { margin: 32px 0; }
.post-figures ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.post-figures li { display: grid; align-content: start; gap: 6px; margin: 0; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.post-figures strong { color: var(--accent); font-size: clamp(26px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -0.02em; }
.post-figures li > span { color: var(--muted); font-size: 15px; line-height: 1.45; }
.post-figures-source { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.post-steps { counter-reset: paso; margin: 28px 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.post-steps li { counter-increment: paso; position: relative; margin: 0; padding: 4px 0 0 52px; }
.post-steps li::before { content: counter(paso); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(109, 255, 139, 0.55); border-radius: 50%; color: var(--accent); font-size: 15px; font-weight: 700; }
.post-steps strong { display: block; color: var(--text); }
.post-steps p { margin: 4px 0 0; color: var(--ink); }

.post-faq { margin-top: 48px; }
.post-faq details { border-bottom: 1px solid var(--line); }
.post-faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; color: var(--text); }
.post-faq details p { margin: 0 0 16px; color: var(--ink); }

.post-image img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }

.chart svg { display: block; max-width: 600px; }
.chart-label { fill: var(--text); }
.chart-value, .chart-text { fill: var(--muted); }
.chart-bar.s0, .chart-swatch.s0 { fill: var(--accent); background: var(--accent); }
.chart-bar.s1, .chart-swatch.s1 { fill: #3f8f50; background: #3f8f50; }
.chart-bar.s2, .chart-swatch.s2 { fill: #d8ded8; background: #d8ded8; }
.chart-bar.s3, .chart-swatch.s3 { fill: #6f786f; background: #6f786f; }
.chart-line { stroke: rgba(109, 255, 139, 0.35); stroke-width: 2; fill: none; }
.chart-dot { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.chart-dot-number { fill: var(--accent); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; }
.chart-legend li { display: flex; align-items: center; gap: 8px; margin: 0; }
.chart-swatch { width: 14px; height: 14px; border-radius: 4px; }
.chart-data { margin-top: 8px; font-size: 15px; color: var(--muted); }
.chart-data summary { cursor: pointer; color: var(--accent-soft); }
.chart-data table { width: 100%; margin-top: 10px; border-collapse: collapse; }
.chart-data th, .chart-data td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.chart-data ol { margin: 10px 0 0; }

.post-draft { display: inline-block; margin: 0 0 18px; padding: 6px 14px; border: 1px solid #ffb86b; border-radius: 999px; color: #ffd6a8; font-size: 14px; font-weight: 700; }

@media (prefers-reduced-motion: no-preference) {
  .chart-bar { transform-box: fill-box; transform-origin: left center; transition: transform 0.9s var(--ease); }
  .js .chart:not(.is-visible) .chart-bar { transform: scaleX(0); }
  .motion-paused .chart .chart-bar { transform: none; transition: none; }
}
@media (max-width: 640px) {
  .post-figures ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-figures li { padding: 14px; }
  .post-steps li { padding-left: 46px; }
}
.chart-proceso svg { max-width: 540px; }
@media (max-width: 640px) {
  .chart svg { padding: 12px; }
}

.post-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.post-type { display: inline-block; margin-right: 8px; padding: 3px 10px; border: 1px solid rgba(109, 255, 139, 0.45); border-radius: 999px; letter-spacing: 0.08em; }

.post-progress { display: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .post-progress { display: block; position: fixed; inset: 0 0 auto; z-index: 60; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-soft)); transform-origin: 0 50%; animation: post-progress linear both; animation-timeline: scroll(root); pointer-events: none; }
  }
}
@keyframes post-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-path { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-path.s0 { stroke: var(--accent); }
.chart-path.s1 { stroke: #3f8f50; }
.chart-path.s2 { stroke: #d8ded8; }
.chart-path.s3 { stroke: #6f786f; }
.chart-point { stroke: var(--panel); stroke-width: 2; }
.chart-point.s0 { fill: var(--accent); }
.chart-point.s1 { fill: #3f8f50; }
.chart-point.s2 { fill: #d8ded8; }
.chart-point.s3 { fill: #6f786f; }
@media (prefers-reduced-motion: no-preference) {
  .chart-path { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease); }
  .js .chart:not(.is-visible) .chart-path { stroke-dashoffset: 1; }
  .chart-point, .chart-linea .chart-value, .chart-step { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
  .js .chart:not(.is-visible) .chart-point, .js .chart-linea:not(.is-visible) .chart-value { opacity: 0; }
  .chart-linea .chart-point, .chart-linea .chart-value { transition-delay: 0.9s; }
  .js .chart:not(.is-visible) .chart-step { opacity: 0; transform: translateY(10px); }
  .chart-step:nth-child(2) { transition-delay: 0.15s; }
  .chart-step:nth-child(3) { transition-delay: 0.3s; }
  .chart-step:nth-child(4) { transition-delay: 0.45s; }
  .chart-step:nth-child(5) { transition-delay: 0.6s; }
  .chart-step:nth-child(6) { transition-delay: 0.75s; }
  .chart-step:nth-child(n+7) { transition-delay: 0.9s; }
}

.post-gallery { margin: 32px 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.gallery-3 > :first-child { grid-column: 1 / -1; }
.gallery-grid figure { margin: 0; }
.gallery-grid img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.gallery-3 > :first-child img { aspect-ratio: 16 / 9; }
.gallery-grid figcaption, .gallery-note { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.ba-frame { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ba-pane { position: relative; display: grid; place-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.ba-frame.is-light .ba-pane { background: #f3f5f2; }
.ba-pane img { display: block; width: 100%; height: 100%; max-height: 420px; object-fit: contain; }
.ba-label { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 3px 10px; border-radius: 999px; background: rgba(2, 2, 2, 0.78); color: var(--text); font-size: 13px; font-weight: 700; }
.ba-after .ba-label { left: auto; right: 10px; color: var(--accent); }
.ba-compare.is-interactive .ba-frame { --pos: 50%; position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.ba-compare.is-interactive .ba-pane { position: absolute; inset: 0; padding: 24px; border: 0; border-radius: 0; }
.ba-compare.is-interactive .ba-before { z-index: 1; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-compare.is-interactive .ba-frame::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2; width: 2px; margin-left: -1px; background: var(--accent); pointer-events: none; }
.ba-range { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba-handle { position: absolute; top: 50%; left: var(--pos); z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; pointer-events: none; }
.ba-range:focus-visible + .ba-handle { outline: 3px solid var(--text); outline-offset: 3px; }

@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid img, .gallery-3 > :first-child img { aspect-ratio: 16 / 10; }
  .ba-frame { grid-template-columns: 1fr; }
  .ba-compare.is-interactive .ba-frame { aspect-ratio: 4 / 3; }
}

.post-video { margin: 32px 0; }
.post-video .yt { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.post-video a.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease), filter 0.6s var(--ease); }
.post-video a.yt:hover img { transform: scale(1.03); filter: brightness(0.8); }
.yt-play { position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 10px rgba(109, 255, 139, 0.18), 0 20px 50px rgba(0, 0, 0, 0.5); transition: transform 0.3s var(--ease); }
.yt-play::after { content: ""; position: absolute; top: 50%; left: 50%; margin: -13px 0 0 -8px; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent var(--on-accent); }
.post-video a.yt:hover .yt-play, .post-video a.yt:focus-visible .yt-play { transform: scale(1.08); }
.post-video iframe.yt { border: 0; }
.post-video figcaption small { display: block; margin-top: 4px; opacity: 0.75; }

img.is-zoomable { cursor: zoom-in; }
img.is-zoomable:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.lightbox { width: min(1400px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; background: transparent; color: var(--text); overflow: visible; }
.lightbox::backdrop { background: rgba(2, 2, 2, 0.88); backdrop-filter: blur(6px); }
.lightbox img { display: block; width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 14px; }
.lightbox-caption { margin: 12px 0 0; color: var(--muted); font-size: 14px; text-align: center; }
.lightbox-close { position: absolute; top: -14px; right: -6px; z-index: 2; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #0b0f0b; color: var(--text); font-size: 26px; line-height: 1; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox[open] { animation: post-rise 0.35s var(--ease); }
}

.post-sectionbar { display: none; }
@media (max-width: 1100px) {
  .post-sectionbar { display: block; position: fixed; top: 68px; left: 0; right: 0; z-index: 45; border-bottom: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transform: translateY(-110%); visibility: hidden; transition: transform 0.35s var(--ease), visibility 0.35s; }
  .post-sectionbar.is-on { transform: none; visibility: visible; }
  .post-sectionbar button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 var(--gutter); border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
  .post-sectionbar-label { flex: 0 0 auto; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
  .post-sectionbar-current { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 700; }
  .post-sectionbar button::after { content: ""; flex: 0 0 auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform 0.2s; }
  .post-sectionbar button[aria-expanded="true"]::after { transform: rotate(-135deg); }
  .post-sectionbar ol { max-height: 60vh; margin: 0; padding: 4px var(--gutter) 16px calc(var(--gutter) + 18px); overflow-y: auto; display: grid; gap: 4px; }
  .post-sectionbar a { display: block; padding: 8px 0; color: var(--muted); text-decoration: none; }
  .post-sectionbar ol[hidden] { display: none; }
}
@media (max-width: 820px) {
  .post-sectionbar { top: 60px; }
}

.post-versus { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 0 14px; margin: 36px 0; }
.vs-col { padding: 24px 22px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.vs-b { border-color: rgba(109, 255, 139, 0.35); background: linear-gradient(160deg, rgba(109, 255, 139, 0.09), var(--surface) 70%); }
.vs-title { margin: 0 0 14px; color: var(--text); font-size: 20px; font-weight: 800; }
.vs-b .vs-title { color: var(--accent); }
.post-body .vs-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.post-body .vs-col li { position: relative; margin: 0; padding-left: 30px; color: var(--ink); font-size: 16.5px; line-height: 1.5; }
.post-body .vs-col li::before { content: ""; position: absolute; top: 0.2em; left: 0; width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, 0.08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236dff8b' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; box-shadow: none; }
.vs-badge { align-self: center; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 14px; font-weight: 800; text-transform: uppercase; box-shadow: 0 0 0 8px rgba(109, 255, 139, 0.12); }
.vs-note { grid-column: 1 / -1; margin: 14px 0 0; color: var(--muted); font-size: 15px; }

.post-dato { margin: 40px 0; padding: clamp(24px, 4vw, 36px); border: 1px solid rgba(109, 255, 139, 0.3); border-radius: 24px; background: radial-gradient(600px 220px at 0% 0%, rgba(109, 255, 139, 0.14), transparent 70%), var(--surface); }
.post-dato-valor { display: block; color: var(--accent); font-size: clamp(64px, 11vw, 120px); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em; text-shadow: 0 0 40px rgba(109, 255, 139, 0.35); }
.post-dato figcaption { max-width: 560px; margin-top: 14px; color: var(--text); font-size: clamp(18px, 2vw, 21px); line-height: 1.45; }
.post-dato figcaption small { display: block; margin-top: 10px; color: var(--muted); font-size: 13px; }

@media (prefers-reduced-motion: no-preference) {
  .js .post-versus .vs-a, .js .post-versus .vs-b { transition: transform 0.8s var(--ease), opacity 0.8s var(--ease); }
  .js .post-versus:not(.is-visible) .vs-a { opacity: 0; transform: translateX(-28px); }
  .js .post-versus:not(.is-visible) .vs-b { opacity: 0; transform: translateX(28px); }
  .js .post-versus .vs-badge { transition: transform 0.6s var(--ease) 0.35s; }
  .js .post-versus:not(.is-visible) .vs-badge { transform: scale(0); }
  .js .post-versus li { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
  .js .post-versus:not(.is-visible) li { opacity: 0; transform: translateY(8px); }
  .js .post-versus li:nth-child(2) { transition-delay: 0.12s; }
  .js .post-versus li:nth-child(3) { transition-delay: 0.24s; }
  .js .post-versus li:nth-child(4) { transition-delay: 0.36s; }
  .js .post-versus li:nth-child(n+5) { transition-delay: 0.48s; }
  .js .post-dato .post-dato-valor { transition: transform 0.9s var(--ease), opacity 0.9s var(--ease); }
  .js .post-dato:not(.is-visible) .post-dato-valor { opacity: 0; transform: translateY(24px) scale(0.96); }
}
@media (max-width: 700px) {
  .post-versus { grid-template-columns: 1fr; gap: 12px; }
  .vs-badge { justify-self: center; width: 40px; height: 40px; margin: -4px 0; }
  .js .post-versus:not(.is-visible) .vs-a, .js .post-versus:not(.is-visible) .vs-b { transform: translateY(18px); }
}
