/* ==========================================================================
   DIAGNÓSTICO DE TU NEGOCIO — estilos. Usa los tokens de lib/inicio.css.
   ========================================================================== */
.dx { position: relative; }
.dx-win {
  position: relative; border-radius: 26px; overflow: hidden;
  background: linear-gradient(180deg, #11151e, #0b0e14); border: 1px solid var(--stroke-2);
  box-shadow: 0 60px 120px -50px rgba(61, 123, 255, 0.45), 0 30px 60px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.dx-win::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 40% at 80% 0%, rgba(61, 123, 255, 0.14), transparent 70%); }
.dx-ic { display: inline-block; width: 20px; height: 20px; flex: none; }
.dx-ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Cabecera */
.dx-bar { position: relative; display: flex; align-items: center; gap: 7px; padding: 15px 20px; border-bottom: 1px solid var(--stroke); }
.dx-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.dx-bar span { margin-left: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tx-2); }
.dx-count { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 12.5px; color: var(--acc-2); letter-spacing: 0.06em; }
.dx-prog { position: relative; height: 3px; background: rgba(255, 255, 255, 0.06); --p: 0; }
.dx-prog i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p)); background: linear-gradient(90deg, var(--acc), var(--cy)); box-shadow: 0 0 14px rgba(79, 216, 255, 0.5); transition: transform 0.6s var(--out); }

/* Áreas */
.dx-areas { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 14px 16px 0; }
.dx-areas li { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 8px 9px; border-radius: 12px; border: 1px solid var(--stroke); font-size: 12px; color: var(--tx-3); transition: all 0.4s var(--out); }
.dx-areas .dx-ic { width: 16px; height: 16px; }
.dx-area-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-area-e { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dx-areas li.is-now { color: var(--tx); border-color: rgba(110, 164, 255, 0.5); background: rgba(61, 123, 255, 0.1); }
.dx-areas li.is-done { color: var(--tx-2); border-color: rgba(61, 220, 151, 0.28); }
.dx-areas li.is-done .dx-ic { color: var(--ok); }
.dx-areas li.is-done::after { content: "✓"; margin-left: auto; font-size: 11px; color: var(--ok); }
.dx[data-fase="inicio"] .dx-areas li { opacity: 0.8; }

/* Escenario y transición entre pantallas */
.dx-stage { position: relative; padding: 26px 26px 26px; min-height: 470px; transition: opacity 0.26s var(--ease), transform 0.3s var(--out); }
.dx-stage.is-out { opacity: 0; transform: translateX(-18px); }
.dx-stage.is-out.is-back { transform: translateX(18px); }
.dx-stage.is-in { opacity: 0; transform: translateX(18px); transition: none; }
.dx-h { font-size: clamp(22px, 2.2vw, 30px); line-height: 1.18; letter-spacing: -0.03em; font-weight: 560; outline: none; text-wrap: balance; }
.dx-sub { font-size: 17px; color: var(--tx-2); margin-top: 8px; }
.dx-cat { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acc-2); margin-bottom: 14px; }
.dx-cat .dx-ic { width: 16px; height: 16px; }

