/* =========================================================
   Cuánto Cuesta Reformar · Hoja de estilos principal
   Mobile-first · sin dependencias externas
   ========================================================= */

:root {
  --navy: #14233a;
  --navy-2: #1d3150;
  --navy-3: #2a4268;
  --ink: #1b2430;
  --muted: #5d6673;
  --stone: #e9e5dd;
  --stone-2: #f3f0ea;
  --paper: #faf8f4;
  --white: #ffffff;
  --line: #dcd6cb;
  --copper: #b5622f;
  --copper-2: #c97a45;
  --copper-soft: #f6e8dd;
  --green: #2e7d5b;
  --green-soft: #e3f1ea;
  --amber: #a26a10;
  --amber-soft: #fbf0d9;
  --red-soft: #fbe6e3;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 35, 58, .06), 0 6px 20px rgba(20, 35, 58, .06);
  --shadow-lg: 0 2px 6px rgba(20, 35, 58, .08), 0 18px 40px rgba(20, 35, 58, .12);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  --wrap: 1180px;
  --gutter: 16px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
/* Solo se frenan efectos intrusivos con movimiento reducido (Windows lo activa por defecto en muchos equipos) */
@media (prefers-reduced-motion: reduce) { .hero::before { animation-duration: 60s; } }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.65; color: var(--ink);
  background: var(--paper); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
svg[viewBox="0 0 24 24"] { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -0.2em; }
.updated-note span, .answer-label { display: inline-flex; align-items: center; gap: 6px; }
a { color: var(--navy-3); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--copper); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--navy); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); font-weight: 750; letter-spacing: -.025em; }
h2 { font-size: clamp(1.4rem, 4vw, 1.85rem); font-weight: 700; }
h3 { font-size: 1.18rem; font-weight: 650; }
p { margin: 0 0 1em; }
small { font-size: .85em; }
:focus-visible { outline: 3px solid var(--copper-2); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 200; }
.skip-link:focus { top: 8px; color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.section--stone { background: var(--stone-2); border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone); }
.section--navy { background: var(--navy); color: #dfe6f0; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.section-head p { color: var(--muted); max-width: 640px; margin: 0; }
.section--navy .section-head p { color: #b8c4d6; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--copper); margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: .98rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--copper); color: #fff; box-shadow: 0 6px 16px rgba(181, 98, 47, .28); }
.btn--primary:hover { background: #a1552a; color: #fff; }
.btn--dark { background: var(--navy); color: #fff; }
.btn--dark:hover { background: var(--navy-2); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn--light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.btn--light:hover { background: rgba(255,255,255,.18); color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(250, 248, 244, .92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--stone); }
.header-bar { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); margin-right: auto; }
.brand:hover { color: var(--navy); }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 750; font-size: 1.02rem; letter-spacing: -.02em; line-height: 1.05; }
.brand-name span { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--copper); }
.nav-main { display: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; background: transparent; border: 1px solid transparent; color: var(--navy); cursor: pointer; transition: background .18s; }
.icon-btn:hover { background: var(--stone-2); }
.icon-btn svg { width: 22px; height: 22px; }

.drawer { position: fixed; inset: var(--header-h) 0 0 0; background: var(--paper); z-index: 99; overflow-y: auto; padding: 18px var(--gutter) 40px; transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility .28s; }
.drawer.is-open { transform: none; visibility: visible; }
.drawer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 18px 0 8px; }
.drawer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.drawer-list a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--white); border: 1px solid var(--stone); text-decoration: none; color: var(--navy); font-weight: 600; }
.drawer-list a svg { width: 22px; height: 22px; color: var(--copper); flex: none; }
body.no-scroll { overflow: hidden; }

