/* =========================================================================
 * Crypto Flow — Plataforma: navegación por grupos, planes, puente,
 * glosario en línea, tour, academia por niveles y laboratorio
 * ========================================================================= */
a.brand { text-decoration: none; color: inherit; }
.nav-group { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 12px 4px; }
.nav-group:first-child { padding-top: 0; }
.nav-lock { display: none; width: 14px !important; height: 14px !important; margin-left: auto; opacity: .7; }
.nav button.locked .nav-lock { display: block; }
.nav button.locked { color: var(--muted); }
.nav button.locked .nav-badge { margin-left: 6px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.mode-switch button { background: none; border: 0; border-radius: 7px; padding: 7px 4px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.mode-switch button.on { background: var(--brand-soft); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 40%, transparent); }
.plan-pill { margin-top: 8px; display: inline-block; background: var(--brand-soft); color: var(--brand); border: 0; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; }
.upgrade { white-space: nowrap; }
.upgrade[hidden] { display: none; }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.view-inner { min-width: 0; }

/* puente para principiantes */
.bridge { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: 18px 20px; margin-bottom: 16px; border-radius: var(--r); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border)); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), color-mix(in srgb, var(--brand-2) 8%, var(--surface))); }
.bridge-k { display: block; font-size: 12px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.bridge p, .bridge ul { margin: 0; font-size: 13.5px; color: var(--text); }
.bridge ul { padding-left: 18px; }
.bridge-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: var(--text-2); font-size: 12px; font-weight: 600; }
.bridge-x:hover { color: var(--text); }
.bridge-col:last-of-type { padding-right: 70px; }
.bridge-pill { display: inline-flex; margin-bottom: 14px; background: var(--brand-soft); color: var(--brand); border: 0; border-radius: 20px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }

/* glosario en línea */
.term { border-bottom: 1.5px dotted color-mix(in srgb, var(--brand) 70%, transparent); cursor: help; }
.term:hover, .term:focus { color: var(--brand); outline: none; }
.term-pop { position: fixed; z-index: 120; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: 0 12px 32px rgba(0,0,0,.3); font-size: 13px; animation: tin .15s ease-out; }
.term-pop[hidden] { display: none; }
.term-pop b { display: block; margin-bottom: 4px; }
.term-pop p { margin: 0 0 6px; color: var(--text-2); text-transform: none; letter-spacing: 0; font-weight: 400; }

/* tour */
.tour { position: fixed; inset: 0; z-index: 110; }
.tour-block { position: absolute; inset: 0; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(4, 6, 12, .68); transition: all .3s ease; pointer-events: none; outline: 2px solid var(--brand); }
.tour-tip { position: fixed; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.45); transition: top .3s, left .3s; }
.tour-tip h4 { font-size: 16px; margin-bottom: 6px; }
.tour-tip p { color: var(--text-2); font-size: 13.5px; }
.tour-step { font-size: 11px; font-weight: 700; color: var(--brand); margin-bottom: 4px; letter-spacing: .05em; }
.tour-btns { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }

/* academia por niveles */
.level-card { padding: 20px; }
.level-card.locked { background: repeating-linear-gradient(135deg, var(--surface), var(--surface) 12px, color-mix(in srgb, var(--surface-2) 60%, var(--surface)) 12px, color-mix(in srgb, var(--surface-2) 60%, var(--surface)) 24px); }
.level-h { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.level-h .grow { min-width: 220px; }
.level-h h3 { margin-bottom: 2px; flex-wrap: wrap; }
.level-h .prog { max-width: 360px; margin-top: 6px; }
.lvl-num { width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; font-size: 22px; display: grid; place-items: center; flex: none; }
.level-card.locked .lvl-num { background: var(--surface-3); color: var(--muted); }
.lesson { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; color: var(--text); }
.lesson b { font-size: 13.5px; line-height: 1.35; }
.lesson.locked { opacity: .65; }
.lesson.locked:hover { border-color: var(--muted); }
.lesson-st { margin-top: auto; display: flex; align-items: center; min-height: 22px; }
.lesson-st .done-ic.sm { position: static; }
.lock-ic { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; vertical-align: -2px; }
.lessons { margin-bottom: 0; }

/* compra y planes */
.buy { text-align: center; }
.buy h2 { margin: 10px 0 6px; }
.buy-price { font-size: 38px; font-weight: 800; letter-spacing: -.03em; margin: 8px 0 14px; }
.buy-price span { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: 0; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; }
.checks li { position: relative; padding: 5px 0 5px 26px; font-size: 13.5px; }
.checks li::before { content: "\2713"; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: color-mix(in srgb, var(--up) 18%, transparent); color: var(--up); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.checks.left { max-width: 420px; margin: 16px auto 22px; }
.plans-hero { text-align: center; margin: 8px 0 22px; }
.plans-hero h2 { font-size: 26px; margin: 10px 0 6px; }
.pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; max-width: 1100px; margin-left: auto; margin-right: auto; }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card .checks { flex: 1; }
.price-card h3 { font-size: 17px; }
.price { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 10px 0 14px; }
.price span { font-size: 13px; font-weight: 600; color: var(--text-2); margin-left: 6px; letter-spacing: 0; }
.price-card.popular { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), 0 16px 40px color-mix(in srgb, var(--brand) 20%, transparent); }
.price-card.current { border-color: var(--up); }
.ribbon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 12px; border-radius: 20px; white-space: nowrap; }
.matrix th.c, .matrix td.c { text-align: center; }
.matrix td:first-child { white-space: normal; min-width: 200px; }
.yes { color: var(--up); font-weight: 800; }
.no { color: var(--muted); }
.demo-card { border-style: dashed; }

