/* Ruta guiada — sistema "The Trading Path". Tokens = Design System; ver README del sistema. */
:root {
  --page: #f6f7fb; --surface: #ffffff; --ink: #14172b; --ink-soft: #3d4260; --muted: #565c78;
  --line: #e3e6f0; --line-strong: #848aa3; --line-shadow: #c9cee0;
  --primary: #2f5bea; --primary-hover: #2449c4; --primary-edge: #1b3594; --primary-soft: #e9eefd; --primary-ring: #9fb3f5; --on-primary: #ffffff;
  --highlight: #ffb547; --on-highlight: #14172b; --highlight-soft: #ffd89a; --highlight-bg: #fff8ec; --highlight-ink: #6b4a00;
  --success: #1f7a4d; --success-hover: #196841; --success-edge: #145536; --success-soft: #e6f4ec; --success-ring: #8fceac; --on-success: #ffffff;
  --danger: #b4232a; --danger-hover: #9c1d23; --danger-edge: #7d1419; --danger-soft: #fde8e8; --danger-ring: #f0a5a8; --on-danger: #ffffff;
  --focus: #2f5bea;
  --chart-grid: #e8ebf3; --chart-amber: #a35f00;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r-sm: 10px; --r-md: 16px; --r-lg: 20px; --r-xl: 24px;
  /* alias usados por las gráficas y el JS */
  --up: var(--success); --down: var(--danger); --accent: var(--primary); --gold: var(--chart-amber);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0f1222; --surface: #181c33; --ink: #eef0fa; --ink-soft: #c9cde3; --muted: #a3a9c7;
    --line: #2a2f4a; --line-strong: #6e7597; --line-shadow: #0a0c18;
    --primary: #8aa4ff; --primary-hover: #a6baff; --primary-edge: #4a62d1; --primary-soft: #1f2752; --primary-ring: #3b4f9e; --on-primary: #0b1233;
    --highlight-soft: #6b5120; --highlight-bg: #2a2213; --highlight-ink: #ffcf7a;
    --success: #5fd39a; --success-hover: #7fe0b0; --success-edge: #2f8a60; --success-soft: #11291d; --success-ring: #2a6a4a; --on-success: #06140e;
    --danger: #ff8a8f; --danger-hover: #ffa8ac; --danger-edge: #c2545a; --danger-soft: #35151a; --danger-ring: #7a3238; --on-danger: #2a0507;
    --focus: #8aa4ff; --chart-grid: #252a44; --chart-amber: #ffb547;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0f1222; --surface: #181c33; --ink: #eef0fa; --ink-soft: #c9cde3; --muted: #a3a9c7;
  --line: #2a2f4a; --line-strong: #6e7597; --line-shadow: #0a0c18;
  --primary: #8aa4ff; --primary-hover: #a6baff; --primary-edge: #4a62d1; --primary-soft: #1f2752; --primary-ring: #3b4f9e; --on-primary: #0b1233;
  --highlight-soft: #6b5120; --highlight-bg: #2a2213; --highlight-ink: #ffcf7a;
  --success: #5fd39a; --success-hover: #7fe0b0; --success-edge: #2f8a60; --success-soft: #11291d; --success-ring: #2a6a4a; --on-success: #06140e;
  --danger: #ff8a8f; --danger-hover: #ffa8ac; --danger-edge: #c2545a; --danger-soft: #35151a; --danger-ring: #7a3238; --on-danger: #2a0507;
  --focus: #8aa4ff; --chart-grid: #252a44; --chart-amber: #ffb547;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
button { font: inherit; color: inherit; }
a { color: var(--primary); text-underline-offset: .18em; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barra superior */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line);
  padding-block: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.topbar-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.15rem/1 var(--font); background: none; border: 0; padding: 4px 0; cursor: pointer; white-space: nowrap; }
.brand-mark { display: inline-flex; width: 34px; height: 34px; border-radius: var(--r-sm); background: var(--primary); color: var(--on-primary); align-items: center; justify-content: center; flex-shrink: 0; }
.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav button { background: none; border: 0; min-height: 44px; padding: 0 16px; border-radius: 999px; cursor: pointer; color: var(--ink); font-weight: 600; font-size: .95rem; transition: background-color .15s ease-out; }
.topnav button:hover, .topnav a:hover { background: var(--primary-soft); }
.topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .95rem; text-decoration: none; }
.topnav button[aria-current="page"] { background: var(--ink); color: var(--page); }
body.focus .topbar { display: none; }

