/* =========================================================
   Edge — portada
   Mundo: libro privado de noche. Negro, papel hueso, serif editorial.
   home.js escribe: --p (progreso de sección), --cp (progreso del capítulo).
   ========================================================= */

.center { text-align: center; justify-items: center; margin-inline: auto; }

/* ---------- entrada de carga: líneas que suben desde su máscara ---------- */
.js .hx-title .ln { display: block; overflow: clip; padding-bottom: .08em; margin-bottom: -.08em; }
.js .hx-title .ln > span { display: inline-block; transform: translateY(105%); transition: transform 1.25s var(--ease); }
.js .hx-title .ln:nth-child(2) > span { transition-delay: .09s; }
.js .is-ready .hx-title .ln > span { transform: none; }
.js [data-enter] { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease); transition-delay: calc(var(--d, 0) * 80ms + 120ms); }
.js .is-ready [data-enter] { opacity: 1; transform: none; filter: none; }

/* ---------- héroe ---------- */
.hx { position: relative; min-height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: 112px 0 0; overflow: clip; isolation: isolate; --p: 0; }
.hx-field { position: absolute; inset: 0; z-index: -1; opacity: calc(1 - var(--p) * .7); transform: scale(calc(1 + var(--p) * .08)); transform-origin: 70% 60%; }
.hx-field canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hx-field::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, rgba(5, 5, 5, .82) 34%, rgba(5, 5, 5, .2) 70%, rgba(5, 5, 5, .35) 100%), linear-gradient(180deg, rgba(5, 5, 5, .7) 0%, transparent 26%, transparent 70%, var(--bg) 100%); pointer-events: none; }
.hx-inner { display: grid; align-content: center; justify-items: start; gap: clamp(20px, 2.6vw, 30px); padding-block: 16px 36px; transform: translateY(calc(var(--p) * -70px)); opacity: calc(1 - var(--p) * 1.3); }
.hx-title { font-size: clamp(3.3rem, min(9.4vw, 12.5svh), 8rem) !important; line-height: .98 !important; letter-spacing: -.045em !important; max-width: 11ch; }
.hx-title em { color: var(--fg); }
.hx-foot { display: grid; gap: 28px; justify-items: start; max-width: 560px; }
.hx-foot .lede { font-size: clamp(17px, 1.45vw, 20px); }

.live-chip { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 16px 0 12px; border-radius: 99px; font-size: 13.5px; background: rgba(255, 255, 255, .06); box-shadow: var(--glass-edge); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: background .3s, transform .4s var(--ease); }
.live-chip:hover { background: rgba(255, 255, 255, .1); transform: translateY(-1px); }
.live-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); transition: background .2s, box-shadow .6s var(--ease); }
.live-chip.is-live .dot { background: var(--up); }
.live-chip .dot.blink { box-shadow: 0 0 0 5px rgba(99, 214, 160, .28); transition: none; }
.live-chip b { font-size: 14px; font-weight: 500; min-width: 7.5ch; }
.live-chip .ticker-chg { font-size: 12.5px; }

.hx-facts { list-style: none; margin: 0; padding: 22px 0 30px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-2); }
.hx-facts li { display: grid; gap: 3px; padding: 0 20px; border-left: 1px solid var(--line); }
.hx-facts li:first-child { padding-left: 0; border-left: 0; }
.hx-facts b { font-weight: 500; font-size: 15.5px; color: var(--fg); }
.hx-facts b.num { font-size: 15px; }
.hx-facts span { font-size: 13.5px; color: var(--fg-3); }
@media (max-width: 760px) {
  .hx { padding-top: 104px; }
  .hx-field::after { background: linear-gradient(180deg, rgba(5, 5, 5, .55) 0%, rgba(5, 5, 5, .78) 40%, rgba(5, 5, 5, .55) 70%, var(--bg) 100%); }
  .hx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; padding-bottom: 26px; }
  .hx-facts li:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* ---------- presentación del portal (Apple: el equipo se endereza con el scroll) ---------- */