/* Inicio */
.dx-intro { display: grid; gap: 14px; justify-items: start; padding: 10px 0; }
.dx-intro-ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--acc), #2b56c4); box-shadow: 0 16px 40px -14px rgba(61, 123, 255, 0.8); margin-bottom: 6px; }
.dx-intro-ic .dx-ic { width: 26px; height: 26px; }
.dx-intro .dx-h { font-size: clamp(28px, 3vw, 40px); }
.dx-txt { color: var(--tx-2); font-size: 16px; max-width: 48ch; }
.dx-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--tx-2); margin: 4px 0 10px; }
.dx-meta li { display: inline-flex; align-items: center; gap: 7px; }
.dx-meta .dx-ic { width: 16px; height: 16px; color: var(--acc-2); }
.dx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* Pregunta */
.dx-h--q { max-width: 34ch; }
.dx-help { margin-top: 8px; font-size: 14px; color: var(--tx-3); }
.dx-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.dx-op {
  position: relative; display: flex; align-items: flex-start; gap: 13px; text-align: left; padding: 16px 16px; min-height: 84px;
  border-radius: 18px; border: 1px solid var(--stroke-2); background: rgba(255, 255, 255, 0.025); color: var(--tx); cursor: pointer;
  transition: transform 0.35s var(--out), border-color 0.3s, background 0.3s, box-shadow 0.35s, opacity 0.3s;
  animation: dxEntra 0.45s var(--out) both;
}
.dx-op:nth-child(2) { animation-delay: 0.04s; } .dx-op:nth-child(3) { animation-delay: 0.08s; } .dx-op:nth-child(4) { animation-delay: 0.12s; }
.dx-op:nth-child(5) { animation-delay: 0.16s; } .dx-op:nth-child(6) { animation-delay: 0.2s; } .dx-op:nth-child(7) { animation-delay: 0.24s; } .dx-op:nth-child(8) { animation-delay: 0.28s; }
@keyframes dxEntra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dx-op > .dx-ic { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); color: var(--tx-2); transition: all 0.3s; }
.dx-op-tx { display: grid; gap: 4px; flex: 1; min-width: 0; padding-right: 18px; }
.dx-op-tx b { font-size: 15.5px; font-weight: 560; line-height: 1.3; }
.dx-op-tx small { font-size: 13px; color: var(--tx-2); line-height: 1.4; }
.dx-op-k { position: absolute; right: 12px; top: 10px; font-family: var(--mono); font-size: 10.5px; color: var(--tx-3); }
.dx-op-ok { position: absolute; right: 10px; bottom: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--acc); color: #fff; opacity: 0; transform: scale(0.5); transition: all 0.35s var(--out); }
.dx-op:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); transform: translateY(-2px); }
.dx-op:hover > .dx-ic { color: var(--tx); }
.dx-op:focus-visible { outline: 2px solid var(--acc-2); outline-offset: 2px; }
.dx-op.is-sel { border-color: var(--acc-2); background: rgba(61, 123, 255, 0.14); box-shadow: 0 0 0 4px rgba(61, 123, 255, 0.12); }
.dx-op.is-sel > .dx-ic { background: var(--acc); color: #fff; }
.dx-op.is-sel .dx-op-ok { opacity: 1; transform: none; }
.dx-op.is-sel .dx-op-k { opacity: 0; }
.dx-op.is-dim { opacity: 0.45; }
.dx-ops--multi { grid-template-columns: repeat(4, 1fr); }
.dx-op--chip { min-height: 0; align-items: center; padding: 12px; }
.dx-op--chip > .dx-ic { width: 32px; height: 32px; padding: 7px; }
.dx-op--chip .dx-op-k { display: none; }
.dx-op--chip .dx-op-ok { top: 50%; bottom: auto; margin-top: -11px; }
.dx-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; }
.dx-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--tx-2); cursor: pointer; font-size: 14.5px; }
.dx-back .dx-ic { width: 17px; height: 17px; }
.dx-back:hover:not([disabled]) { color: var(--tx); border-color: var(--stroke-2); }
.dx-back[disabled] { opacity: 0.35; cursor: default; }
.dx-hint { font-size: 12.5px; color: var(--tx-3); }