.wrap { padding-block: 28px 96px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.col { max-width: 760px; margin: 0 auto; }
.col-wide { max-width: 1120px; margin: 0 auto; }

h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 2.75rem); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; margin-top: 2em; margin-bottom: .5em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; margin-bottom: .4em; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.eyebrow { font-size: .85rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-radius: 999px; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.chip-next { background: var(--highlight); color: var(--on-highlight); }
.chip-accent { background: var(--primary-soft); color: var(--primary); }
.chip-ok { background: var(--success-soft); color: var(--success); }
.chip-bad { background: var(--danger-soft); color: var(--danger); }
.chip-soft { background: var(--line); color: var(--ink-soft); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r-md); border: 2px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 700; font-size: 1rem; text-decoration: none; box-shadow: 0 3px 0 var(--line); transition: border-color .15s ease-out, transform .15s ease-out, box-shadow .15s ease-out; }
@media (hover: hover) { .btn:hover { border-color: var(--line-strong); } }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.btn.small-btn { min-height: 40px; padding: 0 14px; font-size: .9rem; }
.btn.danger { color: var(--danger); border-color: var(--danger); box-shadow: 0 3px 0 var(--danger-ring); }
a.link-btn { display: inline-flex; align-items: center; }
.link-btn { background: none; border: 0; min-height: 44px; padding: 0 4px; color: var(--muted); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn:hover { color: var(--ink); }
/* Botón con canto 3D (PushButton) */
.push { display: inline-block; padding: 0; border: 0; border-radius: var(--r-md); background: var(--primary-edge); cursor: pointer; font: inherit; box-shadow: none; min-height: 0; vertical-align: middle; }
.push .push-front { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; min-width: 170px; padding: 0 26px; border-radius: var(--r-md); background: var(--primary); color: var(--on-primary); font: 700 1.05rem/1 var(--font); transform: translateY(-5px); transition: transform .5s cubic-bezier(.3,.7,.4,1), background-color .2s ease-out; }
@media (hover: hover) { .push:hover .push-front { transform: translateY(-7px); background: var(--primary-hover); transition: transform .25s cubic-bezier(.3,.7,.4,1.5), background-color .2s ease-out; } }
.push:active { transform: none; box-shadow: none; }
.push:active .push-front { transform: translateY(-1px); transition-duration: .04s; }
.push.ok { background: var(--success-edge); } .push.ok .push-front { background: var(--success); color: var(--on-success); }
@media (hover: hover) { .push.ok:hover .push-front { background: var(--success-hover); } }
.push.bad { background: var(--danger-edge); } .push.bad .push-front { background: var(--danger); color: var(--on-danger); }
@media (hover: hover) { .push.bad:hover .push-front { background: var(--danger-hover); } }
.push[aria-disabled="true"] { background: var(--line-shadow); cursor: not-allowed; }
.push[aria-disabled="true"] .push-front { background: var(--line); color: var(--muted); transform: translateY(-5px); }
.push:disabled { background: var(--line-shadow); cursor: not-allowed; }
.push:disabled .push-front { background: var(--line); color: var(--muted); transform: translateY(-5px); }
.push-sm .push-front { min-height: 46px; min-width: 0; padding: 0 20px; font-size: .98rem; }

/* Inicio */
.home-grid { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.home-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 36px; }
.home-side { flex: 1 1 290px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.next-card { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; }
.next-card .txt { flex: 999 1 300px; min-width: 0; }
.next-card h1 { margin: 14px 0 10px; font-size: clamp(1.85rem, 3.6vw, 2.6rem); }
.next-card p { color: var(--muted); font-size: 1.05rem; max-width: 50ch; margin-bottom: 22px; }
.ring { flex: 0 0 auto; width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.ring > div { width: 106px; height: 106px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring strong { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.ring span { font-size: .78rem; color: var(--muted); font-weight: 600; margin-top: 4px; line-height: 1.2; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
.side-card h2 { font-size: 1.1rem; margin: 0 0 14px; }
.how { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.how li { display: flex; gap: 12px; align-items: flex-start; font-size: .97rem; line-height: 1.5; }
.how b.n { flex: 0 0 auto; display: inline-flex; width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--primary); font-weight: 800; align-items: center; justify-content: center; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fact { background: var(--page); border-radius: var(--r-md); padding: 12px 14px; }
.fact strong { display: block; font-size: 1.3rem; font-weight: 800; }
.fact span { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* Fases y camino */
.phase { border: 0; }
.phase > summary { list-style: none; cursor: pointer; }
.phase > summary::-webkit-details-marker { display: none; }
.band { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s ease-out; }
.phase > summary:hover .band { border-color: var(--line-strong); }
.band .k { font-size: .82rem; font-weight: 800; letter-spacing: .02em; color: var(--muted); }
.band h2 { margin: 4px 0 0; font-size: 1.35rem; }
.band .r { display: inline-flex; align-items: center; gap: 10px; }
.band .chev { transition: transform .2s ease-out; color: var(--muted); }
.phase[open] .band .chev { transform: rotate(180deg); }
.phase.now .band { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.phase.now .band .k, .phase.now .band .chev { color: var(--on-primary); }
.phase.now .band .chip { background: var(--on-primary); color: var(--primary); }
.phase.done .band { background: var(--success-soft); border-color: var(--success-soft); }
.phase.done .band .k { color: var(--success); }
.phase-body { padding: 18px 4px 4px; }
.phase-intro { color: var(--ink-soft); max-width: 65ch; margin-bottom: 24px; }
.path { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.path li { display: flex; }
.path li:nth-child(4n+2) { padding-left: 72px; }
.path li:nth-child(4n+3) { padding-left: 128px; }
.path li:nth-child(4n+4) { padding-left: 72px; }
.item { display: flex; align-items: center; gap: 20px; width: 100%; max-width: 560px; padding: 0; text-align: left; background: none; border: 0; cursor: pointer; color: inherit; border-radius: var(--r-md); }
.item[aria-disabled="true"] { cursor: default; }
.node { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; border-radius: 50%; font-weight: 800; font-size: 1.15rem; position: relative; background: var(--line); color: var(--muted); box-shadow: 0 5px 0 var(--line-shadow); transition: transform .2s ease-out, box-shadow .2s ease-out; }
.item.exam .node, .item.hito .node { border-radius: var(--r-lg); }
.item.done .node { background: var(--success); color: var(--on-success); box-shadow: 0 5px 0 var(--success-edge); }
.item.now .node, .item.open .node { background: var(--primary); color: var(--on-primary); box-shadow: 0 5px 0 var(--primary-edge); }
.item.retry .node { background: var(--danger-soft); color: var(--danger); box-shadow: 0 5px 0 var(--danger-ring); }
.item.now .node::after { content: ""; position: absolute; inset: -10px; border-radius: inherit; border: 3px solid var(--primary); opacity: .5; animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.9); opacity: .6; } 100% { transform: scale(1.15); opacity: 0; } }
@media (hover: hover) { .item:not([aria-disabled="true"]):hover .node { transform: translateY(-2px); } .item:not([aria-disabled="true"]):hover .item-main { border-color: var(--primary); transform: translateX(3px); } }
.item:not([aria-disabled="true"]):active .node { transform: translateY(3px); box-shadow: 0 2px 0 var(--line-shadow); }
.item-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 13px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); transition: border-color .15s ease-out, transform .2s ease-out; }
.item.now .item-main { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.item.exam .item-main { background: var(--highlight-bg); border-color: var(--highlight-soft); }
.item-tag { font-size: .78rem; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.item.now .item-tag, .item.open .item-tag { color: var(--primary); }
.item.done .item-tag { color: var(--success); }
.item.retry .item-tag { color: var(--danger); }
.item.exam .item-tag { color: var(--highlight-ink); }
.item-title { font-weight: 700; font-size: 1.05rem; line-height: 1.35; }
.item[aria-disabled="true"] .item-title { color: var(--muted); font-weight: 600; }
.item-sub { font-size: .9rem; color: var(--muted); }
.item-id { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.criterio { margin: 22px 0 0; padding: 14px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-size: .95rem; color: var(--ink-soft); }
.footer { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); display: flex; gap: 12px 20px; flex-wrap: wrap; align-items: center; }
.footer label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; min-height: 44px; }
.footer input { width: 20px; height: 20px; accent-color: var(--primary); }
.disclaimer { font-size: .85rem; color: var(--muted); max-width: 70ch; }

/* Barra de enfoque (lección y examen) */
.focusbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 8; background: var(--page); display: flex; align-items: center; gap: 14px; padding: 12px 0; margin: -16px 0 12px; }
.close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; border: 0; background: none; color: var(--muted); cursor: pointer; transition: background-color .15s ease-out, color .15s ease-out; }
.close:hover { background: var(--primary-soft); color: var(--ink); }
.close.armed { width: auto; padding: 0 12px; color: var(--danger); font-weight: 700; font-size: .9rem; background: var(--danger-soft); }
.bar { flex: 1 1 auto; height: 16px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--primary); box-shadow: inset 0 -4px 0 var(--primary-hover); transition: width .2s ease-out; }
.bar-n { font-weight: 800; min-width: 3.2em; text-align: right; }

/* Lección */
.lesson-head { margin-bottom: 22px; }
.lesson-head h1 { margin: 14px 0 12px; }
.lesson-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.objectives { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px 26px; margin-bottom: 28px; }
.objectives h3 { margin: 0 0 10px; font-size: 1.05rem; }
.objectives ul, .takeaways ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.objectives li, .takeaways li { position: relative; padding-left: 30px; }
.objectives li::before, .takeaways li::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-soft); }
.objectives li::after, .takeaways li::after { content: ""; position: absolute; left: 6px; top: calc(.2em + 5px); width: 7px; height: 4px; border-left: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(-45deg); }
.prose { font-size: 1.08rem; line-height: 1.65; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose strong { font-weight: 700; }
.prose h2 { font-size: 1.55rem; margin-top: 1.8em; }
.prose .table-wrap { overflow-x: auto; margin: 1em 0 1.4em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.prose table.wide { min-width: 560px; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { font-weight: 700; background: var(--page); }
.prose td.n { text-align: right; white-space: nowrap; }
.prose th.n { text-align: right; }
.box { border-radius: var(--r-md); padding: 16px 20px; margin: 1.3em 0; border: 1px solid var(--line); background: var(--surface); }
.box > :last-child { margin-bottom: 0; }
.box-t { font-weight: 800; font-size: .9rem; margin-bottom: 6px; }
.box.key { background: var(--primary-soft); border-color: var(--primary-soft); }
.box.key .box-t { color: var(--primary); }
.box.warn { background: var(--highlight-bg); border-color: var(--highlight-soft); }
.box.warn .box-t { color: var(--highlight-ink); }
.box.ex .box-t { color: var(--success); }
.box.math { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .93rem; background: var(--page); white-space: pre-wrap; overflow-x: auto; }
.takeaways { background: var(--surface); border: 2px solid var(--primary); border-radius: var(--r-xl); padding: 22px 26px; margin-top: 2.4em; box-shadow: 0 5px 0 var(--primary-soft); }
.takeaways h3 { margin-top: 0; }
.sources { margin-top: 2em; }
.sources ul { padding-left: 20px; }
.sources li { margin-bottom: .45em; }
.src-type { font-size: .78rem; color: var(--muted); margin-left: 6px; font-weight: 600; }
.lesson-end { margin-top: 2.5em; }
.lesson-end .card { display: flex; flex-direction: column; gap: 6px; }
.lesson-end h3 { margin: 0; font-size: 1.25rem; }

/* Gráficas */
.chart { margin: 1.4em 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 14px 14px 10px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart figcaption { font-size: .9rem; color: var(--muted); padding: 8px 6px 2px; line-height: 1.5; }
.c-up { fill: var(--up); stroke: var(--up); }
.c-down { fill: var(--down); stroke: var(--down); }
.c-up rect.body { fill: var(--surface); stroke-width: 1.4; }
.c-grid { stroke: var(--chart-grid); stroke-width: 1; }
.c-axis { fill: var(--muted); font-family: var(--font); font-size: 10px; font-weight: 600; }
.c-lbl { font-family: var(--font); font-size: 11px; font-weight: 700; }
.c-sup { stroke: var(--up); fill: var(--up); }
.c-res { stroke: var(--down); fill: var(--down); }
.c-neu { stroke: var(--primary); fill: var(--primary); }
.c-gold { stroke: var(--chart-amber); fill: var(--chart-amber); }
.c-ink { stroke: var(--ink-soft); fill: var(--ink-soft); }
.c-band { fill: var(--primary); opacity: .08; }
.c-vol { fill: var(--muted); opacity: .45; }
.chart polyline { fill: none; }
.chart text { stroke: none; }

/* Quiz */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 26px; margin: 1.8em 0; overflow: hidden; }
.quiz.pop { border: 2px solid var(--primary); box-shadow: 0 6px 0 var(--primary-soft); }
.quiz-tag { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
.quiz-tag span { font-weight: 600; color: var(--muted); }
.q-type { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.q-text { font-weight: 700; font-size: 1.25rem; margin-bottom: 18px; line-height: 1.4; }
.opts { display: flex; flex-direction: column; gap: 12px; }
.opt { display: flex; gap: 14px; align-items: center; text-align: left; width: 100%; min-height: 64px; padding: 14px 18px; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: 0 4px 0 var(--line); cursor: pointer; line-height: 1.45; font-weight: 600; transition: transform .15s ease-out, box-shadow .15s ease-out, border-color .15s ease-out, background-color .15s ease-out; }
@media (hover: hover) { .opt:hover:not(:disabled) { border-color: var(--line-strong); box-shadow: 0 4px 0 var(--line-shadow); } }
.opt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line-shadow); }
.opt > span:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.opt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 4px 0 var(--primary-ring); }
.opt.ok { border-color: var(--success); background: var(--success-soft); box-shadow: 0 4px 0 var(--success-ring); }
.opt.bad { border-color: var(--danger); background: var(--danger-soft); box-shadow: 0 4px 0 var(--danger-ring); }
.opt:disabled { cursor: default; color: var(--ink); }
.opts.revealed .opt:not(.ok):not(.bad) { color: var(--muted); }
.opt-k { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--r-sm); border: 2px solid var(--line); font-weight: 800; font-size: .9rem; color: var(--muted); background: var(--surface); }
.opt.multi .opt-k { border-radius: 8px; }
.opt[aria-pressed="true"] .opt-k { border-color: var(--primary); color: var(--primary); }
.opt.multi[aria-pressed="true"] .opt-k { background: var(--primary); }
.opt.multi[aria-pressed="true"] .opt-k::after { content: ""; width: 10px; height: 5px; border-left: 2.5px solid var(--on-primary); border-bottom: 2.5px solid var(--on-primary); transform: rotate(-45deg) translate(1px, -1px); }
.opt.ok .opt-k, .opt.multi.ok[aria-pressed] .opt-k { background: var(--success); border-color: var(--success); color: var(--on-success); }
.opt.bad .opt-k, .opt.multi.bad[aria-pressed] .opt-k { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.opt.multi.ok[aria-pressed="true"] .opt-k::after, .opt.multi.bad[aria-pressed="true"] .opt-k::after { border-color: currentColor; }
.opt.ok .opt-k::after, .opt.bad .opt-k::after { border-color: currentColor; }
.opt .mark { flex: 0 0 auto; display: inline-flex; }
.opt.ok .mark { color: var(--success); } .opt.bad .mark { color: var(--danger); }
.tf-row { display: flex; flex-direction: row; gap: 12px; }
.tf-row .opt { justify-content: center; font-size: 1.05rem; }
.match-row, .order-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.match-row:first-child { border-top: 0; }
.match-l { flex: 1 1 200px; min-width: 0; font-weight: 600; }
.match-row select:disabled, .cloze select:disabled { color: var(--ink); opacity: 1; cursor: default; }
.match-row select, .cloze select { font: inherit; font-weight: 600; min-height: 44px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line-strong); background: var(--surface); color: var(--ink); max-width: 100%; cursor: pointer; }
.match-row select { flex: 1 1 220px; min-width: 0; }
.match-row.ok select, .cloze select.ok { border-color: var(--success); background: var(--success-soft); }
.match-row.bad select, .cloze select.bad { border-color: var(--danger); background: var(--danger-soft); }
.fix { font-size: .88rem; font-weight: 700; color: var(--success); flex-basis: 100%; }
.order-row { background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 10px; box-shadow: 0 3px 0 var(--line); }
.order-row.ok { border-color: var(--success); background: var(--success-soft); box-shadow: 0 3px 0 var(--success-ring); }
.order-row.bad { border-color: var(--danger); background: var(--danger-soft); box-shadow: 0 3px 0 var(--danger-ring); }
.order-n { display: inline-flex; width: 30px; height: 30px; border-radius: 8px; background: var(--page); align-items: center; justify-content: center; font-weight: 800; color: var(--muted); flex: 0 0 auto; }
.order-t { flex: 1; min-width: 0; font-weight: 600; }
.order-btns { display: flex; gap: 6px; }
.order-btns button { width: 44px; height: 44px; border: 2px solid var(--line); background: var(--surface); border-radius: 12px; cursor: pointer; font-weight: 800; font-size: 1.05rem; }
.order-btns button:hover:not(:disabled) { border-color: var(--line-strong); }
.order-btns button:disabled { opacity: .35; cursor: default; }
.cloze { line-height: 2.6; font-size: 1.08rem; }
.feedback { margin: 22px -26px -26px; padding: 22px 26px 26px; animation: sheetUp .3s cubic-bezier(.2,.7,.3,1) both; }
.feedback.ok { background: var(--success-soft); }
.feedback.bad { background: var(--danger-soft); }
.feedback.part { background: var(--highlight-bg); }
.fb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.fb-icon { display: inline-flex; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; align-items: center; justify-content: center; }
.feedback.ok .fb-icon { background: var(--success); color: var(--on-success); }
.feedback.bad .fb-icon { background: var(--danger); color: var(--on-danger); }
.feedback.part .fb-icon { background: var(--highlight); color: var(--on-highlight); }
.fb-title { font-size: 1.2rem; font-weight: 800; }
.feedback.ok .fb-title { color: var(--success); }
.feedback.bad .fb-title { color: var(--danger); }
.feedback.part .fb-title { color: var(--highlight-ink); }
.fb-body { color: var(--ink); line-height: 1.55; }
.quiz-actions { margin-top: 22px; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
.feedback:has(+ .quiz-actions:not(:empty)) { margin-bottom: 0; padding-bottom: 6px; }
.feedback:not([hidden]) + .quiz-actions { margin: 0 -26px -26px; padding: 0 26px 26px; background: inherit; }
.quiz:has(.feedback.ok:not([hidden])) .quiz-actions { background: var(--success-soft); }
.quiz:has(.feedback.bad:not([hidden])) .quiz-actions { background: var(--danger-soft); }
.quiz:has(.feedback.part:not([hidden])) .quiz-actions { background: var(--highlight-bg); }
.quiz-actions:empty { display: none; }
@keyframes sheetUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Examen */
.steps { display: flex; gap: 4px; flex: 1 1 auto; }
.steps i { flex: 1; height: 12px; border-radius: 999px; background: var(--line); }
.steps i.cur { background: var(--primary); }
.steps i.ok { background: var(--success); }
.steps i.bad { background: var(--danger); }
.steps i.part { background: var(--highlight); }
.exam-title { font-size: 1.05rem; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.exam-count { font-weight: 800; white-space: nowrap; }
.result { text-align: center; padding: 20px 0; }
.result .ring { width: 180px; height: 180px; margin: 18px auto 10px; }
.result .ring > div { width: 140px; height: 140px; }
.result .ring strong { font-size: 2.4rem; }
.score { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.verdict { font-size: 1.8rem; font-weight: 800; margin-top: 8px; }
.review-list { text-align: left; margin-top: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 6px 22px; }
.review-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .95rem; align-items: baseline; }
.review-item:last-child { border-bottom: 0; }
.review-item b { flex-shrink: 0; width: 52px; font-weight: 800; }
.review-item b.ok { color: var(--success); } .review-item b.bad { color: var(--danger); } .review-item b.part { color: var(--highlight-ink); }

/* Misión */
.mission { border: 2px dashed var(--line-strong); border-radius: var(--r-xl); padding: 22px 24px; margin: 1.8em 0; background: var(--surface); }
.mission-t { font-weight: 800; font-size: 1.1rem; margin: 10px 0 4px; }
.mission ul { list-style: none; padding: 0; margin: 12px 0; }
.mission li label { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; cursor: pointer; }
.mission input[type="checkbox"] { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--primary); flex-shrink: 0; }
.mission .links { font-size: .95rem; display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; }

/* Glosario y recursos */
.search { width: 100%; font: inherit; min-height: 52px; padding: 12px 16px; border: 2px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); margin: 18px 0 22px; }
.gloss { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 8px 24px 20px; }
.gloss dt { font-weight: 800; margin-top: 18px; }
.gloss dd { margin: 3px 0 0; color: var(--ink-soft); }
.gloss .g-en { font-weight: 600; color: var(--muted); font-size: .9rem; margin-left: 8px; }

/* Hito */
.hito-q { margin-bottom: 30px; }
.profile-bars { margin-top: 18px; }
.pbar { display: grid; grid-template-columns: 130px 1fr 44px; gap: 12px; align-items: center; margin-bottom: 10px; font-size: .95rem; font-weight: 600; }
.progress { height: 12px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.pbar span.n { text-align: right; color: var(--muted); }

@media (max-width: 640px) {
  .path li { padding-left: 0 !important; }
  .item { gap: 14px; }
  .node { width: 56px; height: 56px; font-size: 1rem; }
  .card { padding: 22px; }
  .quiz { padding: 20px; }
  .feedback { margin: 20px -20px -20px; padding: 20px; }
  .feedback:not([hidden]) + .quiz-actions { margin: 0 -20px -20px; padding: 0 20px 20px; }
  .push .push-front { min-width: 0; }
}
@media (max-width: 520px) {
  .topnav button { padding: 0 10px; font-size: .88rem; }
  .brand-name { display: none; }
  .pbar { grid-template-columns: 100px 1fr 40px; }
  .tf-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::after { transition: none !important; animation: none !important; } }
.sound-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; border: 0; background: none; color: var(--muted); cursor: pointer; transition: background-color .15s ease-out, color .15s ease-out; }
.sound-btn:hover { background: var(--primary-soft); color: var(--ink); }
.sound-btn[aria-pressed="false"] { color: var(--muted); }
.topbar .sound-btn { margin-left: 4px; }
@media (max-width: 400px) { .topnav button { padding: 0 7px; font-size: .84rem; } .topnav { gap: 0; } .topbar-in { gap: 4px; } .topbar .sound-btn { width: 40px; margin-left: 0; } }
.topnav button { white-space: nowrap; }
@media (max-width: 340px) { .topbar .brand { display: none; } .topnav { margin-left: 0; } }

/* ===== Mascotas: Jesse (toro) y Ben (oso) ===== */
.mascot { display: block; height: auto; max-width: none; user-select: none; pointer-events: none; filter: drop-shadow(0 12px 16px rgba(20, 23, 43, .18)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mascot { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .28)) drop-shadow(0 14px 20px rgba(0, 0, 0, .45)); } }
:root[data-theme="dark"] .mascot { filter: drop-shadow(0 0 1px rgba(255, 255, 255, .28)) drop-shadow(0 14px 20px rgba(0, 0, 0, .45)); }
@media (prefers-reduced-motion: no-preference) {
  .ms-res, .ms-cel, .ms-home, .ms-hito { animation: ms-in .55s cubic-bezier(.2, .9, .25, 1.15) both .12s; }
  @keyframes ms-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
}
.ms-say { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px 16px 10px 10px; margin-bottom: 14px; }
.ms-say p { margin: 0; font-size: .95rem; line-height: 1.45; color: var(--ink-soft); }
.ms-av { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; object-position: top; background: var(--primary-soft); filter: none !important; }
.ms-who { display: block; font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 2px; }
.ms-who.jesse { color: var(--success); }
.ms-who.ben { color: var(--primary); }
.ms-card { display: flex; align-items: flex-end; gap: 6px; padding: 18px 18px 0 6px; overflow: hidden; }
.ms-card p { margin: 0 0 18px; font-size: .95rem; line-height: 1.45; color: var(--ink-soft); }
.ms-home { height: 172px; width: auto; margin-bottom: -34px; flex: 0 0 auto; }
.exam-title { display: flex; align-items: center; gap: 10px; }
.ms-ex { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--primary-soft); filter: none !important; flex: 0 0 auto; }
.res-hero { position: relative; display: flex; justify-content: center; margin: 4px 0 2px; }
.ms-res { height: 200px; width: auto; margin-right: -6px; }
.ms-res.duo { height: 190px; }
.ms-hito { float: right; height: 210px; width: auto; margin: -6px 0 8px 16px; shape-outside: inset(0); }
@media (max-width: 560px) { .ms-res { height: 140px; } .ms-res.duo { height: 96px; } .ms-hito { height: 140px; } .ms-home { height: 140px; } }
.res-hero .ring { margin: 18px 0 10px; position: relative; z-index: 1; }
.res-hero .ms-res { position: absolute; right: calc(50% + 62px); bottom: 8px; margin: 0; z-index: 2; }
.res-hero .ms-res.duo { right: auto; left: calc(50% + 70px); }

[hidden] { display: none !important; }
/* ---------- Plataforma: sesión, venta, pago, perfil y admin ---------- */
.demo-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 6px 16px; background: var(--highlight); color: var(--on-highlight); font-size: .85rem; text-align: center; }
.demo-bar code { font-weight: 700; background: rgba(255,255,255,.45); padding: 1px 6px; border-radius: 6px; }
.demo-bar .link-btn { color: var(--on-highlight); min-height: 32px; }
.wide-only { }
.narrow-only { display: none !important; }
@media (max-width: 640px) { .wide-only { display: none !important; } .narrow-only { display: flex !important; } }