/* laboratorio */
.lab-hero { display: flex; gap: 24px; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-2) 14%, var(--surface)), var(--surface) 65%); }
.lab-hero h2 { font-size: 24px; margin: 10px 0 8px; }
.lab-art { width: 220px; flex: none; }
.chain { display: flex; gap: 12px; align-items: center; justify-content: center; }
.chain span { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--brand-2); position: relative; animation: blk 2.4s infinite ease-in-out; }
.chain span:nth-child(2) { animation-delay: .3s; }
.chain span:nth-child(3) { animation-delay: .6s; }
.chain span:nth-child(4) { animation-delay: .9s; }
.chain span + span::before { content: ""; position: absolute; left: -14px; top: 50%; width: 12px; height: 2px; background: var(--brand-2); }
@keyframes blk { 50% { background: color-mix(in srgb, var(--brand-2) 30%, transparent); transform: translateY(-4px); } }
.labs { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lab { display: flex; flex-direction: column; gap: 4px; }
.lab-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: 8px; }
.lab.locked { opacity: .7; }

/* vista bloqueada */
.locked-view { text-align: center; padding: 40px 24px; max-width: 720px; margin: 20px auto; }
.locked-view h2 { font-size: 26px; margin: 12px 0 8px; }
.lock-big { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.lock-big svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.row-btns.center { justify-content: center; flex-wrap: wrap; }
.scen-pick.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1300px) { .pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .bridge { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 34px; }
  .bridge-col:last-of-type { padding-right: 0; }
  .pricing { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
  .lab-art { display: none; }
}
@media (max-width: 640px) {
  .pricing, .scen-pick.three { grid-template-columns: minmax(0, 1fr); }
  .upgrade { display: none; }
}

/* visor de certificado */
.cert-view { position: fixed; inset: 0; z-index: 130; background: rgba(4, 6, 12, .82); backdrop-filter: blur(4px); display: flex; flex-direction: column; }
.cert-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cert-view iframe { flex: 1; width: 100%; border: 0; background: #eef0f6; }

/* Cuenta: acceso, pago y modo presentación */
.auth-tabs { display: flex; margin: 6px auto 4px; }
.auth-tabs button { flex: 1; }
.auth .field[hidden] { display: none; }
.auth a { color: var(--brand); }
.pay-note { margin: 8px 0 4px; }
.pay-note .badge { margin-left: 4px; }
.demo-card [data-preview-off] { margin-top: 10px; }

/* Paquete DeFi + Trading en la página de Planes */
.plans-bundle { margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--border); }

/* Oferta de Lanzamiento */
.offer-tag { display: inline-block; align-self: flex-start; font-size: 11.5px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #f97316, #ec4899); border-radius: 999px; padding: 3px 10px; margin-bottom: 6px; letter-spacing: .01em; }
.offer-note { display: inline-block; margin: 10px auto 0; padding: 8px 14px; border-radius: 12px; font-size: 14px; color: var(--text); background: color-mix(in srgb, #f97316 14%, transparent); border: 1px solid color-mix(in srgb, #f97316 40%, transparent); }
.offer-note[hidden] { display: none; }
