/* ═══ Trial / ítems de test ══════════════════════════════════════════════════ */
.screen--trial {
  max-width: 640px;
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
}
.trial__topbar {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin-bottom: 8px; flex: none;
}
.trial__stimulus {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 8px 0;
}
.trial__img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.trial__question { text-align: center; font-size: 1.1rem; font-weight: 600; margin: 4px 0 16px; }
.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.option-btn {
  display: flex; align-items: center; gap: 12px; padding: 16px; font: inherit; font-size: 1.05rem;
  text-align: left; background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius-sm); cursor: pointer;
}
.option-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.option-btn:focus-visible { outline: none; box-shadow: var(--focus); }
.option-btn__key {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--bg); border-radius: 8px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.keys-hint { text-align: center; margin: 16px 0 0; font-size: 0.85rem; }

/* ═══ Modal ════════════════════════════════════════════════════════════════ */
.modal {
  position: fixed; inset: 0; background: rgba(31, 42, 51, .45);
  display: grid; place-items: center; padding: 24px; z-index: 100;
}
.modal[hidden] { display: none; }
.modal__box {
  background: var(--surface); border-radius: var(--radius); padding: 24px;
  max-width: 440px; width: 100%; max-height: 80vh; overflow: auto;
  box-shadow: 0 16px 48px rgba(13, 23, 34, .28);
  animation: modal-box-in 170ms cubic-bezier(.22,.9,.46,1);
}
@keyframes modal-box-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.modal__header-left { display: flex; align-items: center; gap: 8px; color: var(--navy-muted); }
.modal__title { font-size: 1rem; font-weight: 750; color: var(--ink); margin: 0; }
.modal__close-btn {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  background: none; border: none; border-radius: 8px;
  color: var(--ink-soft); cursor: pointer; transition: background 0.12s, color 0.12s;
}
.modal__close-btn:hover { background: var(--bg); color: var(--ink); }

