/* ============================================================================
   hamradiodx.es · Test de examen de radioaficionado
   Rediseño 2026 — "instrumento de radio": claro, moderno, identidad ham.
   Paleta de marca: azul #3d8ed4 · naranja #e8571e
   ========================================================================== */

:root {
  /* Marca / instrumento */
  --navy:        #0d2236;
  --navy-2:      #143352;
  --navy-3:      #1c4f7e;
  --on-navy:     #dce7f2;
  --on-navy-dim: #8aa3bd;

  /* Azul de marca */
  --blue:        #3d8ed4;
  --blue-ink:    #1c6cb0;
  --blue-soft:   #eaf3fb;
  --blue-line:   #cfe2f4;

  /* Naranja de acción */
  --orange:      #e8571e;
  --orange-700:  #cf4912;
  --orange-soft: #fdeee6;
  --orange-line: #f6cbb4;

  /* Tinta y superficies */
  --ink:      #13212e;
  --muted:    #5f7081;
  --faint:    #8b9aa9;
  --bg:       #eef3f8;
  --surface:  #ffffff;
  --surface-2:#f6fafd;
  --line:     #e1e8f1;
  --line-soft:#edf2f8;

  /* Estados */
  --green:      #14905a;
  --green-soft: #e6f5ec;
  --green-line: #bfe6cf;
  --red:        #d8402c;
  --red-soft:   #fdece9;
  --red-line:   #f4c5bd;

  /* Tipografía */
  --font-display: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SFMono-Regular', 'Cascadia Code', monospace;

  /* Sombras */
  --sh-sm: 0 1px 2px rgba(13,34,54,.06), 0 1px 3px rgba(13,34,54,.05);
  --sh-md: 0 2px 6px rgba(13,34,54,.06), 0 10px 24px rgba(13,34,54,.07);
  --sh-lg: 0 8px 20px rgba(13,34,54,.10), 0 24px 60px rgba(13,34,54,.12);
  --sh-orange: 0 6px 16px rgba(232,87,30,.28);

  --r-sm: 9px;
  --r:    14px;
  --r-lg: 20px;
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 380px at 88% -120px, #e2eefa 0%, rgba(226,238,250,0) 70%),
    var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--blue-ink); text-decoration: none; }
a:hover { color: var(--orange-700); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); margin: 0; line-height: 1.12; letter-spacing: -0.02em; }

code {
  font-family: var(--font-mono);
  font-size: .86em;
  background: var(--blue-soft);
  color: var(--blue-ink);
  padding: .1em .42em;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

:focus-visible { outline: 3px solid rgba(61,142,212,.55); outline-offset: 2px; border-radius: 6px; }

/* ============================================================================
   TOPBAR
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .sig {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-3) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), var(--sh-sm);
}
.brand-logo {
  width: 46px; height: 46px; flex: none; display: block;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(13,34,54,.18));
}
.brand b { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -0.03em; display: block; }
.brand .call {
  display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em;
  color: var(--faint); text-transform: uppercase; margin-top: 1px;
}

.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a {
  font-size: 14.5px; font-weight: 500; color: var(--muted);
  padding: 8px 13px; border-radius: 9px; transition: background .15s, color .15s;
}
.topbar nav a:hover { color: var(--ink); background: var(--surface-2); }

/* ============================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600;
  padding: 11px 18px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s, color .15s;
  text-decoration: none;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn.primary {
  background: linear-gradient(180deg, #ef6a36 0%, var(--orange) 55%, var(--orange-700) 100%);
  border-color: var(--orange-700); color: #fff; box-shadow: var(--sh-orange);
}
.btn.primary:hover { background: linear-gradient(180deg, var(--orange) 0%, var(--orange-700) 100%); }

.btn.finish {
  background: linear-gradient(180deg, #ef6a36 0%, var(--orange) 60%, var(--orange-700) 100%);
  border-color: var(--orange-700); color: #fff; box-shadow: var(--sh-orange);
  font-weight: 700;
}
.btn.finish:hover { filter: brightness(1.04); }

.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }

/* ============================================================================
   HERO + INSTRUMENTO (portada)
   ========================================================================== */
.hero { padding: 56px 0 30px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-ink); margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--orange); border-radius: 2px; }

