/* ============================================================
   Historias del blog: formato de presentación paso a paso.
   Un escenario fijo (teléfono, narrador, elenco, globo de texto y
   tarjeta de concepto) que story.js va cambiando beat por beat. Las
   piezas no se reemplazan: se transforman, y de ahí sale la suavidad.
   Sin JS, la página se lee como un artículo (.beats en flujo normal).
   ============================================================ */

:root {
  --st-bg: #14141F;
  --st-bg-2: #1C1C2B;
  --st-ink: #0E0E14;
  --st-paper: #FFFFFF;
  --st-line: rgba(255, 255, 255, .08);
  --st-text: #F4F2FA;
  --st-muted: #A3A1B8;
  --st-violet: #7B53EA;
  --st-violet-soft: #B9A3F5;
  --st-caption: #FFF6C2;
  --st-mint: #D1FFCA;
  --st-ok: #2FBF71;
  --st-no: #E5484D;
  --st-pink: #E8558C;
  --st-blue: #3E7BFA;
  --st-amber: #F2A93B;

  --font-cond: 'Anton', 'Barlow Condensed', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(.22, .8, .22, 1);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --t: 560ms;

  /* Los fija story.js según el tamaño de la ventana. */
  --s: 1;
  --shift: 0px;
  --top: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body.story-body {
  min-height: 100vh;
  background: var(--st-bg);
  color: var(--st-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: inherit; }

.story-skip {
  position: absolute; left: 12px; top: -48px; z-index: 50;
  padding: 8px 12px; background: var(--st-paper); color: var(--st-ink);
  border-radius: 8px; font-size: 14px; text-decoration: none;
}
.story-skip:focus { top: 8px; }

/* ---------- Barra superior ---------- */
.story-top {
  position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--top);
  display: flex; align-items: center; gap: 16px; padding: 0 20px;
  border-bottom: 1px solid var(--st-line);
  background: color-mix(in srgb, var(--st-bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
.story-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 15px; }
.story-brand img { filter: invert(1); }
.story-title {
  margin: 0; flex: 1; text-align: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--st-muted);
}
.story-count { margin: 0; font-family: var(--font-mono); font-size: 12px; color: var(--st-muted); min-width: 52px; text-align: right; }
.story-close {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--st-line); color: var(--st-muted); transition: color .2s, border-color .2s;
}
.story-close:hover { color: var(--st-text); border-color: rgba(255,255,255,.3); }

/* ============================================================
   Sin JS: artículo. Con JS (html.js): escenario.
   ============================================================ */
.stage, .controls, .progress { display: none; }
.beats {
  list-style: none; margin: 0 auto; padding: calc(var(--top) + 32px) 20px 80px; max-width: 680px;
  display: grid; gap: 20px;
}
.beat-caption { font-size: 19px; line-height: 1.45; margin: 0; }
.beat-say { margin: 0; color: var(--st-muted); font-style: italic; }
.beat-say::before { content: attr(data-who) ": "; font-style: normal; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; }

html.js body.story-body { overflow: hidden; height: 100dvh; }
html.js .beats { display: none; }
html.js .stage, html.js .controls, html.js .progress { display: block; }

.stage {
  position: fixed; inset: var(--top) 0 0 0; overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  cursor: pointer;
}
.stage-grid {
  position: absolute; inset: -40px;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.4px);
  background-size: 28px 28px;
  animation: grid-drift 60s linear infinite;
}
@keyframes grid-drift { to { transform: translate(28px, 28px); } }

