/* Examen diagnóstico (alumno): pantallas dentro de la bienvenida y en ventana propia. Usa los tokens de la app. */
.dx { display: flex; flex-direction: column; gap: 14px; color: var(--text-main, #1e293b); font-family: var(--f-cuerpo, Inter, system-ui, sans-serif); min-width: 0; }
.dx h2 { margin: 0; font: 800 clamp(24px, 3.4vw, 32px)/1.1 var(--f-titulo, Inter, system-ui, sans-serif); letter-spacing: -.02em; color: var(--azul-oscuro, #1e3a5f); }
.dx h2 em { font-style: normal; color: var(--azul, #2563eb); }
.dx h3 { margin: 0 0 8px; font-size: 15px; font-weight: 800; color: var(--azul-oscuro, #1e3a5f); }
.dx p { margin: 0; line-height: 1.5; color: var(--text-2, #475569); font-size: 14.5px; }
.dx b { color: var(--text-main, #1e293b); }
.dx-etiqueta { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 5px 11px; border-radius: 999px; background: var(--azul-suave, #eff6ff); color: var(--azul, #2563eb); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.dx-datos { display: flex; flex-wrap: wrap; gap: 8px; }
.dx-datos span { padding: 6px 12px; border-radius: 12px; background: var(--superficie-2, #f1f5f9); font-size: 13px; font-weight: 700; color: var(--text-2, #475569); }
.dx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 16px; background: linear-gradient(120deg, #1e3a5f, #2563eb); color: #fff; font-family: inherit; font-weight: 800; font-size: 15.5px; line-height: 1; cursor: pointer; box-shadow: 0 10px 24px rgba(37, 99, 235, .32); transition: transform .15s, box-shadow .15s, opacity .15s; }
.dx-btn:hover { transform: translateY(-1px); }
.dx-btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.dx-btn.verde { background: linear-gradient(120deg, #047857, #10b981); box-shadow: 0 10px 24px rgba(5, 150, 105, .32); }
.dx-btn.claro { background: var(--superficie, #fff); color: var(--azul-oscuro, #1e3a5f); border: 1px solid var(--linea, #e2e8f0); box-shadow: none; }
.dx-btn small { display: block; font-size: 12px; font-weight: 600; opacity: .85; margin-top: 3px; }
.dx-btn.doble { flex-direction: column; align-items: flex-start; padding: 12px 20px; min-height: 58px; gap: 0; }
.dx-btn:focus-visible, .dx-link:focus-visible, .dx-op:focus-visible, .dx-punto:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.dx-link { align-self: flex-start; border: 0; background: none; padding: 6px 2px; color: var(--text-3, #64748b); font-family: inherit; font-weight: 700; font-size: 13.5px; line-height: 1.2; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.dx-acciones { display: flex; flex-direction: column; gap: 10px; }
.dx-fila { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.dx-error { color: #b91c1c; font-weight: 700; font-size: 13.5px; min-height: 0; }
.dx-error:empty { display: none; }

/* Pregunta */
.dx-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dx-n { font-size: 13px; font-weight: 800; color: var(--text-3, #64748b); letter-spacing: .02em; text-transform: uppercase; }
.dx-barra { height: 7px; border-radius: 999px; background: var(--linea, #e2e8f0); overflow: hidden; }
.dx-barra i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #0ea5e9); transition: width .3s ease; }
.dx-puntos { display: flex; flex-wrap: wrap; gap: 5px; }
.dx-punto { width: 22px; height: 22px; padding: 0; border-radius: 7px; border: 1px solid var(--linea, #e2e8f0); background: var(--superficie, #fff); color: var(--text-3, #64748b); font-family: inherit; font-weight: 700; font-size: 10.5px; line-height: 1; cursor: pointer; }
.dx-punto.resp { background: var(--azul-suave, #eff6ff); border-color: var(--azul-borde, #bfdbfe); color: var(--azul, #2563eb); }
.dx-punto.actual { background: var(--azul, #2563eb); border-color: var(--azul, #2563eb); color: #fff; }
.dx-caso, .dx-enunciado, .dx-caso { padding: 12px 14px; border-radius: 14px; background: var(--superficie-2, #f1f5f9); font-size: 14.5px; white-space: pre-line; line-height: 1.55; font-weight: 400 !important; color: var(--text-main, #1e293b); }
.dx-caso * { font-weight: 400 !important; }
.dx-enunciado { font-size: 16px; line-height: 1.6; font-weight: 400; color: var(--text-main, #1e293b); }
.dx-ops { display: flex; flex-direction: column; gap: 9px; }
.dx-op { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 12px 14px; border: 1.5px solid var(--linea, #e2e8f0); border-radius: 14px; background: var(--superficie, #fff); text-align: left; font-family: inherit; font-weight: 500; font-size: 15px; line-height: 1.45; color: var(--text-main, #1e293b); cursor: pointer; transition: border-color .15s, background .15s; }
.dx-op:hover { border-color: var(--azul-borde, #bfdbfe); }
.dx-op b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--superficie-2, #f1f5f9); color: var(--azul-oscuro, #1e3a5f); font-size: 13px; }
.dx-op.sel { border-color: var(--azul, #2563eb); background: var(--azul-suave, #eff6ff); }
.dx-op.sel b { background: var(--azul, #2563eb); color: #fff; }
.dx-nav { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 4px; }
.dx-nav .dx-btn { flex: 1; }
.dx-nav .dx-btn.claro { flex: 0 0 auto; }

/* Resultado */
.dx-grande { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.dx-grande strong { font: 800 clamp(48px, 9vw, 64px)/1 var(--f-titulo, Inter, system-ui, sans-serif); color: var(--azul-oscuro, #1e3a5f); letter-spacing: -.03em; }
.dx-grande span { font-size: 15px; font-weight: 700; color: var(--text-3, #64748b); }
.dx-orient { padding: 10px 12px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px; line-height: 1.45; }
.dx-lista { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.dx-nivel { padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.dx-nivel.solido { background: #d1fae5; color: #047857; }
.dx-nivel.intermedio { background: #fef3c7; color: #92400e; }
.dx-nivel.reforzar { background: #fee2e2; color: #b91c1c; }
.dx-bloom { display: flex; flex-direction: column; gap: 12px; }
.dx-bloom-f { display: grid; gap: 6px; }
.dx-bloom-f .cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; }
.dx-bloom-f .cab span { color: var(--text-3, #64748b); font-weight: 700; }
.dx-bloom-f .pista { height: 8px; border-radius: 999px; background: var(--linea, #e2e8f0); overflow: hidden; }
.dx-bloom-f .pista i { display: block; height: 100%; border-radius: inherit; background: #2563eb; }
.dx-bloom-f .pista i.solido { background: #10b981; }
.dx-bloom-f .pista i.intermedio { background: #f59e0b; }
.dx-bloom-f .pista i.reforzar { background: #ef4444; }
.dx-bloom-f p { font-size: 13.5px; }
.dx-bloom-f.foco .cab { color: var(--azul-oscuro, #1e3a5f); }

/* Ventana propia (usuarios con cuenta) */
.dx-overlay { position: fixed; inset: 0; z-index: 12400; display: grid; place-items: center; padding: 18px; background: rgba(15, 23, 42, .55); overflow: auto; }
.dx-ventana { width: min(960px, 100%); max-height: calc(100dvh - 36px); overflow: auto; padding: clamp(18px, 3vw, 30px); border-radius: 26px; background: var(--superficie, #fff); box-shadow: 0 30px 80px rgba(15, 23, 42, .35); position: relative; }
.dx-cerrar { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 12px; border: 1px solid var(--linea, #e2e8f0); background: var(--superficie, #fff); color: var(--text-2, #475569); font-size: 20px; line-height: 1; cursor: pointer; }
@media (max-width: 640px) { .dx-overlay { padding: 0; } .dx-ventana { max-height: 100dvh; min-height: 100dvh; border-radius: 0; } }

/* Invitación (Mi progreso y Simuladores) */
.dx-invita { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--azul-borde, #bfdbfe); border-radius: 18px; background: var(--azul-suave, #eff6ff); }
.dx-invita[hidden] { display: none; }
.dx-invita .txt { flex: 1 1 260px; min-width: 0; }
.dx-invita .txt b { display: block; font-size: 15px; color: var(--azul-oscuro, #1e3a5f); }
.dx-invita .txt span { font-size: 13.5px; color: var(--text-2, #475569); line-height: 1.45; }
.dx-invita .dx-btn { min-height: 42px; font-size: 14px; box-shadow: none; }

/* Bienvenida: durante el examen se oculta la ilustración y la columna usa todo el ancho */
.bv-caja.bv-examen { grid-template-columns: minmax(0, 1fr); width: min(1040px, 100%); }
.bv-caja.bv-examen .bv-izq { padding: clamp(22px, 3.2vw, 38px) clamp(22px, 5vw, 64px); }
.bv-caja.bv-examen .bv-der { display: none; }
.bv-izq .dx h2 { animation: none; }
.bv-opciones-via { display: grid; gap: 10px; }

/* Resultado (mismo orden visual que el del simulador) */
.dx-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; padding: clamp(14px, 2.4vw, 22px); border: 1px solid var(--linea, #e2e8f0); border-radius: 22px; background: var(--superficie, #fff); }
.dx-aro { position: relative; flex: none; width: clamp(116px, 22vw, 150px); aspect-ratio: 1; }
.dx-aro svg { width: 100%; height: 100%; display: block; }
.dx-aro circle { fill: none; stroke-width: 9; }
.dx-aro .fondo { stroke: var(--linea, #e2e8f0); }
.dx-aro .valor { stroke-linecap: round; stroke: #2563eb; transition: stroke-dasharray .6s ease; }
.dx-aro.solido .valor { stroke: #10b981; } .dx-aro.intermedio .valor { stroke: #f59e0b; } .dx-aro.reforzar .valor { stroke: #ef4444; }
.dx-aro .v { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.05; }
.dx-aro .v b { font: 800 clamp(30px, 6vw, 40px)/1 var(--f-titulo, Inter, system-ui, sans-serif); color: var(--azul-oscuro, #1e3a5f); }
.dx-aro .v span { font-size: 12.5px; font-weight: 700; color: var(--text-3, #64748b); margin-top: 3px; }
.dx-hero-info { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.dx-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.dx-mini div { padding: 8px 10px; border-radius: 12px; background: var(--superficie-2, #f1f5f9); }
.dx-mini dt { font-size: 11.5px; font-weight: 700; color: var(--text-3, #64748b); }
.dx-mini dd { margin: 2px 0 0; font: 800 20px/1.1 var(--f-titulo, Inter, system-ui, sans-serif); color: var(--text-main, #1e293b); }
.dx-mini dd.ok { color: #059669; } .dx-mini dd.mal { color: #dc2626; }
.dx-res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.dx-tarj { padding: clamp(14px, 2.2vw, 20px); border: 1px solid var(--linea, #e2e8f0); border-radius: 22px; background: var(--superficie, #fff); min-width: 0; }
.dx-tarj .sub { font-size: 13px; color: var(--text-3, #64748b); margin: -4px 0 12px; }
.dx-area { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--linea, #e2e8f0); }
.dx-area:last-child { border-bottom: 0; }
.dx-area .num { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--azul-oscuro, #1e3a5f); color: #fff; font-size: 12.5px; font-weight: 800; }
.dx-area .med { min-width: 0; display: grid; gap: 6px; }
.dx-area .t { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.dx-area .t b { font-size: 14.5px; }
.dx-area .pista { height: 8px; border-radius: 999px; background: var(--linea, #e2e8f0); overflow: hidden; }
.dx-area .pista i { display: block; height: 100%; border-radius: inherit; background: #2563eb; }
.dx-area.solido .pista i { background: #10b981; } .dx-area.intermedio .pista i { background: #f59e0b; } .dx-area.reforzar .pista i { background: #ef4444; }
.dx-area small { font-size: 12.5px; font-weight: 600; color: var(--text-3, #64748b); }
.dx-lista { margin: 0; padding: 0; list-style: none; display: block; }
.dx-acc-res { padding-top: 2px; }
.dx-revision { display: flex; flex-direction: column; gap: 12px; }
.dx-revision h3 { margin: 0; }
.dx-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.dx-seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--linea, #e2e8f0); background: var(--superficie, #fff); color: var(--text-2, #475569); font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; }
.dx-seg button i { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--superficie-2, #f1f5f9); }
.dx-seg button.on { background: var(--azul-oscuro, #1e3a5f); border-color: var(--azul-oscuro, #1e3a5f); color: #fff; }
.dx-seg button.on i { background: rgba(255, 255, 255, .22); color: #fff; }
.dx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.dx-tile { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; border: 1.5px solid; font-family: inherit; font-weight: 800; font-size: 15px; cursor: pointer; transition: transform .12s ease; }
.dx-tile:hover { transform: translateY(-2px); }
.dx-tile svg { position: absolute; right: 5px; bottom: 5px; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dx-tile.ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.dx-tile.mal { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.dx-leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-3, #64748b); font-weight: 600; }
.dx-leyenda span { display: inline-flex; align-items: center; gap: 5px; }
.dx-leyenda svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.dx-leyenda .ok { color: #059669; } .dx-leyenda .mal { color: #dc2626; }
.dx-tile:focus-visible, .dx-seg button:focus-visible, .dx-rev-m button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Revisión de una pregunta (ventana) */
.dx-rev-fondo { position: fixed; inset: 0; z-index: 12700; display: grid; place-items: center; padding: 18px; background: rgba(15, 23, 42, .6); }
.dx-rev-m { width: min(760px, 100%); max-height: calc(100dvh - 36px); display: flex; flex-direction: column; border-radius: 24px; background: var(--superficie, #fff); color: var(--text-main, #1e293b); box-shadow: 0 30px 80px rgba(2, 6, 23, .45); overflow: hidden; font-family: var(--f-cuerpo, Inter, system-ui, sans-serif); }
.dx-rev-m header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--linea, #e2e8f0); }
.dx-rev-m .t { min-width: 0; display: grid; }
.dx-rev-m .t b { font-size: 16px; } .dx-rev-m .t small { color: var(--text-3, #64748b); font-weight: 600; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-rev-m .acc { display: flex; gap: 6px; flex: none; }
.dx-rev-m .acc button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--linea, #e2e8f0); background: var(--superficie, #fff); color: var(--azul, #2563eb); font-size: 18px; font-weight: 800; cursor: pointer; }
.dx-rev-m .acc button:disabled { opacity: .35; cursor: default; }
.dx-rev-c { padding: 16px 18px 20px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.dx-estado { padding: 9px 12px; border-radius: 12px; font-weight: 800; font-size: 13.5px; }
.dx-estado.ok { background: #d1fae5; color: #065f46; } .dx-estado.mal { background: #fee2e2; color: #991b1b; }
.dx-ops-r { display: flex; flex-direction: column; gap: 8px; }
.dx-opr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 12px; border: 1.5px solid var(--linea, #e2e8f0); border-radius: 14px; font-size: 14.5px; line-height: 1.45; }
.dx-opr b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--superficie-2, #f1f5f9); color: var(--azul-oscuro, #1e3a5f); font-size: 13px; }
.dx-opr em { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .7); white-space: nowrap; }
.dx-opr.ok { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; } .dx-opr.ok b { background: #10b981; color: #fff; }
.dx-opr.mal { background: #fef2f2; border-color: #fca5a5; color: #991b1b; } .dx-opr.mal b { background: #ef4444; color: #fff; }
.dx-fb { padding: 12px 14px; border-radius: 14px; background: var(--superficie-2, #f1f5f9); border-left: 4px solid #94a3b8; }
.dx-fb.ok { border-left-color: #10b981; } .dx-fb.mal { border-left-color: #ef4444; }
.dx-fb b { display: block; margin-bottom: 4px; font-size: 13.5px; }
.dx-fb p { font-size: 14px; line-height: 1.6; color: var(--text-main, #1e293b); }
@media (max-width: 640px) {
    .dx-rev-fondo { padding: 0; } .dx-rev-m { max-height: 100dvh; height: 100dvh; border-radius: 0; }
    .dx-opr { grid-template-columns: 28px minmax(0, 1fr); } .dx-opr em { grid-column: 2; justify-self: start; }
    .dx-tiles { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
    .dx-mini { gap: 6px; } .dx-hero { justify-content: center; text-align: center; } .dx-hero-info { text-align: left; }
}
