:root {
  --navy: #0b1924;
  --navy2: #12314a;
  --teal: #0e8fa8;
  --cyan: #19b6d0;
  --green: #2e9e4f;
  --grey: #5a6872;
  --linea: #d6e2e8;
  --claro: #eef4f7;
  --papel: #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
  background: var(--papel);
  color: var(--navy);
  -webkit-text-size-adjust: 100%;
}

.banda {
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.banda .marca { font-weight: 700; letter-spacing: .06em; font-size: 13px; }
.banda .lema { font-size: 11px; color: #8fc4d4; letter-spacing: .04em; }

.aviso {
  margin: 12px 16px;
  padding: 10px 14px;
  border-left: 4px solid #c77700;
  background: #fff6e8;
  font-size: 13px;
  line-height: 1.45;
  color: #5a4a2e;
}
.aviso code { background: #00000012; padding: 1px 4px; border-radius: 3px; }

/* ---------------- Móvil: página de voto ---------------- */

.movil { max-width: 560px; margin: 0 auto; padding: 0 16px 48px; }

.espera {
  margin-top: 56px;
  text-align: center;
  color: var(--grey);
}
.espera .punto {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cyan);
  display: inline-block;
  margin: 0 3px;
  animation: late 1.4s infinite ease-in-out;
}
.espera .punto:nth-child(2) { animation-delay: .2s; }
.espera .punto:nth-child(3) { animation-delay: .4s; }
@keyframes late { 0%,80%,100% { opacity:.25 } 40% { opacity:1 } }

.etiqueta {
  margin: 20px 0 6px;
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}
.vineta {
  font-size: 15px;
  line-height: 1.5;
  color: #2c3c48;
  margin: 0 0 14px;
}
.pregunta {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 16px;
}

.opciones { display: grid; gap: 10px; }

button.opcion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  padding: 14px 14px;
  border: 1.5px solid var(--linea);
  border-radius: 12px;
  background: var(--papel);
  color: var(--navy);
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .06s;
  -webkit-tap-highlight-color: transparent;
}
button.opcion:active { transform: scale(.985); }
button.opcion .letra {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--claro);
  color: var(--navy2);
  font-weight: 700;
  font-size: 14px;
  display: grid;
  place-items: center;
}
button.opcion[aria-pressed="true"] {
  border-color: var(--teal);
  background: #e9f6fa;
}
button.opcion[aria-pressed="true"] .letra { background: var(--teal); color: #fff; }
button.opcion:disabled { cursor: default; opacity: 1; }
button.opcion.correcta { border-color: var(--green); background: #eaf7ee; }
button.opcion.correcta .letra { background: var(--green); color: #fff; }
button.opcion.fallida { opacity: .5; }

.confirmado {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--claro);
  font-size: 14px;
  color: var(--navy2);
}
.cambiar {
  margin-top: 10px;
  font-size: 13px;
  color: var(--teal);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

.pie {
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--linea);
  font-size: 11px;
  color: var(--grey);
  line-height: 1.5;
}

/* ---------------- Presentador ---------------- */

.pantalla {
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--papel);
}
.cabecera {
  background: var(--navy);
  color: #fff;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.cabecera .izq { font-weight: 700; letter-spacing: .07em; font-size: clamp(13px, 1.3vw, 18px); }
.cabecera .der { font-size: clamp(11px, 1.05vw, 15px); color: #8fc4d4; letter-spacing: .05em; text-align: right; }

.cuerpo {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  padding: 22px 34px;
  overflow: hidden;
}
@media (max-width: 1100px) { .cuerpo { grid-template-columns: 1fr 230px; gap: 20px; padding: 16px 20px; } }

.cuerpo h1 {
  font-size: clamp(20px, 2.1vw, 34px);
  line-height: 1.18;
  margin: 2px 0 10px;
}
.cuerpo .contexto {
  font-size: clamp(12px, 1.05vw, 16px);
  line-height: 1.45;
  color: #3a4b58;
  margin: 0 0 14px;
  max-width: 62ch;
}

.barras { display: grid; gap: clamp(8px, 1.4vh, 18px); align-content: start; }
.fila { display: grid; grid-template-columns: 34px 1fr 72px; align-items: center; gap: 12px; }
.fila .letra {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--claro); color: var(--navy2);
  font-weight: 700; display: grid; place-items: center;
  font-size: clamp(13px, 1.1vw, 16px);
}
.fila .pista {
  position: relative;
  background: var(--claro);
  border-radius: 8px;
  height: clamp(38px, 6vh, 72px);
  overflow: hidden;
}
.fila .relleno {
  position: absolute; inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  transition: width .45s cubic-bezier(.22,.8,.3,1);
}
.fila .texto {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 14px;
  font-size: clamp(12px, 1.12vw, 17px);
  line-height: 1.2;
  color: var(--navy);
}
.fila .pct { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: clamp(13px, 1.2vw, 19px); }

.fila.es-correcta .relleno { background: linear-gradient(90deg, #1f7d3c, var(--green)); }
.fila.es-correcta .letra { background: var(--green); color: #fff; }
.fila.es-correcta .texto { font-weight: 700; }
.fila.atenuada { opacity: .42; }

.lateral { display: grid; align-content: start; gap: 14px; justify-items: center; text-align: center; }
.lateral .qr {
  background: #fff;
  padding: 10px;
  border: 1px solid var(--linea);
  border-radius: 12px;
  width: 100%;
}
.lateral .qr img { width: 100%; display: block; image-rendering: pixelated; }
.lateral .url { font-size: clamp(11px, .95vw, 14px); font-weight: 700; color: var(--navy2); word-break: break-all; }
.lateral .instruccion { font-size: clamp(10px, .85vw, 12.5px); color: var(--grey); line-height: 1.4; }
.contador { font-size: clamp(26px, 3.4vw, 54px); font-weight: 800; color: var(--teal); line-height: 1; font-variant-numeric: tabular-nums; }
.contador span { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); margin-top: 4px; }

.respuesta {
  margin-top: 14px;
  border-left: 5px solid var(--green);
  background: #f2faf4;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
}
.respuesta .clave { font-size: clamp(13px, 1.25vw, 19px); font-weight: 700; margin: 0 0 6px; }
.respuesta .detalle { font-size: clamp(11px, 1vw, 14.5px); line-height: 1.45; margin: 0; color: #2c3c48; }
.respuesta .refs { font-size: clamp(10px, .85vw, 12px); color: var(--grey); margin: 8px 0 0; font-style: italic; }
.oculto { display: none !important; }

.mandos {
  background: var(--claro);
  border-top: 1px solid var(--linea);
  padding: 10px 28px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.mandos button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--navy2);
  background: #fff;
  color: var(--navy2);
  cursor: pointer;
}
.mandos button.activo { background: var(--navy2); color: #fff; }
.mandos button.peligro { border-color: #b3261e; color: #b3261e; }
.mandos .sep { flex: 1; }
.mandos .estado { font-size: 12px; color: var(--grey); }

.piecera {
  background: var(--navy);
  color: #7fb9cb;
  font-size: 11px;
  letter-spacing: .06em;
  padding: 7px 28px;
  display: flex;
  justify-content: space-between;
}