/* avatar y menú */
.menu-wrap { position: relative; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--primary-soft); color: var(--primary); font-weight: 800; font-size: .9rem; cursor: pointer; flex: 0 0 auto; }
.avatar:hover { box-shadow: 0 0 0 3px var(--primary-soft); }
.avatar.big { width: 76px; height: 76px; font-size: 1.6rem; cursor: default; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(10, 14, 40, .16); padding: 6px; z-index: 20; display: flex; flex-direction: column; }
.menu[hidden] { display: none; }
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.menu-head span { font-size: .85rem; color: var(--muted); word-break: break-all; }
.menu a { color: inherit; text-decoration: none; }
.menu button, .menu a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; background: none; border-radius: 10px; text-align: left; cursor: pointer; font-weight: 600; }
.menu button:hover, .menu button:focus-visible, .menu a:hover, .menu a:focus-visible { background: var(--primary-soft); }

/* avisos y modales */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 460px); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: var(--r-md); background: var(--ink); color: var(--page); font-weight: 600; font-size: .95rem; box-shadow: 0 10px 28px rgba(0,0,0,.25); animation: sheetUp .25s ease-out both; }
.toast.bad svg { color: var(--danger-ring); }
.toast.ok svg { color: var(--success-ring); }
.toast.out { opacity: 0; transition: opacity .3s; }
.modal-back { position: fixed; inset: 0; background: rgba(10, 12, 30, .55); z-index: 40; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--r-xl); padding: 26px; width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.modal h2 { margin: 0 0 10px; font-size: 1.35rem; }

