/* 128 Preguntas. Pensado primero para el móvil y para leer cómodo: letra grande, mucho contraste.
   La seña de la casa es el rotulador amarillo sobre la línea de "cómo suena". */
:root {
  --papel: #ffffff;
  --fondo: #f2f4f8;
  --tinta: #10182b;
  --gris: #4a5466;
  --linea: #d5dae4;
  --marcador: #ffe45c;
  --rojo: #c8102e;
  --verde: #17794a;
  --titular: 'Bricolage Grotesque', Figtree, system-ui, sans-serif;
  --texto: Figtree, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: 18px/1.5 var(--texto); }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #2f6fed; outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- cabecera ---------- */
.cab { position: sticky; top: 0; z-index: 20; background: var(--papel); border-bottom: 2px solid var(--tinta); }
.cab .ancho { display: flex; align-items: center; gap: 14px; min-height: 58px; }
.marca { font: 800 22px/1 var(--titular); text-decoration: none; letter-spacing: -.02em; display: flex; align-items: baseline; gap: 6px; margin-right: auto; }
.marca b { background: var(--tinta); color: var(--papel); padding: 4px 7px 3px; border-radius: 7px; }
.cab nav { display: none; gap: 4px; }
.cab nav a { text-decoration: none; padding: 8px 10px; border-radius: 9px; font-size: 16px; }
.cab nav a:hover, .cab nav a[aria-current="page"] { background: var(--fondo); }
.cab nav a.pdf { border: 2px solid var(--tinta); font-weight: 700; }
#bmenu { border: 2px solid var(--tinta); background: var(--papel); border-radius: 10px; padding: 7px 14px; font-weight: 700; font-size: 16px; }
.cab nav.abierto { display: grid; position: absolute; left: 0; right: 0; top: 100%; background: var(--papel); border-bottom: 2px solid var(--tinta); padding: 8px 16px 16px; gap: 2px; }
.cab nav.abierto a { padding: 13px 8px; border-bottom: 1px solid var(--linea); border-radius: 0; font-size: 18px; }
.cab nav.abierto a.pdf { border: 2px solid var(--tinta); border-radius: 10px; margin-top: 10px; text-align: center; }

.ancho { max-width: 720px; margin: 0 auto; padding: 0 16px; }
main { padding: 22px 0 110px; }
main > .ancho { display: grid; gap: 18px; }

