/* ============================================================
   Test de Autoestima — Inner Worth
   Custom styles built ON the design-system tokens.
   ============================================================ */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Scroll suave solo si el usuario no pidió reducir el movimiento */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--fg1);
  background: var(--mint);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--lime); color: var(--ink); }
img, svg { display: block; }
button { font-family: inherit; }

/* Pulido / detalle (handcrafted) -----------------------------
   · sin flash gris al tocar en móvil
   · anclas (#agenda) con offset para no quedar bajo la barra
   · foco visible accesible y de marca en elementos interactivos */
* { -webkit-tap-highlight-color: transparent; }
[id] { scroll-margin-top: 84px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--navy); outline-offset: 3px; border-radius: 6px;
}

/* Skip-link (a11y): invisible hasta recibir foco con teclado */
.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--navy); color: #fff; font-family: var(--font-body); font-weight: 600;
  font-size: 14px; padding: 12px 20px; border-radius: 999px; text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus-visible { top: 12px; outline-color: var(--lime); }

/* premium film grain (barely there) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: .04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media print { body::after { display: none; } }

/* ============================================================
   APP SHELL
   ============================================================ */
#root { position: relative; z-index: 1; }
.app-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.app-bg::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(46% 40% at 8% -6%, rgba(81,200,120,.10), transparent 60%),
    radial-gradient(40% 38% at 102% 6%, rgba(0,0,128,.07), transparent 60%),
    radial-gradient(50% 44% at 92% 104%, rgba(196,214,23,.07), transparent 64%);
}

/* ambient organic blob that recolours per chapter */
.ambient-blob {
  position: fixed; z-index: 0; pointer-events: none;
  width: min(60vw, 640px); height: min(60vw, 640px);
  right: -14vw; bottom: -16vh;
  background: var(--block-accent, var(--navy));
  border-radius: var(--r-blob);
  filter: blur(60px); opacity: .12;
  transition: background 1.1s ease, opacity 1.1s ease, transform 1.1s ease;
  will-change: transform;
}
html:not(.anim-off) .ambient-blob { animation: blobDrift 26s ease-in-out infinite; }
.ambient-blob.two {
  right: auto; left: -16vw; top: -14vh; bottom: auto;
  width: min(46vw, 460px); height: min(46vw, 460px);
  opacity: .09; animation-duration: 32s; animation-direction: reverse;
}
@keyframes blobDrift {
  0%,100% { transform: translate3d(0,0,0) rotate(0deg) scale(1); border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  50% { transform: translate3d(-3vw,-2vh,0) rotate(8deg) scale(1.06); border-radius: 56% 44% 39% 61% / 55% 38% 62% 45%; }
}
@media (prefers-reduced-motion: reduce) { .ambient-blob { animation: none; } }

/* ============================================================
   LAYOUT / STAGE
   ============================================================ */
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }
.stage {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 96px 0 72px;
}
.flow { position: relative; z-index: 1; padding: 64px 0 96px; }

/* ============================================================
   TYPE HELPERS
   ============================================================ */