/* ---------- Teléfono ---------- */
.phone-rig {
  position: absolute; left: 50%; top: 50%;
  width: 300px; height: 620px; margin: -310px 0 0 -150px;
  transform: translate(var(--shift), var(--rig-y, 0px)) scale(var(--s));
  transition: transform 800ms var(--ease), opacity var(--t) var(--ease);
  will-change: transform;
}
.stage[data-scene="panel"] .phone-rig {
  opacity: 0;
  transform: translate(var(--shift), calc(var(--rig-y, 0px) + 60px)) scale(calc(var(--s) * .92));
  pointer-events: none;
}
.phone-scale { position: relative; width: 100%; height: 100%; }
.phone {
  position: absolute; inset: 0; border-radius: 46px; padding: 11px;
  background: #0A0A0F;
  box-shadow: 0 0 0 2px #2A2A38, 0 40px 80px -30px rgba(0,0,0,.7);
  transition: filter var(--t) var(--ease);
}
.phone::after {
  content: ""; position: absolute; inset: 0; z-index: 8; border-radius: inherit; pointer-events: none;
  background: rgba(14, 14, 22, .66); opacity: 0; transition: opacity var(--t) var(--ease);
}
.stage.is-dim .phone::after { opacity: 1; }
.stage.is-dim .phone { filter: saturate(.6); }
.phone-notch {
  position: absolute; z-index: 5; left: 50%; top: 11px; width: 108px; height: 26px; margin-left: -54px;
  background: #0A0A0F; border-radius: 0 0 16px 16px;
}
.screens { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #fff; }

.screen {
  position: absolute; inset: 0; overflow: hidden;
  color: #111; font-size: 13px; line-height: 1.35;
  opacity: 0; transform: translateY(14px) scale(.985); filter: blur(6px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), filter var(--t) var(--ease);
  pointer-events: none;
}
.screen.is-on { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.screen.is-off-up { transform: translateY(-14px) scale(.985); }
.screen p { margin: 0; }

/* Reel */
.scr-reel { background: #0B0B10; color: #fff; }
.reel-top { position: absolute; z-index: 2; top: 40px; left: 16px; right: 16px; display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; }
.reel-media {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #2B3A55 0%, #6B7FA6 45%, #C9D4E6 100%);
  display: grid; place-items: center; overflow: hidden;
}
.reel-jacket { font-size: 150px; filter: drop-shadow(0 18px 24px rgba(0,0,0,.35)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-2deg); } }
.reel-snow {
  position: absolute; inset: 0;
  background-image: radial-gradient(#fff 1.2px, transparent 1.6px), radial-gradient(rgba(255,255,255,.7) 1px, transparent 1.4px);
  background-size: 40px 40px, 26px 26px; background-position: 0 0, 13px 7px;
  animation: snow 9s linear infinite; opacity: .7;
}
@keyframes snow { to { background-position: 0 400px, 13px 267px; } }
.reel-side { position: absolute; right: 12px; bottom: 150px; display: grid; gap: 16px; text-align: center; font-size: 22px; }
.reel-side small { display: block; font-size: 10px; font-weight: 600; }
.reel-meta { position: absolute; left: 14px; right: 60px; bottom: 82px; font-size: 12.5px; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.reel-meta span { opacity: .85; }
.reel-meta p + p { margin-top: 4px; }
.reel-cta {
  position: absolute; left: 12px; right: 12px; bottom: 28px; padding: 11px 14px;
  background: rgba(255,255,255,.95); color: #111; border-radius: 10px; font-weight: 700;
  display: flex; justify-content: space-between;
}

/* Producto */
.scr-product { background: #FAFAF7; }
.shop-bar { padding: 44px 16px 10px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #ECECE6; }
.shop-logo { font-family: var(--font-cond); font-size: 18px; letter-spacing: .02em; }
.shop-photo { height: 250px; display: grid; place-items: center; background: #DDE7F2; font-size: 120px; }
.shop-info { padding: 16px; display: grid; gap: 10px; }
.shop-name { font-weight: 700; font-size: 16px; }
.shop-price { font-family: var(--font-cond); font-size: 26px; }
.shop-sizes { display: flex; gap: 6px; }
.shop-sizes span { width: 36px; height: 32px; display: grid; place-items: center; border: 1px solid #CFCFC8; border-radius: 8px; font-weight: 600; }
.shop-sizes .is-on { background: #111; color: #fff; border-color: #111; }
.shop-btn { padding: 12px; text-align: center; background: #111; color: #fff; border-radius: 10px; font-weight: 700; }
.shop-note { font-size: 11px; color: #777; text-align: center; }

/* Búsqueda */
.scr-search { background: #fff; padding: 44px 14px 0; font-family: Arial, var(--font-sans); }
.g-logo { text-align: center; font-size: 26px; letter-spacing: -1px; margin-bottom: 10px; }
.g-logo b { font-weight: 500; }
.g-box { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 999px; box-shadow: 0 1px 6px rgba(32,33,36,.28); margin-bottom: 14px; }
.g-result { padding: 10px 2px 12px; border-bottom: 1px solid #EEE; }
.g-result.is-faded { opacity: .55; }
.g-sponsor { font-weight: 700; font-size: 11.5px; margin-bottom: 2px !important; }
.g-url { font-size: 11.5px; color: #4D5156; }
.g-title { color: #1A0DAB; font-size: 15.5px; line-height: 1.3; margin: 3px 0 !important; }
.g-desc { font-size: 12px; color: #4D5156; }

/* Email */
.scr-email { background: #fff; }
.mail-head { padding: 44px 16px 12px; border-bottom: 1px solid #EEE; display: grid; gap: 10px; }
.mail-back { color: #1A73E8; font-size: 13px; }
.mail-subject { font-size: 17px; font-weight: 700; line-height: 1.25; }
.mail-from { display: flex; gap: 10px; align-items: center; font-size: 12px; color: #555; }
.mail-avatar { width: 32px; height: 32px; border-radius: 50%; background: #111; color: #fff; display: grid; place-items: center; font-weight: 700; }
.mail-body { padding: 16px; display: grid; gap: 14px; }
.mail-hero { height: 170px; background: #F3EEE3; border-radius: 12px; display: grid; place-items: center; font-size: 88px; }
.mail-copy { font-size: 13.5px; }
.mail-btn { justify-self: center; padding: 12px 30px; background: #111; color: #fff; border-radius: 999px; font-weight: 700; }

/* Directo */
.scr-url { background: #F1F1F4; }
.url-bar { margin: 44px 12px 0; padding: 10px 12px; background: #fff; border-radius: 12px; display: flex; gap: 8px; align-items: center; font-size: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.url-lock { font-size: 11px; }
.url-text { display: inline-flex; align-items: center; }
.url-typed { display: inline-block; overflow: hidden; white-space: nowrap; width: 0; }
.scr-url.is-on .url-typed { animation: type 1.4s steps(17) .35s forwards; }
@keyframes type { to { width: 17ch; } }
.url-caret { width: 1.5px; height: 16px; background: #1A73E8; margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.url-page { position: relative; margin: 14px 12px; height: 440px; border-radius: 14px; background: #fff; overflow: hidden; }
.url-skeleton { padding: 18px; display: grid; gap: 10px; }
.url-skeleton span { height: 14px; border-radius: 6px; background: #ECECF1; }
.url-skeleton span:first-child { height: 180px; }
.url-skeleton span:last-child { width: 60%; }
.url-stamp {
  position: absolute; left: 50%; top: 50%; padding: 8px 18px;
  font-family: var(--font-cond); font-size: 30px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--st-violet); border: 3px solid var(--st-violet); border-radius: 10px;
  transform: translate(-50%, -50%) rotate(-8deg) scale(1.6); opacity: 0;
}
.scr-url.is-on .url-stamp { animation: stamp .5s var(--ease-pop) 1.9s forwards; }
@keyframes stamp { to { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }

/* Compra */
.scr-checkout { background: #fff; padding: 90px 22px 0; text-align: center; }
.ok-ring { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; background: var(--st-mint); color: #0B6B3A; display: grid; place-items: center; }
.ok-title { font-family: var(--font-cond); font-size: 30px; text-transform: uppercase; }
.ok-sub { color: #777; margin: 4px 0 26px !important; font-family: var(--font-mono); font-size: 11px; }
.ok-line { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid #EEE; text-align: left; }
.ok-line.is-total { border-top: 2px solid #111; font-size: 15px; }

/* Reportes */
.scr-report { background: #F6F7F9; padding: 44px 0 0; }
.rep-head { display: flex; align-items: center; gap: 10px; padding: 0 16px 12px; font-weight: 700; font-size: 14px; border-bottom: 1px solid #E3E5EA; background: #fff; }
.rep-head img { object-fit: contain; }
.rep-mailicon { width: 24px; height: 24px; border-radius: 6px; background: var(--st-amber); color: #fff; display: grid; place-items: center; font-size: 14px; }
.rep-mailicon.is-sm { width: 20px; height: 20px; font-size: 12px; }
.rep-crumb { padding: 14px 16px 8px; font-family: var(--font-mono); font-size: 10.5px; color: #6A6F7A; text-transform: uppercase; letter-spacing: .05em; }
.rep-row { display: grid; grid-template-columns: 1.6fr .8fr 1fr; gap: 6px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #ECEEF2; font-size: 12.5px; }
.rep-row span:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.rep-row.is-head { background: transparent; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; color: #6A6F7A; }
.rep-row.is-hot { font-weight: 700; position: relative; }
.rep-row.is-hot::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--st-violet); }
.screen.is-on .rep-row.is-hot { animation: hot-row 1.2s var(--ease) .45s both; }
@keyframes hot-row { from { background: #fff; } 35% { background: #EEE7FF; } to { background: #F7F3FF; } }
.rep-row.is-dim { color: #9A9EA8; }
.rep-foot { padding: 14px 16px; font-size: 11px; color: #6A6F7A; }

/* Suma */
.scr-sum { background: #fff; padding: 52px 18px 0; }
.sum-eyebrow { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #6A6F7A; margin: 8px 0 10px !important; }
.sum-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #EEE; font-size: 14px; }
.sum-row img { object-fit: contain; }
.sum-row span:nth-child(2) { flex: 1; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 22px; color: var(--st-no); }
.sum-total b, .sum-real b { font-family: var(--font-cond); font-size: 34px; font-weight: 400; }
.sum-total b { text-decoration: line-through; text-decoration-thickness: 3px; }
.sum-real { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px; background: #111; color: #fff; border-radius: 14px; }
.screen.is-on .sum-row { animation: rise .5s var(--ease) both; }
.screen.is-on .sum-row:nth-of-type(2) { animation-delay: .15s; }
.screen.is-on .sum-row:nth-of-type(3) { animation-delay: .3s; }
.screen.is-on .sum-row:nth-of-type(4) { animation-delay: .45s; }
.screen.is-on .sum-total { animation: rise .5s var(--ease) .65s both; }
.screen.is-on .sum-real { animation: rise .5s var(--ease) .9s both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* Dashcrab: el recorrido */
.scr-dc { background: #E5E5E5; padding: 46px 14px 0; color: #000; }
.dc-head { background: #fff; border-radius: 16px; padding: 12px 14px; display: grid; gap: 2px; margin-bottom: 10px; }
.dc-eyebrow, .dc-model-label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #666; }
.dc-head b { font-family: var(--font-cond); font-weight: 400; font-size: 22px; text-transform: uppercase; }
.dc-path { list-style: none; margin: 0 0 12px; padding: 4px 14px; background: #fff; border-radius: 16px; }
.dc-path li { display: grid; grid-template-columns: 26px 1fr auto; grid-template-rows: auto 6px; column-gap: 10px; row-gap: 6px; align-items: center; padding: 10px 0; border-bottom: 1px solid #EEE; position: relative; }
.dc-path li:last-child { border-bottom: 0; }
.dc-dot { grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: #F3F3F3; display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; transition: background .4s, color .4s; }
.dc-label { font-weight: 600; font-size: 12.5px; line-height: 1.2; }
.dc-label small { display: block; font-weight: 400; color: #777; font-size: 10.5px; }
.dc-val { font-family: var(--font-mono); font-size: 11.5px; font-variant-numeric: tabular-nums; transition: opacity .3s; }
.dc-bar { grid-column: 2 / 4; height: 6px; background: #F3F3F3; border-radius: 3px; overflow: hidden; }
.dc-bar i { display: block; height: 100%; width: var(--p, 25%); background: #000; border-radius: 3px; transition: width 700ms var(--ease); }
.dc-path li.is-zero .dc-val { opacity: .35; }
.dc-path li.is-top .dc-dot { background: #000; color: #fff; }
.dc-model-label { margin: 0 0 6px 2px !important; }
.dc-models { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.dc-models button {
  padding: 7px 4px; border-radius: 999px; border: 1px solid #C6C6C6; background: #fff; color: #000;
  font-size: 11.5px; font-weight: 600; cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.dc-models button.is-on { background: #000; color: #fff; border-color: #000; }
.dc-sum { margin-top: 12px !important; text-align: center; font-size: 12px; color: #444; }
.stage.is-interactive .dc-models button { animation: nudge 1.6s var(--ease) .4s 2; }
@keyframes nudge { 50% { box-shadow: 0 0 0 4px rgba(123, 83, 234, .35); } }

/* ---------- Pizarra (data-driven paso a paso) y matriz ---------- */
.board, .matrix {
  position: absolute; z-index: 6; left: var(--board-x, 40%); top: 50%; width: var(--board-w, 55%);
  overflow: hidden; scale: var(--bscale, 1); transform-origin: right center;
  background: var(--st-paper); color: var(--st-ink); border-radius: 28px;
  opacity: 0; transform: translateY(-46%) scale(.97); pointer-events: none;
  transition: opacity var(--t) var(--ease), transform 760ms var(--ease);
  cursor: auto;
}
.stage[data-scene="board"] .board, .stage[data-scene="matrix"] .matrix { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.stage[data-scene="board"] .phone-rig, .stage[data-scene="matrix"] .phone-rig {
  opacity: 0; transform: translate(calc(var(--shift) - 120px), var(--rig-y, 0px)) scale(calc(var(--s) * .9)); pointer-events: none;
}
.board::after, .matrix::after {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; pointer-events: none;
  background: rgba(14, 14, 22, .66); opacity: 0; transition: opacity var(--t) var(--ease);
}
.stage.is-dim .board::after, .stage.is-dim .matrix::after { opacity: 1; }

.board { container-type: inline-size; padding: 24px 28px 26px; }
.bd-inner { display: grid; grid-template-columns: minmax(230px, .78fr) 1.4fr; gap: 10px 28px; }
.bd-eyebrow, .mx-eyebrow { margin: 0 0 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #6A6A7E; }
.bd-paths { display: grid; align-content: start; gap: 10px; }
.bd-path { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 10px 12px; background: #F4F4F7; border-radius: 12px; font-size: 12.5px; transition: background .5s, opacity .5s; }
.bd-path i { font-style: normal; color: #9A9AAE; }
.bd-who { width: 100%; font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.chip { padding: 3px 9px; border-radius: 999px; font-weight: 600; font-size: 11.5px; color: #fff; transition: opacity .5s, filter .5s; }
.c-meta { background: #0866FF; }
.c-google { background: #34A853; }
.c-email { background: var(--st-amber); }
.bd-end { padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: 11.5px; }
.bd-end.is-ok { background: var(--st-mint); color: #0B6B3A; }
.bd-end.is-no { background: #FFD9DA; color: #A3262A; }
.board[data-step="1"] .bd-path.is-win { background: #EAF9E6; }
.board[data-step="4"] .bd-paths .c-meta, .board[data-step="5"] .bd-paths .c-google { opacity: .25; filter: grayscale(1); text-decoration: line-through; }

.bd-graph { width: 100%; height: auto; overflow: visible; transition: opacity var(--t) var(--ease); }
.board[data-step="1"] .bd-graph { opacity: .18; }
.bd-graph .n rect { fill: #fff; stroke: #14141F; stroke-width: 2; transition: opacity .5s, fill .5s; }
.bd-graph .n text { font: 600 15px var(--font-sans); text-anchor: middle; fill: #14141F; }
.bd-graph .n-ok rect { fill: var(--st-mint); }
.bd-graph .n-no rect { fill: #FFD9DA; }
.bd-graph .n-x { stroke: var(--st-no); stroke-width: 4; stroke-linecap: round; opacity: 0; transition: opacity .4s; fill: none; }
.bd-graph .e path { fill: none; stroke: #14141F; stroke-width: 2.2; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms var(--ease), stroke .5s, opacity .5s, stroke-width .5s; }
.bd-graph .e text { font: 500 13px var(--font-mono); fill: #6A6A7E; opacity: 0; transition: opacity .5s .5s; }
.board:not([data-step="1"]) .bd-graph .e path { stroke-dashoffset: 0; }
.board:not([data-step="1"]) .bd-graph .e text { opacity: 1; }
.board[data-step="3"] .e.w path { stroke: #1F9D5C; stroke-width: 3.4; }
.board[data-step="3"] .e.w text { fill: #1F9D5C; font-weight: 700; }
.board[data-step="4"] .e.m, .board[data-step="5"] .e.g { opacity: .2; }
.board[data-step="4"] .n-meta rect, .board[data-step="5"] .n-google rect { opacity: .35; }
.board[data-step="4"] .n-meta .n-x, .board[data-step="5"] .n-google .n-x { opacity: 1; }
.board[data-step="4"] .e.w:not(.m) path { stroke: #1F9D5C; stroke-width: 3; }
.bd-calc { grid-column: 1 / -1; position: relative; min-height: 132px; border-top: 1px solid #E6E6EC; padding-top: 14px; }
.bd-block { position: absolute; inset: 14px 0 0; opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .55s var(--ease); font-size: 14.5px; line-height: 1.5; }
.bd-block p { margin: 0 0 8px; }
.board[data-step="1"] [data-show="1"], .board[data-step="2"] [data-show="2"], .board[data-step="3"] [data-show="3"],
.board[data-step="4"] [data-show="4"], .board[data-step="5"] [data-show="5"], .board[data-step="6"] [data-show="6"] { opacity: 1; transform: none; transition-delay: .2s; }
.bd-big { font-family: var(--font-cond); font-size: 26px; line-height: 1.05; text-transform: uppercase; }
.bd-big b { font-weight: 400; color: var(--st-violet); }
.bd-math { font-family: var(--font-mono); font-size: 12.5px; color: #3A3A4E; }
.bd-small { font-size: 12.5px; color: #6A6A7E; }
.bd-bars { display: grid; gap: 7px; margin: 4px 0 10px; max-width: 520px; }
.bd-bars div { display: grid; grid-template-columns: 70px 1fr 48px; gap: 10px; align-items: center; font-size: 13px; }
.bd-bars i { height: 12px; width: 0; background: var(--st-ink); transition: width 900ms var(--ease) .35s; }
.bd-bars.is-share i { background: var(--st-violet); }
.bd-bars b { font-family: var(--font-mono); font-size: 12.5px; text-align: right; }
.board[data-step="5"] [data-show="5"] .bd-bars i, .board[data-step="6"] [data-show="6"] .bd-bars i { width: var(--w); }
@container (max-width: 640px) {
  .bd-inner { grid-template-columns: 1fr; gap: 8px; }
  .bd-paths { gap: 6px; }
  .bd-path { padding: 7px 10px; gap: 4px; }
  .bd-who { width: auto; margin: 0 4px 0 0; font-size: 12px; }
  .chip, .bd-end { font-size: 10.5px; padding: 2px 7px; }
  .bd-block { font-size: 13px; }
  .bd-calc { min-height: 168px; }
}

.matrix { padding: 22px 24px 18px; }
.mx-eyebrow b { color: var(--st-ink); font-weight: 600; }
.mx-scroll { overflow-x: auto; scrollbar-width: none; }
.mx-scroll::-webkit-scrollbar { display: none; }
.mx-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.mx-table th { padding: 8px 6px 10px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: #6A6A7E; text-align: right; vertical-align: bottom; line-height: 1.25; border-bottom: 2px solid var(--st-ink); cursor: pointer; transition: color .3s, background .5s var(--ease); }
.mx-table th:first-child { text-align: left; cursor: default; }
.mx-table th.is-dd { color: var(--st-violet); }
.mx-table td { padding: 0; border-bottom: 1px solid #ECECF1; text-align: right; transition: background .5s var(--ease), opacity .5s var(--ease); }
.mx-table td:first-child, .mx-table th:first-child { position: sticky; left: 0; z-index: 1; background: var(--st-paper); }
.mx-table td:first-child { padding: 12px 10px 12px 0; text-align: left; font-weight: 600; white-space: nowrap; }
.mx-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.mx-cell { position: relative; display: block; padding: 12px 8px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.mx-cell::before { content: ""; position: absolute; inset: 3px 2px; border-radius: 6px; background: var(--st-violet); opacity: calc(var(--a) * .55); transition: opacity .5s var(--ease); }
.mx-cell span { position: relative; }
.mx-table tr, .mx-table td { transition: opacity .5s var(--ease); }
.matrix.has-row tbody tr:not(.is-row) { opacity: .28; }
.mx-table td.is-col, .mx-table th.is-col { background: #EFE9FF; }
.matrix.has-col th.is-col { color: var(--st-violet); border-radius: 10px 10px 0 0; }
.matrix.has-col tbody tr:last-child td.is-col { border-radius: 0 0 10px 10px; }
.matrix.has-col td.is-col .mx-cell span { font-weight: 700; }
.mx-table th + th { min-width: 66px; }
.matrix.has-row tr.is-row td:first-child { color: var(--st-violet); }
.mx-foot { margin: 12px 0 0; font-size: 11.5px; color: #6A6A7E; }
.mx-mobile-note { display: none; }

/* ---------- Toque y sello ---------- */
.tap { position: absolute; z-index: 6; left: 0; top: 0; width: 0; height: 0; opacity: 0; transition: opacity .3s, transform 700ms var(--ease); pointer-events: none; }
.tap.is-on { opacity: 1; }
.tap-dot, .tap-ring { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; border-radius: 50%; }
.tap-dot { background: rgba(255, 241, 0, .9); box-shadow: 0 0 0 3px #111; transform: scale(.6); }
.tap.is-on .tap-dot { animation: press 1.8s var(--ease) .5s infinite; }
.tap-ring { border: 3px solid #FFF100; opacity: 0; }
.tap.is-on .tap-ring { animation: ring 1.8s var(--ease) .5s infinite; }
@keyframes press { 0%, 100% { transform: scale(.6); } 18% { transform: scale(.45); } 36% { transform: scale(.6); } }
@keyframes ring { 0% { transform: scale(.5); opacity: 0; } 18% { opacity: 1; } 70%, 100% { transform: scale(2.2); opacity: 0; } }

.badge { position: absolute; z-index: 7; left: -34px; top: -24px; width: 96px; height: 96px; pointer-events: none; }
.badge span {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center;
  font-size: 50px; font-weight: 800; line-height: 1;
  transform: scale(.2) rotate(-25deg); opacity: 0;
  transition: transform 520ms var(--ease-pop), opacity 300ms var(--ease);
}
.badge-ok { background: var(--st-mint); color: #0B6B3A; box-shadow: 0 0 0 4px #0E0E14; }
.badge-no { background: #FFD9DA; color: var(--st-no); box-shadow: 0 0 0 4px #0E0E14; }
.badge[data-badge="ok"] .badge-ok, .badge[data-badge="no"] .badge-no { transform: none; opacity: 1; }

/* ---------- Narrador ---------- */
.narrator {
  position: absolute; z-index: 8; left: var(--narr-x, 5vw); bottom: var(--narr-y, 40px);
  width: var(--narr, 104px); height: var(--narr, 104px); border-radius: 50%;
  background: var(--st-violet); overflow: hidden; box-shadow: 0 0 0 4px var(--st-bg), 0 0 0 6px rgba(255,255,255,.12);
  transition: transform 600ms var(--ease-pop), opacity 400ms var(--ease);
}
.narrator img { width: 100%; height: 100%; object-fit: cover; transform: translateY(6%) scale(1.05); }
.stage.is-talking .narrator img { animation: talk .9s ease-in-out 2; }
@keyframes talk { 30% { transform: translateY(3%) scale(1.05) rotate(-3deg); } 65% { transform: translateY(6%) scale(1.05) rotate(2deg); } }
.stage[data-scene="panel"] .narrator, .stage.no-narrator .narrator { opacity: 0; transform: translateY(30px) scale(.7); }

/* ---------- Globo de texto ---------- */
.caption-slot { position: absolute; z-index: 9; left: var(--cap-x, 5vw); bottom: var(--cap-y, 170px); width: var(--cap-w, 380px); }
.caption {
  position: absolute; left: 0; bottom: 0; width: 100%;
  padding: 16px 20px; background: var(--st-caption); color: var(--st-ink);
  border: 2.5px solid var(--st-ink); box-shadow: 5px 5px 0 var(--st-ink);
  font-size: var(--cap-size, 21px); line-height: 1.32; font-weight: 600; font-style: italic; letter-spacing: -.01em;
  opacity: 0; transform: translateY(14px) rotate(-.6deg);
  transition: opacity 420ms var(--ease), transform 520ms var(--ease);
}
.caption b { font-weight: 800; }
.caption.is-in { opacity: 1; transform: rotate(-.6deg); }
.caption.is-out { opacity: 0; transform: translateY(-10px) rotate(-.6deg); transition-duration: 280ms; }
.caption .w { display: inline-block; opacity: 0; transform: translateY(6px); transition: opacity 360ms var(--ease), transform 360ms var(--ease); transition-delay: calc(var(--i) * 28ms + 120ms); }
.caption.is-in .w { opacity: 1; transform: none; }

/* ---------- Tarjeta de concepto ---------- */
.card-slot { position: absolute; z-index: 12; inset: 0; pointer-events: none; }
.card {
  position: absolute; right: var(--cx, 5vw); top: 50%; width: var(--cw, 440px); max-height: calc(100dvh - var(--top) - 48px); overflow: auto;
  pointer-events: auto;
  background: var(--st-paper); color: var(--st-ink); border-left: 6px solid var(--kind, var(--st-violet));
  padding: 26px 28px 22px; font-size: 15.5px; line-height: 1.55;
  opacity: 0; transform: translate(36px, -50%);
  transition: opacity 460ms var(--ease), transform 620ms var(--ease);
  cursor: auto; user-select: text; -webkit-user-select: text;
  scrollbar-width: thin;
}
.card.is-in { opacity: 1; transform: translate(0, -50%); }
.stage.card-left .narrator { opacity: 0; transform: translateY(30px) scale(.7); }
.card.is-out { opacity: 0; transform: translate(-20px, -50%); transition-duration: 300ms; }
/* El lado lo fija la tarjeta al entrar (story.js), así no salta al salir. */
.card.is-left { right: auto; left: var(--cx, 5vw); transform: translate(-36px, -50%); }
.card.is-left.is-in { transform: translate(0, -50%); }
.card.is-left.is-out { transform: translate(20px, -50%); }
.card[data-kind="estudio"] { --kind: var(--st-violet); }
.card[data-kind="psico"] { --kind: var(--st-pink); }
.card[data-kind="mide"] { --kind: var(--st-blue); }
.card[data-kind="dato"] { --kind: var(--st-ok); }
.card[data-kind="ojo"] { --kind: var(--st-amber); }
.card-eyebrow { margin: 0 0 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--kind); }
.card-title { margin: 0 0 12px; font-family: var(--font-cond); font-weight: 400; font-size: 34px; line-height: 1.02; text-transform: uppercase; letter-spacing: .005em; }
.card p { margin: 0 0 12px; }
.card sup { font-size: .65em; color: var(--kind); font-weight: 700; }
.card-list { margin: 0 0 12px; padding-left: 18px; }
.card-list li { margin-bottom: 6px; }
.card-more { font-weight: 600; }
.card-more a { text-decoration: none; border-bottom: 2px solid var(--kind); }
.card-notes { margin: 14px 0 0; padding: 12px 0 0 16px; border-top: 1px solid #E6E6EC; font-size: 12px; line-height: 1.45; color: #6A6A7E; font-style: italic; }
.card-notes a { color: inherit; }
.card-chart { margin: 4px 0 16px; padding: 14px; background: #F4F4F7; display: grid; gap: 10px; }
.card-chart .win, .card-chart .bar { display: grid; grid-template-columns: 110px 1fr 70px; gap: 10px; align-items: center; font-size: 12.5px; }
.card-chart i { height: 14px; width: 0; background: var(--kind); transition: width 900ms var(--ease) 350ms; }
.card.is-in .card-chart i { width: var(--w); }
.card-chart b { font-family: var(--font-mono); font-size: 12px; text-align: right; }
.card-chart .bar.is-real i { background: var(--st-ink); }

/* ---------- Elenco ---------- */
.cast { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
.actor {
  position: absolute; margin: 0; bottom: var(--act-y, 36px); width: var(--act-w, 170px);
  left: calc(var(--cast-x, 70%) + var(--n) * (var(--act-w, 170px) + var(--act-gap, 8px)));
  opacity: 0; transform: translateY(60px) scale(.9);
  transition: opacity 420ms var(--ease), transform 640ms var(--ease-pop);
}
.actor[data-actor="meta"] { --n: 0; }
.actor[data-actor="google"] { --n: 1; }
.actor[data-actor="email"] { --n: 2; }
.actor.is-on { opacity: 1; transform: none; }
.actor img { display: block; width: 100%; height: auto; }
.actor-mail {
  width: 82%; aspect-ratio: 1; margin: 20% auto 0; border-radius: 28px; background: var(--st-amber); color: #fff;
  display: grid; place-items: center; align-content: center; font-size: calc(var(--act-w, 170px) * .36); line-height: 1;
  box-shadow: 0 0 0 4px var(--st-ink);
}
.actor-mail span { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }
.say {
  position: absolute; left: 50%; bottom: calc(100% + 10px); width: max-content; max-width: calc(var(--act-w, 170px) + var(--act-gap, 8px));
  margin: 0; padding: 10px 12px; background: #fff; color: var(--st-ink); border: 2.5px solid var(--st-ink); border-radius: 14px;
  font-size: var(--say-size, 14px); font-weight: 700; line-height: 1.25; text-align: center;
  transform: translateX(-50%) scale(.6); transform-origin: 50% 100%; opacity: 0;
  transition: transform 420ms var(--ease-pop), opacity 260ms var(--ease);
}
.say::after { content: ""; position: absolute; left: 50%; top: 100%; width: 12px; height: 12px; background: #fff; border: solid var(--st-ink); border-width: 0 2.5px 2.5px 0; transform: translate(-50%, -6px) rotate(45deg); }
.say.is-on { opacity: 1; transform: translateX(-50%) scale(1); }
.say.is-quiet { opacity: .45; transform: translateX(-50%) scale(.92); }

/* ---------- Paneles a pantalla completa ---------- */
.panel-slot { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.panel {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px;
  opacity: 0; transform: translateY(24px); transition: opacity 520ms var(--ease), transform 700ms var(--ease);
}
.panel.is-in { opacity: 1; transform: none; pointer-events: auto; }
.panel.is-out { opacity: 0; transform: translateY(-16px); transition-duration: 320ms; }
.beat-panel { position: relative; max-width: 760px; width: 100%; text-align: center; }
.cover-eyebrow { margin: 0 0 16px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--st-violet-soft); }
.cover-title { margin: 0 0 20px; font-family: var(--font-cond); font-weight: 400; text-transform: uppercase; font-size: clamp(56px, 10vw, 128px); line-height: .95; letter-spacing: .005em; }
.cover-title span, .panel-title span { color: var(--st-caption); }
.cover-sub { margin: 0 auto 28px; max-width: 560px; font-size: 18px; line-height: 1.5; color: #D4D2E2; }
.cover-start {
  display: inline-flex; gap: 10px; align-items: center; padding: 15px 26px; border: 0; border-radius: 999px;
  background: var(--st-caption); color: var(--st-ink); font-weight: 800; font-size: 16px; cursor: pointer;
  box-shadow: 4px 4px 0 var(--st-violet); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cover-start:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--st-violet); }
.cover-hint { margin: 16px 0 0; font-size: 13px; color: var(--st-muted); }
.hint-touch { display: none; }
@media (hover: none) { .hint-touch { display: inline; } .hint-keys { display: none; } }
.cover-cast { position: absolute; z-index: -1; width: 210px; height: auto; bottom: -40px; opacity: .95; }
.cover-meta { left: -230px; transform: rotate(-6deg); }
.cover-google { right: -230px; transform: rotate(6deg); }
.panel.is-in .cover-cast { animation: peek 900ms var(--ease-pop) both .25s; }
@keyframes peek { from { opacity: 0; translate: 0 60px; } }

.panel-title { margin: 0 0 28px; font-family: var(--font-cond); font-weight: 400; text-transform: uppercase; font-size: clamp(36px, 5.5vw, 64px); line-height: 1; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; text-align: left; }
.todo li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 18px 22px; background: var(--st-paper); color: var(--st-ink); font-size: 15.5px; line-height: 1.5; }
.todo li span { font-family: var(--font-cond); font-size: 34px; line-height: 1; color: var(--st-violet); }
.panel.is-in .todo li { animation: rise .55s var(--ease) both; }
.panel.is-in .todo li:nth-child(2) { animation-delay: .12s; }
.panel.is-in .todo li:nth-child(3) { animation-delay: .24s; }

.end-check { width: 84px; height: 84px; margin: 0 auto 18px; border-radius: 50%; background: var(--st-mint); color: #0B6B3A; display: grid; place-items: center; }
.panel.is-in .end-check { animation: pop .7s var(--ease-pop) both; }
@keyframes pop { from { transform: scale(.3) rotate(-30deg); opacity: 0; } }
.end-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 20px; }
.end-cta { padding: 14px 22px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.3); text-decoration: none; font-weight: 700; font-size: 15px; transition: background .2s, color .2s; }
.end-cta:hover { background: rgba(255,255,255,.08); }
.end-cta.is-primary { background: var(--st-caption); color: var(--st-ink); border-color: var(--st-caption); }
.end-cta.is-primary:hover { background: #fff; }
.end-tools { display: flex; justify-content: center; gap: 18px; }
.end-tool { background: none; border: 0; color: var(--st-muted); font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.end-tool:hover { color: var(--st-text); }

/* ---------- Controles ---------- */
.controls { position: fixed; z-index: 20; right: 20px; bottom: 22px; }
.controls { display: none; }
html.js .controls { display: flex; gap: 8px; }
.ctl {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
  background: rgba(20,20,31,.7); backdrop-filter: blur(6px); display: grid; place-items: center; cursor: pointer;
  transition: background .2s, opacity .2s, transform .15s;
}
.ctl:hover { background: rgba(255,255,255,.12); }
.ctl:active { transform: scale(.94); }
.ctl:disabled { opacity: .3; cursor: default; }
.ctl-next { background: var(--st-caption); color: var(--st-ink); border-color: var(--st-caption); }
.ctl-next:hover { background: #fff; }
.progress { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.06); }
.progress i { display: block; height: 100%; width: 0; background: var(--st-violet); transition: width 600ms var(--ease); }

/* ---------- Teléfono angosto ---------- */
@media (max-width: 759px) {
  /* En celular no hay barra superior: la barra de progreso de abajo ya dice
     dónde estás, y la de arriba se comía el contenido. */
  :root { --top: 0px; }
  .story-top { display: none; }
  .mx-table .is-mhide { display: none; }
  .mx-mobile-note { display: block; margin: 10px 0 0; padding: 8px 10px; background: #F4F4F7; border-radius: 8px; font-size: 11.5px; color: #3A3A4E; }
  .mx-table td:first-child { padding-right: 6px; }
  .board, .matrix { border-radius: 20px; padding: 16px; transform: translateY(14px) scale(.98); top: var(--board-top, 10px); transform-origin: center top; }
  .stage[data-scene="board"] .board, .stage[data-scene="matrix"] .matrix { transform: none; }
  .bd-big { font-size: 21px; }
  .mx-table { font-size: 12px; }
  .mx-table th { font-size: 9.5px; }
  .story-top { padding: 0 14px; gap: 10px; }
  .story-title { display: none; }
  .story-brand span { display: none; }
  .story-count { flex: 1; }
  .caption { padding: 12px 14px; box-shadow: 4px 4px 0 var(--st-ink); }
  .card {
    position: absolute; top: auto; bottom: 0; left: 0; right: 0; width: auto;
    max-height: calc(100dvh - var(--top) - 84px); padding: 20px 20px 84px;
    border-left: 0; border-top: 6px solid var(--kind); transform: translateY(40px);
  }
  .card, .card.is-left { left: 0; right: 0; width: auto; transform: translateY(40px); }
  .card.is-in, .card.is-left.is-in { transform: none; }
  .card.is-out, .card.is-left.is-out { transform: translateY(20px); }
  .card-title { font-size: 28px; }
  .card-chart .win, .card-chart .bar { grid-template-columns: 92px 1fr 62px; }
  .controls { right: 12px; bottom: 14px; }
  .ctl { width: 44px; height: 44px; }
  .say::after { display: none; }
  .say.is-quiet { opacity: 0; }
  .cover-cast { width: 120px; bottom: -150px; }
  .cover-meta { left: 4px; }
  .cover-google { right: 4px; }
  .todo li { grid-template-columns: 40px 1fr; padding: 14px 16px; font-size: 14.5px; gap: 10px; }
  .todo li span { font-size: 26px; }
  .cover-sub { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
}
