:root {
  --fondo: #f3efe6; --papel: #fffdf8; --tinta: #1d2433; --tinta-2: #535a67; --linea: #ddd5c4; --suave: #ebe5d8;
  --lacre: #a5402a; --lacre-osc: #86321f; --bien: #1c6a45; --bien-f: #e3f1e8; --mal: #a3281d; --mal-f: #f8e5e1; --foco: #2a4f86;
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 6px;
}
* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--fondo); color: var(--tinta); font: 400 1.0625rem/1.6 var(--sans); }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--lacre); }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -9999px; display: inline-flex; align-items: center; min-height: 44px; }
.saltar:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--papel); padding: 0 1rem; }
.ancho { width: min(100% - 2rem, 76rem); margin-inline: auto; }
@media (min-width: 1500px) { .ancho { width: min(100% - 4rem, 82rem); } }

.cabecera { border-bottom: 1px solid var(--linea); background: var(--papel); }
.cabecera .ancho { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 2rem; padding: .35rem 0; }
.marca { display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; font: 700 1.2rem/1 var(--serif); letter-spacing: -.01em; text-decoration: none; }
.marca-sello { width: 1.7rem; height: 1.7rem; }
.marca-sello rect { fill: var(--lacre); }
.marca-sello path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cabecera nav { min-width: 0; max-width: 100%; }
@media (max-width: 860px) { .cabecera nav { width: 100%; } }
.menu { list-style: none; padding: 0; display: flex; overflow-x: auto; scrollbar-width: none; margin-inline: -.5rem; }
.menu a { display: flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 .55rem; white-space: nowrap; font-size: .94rem; text-decoration: none; color: var(--tinta-2); border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--tinta); }
.menu a[aria-current] { color: var(--tinta); border-bottom-color: var(--lacre); }
.contador { display: inline-grid; place-items: center; min-width: 1.4rem; height: 1.4rem; padding: 0 .35rem; border-radius: 99px; background: var(--lacre); color: #fff; font-size: .78rem; font-weight: 700; line-height: 1; }
.contador[hidden] { display: none; }

body { display: flex; flex-direction: column; min-height: 100vh; }
main { padding: 1.5rem 0 3.5rem; flex: 1 0 auto; }
.migas ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; font-size: .9rem; color: var(--tinta-2); }
.migas li + li::before { content: "/"; margin: 0 .5rem; color: var(--linea); }
.migas a, .migas li[aria-current] { display: inline-flex; align-items: center; min-height: 44px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.05; margin: 1rem 0 1.1rem; max-width: 18ch; }
h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.2; margin: 3.5rem 0 1rem; }
h3 { font-size: 1.2rem; margin: 2rem 0 .75rem; }
.entrada { font-size: 1.15rem; color: var(--tinta-2); max-width: 44rem; }
.entrada b { color: var(--tinta); }
.nota { font-size: .9rem; color: var(--tinta-2); margin-top: .6rem; }
.independiente { margin-top: 1.25rem; padding-left: .75rem; border-left: 3px solid var(--lacre); }
.aviso { background: #fbefd9; color: #6e4300; padding: .7rem 1rem; border-radius: var(--r); margin-bottom: 1rem; }

.acciones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.boton, button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: 0 1.3rem; font: 600 1rem/1.2 var(--sans); border-radius: var(--r); border: 2px solid var(--tinta); background: var(--tinta); color: #fff; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.boton:hover, button:hover { color: #fff; background: #33405a; border-color: #33405a; }
.boton-2 { background: transparent; color: var(--tinta); }
.boton-2:hover { color: #fff; }
button:disabled { opacity: .4; cursor: default; pointer-events: none; }
button.enlace { all: unset; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; display: inline-flex; align-items: center; min-height: 44px; }
button.enlace:focus-visible { outline: 3px solid var(--foco); }
.boton .contador { background: var(--lacre); }

.cabeza.con-lado { display: grid; gap: 2rem 4rem; }
@media (min-width: 1000px) { .cabeza.con-lado { grid-template-columns: minmax(0, 1fr) 24rem; align-items: start; } .hoja { margin-top: 1.5rem; } }
@media (min-width: 1500px) { .cabeza.con-lado { grid-template-columns: minmax(0, 1fr) 27rem; } }
.hoja { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r); padding: 1.25rem 1.4rem 1.3rem; box-shadow: 0 1px 0 var(--linea), 0 6px 0 -3px var(--papel), 0 7px 0 -3px var(--linea); }
.hoja-t { font: 700 1.15rem/1.2 var(--serif); padding-bottom: .7rem; border-bottom: 2px solid var(--tinta); }
.hoja dl div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--linea); }
.hoja dt { color: var(--tinta-2); font-size: .92rem; }
.hoja dd { font-weight: 600; }
.reparto-t { display: inline-block; margin-right: .6rem; font-weight: 400; color: var(--tinta-2); white-space: nowrap; }
.reparto-t b { color: var(--tinta); }

