/* ==========================================================================
   arcashu · el recorrido
   Estética: limpia, como una pantalla de bienvenida. Mucho blanco, grises
   suaves, tipografía del sistema, títulos grandes y centrados, tarjetas sin
   bordes. Un acento ámbar propio ("nuez") y verde solo para lo correcto.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --paper: #ffffff;
  --band: #f5f5f7;
  --card: #f5f5f7;
  --chalk: #ededf0;
  --ink: #1d1d1f;
  --body: #424245;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --hair: #e8e8ed;
  --hair-strong: #d2d2d7;
  --nut: #a8620b;
  --nut-fill: #e0942e;
  --nut-soft: #fdf3e5;
  --ok: #1a7f45;
  --ok-fill: #30b863;
  --ok-soft: #e8f7ee;
  --bad: #c4291c;
  --bad-soft: #fdeceb;
  --focus: #e0942e;
  --shadow: 0 2px 8px rgba(0, 0, 0, .04), 0 16px 48px rgba(0, 0, 0, .07);
  --nav-bg: rgba(255, 255, 255, .74);
  --hola: linear-gradient(100deg, #f5b84f 0%, #f08a3c 38%, #e8566e 72%, #b65bd6 100%);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Geist Mono", Menlo, Consolas, monospace;

  --page-x: clamp(20px, 6vw, 96px);
  --page-max: 1080px;
  --section: clamp(96px, 13vw, 200px);
  --nav-h: 52px;
  --r: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #000000;
    --band: #0f0f10;
    --card: #1c1c1e;
    --chalk: #2c2c2e;
    --ink: #f5f5f7;
    --body: #d2d2d7;
    --muted: #98989d;
    --faint: #6e6e73;
    --hair: #2c2c2e;
    --hair-strong: #3a3a3c;
    --nut: #f5b04f;
    --nut-fill: #f0a54a;
    --nut-soft: #2a1d0c;
    --ok: #4ade80;
    --ok-fill: #30d158;
    --ok-soft: #0f2a1a;
    --bad: #ff6961;
    --bad-soft: #331513;
    --focus: #f0a54a;
    --shadow: 0 2px 8px rgba(0, 0, 0, .5), 0 16px 48px rgba(0, 0, 0, .5);
    --nav-bg: rgba(22, 22, 23, .72);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #000000;
  --band: #0f0f10;
  --card: #1c1c1e;
  --chalk: #2c2c2e;
  --ink: #f5f5f7;
  --body: #d2d2d7;
  --muted: #98989d;
  --faint: #6e6e73;
  --hair: #2c2c2e;
  --hair-strong: #3a3a3c;
  --nut: #f5b04f;
  --nut-fill: #f0a54a;
  --nut-soft: #2a1d0c;
  --ok: #4ade80;
  --ok-fill: #30d158;
  --ok-soft: #0f2a1a;
  --bad: #ff6961;
  --bad-soft: #331513;
  --focus: #f0a54a;
  --shadow: 0 2px 8px rgba(0, 0, 0, .5), 0 16px 48px rgba(0, 0, 0, .5);
  --nav-bg: rgba(22, 22, 23, .72);
  color-scheme: dark;
}

/* Las franjas grises llevan tarjetas blancas (y en oscuro, un gris un poco más claro). */
.band { --card: var(--paper); }
:root[data-theme="dark"] .band { --card: #1c1c1e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .band { --card: #1c1c1e; } }

/* Paneles siempre oscuros: el capítulo de la firma ciega, como un escenario. */
.panel {
  --paper: #000;
  --band: #0a0a0b;
  --card: #1c1c1e;
  --chalk: #2c2c2e;
  --ink: #f5f5f7;
  --body: #d2d2d7;
  --muted: #98989d;
  --faint: #6e6e73;
  --hair: #2c2c2e;
  --hair-strong: #3a3a3c;
  --nut: #f5b04f;
  --nut-fill: #f0a54a;
  --nut-soft: #2a1d0c;
  --ok: #4ade80;
  --ok-fill: #30d158;
  --ok-soft: #0f2a1a;
  --bad: #ff6961;
  --bad-soft: #331513;
  --focus: #f0a54a;
  --shadow: none;
  background: #000;
  color: var(--body);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: -.011em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--font-display); line-height: 1.08; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.025em; }
h1 { font-size: clamp(2.8rem, 8vw, 5.4rem); letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(2.3rem, 5.6vw, 4rem); letter-spacing: -.032em; }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); letter-spacing: -.02em; line-height: 1.2; font-weight: 650; }
h4 { font-size: 1.06rem; letter-spacing: -.012em; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: var(--hair-strong); transition: color .2s, text-decoration-color .2s; }
a:hover { text-decoration-color: var(--nut-fill); }
code, kbd, .mono { font-family: var(--font-mono); font-size: .86em; }
code { background: var(--chalk); padding: .12em .4em; border-radius: 6px; color: var(--ink); word-break: break-word; }
strong { color: var(--ink); font-weight: 600; }
small { font-size: .85em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; z-index: 100; transition: top .15s; }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--page-max) + var(--page-x) * 2); margin-inline: auto; padding-inline: var(--page-x); }
.eyebrow { font-size: clamp(.95rem, 1.6vw, 1.12rem); font-weight: 600; letter-spacing: -.01em; color: var(--muted); margin: 0 0 .8rem; }
.eyebrow b { color: var(--nut); font-weight: 600; }
.lead { font-size: clamp(1.15rem, 2.1vw, 1.4rem); line-height: 1.5; max-width: 40ch; color: var(--muted); letter-spacing: -.016em; }
.note { font-size: .92rem; color: var(--muted); }
.fine { font-size: .8rem; color: var(--muted); font-family: var(--font-mono); line-height: 1.5; }
.nowrap { white-space: nowrap; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.6em;
  background: var(--ink); color: var(--paper);
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; letter-spacing: -.01em; text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background .2s, color .2s, opacity .2s, box-shadow .25s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hair-strong); }
.btn-ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn-sm { min-height: 38px; padding: .4em 1.1em; font-size: .9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 1.4rem; }

