:root {
  --papel: #F5F6F8; --superficie: #FFFFFF; --tinta: #17202E; --gris: #5C6575; --linea: #D7DCE3;
  --bronce: #A97E2F; --bien: #2F7D5B; --mal: #B23A3A;
  --fuente: "Archivo", "Helvetica Neue", Arial, sans-serif;
  box-sizing: border-box; color-scheme: light;
  padding-top: env(safe-area-inset-top, 0px);
}
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--papel); color: var(--tinta); font-family: var(--fuente); font-size: 16px; line-height: 1.45; font-variant-numeric: tabular-nums; padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--bronce); outline-offset: 2px; }
h2 { font-stretch: 78%; font-weight: 750; font-size: 1.45rem; line-height: 1.1; margin: 26px 0 10px; }
.explica { color: var(--gris); margin: 0 0 12px; max-width: 64ch; }
.fuente { color: var(--gris); font-size: .8rem; }
.vacio { color: var(--gris); font-style: italic; }
.punto { width: 11px; height: 11px; border-radius: 50%; display: inline-block; flex: none; }
.sube { color: var(--bien); } .baja { color: var(--mal); }

/* Cabecera y pestañas */
.cabecera { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 14px 18px 4px; max-width: 760px; margin: 0 auto; }
.marca { font-stretch: 62%; font-weight: 800; font-size: 2rem; letter-spacing: -.02em; line-height: 1; }
.estado { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; text-align: right; line-height: 1.2; flex: none; }
.cuenta { color: var(--gris); font-size: .95rem; white-space: nowrap; }
.cuenta-act { color: var(--gris); font-size: .74rem; white-space: nowrap; }
@media (max-width: 400px) { .lema { display: none; } }
.cuenta strong { color: var(--tinta); }
.pestanas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-around; background: var(--superficie); border-top: 1px solid var(--linea); padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px)); }
.pestanas a { flex: 1 1 0; min-width: 0; text-align: center; text-decoration: none; color: var(--gris); font-size: .56rem; font-weight: 650; font-stretch: 80%; letter-spacing: -.01em; white-space: nowrap; padding: 6px 0 4px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pestanas a svg { width: 22px; height: 22px; fill: currentColor; }
.pestanas a.activa { color: var(--tinta); background: var(--papel); }
@media (max-width: 380px) { .pestanas a { font-size: .54rem; } .pestanas a svg { width: 20px; height: 20px; } }
.pestanas .largo { display: none; }
@media (min-width: 430px) and (max-width: 759px) { .pestanas a { font-size: .62rem; } }
.pestanas a.activa svg { fill: var(--bronce); }
@media (min-width: 760px) {
  body { padding-bottom: 40px; }
  .pestanas { position: sticky; top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--linea); justify-content: center; gap: 2px; padding: 8px 4px; }
  .pestanas a { flex: none; font-size: .86rem; font-stretch: 100%; letter-spacing: 0; padding: 8px 7px; flex-direction: row; gap: 5px; }
  .pestanas a svg { width: 20px; height: 20px; }
}
main { max-width: 760px; margin: 0 auto; padding: 4px 16px 24px; }
.pantalla[hidden] { display: none; }