.hero h1 {
  font-size: clamp(34px, 5vw, 54px); font-weight: 700; letter-spacing: -0.035em;
  margin: 0 0 18px;
}
.hero h1 em { font-style: normal; color: var(--orange); }
.hero .lead { font-size: 16.5px; color: var(--muted); max-width: 36em; margin: 0 0 26px; }

.hero-stats { display: flex; gap: 30px; }
.hero-stats .stat .n {
  font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--blue-ink);
  letter-spacing: -0.03em; line-height: 1;
}
.hero-stats .stat .l {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin-top: 7px;
}

/* Instrumento / osciloscopio */
.instrument {
  position: relative; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(165deg, var(--navy) 0%, #112c46 60%, var(--navy-2) 100%);
  box-shadow: var(--sh-lg);
  border: 1px solid rgba(255,255,255,.06);
  padding: 20px 20px 18px;
}
.instrument .scope-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.instrument .scope-head .freq {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; color: #7fe0b6;
}
.instrument .scope-head .mode {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--on-navy-dim);
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 4px 9px;
}
.scope {
  position: relative; height: 132px; border-radius: 12px; overflow: hidden;
  background:
    linear-gradient(rgba(61,142,212,.14) 1px, transparent 1px) 0 0 / 100% 22px,
    linear-gradient(90deg, rgba(61,142,212,.14) 1px, transparent 1px) 0 0 / 26px 100%,
    radial-gradient(120% 120% at 50% 0%, #0a3050 0%, #061d31 100%);
  border: 1px solid rgba(127,224,182,.18);
}
.scope svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scope .trace {
  fill: none; stroke: var(--orange); stroke-width: 2.4; stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(232,87,30,.6));
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
  animation: trace-draw 2.6s ease-out .2s forwards, trace-pulse 3.4s ease-in-out 2.8s infinite;
}
@keyframes trace-draw { to { stroke-dashoffset: 0; } }
@keyframes trace-pulse { 0%,100% { opacity: 1; } 50% { opacity: .72; } }
.scope .sweep {
  position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(127,224,182,.10), transparent);
  animation: sweep 4.5s linear infinite;
}
@keyframes sweep { from { left: -40%; } to { left: 100%; } }

.readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.readout {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
  border-radius: 11px; padding: 11px 12px;
}
.readout .v { font-family: var(--font-mono); font-weight: 700; font-size: 21px; color: #fff; line-height: 1; }
.readout .k {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--on-navy-dim); margin-top: 6px;
}

/* ============================================================================
   SECCIONES
   ========================================================================== */
.section { padding: 16px 0 60px; }
.section-head { margin: 28px 0 14px; }
.section-head h2 { font-size: 24px; font-weight: 700; }
.section-head p { color: var(--muted); margin: 7px 0 0; font-size: 15px; }

.note {
  display: block; font-size: 14.5px; color: var(--muted);
  background: var(--blue-soft); border: 1px solid var(--blue-line);
  border-radius: var(--r); padding: 14px 17px; margin: 0 0 26px;
}
.note b { color: var(--blue-ink); }

/* Grupo por parte */
.parte-group { margin-bottom: 34px; }
.parte-label {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.parte-label .tag {
  font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink);
  display: inline-flex; align-items: center; gap: 9px;
}
.parte-label .tag::before {
  content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
}
.parte-label.regl .tag::before { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.parte-label > span:not(.tag):not(.rule) {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
.parte-label .rule {
  flex: 1; height: 0; border-top: 1px dashed var(--line);
}

.exam-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 16px;
}

/* Tarjeta de examen */
.exam-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 18px 16px; box-shadow: var(--sh-sm);
  color: var(--ink); overflow: hidden;
  transition: transform .15s, box-shadow .18s, border-color .18s;
}
.exam-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-ink)); opacity: .9;
}
.exam-card.is-elec::before { background: linear-gradient(90deg, #f2733f, var(--orange)); }
.exam-card:hover {
  transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--blue-line); color: var(--ink);
}
.exam-card.is-elec:hover { border-color: var(--orange-line); }

.exam-card .code {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-ink); font-weight: 700;
}
.exam-card.is-elec .code { color: var(--orange-700); }
.exam-card .fecha { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.exam-card .meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }
.exam-card .meta b { color: var(--ink); }
.exam-card .go {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px; color: var(--orange-700);
}
.exam-card .go svg { width: 17px; height: 17px; transition: transform .18s; }
.exam-card:hover .go svg { transform: translateX(4px); }