/* formularios */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-weight: 700; font-size: .92rem; }
.field input, .field select, .field textarea { font: inherit; font-weight: 500; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); width: 100%; }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field .hint { font-weight: 500; color: var(--muted); font-size: .82rem; }
.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 4px 0 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); flex: 0 0 auto; }
.form-err { color: var(--danger); background: var(--danger-soft); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: .92rem; margin: 0 0 14px; }
.form-grid { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.form-grid .field { flex: 1 1 240px; margin: 0; }
.center { text-align: center; }
.narrow { max-width: 560px; }

/* página de venta */
.ticks { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.ticks svg { flex: 0 0 auto; color: var(--on-success); background: var(--success); border-radius: 50%; padding: 3px; width: 24px; height: 24px; margin-top: 1px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 26px; box-shadow: 0 6px 0 var(--line); }
.auth-card h2 { margin: 0 0 6px; font-size: 1.4rem; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--page); padding: 4px; border-radius: 14px; margin-bottom: 18px; }
.tabs button { min-height: 44px; border: 0; border-radius: 10px; background: none; font-weight: 700; cursor: pointer; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px rgba(10,14,40,.08); }
.social { display: flex; flex-direction: column; gap: 10px; }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font-weight: 700; cursor: pointer; transition: border-color .15s ease-out, background-color .15s ease-out; }
.social-btn:hover { border-color: var(--line-strong); }
.social-btn.apple { background: #000; border-color: #000; color: #fff; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; font-weight: 600; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-card form .push { width: 100%; }
.auth-card form .push .push-front { width: 100%; }
.auth-card .link-btn { display: block; margin: 10px auto 0; }

/* ---------- página de venta ---------- */
.lp { display: flex; flex-direction: column; gap: 96px; padding-bottom: 24px; }
.lp h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.15; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.lp .eyebrow { display: block; color: var(--primary); font-weight: 800; letter-spacing: .02em; }
.lp-sec { scroll-margin-top: 96px; }
.lp-head { max-width: 46rem; margin-bottom: 32px; }
.lp-head-sub { color: var(--ink-soft); font-size: 1.08rem; margin: 12px 0 0; }

.lp-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 28px; }
.lp-hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1.04; letter-spacing: -.025em; margin: 18px 0 18px; text-wrap: balance; }
.lp-sub { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--ink-soft); max-width: 46ch; margin: 0 0 30px; line-height: 1.55; }
.lp-cta-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.lp-cta-row .link-btn, .lp-foot .link-btn { font-size: 1rem; }
.lp-micro { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .92rem; font-weight: 600; margin: 18px 0 0; }
.lp-micro svg { color: var(--success); flex: 0 0 auto; }
.lp .push-front svg { margin-left: 6px; }