.show { position: relative; height: 210vh; --p: 0; }
.show-pin { position: sticky; top: 0; height: 100svh; display: grid; grid-template-rows: auto 1fr; align-content: center; gap: clamp(26px, 4vw, 48px); padding-top: 88px; overflow: clip; }
.show-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 14px 40px; opacity: clamp(0, calc(var(--p) * 3), 1); transform: translateY(calc((1 - clamp(0, calc(var(--p) * 3), 1)) * 30px)); }
.show-head p { justify-self: end; max-width: 38ch; color: var(--fg-2); font-size: 17px; }
.show-stage { perspective: 1600px; min-height: 0; }
.h-device { transform-origin: 50% 0%; transform: rotateX(calc((1 - var(--k, 0)) * 26deg)) scale(calc(.84 + var(--k, 0) * .16)) translateY(calc((1 - var(--k, 0)) * 40px)); --k: clamp(0, calc(var(--p) * 1.7), 1); will-change: transform; }
.h-device .app-frame { max-width: 1080px; margin: 0 auto; box-shadow: var(--glass-edge), 0 70px 140px -50px rgba(0, 0, 0, .95), 0 0 140px -40px rgba(235, 229, 217, calc(.04 + var(--k) * .14)); }
.af-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 26px; }
.af-main { display: grid; gap: 18px; min-width: 0; }
.af-side { display: grid; gap: 16px; align-content: start; padding-left: 22px; box-shadow: -1px 0 0 var(--line); }
.af-stats { margin: 0; display: grid; gap: 12px; }
.af-stats div { display: grid; gap: 2px; }
.af-stats dt { font-size: 12px; color: var(--fg-3); }
.af-stats dd { margin: 0; font-size: 16px; font-weight: 500; }
.af-side .af-trades li { grid-template-columns: 1fr auto; }
.show .af-chart { height: clamp(170px, 20vw, 250px); }
@media (max-width: 860px) {
  .show { height: 170vh; }
  .show-head { grid-template-columns: minmax(0, 1fr); }
  .show-head p { justify-self: start; }
  .af-grid { grid-template-columns: minmax(0, 1fr); }
  .af-side { padding-left: 0; box-shadow: none; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) and (max-height: 760px) { .af-side { display: none; } }

/* ---------- declaración con palabras que se encienden ---------- */
.statement { height: 240vh; position: relative; }
.statement-pin { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; }
.statement-text { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 4.6rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; max-width: 21ch; text-wrap: balance; text-align: center; }
.statement-text .w { color: rgba(245, 242, 236, .4); transition: color .6s var(--ease); }
.statement-text .w.lit { color: var(--fg); }

/* ---------- recorrido fijado ---------- */
.journey-x { height: 680vh; position: relative; }
.jx-pin { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; overflow: hidden; }
.jx-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.jx-copy { position: relative; height: 360px; }
.jx-rail { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.jx-rail li { display: grid; gap: 9px; font-size: 12px; color: var(--fg-3); transition: color .4s; }
.jx-rail i { display: block; height: 2px; border-radius: 2px; background: var(--line-2); overflow: hidden; position: relative; }
.jx-rail i::after { content: ""; position: absolute; inset: 0; background: var(--bone); transform-origin: left; transform: scaleX(var(--f, 0)); }
.jx-rail li.is-on { color: var(--fg); }
.jx-step { position: absolute; inset: 64px 0 0; display: grid; gap: 18px; align-content: start; opacity: 0; transform: translateY(26px); filter: blur(10px); transition: opacity .7s var(--ease), transform .9s var(--ease), filter .7s var(--ease); pointer-events: none; }
.jx-step.is-on { opacity: 1; transform: none; filter: none; }
.jx-step.is-past { transform: translateY(-26px); }
.jx-step h2 { font-size: clamp(2.8rem, 5.2vw, 5rem); line-height: .98; }
.jx-step p { font-size: clamp(17px, 1.4vw, 20px); color: var(--fg-2); max-width: 40ch; }

.jx-stage { position: relative; aspect-ratio: 1.12; border-radius: 28px; background: radial-gradient(120% 90% at 30% 0%, rgba(255, 255, 255, .08), rgba(255, 255, 255, .015) 60%), rgba(255, 255, 255, .02); box-shadow: var(--glass-edge), 0 50px 100px -40px rgba(0, 0, 0, .8); overflow: hidden; --cp: 0; }
.jx-scene { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 26px; padding: 40px; opacity: 0; transform: scale(.94); filter: blur(12px); transition: opacity .7s var(--ease), transform .9s var(--ease), filter .7s var(--ease); pointer-events: none; }
.jx-scene.is-on { opacity: 1; transform: none; filter: none; }

.jx-gauge { stroke-dashoffset: calc(100 - var(--cp) * 62); transition: none; }
.jx-qs { display: grid; gap: 8px; width: min(320px, 70vw); }
.jx-qs span { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-size: 14.5px; opacity: clamp(0, calc(var(--cp) * 6 - var(--k)), 1); transform: translateY(calc((1 - clamp(0, calc(var(--cp) * 6 - var(--k)), 1)) * 12px)); }
.jx-qs .i { color: var(--up); }

.jx-plans { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.jx-term { display: grid; justify-items: center; width: 78px; padding: 16px 0 12px; border-radius: 18px; background: rgba(255, 255, 255, .05); font-size: 12px; color: var(--fg-3); opacity: clamp(.2, calc(var(--cp) * 6 - var(--k)), 1); transition: background .5s, color .5s, transform .6s var(--ease); }
.jx-term b { font: 600 34px/1.1 var(--display); color: var(--fg); }
.jx-stage[data-cp-hi] .jx-term.is-pick { background: var(--bone); color: var(--ink-3); transform: translateY(-8px) scale(1.06); }
.jx-stage[data-cp-hi] .jx-term.is-pick b { color: var(--ink); }
.jx-target { display: grid; justify-items: center; gap: 4px; }
.jx-target span { font-size: 13px; color: var(--fg-3); }
.jx-target b { font: 600 clamp(40px, 5.4vw, 64px)/1 var(--display); }

.jx-flow { position: absolute; inset: 6%; width: 88%; height: 88%; }
.jx-flow path { fill: none; stroke: rgba(245, 242, 236, .25); stroke-width: 1.4; stroke-dasharray: 4 5; }
.jx-flow circle { fill: var(--bone); filter: drop-shadow(0 0 6px rgba(245, 242, 236, .9)); }
.jx-node { position: absolute; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.jx-node .i { width: 50px; height: 50px; padding: 13px; border-radius: 16px; background: rgba(255, 255, 255, .07); box-shadow: var(--glass-edge); }
.jx-node.is-main .i { background: var(--bone); color: var(--ink); }
.jx-shield { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 99px; background: rgba(99, 214, 160, .12); color: var(--up); font-size: 13px; font-weight: 500; white-space: nowrap; opacity: clamp(0, calc(var(--cp) * 3 - 1), 1); }
.jx-shield .i { width: 15px; height: 15px; }

.jx-chart { width: min(460px, 76vw); height: 240px; position: relative; }
.jx-chart svg { width: 100%; height: 100%; overflow: visible; }
.jx-legend { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--fg-3); }
.jx-legend b { font-size: 18px; font-weight: 500; }

.jx-phone { width: min(300px, 70vw); padding: 24px; border-radius: 30px; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 30px 60px -20px rgba(0, 0, 0, .7); display: grid; gap: 6px; }
.jx-phone strong { font-size: 34px; font-weight: 500; letter-spacing: -.035em; }
.jx-rows { margin-top: 14px; display: grid; }
.jx-rows div { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; box-shadow: 0 -1px 0 var(--line); font-size: 13.5px; }

.jx-split { position: relative; width: 200px; height: 200px; }
.jx-split svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg, .ring-you { fill: none; stroke-width: 16; }
.ring-bg { stroke: rgba(255, 255, 255, .1); }
.ring-you { stroke: var(--bone); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--cp) * 80); }
.jx-split-c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.jx-split-c b { font: 600 50px/1 var(--display); }
.jx-split-c span { font-size: 13px; color: var(--fg-3); }
.jx-choices { display: flex; gap: 10px; }
.jx-choices span { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 99px; background: rgba(255, 255, 255, .07); font-size: 14px; }

@media (max-width: 900px) {
  .journey-x { height: 620vh; }
  .jx-pin { align-items: start; padding-top: 80px; }
  .jx-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .jx-stage { order: -1; aspect-ratio: auto; height: 44svh; border-radius: 22px; }
  .jx-copy { height: 38svh; }
  .jx-rail span { font-size: 10.5px; }
  .jx-step { inset: 46px 0 0; gap: 10px; }
  .jx-step h2 { font-size: clamp(2.2rem, 9vw, 2.9rem); }
  .jx-step p { font-size: 16px; }
  .jx-scene { padding: 20px; gap: 16px; transform: scale(.86); }
  .jx-scene.is-on { transform: scale(.86); }
  .jx-node .i { width: 40px; height: 40px; padding: 10px; }
  .jx-chart { height: 170px; }
}
@media (max-width: 420px) { .jx-rail span { display: none; } .jx-step { inset: 22px 0 0; } }

/* ---------- títulos de sección: suben desde su máscara ---------- */

/* ---------- planes: libro contable ---------- */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lg-row { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: clamp(20px, 2.6vw, 30px) 4px; border-bottom: 1px solid var(--line); isolation: isolate; }
.lg-row::before { content: ""; position: absolute; inset: 0 -14px; z-index: -1; border-radius: 14px; background: rgba(245, 242, 236, .045); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.lg-row:hover::before { transform: none; }
.lg-name { font: 600 clamp(30px, 3.4vw, 46px)/1 var(--display); letter-spacing: -.025em; transition: transform .7s var(--ease); }
.lg-row:hover .lg-name { transform: translateX(10px); }
.lg-range { font-size: 14.5px; color: var(--fg-2); }
.lg-target { display: flex; align-items: baseline; gap: 10px; }
.lg-target small { font-size: 13px; color: var(--fg-3); }
.lg-target b { font: 600 clamp(44px, 5vw, 68px)/.9 var(--display); letter-spacing: -.02em; min-width: 2.2ch; text-align: right; }
.lg-row.is-top .lg-name::after { content: "Objetivo más alto"; display: inline-block; vertical-align: middle; margin-left: 14px; padding: 5px 10px; border-radius: 99px; background: var(--bone); color: var(--ink); font: 500 11.5px/1 var(--font); letter-spacing: .01em; transform: translateY(-4px); }
@media (max-width: 700px) {
  .lg-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; }
  .lg-range { grid-row: 2; }
  .lg-target { grid-row: 1 / span 2; grid-column: 2; flex-direction: column; align-items: flex-end; gap: 2px; }
  .lg-target small:first-child { display: none; }
  .lg-row.is-top .lg-name::after { display: none; }
}

/* revelado de filas y bloques */
.js [data-reveal] { opacity: 0; transform: translateY(34px); filter: blur(8px); transition: opacity 1s var(--ease), transform 1.1s var(--ease), filter 1s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ---------- calculadora ---------- */
.calc-x { margin-top: clamp(40px, 5vw, 64px); padding: clamp(22px, 3vw, 40px); border-radius: 26px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.cx-controls { display: grid; gap: 22px; }
.cx-controls h3 { font: 600 clamp(30px, 3vw, 42px)/1.02 var(--display); letter-spacing: -.025em; }
.cx-controls .field > label b { color: var(--fg); }
.cx-terms { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-terms button { min-height: 44px; padding: 0 16px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: var(--fg-2); font-size: 14.5px; transition: background .3s var(--ease), color .3s, transform .3s var(--ease); }
.cx-terms button:hover { color: var(--fg); transform: translateY(-1px); }
.cx-terms button:active { transform: scale(.97); }
.cx-terms button[aria-checked="true"] { background: var(--bone); color: var(--ink); }
.cx-out { display: grid; gap: 14px; }
.cx-plan { font-size: 14px; color: var(--fg-3); }
.cx-target { display: grid; gap: 4px; }
.cx-target b { font: 600 clamp(52px, 6.4vw, 88px)/.95 var(--display); letter-spacing: -.02em; }
.cx-target span { font-size: 14px; color: var(--fg-3); }
.cx-bars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; height: 150px; align-items: end; margin-top: 8px; }
.cx-bar { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 8px; cursor: pointer; }
.cx-bar i { position: relative; align-self: end; height: var(--h, 50%); border-radius: 10px 10px 4px 4px; background: rgba(255, 255, 255, .1); transition: height .7s var(--ease), background .4s; }
.cx-bar i::after { content: attr(data-v); position: absolute; left: 50%; top: -22px; transform: translateX(-50%); font: 500 12px var(--mono); color: var(--fg-3); white-space: nowrap; }
.cx-bar.is-on i { background: linear-gradient(180deg, #fff, var(--bone)); }
.cx-bar.is-on i::after { color: var(--fg); }
.cx-bar span { font-size: 12px; color: var(--fg-3); text-align: center; }
.cx-share { font-size: 15px; color: var(--fg-2); }
.cx-share b { color: var(--up); font-weight: 500; }
.plans-sec .hero-actions { margin-top: 32px; align-items: center; gap: 18px; }
@media (max-width: 860px) { .calc-x { grid-template-columns: minmax(0, 1fr); } .cx-bars { height: 120px; } }

/* ---------- reparto 80/20 sobre papel hueso ---------- */
.split-sec { --p: 0; background: var(--bone); color: var(--ink); overflow: clip; }
.split-inner { display: grid; gap: clamp(26px, 3vw, 40px); justify-items: start; }
.split-sec .split-num { margin: 0 0 -.06em; font: 600 clamp(9rem, 30vw, 26rem)/.78 var(--display); letter-spacing: -.045em; color: var(--ink); display: flex; align-items: flex-start; }
.split-sec .split-num i { font-style: normal; font-size: .42em; line-height: 1; margin: .08em 0 0 .04em; color: var(--ink-3); }
.split-sec h2 { max-width: 18ch; color: var(--ink); }
.split-sec h2 > span:not(.sr) { display: block; color: var(--ink-3); }
.split-bar { width: 100%; height: 12px; border-radius: 99px; background: rgba(12, 12, 13, .08); display: flex; overflow: hidden; }
.split-bar .you { width: calc(var(--p) * 80%); background: var(--ink); border-radius: 99px; }
.split-bar .me { width: calc(var(--p) * 20%); background: rgba(12, 12, 13, .28); margin-left: 4px; border-radius: 99px; }
.split-facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; width: 100%; }
.split-facts li { display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid var(--ink-line); }
.split-facts b { color: var(--ink); font-weight: 600; }
.split-facts span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) { .split-facts { grid-template-columns: minmax(0, 1fr); gap: 0; } .split-facts li { padding-block: 16px; } }

/* ---------- credenciales ---------- */
.creds-sec { --p: 0; overflow: clip; }
.creds-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.creds-copy { display: grid; gap: 26px; justify-items: start; }
.creds-copy .lede b { color: var(--fg); font-weight: 600; }
.creds-list { list-style: none; margin: 0; padding: 0; display: grid; font-size: 15.5px; color: var(--fg-2); border-top: 1px solid var(--line); width: 100%; }
.creds-list li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); }
.creds-list .i { color: var(--fg); margin-top: 3px; flex: none; }
.creds-list b { color: var(--fg); font-weight: 500; }
.creds-stack { position: relative; aspect-ratio: 1.05; perspective: 1600px; }
.cert { position: absolute; width: 66%; margin: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .08); transition: box-shadow .6s; }
.cert img { width: 100%; height: auto; display: block; }
.cert.c1 { left: 0; top: 4%; transform: translateX(calc((1 - var(--p)) * 18%)) rotate(calc(var(--p) * -6deg)) rotateY(calc((1 - var(--p)) * 18deg)); z-index: 1; }
.cert.c2 { right: 0; top: 18%; transform: translateX(calc((var(--p) - 1) * 18%)) rotate(calc(var(--p) * 5deg)) rotateY(calc((1 - var(--p)) * -18deg)); z-index: 2; }
.cert:hover { z-index: 3; box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .16); }
@media (max-width: 880px) { .creds-grid { grid-template-columns: minmax(0, 1fr); } .creds-stack { max-width: 520px; width: 100%; margin: 0 auto; } }