/* Resultado */
.dx-res { display: grid; gap: 26px; }
.dx-res-head .dx-h { font-size: clamp(28px, 3vw, 40px); }
.dx-map { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: center; padding: 20px; border-radius: 20px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--stroke); }
.dx-radar { width: 100%; height: auto; overflow: visible; }
.dx-rg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 1; }
.dx-rx { stroke: rgba(255, 255, 255, 0.07); }
.dx-rf { fill: rgba(61, 123, 255, 0.28); stroke: var(--acc-2); stroke-width: 2; stroke-linejoin: round; }
.dx-rp { fill: #fff; stroke: var(--acc); stroke-width: 2; }
.dx-radar text { font-family: var(--f); font-size: 10.5px; fill: var(--tx-2); }
.dx-rshape { transform: scale(0.05); opacity: 0; transition: transform 1.1s var(--out) 0.15s, opacity 0.5s 0.15s; }
.dx.is-mapped .dx-rshape { transform: none; opacity: 1; }
.dx-bars { display: grid; gap: 13px; }
.dx-bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dx-bar-n { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; font-weight: 520; }
.dx-bar-n .dx-ic { width: 16px; height: 16px; color: var(--tx-2); }
.dx-num { font-family: var(--mono); font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.dx-track { height: 8px; margin: 7px 0 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.dx-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--acc), var(--cy)); transform-origin: left; transform: scaleX(0); transition: transform 1.1s var(--out); }
.dx.is-mapped .dx-track i { transform: scaleX(var(--v)); }
.dx-bar-row:nth-child(2) .dx-track i { transition-delay: 0.08s; } .dx-bar-row:nth-child(3) .dx-track i { transition-delay: 0.16s; }
.dx-bar-row:nth-child(4) .dx-track i { transition-delay: 0.24s; } .dx-bar-row:nth-child(5) .dx-track i { transition-delay: 0.32s; }
.dx-lect { font-size: 12px; color: var(--tx-3); }
.is-oportunidad .dx-lect { color: #ffcf6b; }
.is-oportunidad .dx-track i { background: linear-gradient(90deg, #f2a65a, #ffcf6b); }
.is-solido .dx-lect { color: var(--ok); }

.dx-block h4 { font-size: 20px; letter-spacing: -0.02em; font-weight: 560; margin-bottom: 14px; }
.dx-note { color: var(--tx-2); font-size: 15px; margin: -4px 0 12px; }
.dx-opps { display: grid; gap: 10px; }
.dx-opps li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--stroke); background: rgba(255, 255, 255, 0.02); animation: dxEntra 0.5s var(--out) both; animation-delay: 0.5s; }
.dx-opps li:nth-child(2) { animation-delay: 0.62s; } .dx-opps li:nth-child(3) { animation-delay: 0.74s; }
.dx-op-num { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; background: var(--acc); color: #fff; }
.dx-opps b { font-size: 16px; font-weight: 560; }
.dx-opps p { color: var(--tx-2); font-size: 14.5px; margin-top: 2px; }
.dx-rec { padding: 22px; border-radius: 20px; background: linear-gradient(135deg, rgba(61, 123, 255, 0.18), rgba(61, 123, 255, 0.04)); border: 1px solid rgba(110, 164, 255, 0.35); }
.dx-rec-k { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--acc-2); margin-bottom: 10px; }
.dx-rec h4 { font-size: 22px; margin-bottom: 8px; }
.dx-rec p { color: var(--tx-2); font-size: 15.5px; }
.dx-rec-x { margin-top: 8px; color: var(--tx) !important; }
.dx-lavey { display: grid; gap: 14px; justify-items: start; padding: 26px 0 6px; border-top: 1px solid var(--stroke); }
.dx-lavey-h { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.2; letter-spacing: -0.03em; font-weight: 560; }
.dx-lavey > p:not(.dx-lavey-h):not(.dx-wa-note) { color: var(--tx-2); font-size: 15.5px; max-width: 52ch; }
.dx-wa { margin-top: 6px; }
.dx-ic--btn { width: 22px; height: 22px; }
.dx-wa-note { font-size: 12.5px; color: var(--tx-3); }
.dx-lead { padding: 20px; border-radius: 20px; border: 1px solid var(--stroke); background: rgba(255, 255, 255, 0.02); }
.dx-lead-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.dx-lead-head h4 { margin-bottom: 4px; }
.dx-lead-head p { color: var(--tx-2); font-size: 14.5px; }
.dx-form { margin-top: 18px; display: grid; gap: 14px; }
.dx-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dx-f { display: grid; gap: 6px; font-size: 13.5px; color: var(--tx-2); }
.dx-f small { color: var(--tx-3); }
.dx-f input { height: 48px; border-radius: 14px; border: 1px solid var(--stroke-2); background: rgba(255, 255, 255, 0.035); color: var(--tx); padding: 0 14px; font: inherit; font-size: 16px; }
.dx-f input:focus { outline: none; border-color: var(--acc-2); background: rgba(61, 123, 255, 0.06); }
.dx-f input[aria-invalid="true"] { border-color: #ff9aa6; }
.dx-f em, .dx-err { font-style: normal; font-size: 12.5px; color: #ff9aa6; }
.dx-f em:empty, .dx-err:empty { display: none; }
.dx-chk { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--tx-2); cursor: pointer; }
.dx-chk input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--acc); }
.dx-chk a { color: var(--tx); }
.dx-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dx-form-act { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.dx-status { font-size: 14px; color: var(--tx-2); }
.dx-status.is-error { color: #ff9aa6; }
.dx-status a { color: var(--tx); }
.dx-thanks { display: flex; gap: 14px; align-items: flex-start; }
.dx-thanks > .dx-ic { width: 32px; height: 32px; color: var(--ok); }
.dx-thanks h4 { outline: none; margin-bottom: 6px; }
.dx-thanks p { color: var(--tx-2); font-size: 15px; margin-bottom: 14px; }
.dx-again { display: flex; justify-content: center; }
.dx-again .btn-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.dx-again .dx-ic { width: 16px; height: 16px; }

/* Responsive */
@media (max-width: 1100px) {
  .dx-area-n { font-size: 11px; }
}
@media (max-width: 720px) {
  .dx-win { border-radius: 22px; }
  .dx-bar { padding: 13px 16px; }
  .dx-bar span { font-size: 10.5px; letter-spacing: 0.1em; }
  .dx-areas { grid-template-columns: repeat(5, 1fr); padding: 12px 12px 0; gap: 5px; }
  .dx-areas li { justify-content: center; padding: 8px 4px; }
  .dx-area-n { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dx-areas li.is-done::after { display: none; }
  .dx-stage { padding: 20px 16px; min-height: 0; }
  .dx-ops, .dx-ops--multi { grid-template-columns: 1fr; gap: 8px; }
  .dx-ops--multi { grid-template-columns: 1fr 1fr; }
  .dx-op { min-height: 64px; padding: 13px 14px; }
  .dx-op-k { display: none; }
  .dx-hint { display: none; }
  .dx-map { grid-template-columns: 1fr; padding: 16px; }
  .dx-radar { max-width: 280px; margin: 0 auto; }
  .dx-fields { grid-template-columns: 1fr; }
  .dx-wa { width: 100%; white-space: normal; text-align: center; height: auto; min-height: 58px; padding: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .dx-stage, .dx-op, .dx-track i, .dx-rshape, .dx-prog i { transition: none !important; animation: none !important; }
}