.lp-art { margin: 0; position: relative; min-height: 470px; }
.art-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: 0 6px 0 var(--line-shadow), 0 24px 48px -24px rgba(20, 23, 43, .25); padding: 18px; position: absolute; }
.art-k { font-size: .78rem; font-weight: 800; color: var(--muted); letter-spacing: .02em; margin-bottom: 12px; }
.art-path { left: 0; top: 0; width: 58%; display: flex; flex-direction: column; gap: 12px; z-index: 1; }
.art-step { display: flex; align-items: center; gap: 12px; }
.art-step .node { width: 46px; height: 46px; font-size: .95rem; box-shadow: 0 4px 0 var(--line-shadow); }
.art-step.done .node { background: var(--success); color: var(--on-success); box-shadow: 0 4px 0 var(--success-ring); }
.art-step.now .node { background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 0 var(--primary-edge); outline: 4px solid var(--primary-soft); outline-offset: 2px; }
.art-t { display: flex; flex-direction: column; font-size: .92rem; line-height: 1.3; color: var(--ink-soft); }
.art-t b { color: var(--ink); font-size: .8rem; }
.art-step.now .art-t b { color: var(--primary); }
.art-chart-card { right: 0; top: 64px; width: 52%; z-index: 2; padding-bottom: 8px; }
.art-chart svg { display: block; width: 100%; height: auto; }
.art-quiz { left: 6%; bottom: 0; width: 60%; z-index: 3; }
.art-quiz .quiz-tag { margin-bottom: 6px; font-size: .85rem; }
.art-q { margin: 0 0 10px; font-weight: 700; }
.art-quiz .opt, .mini-quiz .opt { min-height: 48px; padding: 8px 12px; gap: 10px; font-size: .9rem; cursor: default; }
.art-quiz .opt-k, .mini-quiz .opt-k { width: 28px; height: 28px; font-size: .8rem; }
.art-fb { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; color: var(--success); font-weight: 800; font-size: .92rem; }

.lp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); margin-top: -40px; }
.lp-stats > div { padding: 22px 24px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line); }
.lp-stats > div:first-child { border-left: 0; }
.lp-stats strong { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.lp-stats span { color: var(--muted); font-size: .92rem; font-weight: 600; line-height: 1.35; }

.lp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.lp-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; display: flex; flex-direction: column; }
.lp-step-art { background: var(--page); border-radius: var(--r-lg); padding: 14px; margin-bottom: 18px; min-height: 160px; display: flex; flex-direction: column; justify-content: center; }
.lp-n { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; margin-bottom: 10px; }
.lp-step h3 { margin: 0 0 8px; font-size: 1.2rem; }
.lp-step p { margin: 0; color: var(--ink-soft); line-height: 1.55; }
.mini-quiz { display: flex; flex-direction: column; gap: 8px; }
.mini-quiz .quiz-tag { margin-bottom: 2px; font-size: .82rem; }
.mini-exam .steps { display: flex; gap: 5px; margin-bottom: 16px; }
.mini-exam .steps i { height: 10px; }
.mini-score { display: flex; align-items: center; gap: 12px; }
.mini-score strong { white-space: nowrap; font-size: 2rem; font-weight: 800; color: var(--success); line-height: 1; }
.mini-score span { font-weight: 700; font-size: .9rem; color: var(--ink-soft); line-height: 1.3; }

.lp-phases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.lp-phases > li > details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.lp-phases summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 16px 20px; cursor: pointer; min-height: 44px; border-radius: var(--r-lg); }
.lp-phases summary::-webkit-details-marker { display: none; }
.lp-phases summary:hover { background: var(--page); }
.lp-phases summary .node { width: 48px; height: 48px; font-size: 1.05rem; background: var(--primary-soft); color: var(--primary); box-shadow: 0 4px 0 var(--primary-ring); }
.lp-ph-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lp-ph-k { font-size: .82rem; font-weight: 700; color: var(--muted); }
.lp-ph-h { font-size: 1.15rem; font-weight: 800; }
.lp-phases .chev { color: var(--muted); display: inline-flex; transition: transform .2s ease-out; }
.lp-phases details[open] .chev { transform: rotate(180deg); }
.lp-ph-body { padding: 0 20px 18px 84px; }
.lp-ph-body > p { margin: 0 0 12px; color: var(--ink-soft); max-width: 70ch; }
.lp-ph-body ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lp-ph-body li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.lp-lid { font-weight: 800; color: var(--primary); min-width: 2.4em; font-variant-numeric: tabular-nums; }
.lp-ph-body li > span:nth-child(2) { flex: 1; min-width: 0; }
.lp-min { color: var(--muted); font-size: .88rem; font-weight: 600; white-space: nowrap; }

.lp-price { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 48px; align-items: center; background: var(--highlight-bg); border: 1px solid var(--highlight-soft); border-radius: 28px; padding: clamp(24px, 5vw, 56px); }
.lp-price-copy p { color: var(--ink-soft); font-size: 1.08rem; line-height: 1.6; margin: 16px 0 0; max-width: 48ch; }
.lp-price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 28px; box-shadow: 0 6px 0 var(--line-shadow); }
.lp-price-n { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 20px; }
.lp-price-n strong { white-space: nowrap; font-size: clamp(2.4rem, 5vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; }
.lp-price-n span { color: var(--muted); font-weight: 700; }
.lp-price-card .push, .lp-price-card .push-front { width: 100%; }
.lp-pay { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: .85rem; line-height: 1.45; }

.lp .faq { max-width: 800px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 700; min-height: 44px; }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--ink-soft); line-height: 1.6; }