.eyebrow {
  font-family: var(--font-display); font-weight: 800; font-size: 12.5px;
  letter-spacing: .26em; text-transform: uppercase; color: var(--emerald-700);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow.rule::before {
  content: ""; width: 26px; height: 2px; background: currentColor; opacity: .5;
}
.script { font-family: var(--font-script); font-weight: 700; color: var(--emerald-700); line-height: 1; }
.disp { font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.02; }
.hl { background: linear-gradient(180deg, transparent 56%, var(--lime) 56% 92%, transparent 92%); padding: 0 4px; color: var(--ink); }
.hl-em { color: var(--emerald-700); }
.hl-navy { color: var(--navy); }

/* ============================================================
   BUTTONS (brand DNA)
   ============================================================ */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 16px; border: none;
  border-radius: 999px; padding: 15px 30px; cursor: pointer; position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; white-space: nowrap; line-height: 1;
  transition: transform .14s ease, box-shadow .25s ease, background .2s ease, color .2s ease, filter .2s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn-lg { padding: 18px 36px; font-size: 17px; }
.btn-primary { background: var(--lime); color: var(--ink); box-shadow: 0 6px 18px rgba(196,214,23,.28); }
.btn-primary:hover { background: #d8eb20; transform: translateY(-3px); box-shadow: 0 18px 38px rgba(196,214,23,.34); }
.btn-pop { background: var(--lime); color: var(--ink); box-shadow: 0 6px 18px rgba(196,214,23,.28); }
.btn-pop:hover { background: #d8eb20; transform: translateY(-3px); box-shadow: 0 18px 38px rgba(196,214,23,.34); }
.btn-ghost { background: transparent; color: var(--fg1); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.btn-ghost:hover { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--navy); color: var(--navy); }
/* Ghost button on a navy surface: white at rest, navy text on hover (stays legible) */
.btn-ghost.on-navy { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35); }
.btn-ghost.on-navy:hover { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px #fff; }
.btn-wa { background: linear-gradient(135deg, #25D366, #128C7E); color: #fff; box-shadow: 0 6px 18px rgba(18,140,126,.28); }
.btn-wa:hover { filter: brightness(1.05); transform: translateY(-3px); }
/* sheen sweep */
.btn-primary::after, .btn-pop::after {
  content: ""; position: absolute; top: 0; left: -160%; width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-18deg); pointer-events: none;
}
html:not(.anim-off) .btn-primary:hover::after,
html:not(.anim-off) .btn-pop:hover::after { animation: btnSheen .75s ease; }
@keyframes btnSheen { from { left: -160%; } to { left: 160%; } }
@media (prefers-reduced-motion: reduce) { .btn-primary::after, .btn-pop::after { display: none; } }

.linkbtn {
  background: none; border: none; cursor: pointer; font-family: var(--font-body);
  font-size: 15px; font-weight: 600; color: var(--fg2); padding: 10px 6px;
  display: inline-flex; align-items: center; gap: 8px; transition: color .2s, gap .2s;
}
.linkbtn svg { width: 16px; height: 16px; }
.linkbtn:hover { color: var(--navy); }
.linkbtn:hover.back { gap: 12px; }
.linkbtn:disabled { opacity: .3; cursor: default; }

/* ============================================================
   LOGOTYPE BLOCK
   ============================================================ */
.brandmark { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1; }
.brandmark .ism { font-family: var(--font-display); font-weight: 900; letter-spacing: -.02em; text-transform: uppercase; color: var(--ink); display: inline-flex; align-items: baseline; }
.brandmark .ism .dot { color: var(--emerald); }
.brandmark .iw { font-family: var(--font-display); font-weight: 700; letter-spacing: .26em; text-transform: uppercase; font-size: .34em; color: var(--fg2); margin-top: 3px; }

.appbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  background: color-mix(in srgb, var(--mint) 78%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.appbar.scrolled { border-color: var(--border); }
.appbar .brandmark { flex-direction: row; align-items: baseline; gap: 8px; }
.appbar .brandmark .iw { margin-top: 0; font-size: 10.5px; align-self: center; }
.appbar-right { display: flex; align-items: center; gap: 14px; }
.appbar .ghosttag { font-size: 12.5px; color: var(--fg3); font-weight: 600; }
@media (max-width: 560px) { .appbar .ghosttag { display: none; } }

/* ============================================================
   CHIPS
   ============================================================ */
.chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--fg1);
  box-shadow: var(--shadow-xs); border: 1px solid var(--border);
}
.chip svg { width: 15px; height: 15px; color: var(--emerald-700); }

/* ============================================================
   PANELS / CARDS
   ============================================================ */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px 30px; box-shadow: var(--shadow-sm); }
.panel.navy { background: var(--navy); color: #fff; border-color: transparent; box-shadow: var(--shadow-navy); }
.panel.tint { background: var(--emerald-050); border-color: var(--emerald-100); box-shadow: none; }


.note {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 18px 22px; font-size: 14.5px; color: var(--fg2); line-height: 1.6;
  display: flex; gap: 14px; align-items: flex-start;
}
.note .ic { flex: none; width: 22px; height: 22px; color: var(--navy); margin-top: 1px; }
.note.warm .ic { color: var(--lime-600); }
.note.warm { background: linear-gradient(180deg, #fffef4, #fdfce8); border-color: #efe9b8; }
.note b { color: var(--fg1); }

/* ============================================================
   SCREEN TRANSITIONS
   ============================================================ */
.screen { width: 100%; }
.fade-in { animation: fadeRise .55s cubic-bezier(.2,.7,.2,1); }
@keyframes fadeRise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* per-question slide */
.qmove-next { animation: qNext .5s cubic-bezier(.2,.7,.2,1); }
.qmove-prev { animation: qPrev .5s cubic-bezier(.2,.7,.2,1); }
@keyframes qNext { from { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: none; } }
@keyframes qPrev { from { opacity: 0; transform: translateX(-46px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .fade-in, .qmove-next, .qmove-prev { animation: none; }
}

/* reveal (effects.js) */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--rd, 0ms); }
.reveal.in { opacity: 1; transform: none; }
html.anim-off .reveal { opacity: 1 !important; transform: none !important; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1 !important; transform: none !important; transition: none; } }

/* halo */
[data-halo] { position: relative; isolation: isolate; }
[data-halo]::before { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; background: radial-gradient(240px circle at var(--mx,50%) var(--my,50%), rgba(81,200,120,.16), transparent 62%); opacity: 0; transition: opacity .4s ease; pointer-events: none; }
[data-halo]:hover::before { opacity: 1; }
[data-halo] > * { position: relative; z-index: 1; }

/* ============================================================
   INTRO
   ============================================================ */
.intro h1, .intro .h1-echo { font-family: var(--font-display); font-weight: 900; text-transform: none; letter-spacing: -.02em; font-size: clamp(34px, 6.2vw, 62px); line-height: 1.0; margin: 16px 0 0; color: var(--ink); }
.intro h1 .turn, .intro .h1-echo .turn { color: var(--navy); }
.intro .lede { font-size: clamp(17px, 2.1vw, 20px); line-height: 1.6; color: var(--fg2); max-width: 60ch; margin: 22px 0 0; }
.intro .lede b { color: var(--fg1); font-weight: 600; }
.startrow { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 30px; }
.startrow .hint { color: var(--fg2); font-size: 14px; max-width: 30ch; line-height: 1.5; }

/* intro variant: manifiesto (full navy) */
.intro.manifiesto { color: #fff; }
.intro-navy-card {
  background: var(--navy); color: #fff; border-radius: var(--r-xl); padding: clamp(34px, 5vw, 64px);
  box-shadow: var(--shadow-navy); position: relative; overflow: hidden;
}
.intro-navy-card .blobdot { position: absolute; width: 280px; height: 280px; border-radius: var(--r-blob); background: var(--emerald); opacity: .16; filter: blur(8px); right: -70px; bottom: -90px; }
.intro-navy-card h1 { color: #fff; }
.intro-navy-card h1 .turn { color: var(--lime); }
.intro-navy-card .lede { color: var(--navy-100); }
.intro-navy-card .lede b { color: #fff; }
.intro-navy-card .eyebrow { color: var(--emerald-300); }
.intro-navy-card .chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: #fff; }
.intro-navy-card .chip svg { color: var(--lime); }

/* intro variant: editorial split — big index numbers */
.specimen { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 30px; }
.specimen .row { display: flex; align-items: center; gap: 20px; padding: 18px 4px; border-top: 1px solid var(--border); }
.specimen .row:first-child { border-top: none; }
.specimen .row .n { font-family: var(--font-display); font-weight: 900; font-size: clamp(34px, 5vw, 52px); line-height: 1; letter-spacing: -.03em; min-width: 1.4em; }
.specimen .row .meta b { font-family: var(--font-display); font-weight: 700; font-size: 17px; display: block; }
.specimen .row .meta span { color: var(--fg2); font-size: 14.5px; }

/* ============================================================
   FORM (datos)
   ============================================================ */
.field { margin-bottom: 18px; }
.field label.fl { display: block; font-family: var(--font-display); font-weight: 700; font-size: 14px; margin-bottom: 7px; color: var(--fg1); }
.field label.fl small { font-weight: 500; color: var(--fg3); font-family: var(--font-body); }
.req { color: var(--lime-600); font-weight: 900; }
.field input {
  width: 100%; font-family: var(--font-body); font-size: 16px; padding: 14px 16px;
  border: 1.5px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--fg1);
  transition: border-color .16s, box-shadow .16s;
}
.field input::placeholder { color: var(--ink-300); }
.field input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0,0,128,.10); }
.choices { display: flex; flex-wrap: wrap; gap: 9px; }
.choice {
  font-family: var(--font-body); font-size: 14px; font-weight: 600; padding: 10px 18px;
  border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--fg2);
  cursor: pointer; transition: .16s; min-height: 44px;
}
.choice:hover { border-color: var(--navy); color: var(--fg1); }
.choice.sel { background: var(--navy); border-color: var(--navy); color: #fff; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--fg2); margin-top: 6px; cursor: pointer; line-height: 1.5; }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); cursor: pointer; }
.consent b { color: var(--fg1); }
.formerr { color: #b3261e; font-weight: 600; font-size: 14px; margin: 14px 0 0; min-height: 1.1em; display: flex; align-items: center; gap: 8px; }
.formerr svg { width: 16px; height: 16px; }
.formerr:empty { min-height: 0; margin: 0; }

/* ============================================================
   TEST — progress + question + likert
   ============================================================ */
.testtop { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 20; }
.prograil { display: flex; align-items: center; gap: 14px; }
.prograil .segs { display: flex; gap: 6px; flex: 1; }
.prograil .seg { height: 6px; border-radius: 999px; background: var(--ink-100); overflow: hidden; position: relative; }
.prograil .seg > i { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, var(--navy), var(--emerald)); border-radius: 999px; transition: width .55s cubic-bezier(.2,.7,.2,1); }
.prograil .count { font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: .04em; color: var(--fg2); white-space: nowrap; }
.prograil .count b { color: var(--navy); }
.q-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.q-meta .pill { font-family: var(--font-display); font-weight: 800; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 13px; border-radius: 999px; background: var(--block-soft, var(--navy-050)); color: var(--block-accent, var(--navy)); }
.q-meta .ix { font-size: 13px; color: var(--fg3); font-weight: 600; }
/* Block 2 (lime) pill: keep the green theme but darken text for legibility */
.q-meta .pill.pill-soft { background: color-mix(in oklab, var(--lime-200) 55%, #fff); color: color-mix(in oklab, var(--lime-600) 36%, var(--ink)); }

.qwrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 24px; }
.q-text {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.015em;
  font-size: clamp(24px, 4.2vw, 40px); line-height: 1.14; color: var(--ink);
  margin: 0 0 clamp(28px, 5vw, 48px); text-wrap: balance;
}

/* likert scale */
.scale { position: relative; display: flex; gap: 12px; align-items: flex-start; }
.scale .track { position: absolute; left: 10%; width: 80%; top: 27px; height: 3px; background: var(--ink-100); border-radius: 2px; z-index: 0; }
.scale .track > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--navy), var(--emerald)); border-radius: 2px; transition: width .5s cubic-bezier(.2,.7,.2,1); }
.node {
  flex: 1; background: none; border: none; cursor: pointer; padding: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.node .dotwrap { height: 54px; display: grid; place-items: center; }
.node .dot {
  width: var(--d); height: var(--d); border-radius: 50%; background: var(--surface);
  border: 2px solid var(--border-strong); display: grid; place-items: center; color: transparent;
  transition: transform .18s cubic-bezier(.2,.7,.2,1), background .18s, border-color .18s, box-shadow .25s;
}
.node .dot svg { width: 60%; height: 60%; }
.node .lab { font-size: 13px; line-height: 1.3; color: var(--fg2); font-weight: 600; text-align: center; transition: color .18s; max-width: 13ch; }
.node:hover .dot { border-color: var(--navy); transform: translateY(-5px) scale(1.06); box-shadow: 0 10px 24px rgba(0,0,128,.18); }
.node:hover .lab { color: var(--fg1); }
.node:focus-visible { outline: none; }
.node:focus-visible .dot { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0,0,128,.16); }
.node.sel .dot { background: var(--navy); border-color: var(--navy); color: #fff; transform: translateY(-3px) scale(1.04); box-shadow: 0 12px 28px rgba(0,0,128,.26); }
.node.sel .lab { color: var(--navy); font-weight: 700; }
.node .kbd { font-size: 10.5px; color: var(--fg3); font-weight: 700; margin-top: -2px; opacity: .7; }

.q-nav { display: flex; align-items: center; justify-content: space-between; margin-top: clamp(30px, 5vw, 48px); }
.q-nav .keyhint { font-size: 12.5px; color: var(--fg3); display: inline-flex; align-items: center; gap: 8px; }
.q-nav .keyhint kbd { font-family: var(--font-body); font-weight: 700; font-size: 11px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; color: var(--fg2); }

@media (max-width: 680px) {
  .scale { flex-direction: column; gap: 10px; }
  .scale .track { display: none; }
  .node { flex-direction: row; gap: 16px; width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--r-md); background: var(--surface); transition: border-color .16s, background .16s, transform .16s; }
  .node .dotwrap { height: auto; }
  .node .dot { --d: 26px !important; }
  .node .lab { text-align: left; max-width: none; font-size: 15px; }
  .node:hover { border-color: var(--navy); transform: translateX(3px); }
  .node:hover .dot { transform: none; box-shadow: none; }
  .node.sel { border-color: var(--navy); background: #fff; }
  .node.sel .dot { transform: none; }
  .node .kbd { display: none; }
  .q-nav .keyhint { display: none; }
}

/* ============================================================
   CHAPTER (block interstitial) — full navy drama
   ============================================================ */
.chapter { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; text-align: center; }
.chapter .bignum { font-family: var(--font-display); font-weight: 900; font-size: clamp(80px, 20vw, 200px); line-height: .82; letter-spacing: -.04em; color: var(--block-accent, var(--navy)); opacity: .16; }
.chapter .barlabel { font-family: var(--font-display); font-weight: 800; font-size: 12.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--block-accent-text, var(--navy)); margin-top: -8px; }
.chapter h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(32px, 6vw, 60px); line-height: 1.0; letter-spacing: -.02em; color: var(--ink); margin: 14px 0 0; text-transform: none; }
.chapter .lead { font-size: clamp(16px, 2.1vw, 19px); color: var(--fg2); max-width: 46ch; margin: 16px auto 0; line-height: 1.6; }
.chapter .script { font-size: clamp(26px, 4vw, 38px); margin-top: 18px; color: var(--block-accent-text, var(--emerald-700)); }
.chapter .go { margin-top: 34px; display: inline-flex; }
.chapter .dots { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }
.chapter .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-100); transition: background .3s, transform .3s; }
.chapter .dots i.on { background: var(--block-accent, var(--navy)); transform: scale(1.2); }

