/* SmartHabit — hoja de estilos principal */
:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --text: #13201d;
  --muted: #55665f;
  --line: #dfe8e4;
  --brand: #0f766e;
  --brand-2: #14b8a6;
  --brand-ink: #ffffff;
  --accent: #f59e0b;
  --soft: #e8f5f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 34, .06), 0 6px 20px rgba(16, 40, 34, .06);
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1513;
    --surface: #131e1b;
    --text: #e6efec;
    --muted: #9db0a9;
    --line: #22312d;
    --brand: #2dd4bf;
    --brand-2: #14b8a6;
    --brand-ink: #05211d;
    --soft: #15302b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.65 var(--font); }
img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.section { padding: 48px 20px; }
.center { text-align: center; margin-top: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; }
.icon { flex: none; vertical-align: middle; }

/* Cabecera */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand b { color: var(--brand); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 500; }
.main-nav a:hover { background: var(--soft); color: var(--brand); }
.header-actions { display: flex; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 0; background: none; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--soft); }
.menu-toggle { display: none; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .main-nav { position: absolute; top: 66px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); display: none; margin: 0; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 8px 12px 16px; }
  .header-actions { margin-left: auto; }
}

/* Botones y etiquetas */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; text-decoration: none; border: 2px solid transparent; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-amazon { background: #ffb020; color: #1a1300; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--c); text-decoration: none; }
.meta { color: var(--muted); font-size: .88rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.eyebrow { color: var(--brand); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 12px; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* Portada */
.hero { background: linear-gradient(160deg, var(--soft), var(--bg) 70%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 64px 20px; }
.hero h1 span { display: block; color: var(--brand); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-art { justify-self: center; }
@media (max-width: 800px) { .hero-inner { grid-template-columns: 1fr; padding: 40px 20px; } .hero-art { display: none; } }
.section-title { font-size: 1.5rem; margin-bottom: 20px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-tile { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.cat-tile:hover { border-color: var(--c); transform: translateY(-2px); }
.cat-tile > span:last-child { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.cat-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); margin-bottom: 6px; }
.cat-icon.big { width: 60px; height: 60px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cat-grid { grid-template-columns: 1fr; } }
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.trust div { padding: 22px; border-radius: var(--radius); background: var(--soft); display: flex; flex-direction: column; gap: 4px; }
.trust span { color: var(--muted); font-size: .95rem; }
@media (max-width: 800px) { .trust { grid-template-columns: 1fr; } }

/* Tarjetas */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-feature { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }
.more { margin-top: 20px; }
@media (max-width: 960px) { .grid-feature { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid, .grid-3 { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card-cover { display: grid; place-items: center; height: 120px; color: var(--c); background:
  radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--c) 30%, transparent), transparent 55%),
  linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--surface)), color-mix(in srgb, var(--c) 6%, var(--surface))); }
.card-big .card-cover { height: 220px; }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 1.12rem; margin: 0; }
.card-big h3 { font-size: 1.5rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--brand); }
.card p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.card .meta { margin-top: auto; padding-top: 6px; }

/* Cabecera de páginas */
.page-head { background: linear-gradient(160deg, var(--soft), var(--bg)); border-bottom: 1px solid var(--line); padding: 48px 0 36px; }
.page-head .cat-icon { color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 14%, transparent); }
.search-form input { width: 100%; max-width: 620px; padding: 14px 18px; font: inherit; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); color: var(--text); }
.search-form input:focus { outline: none; border-color: var(--brand); }

/* Artículo */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-top: 28px; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: 1fr; } .sidebar { display: none; } }
.article { max-width: 760px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.article-head { margin-bottom: 24px; }
.article-head h1 { margin-top: 10px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 0 0 28px; }
.toc ol { margin: 8px 0 0; padding-left: 20px; }
.toc li { margin: 4px 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--brand); text-decoration: underline; }
.prose { font-size: 1.06rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h3 { font-size: 1.22rem; margin-top: 1.6em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.6em 0; padding: 16px 20px; border-left: 4px solid var(--brand); background: var(--soft); border-radius: 0 var(--radius) var(--radius) 0; }
.prose blockquote p:last-child { margin: 0; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; background: var(--surface); }
.prose th, .prose td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--soft); font-weight: 600; }
.prose tr:last-child td { border-bottom: 0; }
.aff { margin: 1.2em 0; }