.tareas { list-style: none; padding: 0; border-top: 1px solid var(--linea); }
.tareas a { display: grid; grid-template-columns: 3.2rem 1fr auto; align-items: center; gap: 1rem; padding: 1rem .25rem; border-bottom: 1px solid var(--linea); text-decoration: none; }
.tareas a::after { content: "→"; color: var(--tinta-2); font-size: 1.2rem; transition: transform .15s; }
.tareas a:hover { color: inherit; background: var(--papel); }
.tareas a:hover::after { transform: translateX(3px); color: var(--lacre); }
.tarea-n { font: 700 2.4rem/1 var(--serif); color: var(--lacre); text-align: center; }
.tarea-txt b { display: block; font-size: 1.08rem; }
.tarea-txt span { display: block; font-size: .92rem; color: var(--tinta-2); margin-top: .1rem; }
@media (min-width: 1000px) { .tareas { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; } }

.dos { display: grid; gap: 0 4rem; }
@media (min-width: 900px) { .dos { grid-template-columns: 1fr 1fr; } }
.dos > div > p { margin-top: .75rem; max-width: 36rem; }
.pasos { padding-left: 1.3rem; margin-bottom: 1.5rem; }
.pasos li { margin: .5rem 0; padding-left: .25rem; }
.pasos li::marker { font-family: var(--serif); font-weight: 700; color: var(--lacre); }

.faq { max-width: 50rem; }
@media (min-width: 1100px) { .faq { max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 4rem; } }
.faq dt { font-weight: 700; margin-top: 1.4rem; }
.faq dd { color: var(--tinta-2); margin-top: .3rem; }

