/* Estilo editorial en tinta y papel. Sin color de marca a propósito:
   casi cualquier color vivo está asociado a algún partido. */
:root {
  --papel: #f6f4ef;
  --superficie: #ffffff;
  --tinta: #17212b;
  --suave: #5a6572;
  --linea: #e3dfd6;
  --tinte: #eceef0;
  --acento: #17212b;
  --acento-texto: #ffffff;
  --aviso-fondo: #fdf1c7;
  --aviso-texto: #4a3b00;
  --sombra: 0 1px 2px rgba(23, 33, 43, 0.05), 0 8px 24px rgba(23, 33, 43, 0.06);
  --radio: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, "Noto Serif", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --papel: #12161b;
    --superficie: #1b2128;
    --tinta: #eef0f2;
    --suave: #a3acb6;
    --linea: #2e3640;
    --tinte: #252d37;
    --acento: #eef0f2;
    --acento-texto: #12161b;
    --aviso-fondo: #4a3b00;
    --aviso-texto: #fdf1c7;
    --sombra: none;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: inherit; text-underline-offset: 0.18em; }
p { margin: 0 0 0.9rem; }
:focus-visible { outline: 3px solid var(--acento); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.oculto, .saltar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.saltar:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  width: auto;
  height: auto;
  clip-path: none;
}

.icono {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Estructura ---------- */

.cabecera {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--papel);
  border-bottom: 1px solid var(--linea);
}
.cabecera-interior, main, .pie-interior {
  max-width: 44rem;
  margin: 0 auto;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}
.cabecera-interior {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.25rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

.marca {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.marca svg { width: 1.9rem; height: 1.9rem; flex: none; }
.marca-fondo { fill: var(--acento); }
.marca-linea { fill: var(--acento-texto); }

nav { display: flex; gap: 0.25rem; margin: 0 -0.6rem; }
nav a {
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  font-size: 0.95rem;
  color: var(--suave);
  text-decoration: none;
}
nav a:hover { color: var(--tinta); }
nav a[aria-current="page"] { background: var(--tinte); color: var(--tinta); font-weight: 600; }

.aviso-ejemplo {
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  text-align: center;
  background: var(--aviso-fondo);
  color: var(--aviso-texto);
}

main { padding-top: 2rem; padding-bottom: 3rem; min-height: 60vh; }

.pie { border-top: 1px solid var(--linea); color: var(--suave); font-size: 0.9rem; }
.pie-interior { padding-top: 1.5rem; padding-bottom: 2rem; }

/* ---------- Texto ---------- */

h1, h2, .afirmacion {
  font-family: var(--serif);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1.12; margin: 0 0 0.8rem; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.4rem 0 0.6rem; }
h3 {
  margin: 1.6rem 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--suave);
}
h4 { font-size: 1.1rem; line-height: 1.35; margin: 0 0 0.45rem; }

.entradilla { font-size: 1.15rem; color: var(--suave); max-width: 36rem; }
.antetitulo, .rotulo, label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--suave);
}
.antetitulo { margin-bottom: 0.9rem; }
.suave { color: var(--suave); font-size: 0.93rem; }

.etiqueta {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: var(--tinte);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Piezas ---------- */

.tarjeta, .propuesta, .acceso {
  background: var(--superficie);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  box-shadow: var(--sombra);
}
.tarjeta { padding: 1.25rem; margin: 1rem 0; }
.tarjeta > :last-child, .propuesta > :last-child { margin-bottom: 0; }

.nota {
  padding: 0.9rem 1.1rem;
  margin: 1.25rem 0;
  border-radius: var(--radio);
  background: var(--tinte);
  font-size: 0.97rem;
}
.nota p { margin: 0; }

button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.35; cursor: default; }

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.6rem 1.3rem;
  border: 1.5px solid var(--acento);
  border-radius: 999px;
  background: transparent;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.boton:hover, .boton.principal { background: var(--acento); color: var(--acento-texto); }
.boton.principal:hover { opacity: 0.88; }

.enlace {
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: var(--suave);
  font-size: 0.95rem;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.enlace:hover:not(:disabled) { color: var(--tinta); }

.acciones { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 2rem 0 1rem; }

.campo { min-width: 0; }
label, .rotulo { margin-bottom: 0.45rem; }
select {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.6rem 2.6rem 0.6rem 0.9rem;
  border: 1.5px solid var(--linea);
  border-radius: 12px;
  background-color: var(--superficie);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 1.25rem) 55%, calc(100% - 0.9rem) 55%;
  background-size: 0.36rem 0.36rem;
  background-repeat: no-repeat;
}
select:hover { border-color: var(--suave); }

input[type="search"] {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.6rem 0.9rem;
  border: 1.5px solid var(--linea);
  border-radius: 12px;
  background: var(--superficie);
  font: inherit;
  color: inherit;
}
input[type="search"]::placeholder { color: var(--suave); }

details { border-top: 1px solid var(--linea); }
summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; font-size: 1.3rem; font-weight: 400; line-height: 1; color: var(--suave); }
details[open] > summary::after { content: "−"; }
details > :last-child { margin-bottom: 1rem; }
blockquote {
  margin: 0 0 0.6rem;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 3px solid var(--linea);
  font-family: var(--serif);
  font-style: italic;
  color: var(--suave);
}
.glosario details:last-child { border-bottom: 1px solid var(--linea); }
/* Definición de una palabra dentro de una propuesta o de una afirmación. */
.termino summary { font-weight: 400; font-size: 0.95rem; color: var(--suave); }
.termino p { font-size: 0.95rem; }

/* ---------- Inicio ---------- */