/* Control segmentado */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--chalk); }
.seg button {
  min-height: 36px; padding: .3em 1.05em; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; transition: background .25s, color .25s, box-shadow .25s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50; color: var(--ink);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--hair) 70%, transparent);
}
.nav-in { height: 100%; display: flex; align-items: center; gap: 12px; padding-inline: clamp(14px, 3vw, 28px); max-width: 1440px; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; }
.brand svg { width: 24px; height: 24px; }
.chapnav { display: none; flex: 1; justify-content: center; }
.chapnav ol { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; }
.chapnav li { margin: 0; }
.chapnav a {
  display: block; padding: 6px 10px; border-radius: 999px; color: var(--muted);
  text-decoration: none; font-size: .8rem; white-space: nowrap; transition: background .2s, color .2s;
}
.chapnav a span { display: none; }
.chapnav a:hover, .chapnav a[aria-current="true"] { color: var(--ink); }
.chapnav a[aria-current="true"] { background: var(--chalk); }
.nav-tools { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--ink); border: 0; border-radius: 999px; cursor: pointer; font: inherit;
  transition: background .2s;
}
.icon-btn:hover, .icon-btn[aria-pressed="true"] { background: var(--chalk); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { width: auto; padding-inline: 12px; font-size: .85rem; font-weight: 500; gap: 6px; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.progress i { display: block; height: 100%; width: 0; background: var(--hola); transition: width .1s linear; }

@media (max-width: 1239px) {
  .chapnav {
    position: fixed; top: var(--nav-h); left: 0; right: 0; padding: 8px 14px 18px; display: none;
    background: var(--nav-bg); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--hair); max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .chapnav.open { display: block; animation: fadeup .35s var(--ease); }
  .chapnav ol { flex-direction: column; max-width: 560px; margin-inline: auto; }
  .chapnav a { padding: 12px 14px; font-size: 1.05rem; border-radius: 12px; }
  .chapnav a span { display: inline; font-family: var(--font-mono); font-size: .75rem; margin-right: 10px; opacity: .55; }
}
@media (min-width: 1240px) {
  .chapnav { display: flex; }
  .menu-btn { display: none; }
}

/* ---------- Portada: la bienvenida ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--nav-h) + 24px) 0 48px;
  position: relative; overflow: hidden;
  display: grid; align-items: center; text-align: center;
}
.hero-grid { position: relative; z-index: 1; display: grid; justify-items: center; }
.hero-text { display: grid; justify-items: center; max-width: 760px; }
.hola { width: min(860px, 92vw); height: auto; margin: 0 auto clamp(4px, 1.5vw, 16px); overflow: visible; }
.hola text {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.035em;
  fill: url(#hola-degradado); fill-opacity: 1;
  stroke: url(#hola-degradado); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round;
  paint-order: stroke;
}
.hola.dibujando text { fill-opacity: 0; stroke-dasharray: 900; stroke-dashoffset: 900; }
.hero .eyebrow { margin-bottom: .4rem; }
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); margin-bottom: .1em; }
.hero h1 em { font-style: normal; background: var(--hola); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin: 1.1rem auto 0; text-align: center; }
.hero .btn-row { justify-content: center; margin-top: 2rem; }
.hero .note { max-width: 46ch; margin-inline: auto; }
.hero-art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.coin {
  --s: 96px;
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ffe2a8 0%, #f6be63 22%, #e0942e 58%, #a3610f 100%);
  color: #3b2204;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: calc(var(--s) * .3); letter-spacing: -.03em;
  box-shadow: inset 0 0 0 calc(var(--s) * .045) rgba(255, 255, 255, .28), inset 0 calc(var(--s) * -.06) calc(var(--s) * .12) rgba(120, 60, 0, .25), 0 calc(var(--s) * .12) calc(var(--s) * .35) rgba(160, 90, 10, .22);
}
.coin::before { content: ""; position: absolute; inset: 11%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); }
.coin::after { content: none; }
.hero-art .coin { animation: bob 7s ease-in-out infinite; opacity: .95; }
.hero-art .c1 { --s: 132px; left: 6%; top: 18%; animation-delay: 0s; }
.hero-art .c2 { --s: 84px; right: 9%; top: 15%; animation-delay: -2s; }
.hero-art .c3 { --s: 112px; right: 6%; bottom: 14%; animation-delay: -4s; }
.hero-art .c4 { --s: 58px; left: 12%; bottom: 16%; animation-delay: -1s; }
@media (max-width: 760px) {
  .hero-art .c1 { --s: 76px; left: -14px; top: 13%; }
  .hero-art .c2 { --s: 54px; right: 4%; top: 11%; }
  .hero-art .c3 { --s: 70px; right: -12px; bottom: 7%; }
  .hero-art .c4 { --s: 42px; left: 6%; bottom: 9%; }
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }
.scrollcue { margin-top: 2.6rem; font-size: .8rem; font-weight: 500; color: var(--faint); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scrollcue::after { content: ""; width: 1px; height: 30px; background: var(--hair-strong); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Capítulos ---------- */
.chapter { padding-block: var(--section); position: relative; }
.chapter.band { background: var(--band); }
.ch-head { margin: 0 auto clamp(44px, 6vw, 80px); text-align: center; max-width: 820px; }
.ch-head .lead { margin-inline: auto; }
.ch-num { font-family: var(--font-mono); color: var(--nut); }
.grid { display: grid; gap: 20px; }
@media (min-width: 720px) {
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
}
.card { background: var(--card); border: 0; border-radius: var(--r); padding: clamp(22px, 3.2vw, 34px); }
.card h3, .card h4 { margin-bottom: .45em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .01em; padding: .25em .7em; border-radius: 999px; background: var(--chalk); color: var(--muted); }
.tag.nut { color: var(--nut); background: var(--nut-soft); }
.tag.ok { color: var(--ok); background: var(--ok-soft); }
.callout { background: var(--nut-soft); padding: 18px 22px; border-radius: var(--r); margin-block: 1.8rem; color: var(--body); }
.callout p:last-child { margin-bottom: 0; }
.callout.plain { background: var(--card); }
.demo-label { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 16px; }
.demo-label .fine { margin: 0; }
.stage { border-radius: calc(var(--r) + 6px); background: var(--card); padding: clamp(18px, 3.4vw, 36px); }
.panel .stage { background: #111113; }
.h-sub { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 .7rem; }

/* Reveal: aparece subiendo, con un desenfoque que se aclara (como al encender un iPhone). */
.js .reveal { opacity: 0; transform: translateY(28px) scale(.985); filter: blur(6px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Cap. 1: quién se entera ---------- */
.who { display: grid; gap: 20px; }
@media (min-width: 880px) { .who { grid-template-columns: 1fr 1.1fr; align-items: start; } }
.scene { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 20px 8px; }
.scene .actor { text-align: center; font-size: .82rem; color: var(--muted); font-family: var(--font-mono); }
.scene .actor svg { width: 56px; height: 56px; margin: 0 auto 6px; color: var(--ink); }
.scene .pipe { flex: 1; height: 2px; background: var(--hair-strong); position: relative; min-width: 24px; }
.scene .pipe i { position: absolute; top: -6px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); animation: travel 2.4s ease-in-out infinite; }
.scene .mid { display: none; text-align: center; font-size: .78rem; font-family: var(--font-mono); color: var(--nut); }
.scene.app .mid { display: block; }
.scene.app .pipe i { background: var(--nut-fill); }
@keyframes travel { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 14px); opacity: 0; } }
.watchers { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.watchers li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 16px; background: var(--card); margin: 0; animation: slidein .5s cubic-bezier(.25, 1, .5, 1) both; }
.watchers li:nth-child(2) { animation-delay: .08s; }
.watchers li:nth-child(3) { animation-delay: .16s; }
.watchers li:nth-child(4) { animation-delay: .24s; }
.watchers li:nth-child(5) { animation-delay: .32s; }
@keyframes slidein { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.watchers .dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: .55em; background: var(--ok-fill); }
.watchers .dot.eye { background: var(--nut-fill); }
.watchers b { display: block; color: var(--ink); font-weight: 600; font-size: .95rem; }
.watchers span { font-size: .9rem; color: var(--muted); }
.lose { margin-top: 28px; }

/* ---------- Cap. 2: Bitcoin y Lightning ---------- */
.slides { margin-top: 18px; }
.slide { display: grid; gap: 24px; align-items: center; animation: fadeup .5s cubic-bezier(.25, 1, .5, 1); }
.slide[hidden] { display: none; }
@media (min-width: 800px) { .slide { grid-template-columns: 1fr 1fr; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.slide-art { background: var(--chalk); border-radius: var(--r); padding: 18px; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.slide-art svg { width: 100%; max-width: 360px; height: auto; color: var(--ink); }
.net-node { fill: var(--ink); animation: pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.net-node:nth-of-type(2n) { animation-delay: -.8s; }
.net-node:nth-of-type(3n) { animation-delay: -1.6s; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
.chain-blocks { animation: chainmove 6s linear infinite; }
@keyframes chainmove { from { transform: translateX(0); } to { transform: translateX(-120px); } }
.bolt-dot { animation: boltmove 1.6s ease-in-out infinite; }
@keyframes boltmove { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(210px); opacity: 0; } }
.satslider { width: 100%; accent-color: var(--nut-fill); margin: 8px 0; min-height: 32px; }
.satout { font-family: var(--font-mono); font-size: 1rem; color: var(--ink); background: var(--card); border: 1px solid var(--hair); border-radius: 10px; padding: 10px 12px; word-break: break-word; }
.stat-row { display: flex; flex-wrap: wrap; gap: 14px 30px; margin-top: 1.2rem; }
.stat b { display: block; font-size: 1.6rem; color: var(--ink); letter-spacing: -.03em; }
.stat span { font-size: .85rem; color: var(--muted); }
.tabs-bar { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- Cap. 3: Mint ---------- */
.mint-demo { display: grid; gap: 14px; }
@media (min-width: 880px) { .mint-demo { grid-template-columns: 1fr 1.1fr 1fr; } }
.box { border: 1px solid var(--hair); border-radius: var(--r); padding: 16px; background: var(--paper); min-height: 150px; position: relative; }
.box h4 { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.big { font-size: 1.7rem; font-weight: 600; color: var(--ink); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big small { font-size: .9rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.coins { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 64px; margin-top: 10px; }
.coins .coin { position: relative; animation: drop .6s cubic-bezier(.3, 1.5, .5, 1) both; box-shadow: none; }
.coins .coin.sm { --s: 38px; font-size: .72rem; }
@keyframes drop { from { opacity: 0; transform: translateY(-44px) scale(.7); } to { opacity: 1; transform: none; } }
.ledger { list-style: none; padding: 0; margin: 10px 0 0; font-size: .88rem; }
.ledger li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--hair); margin: 0; }
.ledger b { font-family: var(--font-mono); font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.mint-house { width: 52px; height: 52px; color: var(--ink); margin-bottom: 6px; }
.invoice { display: none; gap: 12px; align-items: center; }
.invoice.on { display: flex; animation: fadeup .4s both; }
.fakeqr { width: 76px; height: 76px; flex: none; display: grid; grid-template-columns: repeat(9, 1fr); gap: 1px; padding: 4px; background: #fff; border-radius: 6px; }
.fakeqr i { background: #fff; }
.fakeqr i.k { background: #18181b; }
.invoice .iv-text { font-size: .85rem; line-height: 1.4; }
.paid-flash { display: none; color: var(--ok); font-family: var(--font-mono); font-size: .85rem; margin-top: 8px; }
.paid-flash.on { display: block; animation: fadeup .4s both; }
.bolt { width: 18px; height: 18px; display: inline-block; vertical-align: -3px; color: var(--nut); }
.controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 18px; }
.controls label { font-size: .9rem; color: var(--muted); }
.chip { min-height: 38px; padding: .3em .9em; border-radius: 999px; background: transparent; border: 1px solid var(--hair-strong); color: var(--ink); font: inherit; font-family: var(--font-mono); font-size: .85rem; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
input[type="number"], input[type="text"], input[type="search"] {
  min-height: 42px; padding: .4em .8em; border-radius: 10px; border: 1px solid var(--hair-strong);
  background: var(--paper); color: var(--ink); font: inherit; font-size: 1rem; width: 100%;
}
input[type="number"] { width: 110px; font-family: var(--font-mono); }
.log { list-style: none; padding: 0; margin: 16px 0 0; font-size: .9rem; display: grid; gap: 6px; }
.log li { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--chalk); animation: fadeup .35s both; }
.log li code { font-size: .78em; }

/* ---------- Cap. 4: firma ciega ---------- */
.carbon { display: grid; gap: 22px; }
@media (min-width: 900px) { .carbon { grid-template-columns: 1.35fr 1fr; align-items: center; } }
.carbon-svg { width: 100%; height: auto; background: #0a0a0c; border: 1px solid #26262b; border-radius: var(--r); }
.carbon-svg text { font-family: var(--font-mono); }
.cs-label { fill: #a1a1aa; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.cs-small { fill: #d4d4d8; font-size: 14px; }
.cs-paper { fill: #f4f4f5; }
.cs-ink { fill: #18181b; }
.cs-env-back { fill: #b5701a; }
.cs-env-front { fill: #d68a22; }
.cs-flap { fill: #e79b2f; stroke: #8a520d; stroke-width: 1.5; }
.cs-carbon { fill: #111; }
.cs-sig { fill: none; stroke: #4ade80; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 260; stroke-dashoffset: 260; transition: stroke-dashoffset 1s ease .1s, opacity .4s; }
.cs-sigcopy { fill: none; stroke: #4ade80; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .6s .4s; }
#cs-paper, #cs-env, #cs-envf, #cs-flap, #cs-stamp, #cs-q, #cs-check, #cs-shelf { transition: transform .9s cubic-bezier(.65, 0, .35, 1), opacity .6s; }
#cs-paper { transform: translate(0, 0); }
#cs-env, #cs-envf { opacity: 0; transform: translate(0, 0); }
#cs-flap { transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); }
#cs-stamp { opacity: 0; transform: translate(0, -30px); }
#cs-q, #cs-check { opacity: 0; }
#cs-shelf { opacity: .35; }
.carbon-svg[data-step="2"] #cs-env, .carbon-svg[data-step="2"] #cs-envf { opacity: 1; }
.carbon-svg[data-step="2"] #cs-paper { transform: translate(0, 100px); }
.carbon-svg[data-step="2"] #cs-flap { transform: scaleY(1); }
.carbon-svg[data-step="3"] #cs-env, .carbon-svg[data-step="3"] #cs-envf { opacity: 1; transform: translate(220px, 0); }
.carbon-svg[data-step="3"] #cs-paper { transform: translate(220px, 100px); }
.carbon-svg[data-step="3"] #cs-flap { transform: scaleY(1); }
.carbon-svg[data-step="3"] #cs-stamp { opacity: 1; transform: translate(0, 0); }
.carbon-svg[data-step="3"] .cs-sig.env-sig, .carbon-svg[data-step="4"] .cs-sig.env-sig, .carbon-svg[data-step="5"] .cs-sig.env-sig { stroke-dashoffset: 0; }
.carbon-svg[data-step="4"] #cs-env, .carbon-svg[data-step="4"] #cs-envf { opacity: 1; }
.carbon-svg[data-step="4"] #cs-paper { transform: translate(0, -4px); }
.carbon-svg[data-step="4"] .cs-sigcopy, .carbon-svg[data-step="5"] .cs-sigcopy { opacity: 1; }
.carbon-svg[data-step="5"] #cs-env, .carbon-svg[data-step="5"] #cs-envf { opacity: .35; }
.carbon-svg[data-step="5"] #cs-paper { transform: translate(220px, 70px); }
.carbon-svg[data-step="5"] #cs-q, .carbon-svg[data-step="5"] #cs-check, .carbon-svg[data-step="5"] #cs-shelf { opacity: 1; }
.carbon-svg[data-step="5"] #cs-q text { animation: wobble 1.4s ease-in-out infinite; }
@keyframes wobble { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.step-card { color: var(--body); }
.step-card .stepn { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--nut); }
.step-card h3 { margin-top: .3rem; }
.step-card .tech { margin-top: 14px; padding: 10px 12px; border: 1px dashed var(--hair-strong); border-radius: 10px; font-size: .82rem; font-family: var(--font-mono); color: var(--muted); line-height: 1.5; }
.dots { display: flex; gap: 8px; margin: 14px 0 6px; }
.dots button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--hair-strong); background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; cursor: pointer; }
.dots button[aria-current="step"] { background: var(--nut-fill); border-color: var(--nut-fill); color: #000; }
.dots button.done { border-color: var(--nut-fill); color: var(--nut); }

details.math { margin-top: 28px; border-radius: var(--r); padding: 4px 22px; background: var(--card); }
details.math summary { cursor: pointer; padding: 14px 0; color: var(--ink); font-weight: 500; }
details.math pre { margin: 0 0 14px; padding: 14px; overflow-x: auto; background: var(--chalk); border-radius: 10px; font-family: var(--font-mono); font-size: .82rem; line-height: 1.7; color: var(--ink); }
.math-grid { display: grid; gap: 8px 16px; font-size: .92rem; margin-bottom: 14px; }
@media (min-width: 720px) { .math-grid { grid-template-columns: auto 1fr; } }
.math-grid dt { font-family: var(--font-mono); color: var(--nut); }
.math-grid dd { margin: 0; }

/* Juego: sé el mint */
.game { margin-top: clamp(40px, 6vw, 72px); }
.game-grid { display: grid; gap: 14px; margin-block: 16px; }
@media (min-width: 800px) { .game-grid { grid-template-columns: 1fr 1fr; } }
.g-card { border: 1px solid var(--hair); border-radius: var(--r); padding: 16px; background: var(--paper); }
.g-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.g-card li { font-size: .9rem; margin: 0; }
.g-card li b { color: var(--ink); }
.g-card code { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.blur { filter: blur(3px); user-select: none; }
.pick { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pick .btn { min-width: 110px; }
.g-result { min-height: 3.2em; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--chalk); display: none; }
.g-result.on { display: block; animation: fadeup .4s both; }
.g-result.right { background: var(--ok-soft); color: var(--ink); }
.g-result.wrong { background: var(--bad-soft); color: var(--ink); }
.score { font-family: var(--font-mono); font-size: .85rem; color: var(--muted); }

/* Flujo mint / swap / melt */
.seq-wrap { margin-top: clamp(40px, 6vw, 72px); }
.seq { margin-top: 18px; position: relative; }
.seq-head { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; position: sticky; top: var(--nav-h); z-index: 2; background: var(--paper); padding: 8px 0; border-bottom: 1px solid var(--hair); }
.panel .seq-head { background: #000; }
.seq-head div { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }
.seq-head small { display: block; color: var(--muted); text-transform: none; letter-spacing: 0; font-size: .72rem; }
.seq-body { list-style: none; margin: 0; padding: 0; position: relative; background-image: linear-gradient(var(--hair-strong), var(--hair-strong)), linear-gradient(var(--hair-strong), var(--hair-strong)), linear-gradient(var(--hair-strong), var(--hair-strong)); background-size: 1px 100%; background-repeat: no-repeat; background-position: 16.666% 0, 50% 0, 83.333% 0; }
.msg { position: relative; padding: 18px 0 14px; margin: 0; opacity: .32; transition: opacity .4s; cursor: pointer; }
.msg.on { opacity: 1; }
.msg.past { opacity: .75; }
.msg .arrow { position: relative; height: 22px; margin-inline: calc(100% / 6); }
.msg .arrow .ln { position: absolute; top: 10px; height: 2px; background: var(--ink); left: calc(var(--a) * 1%); width: calc((var(--b) - var(--a)) * 1%); }
.msg .arrow .ln::after { content: ""; position: absolute; top: -4px; right: -1px; border: 5px solid transparent; border-left: 8px solid var(--ink); border-right: 0; }
.msg.rtl .arrow .ln::after { right: auto; left: -1px; border-left: 0; border-right: 8px solid var(--ink); }
.msg .arrow .pkt { position: absolute; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--nut-fill); opacity: 0; left: calc(var(--a) * 1%); }
.msg.on.play .pkt { animation: pktgo 1.1s cubic-bezier(.65, 0, .35, 1) forwards; }
.msg.rtl.on.play .pkt { animation-name: pktback; }
@keyframes pktgo { 0% { opacity: 1; left: calc(var(--a) * 1%); } 100% { opacity: 1; left: calc(var(--b) * 1% - 16px); } }
@keyframes pktback { 0% { opacity: 1; left: calc(var(--b) * 1% - 16px); } 100% { opacity: 1; left: calc(var(--a) * 1%); } }
.msg .note-self { width: max-content; max-width: 72%; padding: 5px 12px; border: 1px dashed var(--nut); border-radius: 10px; color: var(--nut); font-size: .8rem; font-family: var(--font-mono); text-align: center; position: relative; background: var(--paper); }
.msg .note-self[data-at="0"] { left: 0; }
.msg .note-self[data-at="1"] { left: 50%; transform: translateX(-50%); }
.msg .note-self[data-at="2"] { margin-left: auto; }
.panel .msg .note-self { background: #000; }
.msg .cap { margin-top: 8px; font-size: .92rem; padding-inline: 4px; }
.msg .cap b { color: var(--nut); font-family: var(--font-mono); margin-right: 6px; }
.msg .cap code { font-size: .74rem; }
.seen { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 720px) { .seen { grid-template-columns: 1fr 1fr; } }
.seen .card ul { list-style: none; padding: 0; margin: 0; }
.seen .card li { padding-left: 1.5em; position: relative; font-size: .92rem; }
.seen .card li::before { position: absolute; left: 0; font-family: var(--font-mono); }
.seen .yes li::before { content: "◉"; color: var(--nut); }
.seen .no li::before { content: "○"; color: var(--ok); }

/* ---------- Cap. 5: simulador ---------- */
.sim { display: grid; gap: 16px; }
@media (min-width: 960px) { .sim { grid-template-columns: 1fr 0.8fr 1fr; align-items: stretch; } }
.phone { border: 1px solid var(--hair-strong); box-shadow: var(--shadow); border-radius: 36px; padding: 14px 14px 18px; background: var(--paper); display: flex; flex-direction: column; gap: 10px; min-height: 380px; position: relative; }
.phone::before { content: ""; width: 54px; height: 5px; border-radius: 3px; background: var(--hair-strong); align-self: center; }
.ph-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ph-top b { color: var(--ink); font-size: 1.05rem; }
.ph-bal { font-family: var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.ph-bal.bump { animation: bump .6s; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.25); color: var(--ok); } 100% { transform: scale(1); } }
.ph-form { display: grid; gap: 8px; }
.ph-form label { font-size: .8rem; color: var(--muted); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .06em; }
.ph-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .82rem; }
.ph-log li { margin: 0; padding: 6px 10px; border-radius: 8px; background: var(--chalk); animation: fadeup .3s both; }
.ph-log li.ok { background: var(--ok-soft); color: var(--ink); }
.ph-log li.err { background: var(--bad-soft); color: var(--ink); }
.chatcol { border: 0; border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-height: 140px; background: var(--chalk); }
.chatcol h4 { margin: 0; font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 500; }
.bubble { align-self: flex-start; max-width: 100%; padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: var(--paper); border: 1px solid var(--hair-strong); font-size: .84rem; animation: bubble .9s cubic-bezier(.25, 1, .5, 1) both; }
.bubble .tk { font-family: var(--font-mono); font-size: .76rem; color: var(--ink); word-break: break-all; display: block; margin-top: 4px; }
@keyframes bubble { from { opacity: 0; transform: translateX(-50px) scale(.9); } to { opacity: 1; transform: none; } }
@media (max-width: 959px) { @keyframes bubble { from { opacity: 0; transform: translateY(-30px) scale(.9); } to { opacity: 1; transform: none; } } }
.eve { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; font-size: .92rem; }
.eve input { width: 20px; height: 20px; margin-top: .2em; accent-color: var(--nut-fill); flex: none; }
.tkbox { margin-top: 18px; border-radius: var(--r); padding: 18px; background: var(--card); }
.tkfull { margin-top: 10px; padding: 12px; background: var(--chalk); border-radius: 10px; font-family: var(--font-mono); font-size: .74rem; line-height: 1.5; word-break: break-all; max-height: 130px; overflow: auto; color: var(--ink); }
.decode { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 10px; }
.decode th, .decode td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--hair); vertical-align: top; }
.decode th { font-family: var(--font-mono); color: var(--nut); font-weight: 500; white-space: nowrap; }
.decode td code { word-break: break-all; }
.decode-wrap { overflow-x: auto; }
.warn { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--nut); background: var(--nut-soft); color: var(--ink); padding: 12px 14px; border-radius: var(--r); font-size: .92rem; margin-bottom: 18px; }

/* ---------- Cap. 6: confianza ---------- */
.trust-top { display: grid; gap: 14px; margin-bottom: 28px; }
@media (min-width: 800px) { .trust-top { grid-template-columns: repeat(3, 1fr); } }
.jars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; align-items: end; }
.jar { border: 1px solid var(--hair-strong); border-radius: 12px; padding: 0; background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; height: 190px; position: relative; text-align: center; transition: opacity .4s, filter .4s, border-color .2s; }
.jar:hover { border-color: var(--ink); }
.jar .fill { background: var(--ink); color: var(--paper); width: 100%; transition: height .6s cubic-bezier(.25, 1, .5, 1); display: flex; align-items: flex-start; justify-content: center; padding-top: 6px; font-family: var(--font-mono); font-size: .78rem; min-height: 0; overflow: hidden; }
.jar .nm { padding: 8px 4px; font-family: var(--font-mono); font-size: .75rem; border-top: 1px solid var(--hair-strong); background: var(--paper); }
.jar.dead { opacity: .5; filter: grayscale(1); border-style: dashed; }
.jar.dead .fill { background: var(--bad); }
.jar.dead .nm::after { content: " ✕"; color: var(--bad); }
.jar[hidden] { display: none; }
.trust-out { margin-top: 14px; min-height: 3.2em; padding: 12px 14px; border-radius: 12px; background: var(--chalk); color: var(--ink); }
.practices { counter-reset: p; list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 24px; }
.practices li { counter-increment: p; display: flex; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--card); margin: 0; }
.practices li::before { content: counter(p, decimal-leading-zero); font-family: var(--font-mono); color: var(--nut); flex: none; }
.practices b { color: var(--ink); }

/* ---------- Cap. 7: tabla ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r); background: var(--card); margin-top: 18px; -webkit-overflow-scrolling: touch; }
table.cmp { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 880px; font-size: .9rem; }
.cmp th, .cmp td { padding: 14px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); transition: opacity .3s, background .3s; }
.cmp thead th { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 500; background: var(--card); position: sticky; top: 0; }
.cmp tbody th { position: sticky; left: 0; background: var(--card); z-index: 1; font-weight: 600; color: var(--ink); min-width: 130px; border-right: 1px solid var(--hair); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp tr.me th, .cmp tr.me td { background: var(--nut-soft); }
.cmp td b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.cmp.focus td.dim, .cmp.focus th.dim:not(.rowh) { opacity: .25; }
.hint-scroll { font-size: .8rem; color: var(--muted); font-family: var(--font-mono); margin-top: 8px; }

/* ---------- Cap. 8: primer paso ---------- */
.steps3 { display: grid; gap: 14px; counter-reset: s; margin-block: 24px 40px; }
@media (min-width: 860px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.steps3 .card { counter-increment: s; position: relative; padding-top: 52px; }
.steps3 .card { padding-top: 70px; }
.steps3 .card::before { content: counter(s); position: absolute; top: 24px; left: clamp(22px, 3.2vw, 34px); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font-family: var(--font-display); font-weight: 700; font-size: .95rem; }
.wallets { display: grid; gap: 12px; margin-top: 16px; }
@media (min-width: 640px) { .wallets { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .wallets { grid-template-columns: repeat(3, 1fr); } }
.wallet { display: flex; flex-direction: column; gap: 8px; }
.wallet h4 { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.wallet[hidden] { display: none; }
.plat { display: flex; flex-wrap: wrap; gap: 6px; }
.wallet .btn { margin-top: auto; align-self: flex-start; }
.wallet p { font-size: .92rem; color: var(--muted); margin: 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checklist li { margin: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border: 1px solid transparent; border-radius: 16px; cursor: pointer; background: var(--card); transition: border-color .2s, background .2s; }
.checklist label:hover { border-color: var(--hair-strong); }
.checklist input { width: 20px; height: 20px; margin-top: .2em; accent-color: var(--ok-fill); flex: none; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--faint); }
.checklist-out { margin-top: 12px; font-family: var(--font-mono); font-size: .85rem; color: var(--ok); min-height: 1.5em; }
.links { display: grid; gap: 10px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 720px) { .links { grid-template-columns: repeat(2, 1fr); } }
.links a { display: block; padding: 16px 18px; border: 1px solid transparent; border-radius: 16px; text-decoration: none; background: var(--card); transition: border-color .2s, transform .25s var(--ease); }
.links a:hover { border-color: var(--hair-strong); transform: translateY(-2px); }
.links a b { display: block; }
.links a span { font-size: .84rem; color: var(--muted); word-break: break-all; }
.links li { margin: 0; }

/* ---------- Cap. 9: quiz ---------- */
.quiz { max-width: 760px; margin-inline: auto; }
.q-progress { display: flex; gap: 6px; margin-bottom: 20px; }
.q-progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--chalk); transition: background .3s; }
.q-progress i.cur { background: var(--ink); }
.q-progress i.ok { background: var(--ok-fill); }
.q-progress i.bad { background: var(--bad); }
.q-card { animation: fadeup .5s both; }
.q-card h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 1rem; }
.opts { display: grid; gap: 10px; }
.opt { text-align: left; min-height: 56px; padding: 14px 18px; border: 1px solid transparent; border-radius: 16px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: border-color .2s, background .2s, transform .15s; display: flex; gap: 12px; align-items: flex-start; }
.opt:hover:not([disabled]) { border-color: var(--hair-strong); transform: translateX(3px); }
.opt .l { font-family: var(--font-mono); color: var(--muted); flex: none; }
.opt[disabled] { cursor: default; }
.opt.good { border-color: var(--ok-fill); background: var(--ok-soft); animation: pop .5s; }
.opt.bad { border-color: var(--bad); background: var(--bad-soft); animation: shake .45s; }
.opt.faded { opacity: .55; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.03); } 100% { transform: scale(1); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
.q-fb { margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: var(--chalk); animation: fadeup .4s both; }
.q-fb strong { display: block; }
.q-fb.good { background: var(--ok-soft); }
.q-fb.bad { background: var(--bad-soft); }
.q-end { text-align: center; animation: fadeup .6s both; }
.q-score { font-size: clamp(3rem, 12vw, 6rem); font-weight: 600; color: var(--ink); letter-spacing: -.05em; line-height: 1; }
.q-score small { font-size: .35em; color: var(--muted); letter-spacing: 0; }
.confetti { position: relative; height: 0; }
.confetti i { position: absolute; top: 0; width: 8px; height: 12px; background: var(--nut-fill); border-radius: 2px; animation: conf 1.6s ease-out forwards; opacity: 0; }
@keyframes conf { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(160px) rotate(540deg); } }

/* ---------- Cap. 10: glosario y fuentes ---------- */
.gloss { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 800px) { .gloss { grid-template-columns: repeat(2, 1fr); } }
.gloss > div { border-radius: 18px; padding: 18px 20px; background: var(--card); }
.gloss dt { font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.gloss dt .mono { color: var(--nut); font-size: .72rem; margin-left: 8px; font-weight: 400; }
.gloss dd { margin: 4px 0 0; font-size: .95rem; }
.gloss .none { display: none; grid-column: 1 / -1; color: var(--muted); }
.sources { margin-top: clamp(40px, 6vw, 80px); }
.closing { margin-top: clamp(72px, 9vw, 140px); text-align: center; }
.closing blockquote { margin: 0 auto; font-family: var(--font-display); font-size: clamp(1.9rem, 4.6vw, 3.2rem); letter-spacing: -.035em; line-height: 1.1; color: var(--ink); font-weight: 700; max-width: 20ch; }
.closing blockquote em { font-style: normal; background: var(--hola); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Pie ---------- */
.footer { background: var(--band); color: var(--muted); padding: 40px 0 56px; font-size: .8rem; line-height: 1.55; border-top: 1px solid var(--hair); }
.footer .wrap { display: grid; gap: 24px; }
@media (min-width: 800px) { .footer .wrap { grid-template-columns: 1.4fr 1fr; } }
.footer strong { color: var(--ink); }
.footer a { color: var(--body); text-decoration-color: var(--hair-strong); }
.footer a:hover { color: var(--ink); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .5em; }
.footer .badge { display: inline-block; padding: .3em .85em; background: var(--nut-soft); color: var(--nut); border-radius: 999px; font-size: .74rem; font-weight: 600; margin-bottom: 14px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: color-mix(in srgb, var(--ink) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--paper); padding: 11px 20px; border-radius: 999px; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; z-index: 80; max-width: calc(100vw - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.noscript { margin: 90px var(--page-x) 0; padding: 14px; border: 1px solid var(--nut); background: var(--nut-soft); border-radius: 12px; color: var(--ink); }

/* ---------- Móvil angosto ---------- */
@media (max-width: 480px) {
  body { font-size: 1rem; }
  .jars { gap: 6px; }
  .jar { height: 160px; }
  .brand span { font-size: .95rem; }
  .menu-btn span.t { display: none; }
  .menu-btn { padding-inline: 0; width: 40px; }
  .seg button { padding-inline: .8em; font-size: .85rem; }
  .phone { min-height: 0; }
  .fakeqr { width: 64px; height: 64px; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .scene .pipe i { left: 45%; opacity: 1; }
  .coins .coin { animation: none; }
}
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after {
  animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
}
:root[data-motion="off"] .js .reveal, :root[data-motion="off"].js .reveal { opacity: 1; transform: none; filter: none; }
:root[data-motion="off"] .scene .pipe i { left: 45%; opacity: 1; }
:root[data-motion="off"] .hero-art .coin { animation: none; }

.scene .p2 { display: none; }
.scene.app .p2 { display: block; }
.scene .mid svg { color: var(--nut); }

/* ---------- Enlaces al laboratorio (arcashu) ---------- */
.lab-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; margin-top: clamp(36px, 5vw, 56px); padding: clamp(24px, 3.6vw, 40px); border-radius: calc(var(--r) + 6px); background: radial-gradient(120% 160% at 100% 0%, color-mix(in srgb, var(--nut-fill) 18%, transparent), transparent 55%), var(--nut-soft); }
.lab-cta > div { flex: 1 1 320px; }
.lab-cta h3 { margin: 0 0 .35em; }
.lab-cta p:last-child { margin-bottom: 0; }
.lab-cta .eyebrow { margin-bottom: .6rem; }
.chapnav a.chap-lab { color: var(--nut); font-weight: 600; }

/* ---------- Capas animadas con Motion (src/vida/aprende.ts) ---------- */
.hero-art .par { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.ch-head h2 .palabra { display: inline-block; will-change: transform, opacity; }
.relieve { position: relative; will-change: transform; }
.relieve::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), color-mix(in srgb, var(--nut-fill) 22%, transparent), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.relieve:hover::after { opacity: 1; }
.btn.iman { transition: background .2s, color .2s, opacity .2s, border-color .2s; }
