:root {
  color-scheme: light;
  --bg: #F7F5FC;
  --bg-2: #EFEBFA;
  --panel: #FFFFFF;
  --field: #F5F3FB;
  --fg: 24,18,46;
  --bgc: 247,245,252;
  --line: rgba(24,18,46,.1);
  --line-2: rgba(24,18,46,.18);
  --ink: #18122E;
  --ink-2: rgba(24,18,46,.72);
  --ink-3: rgba(24,18,46,.52);
  --v1: #6A4BD6;
  --v2: #8E74EE;
  --v3: #5B3CC4;
  --ok: #0E9467;
  --warn: #B26A00;
  --bad: #D23F5B;
  --wa: #25D366;
  --pop: #FFFFFF;
  --live-a: #FFFFFF;
  --live-b: #F4F0FE;
  --shadow: 0 1px 2px rgba(24,18,46,.06), 0 8px 24px -12px rgba(24,18,46,.18);
  --ease: cubic-bezier(.22,1,.36,1);
  --gut: 22px;
  --max: 1220px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0914;
  --bg-2: #110E1D;
  --panel: #151125;
  --field: #0E0B18;
  --fg: 244,242,250;
  --bgc: 14,11,24;
  --line: rgba(255,255,255,.09);
  --line-2: rgba(255,255,255,.16);
  --ink: #F4F2FA;
  --ink-2: rgba(244,242,250,.7);
  --ink-3: rgba(244,242,250,.48);
  --v3: #BBA8F8;
  --ok: #5EE0A8;
  --warn: #FFC56B;
  --bad: #FF8A99;
  --pop: #1D1734;
  --live-a: #161129;
  --live-b: #110E1D;
  --shadow: none;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.i { width: 1em; height: 1em; flex: none; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); position: relative; z-index: 2; }