/* ─── Glosario estructurado ─────────────────────────────────────────────── */
.modal__box--glossary {
  padding: 0; max-width: 500px; max-height: 78vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal__box--glossary .modal__header {
  padding: 18px 22px 15px; margin-bottom: 0; flex: none;
  background: var(--surface); position: sticky; top: 0; z-index: 1;
}
.modal__scroll {
  overflow-y: auto; flex: 1;
  padding: 6px 22px 20px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.glossary { display: flex; flex-direction: column; margin: 0; }
.glossary__entry {
  padding: 11px 10px; border-radius: var(--radius-sm);
  transition: background 0.1s; cursor: default;
}
.glossary__entry:not(:last-child) { border-bottom: 1px solid var(--line); border-radius: 0; }
.glossary__entry:last-child { padding-bottom: 6px; }
.glossary__entry:hover { background: var(--bg); border-radius: var(--radius-sm); }
.glossary__entry:hover + .glossary__entry { border-top-color: transparent; }
.glossary dt {
  font-size: 0.85rem; font-weight: 700; color: var(--accent-dark);
  display: flex; align-items: center; gap: 7px; margin: 0;
}
.glossary dt::before {
  content: ''; flex: none;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.glossary dd {
  margin: 4px 0 0 12px;
  font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5;
}

/* ═══ Sistema transversal de instrucciones ═══════════════════════════════════ */
.screen--instructions {
  width: 100%;
  max-width: 760px;
  min-height: 100dvh;
  padding-top: 34px !important;
  padding-bottom: 34px !important;
}
.test-instructions {
  width: 100%;
  max-width: 680px;
  min-width: 0;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 34px);
  border-color: #d5e0e7;
  box-shadow: 0 14px 38px rgb(31 42 51 / 10%);
}
.test-instructions__header { text-align: center; margin-bottom: 20px; }
.test-instructions__eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.test-instructions__header h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -.02em;
}
.test-instructions__header p {
  max-width: 54ch;
  margin: 9px auto 0;
  color: var(--ink-soft);
}
.test-instructions__figure {
  margin: 0 0 22px;
  padding: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, #f5f9fb, #edf4f7);
  border: 1px solid #d7e3ea;
  border-radius: var(--radius);
}
.test-instructions__figure figcaption {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-align: center;
  text-transform: uppercase;
}
.test-instructions__content {
  max-width: 60ch;
  margin: 0 auto;
  color: var(--ink-soft);
  line-height: 1.55;
}
.test-instructions__content p { margin: 0 0 10px; }
.test-instructions__content p:last-child { margin-bottom: 0; }
.test-instructions__content strong { color: var(--ink); }
.test-instructions__content ul { margin: 8px 0 0; padding-left: 22px; }
.test-instructions__content li + li { margin-top: 5px; }
.test-instructions__controls { width: 100%; min-width: 0; max-width: 60ch; margin: 18px auto 0; }
.test-instructions__note {
  max-width: 60ch;
  margin: 17px auto 0;
  padding: 10px 12px;
  color: var(--ink-soft);
  background: #f7f8f8;
  border-left: 3px solid var(--line-strong);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
  font-size: .8rem;
}
.test-instructions__note p { margin: 0; }
.test-instructions__note:has(.form-error) {
  background: #fbeceb;
  border-left-color: var(--danger);
}
.form-error {
  color: var(--danger);
  font-weight: 700;
}
.test-instructions__action {
  display: block;
  max-width: 420px;
  min-height: 48px;
  margin: 24px auto 0;
  font-weight: 700;
}
.instruction-demo {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--ink);
  text-align: center;
}
.instruction-demo small,
.instruction-demo > span:last-child { color: var(--ink-soft); font-size: .78rem; }
.instruction-demo kbd,
.demo-keys kbd {
  min-width: 32px;
  padding: 5px 8px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #aeb8be;
  border-radius: 6px;
  box-shadow: 0 2px 0 #89969d;
  font: inherit;
  font-weight: 800;
}
.instruction-demo--eyes,
.instruction-demo--emotion,
.instruction-demo--stroop,
.instruction-demo--corsi,
.instruction-demo--maze,
.instruction-demo--cards,
.instruction-demo--tower,
.instruction-demo--stream,
.instruction-demo--digits,
.instruction-demo--sum,
.instruction-demo--executive { flex-direction: column; }
.demo-generic-eyes { display: block; width: min(360px, 92%); height: auto; overflow: visible; }
.demo-generic-eyes__brow {
  fill: none; stroke: #465158; stroke-width: 7; stroke-linecap: round;
}
.demo-generic-eyes__eye { fill: #fff; stroke: #465158; stroke-width: 4; stroke-linejoin: round; }
.demo-generic-eyes__iris { fill: #7fa7b4; stroke: #465158; stroke-width: 3; }
.demo-generic-eyes__pupil { fill: #25343b; }
.demo-generic-eyes__light { fill: #fff; }
.demo-face {
  position: relative; width: 78px; height: 78px; flex: none;
  background: #f2d2ba; border: 2px solid #9b7560; border-radius: 50%;
}
.demo-face i { position: absolute; top: 27px; width: 7px; height: 7px; background: #493b34; border-radius: 50%; }
.demo-face i:first-child { left: 20px; }
.demo-face i:nth-child(2) { right: 20px; }
.demo-face span {
  position: absolute; left: 23px; bottom: 17px; width: 30px; height: 12px;
  border-bottom: 3px solid #493b34; border-radius: 50%;
}
.demo-emotions { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.demo-emotions span { padding: 5px 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: .7rem; }
.instruction-demo--trail svg { width: min(420px, 100%); }
.instruction-demo--trail path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.instruction-demo--trail circle { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.instruction-demo--trail text { fill: var(--ink); font: 700 18px var(--font); text-anchor: middle; }
.instruction-demo--stroop strong { font-size: clamp(2.2rem, 8vw, 3.5rem); line-height: 1; }
.demo-keys { display: flex; gap: 10px; }
.demo-corsi-board {
  position: relative; width: 250px; max-width: 86%; height: 118px;
  background: #26343c; border-radius: 8px;
}
.demo-corsi-board i { position: absolute; width: 31px; height: 31px; background: #f5f6f4; border: 1px solid #10181d; }
.demo-corsi-board i:nth-child(1) { left:9%;top:13%;}.demo-corsi-board i:nth-child(2){left:36%;top:8%}
.demo-corsi-board i:nth-child(3){left:72%;top:16%}.demo-corsi-board i:nth-child(4){left:18%;top:57%}
.demo-corsi-board i:nth-child(5){left:49%;top:48%}.demo-corsi-board i:nth-child(6){left:80%;top:62%}
.demo-corsi-board i:nth-child(7){left:4%;top:75%}.demo-corsi-board i:nth-child(8){left:61%;top:76%}
.demo-corsi-board i:nth-child(9){left:35%;top:67%}
.demo-corsi-board i.is-lit { background: #ffd05b; box-shadow: 0 0 0 4px rgb(255 208 91 / 24%); }
.instruction-demo--maze svg { width: min(440px, 100%); }
.instruction-demo--maze .maze-wall { fill: #fff; stroke: #29343b; stroke-width: 5; }
.instruction-demo--maze .maze-route { fill:none;stroke:var(--accent);stroke-width:5;stroke-linecap:round;stroke-dasharray:6 5}
.instruction-demo--maze circle { fill:#2f9e8f }.instruction-demo--maze rect { fill:#e0a43b }
.instruction-demo--faces { flex-wrap: wrap; }
.instruction-demo--faces .demo-face { width: 68px; height: 68px; background: #fff; }
.instruction-demo--faces .demo-face.is-different { box-shadow: 0 0 0 4px rgb(21 94 141 / 20%); border-color: var(--accent); }
.instruction-demo--faces > span { flex-basis: 100%; }
.demo-tower { width: 260px; max-width: 90%; height: 100px; display: flex; justify-content: space-around; align-items: flex-end; border-bottom: 8px solid #8d6e3a; }
.demo-tower > i { position: relative; width: 8px; height: 88px; background: #a0785a; border-radius: 5px 5px 0 0; }
.ball { position:absolute;left:50%;width:30px;height:30px;border-radius:50%;transform:translateX(-50%);border:2px solid rgb(0 0 0 / 25%)}
.ball--red{background:#e05252;bottom:2px}.ball--blue{background:#3a75c4;bottom:35px}.ball--green{background:#3a9a5c;bottom:2px}
.instruction-demo--cards { flex-direction: row; flex-wrap: wrap; }
.demo-card { width: 88px; height: 72px; display:grid;place-items:center;background:#fff;border:2px solid var(--line-strong);border-radius:8px }
.shape--red{color:#d94b4b}.shape--green{color:#298e50}.shape--blue{color:#286cb7}.instruction-demo--cards > span{flex-basis:100%}
.instruction-demo--rotation { flex-wrap: wrap; }
.demo-angle { font: 800 3.2rem/1 monospace; color: var(--accent); }
.demo-angle.is-rotated { transform: rotate(90deg); }
.demo-rotate-arrow { font-size: 2rem !important; }
.instruction-demo--rotation small { flex-basis: 100%; }
.instruction-demo--coding { flex-wrap: wrap; }
.instruction-demo--coding > div { display:flex;flex-direction:column;gap:3px;min-width:62px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:8px;font-size:1.4rem }
.instruction-demo--coding > div b { color:var(--accent);font-size:.85rem}.demo-arrow{font-size:1.6rem}.instruction-demo--coding small{flex-basis:100%}
.instruction-demo--stream > div,
.instruction-demo--digits > div { display:flex;align-items:center;gap:10px }
.instruction-demo--stream > div span,
.instruction-demo--digits > div span { width:48px;height:58px;display:grid;place-items:center;background:#fff;border:1px solid var(--line);border-radius:9px;font-size:1.8rem;font-weight:700 }
.instruction-demo--stream p,.instruction-demo--stream strong,.instruction-demo--digits p{margin:0}
.instruction-demo--digits i { width:18px;border-top:2px dotted var(--line-strong) }
.instruction-demo--search { flex-wrap: wrap; }
.demo-target { width:64px;height:64px;display:grid;place-items:center;background:#fff;border:2px solid var(--line-strong);border-radius:9px;font-size:2rem }
.demo-divider { align-self:stretch;border-left:2px solid var(--line-strong) }
.demo-search-set{display:flex;gap:8px;padding:12px;background:#fff;border:2px solid var(--line-strong);border-radius:9px}
.demo-search-set i{font:normal 1.5rem serif}.instruction-demo--search strong{flex-basis:100%;color:var(--ok);font-size:.8rem}
.instruction-demo--sum { flex-direction:row;flex-wrap:wrap }
.instruction-demo--sum span,.instruction-demo--sum strong{width:62px;height:62px;display:grid;place-items:center;background:#fff;border:1px solid var(--line);border-radius:10px;font-size:2rem}
.instruction-demo--sum strong{color:var(--accent);border-color:var(--accent)}.instruction-demo--sum small{flex-basis:100%}
.instruction-demo--executive > span { padding:7px 12px;background:#fff;border:1px solid var(--line);border-radius:8px;font-weight:700 }

/* ═══ Respuestas y feedback transversal ══════════════════════════════════════ */
.test-choice {
  min-width: 160px;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 16px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color .14s, background .14s, transform .08s, box-shadow .14s;
}
.test-choice:hover { background: var(--accent-soft); border-color: var(--accent); }
.test-choice:active { transform: translateY(1px); }
.test-choice:focus-visible { outline: none; box-shadow: var(--focus); border-color: var(--accent); }
.test-choice__key {
  flex: none;
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 4px 7px;
  background: #f3f5f6;
  border: 1px solid #aeb8be;
  border-radius: 6px;
  box-shadow: 0 2px 0 #89969d;
  font: inherit;
  font-weight: 800;
}
.test-choice__copy { display: flex; flex-direction: column; gap: 2px; }
.test-choice__copy strong { font-size: .95rem; }
.test-choice__copy small { color: var(--ink-soft); font-size: .72rem; }
/* Tarjeta de feedback estandarizada para TODOS los tests (antes cada variante tenía
   su propio color de fondo de lleno; ahora el estilo base ya es el formal: blanco,
   borde de color como único acento, ícono en forma de insignia con borde en vez de
   círculo relleno). --compact (Claves/BS-D/SDMT/Stroop/WCST/Rotación de
   Figuras/Percepción de Diferencias) y --panel (Corsi/TOL/Span de Dígitos, y PASAT
   con su propio ajuste de tamaño más abajo) solo ajustan tamaño/disposición sobre
   esta misma base — el color y la insignia son un único lenguaje visual compartido. */
.test-feedback {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 12px auto 0;
  padding: 10px 14px;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgb(31 42 51 / 8%);
  text-align: left;
}
.test-feedback__icon {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  border: 2px solid currentColor;
}
.test-feedback__icon svg { width: 20px; height: 20px; fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round }
.test-feedback__body { display:flex;flex-direction:column;gap:1px;line-height:1.25 }
.test-feedback__title { font-size: .9rem; font-weight: 700; }
.test-feedback__message { color: var(--ink-soft); font-size: .78rem; font-weight: 400; }
.test-feedback__detail { color: var(--muted); font-size: .7rem; font-weight: 400; }
.test-feedback--correct { border-color: var(--ok); }
.test-feedback--correct .test-feedback__icon { color: var(--ok); }
.test-feedback--error { border-color: var(--danger); }
.test-feedback--error .test-feedback__icon { color: var(--danger); }
.test-feedback--compact { min-height:44px;margin-top:6px;padding:6px 10px;border-radius:10px;box-shadow:none }
.test-feedback--compact .test-feedback__icon { width:27px;height:27px }
.test-feedback--compact .test-feedback__icon svg { width:16px;height:16px }
.test-feedback--compact .test-feedback__title { font-size:.78rem }
.test-feedback--panel {
  width: 100%;
  max-width: 480px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 16px;
  justify-content: stretch;
  padding: 22px 24px 20px;
  box-shadow: 0 4px 18px rgba(15, 30, 45, .08);
}
.test-feedback--panel .test-feedback__icon { width: 32px; height: 32px; }
.test-feedback--panel .test-feedback__title { font-size: 1.05rem; }
.test-feedback--panel .test-feedback__message { font-size: .88rem; margin-top: 2px; }
.test-feedback--panel .test-feedback__action {
  grid-column: 2;
  justify-self: start;
  margin: 16px 0 0;
}

@media (max-width: 520px) {
  .screen--instructions { padding: 18px !important; }
  .test-instructions { padding: 20px 17px; }
  .test-instructions__figure { padding: 11px 8px; }
  .instruction-demo { min-height: 105px; }
  .test-choice { min-width: 0; width: 100%; }
  .instruction-demo--stream > div span,
  .instruction-demo--digits > div span { width: 38px; height: 48px; font-size: 1.5rem; }
}

/* ═══ Resumen ═══════════════════════════════════════════════════════════════ */
.summary-results { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

/* Card header: identidad (izq) + badge de clasificación (der) */
.result-card__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.result-card__identity { display: flex; flex-direction: column; gap: 2px; }
.result-card__siglas { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.result-card__nombre { font-size: 0.8rem; color: var(--muted); font-weight: 400; }

/* Badge de clasificación en el header */
.result-card__badge {
  flex: none; padding: 4px 11px; border-radius: 999px;
  font-size: 0.73rem; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
  align-self: flex-start;
}
.result-card__badge--ok { background: var(--accent-soft); color: var(--accent-dark); }
.result-card__badge--alert { background: #fbeceb; color: var(--danger); }
.result-card__badge--neutral { background: var(--navy-pastel); color: var(--navy-muted); }

/* Fila normativa compacta bajo el header */
.result-card__norm-compact {
  margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--bg); display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.result-card__norm-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.result-card__norm-score { display: flex; align-items: baseline; gap: 4px; }
.result-card__norm-val {
  font-size: 1rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums;
}
.result-card__norm-lbl {
  font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.result-card__norm-method { font-size: 0.68rem; color: var(--muted); margin: 0; }

/* Sección de puntuaciones brutas */
.result-card__raw { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.result-card__raw-eyebrow {
  display: block; margin-bottom: 8px;
  font-size: 0.58rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--muted);
}

/* Lista compacta clave / valor */
.raw-list { display: grid; grid-template-columns: auto 1fr; gap: 1px 16px; margin-bottom: 8px; }
.raw-row { display: contents; }
.raw-row__label {
  font-size: 0.76rem; color: var(--ink-soft); padding: 5px 0 4px;
  white-space: nowrap; align-self: baseline;
}
.raw-row__val {
  font-size: 0.82rem; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; padding: 5px 0 4px; align-self: baseline;
}
.raw-row:not(:first-child) .raw-row__label,
.raw-row:not(:first-child) .raw-row__val {
  border-top: 1px solid var(--line);
}
.result-card__note {
  margin: 10px 0 0; padding: 8px 0 0; border-top: 1px dashed var(--line);
  font-size: 0.65rem; color: var(--muted); line-height: 1.45; display: flex; gap: 5px;
}
.result-card__note-icon { flex: none; opacity: .6; font-size: 0.7rem; margin-top: 1px; }
.result-card__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.backup-health {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.backup-health > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.backup-health dt {
  color: var(--muted);
  font-size: .72rem;
  margin-bottom: 4px;
}
.backup-health dd {
  margin: 0;
  color: var(--ink);
  font-size: .84rem;
  overflow-wrap: anywhere;
}
@media (max-width: 620px) {
  .backup-health { grid-template-columns: 1fr; }
}
.report-score-card {
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: hidden;
}
.report-score-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
}
.report-score-card__head .card__kicker { margin-bottom: 3px; }
.report-score-card__head h3 { margin: 0; font-size: 1.05rem; }
.report-score-card__head > span {
  padding: 3px 9px;
  color: var(--warn);
  background: #fbf3e0;
  border: 1px solid #ecd9a8;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}
.report-score-table__scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border-top: 1px solid #e7ecef;
  border-bottom: 1px solid #e7ecef;
}
.report-score-table {
  width: 100%;
  min-width: 920px;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--surface);
  font-size: .78rem;
}
.report-score-table th,
.report-score-table td {
  padding: 10px 11px;
  border: 1px solid #e5eaed;
  text-align: left;
  vertical-align: top;
  font-variant-numeric: tabular-nums;
}
.report-score-table thead th {
  color: var(--accent-dark);
  background: #f7f8f9;
  font-size: .68rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  vertical-align: middle;
  border-bottom: 2px solid var(--accent-dark);
}
.report-score-table__col-instrument { width: 12%; }
.report-score-table__col-indicator { width: 19%; }
.report-score-table__col-natural { width: 16%; }
.report-score-table__col-percentile { width: 10%; }
.report-score-table__col-z { width: 9%; }
.report-score-table__col-expected { width: 16%; }
.report-score-table__col-result { width: 18%; }
.report-score-table [data-column="percentil"],
.report-score-table [data-column="z"] {
  text-align: center;
}
.report-score-table tbody tr.report-score-table__score-row:nth-child(odd) {
  background: #fafbfc;
}
.report-score-table__domain th {
  padding: 9px 11px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-bottom-color: #c9dce8;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.report-score-table__instrument {
  color: var(--accent-dark);
  background: #f3f7fa;
  vertical-align: middle !important;
}
.report-score-table__instrument strong { font-size: .74rem; }
.report-score-table__instrument sup {
  margin-left: 4px;
  color: var(--ink-soft);
  font-size: .58rem;
  font-weight: 700;
}
.report-score-table__instrument--single {
  vertical-align: top !important;
}
.report-score-table__instrument--single span {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-weight: 500;
}
.report-score-table__indicator {
  color: var(--ink);
  font-weight: 500;
}
.report-score-table__result {
  color: var(--ink);
  font-size: .72rem;
  text-transform: uppercase;
}
.report-score-table__result--umbral { color: var(--ok); }
.report-score-table__result--descriptivo {
  color: var(--ink-soft);
  text-transform: none;
}
.report-score-table__result--indisponible {
  color: var(--muted);
  font-size: .66rem;
}
.report-score-table__notes {
  margin: 0 22px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .75rem;
}
.report-score-table__notes:last-child { border-bottom: none; }
.report-score-table__notes summary {
  color: var(--accent-dark);
  font-weight: 700;
  cursor: pointer;
}
.report-score-table__notes div { padding: 8px 0 2px; }
.report-score-table__notes p { margin: 0 0 7px; line-height: 1.45; }
.report-score-notes {
  min-width: 0;
  overflow: hidden;
}
.report-score-notes > h3 { margin: 2px 0 18px; }
.report-score-notes section + section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.report-score-notes h4 {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: .88rem;
}
.report-score-notes__criterion {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #dfe5e9;
  border-radius: var(--radius-sm);
  background: #f7f8f9;
  color: var(--ink-soft);
  font-size: .8rem;
  line-height: 1.55;
}
.report-score-notes__instrument {
  display: grid;
  gap: 4px;
  margin: 0 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent-soft);
}
.report-score-notes__instrument h5 {
  margin: 0;
  color: var(--ink);
  font-size: .78rem;
}
.report-score-notes__instrument p,
.report-score-notes__reference,
.report-score-notes__bibliography {
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-size: .75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.report-score-notes__reference b { color: var(--ink); }
.report-score-notes__bibliography {
  padding-left: 18px;
  text-indent: -18px;
}
.standard-profile__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.standard-profile__head h3 { margin: 0; font-size: 1.05rem; }
.standard-profile__tag { flex: none; font-size: .74rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.standard-profile__synthesis {
  margin: 10px 0 18px; padding: 10px 12px;
  font-size: .88rem; line-height: 1.55; color: var(--ink);
  background: var(--bg); border-radius: 10px;
}
.standard-profile__group {
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.standard-profile__row {
  display: grid;
  grid-template-columns: minmax(90px, 0.9fr) minmax(150px, 2fr) 64px 54px;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  font-size: 0.82rem;
}
.standard-profile__label { display: grid; gap: 1px; }
.standard-profile__label small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
}
.standard-profile__track {
  position: relative;
  height: 9px;
  border-radius: 99px;
  background: #eef0f1;
}
.standard-profile__normal {
  position: absolute;
  inset: 0 auto 0 33.333%;
  width: 33.333%;
  background: #dfece3;
}
.standard-profile__zero {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 1px;
  background: #9aa3a8;
}
.standard-profile__point {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  transform: translate(-50%, -50%);
}
.standard-profile__note { margin: 14px 0 0; font-size: 0.76rem; }
.standard-profile__headline { margin-bottom: 18px; }
.standard-profile__headline-label {
  display: block; margin-bottom: 8px; font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}
.standard-profile__row--bateria {
  grid-template-columns: minmax(90px, 0.9fr) minmax(150px, 2fr) 84px 64px;
  padding: 12px 14px; margin: 0;
  background: var(--accent-soft); border: 1px solid #b8d4e8; border-radius: 10px;
  font-size: .95rem;
}
.standard-profile__row--bateria .standard-profile__label { font-weight: 700; color: var(--accent-dark); }
.standard-profile__row--bateria strong { font-size: 1.15rem; color: var(--accent-dark); }
.standard-profile__row--bateria .standard-profile__track { height: 13px; }
.standard-profile__row--bateria .standard-profile__point { width: 15px; height: 15px; }
@media (max-width: 620px) {
  .report-score-card__head { flex-direction: column; padding: 17px; }
  .report-score-table__notes { margin-inline: 17px; }
  .standard-profile__row {
    grid-template-columns: minmax(76px, 0.8fr) minmax(110px, 1.6fr) 56px;
  }
  .standard-profile__row > span:last-child { display: none; }
}

/* ═══ Sesiones ══════════════════════════════════════════════════════════════ */
.sessions-list { display: flex; flex-direction: column; gap: 10px; }
.session-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.session-row__main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ficha-h3 { margin: 20px 0 10px; }

.muted { color: var(--muted); }

/* ═══ Detalle de resultados ══════════════════════════════════════════════════ */
.detalle-list {
  list-style: none; margin: 12px 0 0; padding: 12px 0 0;
  border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px;
}
.detalle-list li { display: flex; justify-content: space-between; gap: 12px; }
.detalle-list li span { color: var(--ink-soft); }

/* ═══ Perfil ════════════════════════════════════════════════════════════════ */
.perfil { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.perfil-title { margin: 0 0 6px; font-size: 0.75rem; color: var(--muted); }
.perfil-row { display: flex; align-items: center; gap: 8px; margin: 0; padding: 5px 0; }
.perfil-row:not(:last-child) { border-bottom: 1px solid var(--line); }
.perfil-label { width: 64px; font-size: 0.75rem; color: var(--ink-soft); }
.perfil-track { flex: 1; height: 7px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.perfil-bar { display: block; height: 100%; background: var(--accent); border-radius: 4px; opacity: .7; }
.perfil-bar--neg { background: var(--danger); }
.perfil-val { width: 40px; text-align: right; font-size: 0.75rem; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-soft); }

/* ═══ Modo tarea (full-screen, sin sidebar, sin cuaderno) ═══════════════════ */
body.task-mode .shell { grid-template-columns: 1fr; }
body.task-mode .sidebar { display: none; }
body.task-mode .main {
  background: #ffffff; /* blanco limpio, sin líneas de cuaderno */
}
body.task-mode .main::before { display: none; }

/* El atributo hidden queda anulado por display:flex si no se fuerza */
.task-exit-btn[hidden] { display: none; }
.task-exit-btn {
  position: fixed;
  top: 14px;
  right: 18px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  background: rgba(31, 42, 51, .72);
  color: #fff;
  border: none;
  border-radius: 20px;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background .15s;
}
.task-exit-btn:hover { background: rgba(31, 42, 51, .92); }
.task-exit-btn:focus-visible { outline: 2px solid rgba(255,255,255,.5); }
.task-exit-btn kbd {
  font: inherit;
  font-size: 0.75rem;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 4px;
  padding: 1px 5px;
}