/* Fichas de producto (Amazon) */
.product { display: grid; grid-template-columns: 150px 1fr; gap: 20px; margin: 1.4em 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pb-media { display: grid; place-items: center; border-radius: 12px; color: var(--brand); height: 150px; align-self: start;
  background: radial-gradient(circle at 75% 25%, color-mix(in srgb, var(--brand-2) 28%, transparent), transparent 60%), var(--soft); }
.pb-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.prose .pb-name { font-size: 1.15rem; margin: 0; line-height: 1.3; }
.prose .pb-ideal, .prose .pb-desc { margin: 0; font-size: .97rem; }
.pb-ideal { color: var(--muted); }
.prose .pb-list { list-style: none; padding: 0; margin: 2px 0 6px; font-size: .95rem; }
.prose .pb-list li { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0; }
.pb-list .ok { color: #16a34a; margin-top: 4px; }
.pb-list .ko { color: #dc2626; margin-top: 4px; }
.product .btn-amazon { align-self: flex-start; }
@media (max-width: 560px) { .product { grid-template-columns: 1fr; } .pb-media { min-height: 110px; } }
.disclosure { margin-top: 36px; font-size: .88rem; color: var(--muted); padding: 14px 18px; border: 1px dashed var(--line); border-radius: var(--radius); }
.sidebar .side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 64px; }
.side-box p { color: var(--muted); font-size: .92rem; }
.sticky { position: sticky; top: 90px; margin-top: 24px; }

/* Anuncios: separados del contenido y de la navegación (política de AdSense) */
.ad { margin: 32px 0; text-align: center; min-height: 100px; }
.ad-label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.ad-side { min-height: 600px; margin: 0; }
.ad-preview { display: grid; place-items: center; border: 2px dashed var(--line); border-radius: var(--radius); min-height: 250px; background: repeating-linear-gradient(45deg, transparent 0 12px, color-mix(in srgb, var(--line) 40%, transparent) 12px 24px); }
.ad-side.ad-preview { min-height: 600px; }

/* Pie */
.site-footer { margin-top: 48px; background: var(--surface); border-top: 1px solid var(--line); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding: 44px 20px 24px; }
.footer-grid p { color: var(--muted); max-width: 360px; }
.footer-grid h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { color: var(--brand); }
.brand-footer { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 18px 20px 28px; color: var(--muted); font-size: .85rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > div:first-child { grid-column: 1 / -1; } }

/* Calculadoras */
.section-intro { color: var(--muted); margin: -10px 0 18px; }
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 960px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card { display: flex; flex-direction: column; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.tool-card > span:last-child { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.calc { background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius); padding: 22px; margin: 0 0 28px; box-shadow: var(--shadow); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.calc label { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; }
.calc input[type=number], .calc select { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%; }
.calc input:focus, .calc select:focus { outline: 2px solid var(--brand); border-color: transparent; }
.calc-result { margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--soft); font-size: 1.05rem; }
.calc-result:empty { display: none; }
.calc-help { margin-top: 0; }
.calc-checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 8px 16px; }
.calc .calc-checks label, .calc .calc-row label { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; }
.calc input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.calc-rows { display: flex; flex-direction: column; gap: 8px; }
.calc-row { display: grid; grid-template-columns: 1fr 90px 20px; gap: 10px; align-items: center; }
.calc-price { margin-top: 14px; max-width: 220px; }
.calc-list { width: 100%; border-collapse: collapse; margin-top: 8px; }
.calc-list td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.calc-list .r { text-align: right; white-space: nowrap; }
.calc-list button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; }
.calc-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.calc-compare div { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.calc-compare .win { border-color: var(--brand); }
.calc-compare strong { font-size: 1.6rem; }
.calc-compare small, .muted { color: var(--muted); }
.calc-result p { margin: 10px 0 0; }
.calc-rows-h .calc-row { grid-template-columns: 1fr 84px 84px; }
.calc-row-head { font-size: .8rem; color: var(--muted); font-weight: 600; }
.calc-warn { color: #b45309; font-weight: 600; }
@media (max-width: 480px) { .calc-rows-h .calc-row { grid-template-columns: 1fr 64px 64px; gap: 6px; } }
/* Reloj de tramos horarios */
.tr-v { --tc: #16a34a; } .tr-l { --tc: #d97706; } .tr-p { --tc: #dc2626; }
.tr-now { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; border-radius: 12px; background: color-mix(in srgb, var(--tc) 12%, var(--surface)); border-left: 6px solid var(--tc); }
.tr-now strong { font-size: 2.2rem; line-height: 1.1; color: var(--tc); }
.tr-label { font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tr-bar { position: relative; display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; margin: 18px 0 6px; height: 26px; }
.tr-bar span { background: var(--tc); border-radius: 3px; opacity: .8; }
.tr-bar .tr-cur { opacity: 1; }
.tr-bar i { position: absolute; top: -5px; bottom: -5px; width: 3px; margin-left: -1px; background: var(--text); border-radius: 2px; }
.tr-legend { display: flex; gap: 16px; font-size: .85rem; color: var(--muted); }
.tr-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--tc); margin-right: 6px; }
.tr-next { margin: 14px 0 0; }
.tr-next:empty { display: none; }
/* Precio de la luz hoy (OMIE) */
.pl-strip { display: flex; align-items: center; gap: 14px; margin: 28px 0 0; padding: 14px 18px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--brand); color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.pl-strip:hover { border-color: var(--text); }
.pl-strip-ico { color: var(--brand); display: flex; }
.pl-strip-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: .95rem; }
.pl-strip-txt strong { font-size: 1.02rem; }
.pl-b { --tc: #16a34a; } .pl-m { --tc: #d97706; } .pl-c { --tc: #dc2626; }
.pl-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pl-tabs button { font: inherit; font-size: .9rem; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line, #d1d5db); background: var(--surface); color: var(--text); cursor: pointer; }
.pl-tabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pl-fecha { margin: 0 0 10px; }
.pl-now { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--tc) 12%, var(--surface)); border-left: 6px solid var(--tc); }
.pl-now strong { font-size: 2rem; line-height: 1.1; color: var(--tc); }
.pl-stats { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pl-stats li { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: .85rem; color: var(--muted); }
.pl-stats strong { color: var(--text); font-size: 1rem; }
.pl-chart { margin: 18px 0 4px; }
.pl-bars { display: grid; gap: 2px; align-items: end; height: 160px; }
.pl-bars span { background: var(--tc); border-radius: 3px 3px 0 0; opacity: .75; }
.pl-bars .pl-cur { opacity: 1; outline: 2px solid var(--text); outline-offset: 1px; }
.pl-labels { display: grid; gap: 2px; font-size: .72rem; color: var(--muted); margin-top: 4px; }
.pl-labels span { white-space: nowrap; overflow: visible; }
.pl-tabla table { width: 100%; font-size: .9rem; }
.pl-tabla tr td:first-child { border-left: 4px solid var(--tc); }

/* Fuentes, autor y boletín */
.sources { margin-top: 2.4em; padding: 18px 22px; border-radius: var(--radius); background: var(--soft); }
.prose .sources h2 { margin-top: 0; font-size: 1.2rem; }
.sources p { font-size: .95rem; }
.author-box { display: flex; gap: 14px; align-items: center; margin-top: 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.author-box img { border-radius: 14px; flex: none; }
.author-box p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.newsletter { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; margin: 32px 0; padding: 24px; border-radius: var(--radius); background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); }
.newsletter p { margin: 6px 0 0; opacity: .9; }
.nl-form { display: flex; flex-wrap: wrap; gap: 10px; }
.nl-form input[type=email] { flex: 1 1 200px; padding: 12px 16px; border-radius: 999px; border: 0; font: inherit; }
.nl-form .btn { background: var(--text); color: var(--surface); border: 0; cursor: pointer; }
.nl-legal { flex-basis: 100%; font-size: .82rem; display: flex; gap: 8px; align-items: center; }
.nl-legal a { color: inherit; }
@media (max-width: 760px) { .newsletter { grid-template-columns: 1fr; } }
.nl-msg { flex-basis: 100%; margin: 4px 0 0; font-weight: 600; }
.prose .pillar-link { margin-top: 1.6em; padding: 12px 16px; border-left: 4px solid var(--brand); background: var(--surface); border-radius: 0 12px 12px 0; font-weight: 600; }
.prose img { display: block; width: 100%; height: auto; margin: 1.6em 0; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }

/* Calculadoras insertables */
.embed-box { margin: 28px 0; padding: 16px 20px; border: 1px dashed var(--line, #cfdcd7); border-radius: var(--radius); }
.embed-box summary { cursor: pointer; font-weight: 700; }
.embed-box textarea { width: 100%; font: .85rem/1.4 ui-monospace, Consolas, monospace; padding: 10px; border-radius: 10px; border: 1px solid var(--line, #cfdcd7); background: var(--surface); color: var(--text); margin-bottom: 10px; resize: vertical; }
.embed-body { margin: 0; padding: 14px; background: var(--surface); }
.embed-title { font-weight: 800; font-size: 1.15rem; margin: 0 0 10px; }
.embed-credit { font-size: .82rem; margin: 12px 0 0; opacity: .85; }
.embed-body .calc { margin: 0; }
.nl-msg a { color: inherit; text-decoration: underline; }

/* Suscripción a mitad de guía: más discreta que la del final */
.newsletter.nl-inline { margin: 28px 0; padding: 18px 20px; background: var(--soft); color: var(--text); border: 1px solid var(--line); }
.newsletter.nl-inline p { opacity: .85; }
.newsletter.nl-inline .nl-form .btn { background: var(--brand); color: #fff; }
.newsletter.nl-inline .nl-form input[type=email] { border: 1px solid var(--line); }
/* «Pregúntanos» */
.ask-btn { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border: 0; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); cursor: pointer; }
.ask-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ask-panel { position: fixed; right: 16px; bottom: 76px; z-index: 51; width: min(400px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 100px)); display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.ask-panel[hidden] { display: none; }
.ask-head { display: flex; justify-content: space-between; align-items: center; }
.ask-close { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 4px; }
.ask-intro, .ask-foot { margin: 0; font-size: .85rem; color: var(--muted); }
#ask-q { font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%; }
#ask-q:focus { outline: 2px solid var(--brand); border-color: transparent; }
.ask-form { display: flex; gap: 8px; align-items: stretch; }
.ask-form #ask-q { flex: 1; min-width: 0; }
.ask-go { display: inline-flex; align-items: center; gap: 6px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700; cursor: pointer; flex: none; }
.ask-go:hover { filter: brightness(1.08); }
.ask-go:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (max-width: 380px) { .ask-go span { display: none; } .ask-go { padding: 0 12px; } }
/* Mientras escribes en una calculadora en el móvil, el botón del chat no tapa las casillas */
@media (max-width: 900px) { body.sh-typing .ask-btn { display: none; } }
.ask-results { overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.ask-item { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: var(--soft); color: var(--text); text-decoration: none; }
.ask-item:hover, .ask-item:focus { outline: 2px solid var(--brand); }
.ask-item span { font-size: .88rem; color: var(--muted); }
.ask-item small { color: var(--brand); font-weight: 600; }
.ask-sugg-title { margin: 0; font-size: .85rem; font-weight: 600; }
.ask-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.ask-sugg button { font: inherit; font-size: .85rem; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.ask-none { margin: 0; font-size: .9rem; }
@media (max-width: 600px) { .ask-btn span { display: none; } .ask-btn { padding: 14px; } }

/* ============================================================
   Rediseño (26/11/2026): tipografía, portada con buscador, tarjetas con imagen,
   artículos más cómodos de leer y detalles de interfaz. Sirve para los dos temas.
   ============================================================ */
:root {
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 16px;
}
h1, h2, h3, .section-title { font-family: var(--font-display); font-weight: 750; letter-spacing: -.022em; text-wrap: balance; }
p, li { text-wrap: pretty; }
h1 { font-size: clamp(2rem, 4.6vw, 3.05rem); line-height: 1.08; }
::selection { background: color-mix(in srgb, var(--brand-2) 35%, transparent); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }

/* Cabecera */
.site-header { transition: box-shadow .25s, background .25s; }
.site-header.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .35); }
.brand img { transition: transform .35s var(--ease); }
.brand:hover img { transform: rotate(-8deg) scale(1.06); }
.main-nav a { transition: background .15s, color .15s; }
.main-nav a[aria-current="page"] { color: var(--brand); background: color-mix(in srgb, var(--brand) 11%, transparent); }
@media (max-width: 900px) {
  .main-nav.open { box-shadow: 0 24px 30px -20px rgba(0, 0, 0, .35); }
  .main-nav ul a { padding: 12px 14px; font-size: 1.02rem; }
}

/* Portada: buscador, búsquedas populares y cifras */
.hero-inner { padding: 72px 20px 64px; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); margin-bottom: .35em; }
.hero .lead { max-width: 560px; }
.hero-search { display: flex; align-items: center; gap: 8px; max-width: 560px; margin-top: 26px; padding: 6px 6px 6px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.hero-search > svg { color: var(--muted); flex: none; }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--text); padding: 10px 4px; outline: none; }
.hero-search input::placeholder { color: var(--muted); opacity: .9; }
.hero-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent), var(--shadow); }
.hero-search .btn { padding: 11px 22px; cursor: pointer; }
.hero-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: .9rem; }
.hero-chips span { color: var(--muted); margin-right: 2px; }
.hero-chips a { padding: 6px 13px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 75%, transparent); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600; transition: border-color .15s, color .15s, transform .15s; }
.hero-chips a:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.hero-stats { list-style: none; padding: 0; margin: 30px 0 0; display: flex; gap: 30px; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; letter-spacing: -.03em; color: var(--brand); }
.hero-stats span { font-size: .85rem; color: var(--muted); margin-top: 5px; }
.hero-art { position: relative; }
.hero-art img { position: relative; animation: sh-float 7s ease-in-out infinite; }
.hero-orb { position: absolute; inset: 6% 4%; border-radius: 50%; background: radial-gradient(circle at 45% 45%, color-mix(in srgb, var(--brand-2) 38%, transparent), transparent 66%); filter: blur(12px); }
.hero-float { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .85rem; font-weight: 700; color: var(--text); white-space: nowrap; animation: sh-float 6s ease-in-out infinite; }
.hero-float svg { color: var(--brand); }
.hf-1 { right: -6%; bottom: 2%; animation-delay: -2s; }
.hf-2 { left: 0; top: 2%; animation-delay: -4s; }
@keyframes sh-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .hero-art img, .hero-float { animation: none; } }
@media (max-width: 800px) { .hero-inner { padding: 44px 20px 40px; } .hero-stats { gap: 22px; } .hero-stats strong { font-size: 1.65rem; } }
@media (max-width: 420px) { .hero-search { padding-left: 12px; } .hero-search .btn { padding: 10px 16px; } }
@media (max-width: 520px) {
  .eyebrow { font-size: .68rem; letter-spacing: .04em; white-space: nowrap; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .hero-stats span { font-size: .78rem; }
}

/* Temas */
.cat-tile > span:not(.cat-icon) { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.cat-count { margin-top: auto; padding-top: 10px; font-style: normal; font-size: .86rem; font-weight: 700; color: var(--c); display: inline-flex; align-items: center; gap: 4px; }
.cat-count svg, .tool-go svg { transition: transform .2s var(--ease); }
.cat-tile:hover .cat-count svg, .tool-card:hover .tool-go svg { transform: translateX(4px); }
.cat-tile { transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; }
.cat-tile:hover { transform: translateY(-4px); }

/* Tarjetas con imagen (toda la tarjeta se puede pulsar) */
.card { position: relative; transition: transform .25s var(--ease), box-shadow .25s; }
.card:hover { transform: translateY(-4px); }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card .badge { position: relative; z-index: 1; }
.card-cover { position: relative; overflow: hidden; }
.card.has-img .card-cover { display: block; height: auto; aspect-ratio: 16 / 9; background: #0b3f3b; }
.card.has-img .card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card:hover .card-cover img { transform: scale(1.06); }
.card-big h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.card-big .card-body { padding: 22px 24px 24px; gap: 10px; }
.grid-feature { grid-template-columns: 1.15fr 1fr; }
.grid-feature .grid { grid-template-columns: 1fr; gap: 14px; align-content: start; }
.grid-feature .grid .card { flex-direction: row; }
.grid-feature .grid .card.has-img .card-cover { flex: 0 0 36%; aspect-ratio: auto; min-height: 118px; }
.grid-feature .grid .card.has-img .card-cover img { position: absolute; inset: 0; }
.grid-feature .grid .card-body { padding: 14px 16px; gap: 6px; }
.grid-feature .grid .card h3 { font-size: 1.02rem; }
.grid-feature .grid .card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; }
.grid-feature .grid .card .meta { display: none; }
@media (max-width: 960px) { .grid-feature { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .grid-feature .grid .card .badge { display: none; } .grid-feature .grid .card p { display: none; } .grid-feature .grid .card.has-img .card-cover { flex-basis: 34%; min-height: 96px; } }

/* Calculadoras */
.calc input[inputmode=decimal] { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); width: 100%; }
.tool-card { transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; }
.tool-card:hover { transform: translateY(-4px); }
.tool-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tool-free { font-style: normal; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.tool-card > span:not(.tool-top) { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.tool-go { margin-top: auto; padding-top: 8px; font-size: .88rem; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; }

/* Confianza */
.trust div { gap: 6px; transition: transform .25s var(--ease); }
.trust .trust-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); margin-bottom: 6px; }

/* Artículo: progreso, portada, índice lateral */
/* Barra de progreso de lectura: bajo la cabecera, gruesa, con brillo, punta luminosa y etiqueta.
   El color pasa del turquesa al ámbar a medida que avanzas en la guía. */
.read-progress { --p: 0; position: fixed; top: 66px; left: 0; right: 0; height: 8px; z-index: 48; pointer-events: none; }
.rp-track { position: absolute; inset: 0; background: color-mix(in srgb, var(--brand) 20%, transparent); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12); }
.rp-fill { position: absolute; inset: 0; overflow: hidden; border-radius: 0 7px 7px 0;
  background: linear-gradient(90deg, #0d9488 0%, #14b8a6 18%, #22d3ee 38%, #a3e635 62%, #facc15 80%, #f59e0b 100%);
  clip-path: inset(-14px calc((1 - var(--p)) * 100%) -14px 0);
  box-shadow: 0 0 18px 2px color-mix(in srgb, #14b8a6 65%, transparent); }
.rp-fill::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 200px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent); transform: translateX(-220px); animation: rp-shine 2.8s ease-in-out infinite; }
@keyframes rp-shine { to { transform: translateX(100vw); } }
.rp-move { position: absolute; inset: 0; transform: translateX(calc(var(--p) * (100% - 22px))); }
.rp-head { position: absolute; left: 0; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: #fff; border: 4px solid #14b8a6;
  box-shadow: 0 0 0 4px color-mix(in srgb, #14b8a6 28%, transparent), 0 0 20px 5px color-mix(in srgb, #22d3ee 55%, transparent);
  opacity: 0; transition: opacity .25s, border-color .4s; }
.read-progress.rp-started .rp-head { opacity: 1; }
.rp-label { position: absolute; top: 19px; left: 0; transform: translateX(var(--lx, 10px)); padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .4); font: 700 .8rem/1 var(--font); color: var(--text); white-space: nowrap;
  opacity: 0; translate: 0 -6px; transition: opacity .3s, translate .3s; }
.rp-label b { color: var(--brand); }
.read-progress.rp-show .rp-label { opacity: 1; translate: 0 0; }
.read-progress.rp-done .rp-head { border-color: #f59e0b; }
.read-progress.rp-done .rp-label { color: var(--brand); }
.read-progress.rp-done .rp-fill { animation: rp-pulse 1.4s ease-out 1; }
@keyframes rp-pulse { 40% { box-shadow: 0 0 30px 7px rgba(245, 158, 11, .75); } }
@media (prefers-reduced-motion: reduce) { .rp-fill::after { display: none; } .read-progress.rp-done .rp-fill { animation: none; } }
@media (max-width: 600px) { .read-progress { height: 7px; } .rp-head { width: 19px; height: 19px; margin-top: -9.5px; } .rp-label { font-size: .76rem; } }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); }
.meta-author { display: inline-flex; align-items: center; gap: 7px; }
.meta-author img { border-radius: 8px; }
.article-cover { margin: 0 0 30px; border-radius: calc(var(--radius) + 4px); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16 / 9; background: #0b3f3b; }
.article-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 700px) { .article-cover { aspect-ratio: 21 / 9; } }
.sidebar .sticky { top: 88px; margin-top: 36px; display: flex; flex-direction: column; gap: 16px; }
.sidebar .side-box { margin-top: 0; }
.side-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 14px 12px; max-height: calc(100vh - 150px); overflow: auto; box-shadow: var(--shadow); }
.side-toc strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 6px 8px; }
.side-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.side-toc li { counter-increment: t; }
.side-toc a { display: flex; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .9rem; line-height: 1.35; transition: background .15s, color .15s; }
.side-toc a::before { content: counter(t); font-weight: 800; color: var(--brand); opacity: .75; min-width: 1.1em; }
.side-toc a:hover { background: var(--soft); color: var(--text); }
.side-toc a.active { background: color-mix(in srgb, var(--brand) 13%, transparent); color: var(--text); font-weight: 650; }
@media (min-width: 1001px) { .has-side-toc .article > .toc { display: none; } }
.toc ol { list-style: none; padding: 0; counter-reset: t; display: grid; gap: 2px; }
.toc li { counter-increment: t; margin: 0; }
.toc a { display: flex; gap: 10px; padding: 6px 8px; border-radius: 9px; }
.toc a::before { content: counter(t) "."; color: var(--brand); font-weight: 800; min-width: 1.3em; }
.toc a:hover { background: var(--soft); text-decoration: none; }