.sec-portal .frag-bars i::before { background: linear-gradient(var(--fg), rgba(245, 242, 236, .45)); }

/* ---------- cierre ---------- */
.close h2 { font-size: clamp(2.8rem, 6.6vw, 6rem) !important; max-width: 16ch; line-height: .98 !important; }

/* ---------- resultados reales ---------- */
.track { padding: clamp(20px, 3vw, 34px); border-radius: 26px; display: grid; gap: 26px; }
.track-chart { height: 260px; position: relative; }
.track-stats { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.track-stats div { display: grid; gap: 4px; padding: 18px 18px 0; border-left: 1px solid var(--line); }
.track-stats div:first-child { border-left: 0; padding-left: 0; }
.track-stats dt { font-size: 12.5px; color: var(--fg-3); }
.track-stats dd { margin: 0; font: 600 clamp(30px, 3vw, 42px)/1 var(--display); }
@media (max-width: 760px) { .track-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; } .track-stats div:nth-child(3) { border-left: 0; padding-left: 0; } .track-chart { height: 200px; } }

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .hx-inner, .hx-field, .h-device, .show-head { transform: none !important; opacity: 1 !important; }
  .js .hx-title .ln > span, .js [data-enter], .js [data-reveal], .js [data-title] { transform: none; opacity: 1; filter: none; clip-path: none; transition: none; }
  .show { height: auto; }
  .show-pin { position: relative; height: auto; padding-block: 96px; }
}
.sec-head + .ledger { border-top: 0; }