/* Práctica y simulacro */
.caja { background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r); padding: clamp(1.1rem, 3vw, 2.25rem); margin-top: 2rem; max-width: 52rem; }
.cargando { color: var(--tinta-2); }
.progreso { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .25rem 1rem; font-size: .9rem; color: var(--tinta-2); }
.barra { height: 4px; background: var(--suave); border-radius: 2px; margin: .6rem 0 1.4rem; overflow: hidden; }
.barra i { display: block; height: 100%; background: var(--lacre); transition: width .2s; }
.enunciado { font: 600 clamp(1.2rem, 2.6vw, 1.45rem)/1.35 var(--serif); margin: .25rem 0 1.25rem; }
.opciones { display: grid; gap: .6rem; }
.opcion { justify-content: flex-start; text-align: left; min-height: 56px; padding: .8rem 1.1rem; font-weight: 500; line-height: 1.4; background: var(--papel); color: var(--tinta); border: 1px solid #c9bfab; }
.opcion:hover { background: var(--suave); color: var(--tinta); border-color: var(--tinta); }
.opcion[aria-pressed="true"] { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.opcion.bien, .opcion.bien:disabled { opacity: 1; background: var(--bien-f); border: 2px solid var(--bien); color: var(--tinta); }
.opcion.mal, .opcion.mal:disabled { opacity: 1; background: var(--mal-f); border: 2px solid var(--mal); color: var(--tinta); }
.opcion.bien::after { content: "✓"; margin-left: auto; color: var(--bien); font-weight: 700; }
.opcion.mal::after { content: "✗"; margin-left: auto; color: var(--mal); font-weight: 700; }
.tras:not(:empty) { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--linea); }
.tras p { margin-bottom: .6rem; max-width: 44rem; }
.tras .boton { margin-top: .5rem; }
.veredicto { font-weight: 700; }
.bien { color: var(--bien); } .mal { color: var(--mal); }
.fuente { font-size: .88rem; color: var(--tinta-2); }
.vacio-t { font: 600 1.3rem/1.3 var(--serif); margin-bottom: .5rem; }

.inicio .reglas { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.reglas li { padding: .65rem 0; border-bottom: 1px solid var(--linea); }
.sim-barra { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: calc(-1 * clamp(1.1rem, 3vw, 2.25rem)) calc(-1 * clamp(1.1rem, 3vw, 2.25rem)) 1rem; padding: .6rem clamp(1.1rem, 3vw, 2.25rem); background: var(--papel); border-bottom: 1px solid var(--linea); border-radius: var(--r) var(--r) 0 0; }
.reloj { font: 700 1.5rem/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.reloj.poco { color: var(--mal); }
.contestadas { font-size: .9rem; color: var(--tinta-2); }
.rejilla-t { margin: 2rem 0 .5rem; padding-top: 1.25rem; border-top: 1px solid var(--linea); font-size: .9rem; color: var(--tinta-2); }
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: .35rem; }
.atajo { margin: .75rem 0 0; font-size: .85rem; color: var(--tinta-2); }
@media (hover: none) { .atajo { display: none; } }
.rejilla button { min-height: 44px; padding: 0; font-weight: 600; background: var(--papel); color: var(--tinta-2); border: 1px solid #c9bfab; }
.rejilla button:hover { background: var(--suave); color: var(--tinta); }
.rejilla button.hecha { background: var(--suave); color: var(--tinta); border-color: var(--tinta-2); }
.rejilla button[aria-current] { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.sim-nav { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.sim-nav .boton:last-child { margin-left: auto; }
.confirmar:not(:empty) { margin-top: 1.25rem; padding: 1rem 1.1rem; background: #fbefd9; border-radius: var(--r); max-width: 52rem; }
.confirmar .acciones { margin-top: .75rem; }

.resultado > * + * { margin-top: .9rem; }
.veredicto-grande { font: 700 clamp(2.2rem, 6vw, 3.2rem)/1 var(--serif); }
.nota-grande { font: 400 1.3rem/1.2 var(--serif); }
.nota-grande b { font-size: 3rem; letter-spacing: -.02em; }
.tabla-envoltura { overflow-x: auto; border: 1px solid var(--linea); border-radius: var(--r); max-width: 28rem; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: .55rem .85rem; border-bottom: 1px solid var(--linea); }
thead th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--tinta-2); font-weight: 600; background: var(--suave); }
tbody tr:last-child > * { border-bottom: 0; }
.por-tarea td:last-child { text-align: right; white-space: nowrap; }
.fallos { padding-left: 0; list-style: none; }
.fallos li { padding: 1rem 0; border-top: 1px solid var(--linea); }
.fallos li p + p { margin-top: .3rem; }
.enunciado-chico { font-weight: 700; }

.lista-preguntas { padding-left: 2.2rem; max-width: 52rem; }
.lista-preguntas li { border-bottom: 1px solid var(--linea); break-inside: avoid; }
@media (min-width: 1100px) { .lista-preguntas { max-width: none; columns: 2; column-gap: 4rem; } }
.lista-preguntas li::marker { color: var(--tinta-2); font-size: .9rem; }
.lista-preguntas summary { cursor: pointer; padding: .8rem 0; min-height: 44px; font-weight: 500; }
.lista-preguntas summary:hover { color: var(--lacre); }
.lista-preguntas details p { margin-bottom: .5rem; color: var(--tinta-2); }
.lista-preguntas .respuesta { color: var(--bien); font-weight: 700; }
.lista-preguntas details[open] { padding-bottom: .6rem; }

.anuncio { min-height: 280px; margin: 2.5rem 0; }

.texto { max-width: 44rem; }
.texto h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; }
.texto p { margin-top: .6rem; }

.pie { border-top: 1px solid var(--linea); background: var(--papel); padding: 1.75rem 0 2rem; font-size: .92rem; color: var(--tinta-2); }
.pie p { max-width: 60rem; }
.pie-enlaces { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: .5rem; }
.pie-enlaces a { display: inline-flex; align-items: center; min-height: 44px; }

.cookies { position: fixed; inset: auto 1rem 1rem; z-index: 20; max-width: 40rem; margin-inline: auto; padding: 1rem 1.25rem; background: var(--papel); border: 1px solid var(--linea); border-radius: var(--r); box-shadow: 0 8px 24px rgb(0 0 0 / .14); }
.cookies-botones { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .75rem; }
.cookies-botones button { background: var(--papel); color: var(--tinta); }
.cookies-botones button:hover { background: var(--tinta); color: #fff; }

.nota a, .texto p a, .entrada a, .pie p a, .cookies p a, .dos p a, .faq a { display: inline-block; padding: .75rem 0; margin: -.75rem 0; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