/* Texto del artículo */
.prose h2, .prose h3 { scroll-margin-top: 90px; }
.prose > h2::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; margin-bottom: 14px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.prose a { text-decoration-color: color-mix(in srgb, var(--brand) 45%, transparent); text-decoration-thickness: 2px; text-underline-offset: 3px; transition: text-decoration-color .15s; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose ul li::marker { color: var(--brand); }
.prose blockquote { position: relative; padding: 18px 20px 18px 56px; box-shadow: var(--shadow); }
.prose blockquote::before { content: "i"; position: absolute; left: 18px; top: 18px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font: 800 .85rem/1 var(--font-display); }
.table-wrap { box-shadow: var(--shadow); }
.prose thead th { background: color-mix(in srgb, var(--brand) 13%, var(--surface)); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.prose tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--soft) 55%, transparent); }
.prose tbody tr:hover td { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.prose tbody td:first-child { font-weight: 600; }
.faq-list { display: grid; gap: 12px; margin: 1em 0 1.4em; }
.faq-item { padding: 18px 20px 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.prose .faq-item h3 { margin: 0 0 10px; font-size: 1.08rem; display: flex; gap: 10px; align-items: flex-start; }
.prose .faq-item h3::before { content: "?"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin-top: -1px; border-radius: 8px; background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); font-size: .9rem; font-weight: 800; }

/* Compartir */
.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; margin: 36px 0 0; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.share-copy { display: flex; flex-direction: column; gap: 2px; }
.share-copy span { color: var(--muted); font-size: .92rem; }
.share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; font: inherit; font-size: .88rem; font-weight: 700; text-decoration: none; border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; transition: transform .15s, background .15s, color .15s, border-color .15s; }
.share-btn:hover { transform: translateY(-1px); }
.share-btn[hidden] { display: none; }
.share-wa:hover { background: #25d366; border-color: #25d366; color: #052e16; }
.share-tg:hover { background: #229ed9; border-color: #229ed9; color: #fff; }
.share-x:hover { background: var(--text); border-color: var(--text); color: var(--surface); }
.share-fb:hover { background: #1877f2; border-color: #1877f2; color: #fff; }
.share-pin:hover { background: #e60023; border-color: #e60023; color: #fff; }
.share-link:hover, .share-link.ok, .share-native { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }

/* Volver arriba */
.to-top { position: fixed; right: 22px; bottom: 84px; z-index: 49; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .25s, transform .25s, color .15s, border-color .15s; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--brand); border-color: var(--brand); }
@media (max-width: 900px) { body.sh-typing .to-top { display: none; } }

/* Pie */
.foot-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.footer-grid .foot-social a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; font-weight: 650; transition: border-color .15s, color .15s; }
.footer-grid .foot-social a:hover { border-color: var(--brand); }

/* 404 */
.page-404 .container { text-align: center; }
.page-404 .hero-search, .page-404 .hero-chips { margin-left: auto; margin-right: auto; justify-content: center; }
.big-404 { font-family: var(--font-display); font-size: clamp(4.5rem, 15vw, 8rem); font-weight: 800; line-height: 1; letter-spacing: -.05em; margin: 0 0 6px; background: linear-gradient(120deg, var(--brand), var(--brand-2) 55%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Aparición suave al hacer scroll (solo con JavaScript activado) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .7s var(--ease) !important; }
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Modo claro con más vida (solo afecta al tema claro)
   Fondo con degradado suave de la marca (turquesa + ámbar),
   tarjetas tipo cristal, títulos con degradado y sombras más cálidas.
   ============================================================ */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3faf8;
    --line: #d5e9e3;
    --soft: #e3f6f1;
    --shadow: 0 1px 2px rgba(15, 118, 110, .06), 0 10px 30px -8px rgba(15, 118, 110, .16);
    --glass: rgba(255, 255, 255, .78);
    --grad-brand: linear-gradient(120deg, #0f766e 0%, #0d9488 45%, #14b8a6 100%);
  }
  body { background: var(--bg); position: relative; isolation: isolate; }
  /* Fondo fijo: manchas de color muy suaves que se ven detrás de las tarjetas */
  body::before {
    content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
      radial-gradient(900px 600px at 0% 0%, rgba(20, 184, 166, .16), transparent 60%),
      radial-gradient(700px 500px at 100% 8%, rgba(245, 158, 11, .11), transparent 60%),
      radial-gradient(800px 600px at 85% 100%, rgba(13, 148, 136, .12), transparent 60%),
      radial-gradient(600px 500px at 10% 95%, rgba(250, 204, 21, .07), transparent 60%),
      linear-gradient(180deg, #f6fcfa 0%, #eef8f5 100%);
  }

  /* Cabecera de cristal */
  .site-header { background: rgba(255, 255, 255, .72); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom-color: rgba(15, 118, 110, .12); }
  .brand b { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

  /* Portada y cabeceras de página */
  .hero, .page-head {
    background:
      radial-gradient(600px 380px at 85% 20%, rgba(245, 158, 11, .24), transparent 65%),
      radial-gradient(700px 420px at 10% 0%, rgba(20, 184, 166, .30), transparent 65%),
      linear-gradient(160deg, rgba(227, 246, 241, .9), rgba(243, 250, 248, .4) 75%);
    border-bottom: 1px solid rgba(15, 118, 110, .10);
  }
  .hero h1 span, .page-head h1 {
    background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .hero-art img { filter: drop-shadow(0 18px 30px rgba(15, 118, 110, .18)); }
  .eyebrow { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(20, 184, 166, .12); border: 1px solid rgba(20, 184, 166, .25); }

  /* Botones */
  .btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 20px -6px rgba(13, 148, 136, .55); }
  .btn-primary:hover { box-shadow: 0 12px 26px -6px rgba(13, 148, 136, .6); }
  .btn-ghost { background: var(--glass); border-color: rgba(15, 118, 110, .18); }

  /* Títulos de sección con subrayado de color */
  .section-title { position: relative; padding-bottom: 10px; }
  .section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 46px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #0d9488, #f59e0b); }
  .center .section-title::after, .section-title.center::after { left: 50%; transform: translateX(-50%); }

  /* Tarjetas tipo cristal con brillo al pasar el ratón */
  .card, .cat-tile, .tool-card, .product, .calc, .pl-strip, .embed-box, .trust div, .share, .side-toc, .faq-item, .hero-search, .hero-float, .to-top {
    background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-color: rgba(15, 118, 110, .14); box-shadow: var(--shadow);
  }
  .card:hover, .cat-tile:hover, .tool-card:hover { box-shadow: 0 2px 4px rgba(15, 118, 110, .06), 0 18px 40px -10px rgba(15, 118, 110, .28); }
  .cat-tile { position: relative; overflow: hidden; }
  .cat-tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); opacity: .75; }
  .cat-icon { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--brand)) 22%, transparent); }
  .calc { border-color: #14b8a6; }
  .pl-strip { border-color: transparent; background:
      linear-gradient(#fbfefd, #fbfefd) padding-box,
      linear-gradient(120deg, #0d9488, #14b8a6 50%, #f59e0b) border-box; }
  .trust div { border: 1px solid rgba(15, 118, 110, .12); }

  /* Boletín: degradado más rico con un toque ámbar */
  .newsletter:not(.nl-inline) {
    background:
      radial-gradient(500px 260px at 100% 0%, rgba(245, 158, 11, .35), transparent 60%),
      linear-gradient(120deg, #0f766e, #0d9488 50%, #14b8a6);
    color: #fff; box-shadow: 0 18px 40px -14px rgba(13, 148, 136, .55);
  }
  .newsletter.nl-inline { background: var(--glass); }

  /* Citas y resúmenes dentro de los artículos */
  .prose blockquote { background: linear-gradient(90deg, rgba(20, 184, 166, .12), rgba(20, 184, 166, .03)); }

  /* Pie de página */
  .embed-body::before { display: none; }
  .site-footer { background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(227, 246, 241, .9)); border-top-color: rgba(15, 118, 110, .12); }
}
@media (prefers-color-scheme: light) and (prefers-reduced-transparency: reduce) {
  .card, .cat-tile, .tool-card, .product, .calc, .embed-box, .trust div, .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
}

/* Línea de autor y fechas del artículo, en bloques que se colocan bien en el móvil */
.article-meta { gap: 6px 16px; }
.article-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .meta-rev { color: var(--brand); font-weight: 650; }

/* Móvil: el artículo nunca se ensancha por una tabla larga; la tabla se desliza dentro de su recuadro */
.article-layout > * { min-width: 0; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .prose thead th { text-transform: none; letter-spacing: 0; font-size: .85rem; }
  .prose th, .prose td { padding: 9px 11px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
}

/* Boletín: campo trampa invisible para robots y mensajes de error legibles */
.nl-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.nl-msg.nl-err { background: rgba(255, 255, 255, .94); color: #b91c1c; padding: 8px 12px; border-radius: 10px; font-weight: 650; }