.lp-final { text-align: center; background: var(--primary); color: var(--on-primary); border-radius: 28px; padding: clamp(36px, 6vw, 64px) 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lp-final p { margin: 0 0 14px; opacity: .9; font-size: 1.08rem; }
.lp-final .push { --push-bg: var(--surface); }
.lp-final .push-front { background: var(--surface); color: var(--primary); }
.lp-final .push { background: var(--primary-edge); }

.lp-foot { border-top: 1px solid var(--line); padding-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: -40px; }
.lp-foot-brand { display: flex; align-items: center; gap: 10px; }
.lp-foot-brand .brand-mark { width: 30px; height: 30px; }
.lp-foot-links { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; margin-left: auto; }
.lp-foot-links a { color: var(--ink-soft); font-weight: 600; }
.lp-foot .disclaimer { flex-basis: 100%; margin: 0; }

.m-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(20, 23, 43, .2); display: none; }
.m-cta .push, .m-cta .push-front { width: 100%; }

/* barra de visitante */
.topnav.guest button { font-size: .93rem; padding: 0 14px; }
.tb-login { background: none; border: 0; min-height: 44px; padding: 0 12px; font: 700 .95rem/1 var(--font); color: var(--ink); cursor: pointer; border-radius: 999px; white-space: nowrap; }
.tb-login:hover { background: var(--primary-soft); }
.topnav.guest + .tb-login { margin-left: 4px; }

/* modal de acceso */
.auth-modal .modal-shell { position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow: auto; border-radius: var(--r-xl); }
.auth-modal .auth-card { box-shadow: none; border: 0; }
.auth-modal .modal-x { position: absolute; top: 14px; right: 14px; z-index: 1; }
.auth-modal .auth-card h2 { padding-right: 44px; }
body.modal-open { overflow: hidden; }

@media (max-width: 1000px) {
  .topnav.guest button { padding: 0 9px; font-size: .88rem; }
}
@media (max-width: 920px) {
  .topnav.guest .wide-only { display: none !important; }
  .lp-hero { grid-template-columns: 1fr; gap: 40px; }
  .lp-art { max-width: 560px; width: 100%; margin: 0 auto; }
  .lp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: -24px; }
  .lp-stats > div:nth-child(3) { border-left: 0; }
  .lp-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-step { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); column-gap: 22px; align-content: start; }
  .lp-step-art { grid-row: 1 / span 3; margin: 0; }
  .lp-price { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .lp { gap: 72px; }
  .lp-hero { padding-top: 8px; }
  .lp-art { min-height: 0; display: flex; flex-direction: column; }
  .art-card { position: static; width: auto; }
  .art-path { width: 88%; }
  .art-chart-card { display: none; }
  .art-quiz { width: 86%; align-self: flex-end; margin-top: -10px; }
  .lp-step { display: flex; }
  .lp-step-art { margin-bottom: 16px; }
  .lp-ph-body { padding: 0 16px 16px; }
  .lp-phases summary { padding: 14px 16px; gap: 12px; }
  .lp-foot-links { margin-left: 0; }
  .m-cta:not([hidden]) { display: block; }
  .landing-view main, body:has(.m-cta:not([hidden])) { padding-bottom: 84px; }
  .tb-cta { display: none; }
  .lp-cta-row .push { flex: 1 1 100%; }
  .lp-cta-row .push-front { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .lp-phases .chev { transition: none; } }

/* verificación, pago, celebración */
.center-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.center-card h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 10px 0 6px; }
.big-icon { display: inline-flex; width: 76px; height: 76px; border-radius: 50%; align-items: center; justify-content: center; background: var(--primary-soft); color: var(--primary); }
.big-icon.ok { background: var(--success); color: var(--on-success); box-shadow: 0 5px 0 var(--success-edge); }
.demo-note { margin-top: 14px; padding: 14px; border-radius: var(--r-md); background: var(--highlight-bg); border: 1px dashed var(--highlight-soft); color: var(--ink-soft); font-size: .9rem; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.paywall { display: flex; flex-direction: column; gap: 16px; }
.paywall > .link-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.notice { padding: 12px 16px; border-radius: var(--r-md); background: var(--primary-soft); color: var(--ink); font-weight: 600; }
.pay-card h1 { margin: 14px 0 16px; font-size: clamp(1.8rem, 4vw, 2.3rem); }
.code-box { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 4px; }
.code-row { display: flex; gap: 10px; }
.code-row input { flex: 1; min-width: 0; font: inherit; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); }
.summary { margin: 16px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; }
.sum-row.disc { color: var(--success); font-weight: 700; }
.sum-row.total { border-top: 1px solid var(--line); padding-top: 10px; font-size: 1.15rem; }
.sum-row.total strong { font-size: 1.5rem; }
#pay-slot .push, #pay-slot .push .push-front { width: 100%; }
.secure { display: flex; gap: 8px; align-items: flex-start; justify-content: center; text-align: center; font-size: .85rem; color: var(--muted); margin: 18px 0 0; }
.secure svg { flex: 0 0 auto; margin-top: 2px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--primary-soft); border-top-color: var(--primary); animation: spin .8s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 80px 0; text-align: center; color: var(--muted); font-weight: 600; }
.item.pay .node { background: var(--highlight-bg); color: var(--highlight-ink); box-shadow: 0 5px 0 var(--highlight-soft); }
.item.pay .item-main { border-style: dashed; }
.item.pay .item-tag { color: var(--highlight-ink); }