.empty {
  text-align: center; color: var(--muted); background: var(--surface);
  border: 1px dashed var(--line); border-radius: var(--r); padding: 44px 24px;
}
.empty svg { width: 40px; height: 40px; color: var(--faint); margin: 0 auto 12px; }

/* ============================================================================
   PIE
   ========================================================================== */
.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px; flex-wrap: wrap; }
.foot span { font-size: 13px; color: var(--muted); }
.foot .call { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; color: var(--faint); }

/* ============================================================================
   BARRA DE EXAMEN (instrumento compacto)
   ========================================================================== */
.exam-bar {
  background: linear-gradient(120deg, var(--navy) 0%, #122e49 55%, var(--navy-2) 100%);
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: var(--sh-md);
}
.exam-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding-top: 11px; padding-bottom: 11px; }
.exam-bar .title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.exam-bar .title .t { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; color: #fff; }
.exam-bar .title .c {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--on-navy-dim); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 3px 9px;
}
.exam-bar .right { display: flex; align-items: center; gap: 12px; }

.timer {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-weight: 700; font-size: 18px; color: #d9f5e7;
  background: rgba(127,224,182,.10); border: 1px solid rgba(127,224,182,.28);
  padding: 7px 14px; border-radius: 11px; letter-spacing: .04em;
}
.timer .dot { width: 8px; height: 8px; border-radius: 50%; background: #44d99a; box-shadow: 0 0 8px #44d99a; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.timer.warn { color: #ffe2a8; background: rgba(255,196,84,.10); border-color: rgba(255,196,84,.3); }
.timer.warn .dot { background: #ffc454; box-shadow: 0 0 8px #ffc454; }
.timer.danger { color: #ffc6bb; background: rgba(232,87,30,.14); border-color: rgba(232,87,30,.4); }
.timer.danger .dot { background: var(--orange); box-shadow: 0 0 8px var(--orange); }

/* ============================================================================
   SHELL DEL EXAMEN
   ========================================================================== */
.exam-shell { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; padding: 28px 0 60px; }

.q-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-md); padding: 30px 32px 26px;
}
.q-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.q-num {
  font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(150deg, var(--blue) 0%, var(--blue-ink) 100%);
  padding: 5px 11px; border-radius: 8px; letter-spacing: .04em;
}
.q-of { font-family: var(--font-mono); font-size: 12.5px; color: var(--faint); }
.q-flag { margin-left: auto; }
.flag-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 12px; cursor: pointer; transition: all .15s;
}
.flag-btn svg { width: 15px; height: 15px; }
.flag-btn:hover { color: var(--ink); border-color: var(--blue-line); }
.flag-btn.on { color: var(--orange-700); background: var(--orange-soft); border-color: var(--orange-line); }

.q-text { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 1.4; letter-spacing: -0.01em; margin: 0 0 20px; }

.q-img {
  margin: 0 0 20px; padding: 14px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r);
}
.q-img img { margin: 0 auto; border-radius: 8px; max-height: 340px; width: auto; }

/* Opciones */
.options { display: flex; flex-direction: column; gap: 11px; }
.option {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 15px 17px; transition: border-color .14s, background .14s, box-shadow .14s, transform .08s;
}
.option input { position: absolute; opacity: 0; width: 0; height: 0; }
.option .key {
  flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; transition: all .14s;
}
.option .txt { font-size: 15.5px; color: var(--ink); }
.option:hover { border-color: var(--blue-line); background: var(--blue-soft); }
.option:hover .key { border-color: var(--blue-line); color: var(--blue-ink); }
.option.sel, .option:has(input:checked) {
  border-color: var(--orange); background: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(232,87,30,.12);
}
.option.sel .key, .option:has(input:checked) .key {
  background: var(--orange); border-color: var(--orange); color: #fff;
}
.option:has(input:focus-visible) { outline: 3px solid rgba(61,142,212,.5); outline-offset: 2px; }

.q-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; }

/* Mapa de preguntas (banda) */
.q-map { position: sticky; top: 86px; }
.q-map .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-md); padding: 20px;
}
.q-map h4 { font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: .01em; }
.q-map .sub { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin: 5px 0 16px; }
.q-map .sub span { color: var(--orange-700); font-weight: 700; }