/* ---------- barra por tramos ---------- */
.cx-ticks { position: relative; height: 18px; margin: 2px 11px 0; font-size: 11.5px; color: var(--fg-3); }
.cx-ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.cx-ticks span::before { content: ""; position: absolute; left: 50%; top: -9px; width: 1px; height: 5px; background: var(--line-2); }
.cx-ticks span:first-child { transform: none; }
.cx-ticks span:first-child::before { left: 0; }
.cx-ticks span:last-child { transform: translateX(-100%); }
.cx-ticks span:last-child::before { left: auto; right: 0; }

/* ---------- por qué un contrato largo rinde más ---------- */
.cx-why { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding-top: clamp(26px, 3vw, 36px); border-top: 1px solid var(--line); }
.cx-why-copy { display: grid; gap: 14px; }
.cx-why-copy h3 { font: 600 clamp(22px, 2vw, 28px)/1.15 var(--display); letter-spacing: -.02em; }
.cx-why-copy p { color: var(--fg-2); font-size: 16px; max-width: 54ch; }
.cx-q { margin: 0; display: grid; gap: 12px; }
.cx-q-plot { position: relative; height: 170px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; padding-bottom: 24px; }
.cx-q-col { position: relative; height: 100%; display: grid; align-items: end; --on: 0; }
.cx-q-col i { display: block; height: var(--h); border-radius: 10px 10px 4px 4px; background: rgba(255, 255, 255, .08); position: relative; overflow: hidden; }
.cx-q-col i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #fff, var(--bone)); transform-origin: left; transform: scaleX(var(--on)); transition: transform .6s var(--ease); }
.cx-q-col span { position: absolute; left: 0; right: 0; bottom: -24px; text-align: center; font-size: 12px; color: var(--fg-3); transition: color .3s; }
.cx-q-col.is-on span { color: var(--fg); }
.cx-q-avg { position: absolute; left: -4px; right: -4px; height: 0; border-top: 1.5px dashed rgba(99, 214, 160, .8); transition: bottom .7s var(--ease); pointer-events: none; }
.cx-q-avg { bottom: calc(24px + (170px - 24px) * var(--avgn, .5)); }
.cx-q-avg b { position: absolute; right: 0; top: -22px; font-size: 11.5px; font-weight: 500; color: var(--up); background: var(--bg-2); padding: 1px 6px; border-radius: 6px; }
.cx-q figcaption { font-size: 14.5px; color: var(--fg-2); min-height: 2.9em; }
.cx-q-note { font-size: 12px; color: var(--fg-3); }
@media (max-width: 860px) { .cx-why { grid-template-columns: minmax(0, 1fr); } }


/* ---------- contrato personalizado y aviso de rendimientos teóricos ---------- */
.hx-note { font-size: 12.5px; color: var(--fg-3); max-width: 60ch; margin-top: -12px; }
.lg-custom { background: linear-gradient(90deg, rgba(235, 229, 217, .07), transparent 70%); border-radius: 14px; }
.lg-custom .lg-range small { display: block; margin-top: 4px; font-family: var(--font); font-size: 13px; color: var(--fg-3); }
.lg-note { margin-top: 16px; font-size: 13px; color: var(--fg-3); max-width: 80ch; }
.lg-note .link { color: var(--fg); margin-left: 6px; }
.cx-custom { font-size: 14.5px; color: var(--fg); padding: 10px 14px; border-radius: 12px; background: rgba(235, 229, 217, .08); }
.cx-custom b { font-weight: 600; }
.cx-note { font-size: 12.5px; color: var(--fg-3); }
