/* TEST AQUÍ MISMO (08/10/2026) · el test del temario se hace en pantalla, con corrección al instante */

/* sobre la página: el test queda enmarcado y con su botón, sin tapar el texto */
.pgwrap { position: relative; }
.ta-zona { position: absolute; left: 4.5%; right: 4.5%; z-index: 6; pointer-events: none; border-radius: 10px;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--gold, #12805C) 55%, transparent); background: color-mix(in srgb, var(--gold, #12805C) 4%, transparent); }
.ta-boton { pointer-events: auto; position: sticky; top: 10px; float: right; margin: 10px 10px 0 0; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px 10px 12px; border: 0; border-radius: 999px; cursor: pointer; text-align: left; color: #fff;
  background: linear-gradient(180deg, #17865f, #0f6a4b); box-shadow: 0 12px 28px -12px rgba(10, 60, 40, .7), inset 0 1px 0 rgba(255,255,255,.25);
  font: 500 13px/1.2 var(--f-body, Inter, system-ui, sans-serif); transition: transform .18s, box-shadow .2s; animation: taEntra .45s cubic-bezier(.2,.9,.3,1.2) both; }
.ta-boton:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(10, 60, 40, .8), inset 0 1px 0 rgba(255,255,255,.25); }
.ta-boton:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ta-boton svg { width: 20px; height: 20px; flex: none; padding: 5px; border-radius: 50%; background: rgba(255,255,255,.18); box-sizing: content-box; }
.ta-boton b { display: block; font-size: 14.5px; font-weight: 700; }
.ta-boton small { display: block; font-size: 11.5px; opacity: .85; margin-top: 1px; }
@keyframes taEntra { from { opacity: 0; transform: translateY(6px) scale(.96); } to { opacity: 1; transform: none; } }
.ob-simple #rd.sm-con-herr .ta-zona { display: none; } /* anotando, el botón no estorba */

/* la capa del test */
.ta-capa { position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: center; align-items: flex-end;
  background: rgba(12, 22, 18, .42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s; }
.ta-capa.on { opacity: 1; }
.ta-hoja { width: min(780px, 100%); height: min(94dvh, 100%); display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg, #F6F7F5); border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px -20px rgba(0,0,0,.45);
  transform: translateY(30px); transition: transform .28s cubic-bezier(.2,.9,.3,1); }
.ta-capa.on .ta-hoja { transform: none; }
@media (min-width: 820px) { .ta-capa { align-items: center; } .ta-hoja { border-radius: 22px; height: min(90dvh, 980px); } }

.ta-cab { display: flex; align-items: center; gap: 12px; padding: 14px 16px 12px; background: var(--vidrio-fuerte, rgba(255,255,255,.9));
  border-bottom: 1px solid var(--borde, rgba(0,0,0,.07)); }
.ta-tit { flex: 1; min-width: 0; }
.ta-tit small { display: block; font: 600 11px var(--f-body, Inter, sans-serif); letter-spacing: .06em; text-transform: uppercase; color: var(--gold, #12805C); }
.ta-tit b { display: block; font: 700 15px/1.25 var(--f-body, Inter, sans-serif); color: var(--text, #17201C); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ta-marcador { display: flex; gap: 6px; font: 700 13px var(--f-body, Inter, sans-serif); color: var(--muted, #5b6560); }
.ta-marcador span { min-width: 28px; padding: 4px 8px; border-radius: 999px; background: rgba(23,32,28,.06); text-align: center; }
.ta-marcador .ok { color: #1f7a3a; background: #e3f3e6; }
.ta-marcador .ko { color: #b42323; background: #fbe6e6; }
.ta-x { all: unset; cursor: pointer; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; font-size: 15px; color: var(--text, #17201C); background: rgba(23,32,28,.06); }
.ta-x:hover { background: rgba(23,32,28,.12); }
.ta-x:focus-visible { outline: 2px solid var(--gold, #12805C); }
.ta-barra { height: 3px; background: rgba(23,32,28,.06); }
.ta-barra i { display: block; height: 100%; background: var(--gold, #12805C); transition: width .35s; }

.ta-cuerpo { flex: 1; overflow-y: auto; padding: 14px 14px 40px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; scroll-padding-top: 12px; }
.ta-q { padding: 16px; border-radius: 18px; background: var(--vidrio, rgba(255,255,255,.75)); border: 1px solid var(--borde, rgba(0,0,0,.07)); box-shadow: var(--sombra, 0 6px 20px -14px rgba(0,0,0,.25)); transition: border-color .25s; }
.ta-q.acertada { border-color: rgba(46,125,50,.35); }
.ta-q.fallada { border-color: rgba(198,40,40,.35); }
.ta-qt { display: flex; gap: 12px; font: 15.5px/1.45 var(--f-body, Inter, sans-serif); color: var(--text, #17201C); }
.ta-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--f-body, Inter, sans-serif); color: #fff; background: var(--primario, #17201C); }
.ta-q.acertada .ta-n { background: #2E7D32; }
.ta-q.fallada .ta-n { background: #C62828; }
.ta-st { margin: 8px 0 0 40px; font-size: 14px; color: var(--muted, #4d5752); }
.ta-ops { display: flex; flex-direction: column; gap: 7px; margin: 12px 0 0 40px; }
.ta-op { all: unset; box-sizing: border-box; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 13px;
  border: 1px solid var(--borde, rgba(0,0,0,.1)); background: rgba(255,255,255,.7); font: 15px/1.4 var(--f-body, Inter, sans-serif); color: var(--text, #17201C);
  transition: transform .15s, border-color .2s, background .2s; }
.ta-op:hover:not([disabled]) { border-color: var(--gold, #12805C); transform: translateX(3px); }
.ta-op:focus-visible { outline: 2px solid var(--gold, #12805C); outline-offset: 2px; }
.ta-op .l { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #8a948f; display: grid; place-items: center; font: 700 12.5px var(--f-body, Inter, sans-serif); }
.ta-op[disabled] { cursor: default; }
.ta-op.ok { border-color: #2E7D32; background: #E7F5E7; animation: taBien .4s cubic-bezier(.2,.9,.3,1.3); }
.ta-op.ok .l { background: #2E7D32; border-color: #2E7D32; color: #fff; }
.ta-op.bad { border-color: #C62828; background: #FDECEC; animation: taMal .4s; }
.ta-op.bad .l { background: #C62828; border-color: #C62828; color: #fff; }
.ta-op.apagada { opacity: .55; }
@keyframes taBien { 0% { transform: scale(.98); } 60% { transform: scale(1.015); } 100% { transform: none; } }
@keyframes taMal { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.ta-por { margin: 10px 0 0 40px; padding: 10px 12px; border-radius: 12px; font: 14px/1.45 var(--f-body, Inter, sans-serif); color: #22301f; background: #F4EFE0; animation: taEntra .3s both; }
.ta-por.bien b { color: #1f7a3a; }
.ta-por.mal b { color: #b42323; }

.ta-res { margin-top: 6px; padding: 20px 16px; border-radius: 20px; text-align: center; background: var(--vidrio-fuerte, #fff); border: 1px solid var(--borde, rgba(0,0,0,.08)); box-shadow: var(--sombra); animation: taEntra .4s both; }
.ta-nota b { display: block; font: 400 64px/1 "Anton", var(--f-disp, sans-serif); }
.ta-nota b small { font-size: 30px; }
.ta-nota span { display: block; margin-top: 4px; font: 600 14px var(--f-body, Inter, sans-serif); }
.ta-nota.aprueba { color: #2E7D32; }
.ta-nota.suspende { color: #C62828; }
.ta-cifras { display: flex; justify-content: center; gap: 22px; margin: 16px 0; }
.ta-cifras b { display: block; font: 700 22px var(--f-body, Inter, sans-serif); color: var(--text, #17201C); }
.ta-cifras small { font-size: 12px; color: var(--muted, #5b6560); }
.ta-acc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

@media (max-width: 560px) {
  .ta-ops, .ta-por, .ta-st { margin-left: 0; }
  .ta-q { padding: 14px 12px; }
  .ta-boton { padding: 6px 12px 6px 7px; gap: 7px; margin: 6px 6px 0 0; }
  .ta-boton b { font-size: 13px; }
  .ta-boton small { display: none; }
  .ta-boton svg { width: 14px; height: 14px; padding: 4px; }
  .ta-marcador span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ta-op, .ta-por, .ta-res, .ta-boton, .ta-hoja { animation: none !important; transition: none !important; } }

/* corrección completa (08/10/2026): por qué no, palabras clave, regla y salto al temario */
.ta-por .ta-mal, .ta-por .ta-kw, .ta-por .ta-mn { margin-top: 7px; font-size: 13.5px; line-height: 1.45; }
.ta-por .ta-mn { padding: 7px 10px; border-radius: 9px; background: rgba(138, 163, 30, .12); }
.ta-por .ta-ir { margin-top: 9px; }