/* ============================================================
   RESULTS
   ============================================================ */
.result-head { text-align: center; }
.level-badge { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 800; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: #fff; padding: 8px 18px; border-radius: 999px; }
.level-badge svg { width: 15px; height: 15px; }
.result-head h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 5.4vw, 54px); line-height: 1.02; letter-spacing: -.02em; color: var(--ink); margin: 18px 0 0; }
.result-head .rtag { font-size: clamp(16px, 2vw, 18.5px); color: var(--fg2); max-width: 58ch; margin: 18px auto 0; line-height: 1.62; }

.section-title { font-family: var(--font-display); font-weight: 900; text-transform: none; font-size: clamp(24px, 3.6vw, 36px); letter-spacing: -.015em; color: var(--ink); margin: 0; display: flex; align-items: center; gap: 14px; }
.section-title::before { content: ""; flex: none; width: 30px; height: 3px; border-radius: 2px; background: var(--navy); }
.section-sub { color: var(--fg2); font-size: 16px; line-height: 1.6; margin: 10px 0 0; max-width: 62ch; }

/* meters — bar variant */
.meters { display: grid; grid-template-columns: 1fr; gap: 16px; }
.meter { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; }
.meter-top .ml { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--fg1); display: flex; align-items: center; gap: 10px; }
.meter-top .ml .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.meter-top .ml .ic svg { width: 18px; height: 18px; }
.meter-top .mv { font-family: var(--font-display); font-weight: 900; font-size: 30px; letter-spacing: -.02em; line-height: 1; }
.meter-top .mv small { font-size: 14px; color: var(--fg3); font-weight: 700; }
.meter .bar { height: 11px; background: var(--ink-100); border-radius: 999px; overflow: hidden; }
.meter .bar > i { display: block; height: 100%; width: 0; border-radius: 999px; transition: width 1s cubic-bezier(.2,.7,.2,1); }
.meter .mdesc { display: block; color: var(--fg2); font-size: 14.5px; margin-top: 12px; line-height: 1.55; }