/* Hoy */
.hero { background: var(--superficie); border-radius: 18px; padding: 18px 16px 14px; }
.titular { margin: 0 0 10px; font-size: 1.3rem; font-weight: 650; line-height: 1.3; }
.hero svg { width: 100%; height: auto; display: block; }
.leyenda { display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: center; font-size: .88rem; margin-top: 6px; }
.leyenda span { display: inline-flex; align-items: center; gap: 5px; }
.podio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.podio .tile { background: var(--superficie); border-radius: 14px; padding: 12px 10px 10px; border-top: 5px solid var(--c); }
.tile .n { font-stretch: 80%; font-weight: 750; font-size: 1.05rem; }
.tile .g { font-size: 1.7rem; font-weight: 800; line-height: 1.1; margin-top: 2px; }
.tile .s { color: var(--gris); font-size: .82rem; margin-top: 2px; }
.tile .d { font-size: .82rem; font-weight: 600; }
.resumen { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.resumen li { background: var(--superficie); border-radius: 12px; padding: 12px 14px; border-left: 4px solid var(--bronce); }
.titulares { display: grid; gap: 6px; }
.titular-n { display: block; background: var(--superficie); border-radius: 12px; padding: 10px 14px; text-decoration: none; }
.titular-n .m { display: block; color: var(--gris); font-size: .78rem; margin-top: 2px; }

/* Encuestas */
.lista-partidos { background: var(--superficie); border-radius: 16px; padding: 6px 14px; }
.fila-p { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--linea); }
.fila-p:first-child { border-top: 0; }
.fila-p .nom { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.fila-p .pct { font-size: 1.25rem; font-weight: 800; text-align: right; }
.fila-p .pct small { font-size: .78rem; font-weight: 600; margin-left: 6px; }
.fila-p .barra { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: var(--papel); overflow: hidden; }
.fila-p .barra i { display: block; height: 100%; border-radius: 4px; }
.fila-p .esc { grid-column: 1 / -1; color: var(--gris); font-size: .82rem; }
.ver-mas { display: block; width: 100%; margin: 4px 0 8px; padding: 10px; border: 2px solid var(--linea); border-radius: 12px; background: var(--papel); font: inherit; font-weight: 650; font-size: .92rem; color: var(--tinta); cursor: pointer; }
.cis-tabla { display: grid; grid-template-columns: minmax(0, 1.1fr) repeat(3, minmax(0, 1fr)); gap: 8px 10px; align-items: center; margin: 10px 0 6px; font-size: .95rem; }
.cis-tabla .cab { color: var(--gris); font-size: .78rem; }
.cis-tabla .nom { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.cis-tabla b { font-weight: 800; }
.cis-tabla .dif { color: var(--gris); font-size: .86rem; }
.grafico { position: relative; height: 280px; background: var(--superficie); border-radius: 16px; padding: 10px 8px 4px; }
.tarjetas { display: grid; gap: 8px; }
.tarjeta { background: var(--superficie); border-radius: 12px; padding: 10px 14px; }
.tarjeta .cab { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; }
.tarjeta .cab b { font-weight: 650; }
.tarjeta .cab span { color: var(--gris); white-space: nowrap; }
.etiqueta-nueva { font-size: .72rem; background: var(--bronce); color: #fff; border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.chip { font-size: .8rem; padding: 2px 8px; border-radius: 6px; color: #fff; white-space: nowrap; font-weight: 600; }

/* Mapa */
.conmutador { display: inline-flex; background: var(--superficie); border-radius: 999px; padding: 3px; margin-bottom: 10px; }
.conmutador button { border: 0; background: transparent; border-radius: 999px; padding: 7px 16px; cursor: pointer; color: var(--gris); font-weight: 600; }
.conmutador button[aria-pressed="true"] { background: var(--tinta); color: var(--papel); }
.mapa { background: var(--superficie); border-radius: 16px; padding: 10px; }
.mapa svg { width: 100%; height: auto; display: block; }
.mapa .tesela { cursor: pointer; }
.mapa .tesela rect { rx: 6; transition: opacity .15s; }
.mapa .tesela text { pointer-events: none; font-family: inherit; }
.mapa .tesela.sel rect { stroke: var(--tinta); stroke-width: 3; }
.ficha { background: var(--superficie); border-radius: 16px; padding: 14px 16px; margin-top: 10px; }
.ficha h3 { margin: 0 0 6px; font-stretch: 80%; font-size: 1.3rem; }
.ficha p { margin: 8px 0 0; }
.ajustadas { display: grid; gap: 6px; }
.ajustada { background: var(--superficie); border-radius: 12px; padding: 10px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; cursor: pointer; border: 0; text-align: left; width: 100%; }
.ajustada b { font-weight: 650; }
.ajustada .pts { font-size: 1rem; font-weight: 800; color: var(--mal); }
.ajustada .m { color: var(--gris); font-size: .82rem; grid-column: 1 / -1; }

/* Simulador */
#sim-hemiciclo { background: var(--superficie); border-radius: 16px; padding: 12px 10px 2px; }
#sim-hemiciclo svg { width: 100%; height: auto; display: block; }
.pactos { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.pacto { font-size: .86rem; border: 2px solid var(--linea); background: var(--superficie); border-radius: 999px; padding: 5px 12px 5px 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pacto[aria-pressed="true"] { border-color: var(--tinta); font-weight: 650; }
.suma-pacto { width: 100%; font-weight: 600; margin-top: 4px; }
.medidor { position: relative; height: 12px; background: var(--superficie); border-radius: 6px; margin-top: 6px; overflow: hidden; }
.medidor .lleno { position: absolute; inset: 0 auto 0 0; background: var(--tinta); }
.medidor .meta { position: absolute; top: -2px; bottom: -2px; width: 3px; background: var(--bronce); left: calc(176 / 350 * 100%); }
.boton { font-size: .9rem; border: 1px solid var(--linea); background: var(--papel); border-radius: 8px; padding: 8px 14px; cursor: pointer; justify-self: start; }

/* Más */
details { background: var(--superficie); border-radius: 16px; padding: 4px 16px; margin-top: 10px; }
summary { cursor: pointer; font-stretch: 78%; font-weight: 750; font-size: 1.25rem; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gris); font-weight: 400; }
details[open] summary::after { content: "–"; }
.fiabilidad { display: grid; }
.fila-f { display: grid; grid-template-columns: 1.6em 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--linea); font-size: .95rem; }
.fila-f .pos { color: var(--gris); }
.fila-f .m { color: var(--gris); font-size: .8rem; display: block; }
.fila-f .v { font-weight: 700; white-space: nowrap; }
.agenda { list-style: none; padding: 0; margin: 0; }
.agenda li { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--linea); font-size: .95rem; }
.agenda li.pasado { color: var(--gris); }
.agenda li.siguiente { font-weight: 650; }
.agenda li.siguiente .dia { color: var(--bronce); }
.agenda .det { display: block; color: var(--gris); font-weight: 400; font-size: .85rem; }
.fichas { display: grid; gap: 10px; padding-bottom: 10px; }
.ficha-p { border-left: 5px solid var(--c); padding: 4px 0 4px 12px; }
.ficha-p h3 { margin: 0 0 4px; font-size: 1.05rem; }
.ficha-p ul { list-style: none; padding: 0; margin: 0; }
.ficha-p li { padding: 5px 0; font-size: .9rem; }
.ficha-p li a { text-decoration: none; }
.ficha-p .m { color: var(--gris); font-size: .78rem; display: block; }
.ficha-p h4 { font-size: .82rem; color: var(--gris); margin: 8px 0 0; font-weight: 600; }
.tabla-scroll { overflow-x: auto; }
.tabla { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tabla th, .tabla td { text-align: left; padding: 8px; border-top: 1px solid var(--linea); vertical-align: top; }
.pie { color: var(--gris); font-size: .8rem; margin: 18px 4px 0; }
.aviso { background: color-mix(in srgb, var(--bronce) 18%, var(--superficie)); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }

/* Probabilidades */
.prob-barra { display: flex; height: 54px; border-radius: 12px; overflow: hidden; margin-top: 12px; }
.prob-barra div { display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1.25rem; min-width: 0; }
.prob-barra div small { font-size: .7rem; font-weight: 600; margin-left: 4px; opacity: .9; }
.prob-leyenda { display: grid; gap: 4px; margin-top: 10px; font-size: .92rem; }
.prob-leyenda div { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; }
.prob-leyenda i { width: 14px; height: 14px; border-radius: 4px; }
.prob-leyenda b { font-weight: 800; }
.compartir { margin-top: 12px; }
.abanicos { background: var(--superficie); border-radius: 16px; padding: 12px 14px 6px; }
.abanico { display: grid; grid-template-columns: 5.5em 1fr; align-items: center; gap: 10px; padding: 7px 0; }
.abanico .nom { font-weight: 650; font-size: .92rem; }
.abanico .pista { position: relative; height: 22px; }
.abanico .rango { position: absolute; top: 5px; height: 12px; border-radius: 6px; opacity: .45; }
.abanico .mediana { position: absolute; top: 2px; width: 4px; height: 18px; border-radius: 2px; }
.abanico .num { position: absolute; top: 0; font-size: .78rem; color: var(--gris); }
.abanico .m176 { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--bronce); left: calc(176 / 240 * 100%); }
.abanicos .eje { position: relative; height: 16px; margin-left: calc(5.5em + 10px); font-size: .72rem; color: var(--gris); }
.abanicos .eje span { position: absolute; transform: translateX(-50%); }
.hemi-pequeno { max-width: 420px; margin: 14px auto 0; }
.hemi-pequeno svg { width: 100%; height: auto; display: block; }
.claves { display: grid; gap: 8px; margin-bottom: 12px; }
.clave { background: var(--superficie); border-radius: 12px; padding: 12px 14px; }
.clave b { display: block; font-size: 1.05rem; }
.clave .m { color: var(--gris); font-size: .88rem; }
.grafico-bajo { height: 200px; margin-bottom: 12px; }
.veredicto { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-left: 6px; vertical-align: middle; color: #fff; }
.tarjeta .cab .veredicto, .tarjeta .cab .nota { white-space: nowrap; }
.tarjeta .cab .veredicto.ruido { background: #E6E9EE; color: #3D4654; }
.tarjeta .cab .veredicto.leve { background: #F3E3BF; color: #6B4E12; }
.tarjeta .cab .veredicto.movimiento { background: var(--mal); color: #fff; }
.tarjeta .cab .nota { color: var(--tinta); }
.nota { display: inline-block; min-width: 1.5em; text-align: center; font-size: .75rem; font-weight: 800; border-radius: 5px; padding: 1px 4px; background: var(--papel); color: var(--tinta); margin-left: 6px; vertical-align: middle; }
.tarjeta .ver { color: var(--gris); font-size: .86rem; margin-top: 6px; }
.sim-prob { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.sim-prob div { background: var(--superficie); border-radius: 12px; padding: 10px; text-align: center; }
.sim-prob b { display: block; font-size: 1.4rem; font-weight: 800; }
.sim-prob span { font-size: .78rem; color: var(--gris); }
.fila-bt { display: block; padding: 9px 0; border-top: 1px solid var(--linea); font-size: .92rem; }
.fila-bt > span:first-child { display: block; font-weight: 650; }
.fila-bt > span:not(:first-child) { display: inline-block; margin: 4px 14px 0 0; padding: 2px 8px; border-radius: 6px; background: var(--papel); font-size: .88rem; }
.fila-bt .m { color: var(--gris); font-size: .8rem; display: block; font-weight: 400; }
.fila-bt .real { font-weight: 800; }
.sesgos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sesgos span { font-size: .72rem; padding: 1px 6px; border-radius: 5px; background: var(--papel); }
.instalar { background: var(--superficie); border-radius: 12px; padding: 10px 14px; margin-top: 10px; display: none; }

/* Mapa real */
.mapa svg path, .mapa svg circle.prov { stroke: #fff; stroke-width: 1.5; cursor: pointer; }
.mapa svg .sel path, .mapa svg .sel circle.prov { stroke: var(--tinta); stroke-width: 3; }
.mapa svg text { pointer-events: none; font-family: inherit; }
.recuadro { fill: none; stroke: var(--linea); stroke-width: 2; }
.dhondt { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 8px; }
.dhondt th, .dhondt td { padding: 3px 5px; text-align: right; border-top: 1px solid var(--linea); white-space: nowrap; }
.dhondt th:first-child, .dhondt td:first-child { text-align: left; font-weight: 650; }
.dhondt td.gana { color: #fff; font-weight: 700; border-radius: 4px; }
.polemicas { display: grid; gap: 6px; }
.polemica { display: block; background: var(--superficie); border-radius: 12px; padding: 10px 14px 10px 12px; text-decoration: none; border-left: 5px solid var(--c); }
.polemica .m { display: block; color: var(--gris); font-size: .78rem; margin-top: 2px; }

/* ---------- Versión por preguntas ---------- */
.lema { color: var(--gris); font-size: .95rem; margin-left: 8px; }
.pregunta { background: var(--superficie); border-radius: 20px; padding: 18px 16px 14px; margin-top: 14px; box-shadow: 0 1px 2px rgba(23,32,46,.04); }
.pregunta h2 { margin: 0 0 8px; font-size: 1.5rem; }
.respuesta { font-size: 1.2rem; line-height: 1.4; margin: 0 0 14px; font-weight: 500; }
.respuesta b { font-weight: 800; }
.pie-bloque { color: var(--gris); font-size: .9rem; margin: 14px 0 6px; }
.como { background: var(--papel); border-radius: 12px; padding: 2px 14px; margin-top: 14px; box-shadow: none; }
.como summary { font-size: 1rem; font-weight: 650; font-stretch: 100%; padding: 10px 0; color: var(--gris); }
.como p { margin: 6px 0 10px; font-size: .95rem; }
.como h3 { font-size: 1rem; margin: 14px 0 4px; }

.barras-grandes { display: grid; gap: 10px; }
.bg { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.bg .nom { font-weight: 700; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.bg .num { font-weight: 800; font-size: 1.5rem; line-height: 1; }
.bg .num small { font-size: .8rem; font-weight: 500; color: var(--gris); margin-left: 4px; }
.bg .num small.sube { color: var(--bien); font-weight: 700; } .bg .num small.baja { color: var(--mal); font-weight: 700; }
.bg .pista { grid-column: 1 / -1; height: 18px; background: var(--papel); border-radius: 9px; overflow: hidden; }
.bg .pista i { display: block; height: 100%; border-radius: 9px; }
.resto { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.resto span { font-size: .85rem; padding: 4px 10px; border-radius: 999px; background: var(--papel); display: inline-flex; align-items: center; gap: 6px; }

.hemi { max-width: 500px; margin: 6px auto 0; }
.arco-txt { text-align: center; font-weight: 700; font-size: .95rem; margin: 2px 0 8px; min-height: 1.3em; }
.arco-txt i { display: inline-block; width: 22px; height: 5px; border-radius: 3px; vertical-align: middle; margin-right: 7px; }
.medidores, .medidor-detalle { --fondo: var(--superficie); --hueco: var(--papel); }
.pregunta .medidores, .pregunta .medidor-detalle { --fondo: var(--papel); --hueco: var(--superficie); }
.medidores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.medidor-a { background: var(--fondo); border: 2px solid transparent; border-radius: 14px; padding: 10px 6px; font: inherit; color: var(--tinta); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.medidor-a[aria-pressed="true"] { border-color: var(--tinta); }
.medidor-a .tit { font-size: .8rem; font-weight: 600; color: var(--gris); line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; }
.medidor-a .svg { width: 100%; max-width: 130px; }
.medidor-a svg { width: 100%; height: auto; display: block; }
.medidor-a b { font-size: .95rem; font-weight: 800; line-height: 1.15; min-height: 2.3em; display: flex; align-items: center; }
.medidor-detalle { margin-top: 8px; }
.medidor-detalle .pie-bloque { text-align: center; margin: 0; }
.medidor-detalle .caja { background: var(--fondo); border-radius: 14px; padding: 14px 14px 10px; }
.medidor-detalle .caja p { margin: 6px 0 0; font-size: .92rem; }
.barra-asientos { position: relative; height: 66px; margin: 6px 8px 0; }
.barra-asientos .pista { position: absolute; left: 0; right: 0; top: 26px; height: 12px; border-radius: 6px; background: var(--hueco); }
.barra-asientos .franja { position: absolute; top: 26px; height: 12px; border-radius: 6px; opacity: .45; }
.barra-asientos .hoy { position: absolute; top: 21px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; border: 3px solid var(--fondo); box-sizing: border-box; }
.barra-asientos .raya { position: absolute; top: 16px; height: 32px; border-left: 2px dashed var(--tinta); margin-left: -1px; }
.barra-asientos .eti-raya { position: absolute; top: -3px; transform: translateX(-50%); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.barra-asientos .n { position: absolute; top: 47px; font-size: .78rem; color: var(--gris); }
.barra-asientos .n.izq { transform: translateX(-100%); padding-right: 4px; }
.barra-asientos .n.der { padding-left: 4px; }
.barra-asientos .n.c { transform: translateX(-50%); font-weight: 800; color: var(--tinta); font-size: .86rem; }
.hemi svg { width: 100%; height: auto; display: block; }

.cambios { display: grid; gap: 8px; margin-bottom: 12px; }
.cambio { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--papel); }
.cambio .nom { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.cambio .d { font-weight: 800; font-size: 1.1rem; }
.cambio .m { color: var(--gris); font-size: .82rem; grid-column: 1 / -1; }

.selector { display: block; font-weight: 600; margin-bottom: 10px; }
#mapa .selector select { background: var(--superficie); }
.pregunta.texto p { margin: 8px 0 0; font-size: .96rem; line-height: 1.5; }
.pregunta .mapa { margin-top: 6px; }
.selector select { font: inherit; display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--linea); background: var(--papel); color: var(--tinta); font-weight: 500; }
.chips.grandes .chip { font-size: 1rem; padding: 6px 12px; border-radius: 8px; }

.situaciones { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.situacion { border: 2px solid var(--linea); background: var(--superficie); border-radius: 12px; padding: 12px; text-align: left; cursor: pointer; font-size: .95rem; font-weight: 600; line-height: 1.3; }
.situacion[aria-pressed="true"] { border-color: var(--tinta); background: var(--papel); }
.situacion small { display: block; color: var(--gris); font-weight: 400; font-size: .82rem; margin-top: 2px; }
.caso { border: 2px solid var(--linea); background: var(--superficie); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.caso h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 700; }
.caso-frase { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.caso-frase select { font: inherit; font-weight: 600; padding: 7px 8px; border-radius: 10px; border: 1px solid var(--linea); background: var(--papel); color: var(--tinta); max-width: 100%; }
.caso .pactos { margin: 10px 0 4px; }
.caso .pacto { font: inherit; font-size: .86rem; color: inherit; background: var(--papel); }
.caso .pacto.opcion { padding-left: 12px; }
.caso-extra { margin-top: 8px; font-size: .9rem; color: var(--gris); }
.caso-extra .pactos { margin-top: 6px; }
.caso-resumen { margin: 8px 0 0; font-size: .9rem; line-height: 1.45; }
.caso-botones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.caso-lista { list-style: none; margin: 0 0 10px; padding: 0; border-top: 1px solid var(--linea); }
.caso-lista li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--linea); font-size: .92rem; font-weight: 600; line-height: 1.3; }
.caso-lista button { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--linea); background: var(--papel); color: var(--gris); font-size: 1.1rem; line-height: 1; cursor: pointer; }

.backtest { margin-top: 8px; }
.backtest .fila-bt > span:first-child { font-weight: 600; }
.pie a { color: var(--tinta); }
.titulares .tag { display: inline-block; font-size: .72rem; font-weight: 700; color: #fff; padding: 1px 7px; border-radius: 5px; margin-right: 6px; vertical-align: middle; }

.mapa .etq { paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 4px; }
.coste .num small { color: var(--gris); font-weight: 500; font-size: .78rem; }
.mapa svg .cambia path, .mapa svg .cambia circle.prov { stroke: var(--bronce); stroke-width: 4; }
.mapa svg .sel.cambia path { stroke: var(--tinta); }
.resumen-dia { border-top: 6px solid var(--bronce); }
.resumen-dia h2 { font-size: 1.25rem; margin-bottom: 8px; }
.resumen-dia .fecha { color: var(--gris); font-size: .9rem; font-weight: 500; }
.resumen-dia .resumen { gap: 6px; }
.resumen-dia .resumen li { padding: 0; border: 0; background: transparent; }
.enlace-resumen { display: grid; grid-template-columns: 28px 1fr 18px; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--papel); border: 0; border-radius: 12px; padding: 11px 12px; font: inherit; color: inherit; cursor: pointer; text-decoration: none; line-height: 1.35; }
.enlace-resumen:hover { background: #ECEFF3; }
.enlace-resumen svg { width: 22px; height: 22px; fill: var(--bronce); }
.enlace-resumen .flecha { width: 18px; height: 18px; fill: var(--gris); }
.enlace-resumen small { display: block; color: var(--gris); font-size: .8rem; }
.destacada { outline: 3px solid var(--bronce); outline-offset: 2px; }

.perdidos { display: grid; gap: 6px; margin: 6px 0 10px; }
.perdido { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 10px; border-radius: 10px; background: var(--superficie); font-size: .9rem; }
.perdido b { display: flex; align-items: center; gap: 6px; }
.perdido .v { font-weight: 800; color: var(--mal); }
.perdido .m { grid-column: 1 / -1; color: var(--gris); font-size: .82rem; }
.sub { font-size: 1.1rem; margin: 18px 0 4px; }
.bg .pista.doble { background: #D7DCE3; }
.proporcional { display: grid; gap: 6px; }
.prop { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--papel); font-size: .92rem; }
.prop .nom { font-weight: 650; display: flex; align-items: center; gap: 6px; }
.prop .n { font-weight: 800; min-width: 2.2em; text-align: right; }
.prop .vs { color: var(--gris); font-size: .8rem; }
.prop .d { font-weight: 700; min-width: 2.6em; text-align: right; }
.filtro-empresas { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 10px; }
.filtro-empresas button { flex: none; border: 2px solid var(--linea); background: var(--superficie); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; color: var(--gris); }
.filtro-empresas button.mas { border-style: dotted; color: var(--tinta); }
.filtro-empresas button[aria-pressed="true"] { border-color: var(--tinta); color: var(--tinta); background: var(--papel); }
.filtro-empresas button small { font-weight: 500; opacity: .7; margin-left: 2px; }
.filtro-empresas button.en-media::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2e9e5b; margin-right: 6px; vertical-align: 1px; }
.filtro-empresas button.inactiva { border-style: dashed; opacity: .6; }
.leyenda-empresas { margin: -4px 0 10px; }
.tarjeta.abrible { cursor: pointer; }
.tarjeta .detalle { margin-top: 10px; border-top: 1px solid var(--linea); padding-top: 8px; font-size: .88rem; }
.tarjeta .detalle table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.tarjeta .detalle td, .tarjeta .detalle th { padding: 3px 4px; text-align: right; border-top: 1px solid var(--linea); font-weight: 500; }
.tarjeta .detalle th:first-child, .tarjeta .detalle td:first-child { text-align: left; font-weight: 650; }
.tarjeta .detalle thead th { color: var(--gris); font-size: .78rem; font-weight: 600; border: 0; }
.tarjeta .mas { color: var(--gris); font-size: .8rem; margin-top: 6px; }
.pares { display: grid; gap: 10px; }
.par { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.par .nom { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.par .dif { font-weight: 800; font-size: 1.1rem; }
.par .filas { grid-column: 1 / -1; display: grid; gap: 3px; }
.par .fila { display: grid; grid-template-columns: 6.2em 1fr 2.4em; align-items: center; gap: 8px; font-size: .82rem; color: var(--gris); }
.par .fila i { display: block; height: 12px; border-radius: 6px; }
.par .fila.tendria i { opacity: .35; }
.par .fila b { color: var(--tinta); text-align: right; }
.aviso-boton { display: block; width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; font-weight: 600; }
.tramos { margin: 0 0 8px; }
.tramos button { padding: 6px 12px; font-size: .85rem; }
.media-hoy { display: grid; gap: 6px; margin: 4px 0 8px; }
.peso { display: grid; grid-template-columns: 1fr 70px 3em; align-items: center; gap: 8px; font-size: .9rem; }
.peso small { color: var(--gris); font-size: .78rem; }
.peso .pista { height: 8px; background: var(--superficie); border-radius: 4px; overflow: hidden; }
.peso .pista i { display: block; height: 100%; background: var(--bronce); border-radius: 4px; }
.peso b { text-align: right; }

.enlace-resumen { box-sizing: border-box; grid-template-columns: 28px minmax(0, 1fr) 18px; }
.enlace-resumen > span { min-width: 0; overflow-wrap: anywhere; }
.pregunta .ficha { background: var(--papel); }

/* Modo partido */
.foco-tira { margin: 2px 0 10px; }
.foco-tira .eti { display: block; font-size: .78rem; color: var(--gris); font-weight: 600; margin: 0 2px 5px; }
.foco-tira .fila { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.foco-tira .fila::-webkit-scrollbar { display: none; }
.foco-tira button { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--linea); background: var(--superficie); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .84rem; font-weight: 600; color: var(--tinta); cursor: pointer; white-space: nowrap; }
.foco-tira button[aria-pressed="true"] { border-color: var(--tinta); }
.foco-caja:empty { display: none; }
.pregunta.foco { border-top: 6px solid var(--c); margin: 0 0 14px; }
.pregunta.foco h3 { font-size: 1rem; margin: 16px 0 6px; }
.pregunta.foco .ajustada, .pregunta.foco .titular-n { background: var(--papel); }
.pregunta.foco .titular-n { margin-top: 6px; }
.medidor-a.fijo { cursor: default; }
.fila-foco { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.6em; gap: 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--linea); font-size: .92rem; }
.fila-foco:first-of-type { border-top: 0; }
.fila-foco b { font-size: 1.05rem; text-align: right; }
.fila-foco small { color: var(--gris); }
.fila-foco > small { text-align: right; font-weight: 700; font-size: .8rem; }
.fila-foco > small.sube { color: var(--bien); } .fila-foco > small.baja { color: var(--mal); }

/* Titulares con foto */
.titular-n { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 12px 8px 8px; color: inherit; }
.pregunta .titular-n { background: var(--papel); }
.titular-n .foto, .titular-n .sello { width: 64px; height: 64px; border-radius: 9px; }
.titular-n .foto { object-fit: cover; display: block; background: var(--linea); }
.titular-n .sello { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem; letter-spacing: .03em; }
.titular-n .txt { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.titular-n .m { font-weight: 400; margin-top: 3px; }
.titular-n .tag { display: inline-block; font-size: .72rem; font-weight: 700; color: #fff; padding: 1px 7px; border-radius: 5px; margin-right: 6px; vertical-align: middle; }
.titular-n.grande { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0 0 12px; overflow: hidden; }
.titular-n.grande .foto { width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 0; }
.titular-n.grande .txt { padding: 0 14px; font-size: 1.15rem; font-weight: 750; line-height: 1.25; }
.ficha-p .titulares { margin-top: 6px; }

/* Hemiciclo tocable */
.hemi.tocable svg { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.leyenda button { display: inline-flex; align-items: center; gap: 5px; font: inherit; color: inherit; background: none; border: 0; padding: 3px 6px; margin: -3px -2px; border-radius: 8px; cursor: pointer; }
.leyenda button[aria-pressed="true"] { background: var(--papel); font-weight: 700; box-shadow: inset 0 0 0 2px var(--tinta); }
.hemi-ficha { position: relative; background: var(--papel); border-left: 5px solid var(--c); border-radius: 10px; padding: 10px 40px 10px 12px; margin: 8px 0 4px; display: grid; gap: 4px; font-size: .93rem; }
#simulador .hemi-ficha { background: var(--superficie); }
.hemi-ficha b { display: flex; align-items: center; gap: 7px; font-size: 1.02rem; }
.hemi-ficha .boton { margin-top: 4px; background: var(--superficie); font: inherit; font-size: .88rem; font-weight: 600; color: var(--tinta); }
#simulador .hemi-ficha .boton { background: var(--papel); }
.hemi-ficha .cerrar { position: absolute; top: 4px; right: 6px; width: 32px; height: 32px; border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--gris); cursor: pointer; }

@media (min-width: 900px) { .pestanas a { font-size: .9rem; padding: 8px 10px; gap: 6px; } .pestanas .largo { display: inline; } .pestanas .corto { display: none; } }
/* Metodología */
.pregunta.texto h3 { font-size: 1rem; margin: 16px 0 8px; }
.pregunta.texto a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tabla-palabras { display: grid; gap: 4px; margin: 10px 0 4px; }
.tabla-palabras span { background: var(--papel); border-radius: 8px; padding: 7px 12px; font-size: .92rem; }
.tabla-palabras b { display: inline-block; min-width: 7.2em; }

.pregunta .pactos { justify-content: center; }
.pregunta .pacto { background: var(--papel); font: inherit; font-size: .86rem; color: inherit; display: inline-flex; align-items: center; gap: 6px; }
.pacto.limpiar { border-style: dotted; padding-left: 12px; color: var(--gris); }
