/* Evaluaciones interactivas (/evaluaciones/<evaluación>/): misma maqueta que las prácticas (css/practice-workbench.css)
   y los criterios de desarrollo/docs/guia-estilo.md. Naranja = destino u opción, azul = selección,
   turquesa = acierto. Las zonas de respuesta no se ven ni cambian el cursor: no revelan la solución. */

.assess-run .scene__labels { display: none; }

/* ---------- Modo test: se distingue de las prácticas ---------- */
/* Alfombrilla del mismo color que la de las prácticas (css/practice-workbench.css), con puntos en vez de cuadrícula. */
.assess-run .workbench::before { background-image: radial-gradient(#a5ced440 1.5px, transparent 1.9px); background-size: 18px 18px; }
/* Etiqueta «Test» (cabecera y panel). */
.as-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; background: #F2B33D; color: #17324D; font-size: .62em; font-weight: 800; letter-spacing: .08em; line-height: 1.5; text-transform: uppercase; vertical-align: .2em; }
.topbar__practice h1 .as-badge { margin-right: 4px; }
/* Cabecera del panel: número y título de la pregunta y puntos acumulados. Debajo, las rayitas de avance de las
   prácticas (.panel__head::before de css/practice-workbench.css), una por pregunta. */
.assess-run .panel__head.as-head { padding: 12px 16px 16px; }
/* Dos filas: arriba la etiqueta y los puntos; debajo, el título a todo el ancho (los largos pasan a otra línea
   sin empujar nada). */
.as-head__top { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "badge value points" "title title title"; align-items: center; gap: 6px 10px; margin: 0; }
.as-head__top .as-badge { grid-area: badge; justify-self: start; font-size: 11px; vertical-align: 0; }
/* En escritorio la etiqueta «Test» ya está en el título de la barra superior: se quita del panel y deja sitio a los
   puntos. Hasta 960 px ese título no se ve y la etiqueta se queda aquí. */
@media (min-width: 961px) { .as-head__top .as-badge { display: none; } .as-head__top { grid-template-columns: 1fr auto; grid-template-areas: "value points" "title title"; } }
.as-head__top .step__title { grid-area: title; min-width: 0; margin: 0; color: #000; font-size: 18px; font-weight: 700; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; outline: none; }
.as-head__points { grid-area: points; position: relative; margin: 0; color: var(--navy); font-size: 14px; font-weight: 800; white-space: nowrap; }
/* Al acertar: «+0,5» sube y se desvanece, y el total late. */
.as-head__points.is-bump { animation: as-bump .5s ease-out; }
.as-gain { position: absolute; right: 0; top: -2px; color: #0a8a9a; font-size: 15px; font-weight: 800; pointer-events: none; opacity: 0; animation: as-gain 1.3s ease-out; }
@keyframes as-bump { 40% { transform: scale(1.18); color: #0a8a9a; } }
@keyframes as-gain { 0% { opacity: 0; transform: translateY(8px); } 20% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-22px); } }
/* Desplegable «Qué incluye el test» de la presentación. */
.as-more p { margin: 8px 0 0; }
.as-more__list { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 22px; }
.as-more__list li::marker { color: var(--blue); font-weight: 700; }
.as-more__pts { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #EEF4F8; color: var(--navy); font-size: 12.5px; font-weight: 700; }
/* Aviso de revisión (pregunta ya respondida). */
.as-review { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 10px; background: #EEF4F8; color: var(--navy); font-size: 14px; line-height: 1.45; }
.as-review .icon { flex: none; width: 18px; height: 18px; margin-top: 1px; }

/* ---------- Zonas sobre la placa ---------- */
.as-layer { position: absolute; inset: 0; z-index: 115; pointer-events: none; }
/* Con zonas ocultas, toda la placa tiene el mismo cursor: no se nota dónde hay una respuesta. */
.as-layer.is-answers { pointer-events: auto; cursor: crosshair; }
.as-zone { position: absolute; z-index: 1; translate: -50% -50%; min-width: 40px; min-height: 40px; margin: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: inherit; pointer-events: auto; touch-action: manipulation; }
.as-zone:disabled { cursor: default; }
.as-zone--answer:focus-visible { outline: 3px dashed var(--blue); outline-offset: 2px; background: rgb(var(--blue-rgb) / 12%); }
.as-zone--answer.is-found { outline: 2.5px solid #3CC9D9; background: rgb(60 201 217 / 18%); }
.as-zone--answer.is-answer { outline: 2.5px dashed #3CC9D9; background: rgb(60 201 217 / 14%); }

/* Rótulo de una zona acertada o de la solución (qué es cada cosa). En los soportes, encima del círculo. */
.as-zone[data-tag]::after { content: attr(data-tag); position: absolute; left: 50%; top: 50%; translate: -50% -50%; padding: 2px 7px; border-radius: 6px; background: #17324D; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; pointer-events: none; }
.as-zone--choice[data-tag]::after { top: -4px; translate: -50% -100%; }

/* Destino visible donde se coloca la pieza (respira, como en las prácticas). */
.as-zone--target { border: 2.5px solid #ffb248; background: rgb(255 178 72 / 18%); box-shadow: 0 0 0 5px rgb(255 178 72 / 40%); cursor: pointer; animation: as-breathe 2.4s ease-in-out infinite; }
.as-zone--target:hover, .as-zone--target:focus-visible { background: rgb(255 178 72 / 32%); }
/* Destino que no debe tapar lo que hay debajo (la llave de la ranura de RAM). */
.as-zone--target.as-zone--outline, .as-zone--target.as-zone--outline:hover { background: transparent; }
@keyframes as-breathe { 50% { box-shadow: 0 0 0 5px rgb(255 178 72 / 15%); } }

/* Opciones visibles (ranuras, soportes): todas iguales; la elegida, en azul. */
.as-zone--choice { border: 1.6px solid #ffb248; background: rgb(255 178 72 / 10%); cursor: pointer; }
.as-zone--choice:hover, .as-zone--choice:focus-visible { background: rgb(255 178 72 / 26%); }
.as-zone--choice[aria-pressed="true"] { border: 2.5px solid #8FBBDB; background: rgb(143 187 219 / 38%); box-shadow: 0 0 0 3px rgb(27 84 128 / 55%); }
.as-zone--choice[data-slot]::after { content: attr(data-slot); position: absolute; left: 50%; top: -2px; translate: -50% -100%; padding: 2px 6px; border-radius: 6px; background: #17324D; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.as-zone--choice:not([data-slot]) { border-radius: 50%; }
/* Soportes: sin mínimo táctil, para que no se solapen (el toque en pantallas táctiles se confirma; ver standoff()). */
.as-zone--standoff { min-width: 0; min-height: 0; }
/* Franja táctil que elige el soporte más cercano (standoffBand()); los círculos solo se ven y se usan con teclado. */
.as-band { position: absolute; z-index: 0; pointer-events: auto; touch-action: manipulation; }
.as-layer.has-band .as-zone--standoff { pointer-events: none; }
/* Capa táctil de toda la placa (test de la caja): elige la cabecera más cercana; las zonas solo se usan con teclado. */
.as-band--full { inset: 0; }
.as-layer.has-band .as-zone--answer { pointer-events: none; }
.as-zone--answer.is-marked { outline: 2.5px solid var(--blue); outline-offset: 2px; background: rgb(var(--blue-rgb) / 25%); }
/* Cabeceras candidatas con nombre (`named` en case-assessment.js): recuadro discontinuo blanco y, al pasar el cursor,
   enfocarlas o tocarlas, su serigrafía encima en la etiqueta negra de las prácticas. */
.as-zone--answer.as-zone--named:not(.is-found):not(.is-answer) { outline: 2px dashed rgb(255 255 255 / 80%); outline-offset: 1px; background: rgb(255 255 255 / 10%); }
.as-zone--answer.as-zone--named:not(.is-found):hover { outline-color: #ffb248; background: rgb(255 178 72 / 22%); }
.as-zone--named:not([data-tag]):is(:hover, :focus-visible, .is-marked)::after { content: attr(aria-label); position: absolute; left: 50%; top: -4px; translate: -50% -100%; padding: 2px 7px; border-radius: 6px; background: #17324D; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; pointer-events: none; z-index: 2; }
.as-zone--choice.is-found { border: 2.5px solid #3CC9D9; background: rgb(60 201 217 / 35%); box-shadow: none; }

/* Silueta de la pieza sobre su ranura (preview()): gira con la de la tarjeta. */
.as-preview { position: absolute; z-index: 0; display: block; translate: -50% -50%; opacity: .6; pointer-events: none; rotate: calc(var(--turn, 0deg) + var(--base, 0deg)); transition: rotate .25s ease; filter: drop-shadow(0 4px 8px rgb(0 0 0 / 45%)); }
/* Módulo de muestra al lado de la ranura (no encima): opaco, para que se lea como la pieza. */
.as-preview--side { opacity: 1; }

/* ---------- Placa a todo el ancho y pieza en el panel ---------- */
/* Sin la columna de la mesa de las prácticas: la placa ocupa toda la zona de trabajo. */
/* Las capas del test quedan debajo de los desplegables de la cabecera. */
.assess-run .workbench { --parts-width: 0px; isolation: isolate; }
/* El zoom va en la esquina inferior derecha, sobre la placa: no hace falta reservarle una franja abajo. Mismo margen
   arriba que abajo, para que la placa ocupe el máximo alto. */
.assess-run .workbench .workspace { padding: 6px 12px; }
/* En tablet y móvil la altura de la zona de trabajo sale del ancho (placa 1240 × 1269); sin la franja del zoom ni la
   columna de la mesa, basta con el margen de la alfombrilla (css/practice-workbench.css reserva más). */
@media (max-width: 960px) {
  .assess-run .workbench .workspace { padding: 6px 7px; }
  .assess-run .workbench { height: max(320px, min(calc((100vw - 32px) * 1.024 + 26px), calc(100svh - 70px))); }
}
@media (max-width: 600px) {
  .assess-run .workbench .workspace { padding: 3px 2px; }
  .assess-run .workbench { height: max(320px, min(calc((100vw - 22px) * 1.024 + 15px), calc(100svh - 70px))); }
}
/* Bandeja de la pieza, bajo la instrucción: tarjeta con puntos, del color de la alfombrilla y, debajo, el botón. */
.as-tray { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.as-tray:empty { display: none; }
.as-piece { position: relative; display: grid; justify-items: center; padding: 14px 12px; border: 1px solid #2e5661; border-radius: 14px; background-color: #3e737f; background-image: radial-gradient(#a5ced440 1.5px, transparent 1.9px); background-size: 18px 18px; box-shadow: inset 0 0 0 1px #c2e1e665; }
.as-piece__figure { display: grid; place-items: center; width: 100%; min-height: 120px; margin: 0; }
.as-piece__figure img { display: block; max-width: 78%; max-height: 190px; height: auto; rotate: var(--turn, 0deg); transition: rotate .25s ease; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 40%)); }
/* Módulo de RAM en vertical, como la ranura: así se compara su muesca con la llave de la ranura. */
.as-piece--dimm .as-piece__figure { height: 300px; overflow: hidden; }
.as-piece--dimm .as-piece__figure img { width: 290px; max-width: none; max-height: none; rotate: calc(var(--turn, 0deg) + 90deg); }
.as-turn { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--blue); cursor: pointer; }
.as-turn .icon { width: 22px; height: 22px; }
.as-turn:hover { border-color: var(--blue); background: var(--blue-soft); }
.as-turn:disabled, .as-piece__action .btn:disabled { opacity: .5; cursor: default; }
.as-piece__action { list-style: none; }
.as-piece__action .btn { width: 100%; white-space: normal; }

/* ---------- Panel ---------- */
/* Práctica recomendada: aviso aparte, después de los datos del test y antes del nombre. */
.as-prep { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0; padding: 10px 12px; border: 1px solid #c9dcea; border-left: 4px solid var(--blue); border-radius: 10px; background: #f3f8fc; color: var(--ink); font-size: 14px; line-height: 1.45; }
.as-prep .icon { width: 20px; height: 20px; margin-top: 1px; color: var(--blue); }
.as-prep a { color: var(--blue); font-weight: 600; text-underline-offset: 3px; }
.as-facts { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.as-facts li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 9px; align-items: center; }
.as-facts .icon { width: 20px; height: 20px; color: var(--blue); }
.as-name { display: grid; gap: 6px; }
.as-name label { font-weight: 700; color: var(--navy); }
.as-name input { min-height: 44px; padding: 8px 12px; border: 1px solid #A8B1B7; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.as-name input:focus-visible { outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.as-name input[aria-invalid="true"] { border-color: var(--err); }
.as-name__note { color: var(--muted); font-size: 13px; line-height: 1.45; }
.as-name__error { color: var(--err); font-size: 13.5px; font-weight: 600; }
.as-name .btn { margin-top: 8px; }
.as-instruction { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #000; font-size: 16.5px; font-weight: 700; line-height: 1.45; }
/* La pregunta en negrita y algo mayor (sin llegar al título, 18 px); las opciones y lo demás, en texto normal. */
.as-instruction .btn { font-size: 15px; }
.as-instruction .btn--secondary, .as-instruction .as-chips, .as-instruction small { font-weight: 400; }
.as-answers { display: flex; gap: 8px; margin-top: 12px; }
.as-answers .btn { min-width: 88px; min-height: 44px; }
/* Opciones de texto largo (una por fila). */
.as-choices { display: grid; gap: 8px; margin-top: 12px; }
.as-choices + [data-choice="continue-sequence"] { margin-top: 16px; }
.as-choices .btn[data-answer-correct="true"] { opacity: 1; border-color: #26834b; background: #eaf7ee; color: #185c32; }
.as-choices .btn { min-height: 44px; white-space: normal; text-align: left; font-weight: 400; color: var(--ink); }
.as-actions { display: flex; justify-content: flex-start; }
.as-link { padding: 6px 0; border: 0; background: none; color: var(--muted); font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.as-link:hover { color: var(--blue); }
.as-outcome { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #F4F7F9; }
.as-outcome--2 { border-color: #9EDDE6; background: #E9F8FA; }
.as-outcome--1 { border-color: var(--hint-line); background: var(--hint-soft); }
.as-outcome__points { color: var(--navy); font-size: 22px; font-weight: 800; line-height: 1.2; }
.as-outcome__why { color: var(--muted); font-size: 14px; font-weight: 600; }
.as-outcome__explain { font-size: 14.5px; line-height: 1.55; }
.as-outcome .btn { margin-top: 4px; }

/* ---------- Resultado (pensado para capturarlo y entregarlo) ---------- */
.as-result { padding: 20px 16px 40px; }
.is-result .workbench, .is-result .panel { display: none; }
.is-result .app { display: block; height: auto; min-height: 0; }
.as-result__card { display: grid; gap: 8px; width: min(620px, 100%); margin: 0 auto; padding: 22px 28px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.as-result__brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--navy); font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.as-result__brand img { width: 40px; height: 40px; }
.as-result__name { margin-top: 6px; color: var(--blue); font-size: 26px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.as-result h2 { color: var(--navy); font-size: 18px; outline: none; }
.as-result__date { color: var(--muted); font-size: 14px; }
.as-result__grade { justify-self: center; display: grid; place-items: center; gap: 2px; width: 150px; height: 150px; margin: 4px 0 2px; border: 8px solid #D7E0E5; border-radius: 50%; background: #fff; }
.as-result__grade.is-pass { border-color: #3CC9D9; }
.as-result__value { color: var(--navy); font-size: 58px; font-weight: 800; line-height: 1; }
.as-result__max { color: var(--muted); font-size: 24px; font-weight: 700; }
/* Notas con decimales (7,75): más pequeñas para que quepan en el círculo. */
.as-result__value.is-long { font-size: 42px; letter-spacing: -.02em; }
.as-result__value.is-long + .as-result__max { font-size: 20px; }
.as-result__passed { margin-top: -22px; color: var(--muted); font-size: 12.5px; font-weight: 600; max-width: 130px; line-height: 1.3; }
.as-result__list { display: grid; gap: 5px; margin: 6px 0 0; padding: 0; list-style: none; text-align: left; counter-reset: reto; }
.as-result__list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; counter-increment: reto; }
.as-result__list li span:first-child::before { content: counter(reto) ". "; color: var(--muted); font-weight: 700; }
.as-result__points { flex: none; min-width: 48px; padding: 2px 10px; border-radius: 999px; background: #F1F4F6; color: #45505A; font-weight: 700; text-align: center; }
.as-result__points--2 { background: #E1F7FA; color: #0a5d6b; }
.as-result__points--1 { background: var(--hint-soft); color: var(--hint-ink); }
.as-result__actions { display: grid; gap: 14px; width: 100%; margin: 12px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
.as-result__actions .btn { gap: 8px; min-height: 48px; justify-content: center; white-space: normal; text-align: center; }
.as-result__certificate { display: grid; gap: 8px; }
.as-result__certificate p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); text-align: center; }
.as-result__secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as-result__actions .as-result__next { margin-top: 2px; padding-top: 16px; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; background: transparent; color: var(--blue); }

@media (max-width: 640px) {
  .as-piece__figure { min-height: 96px; }
  .as-piece__figure img { max-height: 130px; }
  .as-piece--dimm .as-piece__figure { height: 230px; }
  .as-piece--dimm .as-piece__figure img { width: 220px; max-height: none; }
  .as-result { padding: 16px 12px 32px; }
  .as-result__card { padding: 20px 16px 22px; }
  .as-result__name { font-size: 22px; }
  .as-result__grade { width: 148px; height: 148px; }
  .as-result__value { font-size: 54px; }
  .as-result__value.is-long { font-size: 40px; }
  .as-result__actions { padding-top: 16px; }
  .as-result__secondary { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .as-zone--target, .as-head__points.is-bump, .as-gain { animation: none; } .as-piece__figure img, .as-preview { transition: none; } }

/* Test de solo preguntas (sin placa): el panel ocupa el centro de la página, en una columna. */
.assess-quiz:not(.is-result) .app { height: auto; min-height: 100vh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "top" "right"; }
.assess-quiz .panel--step { justify-self: center; align-self: start; width: min(680px, 100%); margin-top: 16px; }
.assess-quiz .as-head__top .as-badge { display: none; }
.assess-quiz .as-head__top { grid-template-columns: 1fr auto; grid-template-areas: "value points" "title title"; }
.as-order .btn:disabled { opacity: 1; border-color: #3CC9D9; background: #E1F7FA; color: var(--ink); }
.as-order__n { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%; background: #0a8a9a; color: #fff; font-size: 13px; font-weight: 800; }
.as-more-btn { display: block; width: 100%; font: inherit; font-size: 14px; font-weight: 600; color: var(--blue); text-align: left; cursor: pointer; }
/* Flecha dibujada con bordes (el carácter «▸» se veía diminuto), como en las secciones desplegables de las prácticas. */
.as-more-btn::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 9px 1px 2px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg); vertical-align: middle; }
.as-info { width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: hidden; }
.as-info[open] { display: flex; flex-direction: column; }
.as-info::backdrop { background: rgb(var(--navy-rgb) / 45%); }
.as-info__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.as-info__head h2 { margin: 0; color: var(--navy); font-size: 18px; }
.as-info__close { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: #000; cursor: pointer; }
.as-info__close:hover { background: var(--blue-soft); color: var(--blue); }
.as-info__close .icon { width: 20px; height: 20px; }
.as-info__body { overflow-y: auto; padding: 4px 20px 20px; font-size: 14.5px; line-height: 1.5; }
.as-info__body p { margin: 10px 0 0; }
.as-info__body .as-more__list { margin-top: 10px; }
.as-info__body h3 { margin: 16px 0 6px; color: var(--navy); font-size: 15px; }
.as-info__body ul { margin: 0; padding-left: 22px; }
.as-info__body a { color: var(--blue); font-weight: 600; }

/* ---------- Test de la caja (js/assess/case-assessment.js) ---------- */
/* Las cabeceras del borde inferior quedan junto al control de zoom: aquí se le reserva su franja. Las zonas de
   respuesta no crecen hasta el mínimo táctil para no taparse entre cabeceras vecinas (se puede acercar con el zoom). */
.assess-case .workbench .workspace { padding-bottom: 46px; }
@media (max-width: 960px) { .assess-case .workbench .workspace { padding-bottom: 44px; } }
@media (max-width: 600px) { .assess-case .workbench .workspace { padding-bottom: 40px; } }
.assess-case .as-zone--answer { min-width: 0; min-height: 0; }
/* Escenario para fotos y esquemas: ocupa la alfombrilla en lugar de la placa. */
.as-stage { position: absolute; inset: var(--mat-inset); z-index: 120; display: grid; place-items: center; padding: 18px; overflow: auto; }
.as-stage[hidden] { display: none; }
.workbench.has-stage .workspace, .workbench.has-stage .zoom { visibility: hidden; }
.as-photo { position: absolute; inset: 18px; display: flex; align-items: center; justify-content: center; margin: 0; }
.as-photo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgb(0 0 0 / 35%)); }
/* Borde de puertos traseros: tira muy ancha; a todo el ancho los puertos se veían desproporcionados. */
.as-photo--io img { max-width: 55%; }
@media (max-width: 600px) { .as-photo--io img { max-width: 85%; } }
/* Cables para llevar a su cabecera: se elige uno (azul) y se pulsa la placa; los colocados quedan en turquesa. */
.as-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.as-chip { min-height: 44px; padding: 8px 14px; border: 1.5px solid #ffb248; border-radius: 999px; background: #FFF7EC; color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.as-chip:hover { background: #FFEBCF; }
.as-chip[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 3px rgb(27 84 128 / 25%); }
.as-chip.is-done { border-color: #3CC9D9; background: #E1F7FA; color: #06343C; cursor: default; }
.as-chip b { font-weight: 800; }
.as-chip:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
/* Foto pequeña dentro de la instrucción (conector del ventilador). */
.as-inline-photo { float: right; width: 92px; margin: 0 0 6px 12px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #F4F7F9; }
.as-inline-photo img { display: block; width: 100%; height: auto; }
/* Varias respuestas: casillas que se marcan antes de comprobar. */
.as-checks .as-check { position: relative; padding-left: 42px; }
.as-checks .as-check::before { content: ""; position: absolute; left: 14px; top: 50%; width: 16px; height: 16px; translate: 0 -50%; border: 2px solid #8A949C; border-radius: 4px; background: #fff; }
.as-checks .as-check[aria-pressed="true"] { border-color: var(--blue); background: #EEF4F8; }
.as-checks .as-check[aria-pressed="true"]::before { border-color: var(--blue); background: var(--blue) no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E"); }
.as-check-go { margin-top: 12px; }
.as-answers--wrap { flex-wrap: wrap; }
/* Separadores vistos a través de la placa (placa semitransparente). */
.scene.as-see-through > *:not(.as-layer) { opacity: .6; }
/* El separador se dibuja pequeño (::before) para que alrededor se vea el aro del agujero de la placa, si lo hay; el
   botón conserva el tamaño táctil. */
.as-zone--choice.as-standoff { border: 0; border-radius: 50%; background: transparent; box-shadow: none; }
.as-zone--choice.as-standoff::before { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; translate: -50% -50%; border: 2px solid #6b5216; border-radius: 50%; background: radial-gradient(circle, #FFF2C2 0 30%, #C9A23E 34% 100%); box-shadow: 0 1px 3px rgb(0 0 0 / 45%); }
.as-zone--choice.as-standoff:hover, .as-zone--choice.as-standoff:focus-visible { background: rgb(255 178 72 / 30%); }
.as-zone--choice.as-standoff.is-found { background: rgb(60 201 217 / 35%); }
/* Esquema de la fuente en la caja. */
.as-psu { width: min(640px, 100%); height: auto; }
.as-psu__case { fill: #F4F7F9; stroke: #17324D; stroke-width: 3; }
.as-psu__foot { fill: #17324D; }
.as-psu__bezel { fill: #C9D3DB; stroke: #17324D; stroke-width: 1.5; }
.as-psu__button { fill: #fff; stroke: #17324D; stroke-width: 2; }
.as-psu__part { fill: #C9D3DB; stroke: #8A949C; }
.as-psu__cooler { fill: #8A949C; stroke: #45505A; stroke-width: 2; }
.as-psu__ram { fill: #45505A; }
.as-psu__gpu { fill: #2B3540; }
.as-psu__gpufan { fill: #45505A; stroke: #8A949C; stroke-width: 2; }
.as-psu__shroud { fill: #E3E9EE; }
.as-psu__shroudline { stroke: #8A949C; stroke-width: 2; }
.as-psu__vent { fill: #17324D; }
.as-psu__board { fill: #DCE4EA; stroke: #8A949C; stroke-dasharray: 6 5; }
.as-psu__box { fill: #45505A; stroke: #17324D; stroke-width: 2; }
.as-psu__fan { fill: #F2B33D; }
.as-psu__hub { fill: #17324D; }
.as-psu__inlet { fill: #3CC9D9; stroke: #0a5d6b; }
.as-psu__unit { transition: transform .3s ease; }
.as-psu__label { fill: #17324D; font: 700 15px system-ui, sans-serif; }
.as-psu__label--dim { fill: #45505A; font-weight: 600; }
.as-psu__label--on { fill: #fff; }
.as-psu__label--out { fill: #fff; }
.as-psu__keybox { fill: #F4F7F9; stroke: #17324D; stroke-width: 1.5; }
.as-psu__legend { fill: #17324D; font: 600 13px system-ui, sans-serif; }
@media (prefers-reduced-motion: reduce) { .as-psu__unit { transition: none; } }
/* En móvil el esquema se reduce a la mitad: textos más grandes en unidades del dibujo para que sigan leyéndose. */
@media (max-width: 600px) { .as-psu__label { font-size: 21px; } .as-psu__legend { font-size: 16px; } }
@media (max-width: 640px) { .as-inline-photo { width: 72px; } .as-stage { padding: 8px; } }

/* ---------- Test de pasta térmica: fotos dentro del panel (js/assess/paste-assessment.js) ---------- */
/* Foto antes de la pregunta (procesador o base del disipador). */
.as-figures { display: flex; justify-content: center; margin: 0 0 12px; padding: 10px; border-radius: 10px; background: #F4F7F9; }
.as-figures img { display: block; max-width: 100%; max-height: 180px; height: auto; }
/* Opciones con imagen: dos por fila, la foto encima del texto. */
.as-choices--images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.as-choices--images .btn { display: grid; justify-items: center; gap: 8px; padding: 10px; text-align: center; }
/* Cantidad de pasta dibujada sobre la foto del procesador (viewBox de su foto, 332 × 410). */
.as-dose { position: relative; display: block; width: 140px; max-width: 100%; aspect-ratio: 332 / 410; }
.as-dose img, .as-dose svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.as-dose__paste { fill: #7D868D; stroke: #4F575D; stroke-width: 3; }
/* Disipador visto desde arriba con sus cuatro anclajes (centros en su foto de 1334 × 1179 px). */
.as-cooler { position: relative; display: block; width: min(320px, 100%); margin: 12px auto 0; }
.as-cooler img { display: block; width: 100%; height: auto; }
.as-pin { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; translate: -50% -50%; border: 3px solid #ffb248; border-radius: 50%; background: rgb(255 178 72 / 25%); color: #fff; font: 800 18px system-ui, sans-serif; cursor: pointer; }
.as-pin:hover, .as-pin:focus-visible { background: rgb(255 178 72 / 50%); outline: none; }
.as-pin.is-done { border-color: #3CC9D9; background: #0a8a9a; cursor: default; }
.as-pin--tl { left: 10.57%; top: 7.97%; }
.as-pin--tr { left: 72.86%; top: 7.72%; }
.as-pin--bl { left: 8.77%; top: 72.01%; }
.as-pin--br { left: 78.56%; top: 72.09%; }

/* Orden correcto de una pregunta de ordenar, al terminarla (assess-core.js: `solution`). */
.as-solution { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: paso; }
.as-solution li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid #9EDDE6; border-radius: 10px; background: #E1F7FA; font-size: 14px; line-height: 1.4; counter-increment: paso; }
.as-solution li::before { content: counter(paso); display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: #0a8a9a; color: #fff; font-size: 13px; font-weight: 800; }
/* «Ver solución» dentro de la propia pregunta: respuesta correcta en el mismo color que en la placa. */
.as-instruction--answer .is-answer,.as-instruction--answer .as-chip.is-done { border-color: #3CC9D9; background: #E1F7FA; color: #06343C; opacity: 1; box-shadow: 0 0 0 2px rgb(60 201 217 / 35%); }
.as-instruction--answer button:disabled { cursor: default; }
.as-instruction--answer .btn:disabled:not(.is-answer) { opacity: .5; }
/* Pregunta 1 del test de la caja: las tres piezas que se van a montar. La placa ocupa la columna izquierda. */
.as-photo--parts { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr 1fr; gap: 4% 6%; padding: 2%; }
.as-photo--parts img { width: 100%; height: 100%; min-height: 0; max-width: none; max-height: none; object-fit: contain; }
.as-photo--parts .as-photo__board { grid-row: span 2; }

/* Respuesta acertada a la vista antes de pasar al siguiente paso (secuencias de js/assess/case-assessment.js) y marcas
   turquesa de la escena: parpadean unas veces y se quedan fijas. */
.as-held .btn { pointer-events: none; }
.as-held .is-answer, .as-held .as-chip.is-done { border-color: #3CC9D9; background: #E1F7FA; color: #06343C; box-shadow: 0 0 0 2px rgb(60 201 217 / 35%); }
@keyframes as-blink { 50% { opacity: .2; } }
.as-layer.is-held .as-zone--answer.is-found { animation: as-blink .7s ease-in-out 3; }
.as-photo__frame { position: relative; display: inline-block; height: 100%; }
.as-photo--bracket img { height: 100%; width: auto; max-width: none; }
.as-photo--bracket .as-mark { position: absolute; top: 10%; width: 44%; height: 88%; border: 3px solid #3CC9D9; border-radius: 10px; background: rgb(60 201 217 / 18%); opacity: 0; }
.as-mark--slot1 { left: 5%; }
.as-mark--slot2 { left: 51%; }
.as-photo--bracket .as-mark::after { content: attr(data-tag); position: absolute; left: 50%; top: -14px; translate: -50% 0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #17324D; color: #fff; font: 700 14px/1 system-ui, sans-serif; font-style: normal; }
.as-photo--bracket.is-marked .as-mark { opacity: 1; animation: as-blink .7s ease-in-out 4; }
@media (prefers-reduced-motion: reduce) { .as-layer.is-held .as-zone--answer.is-found, .as-photo--bracket.is-marked .as-mark { animation: none; } }

/* Valor de la pregunta, distinto de la puntuación acumulada. */
.as-head__value{grid-area:value;justify-self:start;display:inline-flex;align-items:center;margin:0;padding:5px 9px;border-radius:7px;background:var(--blue-soft);color:var(--navy);font-size:13px;font-weight:700;line-height:1.45}
.as-head__part{margin:8px 0 0;color:var(--navy);font-size:13px;font-weight:500;line-height:1.45}


/* Test ya hecho (assess-core.js): aviso con la mejor nota y enlace al último resultado, en la presentación. */
.as-prev { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 12px 14px; border: 1px solid #3CC9D9; border-radius: 10px; background: #E1F7FA; color: #06343C; font-size: 14.5px; line-height: 1.45; }
.as-prev > .icon { flex: none; width: 20px; height: 20px; margin-top: 1px; color: #0a8a9a; }
.as-prev p { margin: 0; }
.as-prev__view { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.as-prev__view .icon { width: 16px; height: 16px; }
.as-result__saved-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; text-align: center; }