/* meters — liquid blob variant */
.bloboards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bloboard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px 20px; box-shadow: var(--shadow-sm); text-align: center; }
.liquid { position: relative; width: 132px; height: 132px; margin: 0 auto 16px; border-radius: var(--r-blob); overflow: hidden; background: var(--ink-050); box-shadow: inset 0 0 0 1px var(--border); }
.liquid .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; transition: height 1.1s cubic-bezier(.2,.7,.2,1); }
.liquid .fill::before, .liquid .fill::after { content: ""; position: absolute; left: -50%; width: 200%; height: 22px; top: -16px; border-radius: 44%; }
.liquid .num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 34px; letter-spacing: -.02em; color: var(--ink); z-index: 2; mix-blend-mode: normal; }
html:not(.anim-off) .liquid .fill::before { animation: wave 5s linear infinite; }
html:not(.anim-off) .liquid .fill::after { animation: wave 7s linear infinite reverse; opacity: .6; }
@keyframes wave { to { transform: translateX(50%); } }
.bloboard .bl { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: var(--fg1); }
.bloboard .bd { color: var(--fg2); font-size: 13px; margin-top: 8px; line-height: 1.5; }
@media (max-width: 680px) { .bloboards { grid-template-columns: 1fr; gap: 14px; } .bloboard { display: flex; align-items: center; gap: 18px; text-align: left; } .liquid { margin: 0; flex: none; width: 96px; height: 96px; } .liquid .num { font-size: 26px; } }