.portada { padding: 1.5rem 0 0; }
.portada h1 { font-size: clamp(2.7rem, 12vw, 4.2rem); line-height: 1; margin-bottom: 1rem; }

.accesos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 2.2rem; }
.acceso {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.3rem 1.2rem 1.2rem;
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s;
}
.acceso:hover { transform: translateY(-2px); border-color: var(--acento); }
.acceso .icono { width: 2rem; height: 2rem; margin-bottom: 1.6rem; }
.acceso strong { font-family: var(--serif); font-size: 1.45rem; line-height: 1.15; }
.acceso span { color: var(--suave); font-size: 0.92rem; line-height: 1.35; }
.acceso:first-child { background: var(--acento); border-color: var(--acento); color: var(--acento-texto); }
.acceso:first-child span { color: inherit; opacity: 0.75; }

.garantias {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  margin: 2.2rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--suave);
  font-size: 0.92rem;
}
.garantias li { display: flex; align-items: center; gap: 0.45rem; }
.garantias .icono { width: 1.15rem; height: 1.15rem; }

/* ---------- Provincia y filtros ---------- */

.provincia { margin-top: 1.6rem; }
.provincia .suave { margin-top: 0.9rem; }
.provincia-elegida {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.5rem;
  margin: 1.4rem 0;
  color: var(--suave);
}
.provincia-elegida strong { color: var(--tinta); }
.provincia-elegida .icono { width: 1.2rem; height: 1.2rem; }

.filtros { display: grid; gap: 1.2rem; margin: 1.5rem 0 1rem; }

.chips {
  display: flex;
  gap: 0.45rem;
  margin: 0 -1.15rem;
  padding: 0.15rem 1.15rem 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 2.5rem;
  padding: 0.35rem 0.95rem;
  border: 1.5px solid var(--linea);
  border-radius: 999px;
  background: var(--superficie);
  font-size: 0.95rem;
}
.chip:hover { border-color: var(--suave); }
.chip[aria-pressed="true"] { border-color: var(--acento); background: var(--acento); color: var(--acento-texto); font-weight: 600; }

/* ---------- Programas ---------- */

.partido { margin-top: 2.6rem; padding-top: 0.4rem; border-top: 2px solid var(--tinta); }
.partido header { margin-bottom: 0.9rem; }
.partido header h2 { margin: 0.9rem 0 0.15rem; font-size: 1.6rem; }
.partido header p { margin: 0; }

.propuesta { padding: 1.15rem 1.2rem 0.2rem; margin: 0.75rem 0; }
.propuesta details { margin-top: 0.3rem; }
.ejemplo { padding: 0.8rem 0.95rem; margin: 0.9rem 0; border-radius: 10px; background: var(--tinte); }
.ejemplo .etiqueta { padding: 0; margin-bottom: 0.25rem; background: none; color: var(--suave); }
.ejemplo p { margin: 0; font-size: 0.97rem; }

/* ---------- Test ---------- */

.progreso { height: 6px; border-radius: 999px; background: var(--linea); overflow: hidden; }
.progreso div { height: 100%; border-radius: 999px; background: var(--acento); transition: width 0.3s; }
.contador {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.9rem 0 0;
  color: var(--suave);
  font-size: 0.93rem;
}

.pregunta { padding: 1.5rem 1.3rem 0.3rem; }
.afirmacion { margin: 0 0 1.2rem; font-size: clamp(1.45rem, 5.4vw, 1.9rem); line-height: 1.22; }

.respuestas { display: grid; gap: 0.6rem; margin: 1.1rem 0; }
@media (min-width: 38rem) { .respuestas { grid-template-columns: repeat(3, 1fr); } }
.respuesta {
  min-height: 3.5rem;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--linea);
  border-radius: var(--radio);
  background: var(--superficie);
  font-size: 1.05rem;
  font-weight: 600;
  box-shadow: var(--sombra);
  transition: border-color 0.15s, transform 0.1s;
}
.respuesta:hover { border-color: var(--acento); }
.respuesta:active { transform: scale(0.985); }
.respuesta[aria-pressed="true"] { border-color: var(--acento); background: var(--acento); color: var(--acento-texto); }
/* "No lo sé, saltar": mismo tamaño que las respuestas, pero más discreto y en su propia fila. */
.respuesta.secundaria {
  grid-column: 1 / -1;
  min-height: 3rem;
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  font-weight: 400;
  color: var(--suave);
}

.doble {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 1.2rem 0 0;
  font-size: 0.97rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--tinta);
  cursor: pointer;
}
.doble input { flex: none; width: 1.3rem; height: 1.3rem; margin: 0.15rem 0 0; accent-color: var(--acento); }

.pasos {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--linea);
}

/* ---------- Resultados ---------- */

.resultados { padding: 0; margin: 1.25rem 0; list-style: none; }
.resultado { padding: 1.1rem 1.2rem; margin: 0.7rem 0; }
.resultado-cabecera { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.resultado-nombre { font-weight: 600; font-size: 1.08rem; }
.resultado-cifra { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; line-height: 1; white-space: nowrap; }
.barra { height: 10px; margin: 0.7rem 0 0.15rem; border-radius: 999px; background: var(--tinte); overflow: hidden; }
.resultado .suave { margin-top: 0.6rem; }
.barra div { height: 100%; border-radius: 999px; background: var(--acento); }

.posiciones { padding: 0; margin: 0 0 1rem; list-style: none; font-size: 0.97rem; }
.posiciones li { padding: 0.55rem 0; border-top: 1px dashed var(--linea); }
.deducida { margin-left: 0.4rem; font-size: 0.7rem; }

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