.q-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin-bottom: 16px; }
.q-dot {
  aspect-ratio: 1; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 12.5px; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; transition: all .12s;
}
.q-dot:hover { border-color: var(--blue-line); color: var(--blue-ink); }
.q-dot.answered { background: var(--blue); border-color: var(--blue-ink); color: #fff; }
.q-dot.current { box-shadow: 0 0 0 2px var(--orange); border-color: var(--orange); }
.q-dot.flagged { position: relative; }
.q-dot.flagged::after {
  content: ""; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  background: var(--orange); border: 2px solid var(--surface); border-radius: 50%;
}

.q-legend { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line-soft); margin-bottom: 16px; padding-top: 14px; }
.q-legend span { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); }
.q-legend i { width: 14px; height: 14px; border-radius: 5px; flex: none; }
.q-legend i.a { background: var(--blue); }
.q-legend i.f { background: var(--surface-2); border: 1px solid var(--line); position: relative; }
.q-legend i.f::after { content: ""; position: absolute; top: -3px; right: -3px; width: 7px; height: 7px; background: var(--orange); border: 1.5px solid var(--surface); border-radius: 50%; }

.submit-side { width: 100%; }

/* ============================================================================
   RESULTADO
   ========================================================================== */
.result-head {
  background: linear-gradient(160deg, var(--navy) 0%, #112c46 60%, var(--navy-2) 100%);
  color: var(--on-navy); padding: 44px 0 40px; box-shadow: var(--sh-md);
}
.result-head .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }

.verdict { display: flex; align-items: center; gap: 28px; }
.gauge {
  --p: 0; flex: none; width: 132px; height: 132px; border-radius: 50%;
  display: grid; place-items: center; position: relative;
  background:
    radial-gradient(closest-side, var(--navy) 79%, transparent 80% 100%),
    conic-gradient(var(--gc, var(--green)) calc(var(--p) * 1%), rgba(255,255,255,.12) 0);
}
.gauge.fail { --gc: var(--orange); }
.gauge.pass { --gc: #2bd388; }
.gauge .pct { font-family: var(--font-mono); font-weight: 700; font-size: 34px; color: #fff; }
.gauge .pct small { font-size: 16px; color: var(--on-navy-dim); margin-left: 1px; }

.vtext .badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px; margin-bottom: 12px;
}
.vtext .badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.vtext .badge.pass { background: rgba(43,211,136,.16); color: #7fffc4; border: 1px solid rgba(43,211,136,.35); }
.vtext .badge.pass::before { background: #2bd388; box-shadow: 0 0 8px #2bd388; }
.vtext .badge.fail { background: rgba(232,87,30,.16); color: #ffb59a; border: 1px solid rgba(232,87,30,.4); }
.vtext .badge.fail::before { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.vtext h1 { color: #fff; font-size: 28px; font-weight: 700; margin: 0 0 8px; }
.vtext p { color: var(--on-navy-dim); font-size: 14.5px; margin: 0; max-width: 34em; }

.score-parts { display: grid; gap: 14px; }
.score-part {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--r); padding: 15px 17px;
}
.score-part .lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-navy-dim); }
.score-part .big { font-family: var(--font-display); font-weight: 700; font-size: 24px; color: #fff; margin: 4px 0 3px; }
.score-part .st { font-size: 12.5px; color: var(--on-navy-dim); margin-bottom: 9px; }
.score-part .st.ok { color: #7fffc4; }
.score-part .st.no { color: #ffb59a; }
.score-part .bar { height: 7px; background: rgba(255,255,255,.10); border-radius: 999px; overflow: hidden; }
.score-part .bar i { display: block; height: 100%; border-radius: 999px; background: #2bd388; }
.score-part .bar i.no { background: var(--orange); }

/* Filtros revisión */
.review-filters { display: flex; gap: 9px; margin-bottom: 22px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-body); font-size: 13.5px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; transition: all .14s;
}
.chip:hover { border-color: var(--blue-line); color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Revisión */
.review { display: flex; flex-direction: column; gap: 16px; }
.rev {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); padding: 22px 24px; border-left: 4px solid var(--green);
}
.rev.no { border-left-color: var(--red); }
.rev-top { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.rev-top .n { font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--faint); }
.rev-top .res {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.rev-top .res.ok { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }
.rev-top .res.no { background: var(--red-soft); color: var(--red); border: 1px solid var(--red-line); }
.rev .qq { font-family: var(--font-display); font-weight: 600; font-size: 16.5px; line-height: 1.4; margin: 0 0 15px; }
.rev .review-img { margin-bottom: 15px; }

.rev .opt {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px;
  font-size: 14.5px;
}
.rev .opt .k {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; color: var(--muted);
}
.rev .opt .mk {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.rev .opt.correct { background: var(--green-soft); border-color: var(--green-line); }
.rev .opt.correct .k { background: var(--green); border-color: var(--green); color: #fff; }
.rev .opt.correct .mk { background: var(--green); color: #fff; }
.rev .opt.chosen-wrong { background: var(--red-soft); border-color: var(--red-line); }
.rev .opt.chosen-wrong .k { background: var(--red); border-color: var(--red); color: #fff; }
.rev .opt.chosen-wrong .mk { background: var(--red); color: #fff; }

.explica {
  margin-top: 13px; font-size: 14px; color: var(--muted); line-height: 1.55;
  background: var(--blue-soft); border: 1px solid var(--blue-line); border-radius: 10px; padding: 12px 15px;
}
.explica b { color: var(--blue-ink); }

.result-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 920px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .result-head .wrap { grid-template-columns: 1fr; gap: 28px; }
  .exam-shell { grid-template-columns: 1fr; }
  .q-map { position: static; order: -1; }
  .q-grid { grid-template-columns: repeat(10, 1fr); }
}
@media (max-width: 620px) {
  .hero { padding: 36px 0 20px; }
  .hero-stats { gap: 22px; }
  .topbar nav a:not(:last-child) { display: none; }
  .q-card { padding: 22px 18px; }
  .exam-bar .wrap { flex-wrap: wrap; }
  .verdict { flex-direction: column; text-align: center; align-items: center; }
  .q-grid { grid-template-columns: repeat(8, 1fr); }
  .result-actions .btn { flex: 1; }
}

/* ============================================================================
   ACCESIBILIDAD / MOVIMIENTO REDUCIDO
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .scope .trace { stroke-dashoffset: 0; }
}

/* ============================================================================
   PROFESOR — animación al corregir el examen (overlay 5 s)
   ========================================================================== */
.prof-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 20px;
  background: rgba(8,22,36,.55);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.prof-overlay.prof-hide { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .45s ease, visibility .45s; }

.prof-card {
  position: relative; width: min(420px, 92vw);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg); padding: 18px 22px 24px; text-align: center;
  animation: prof-pop .6s cubic-bezier(.2,1.2,.35,1) both;
}
.is-pass .prof-card { border-top: 5px solid var(--green); }
.is-fail .prof-card { border-top: 5px solid var(--orange); }

.prof-skip {
  position: absolute; top: 10px; right: 12px; z-index: 3;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--faint); background: transparent; border: 0; cursor: pointer; padding: 6px 8px;
}
.prof-skip:hover { color: var(--ink); }
.prof-stage { position: relative; z-index: 1; }

.prof-stage { position: relative; height: 232px; display: grid; place-items: center; }
.prof-svg { width: 218px; height: auto; overflow: visible; }
.is-pass .prof-svg { animation: prof-bob 2.2s ease-in-out infinite .55s; }
.is-fail .prof-svg { animation: prof-shake .5s ease-in-out 4 .55s; }

/* Piezas del profesor */
.prof-svg .skin       { fill: #f4cda3; }
.prof-svg .hair       { fill: #d3dae1; }
.prof-svg .robe       { fill: var(--navy); }
.prof-svg .sleeve     { fill: none; stroke: var(--navy); stroke-width: 22; stroke-linecap: round; }
.prof-svg .collar     { fill: #ffffff; }
.prof-svg .stole-o    { fill: var(--orange); }
.prof-svg .stole-b    { fill: var(--blue); }
.prof-svg .bowtie     { fill: var(--orange); }
.prof-svg .bowtie-k   { fill: var(--orange-700); }
.prof-svg .glasses circle { fill: rgba(255,255,255,.35); stroke: #2a3a49; stroke-width: 3; }
.prof-svg .glasses path   { stroke: #2a3a49; stroke-width: 3; fill: none; }
.prof-svg .eye        { fill: #1b2a37; }
.prof-svg .shine      { fill: #ffffff; }
.prof-svg .brow       { fill: none; stroke: #9aa6b1; stroke-width: 5; stroke-linecap: round; }
.prof-svg .brow.angry { stroke: #6b7681; }
.prof-svg .blush      { fill: rgba(232,87,30,.22); }
.prof-svg .mouth-happy{ fill: #b8412f; }
.prof-svg .mouth-angry{ fill: #7c2417; }
.prof-svg .teeth      { fill: #ffffff; }
.prof-svg .cap-base   { fill: #13181f; }
.prof-svg .cap-board  { fill: #1b222b; }
.prof-svg .cap-btn    { fill: var(--orange); }
.prof-svg .tassel-cord{ fill: none; stroke: var(--orange); stroke-width: 3; }
.prof-svg .tassel rect{ fill: var(--orange); }
.prof-svg .tassel path{ stroke: var(--orange); stroke-width: 2.5; fill: none; }
.prof-svg .pointer    { stroke: #9a6233; stroke-width: 5; stroke-linecap: round; }
.prof-svg .pointer-tip{ fill: #ffffff; stroke: #9a6233; stroke-width: 2; }
.prof-svg .prof-shadow{ fill: rgba(8,22,36,.12); }
.prof-svg .anger-mark path { stroke: var(--red); stroke-width: 3; fill: none; stroke-linecap: round; }
.prof-svg .sparkle    { fill: var(--orange); transform-box: fill-box; transform-origin: center; }

/* Mostrar la cara según el resultado */
.prof-svg .face { display: none; }
.is-pass .prof-svg .face-happy { display: block; }
.is-fail .prof-svg .face-angry { display: block; }
.prof-svg .sparkles { display: none; }
.is-pass .prof-svg .sparkles { display: block; }

/* Animación de piezas */
.prof-svg .tassel, .prof-svg .tassel-cord { transform-box: view-box; transform-origin: 130px 60px; }
.is-pass .prof-svg .tassel,
.is-pass .prof-svg .tassel-cord { animation: prof-sway 1.8s ease-in-out infinite; }
.prof-svg .prof-arm { transform-box: view-box; transform-origin: 182px 196px; }
.is-pass .prof-svg .prof-arm { animation: prof-wave 1.1s ease-in-out infinite .55s; }
.is-fail .prof-svg .prof-arm { animation: prof-tap .34s ease-in-out infinite .55s; }
.is-pass .prof-svg .sparkle      { animation: prof-twinkle 1.4s ease-in-out infinite; }
.is-pass .prof-svg .sparkle.s2   { animation-delay: .45s; }
.is-pass .prof-svg .sparkle.s3   { animation-delay: .9s; }
.prof-svg .anger-mark { transform-box: view-box; transform-origin: 172px 88px; }
.is-fail .prof-svg .anger-mark { animation: prof-anger 1s ease-in-out infinite; }

.prof-bubble {
  margin-top: 6px; font-size: 16px; line-height: 1.45; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; animation: prof-bubble-in .4s ease .45s both;
}
.prof-bubble strong { font-family: var(--font-display); display: block; font-size: 21px; margin-bottom: 3px; letter-spacing: -0.01em; }
.is-pass .prof-bubble strong { color: var(--green); }
.is-fail .prof-bubble strong { color: var(--orange-700); }

@keyframes prof-pop { 0% { transform: scale(.6) translateY(24px); opacity: 0; } 60% { transform: scale(1.05) translateY(0); opacity: 1; } 100% { transform: scale(1); } }
@keyframes prof-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes prof-shake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(3deg); } }
@keyframes prof-sway { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(7deg); } }
@keyframes prof-wave { 0%,100% { transform: rotate(2deg); } 50% { transform: rotate(-12deg); } }
@keyframes prof-tap { 0%,100% { transform: rotate(0); } 50% { transform: rotate(-7deg); } }
@keyframes prof-twinkle { 0%,100% { opacity: .2; transform: scale(.6); } 50% { opacity: 1; transform: scale(1); } }
@keyframes prof-anger { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@keyframes prof-bubble-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