/* ---------- piezas ---------- */
h1 { font: 800 30px/1.12 var(--titular); letter-spacing: -.025em; }
h2 { font: 800 22px/1.2 var(--titular); letter-spacing: -.02em; }
h3 { font: 700 18px/1.3 var(--texto); }
.suave { color: var(--gris); }
.chico { font-size: 16px; }
.caja { background: var(--papel); border: 2px solid var(--tinta); border-radius: 14px; padding: 18px; display: grid; gap: 10px; }
.caja.lisa { border: 1px solid var(--linea); }
.bt { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 10px 18px; border: 2px solid var(--tinta); border-radius: 12px; background: var(--papel); font-weight: 700; text-decoration: none; text-align: center; }
.bt.p { background: var(--tinta); color: var(--papel); }
.bt:hover { background: var(--fondo); }
.bt.p:hover { background: #24304a; }
.bt.ch { min-height: 44px; padding: 6px 14px; font-size: 16px; display: inline-flex; }
.bt svg { width: 14px; height: 14px; fill: currentColor; flex: none; }
.dos-bt { display: grid; gap: 10px; }
.campo { width: 100%; min-height: 54px; border: 2px solid var(--tinta); border-radius: 12px; padding: 8px 14px; background: var(--papel); }
select.campo { appearance: none; background: var(--papel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2310182b' stroke-width='2.2'/%3E%3C/svg%3E") no-repeat right 16px center; padding-right: 44px; }
.estrella { color: var(--rojo); }
.aviso-legal { font-size: 15px; color: var(--gris); }

/* ---------- la ficha de una pregunta ---------- */
.miga { font-size: 15px; color: var(--gris); display: flex; gap: 6px 12px; flex-wrap: wrap; align-items: center; }
.miga a { text-decoration: underline; text-underline-offset: 3px; }
.ficha { position: relative; background: var(--papel); border: 2px solid var(--tinta); border-radius: 16px; padding: 46px 18px 20px; display: grid; gap: 12px; }
.ficha .num { position: absolute; top: -2px; left: 18px; background: var(--tinta); color: var(--papel); font: 800 20px/1 var(--titular); padding: 9px 12px 8px; border-radius: 0 0 10px 10px; }
.ficha .num small { font: 400 13px var(--texto); opacity: .75; margin-left: 4px; }
.en { font: 800 27px/1.18 var(--titular); letter-spacing: -.02em; }
.pron { font-size: 20px; line-height: 1.75; }
.pron mark, mark.pron { background: linear-gradient(transparent 12%, var(--marcador) 12%, var(--marcador) 88%, transparent 88%); color: var(--tinta); padding: 0 5px; margin: 0 -2px; border-radius: 3px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.es { color: var(--gris); font-size: 19px; }
.oir { display: flex; gap: 8px; flex-wrap: wrap; }
.resp { display: grid; gap: 12px; }
.resp > h2 { margin-top: 6px; }
.r { background: var(--papel); border: 1px solid var(--linea); border-left: 6px solid var(--tinta); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
.r .en { font-size: 22px; }
.r .pron { font-size: 18px; }
.r .es { font-size: 17px; }
.r.larga .en { font: 700 19px/1.3 var(--texto); letter-spacing: 0; }
.nota-oficial { font-size: 15px; color: var(--gris); border-top: 1px dashed var(--linea); padding-top: 8px; }
.pasos { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: var(--papel); border-top: 2px solid var(--tinta); padding-bottom: env(safe-area-inset-bottom); }
.pasos .ancho { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.pasos .bt { min-height: 52px; padding: 6px 8px; font-size: 16px; }
.pasos .bt[aria-pressed="true"] { background: var(--verde); border-color: var(--verde); color: #fff; }
.pasos .bt[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* ---------- portada ---------- */
.portada { background: var(--papel); border-bottom: 2px solid var(--tinta); margin: -22px 0 4px; padding: 30px 0 28px; }
.portada .ancho { display: grid; gap: 16px; }
.portada h1 { font-size: 36px; }
.portada h1 em { font-style: normal; background: linear-gradient(transparent 58%, var(--marcador) 58%, var(--marcador) 94%, transparent 94%); }
.reglas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.reglas div { border: 2px solid var(--tinta); border-radius: 12px; padding: 12px 6px; background: var(--papel); }
.reglas b { display: block; font: 800 30px/1 var(--titular); }
.reglas span { font-size: 14px; color: var(--gris); line-height: 1.25; display: block; margin-top: 4px; }
.temas a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 2px; border-top: 1px solid var(--linea); text-decoration: none; font-weight: 700; }
.temas a:first-child { border-top: 0; }
.temas a span { font-weight: 400; color: var(--gris); }
.avance { display: grid; gap: 6px; }
.tubo { height: 12px; border: 2px solid var(--tinta); border-radius: 8px; background: var(--papel); overflow: hidden; }
.tubo i { display: block; height: 100%; background: var(--verde); width: 0; }

/* ---------- lista ---------- */
.filtros { display: flex; gap: 8px; flex-wrap: wrap; }
.filtros button { border: 2px solid var(--tinta); background: var(--papel); border-radius: 30px; padding: 6px 14px; font-size: 16px; min-height: 42px; }
.filtros button[aria-pressed="true"] { background: var(--tinta); color: var(--papel); }
.lista { background: var(--papel); border: 2px solid var(--tinta); border-radius: 14px; overflow: hidden; }
.lista a { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 13px 14px; border-top: 1px solid var(--linea); text-decoration: none; }
.lista a:first-child { border-top: 0; }
.lista a:hover { background: var(--fondo); }
.lista .n { font: 800 20px/1.3 var(--titular); }
.lista .q { font-weight: 700; line-height: 1.3; }
.lista .q small { display: block; font-weight: 400; color: var(--gris); font-size: 16px; margin-top: 2px; }
.lista .ok { font-size: 13px; font-weight: 700; color: #fff; background: var(--verde); border-radius: 20px; padding: 2px 9px; visibility: hidden; }
.lista a.sabida .ok { visibility: visible; }
.lista h2 { padding: 14px 14px 6px; font-size: 18px; border-top: 2px solid var(--tinta); background: var(--fondo); }
.lista h2:first-child { border-top: 0; }

/* ---------- simulacro ---------- */
.opciones { display: grid; gap: 10px; }
.opciones button { text-align: left; min-height: 58px; padding: 12px 16px; border: 2px solid var(--tinta); border-radius: 12px; background: var(--papel); font-weight: 700; line-height: 1.3; }
.opciones button.bien { background: var(--verde); border-color: var(--verde); color: #fff; }
.opciones button.mal { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.opciones button:disabled { cursor: default; }
.marcador-ex { display: flex; justify-content: space-between; font-size: 16px; color: var(--gris); }
.resultado b { font: 800 44px/1 var(--titular); display: block; }

/* ---------- estados y libro ---------- */
.estados { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.estados a { border: 1px solid var(--linea); background: var(--papel); border-radius: 10px; padding: 11px 12px; text-decoration: none; font-size: 16px; }
.estados a:hover { border-color: var(--tinta); }
.dato { display: grid; gap: 4px; }
.dato .eti { font-size: 15px; color: var(--gris); }
.dato .val { font: 800 24px/1.2 var(--titular); }
.trae li { padding: 10px 0 10px 30px; border-top: 1px solid var(--linea); position: relative; }
.trae li:first-child { border-top: 0; }
.trae li::before { content: ''; position: absolute; left: 4px; top: 19px; width: 14px; height: 8px; border-left: 3px solid var(--verde); border-bottom: 3px solid var(--verde); transform: rotate(-45deg); }
.prosa { display: grid; gap: 12px; }
.prosa a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- pie ---------- */
.pie { background: var(--tinta); color: #c9d0de; padding: 26px 0 120px; font-size: 16px; }
.pie .ancho { display: grid; gap: 14px; }
.pie a { color: #fff; }
.pie nav { display: flex; gap: 6px 16px; flex-wrap: wrap; }
.pie strong { color: #fff; }

@media (min-width: 760px) {
  body { font-size: 19px; }
  .cab nav { display: flex; }
  #bmenu { display: none; }
  h1 { font-size: 38px; }
  .portada h1 { font-size: 50px; }
  .en { font-size: 34px; }
  .dos-bt { grid-template-columns: 1fr 1fr; }
  .estados { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ancho { max-width: 780px; }
  .pasos .bt { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .cab, .pasos, .pie, .oir, .no-imprimir { display: none !important; } body { background: #fff; font-size: 12pt; } main { padding: 0; } }

.pila-sim { display: grid; gap: 14px; }