/* phases */
.phase { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 28px; box-shadow: var(--shadow-sm); }
.phase.module { background: var(--emerald-050); border: 1px solid var(--emerald-100); }
.phase .when { font-family: var(--font-display); font-weight: 800; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.phase.module .when { color: var(--emerald-700); }
.phase .when svg { width: 14px; height: 14px; }
.phase h3 { font-family: var(--font-display); font-weight: 700; font-size: 21px; color: var(--ink); margin: 10px 0 0; line-height: 1.16; }
.phase .goal { color: var(--fg2); font-size: 15px; font-style: italic; margin: 8px 0 18px; line-height: 1.55; }
.ex { border-top: 1px solid var(--border); padding: 18px 0 4px; }
.ex:first-of-type { border-top: none; }
.ex h4 { font-family: var(--font-body); font-weight: 700; font-size: 16px; color: var(--fg1); margin: 0 0 7px; display: block; line-height: 1.4; }
.ex .tag { display: inline-flex; align-items: center; font-family: var(--font-display); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: var(--navy); color: #fff; padding: 4px 9px; border-radius: 999px; margin-right: 9px; vertical-align: 2px; }
.phase.module .ex .tag { background: var(--emerald-700); }
.ex p { font-size: 15px; color: var(--fg2); margin: 0 0 7px; line-height: 1.6; }
.ex ol, .ex ul { margin: 8px 0 8px 4px; padding-left: 20px; font-size: 14.5px; color: var(--fg2); }
.ex li { margin: 5px 0; line-height: 1.55; }

/* habits */
.habits { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.habit { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px 18px; box-shadow: var(--shadow-xs); }
.habit .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--emerald-050); color: var(--emerald-700); display: grid; place-items: center; margin-bottom: 12px; }
.habit .ic svg { width: 19px; height: 19px; }
.habit b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--fg1); margin-bottom: 3px; }
.habit span { color: var(--fg2); font-size: 13.5px; line-height: 1.5; }