/* perfil */
.profile { display: flex; flex-direction: column; gap: 18px; }
.prof-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.prof-id { flex: 1 1 260px; min-width: 0; }
.prof-id h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 4px; }
.prof-id p { margin: 0 0 12px; word-break: break-word; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi > span { font-size: .85rem; font-weight: 700; color: var(--muted); }
.kpi strong { font-size: 1.7rem; font-weight: 800; line-height: 1.15; }
.kpi small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.kpi .progress { margin-top: 6px; height: 10px; }
.phase-bars { display: flex; flex-direction: column; gap: 14px; }
.pb-row { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(80px, 2fr) 44px 130px; gap: 12px; align-items: center; font-size: .93rem; }
.pb-name { font-weight: 600; }
.pb-n { text-align: right; color: var(--muted); font-weight: 700; }
.pb-ex { font-weight: 700; color: var(--muted); font-size: .85rem; }
.pb-ex.ok { color: var(--success); } .pb-ex.bad { color: var(--danger); }
@media (max-width: 640px) { .pb-row { grid-template-columns: 1fr 44px; } .pb-row .progress { grid-column: 1 / -1; grid-row: 2; } .pb-ex { grid-column: 1 / -1; } }

/* tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.tbl th { background: var(--page); font-size: .8rem; font-weight: 800; color: var(--muted); letter-spacing: .02em; position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.n, .tbl th.n { text-align: right; }
.tbl td.wrap { white-space: normal; min-width: 220px; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: var(--primary-soft); }
.tbl .who strong { display: block; } .tbl .who span { color: var(--muted); font-size: .85rem; }
.mini-bar { display: inline-flex; align-items: center; gap: 8px; }
.mini-bar .progress { width: 80px; height: 8px; }

/* admin */
.admin { display: flex; flex-direction: column; gap: 18px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.admin-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); }
.admin-tabs { display: flex; gap: 4px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); padding: 4px; border-radius: 14px; }
.admin-tabs button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 10px; background: none; font-weight: 700; color: var(--muted); cursor: pointer; white-space: nowrap; }
.admin-tabs button[aria-selected="true"] { background: var(--ink); color: var(--page); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input[type="search"], .toolbar select { font: inherit; font-weight: 600; min-height: 44px; padding: 8px 12px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--ink); }
.toolbar input[type="search"] { flex: 1 1 240px; min-width: 0; }
.toolbar .spacer { flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; min-width: 0; }
.panel h2 { margin: 0 0 4px; font-size: 1.15rem; }
.panel .sub { color: var(--muted); font-size: .88rem; margin: 0 0 14px; }
.chart-svg { display: block; width: 100%; height: auto; }
.chart-svg text { font-family: var(--font); font-size: 11px; fill: var(--muted); font-weight: 600; }
.chart-svg .bar { fill: var(--primary); }
.chart-svg .bar:hover { fill: var(--primary-hover); }
.chart-svg .bar.alt { fill: var(--success); }
.chart-svg .gridl { stroke: var(--chart-grid); }
.chart-svg .val { fill: var(--ink); font-weight: 800; }
.funnel { display: flex; flex-direction: column; gap: 8px; }
.fn-row { display: grid; grid-template-columns: 170px 1fr 70px; gap: 10px; align-items: center; font-size: .9rem; font-weight: 600; }
.fn-row .track { height: 22px; background: var(--page); border-radius: 6px; overflow: hidden; }
.fn-row .track i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.fn-row .n { text-align: right; font-weight: 800; }
@media (max-width: 520px) { .fn-row { grid-template-columns: 1fr 60px; } .fn-row .track { grid-column: 1 / -1; grid-row: 2; } }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .92rem; align-items: baseline; }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--muted); font-size: .82rem; white-space: nowrap; min-width: 92px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--page); padding: 4px; border-radius: 12px; }
.seg button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 9px; background: none; font-weight: 700; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px rgba(10,14,40,.08); }
.gen-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.codes-out { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; max-height: 220px; overflow: auto; }
.codes-out code { font-weight: 800; padding: 6px 10px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); letter-spacing: .03em; }
.switch { position: relative; width: 46px; height: 28px; border-radius: 999px; border: 0; background: var(--line-strong); cursor: pointer; flex: 0 0 auto; transition: background-color .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--success); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; align-self: flex-start; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
#ad-body { display: flex; flex-direction: column; gap: 16px; }
#ad-body > * { margin-top: 0 !important; }
.admin .kpis { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.admin .kpi strong { font-size: 1.45rem; }
.grid-2 { align-items: start; }

/* demo: selector de cuenta Google/Apple */
.picker-back { z-index: 60; }
.picker { width: min(440px, 100%); }
.picker-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.picker-head svg { width: 28px; height: 28px; flex: 0 0 auto; }
.picker-head h2 { margin: 0; }
.picker-head p { margin: 2px 0 0; }
.picker-list { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 18px; }
.picker-acc { display: flex; gap: 12px; align-items: center; text-align: left; min-height: 60px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; }
.picker-acc:hover, .picker-acc:focus-visible { border-color: var(--primary); background: var(--primary-soft); }
.picker-acc strong { display: block; }
.picker-acc small { color: var(--muted); }
.picker-acc .avatar { flex: 0 0 auto; }
.form-note { color: var(--primary); background: var(--primary-soft); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: .92rem; margin: 0 0 14px; }

/* soporte técnico */
.sup h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin: 4px 0 8px; }
.sup textarea { width: 100%; resize: vertical; min-height: 140px; font: inherit; }
.sup select { width: 100%; }
.sup form .push, .sup form .push-front { width: 100%; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.big-icon.ok { background: var(--success-soft); color: var(--success); }
.demo-mail { display: flex; flex-direction: column; gap: 14px; }
.mail { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.mail-h { padding: 12px 14px; background: var(--page); display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.mail-h .chip { align-self: flex-start; margin-bottom: 4px; }
.mail pre { margin: 0; padding: 14px; white-space: pre-wrap; word-break: break-word; font: .92rem/1.55 var(--font); color: var(--ink-soft); }
.ghost-push { background: var(--line-shadow); }
.ghost-push .push-front { background: var(--surface); color: var(--ink); border: 2px solid var(--line); display: inline-flex; align-items: center; gap: 8px; }
.ghost-push .push-front svg { margin-left: 0 !important; color: var(--primary); }
.site-foot { border-top: 1px solid var(--line); margin-top: 48px; }
.site-foot-in { max-width: 1120px; margin: 0 auto; padding: 20px 16px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.site-foot nav { display: flex; gap: 18px; }
.site-foot .disclaimer { margin: 0; margin-left: auto; font-size: .82rem; }
@media (max-width: 640px) { .site-foot .disclaimer { margin-left: 0; flex-basis: 100%; } body:has(.m-cta:not([hidden])) .site-foot { padding-bottom: 84px; } }
.tab-badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--highlight); color: var(--on-highlight); font-size: .75rem; font-weight: 800; align-items: center; justify-content: center; margin-left: 4px; }
.tickets { display: flex; flex-direction: column; gap: 12px; }
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.ticket.done { opacity: .75; }
.ticket-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.ticket-who { font-size: .92rem; color: var(--ink-soft); }
.ticket-msg { margin: 0; white-space: pre-wrap; word-break: break-word; line-height: 1.55; }
/* botón de idioma */
.lang-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px; flex: 0 0 auto; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: 800 .82rem/1 var(--font); letter-spacing: .04em; cursor: pointer; transition: border-color .15s ease-out, background-color .15s ease-out; }
.lang-btn:hover { border-color: var(--primary); background: var(--primary-soft); }
.topbar .lang-btn { margin-left: 4px; }
@media (max-width: 400px) { .topbar .lang-btn { min-width: 40px; padding: 0 6px; } }

/* Textos legales */
.modal-legal { width: min(720px, 100%); }
.legal h2 { margin: 0 0 4px; }
.legal h3 { font-size: 1.02rem; margin: 22px 0 6px; }
.legal p, .legal li { line-height: 1.6; color: var(--ink-soft); }
.legal ul { padding-left: 1.2em; margin: 6px 0; }
.legal li { margin: 4px 0; }
.legal .legal-date { font-size: .88rem; opacity: .75; margin: 0 0 14px; }
.legal a { color: var(--primary); }

/* ===== Mascotas en la landing y el pago ===== */
.ms-hero { position: absolute; right: -1%; bottom: -22px; height: 270px; width: auto; z-index: 4; }
.lp-guides { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 48px; align-items: center; }
.lp-guides-art { position: relative; display: flex; justify-content: center; }
.lp-guides-art::before { content: ''; position: absolute; inset: 10% 4% 2%; border-radius: 48% 48% 32px 32px / 40% 40% 32px 32px; background: radial-gradient(ellipse at 50% 30%, var(--primary-soft), transparent 70%); }
.lp-guides-art .mascot { position: relative; height: clamp(280px, 32vw, 420px); width: auto; }
.lp-guides-copy h2 { margin: 10px 0 10px; }
.lp-guides-copy .lp-head-sub { margin-bottom: 18px; }
.guide { border: 1px solid var(--line); border-left: 5px solid var(--primary); border-radius: var(--r-lg); background: var(--surface); padding: 14px 18px; margin-top: 12px; }
.guide.jesse { border-left-color: var(--success); }
.guide b { font-size: .8rem; letter-spacing: .05em; text-transform: uppercase; }
.guide.jesse b { color: var(--success); }
.guide.ben b { color: var(--primary); }
.guide p { margin: 4px 0 0; color: var(--ink-soft); line-height: 1.5; }
.ms-price { height: 230px; width: auto; margin-top: 18px; }
.lp-final { position: relative; overflow: hidden; }
.ms-final { position: absolute; right: clamp(12px, 5vw, 72px); bottom: -70px; height: 290px; width: auto; }
.lp-final > :not(.mascot) { position: relative; z-index: 1; }
.pay-card { position: relative; }
.ms-pay { position: absolute; top: -26px; right: 14px; height: 168px; width: auto; }
.pay-card:has(.ms-pay) > .chip, .pay-card:has(.ms-pay) > h1 { margin-right: 112px; }
.ms-cel { height: 210px; width: auto; margin-bottom: 4px; }
.ms-auth { margin: 14px 0 4px; }
@media (max-width: 1080px) { .ms-final { display: none; } }
@media (max-width: 920px) { .lp-guides { grid-template-columns: 1fr; gap: 20px; } .ms-price { display: none; } }
@media (max-width: 640px) { .ms-hero { display: none; } .lp-guides-art .mascot { height: 260px; } }
@media (max-width: 520px) { .ms-pay { display: none; } .pay-card:has(.ms-pay) > .chip, .pay-card:has(.ms-pay) > h1 { margin-right: 0; } .ms-cel { height: 160px; } }

/* ===== Video de presentación (Jesse y Ben) ===== */
.lp-watch { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; transition: border-color .15s, color .15s, transform .15s; }
.lp-watch:hover { border-color: var(--primary-ring); color: var(--primary); }
.lp-watch:focus-visible, .lp-play:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 3px; }
.lp-watch-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: var(--on-primary); }
.lp-play { position: absolute; left: 50%; bottom: 8%; white-space: nowrap; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px 8px 8px; border: 0; border-radius: 999px; background: rgba(11, 18, 51, .82); color: #fff; font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(11, 18, 51, .6); backdrop-filter: blur(6px); transition: transform .15s, background .15s; }
.lp-play:hover { background: rgba(47, 91, 234, .95); transform: translateX(-50%) scale(1.04); }
.lp-play-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--yellow, #ffcf3f); color: #0b1233; }
.lp-guides-art { cursor: default; }
.lp-guides-art.playing::before { display: none; }
.lp-intro { display: block; width: min(100%, 340px); aspect-ratio: 9 / 16; height: auto; border-radius: 22px; background: #0b1233; box-shadow: 0 24px 48px -20px rgba(11, 18, 51, .55); }
@media (prefers-reduced-motion: reduce) { .lp-watch, .lp-play { transition: none; } }
/* La etiqueta de la portada puede pasar a dos líneas en celulares angostos */
.lp-hero-copy .chip { white-space: normal; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; max-width: 100%; }
.tb-cta .push-front, .tb-login { white-space: nowrap; }
/* Menú de la portada: compacto en pantallas medianas y oculto antes de que empuje el botón de registro */
@media (max-width: 1240px) { .topnav.guest button, .topnav.guest a { padding: 0 9px; font-size: .88rem; } }
@media (max-width: 1100px) { .topnav.guest .wide-only { display: none !important; } }


/* Páginas públicas (glosario y artículos) */
a.brand, a.tb-login { text-decoration: none; color: var(--ink); }
a.tb-login { display: inline-flex; align-items: center; }
a.push { text-decoration: none; }
.topnav.guest { margin-left: auto; }
.pg { padding-bottom: 24px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.pg .lesson-head h1 { font-size: clamp(2rem, 5vw, 2.6rem); line-height: 1.12; letter-spacing: -.02em; }
.pg .lesson-head .chip, .pg-cta .chip { white-space: normal; line-height: 1.3; padding-top: 6px; padding-bottom: 6px; max-width: 100%; }
.pg .box.key p { font-size: 1.1rem; line-height: 1.6; margin: 0; color: var(--ink); }
.pg .prose h2 { margin-top: 1.6em; }
.pg .ms-say { margin: 28px 0; }
.pg-cta { margin: 36px 0; display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--primary); box-shadow: 0 5px 0 var(--primary-edge); }
.pg-cta h2 { margin: 0; font-size: 1.35rem; }
.pg-cta p { margin: 0; color: var(--ink-soft); }
.pg-cta .row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 8px; }
.pg-cta .link-btn { color: var(--primary); }
.pg .faq { margin: 36px 0; }
.pg .faq h2, .pg-rel h2 { font-size: 1.35rem; margin: 0 0 14px; }
.pg-rel { margin: 36px 0 8px; }
.rel-list { display: flex; flex-wrap: wrap; gap: 10px; }
.rel-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; text-decoration: none; }
.rel-list a:hover { background: var(--primary); color: var(--on-primary); }
.pg-disc { font-size: .88rem; color: var(--muted); margin-top: 28px; }
.quiz-static ol { margin: 6px 0 10px; padding-left: 26px; }
.quiz-static details { margin-top: 6px; }
.quiz-static summary { cursor: pointer; font-weight: 700; color: var(--primary); min-height: 44px; display: flex; align-items: center; }
.quiz-static details p { margin: 4px 0 0; }
.blank { letter-spacing: .1em; font-weight: 700; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 18px 22px; margin: 22px 0 8px; }
.toc h2 { font-size: 1rem; margin: 0 0 8px; }
.toc ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.toc a { color: var(--primary); font-weight: 600; }
.pg .prose h2[id] { scroll-margin-top: 80px; }
.cta-lecs { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.cta-lecs li { margin-bottom: 4px; }
.gl-intro { font-size: 1.1rem; color: var(--ink-soft); }
.gl-letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 8px; position: sticky; top: 64px; z-index: 2; background: var(--page); padding: 8px 0; }
.gl-letters a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 800; text-decoration: none; }
.gl-letters a:hover { border-color: var(--primary); color: var(--primary); }
.gl-sec h2 { font-size: 1.6rem; margin: 30px 0 10px; color: var(--primary); scroll-margin-top: 130px; }
.gl-list { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gl-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; scroll-margin-top: 130px; }
.gl-item dt { font-weight: 800; font-size: 1.05rem; }
.gl-item dt .gl-en { font-weight: 600; color: var(--muted); font-size: .9rem; margin-left: 6px; }
.gl-item dd { margin: 4px 0 0; color: var(--ink-soft); line-height: 1.55; }
.gl-item dd a { font-weight: 700; color: var(--primary); }
.gl-feat { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 18px 0 8px; }
.gl-feat a { display: block; padding: 14px 16px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 700; }
.gl-feat a span { display: block; font-weight: 500; font-size: .88rem; color: var(--muted); margin-top: 2px; }
.gl-feat a:hover { border-color: var(--primary); }
.pg-foot { max-width: 760px; margin: 0 auto; padding: 28px max(16px, env(safe-area-inset-left, 0px)) 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.pg-foot a { color: var(--ink-soft); font-weight: 600; }
.pg-foot p { flex-basis: 100%; margin: 6px 0 0; font-size: .88rem; color: var(--muted); }
@media (max-width: 640px) { .gl-letters { top: 56px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .gl-letters a { flex: 0 0 auto; width: 38px; height: 38px; } .gl-feat { grid-template-columns: 1fr 1fr; gap: 8px; } .gl-feat a { padding: 10px 12px; font-size: .95rem; } .gl-feat a span { font-size: .8rem; } }

/* Resúmenes del mercado */
.mk .mk-titular { font-size: 1.25rem; font-weight: 700; color: var(--ink-soft); margin: 0; }
.mk-portada { margin: 8px 0 28px; }
.mk-sub { font-size: 1.12rem; line-height: 1.6; }
.mk-kpis { display: flex; flex-wrap: wrap; gap: 10px; }
.mk-kpi { display: inline-flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.mk-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px 22px; margin: 16px 0; }
.mk-sec h2 { margin: 4px 0 10px; font-size: 1.3rem; line-height: 1.25; }
.mk-sec p { margin: 0 0 8px; line-height: 1.6; }
.mk-sec .table-wrap { border: 0; background: none; }
.mk-tabla { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.mk-tabla th, .mk-tabla td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; font-weight: 600; }
.mk-tabla tr:last-child th, .mk-tabla tr:last-child td { border-bottom: 0; }
.mk-tabla td.n { text-align: right; white-space: nowrap; }
.mk-d { display: block; font-weight: 500; font-size: .88rem; color: var(--muted); }
.mk-nota, .mk-fuentes { font-size: .9rem; color: var(--muted); }
.mk-dato { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 2px 0 10px; }
.mk-dato b { font-size: 1.7rem; font-variant-numeric: tabular-nums; }
.mk-dato span { color: var(--muted); font-size: .92rem; }
.mk-firma { display: flex; align-items: center; gap: 10px; margin-top: 10px !important; }
.mk-firma .ms-av { width: 40px; height: 40px; }
.mk-up { color: var(--success); } .mk-down { color: var(--danger); } .mk-flat { color: var(--ink); }
.mk-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 28px 0 8px; }
.mk-nav a { font-weight: 700; color: var(--primary); }
.mk-lista { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 10px; }
.mk-lista a { display: block; padding: 16px 18px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.mk-lista a:hover { border-color: var(--primary); }
.mk-l-k { display: block; font-size: .85rem; font-weight: 700; color: var(--primary); text-transform: capitalize; }
.mk-l-t { display: block; font-weight: 800; font-size: 1.1rem; margin: 2px 0; }
.mk-l-s { display: block; color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 640px) { .mk-sec { padding: 16px 14px; } .mk-tabla th, .mk-tabla td { padding: 9px 3px; font-size: .95rem; } .mk-tabla th { overflow-wrap: anywhere; } .mk-nav { flex-direction: column; } }