h1, h2, h3, .disp { font-family: Lexend, Inter, sans-serif; letter-spacing: -.03em; }
.eyebrow { font-family: Lexend, Inter, sans-serif; font-size: .68rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--v3); }
.lead { font-size: 1.06rem; line-height: 1.6; color: var(--ink-2); text-wrap: pretty; }
.lead b { color: var(--ink); font-weight: 600; }
em { font-style: normal; font-size: .62rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 5px; padding: 1px 5px; vertical-align: middle; margin-left: 6px; font-family: Inter, sans-serif; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--v1); padding: 10px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--v3); outline-offset: 2px; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 1rem; border: 0; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.btn:active { transform: scale(.985); }
.btn .i { width: 20px; height: 20px; }
.btn-main { color: #fff; background: linear-gradient(135deg, var(--v1), var(--v2)); box-shadow: 0 10px 30px -10px rgba(110,80,220,.7); }
.btn-main:hover { box-shadow: 0 14px 38px -10px rgba(140,110,240,.85); }
.btn-ghost { border: 1px solid var(--line-2); background: transparent; }
.btn-ghost:hover { border-color: rgba(187,168,248,.55); }

/* Nav (idéntica a la landing) */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 40; padding-top: env(safe-area-inset-top); transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.solid { background: rgba(var(--bgc),.92); border-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .ic { height: 30px; width: 30px; }
.brand .wm { height: 15px; width: auto; }
.brand small { white-space: nowrap; font-size: .62rem; letter-spacing: .14em; color: var(--ink-3); text-transform: uppercase; margin-left: 4px; padding-left: 10px; border-left: 1px solid var(--line-2); }
.nav-r { display: flex; align-items: center; gap: 18px; }
.nav-link { font-size: .88rem; color: var(--ink-2); display: none; }
.nav-link:hover { color: var(--ink); }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line-2); }
.nav-cta .i { width: 17px; height: 17px; color: var(--wa); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 112px 0 34px; }
#flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .9; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(60% 55% at 85% 0%, rgba(106,75,214,.24), transparent 70%), radial-gradient(45% 45% at 0% 100%, rgba(106,75,214,.12), transparent 70%); }
.hero h1 { font-size: clamp(2.2rem, 7.4vw, 4.4rem); font-weight: 600; line-height: 1; letter-spacing: -.045em; max-width: 19ch; margin: 16px 0 18px; text-wrap: balance; }
.hero h1 span { background: linear-gradient(100deg, var(--v3), var(--v2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { max-width: 44rem; font-size: clamp(1.02rem, 2.4vw, 1.18rem); }
.pick-t { margin: 30px 0 12px; font-size: .78rem; font-weight: 600; color: var(--ink-3); letter-spacing: .08em; text-transform: uppercase; }
.sectors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 980px; }
.chip { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(var(--bgc),.85); text-align: left; cursor: pointer; font-size: .88rem; font-weight: 500; line-height: 1.2; transition: border-color .2s, background-color .2s, transform .2s var(--ease); }
.chip:hover { border-color: rgba(187,168,248,.4); transform: translateY(-1px); }
.chip .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(142,116,238,.14); color: var(--v3); flex: none; }
.chip .ic .i { width: 17px; height: 17px; }
.chip[aria-checked="true"] { border-color: var(--v2); background: linear-gradient(135deg, rgba(106,75,214,.32), rgba(142,116,238,.14)); }
.chip[aria-checked="true"] .ic { background: linear-gradient(135deg, var(--v1), var(--v2)); color: #fff; }
.privacy { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: .8rem; color: var(--ink-3); }
.privacy .i { width: 15px; height: 15px; color: var(--ok); }

/* Calculadora */
.calc { padding: 18px 0 30px; position: relative; }
.calc-grid { display: grid; gap: 18px; align-items: start; }
.inputs { display: grid; gap: 14px; min-width: 0; }
.demo-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(255,197,107,.3); background: rgba(255,197,107,.07); font-size: .88rem; color: var(--ink-2); }
.demo-banner .i { width: 20px; height: 20px; color: var(--warn); margin-top: 1px; }
.demo-banner b { color: var(--ink); font-weight: 600; }
.card { border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); padding: 20px 16px; min-width: 0; }
.card-hd { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; margin-bottom: 18px; }
.card-hd .k { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-family: Lexend, sans-serif; font-size: .8rem; font-weight: 600; color: #fff; background: linear-gradient(135deg, var(--v1), var(--v2)); }
.card-hd h2 { font-size: 1.2rem; font-weight: 600; line-height: 1.2; }
.card-hd p { font-size: .88rem; color: var(--ink-2); margin-top: 3px; }
.grid { display: grid; gap: 12px; }
.f { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 500; color: var(--ink-2); min-width: 0; }
.f small { font-size: .72rem; color: var(--ink-3); font-weight: 400; line-height: 1.35; }
input[type=text], input[type=number], select { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--field); color: var(--ink); font-size: 1rem; font-variant-numeric: tabular-nums; transition: border-color .2s, box-shadow .2s; -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input::placeholder { color: var(--ink-3); }
input:focus, select:focus { outline: none; border-color: var(--v2); box-shadow: 0 0 0 3px rgba(142,116,238,.22); }
input.invalid { border-color: var(--bad); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23BBA8F8' stroke-width='2'%3E%3Cpath d='m19.5 8.25-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 34px; }
.money, .suffix { position: relative; display: flex; align-items: center; }
.money .cur { position: absolute; left: 12px; color: var(--ink-3); font-size: .92rem; pointer-events: none; }
.money input { padding-left: 30px; }
.suffix span { position: absolute; right: 12px; color: var(--ink-3); pointer-events: none; }
.suffix input { padding-right: 32px; }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 12px; background: var(--field); border: 1px solid var(--line); margin-bottom: 14px; }
.seg button { border: 0; background: none; cursor: pointer; padding: 9px 14px; border-radius: 9px; font-size: .86rem; font-weight: 600; color: var(--ink-3); min-height: 40px; transition: background-color .2s, color .2s; }
.seg button[aria-checked="true"] { background: linear-gradient(135deg, var(--v1), var(--v2)); color: #fff; }
.rate-out { margin-top: 14px; font-size: .9rem; color: var(--ink-2); padding: 12px 14px; border-radius: 12px; background: rgba(142,116,238,.08); border: 1px solid rgba(142,116,238,.2); }
.rate-out b { color: var(--ink); font-family: Lexend, sans-serif; }

/* Tareas */
.tasks { display: grid; gap: 10px; }
.task { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 14px; position: relative; transition: border-color .2s, opacity .2s; }
.task.off { opacity: .5; }
.task.off .task-body { display: none; }
.task-hd { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.task-hd textarea { resize: none; overflow: hidden; line-height: 1.3; font-family: inherit; color: inherit; width: 100%; border: 1px solid transparent; border-radius: 10px; display: block; }
.task-hd input[type=text], .task-hd textarea { min-height: 40px; font-weight: 600; font-size: .95rem; border-color: transparent; background: transparent; padding: 8px; }
.task-hd textarea:hover, .task-hd input[type=text]:hover { border-color: var(--line-2); }
.task-hd textarea:focus, .task-hd input[type=text]:focus { background: var(--field); }
.tg { position: relative; width: 38px; height: 22px; flex: none; }
.tg input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.tg span { position: absolute; inset: 0; border-radius: 99px; background: rgba(var(--fg),.14); transition: background-color .2s; }
.tg span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.tg input:checked + span { background: var(--v2); }
.tg input:checked + span::after { transform: translateX(16px); }
.tg input:focus-visible + span { outline: 2px solid var(--v3); outline-offset: 2px; }
.del { width: 36px; height: 36px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; }
.del:hover { color: var(--bad); border-color: var(--line-2); }
.del .i { width: 16px; height: 16px; }
.task-body { margin-top: 10px; }
.task-in { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; }
.task-in .f.mins { grid-column: 1 / -1; }
.slider { margin-top: 14px; }
.fx { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(142,116,238,.08); border: 1px solid rgba(142,116,238,.2); }
.fx-hd { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); font-weight: 500; }
.fx-hd b { font-family: Lexend, sans-serif; font-size: 1.15rem; color: var(--v3); }
.fx-hd em { font-style: normal; margin-left: auto; font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.fx-how { margin-top: 6px; font-size: .84rem; line-height: 1.45; color: var(--ink-2); }
.fx-reset { background: none; border: 0; color: var(--v3); font: inherit; font-size: .76rem; cursor: pointer; padding: 4px 0; white-space: nowrap; }
.slider-hd { gap: 10px; }
.slider-hd { display: flex; justify-content: space-between; align-items: baseline; font-size: .8rem; color: var(--ink-2); font-weight: 500; }
.slider-hd b { font-family: Lexend, sans-serif; font-size: 1.05rem; color: var(--v3); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; margin-top: 2px; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--v1), var(--v3)) 0 / var(--p, 50%) 100% no-repeat, rgba(var(--fg),.12); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: rgba(var(--fg),.12); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 99px; background: linear-gradient(90deg, var(--v1), var(--v3)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; margin-top: -8px; box-shadow: 0 0 0 4px rgba(142,116,238,.35), 0 4px 10px rgba(0,0,0,.4); }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 0 0 4px rgba(142,116,238,.35); }
.task-out { margin-top: 10px; display: grid; gap: 6px; }
.mini { display: grid; grid-template-columns: 74px 1fr auto; gap: 8px; align-items: center; font-size: .75rem; color: var(--ink-3); }
.mini .track { height: 8px; border-radius: 99px; background: rgba(var(--fg),.06); overflow: hidden; }
.mini .track i { display: block; height: 100%; border-radius: 99px; background: rgba(var(--fg),.28); transition: width .45s var(--ease); }
.mini.after .track i { background: linear-gradient(90deg, var(--v1), var(--v2)); }
.mini b { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; min-width: 64px; text-align: right; }
.task-gain { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: .82rem; color: var(--ink-2); gap: 10px; }
.task-gain b { color: var(--ok); font-family: Lexend, sans-serif; font-weight: 600; white-space: nowrap; }
.task-more summary { list-style: none; cursor: pointer; font-size: .76rem; color: var(--ink-3); margin-top: 10px; display: inline-flex; gap: 6px; align-items: center; }
.task-more summary::-webkit-details-marker { display: none; }
.task-more summary .i { width: 13px; height: 13px; transition: transform .2s; }
.task-more[open] summary .i { transform: rotate(180deg); }
.task-more .grid { margin-top: 10px; grid-template-columns: 1fr 1fr; }
.badge { font-size: .6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.badge.demo { color: var(--warn); background: rgba(255,197,107,.1); }
.badge.estimated { color: var(--v3); background: rgba(142,116,238,.14); }
.badge.measured { color: var(--ok); background: rgba(94,224,168,.1); }
.add { margin-top: 10px; width: 100%; min-height: 50px; border-radius: 12px; border: 1px dashed var(--line-2); background: none; color: var(--v3); font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .2s, background-color .2s; }
.add:hover { border-color: var(--v2); background: rgba(142,116,238,.06); }
.add .i { width: 18px; height: 18px; }
.empty { padding: 22px; text-align: center; color: var(--ink-3); font-size: .9rem; border: 1px dashed var(--line-2); border-radius: 14px; }

/* Extras */
.extras { display: grid; gap: 10px; }
.extra { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 14px; }
.extra-hd { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.extra-hd b { font-weight: 600; font-size: .95rem; display: block; }
.extra-hd p { font-size: .8rem; color: var(--ink-3); margin-top: 2px; }
.extra .grid { margin-top: 12px; grid-template-columns: 1fr 1fr; }
.extra:not(.on) .grid { display: none; }
.extra.on { border-color: rgba(142,116,238,.35); }

.assume { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.assume summary { list-style: none; cursor: pointer; font-size: .86rem; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; }
.assume summary::-webkit-details-marker { display: none; }
.assume summary .i { width: 16px; height: 16px; transition: transform .2s; }
.assume[open] summary .i { transform: rotate(180deg); }
.assume p { font-size: .84rem; color: var(--ink-3); margin: 10px 0 12px; }
.assume p b { color: var(--ink-2); }

/* Panel en vivo */
.live { display: none; min-width: 0; }
.live-in { border: 1px solid rgba(142,116,238,.3); border-radius: 22px; padding: 20px; position: relative; overflow: hidden;
  background: radial-gradient(120% 70% at 100% 0%, rgba(106,75,214,.28), transparent 60%), linear-gradient(180deg, var(--live-a), var(--live-b)); box-shadow: 0 40px 80px -40px rgba(106,75,214,.55); }
.live-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.q { font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 6px; white-space: nowrap; }
.q.demo { color: var(--warn); background: rgba(255,197,107,.1); }
.q.mixed { color: var(--v3); background: rgba(142,116,238,.16); }
.q.measured { color: var(--ok); background: rgba(94,224,168,.1); }
.q.empty { color: var(--ink-3); background: rgba(var(--fg),.06); }
.seg.sc { display: grid; width: 100%; }
.seg.sc button { padding: 8px 6px; font-size: .8rem; }
.hl { padding: 6px 0 16px; }
.hl-l { font-size: .84rem; color: var(--ink-2); display: block; }
.hl-n { display: block; font-family: Lexend, sans-serif; font-weight: 600; font-size: clamp(2.3rem, 5vw, 3.1rem); letter-spacing: -.04em; line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, var(--ink), var(--v3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hl-n.neg { background: none; color: var(--bad); }
.hl-y { font-size: .88rem; color: var(--ok); font-weight: 600; }
.hl-y.neg { color: var(--bad); }
.vs { padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vs-row { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-2); margin-bottom: 6px; }
.vs-row b { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.bar { height: 12px; border-radius: 99px; background: rgba(var(--fg),.06); overflow: hidden; margin-bottom: 12px; display: flex; }
.bar i { display: block; height: 100%; background: rgba(var(--fg),.3); transition: width .55s var(--ease); }
.bar.after i:first-child { background: linear-gradient(90deg, var(--v1), var(--v2)); border-radius: 99px 0 0 99px; }
.bar.after i.saved { background: repeating-linear-gradient(135deg, rgba(94,224,168,.35) 0 4px, rgba(94,224,168,.12) 4px 8px); }
.vs-note { font-size: .78rem; color: var(--ink-3); }
.vs-note b { color: var(--ok); font-weight: 600; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 14px; overflow: hidden; margin-top: 16px; border: 1px solid var(--line); }
.kpis div { background: rgba(var(--bgc),.85); padding: 12px; }
.kpis b { display: block; font-family: Lexend, sans-serif; font-weight: 600; font-size: 1.22rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpis b.muted { color: var(--ink-3); }
.kpis span { display: block; font-size: .7rem; color: var(--ink-3); margin-top: 2px; line-height: 1.3; }
.need { font-size: .76rem; color: var(--ink-3); margin-top: 10px; }
.live-cta { margin-top: 16px; display: grid; gap: 10px; }
.live-cta .btn { width: 100%; }
.live-tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.tool { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 4px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--ink-2); font-size: .7rem; cursor: pointer; transition: border-color .2s, color .2s; }
.tool:hover { border-color: var(--line-2); color: var(--ink); }
.tool .i { width: 17px; height: 17px; }
.pulse { animation: pulse .6s var(--ease); }
@keyframes pulse { 0% { filter: brightness(1.5); } 100% { filter: brightness(1); } }

/* Diagnóstico */
.sec { padding: 54px 0; position: relative; }
.sec-hd { max-width: 44rem; margin-bottom: 30px; }
.sec-hd h2 { font-size: clamp(1.8rem, 6vw, 2.8rem); font-weight: 600; line-height: 1.06; margin: 12px 0; text-wrap: balance; }
.sec-hd h2 span, .close h2 span { color: var(--v3); }
.scen { display: grid; gap: 10px; margin-bottom: 14px; }
.sc-card { border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); padding: 18px; cursor: pointer; transition: border-color .2s, transform .2s var(--ease); text-align: left; width: 100%; }
.sc-card:hover { transform: translateY(-2px); border-color: rgba(187,168,248,.35); }
.sc-card.sel { border-color: var(--v2); background: linear-gradient(160deg, rgba(106,75,214,.2), var(--bg-2) 60%); }
.sc-card .t { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; font-weight: 600; color: var(--ink-2); letter-spacing: .04em; }
.sc-card .t i { font-style: normal; font-size: .62rem; color: var(--v3); text-transform: uppercase; letter-spacing: .14em; }
.sc-card .n { font-family: Lexend, sans-serif; font-size: 1.9rem; font-weight: 600; letter-spacing: -.03em; margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.sc-card .n.neg { color: var(--bad); }
.sc-card .s { font-size: .78rem; color: var(--ink-3); }
.sc-card dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8rem; }
.sc-card dt { color: var(--ink-3); }
.sc-card dd { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.two { display: grid; gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: 18px; background: var(--bg-2); padding: 20px 16px; min-width: 0; }
.panel-hd h3 { font-size: 1.15rem; font-weight: 600; margin-top: 6px; }
.chart { margin-top: 16px; position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .tip { position: absolute; pointer-events: none; background: var(--pop); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 9px; font-size: .74rem; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; }
.fine { font-size: .74rem; color: var(--ink-3); margin-top: 10px; }
.rank { list-style: none; margin-top: 16px; display: grid; gap: 12px; counter-reset: r; }
.rank li { display: grid; grid-template-columns: 26px 1fr; gap: 4px 10px; align-items: start; counter-increment: r; }
.rank li::before { content: counter(r); grid-row: span 2; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-family: Lexend, sans-serif; font-size: .74rem; font-weight: 600; background: rgba(142,116,238,.15); color: var(--v3); }
.rank .rt { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; font-weight: 500; }
.rank .rt b { color: var(--ok); white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.rank .rb { height: 6px; border-radius: 99px; background: rgba(var(--fg),.06); overflow: hidden; }
.rank .rb i { display: block; height: 100%; background: linear-gradient(90deg, var(--v1), var(--v3)); border-radius: 99px; transition: width .5s var(--ease); }
.recs-hd { margin: 40px 0 16px; }
.recs-hd h3 { font-size: clamp(1.3rem, 4vw, 1.7rem); font-weight: 600; margin-top: 8px; }
.recs { display: grid; gap: 10px; }
.rec { border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); padding: 18px; }
.rec h4 { font-family: Lexend, sans-serif; font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.rec .p { font-size: .82rem; color: var(--warn); margin-top: 4px; }
.rec ul { list-style: none; display: grid; gap: 8px; margin-top: 12px; }
.rec li { display: grid; grid-template-columns: 16px 1fr; gap: 8px; font-size: .86rem; color: var(--ink-2); line-height: 1.45; }
.rec li .i { width: 15px; height: 15px; margin-top: 3px; color: var(--v3); }
.rec li b { color: var(--ink); font-weight: 600; }
.how { margin-top: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.how summary { list-style: none; cursor: pointer; padding: 18px; display: flex; justify-content: space-between; align-items: center; font-family: Lexend, sans-serif; font-weight: 600; }
.how summary::-webkit-details-marker { display: none; }
.how summary .i { width: 18px; height: 18px; transition: transform .2s; }
.how[open] summary .i { transform: rotate(180deg); }
.how-in { padding: 0 18px 18px; display: grid; gap: 10px; }
.fx { border-left: 2px solid var(--v1); padding: 4px 0 4px 12px; font-size: .85rem; color: var(--ink-2); }
.fx b { display: block; color: var(--ink); font-weight: 600; font-size: .86rem; }
.fx code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; color: var(--v3); display: block; margin-top: 2px; white-space: normal; }
.fx .v { color: var(--ok); font-variant-numeric: tabular-nums; }
.close { margin-top: 44px; border: 1px solid rgba(142,116,238,.3); border-radius: 22px; padding: 28px 20px; display: grid; gap: 20px; background: radial-gradient(80% 90% at 100% 100%, rgba(106,75,214,.25), transparent 70%), var(--bg-2); }
.close h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 600; line-height: 1.1; margin: 12px 0 10px; }
.close-cta { display: grid; gap: 10px; align-content: center; }
.disclaimer { font-size: .74rem; color: var(--ink-3); margin-top: 18px; line-height: 1.5; max-width: 60rem; }

footer { border-top: 1px solid var(--line); padding: 30px 0 calc(110px + env(safe-area-inset-bottom)); color: var(--ink-3); font-size: .82rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
footer a:hover { color: var(--ink); }
footer .brand .wm { height: 12px; }

/* Barra móvil */
.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(var(--bgc),.95); border-top: 1px solid rgba(142,116,238,.3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transform: translateY(110%); transition: transform .35s var(--ease); }
.mbar.show { transform: none; }
.mbar-l { display: grid; min-width: 0; }
.mbar-l span { font-size: .68rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; }
.mbar-l b { font-family: Lexend, sans-serif; font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; background: linear-gradient(100deg, var(--ink), var(--v3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mbar-l b.neg { background: none; color: var(--bad); }
.mbar-l small { font-size: .72rem; color: var(--ok); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbar .btn { min-height: 46px; padding: 10px 16px; font-size: .9rem; }

.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); background: var(--pop); border: 1px solid var(--line-2); padding: 10px 16px; border-radius: 10px; font-size: .86rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s var(--ease); z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.report { display: none; }

/* Mobile: el panel en vivo aparece entre inputs y diagnóstico */
@media (max-width: 979px) {
  .live { display: block; }
  .calc-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 560px) {
  .sectors { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .g2 { grid-template-columns: 1fr 1fr; }
  .g3 { grid-template-columns: 1fr 1fr 1fr; }
  .g3 .wide { grid-column: 1 / -1; }
  .task-in { grid-template-columns: 1fr 1.2fr 1fr; }
  .task-in .f.mins { grid-column: auto; }
  .card { padding: 24px 22px; }
  .scen { grid-template-columns: repeat(3, 1fr); }
  .recs { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 760px) {
  :root { --gut: 32px; }
  .nav-link { display: inline; }
  .two { grid-template-columns: 1.25fr 1fr; }
  .close { grid-template-columns: 1.4fr 1fr; padding: 36px; }
  .hero { padding: 130px 0 40px; }
}
@media (min-width: 980px) {
  .calc-grid { grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; }
  .live { display: block; position: sticky; top: 84px; }
  .mbar { display: none; }
  footer { padding-bottom: 30px; }
}
@media (min-width: 1180px) {
  .calc-grid { grid-template-columns: minmax(0, 1fr) 420px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* Informe imprimible: se imprime solo #report, en claro */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; color: #171321; }
  body > *:not(#report) { display: none !important; }
  .report { display: block !important; font-family: Inter, sans-serif; color: #171321; font-size: 10.5pt; line-height: 1.45; }
  .report * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .r-hd { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #6A4BD6; padding-bottom: 10px; margin-bottom: 16px; }
  .r-hd img { height: 26px; }
  .r-hd div { text-align: right; font-size: 9pt; color: #696372; }
  .report h1 { font-family: Lexend, sans-serif; font-size: 20pt; letter-spacing: -.02em; margin-bottom: 4px; }
  .report h2 { font-family: Lexend, sans-serif; font-size: 12pt; margin: 18px 0 8px; color: #5032B8; break-after: avoid; }
  .report .r-sub { color: #696372; margin-bottom: 14px; }
  .r-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .r-kpis div { border: 1px solid #E7E1ED; border-radius: 8px; padding: 8px 10px; }
  .r-kpis b { display: block; font-family: Lexend, sans-serif; font-size: 13pt; color: #171321; }
  .r-kpis span { font-size: 8pt; color: #696372; }
  .r-kpis .hi { background: #F1EDFF; border-color: #D8CFFC; }
  .report table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  .report th, .report td { text-align: left; padding: 5px 6px; border-bottom: 1px solid #E7E1ED; vertical-align: top; }
  .report th { color: #696372; font-weight: 600; font-size: 8pt; text-transform: uppercase; letter-spacing: .04em; }
  .report td.n, .report th.n { text-align: right; font-variant-numeric: tabular-nums; }
  .report .r-rec { border-left: 3px solid #8E74EE; padding: 4px 0 4px 10px; margin-bottom: 8px; break-inside: avoid; }
  .report .r-rec b { display: block; }
  .report .r-note { font-size: 8pt; color: #696372; margin-top: 14px; }
  .report .r-badge { display: inline-block; font-size: 8pt; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: #FFF4DF; color: #8A5300; }
  .report .r-cta { margin-top: 16px; padding: 10px 12px; border-radius: 8px; background: #F1EDFF; }
}
@media (max-width: 559px) {
  .task-more .grid { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .brand small { display: none; }
  .task-hd textarea { font-size: .9rem; }
  .task-hd input[type=text] { font-size: .9rem; }
}
.live-top { flex-wrap: wrap; } .live-top .eyebrow { white-space: nowrap; }
@media (max-width: 559px) {
  .task-in { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); }
  .task-in select { padding-left: 10px; padding-right: 30px; background-position: right 8px center; }
}