/* help box (navy) */
.help { background: var(--navy); color: #fff; border-radius: var(--r-xl); padding: clamp(28px, 4vw, 44px); position: relative; overflow: hidden; box-shadow: var(--shadow-navy); }
.help .blobdot { position: absolute; width: 240px; height: 240px; border-radius: var(--r-blob); background: var(--emerald); opacity: .14; filter: blur(6px); right: -70px; top: -80px; }
.help h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(20px, 3vw, 27px); color: #fff; margin: 0 0 6px; }
.help .lead { color: var(--navy-100); font-size: 15.5px; line-height: 1.62; margin: 0 0 16px; max-width: 60ch; }
.help ul { list-style: none; margin: 0; padding: 0; }
.help li { display: flex; gap: 12px; padding: 9px 0; font-size: 15px; color: #fff; border-top: 1px solid rgba(255,255,255,.12); }
.help li:first-child { border-top: none; }
.help li svg { flex: none; width: 19px; height: 19px; color: var(--lime); margin-top: 2px; }
.help .lines { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.14); font-size: 14.5px; color: var(--navy-100); line-height: 1.7; }
.help .lines b { color: var(--lime); }

.actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
/* Error de generación del PDF (se muestra dentro del panel navy) */
.pdf-fail { margin: 14px auto 0; max-width: 52ch; font-size: 14.5px; line-height: 1.55; color: #ffd9d6; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pdf-fail svg { width: 16px; height: 16px; flex: none; }
.refbox { border-top: 1px solid var(--border); padding-top: 22px; }
.refbox summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--fg1); list-style: none; display: flex; align-items: center; gap: 10px; }
.refbox summary::-webkit-details-marker { display: none; }
.refbox summary .chev { transition: transform .3s; color: var(--navy); display: inline-flex; }
.refbox[open] summary .chev { transform: rotate(90deg); }
.refbox p { font-size: 14px; color: var(--fg2); line-height: 1.6; margin: 12px 0 0; }
.foot { text-align: center; color: var(--fg3); font-size: 13px; line-height: 1.6; }