@media (min-width: 1024px) {
  .nav-main { display: flex; align-items: center; gap: 2px; }
  .nav-main > a, .nav-main .nav-drop > button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--navy); font-weight: 600; font-size: .95rem; text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit; }
  .nav-main > a:hover, .nav-main .nav-drop > button:hover, .nav-drop.is-open > button { background: var(--stone-2); color: var(--navy); }
  .nav-drop { position: relative; }
  .nav-drop > button svg { width: 14px; height: 14px; transition: transform .2s; }
  .nav-drop.is-open > button svg { transform: rotate(180deg); }
  .mega { position: absolute; top: calc(100% + 10px); left: -120px; width: 640px; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; }
  .nav-drop.is-open .mega { opacity: 1; visibility: visible; transform: none; }
  .mega a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--navy); }
  .mega a:hover { background: var(--stone-2); }
  .mega a svg { width: 26px; height: 26px; color: var(--copper); flex: none; margin-top: 2px; }
  .mega strong { display: block; font-size: .95rem; }
  .mega small { color: var(--muted); font-size: .8rem; line-height: 1.35; display: block; }
  .menu-toggle { display: none; }
}

/* ---------- Buscador superpuesto ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(20, 35, 58, .55); display: none; padding: 12px; }
.search-overlay.is-open { display: block; }
.search-panel { max-width: 720px; margin: 6vh auto 0; background: var(--paper); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; max-height: 86vh; display: flex; flex-direction: column; }
.search-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--stone); background: var(--white); }
.search-field svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.search-field input { flex: 1; border: 0; font-size: 1.1rem; font-family: inherit; background: transparent; color: var(--ink); min-width: 0; padding: 8px 0; }
.search-field input:focus { outline: none; }
.search-field, .search-filters, .search-hint { flex: none; }
.search-filters { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px; border-bottom: 1px solid var(--stone); scrollbar-width: thin; }
.chip { flex: none; border: 1px solid var(--line); background: var(--white); color: var(--navy); border-radius: 999px; padding: 6px 12px; font-size: .84rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.search-results { overflow-y: auto; padding: 8px; }
.search-results ol { list-style: none; margin: 0; padding: 0; }
.result a { display: block; padding: 12px 14px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.result a:hover, .result a:focus { background: var(--white); box-shadow: var(--shadow); }
.result-type { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--copper); }
.result-title { display: block; font-weight: 650; color: var(--navy); margin: 2px 0; }
.result-desc { display: block; font-size: .9rem; color: var(--muted); line-height: 1.45; }
.result mark { background: var(--copper-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
.search-empty { padding: 26px 16px; text-align: center; color: var(--muted); }
.search-hint { padding: 10px 16px 14px; font-size: .82rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, rgba(201, 122, 69, .18), transparent 60%), linear-gradient(180deg, var(--navy) 0%, #182b47 100%); color: #dfe6f0; padding: 44px 0 56px; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 85%); -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 85%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2.2rem, 8vw, 3.8rem); margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--copper-2); }
.hero-lead { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: #c6d1e1; max-width: 620px; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.hero-grid { display: grid; gap: 30px; }
.quick-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-cat { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #fff; text-decoration: none; transition: background .2s, transform .2s, border-color .2s; }
.quick-cat:hover { background: rgba(255,255,255,.11); border-color: rgba(201,122,69,.6); transform: translateY(-2px); color: #fff; }
.quick-cat svg { width: 30px; height: 30px; color: var(--copper-2); }
.quick-cat strong { font-size: 1rem; }
.quick-cat small { color: #aebbd0; font-size: .82rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; font-size: .86rem; color: #aebbd0; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { width: 16px; height: 16px; color: #7fc4a2; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 84px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; }
}

/* ---------- Tarjetas ---------- */
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } .grid--4 { grid-template-columns: repeat(4, 1fr); } }
.card { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d2cabd; }
.card-media { aspect-ratio: 16 / 9; background: var(--stone-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-kicker { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--copper); }
.card h3 { margin: 0; font-size: 1.08rem; }
.card h3 a { color: var(--navy); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; line-height: 1.5; }
.card-price { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; gap: 6px; font-weight: 700; color: var(--green); font-size: .98rem; border-top: 1px dashed var(--stone); }
.card-price small { color: var(--muted); font-weight: 500; }
.tag-pilar { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--navy); color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }

.cat-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--copper-2); color: var(--ink); }
.cat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--copper-soft); color: var(--copper); flex: none; }
.cat-icon svg { width: 26px; height: 26px; }
.cat-card strong { display: block; color: var(--navy); font-size: 1.02rem; margin-bottom: 2px; }
.cat-card span { color: var(--muted); font-size: .88rem; line-height: 1.45; display: block; }
.cat-card em { font-style: normal; display: inline-block; margin-top: 6px; font-size: .8rem; font-weight: 700; color: var(--copper); }