/* ============================================================
   GRACIAS PAGE
   ============================================================ */
.gracias-hero { text-align: center; }
.dl-badge { display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px; background: var(--emerald-050); color: var(--emerald-700); font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: .04em; }
.dl-badge svg { width: 17px; height: 17px; }
.gracias-hero h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 5.6vw, 56px); line-height: 1.0; letter-spacing: -.02em; color: var(--ink); margin: 20px 0 0; }
.gracias-hero h1 .turn { color: var(--navy); }
.gracias-hero .lead { font-size: clamp(16px, 2vw, 19px); color: var(--fg2); max-width: 56ch; margin: 18px auto 0; line-height: 1.62; }

.offer { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 32px; align-items: center; }
/* Móvil: la foto a tamaño contenido y centrada (antes ocupaba toda la
   columna y se veía enorme); los CTA a ancho completo para buen tap. */
@media (max-width: 800px) {
  .offer { grid-template-columns: 1fr; gap: 22px; }
  .offer .photo-frame { max-width: 240px; margin: 0 auto; }
  .offer .iw-photo { aspect-ratio: 1 / 1; }
  .offer .iw-ph .ph-mark { font-size: 88px; }
  .offer .pcaption { justify-content: center; }
  .offer .ctas .btn { width: 100%; }
}
@media (max-width: 420px) {
  .offer .photo-frame { max-width: 176px; }
  .offer .iw-ph .ph-mark { font-size: 66px; }
}
.offer .iw-photo { width: 100%; aspect-ratio: 4/5; display: block; object-fit: cover; }
/* Branded placeholder shown until a real portrait is dropped in (see screens2.jsx).
   Clase propia (no '.photo-ph', que effects.js usa para parallax). */
.offer .iw-ph { display: grid; place-items: center; background: linear-gradient(150deg, var(--navy), var(--navy-500)); }
.offer .iw-ph .ph-mark { font-family: var(--font-display); font-weight: 900; font-size: clamp(64px, 12vw, 120px); line-height: 1; color: #fff; letter-spacing: -.04em; }
.offer .iw-ph .ph-mark .dot { color: var(--emerald); }
.offer .photo-frame { border-radius: var(--r-blob); overflow: hidden; box-shadow: var(--shadow-navy); position: relative; }
.offer .photo-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,128,.12); pointer-events: none; }
.offer .pcaption { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.offer .pcaption .av { width: 40px; height: 40px; border-radius: 50%; background: var(--emerald); color: var(--navy); display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; flex: none; }
.offer .pcaption b { font-family: var(--font-display); font-weight: 700; font-size: 16px; display: block; }
.offer .pcaption span { color: var(--fg2); font-size: 13.5px; }
.offer h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 3.8vw, 40px); line-height: 1.04; letter-spacing: -.02em; color: var(--ink); margin: 14px 0 0; }
.offer p { color: var(--fg2); font-size: 16px; line-height: 1.62; margin: 14px 0 0; }
.offer .valuelist { list-style: none; margin: 18px 0 0; padding: 0; }
.offer .valuelist li { display: flex; gap: 12px; padding: 8px 0; font-size: 15px; color: var(--fg1); }
.offer .valuelist li svg { flex: none; width: 20px; height: 20px; color: var(--emerald-700); margin-top: 2px; }
.offer .priceline { display: flex; align-items: center; gap: 12px; margin: 22px 0 6px; }
.offer .priceline .pl { color: var(--fg2); font-size: 14.5px; line-height: 1.45; }
.offer .priceline .p { font-family: var(--font-display); font-weight: 900; font-size: 32px; color: var(--navy); letter-spacing: -.02em; }
.offer .priceline .pl { color: var(--fg2); font-size: 14.5px; }
.offer .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.calendly-wrap { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); background: #fff; border: 1px solid var(--border); }
.calendly-inline-widget { min-width: 320px; height: 680px; position: relative; }
/* Estado de carga: visible hasta que el iframe de Calendly lo cubre */
.calendly-inline-widget::before {
  content: "Cargando el calendario…"; position: absolute; inset: 0;
  display: grid; place-items: center; color: var(--fg3);
  font-family: var(--font-body); font-size: 15px;
}
/* Fallback si Calendly no carga (red lenta / bloqueadores) */
.cal-fallback { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 18px; padding: 40px 24px; text-align: center; }
.cal-fallback p { margin: 0; color: var(--fg2); font-size: 15.5px; }

/* ============================================================
   FAQ-ish accordion reuse on gracias (cuándo pedir ayuda)
   ============================================================ */
.faqlist { border-top: 1px solid var(--border); }
.faqi { border-bottom: 1px solid var(--border); }
.faqi .q { width: 100%; background: none; border: none; cursor: pointer; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 4px; font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--fg1); }
.faqi .q .ico { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--navy-050); color: var(--navy); display: grid; place-items: center; transition: transform .45s cubic-bezier(.4,0,.2,1), background .4s, color .4s; }
.faqi .q .ico svg { width: 17px; height: 17px; }
.faqi.open .q .ico { transform: rotate(135deg); background: var(--navy); color: #fff; }
.faqi .a { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .5s cubic-bezier(.4,0,.2,1), opacity .4s; }
.faqi.open .a { grid-template-rows: 1fr; opacity: 1; }
.faqi .a-in { overflow: hidden; min-height: 0; padding: 0 4px; font-size: 15.5px; line-height: 1.62; color: var(--fg2); }
.faqi.open .a-in { padding: 0 4px 24px; }

/* ============================================================
   WHATSAPP FAB
   ============================================================ */
.wa-fab { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer; background: linear-gradient(135deg, #25D366, #128C7E); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(18,140,126,.35); transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s; text-decoration: none; }
.wa-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 40px rgba(18,140,126,.42); }
.wa-fab svg { width: 28px; height: 28px; }
.wa-fab .pulse { position: absolute; inset: 0; border-radius: 50%; background: #25D366; opacity: .4; z-index: -1; }
html:not(.anim-off) .wa-fab .pulse { animation: waPulse 2.6s ease-out infinite; }
@keyframes waPulse { 0% { transform: scale(1); opacity: .4; } 70%,100% { transform: scale(1.8); opacity: 0; } }
@media (max-width: 560px) { .wa-fab { width: 52px; height: 52px; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 560px) {
  .wrap, .qwrap, .testtop, .chapter, .flow .wrap { padding-left: 18px; padding-right: 18px; }
  .panel { padding: 22px 20px; }
  .stage { padding: 86px 0 64px; }
  .testtop { top: 58px; }
  .actions .btn { width: 100%; }
}

/* spacing rhythm for flow sections */
.flow .block + .block { margin-top: clamp(40px, 7vw, 72px); }
.flow .sub + .sub { margin-top: 16px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-20 > * + * { margin-top: 20px; }
.stack-24 > * + * { margin-top: 24px; }

/* Logo del appbar → enlace a la web principal */
.brandlink { text-decoration: none; display: inline-flex; border-radius: 8px; transition: opacity .18s ease; }
.brandlink:hover { opacity: .72; }