/* ---------- Calculadoras ---------- */
.calc { background: var(--white); border: 1px solid var(--stone); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; }
.calc-head { padding: 18px 20px; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; display: flex; align-items: center; gap: 12px; }
.calc-head h2, .calc-head h3 { color: #fff; margin: 0; font-size: 1.15rem; }
.calc-head p { margin: 2px 0 0; color: #c2cde0; font-size: .86rem; }
.calc-head svg { width: 32px; height: 32px; color: var(--copper-2); flex: none; }
.calc-body { padding: 20px; display: grid; gap: 22px; }
@media (min-width: 900px) { .calc-body--split { grid-template-columns: 1.1fr .9fr; align-items: start; } }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field > label, .field > .label { font-weight: 650; color: var(--navy); font-size: .95rem; }
.field-hint { font-size: .82rem; color: var(--muted); margin-top: -4px; }
.input, select.input { width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 1rem; font-family: inherit; background: var(--paper); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--navy-3); box-shadow: 0 0 0 4px rgba(42, 66, 104, .12); }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--copper); height: 30px; }
.range-row .input { width: 110px; text-align: center; font-weight: 700; }
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 48px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--navy); background: var(--paper); transition: border-color .15s, background .15s, color .15s; line-height: 1.25; }
.seg label small { font-weight: 500; color: var(--muted); font-size: .75rem; }
.seg input:checked + label { border-color: var(--navy); background: var(--navy); color: #fff; }
.seg input:checked + label small { color: #c2cde0; }
.seg input:focus-visible + label { outline: 3px solid var(--copper-2); outline-offset: 2px; }
.checks { display: grid; gap: 8px; }
@media (min-width: 560px) { .checks { grid-template-columns: 1fr 1fr; } }
.check { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--paper); font-size: .92rem; font-weight: 550; color: var(--navy); transition: border-color .15s, background .15s; }
.check input { width: 20px; height: 20px; accent-color: var(--copper); flex: none; }
.check:has(input:checked) { border-color: var(--copper-2); background: var(--copper-soft); }
.result-box { background: var(--stone-2); border: 1px solid var(--stone); border-radius: 16px; padding: 18px; position: sticky; top: calc(var(--header-h) + 14px); }
.result-label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.result-main { font-family: var(--font-display); font-size: clamp(2rem, 7vw, 2.6rem); font-weight: 800; color: var(--green); letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.result-sub { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.scenario { background: var(--white); border-radius: 12px; padding: 10px; text-align: center; border: 1px solid var(--stone); }
.scenario span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.scenario strong { display: block; font-size: 1.02rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.scenario--med { border-color: var(--green); background: var(--green-soft); }
.scenario--med strong { color: var(--green); }
.breakdown { width: 100%; border-collapse: collapse; font-size: .88rem; background: var(--white); border-radius: 12px; overflow: hidden; }
.breakdown th, .breakdown td { padding: 8px 10px; border-bottom: 1px solid var(--stone); text-align: left; vertical-align: top; }
.breakdown td.num, .breakdown th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.breakdown tfoot td { font-weight: 800; color: var(--navy); border-bottom: 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; vertical-align: middle; white-space: nowrap; }
.badge--ok { background: var(--green-soft); color: var(--green); }
.badge--one { background: #e6edf7; color: var(--navy-3); }
.badge--demo { background: var(--amber-soft); color: var(--amber); }
.badge--calc { background: #eceae5; color: #5d6673; }
.calc-warning.calc-warning--info { background: #e8eef7; color: #22395c; border-color: #cfdcef; }
.calc-warning.calc-warning--info a { color: inherit; font-weight: 650; }
.calc-warning { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--amber-soft); color: #6d4a0c; font-size: .86rem; line-height: 1.5; border: 1px solid #efd9a8; }
.calc-warning svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.calc-note { font-size: .82rem; color: var(--muted); margin-top: 12px; }
.calc-link { margin-top: 12px; display: inline-flex; font-weight: 650; font-size: .92rem; }
.calc-empty { color: var(--muted); font-size: .92rem; }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.4em; border: 1px solid var(--stone); border-radius: var(--radius); background: var(--white); }
table.prices, .content table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 520px; }
table.prices th, table.prices td, .content table th, .content table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--stone); vertical-align: top; }
table.prices thead th, .content table thead th { background: var(--stone-2); color: var(--navy); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; white-space: nowrap; }
table.prices tbody tr:last-child td, .content table tbody tr:last-child td { border-bottom: 0; }
table.prices tbody tr:hover { background: #fcfbf8; }
table.prices td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.prices td.num.med { color: var(--green); font-weight: 750; }
table.prices .concept { font-weight: 600; color: var(--navy); }
table.prices .unit { color: var(--muted); font-size: .82rem; display: block; font-weight: 500; }
.price-meta { font-size: .84rem; color: var(--muted); margin: -0.6em 0 1.4em; }
.price-meta summary { cursor: pointer; font-weight: 650; color: var(--navy-3); padding: 6px 0; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.price-meta summary::-webkit-details-marker { display: none; }
.price-meta summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--stone); color: var(--navy); font-weight: 800; font-size: .8rem; }
.price-meta[open] summary::before { content: "−"; }
.price-meta dl { margin: 8px 0 0; display: grid; gap: 10px; }
.price-meta .pm-item { background: var(--white); border: 1px solid var(--stone); border-radius: 12px; padding: 12px 14px; }
.price-meta .pm-item strong { color: var(--navy); display: block; margin-bottom: 4px; }
.price-meta .pm-item p { margin: 2px 0; }
.price-meta .pm-item a { word-break: break-word; }

/* ---------- Artículo ---------- */
.breadcrumbs { font-size: .85rem; color: var(--muted); padding: 16px 0 0; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; color: #b4ab9c; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--copper); }
.article-head { padding: 18px 0 8px; }
.article-head .cat-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--copper); text-decoration: none; background: var(--copper-soft); padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; }
.article-head .lead { font-size: 1.12rem; color: #3d4654; max-width: 760px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; color: var(--muted); font-size: .88rem; margin: 14px 0 20px; }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.meta-row svg { width: 16px; height: 16px; }
.meta-row strong { color: var(--navy); font-weight: 650; }
.hero-figure { margin: 0 0 8px; border-radius: 18px; overflow: hidden; background: var(--stone-2); border: 1px solid var(--stone); aspect-ratio: 21 / 9; }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.article-layout { display: grid; gap: 32px; padding: 26px 0 40px; grid-template-columns: minmax(0, 1fr); }
.article-layout > *, .calc-body > *, .grid > *, .hero-grid > *, .page-hero-grid > * { min-width: 0; }
@media (max-width: 899px) { .hero-art { display: none; } }
@media (min-width: 1024px) { .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; } }
.sidebar { display: none; }
@media (min-width: 1024px) { .sidebar { display: block; } .sidebar-inner { position: sticky; top: calc(var(--header-h) + 18px); display: grid; gap: 18px; } }
.toc { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); padding: 16px; font-size: .9rem; }
.toc-title { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; line-height: 1.35; }
.toc a::before { content: counter(toc, decimal-leading-zero); color: #b4ab9c; font-size: .78rem; font-weight: 700; padding-top: 1px; font-variant-numeric: tabular-nums; }
.toc a:hover, .toc a.is-active { background: var(--stone-2); color: var(--navy); }
.toc a.is-active::before { color: var(--copper); }
.toc-mobile { margin: 0 0 24px; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); }
.toc-mobile summary { padding: 14px 16px; font-weight: 700; color: var(--navy); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "▾"; color: var(--copper); transition: transform .2s; }
.toc-mobile[open] summary::after { transform: rotate(180deg); }
.toc-mobile .toc { border: 0; padding-top: 0; }
@media (min-width: 1024px) { .toc-mobile { display: none; } }

.answer { background: var(--white); border: 1px solid var(--stone); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 20px; margin-bottom: 26px; box-shadow: var(--shadow); }
.answer-label { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.answer p { font-size: 1.06rem; margin-bottom: 14px; }
.answer p:last-child { margin-bottom: 0; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.summary-cell { background: var(--stone-2); border-radius: 12px; padding: 12px 14px; }
.summary-cell span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; line-height: 1.3; }
.summary-cell strong { display: block; font-size: 1.12rem; color: var(--navy); font-variant-numeric: tabular-nums; margin-top: 2px; }
.summary-cell.is-key { background: var(--green-soft); }
.summary-cell.is-key strong { color: var(--green); }
.updated-note { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .82rem; color: var(--muted); margin-top: 12px; }

.content { font-size: 1.04rem; }
.content > h2 { margin-top: 2.1em; padding-top: .2em; }
.content > h2:first-child { margin-top: 0; }
.content h3 { margin-top: 1.6em; }
.content ul, .content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.content li { margin-bottom: .45em; }
.content li::marker { color: var(--copper); }
.content strong { color: var(--navy); }
.content blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--copper-2); color: #3d4654; }
.callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--radius); margin: 1.4em 0; font-size: .97rem; line-height: 1.55; }
.callout svg { width: 22px; height: 22px; flex: none; margin-top: 1px; }
.callout p:last-child { margin: 0; }
.callout--tip { background: var(--green-soft); color: #1f5a41; }
.callout--warn { background: var(--amber-soft); color: #6d4a0c; }
.callout--info { background: #e8eef7; color: #22395c; }
.callout strong { color: inherit; }
.example { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); padding: 18px; margin: 1.4em 0; }
.example-title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.example-title svg { width: 20px; height: 20px; color: var(--copper); }
.calc-cta { display: grid; gap: 14px; align-items: center; padding: 20px; border-radius: 18px; margin: 2em 0; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #d7e0ec; }
.calc-cta strong { color: #fff; display: block; font-size: 1.1rem; margin-bottom: 4px; }
.calc-cta p { margin: 0; font-size: .93rem; }
@media (min-width: 640px) { .calc-cta { grid-template-columns: auto 1fr auto; } }
.calc-cta svg.cta-icon { width: 42px; height: 42px; color: var(--copper-2); }
.faq { display: grid; gap: 10px; margin: 0 0 1.4em; }
.faq details { background: var(--white); border: 1px solid var(--stone); border-radius: 12px; }
.faq summary { padding: 14px 16px; cursor: pointer; font-weight: 650; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--copper); font-size: 1.3rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-a { padding: 0 16px 14px; color: #3d4654; }
.faq .faq-a p:last-child { margin: 0; }
.sources { font-size: .9rem; background: var(--stone-2); border-radius: var(--radius); padding: 18px 20px; }
.sources ol { margin: 0; padding-left: 1.2em; }
.sources li { margin-bottom: 8px; word-break: break-word; }
.sources .src-type { color: var(--muted); font-size: .82rem; }
.author-box { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); padding: 18px; margin: 2em 0 0; }
.author-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.author-avatar svg { width: 28px; height: 28px; }
.author-box p { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.related { padding: 40px 0 56px; background: var(--stone-2); border-top: 1px solid var(--stone); }

/* ---------- Publicidad (desactivada hasta configurar AdSense) ---------- */
.ad-slot { display: none; }
html.ads-on .ad-slot { display: block; margin: 28px auto; text-align: center; min-height: 280px; max-width: 100%; position: relative; }
html.ads-on .ad-slot::before { content: "Publicidad"; display: block; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #a39b8e; margin-bottom: 6px; }
html.ads-on .ad-slot--sidebar { min-height: 600px; margin: 0; }
html.ads-on .ad-slot--side-table { min-height: 250px; }

/* ---------- Bloques portada ---------- */
.price-board { display: grid; gap: 10px; }
.board-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 14px 16px; background: var(--white); border: 1px solid var(--stone); border-radius: 12px; text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.board-row:hover { border-color: var(--copper-2); box-shadow: var(--shadow); color: var(--ink); }
.board-row strong { color: var(--navy); font-size: .98rem; }
.board-row small { color: var(--muted); grid-column: 1; font-size: .8rem; }
.board-row .board-val { grid-row: 1 / span 2; grid-column: 2; text-align: right; font-weight: 800; color: var(--green); font-variant-numeric: tabular-nums; white-space: nowrap; }
.board-row .board-val span { display: block; font-size: .74rem; font-weight: 600; color: var(--muted); }
.cities { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .cities { grid-template-columns: repeat(4, 1fr); } }
.city { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #fff; text-decoration: none; font-weight: 650; transition: background .2s, border-color .2s; }
.city:hover { background: rgba(255,255,255,.12); border-color: var(--copper-2); color: #fff; }
.city small { display: block; color: #aebbd0; font-weight: 500; font-size: .76rem; }
.city svg { width: 18px; height: 18px; color: var(--copper-2); flex: none; }
.compare { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); padding: 20px; }
.compare h3 { margin-bottom: 14px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .88rem; }
.bar-row span { color: var(--navy); font-weight: 600; }
.bar-track { position: relative; height: 26px; background: var(--stone-2); border-radius: 8px; }
.bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: linear-gradient(90deg, #d8a27d, var(--copper)); display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; color: #fff; font-size: .76rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 72px; }
.compare-foot { font-size: .8rem; color: var(--muted); margin-top: 12px; }
.method-steps { display: grid; gap: 14px; counter-reset: step; }
@media (min-width: 860px) { .method-steps { grid-template-columns: repeat(4, 1fr); } }
.method-step { counter-increment: step; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 18px; }
.method-step::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; color: var(--copper-2); margin-bottom: 6px; }
.method-step h3 { font-size: 1.02rem; margin-bottom: 6px; }
.method-step p { font-size: .9rem; color: #b8c4d6; margin: 0; }
.newsletter { display: grid; gap: 18px; padding: 26px; border-radius: 20px; background: var(--white); border: 1px solid var(--stone); box-shadow: var(--shadow); }
@media (min-width: 860px) { .newsletter { grid-template-columns: 1.1fr 1fr; align-items: center; padding: 34px; } }
.newsletter form { display: grid; gap: 10px; }
.newsletter .nl-row { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter .input { flex: 1 1 220px; }
.newsletter .nl-note { font-size: .8rem; color: var(--muted); margin: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: .76rem; font-weight: 700; }

.plan-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 720px) { .plan-list { grid-template-columns: 1fr 1fr; } }
.plan-list li { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--white); border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: .92rem; }
.plan-list li svg { width: 18px; height: 18px; color: #b4ab9c; flex: none; margin-top: 2px; }
.highlights { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.highlights li { display: flex; gap: 10px; align-items: flex-start; }
.highlights li svg { width: 20px; height: 20px; color: var(--green); flex: none; margin-top: 3px; }
.page-hero { background: linear-gradient(180deg, var(--stone-2), var(--paper)); border-bottom: 1px solid var(--stone); padding: 8px 0 34px; }
.page-hero .lead { font-size: 1.1rem; color: #3d4654; max-width: 760px; }
.page-hero-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .page-hero-grid { grid-template-columns: 1.3fr .7fr; } }
.page-hero-art { border-radius: 18px; overflow: hidden; border: 1px solid var(--stone); background: var(--white); }
.prose { max-width: 780px; }
.legal-fill { background: var(--amber-soft); color: #6d4a0c; padding: 1px 6px; border-radius: 4px; font-weight: 650; }
.legal-review { border: 1.5px dashed #e0b85c; background: #fffaf0; border-radius: var(--radius); padding: 14px 16px; margin: 0 0 1.6em; font-size: .93rem; color: #6d4a0c; }
.contact-card { background: var(--white); border: 1px solid var(--stone); border-radius: var(--radius); padding: 22px; }

/* ---------- Pie ---------- */
.site-footer { background: #101c2e; color: #a9b6c9; padding: 48px 0 24px; font-size: .92rem; }
.site-footer a { color: #d5deea; text-decoration: none; }
.site-footer a:hover { color: var(--copper-2); }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand .brand-name { color: #fff; }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between; font-size: .82rem; color: #7f8ca0; }
.footer-disclaimer { font-size: .82rem; color: #8492a7; margin-top: 12px; line-height: 1.55; }

/* ---------- Utilidades ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.muted { color: var(--muted); }
.stack-sm > * + * { margin-top: 8px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.back-top { position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; border: 0; display: grid; place-items: center; box-shadow: var(--shadow-lg); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s; }
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-top svg { width: 20px; height: 20px; }
.notfound { text-align: center; padding: 80px 0; }
.notfound .big { font-family: var(--font-display); font-size: 5rem; font-weight: 800; color: var(--copper); line-height: 1; }
/* =========================================================
   Efectos premium (moderados, sin librerías)
   ========================================================= */
:root { --ease-soft: cubic-bezier(.16, 1, .3, 1); }

/* Transición suave entre páginas (navegadores compatibles; el resto navega normal) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: var(--ease-soft); }

/* Fondo de la portada: degradado vivo muy lento, sin filtros caros */
@property --mesh-x { syntax: "<percentage>"; inherits: false; initial-value: 75%; }
@property --mesh-y { syntax: "<percentage>"; inherits: false; initial-value: 10%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(45% 55% at var(--mesh-x) var(--mesh-y), rgba(201, 122, 69, .22), transparent 70%),
              radial-gradient(35% 45% at calc(100% - var(--mesh-x)) 90%, rgba(127, 196, 162, .10), transparent 70%);
  animation: meshShift 24s ease-in-out infinite alternate; }
@keyframes meshShift { 0% { --mesh-x: 78%; --mesh-y: 8%; } 50% { --mesh-x: 58%; --mesh-y: 30%; } 100% { --mesh-x: 88%; --mesh-y: 18%; } }

/* Entrada escalonada del titular de portada (el texto existe en el HTML: si no hay animación, se ve igual) */
.hero-intro > * { animation: heroUp .8s var(--ease-soft) both; }
.hero-intro > :nth-child(2) { animation-delay: .06s; } .hero-intro > :nth-child(3) { animation-delay: .12s; }
.hero-intro > :nth-child(4) { animation-delay: .18s; } .hero-intro > :nth-child(5) { animation-delay: .24s; }
.hero-intro > :nth-child(6) { animation-delay: .3s; }
.hero-art { animation: heroUp 1s .2s var(--ease-soft) both; }
@keyframes heroUp { from { opacity: 0; transform: translateY(18px); } }

/* Cabecera: sombra al desplazarse */
.site-header { transition: box-shadow .3s ease, background .3s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(20, 35, 58, .08); background: rgba(250, 248, 244, .97); }

/* Barra de progreso de lectura (artículos) */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: linear-gradient(90deg, #d8a27d, var(--copper)); transform-origin: 0 0; transform: scaleX(0); }

/* Subrayado animado en el menú de escritorio */
@media (min-width: 1024px) {
  .nav-main > a { position: relative; }
  .nav-main > a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 7px; height: 2px; border-radius: 2px; background: var(--copper); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-soft); }
  .nav-main > a:hover::after { transform: scaleX(1); transform-origin: left; }
}

/* Botones y tarjetas: elevación y halo que sigue al cursor, solo con ratón */
@media (hover: hover) {
  .btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(181, 98, 47, .32); }
  .btn:active { transform: translateY(0); transition-duration: .1s; }
  .card, .cat-card, .board-row, .quick-cat { --mx: 50%; --my: 50%; }
  .card::before, .cat-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0; opacity: 0; transition: opacity .35s;
    background: radial-gradient(280px circle at var(--mx) var(--my), rgba(201, 122, 69, .10), transparent 65%); }
  .card:hover::before, .cat-card:hover::before { opacity: 1; }
  .cat-card { position: relative; }
  .quick-cat { background: radial-gradient(200px circle at var(--mx) var(--my), rgba(201, 122, 69, .16), rgba(255,255,255,.06) 70%); }
}

/* Reveal: aparición suave y red de seguridad */
.reveal { transition: opacity .7s var(--ease-soft), transform .7s var(--ease-soft); }
.result-main { transition: color .3s; }

@media print { .site-header, .site-footer, .sidebar, .ad-slot, .back-top, .calc-cta, .related, .toc-mobile { display: none !important; } body { background: #fff; } }
