/* =========================================================
   TRES ARCOS — estilos del simulador político
   Usa las mismas variables del tema, así que respeta el
   color de acento y el modo oscuro sin tocar nada.
   ========================================================= */

#sim-politico {
  --sp-gap: 22px;
  font-family: 'Roboto', sans-serif;
  color: var(--ink);
  max-width: 720px;
  margin: 0 auto;
}
#sim-politico *,
#sim-politico *::before { box-sizing: border-box; }

/* ---------- textos base ---------- */
.sp-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
}
.sp-kicker { color: var(--accent); margin-bottom: 10px; }

/* ---------- portada ---------- */
.sp-portada { border-top: 3px solid var(--ink); padding-top: 22px; }
.sp-titulo {
  font-size: 34px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.02em;
  margin: 0 0 12px;
}
.sp-bajada { font-size: 16px; line-height: 1.55; color: var(--text-soft); margin: 0 0 26px; }

.sp-form { display: grid; gap: 14px; margin-bottom: 16px; }
.sp-form label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.sp-form input,
.sp-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-appearance: none;
  appearance: none;
}
.sp-form select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.sp-form input:focus,
.sp-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.sp-hint {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-soft);
  background: var(--paper-dim);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  margin: 0 0 22px;
}
.sp-legal { font-size: 11.5px; color: var(--muted); margin: 16px 0 0; }

/* ---------- botones ---------- */
.sp-btn {
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 13px 24px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
}
.sp-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.sp-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-btn-grande { width: 100%; padding: 16px 24px; font-size: 14px; }
.sp-btn-sec { background: none; color: var(--ink); }
.sp-btn-sec:hover { color: #fff; }

/* ---------- panel de medidores ---------- */
.sp-panel {
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 14px 0 16px;
  margin-bottom: 26px;
}
.sp-panel-cab {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-bottom: 16px;
}
.sp-panel-cab > div { min-width: 0; }
.sp-panel-cab strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.2; }
.sp-panel-cab .sp-eyebrow { font-size: 10px; margin-bottom: 2px; }
.sp-anio { font-size: 15px; color: var(--accent) !important; }
.sp-panel-cargo { flex: 1 1 180px; }

.sp-medidores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 20px;
}
.sp-medidor-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.sp-medidor-top b { font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.sp-barra { height: 4px; background: var(--paper-dim); border-radius: 2px; overflow: hidden; }
.sp-barra i { display: block; height: 100%; background: var(--ink); transition: width .35s ease; }
.sp-barra i.m1 { background: var(--accent); }
.sp-barra i.m5 { background: #2E7D32; }
.sp-barra i.m6 { background: #C62828; }
html[data-theme="dark"] .sp-barra i.m5 { background: #66BB6A; }
html[data-theme="dark"] .sp-barra i.m6 { background: #EF5350; }

.sp-nivel { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; font-style: italic; }

/* ---------- escena ---------- */
.sp-escena { animation: sp-entra .25s ease; }
@keyframes sp-entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .sp-escena { animation: none; }
  .sp-barra i { transition: none; }
}
.sp-escena-t {
  font-size: 24px;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}
.sp-escena-d { font-size: 14.5px; line-height: 1.55; color: var(--text-soft); margin: 0 0 20px; }

.sp-opciones { display: grid; gap: 10px; margin-top: 20px; }
.sp-opcion {
  display: block;
  width: 100%;
  text-align: left;
  font-family: 'Roboto', sans-serif;
  padding: 15px 17px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.sp-opcion:hover { border-color: var(--line); border-left-color: var(--accent); background: var(--paper-dim); }
.sp-opcion:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-op-t { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.35; }
.sp-op-t em { font-weight: 400; font-style: italic; color: var(--muted); }
.sp-op-d { display: block; font-size: 12.5px; line-height: 1.45; color: var(--muted); margin-top: 5px; }
.sp-opcion.sp-retiro { border-left-color: #C62828; }

/* ---------- consecuencia ---------- */
.sp-consec-t {
  font-size: 19px;
  line-height: 1.45;
  font-weight: 500;
  margin: 0 0 24px;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
}

/* ---------- resultado electoral ---------- */
.sp-resultado { text-align: center; padding: 8px 0 4px; }
.sp-resultado .sp-kicker { text-align: center; }
.sp-resultado-pct {
  font-size: 62px;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
  margin: 4px 0 14px;
  font-variant-numeric: tabular-nums;
}
.sp-gano .sp-resultado-pct { color: var(--accent); }
.sp-perdio .sp-resultado-pct { color: var(--muted); }
.sp-resultado .sp-escena-d { max-width: 420px; margin: 0 auto 22px; }

/* ---------- biografía final ---------- */
.sp-bio { border-top: 3px solid var(--ink); padding-top: 22px; }
.sp-bio-titulo {
  font-size: 32px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -.02em;
  margin: 0 0 14px;
}
.sp-bio-bajada { font-size: 16px; line-height: 1.6; color: var(--text-soft); margin: 0 0 18px; }
.sp-bio-veredicto {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 500;
  padding: 18px 20px;
  background: var(--paper-dim);
  border-left: 3px solid var(--accent);
  margin: 0 0 30px;
}
.sp-bio-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 7px;
  margin: 30px 0 14px;
}
.sp-bio-cargos, .sp-bio-hitos { list-style: none; margin: 0; padding: 0; }
.sp-bio-cargos li {
  font-size: 15px;
  line-height: 1.5;
  padding: 7px 0;
  border-bottom: 1px dotted var(--line);
}
.sp-bio-cargos b { color: var(--accent); font-variant-numeric: tabular-nums; margin-right: 10px; }
.sp-bio-hitos li {
  font-size: 14.5px;
  line-height: 1.5;
  padding: 6px 0 6px 18px;
  position: relative;
}
.sp-bio-hitos li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.sp-bio-vacio { font-size: 14.5px; color: var(--muted); font-style: italic; margin: 0; }
.sp-bio-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.sp-linea { list-style: none; margin: 0; padding: 0; }
.sp-linea li {
  font-size: 13.5px;
  line-height: 1.5;
  padding: 7px 0 7px 16px;
  border-left: 2px solid var(--line);
  color: var(--text-soft);
}
.sp-linea li span {
  display: inline-block;
  min-width: 42px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sp-linea li.sp-l-hito { border-left-color: var(--accent); color: var(--ink); font-weight: 500; }
.sp-linea li.sp-l-malo { border-left-color: #C62828; }

.sp-bio-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }

/* ---------- teléfono ---------- */
@media (max-width: 620px) {
  .sp-titulo { font-size: 27px; }
  .sp-bio-titulo { font-size: 26px; }
  .sp-escena-t { font-size: 20px; }
  .sp-consec-t { font-size: 17px; }
  .sp-resultado-pct { font-size: 50px; }
  .sp-medidores { grid-template-columns: repeat(2, 1fr); }
  .sp-bio-stats { grid-template-columns: 1fr; }
  .sp-panel-cab { gap: 8px 18px; }
  .sp-bio-acciones .sp-btn { flex: 1 1 100%; }
}

/* =========================================================
   AÑADIDOS DE LA VERSIÓN 2
   ========================================================= */

/* ---------- etiquetas de efecto ---------- */
.sp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.sp-chips.grande { margin: 0 0 22px; }
.sp-chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 8px; border-radius: 12px; white-space: nowrap;
  border: 1px solid var(--line); color: var(--muted);
}
.sp-chip.mas { color: #1B5E20; border-color: rgba(27,94,32,.35); background: rgba(27,94,32,.07); }
.sp-chip.menos { color: #B71C1C; border-color: rgba(183,28,28,.35); background: rgba(183,28,28,.07); }
.sp-chip.ideo { color: var(--ink); border-color: var(--line); }
.sp-chip.riesgo { color: #E65100; border-color: rgba(230,81,0,.4); background: rgba(230,81,0,.08); }
html[data-theme="dark"] .sp-chip.mas { color: #81C784; border-color: rgba(129,199,132,.4); background: rgba(129,199,132,.1); }
html[data-theme="dark"] .sp-chip.menos { color: #EF9A9A; border-color: rgba(239,154,154,.4); background: rgba(239,154,154,.1); }
html[data-theme="dark"] .sp-chip.riesgo { color: #FFB74D; border-color: rgba(255,183,77,.4); background: rgba(255,183,77,.1); }

/* ---------- medidor ideológico ---------- */
.sp-ideo { margin-top: 16px; }
.sp-ideo-linea {
  position: relative; height: 6px; border-radius: 3px; margin: 6px 0 5px;
  background: linear-gradient(90deg, #C62828 0%, var(--paper-dim) 50%, #1565C0 100%);
}
html[data-theme="dark"] .sp-ideo-linea { background: linear-gradient(90deg, #EF5350 0%, var(--paper-dim) 50%, #64B5F6 100%); }
.sp-ideo-linea i { position: absolute; top: 50%; transform: translate(-50%, -50%); }
.sp-ideo-yo {
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--paper); z-index: 2;
}
.sp-ideo-partido {
  width: 0; height: 0; top: -6px !important; transform: translateX(-50%) !important;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 7px solid var(--ink); opacity: .55;
}
.sp-ideo-pies { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.sp-alerta { color: #C62828; }
html[data-theme="dark"] .sp-alerta { color: #EF5350; }

/* ---------- noticias del país ---------- */
.sp-gob { font-size: 13.5px; color: var(--muted); margin: 0 0 12px; font-style: italic; }
.sp-noticias { list-style: none; margin: 0; padding: 0; }
.sp-noticias li {
  font-size: 15px; line-height: 1.5; padding: 11px 0 11px 16px;
  border-left: 2px solid var(--line); margin-bottom: 4px; color: var(--text-soft);
}
.sp-noticias li::first-line { color: var(--ink); }

/* ---------- tablas ---------- */
.sp-tabla-wrap { overflow-x: auto; margin: 18px 0 4px; -webkit-overflow-scrolling: touch; }
.sp-tabla { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sp-tabla th {
  text-align: left; font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted); font-weight: 700; padding: 0 8px 7px 0; border-bottom: 1px solid var(--ink);
}
.sp-tabla td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.sp-tabla .lug { width: 24px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-tabla .nom { font-weight: 500; }
.sp-tabla .nom em { color: var(--muted); font-size: 11.5px; font-style: normal; }
.sp-tabla .par { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sp-tabla .pct, .sp-tabla .vot { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-tabla .vot { color: var(--muted); font-size: 12.5px; }
.sp-tabla tr.electo td { font-weight: 700; }
.sp-tabla tr.yo td { background: var(--paper-dim); }
.sp-tabla tr.yo .nom { color: var(--accent); }
.sp-electo {
  font-size: 9px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700;
  color: var(--paper); background: var(--accent); padding: 2px 6px; border-radius: 10px; margin-left: 6px;
}
.sp-tabla-pie { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }
.sp-tabla.chica td { font-size: 13px; padding: 6px 8px 6px 0; }
.sp-tabla.chica .bar { width: 34%; }
.sp-tabla.chica .bar i { display: block; height: 5px; background: var(--accent); border-radius: 3px; opacity: .8; }

/* ---------- minijuegos ---------- */
.sp-mj { margin: 18px 0 22px; border-top: 1px solid var(--line); }
.sp-mj-fila {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.sp-mj-tit b { display: block; font-size: 15px; font-weight: 600; }
.sp-mj-tit span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.sp-mj-ctrl { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.sp-mj-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer;
}
.sp-mj-btn:hover { border-color: var(--accent); color: var(--accent); }
.sp-mj-num { min-width: 34px; text-align: center; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sp-opcion.sp-mj-sel.activo { border-left-color: var(--accent); background: var(--paper-dim); }
.sp-opcion.sp-mj-sel.activo .sp-op-t::before { content: '✓ '; color: var(--accent); }
.sp-btn[disabled] { opacity: .4; cursor: not-allowed; }
.sp-btn[disabled]:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- resultado ---------- */
.sp-resultado-sub { font-size: 13px; color: var(--muted); margin: -8px 0 16px; }

/* ---------- marcador final ---------- */
.sp-marcador {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line);
  padding: 16px 0; margin: 0 0 26px;
}
.sp-marcador strong { display: block; font-size: 27px; font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin-top: 3px; font-variant-numeric: tabular-nums; }
.sp-marcador div:first-child strong { color: var(--accent); }

/* ---------- veredicto con emojis ---------- */
.sp-veredicto { list-style: none; margin: 0 0 8px; padding: 0; }
.sp-veredicto li {
  display: flex; gap: 13px; align-items: flex-start;
  font-size: 16px; line-height: 1.5; padding: 11px 0; border-bottom: 1px dotted var(--line);
}
.sp-emo { font-size: 20px; line-height: 1.25; flex-shrink: 0; width: 26px; text-align: center; }

/* ---------- pestañas del ranking ---------- */
.sp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.sp-tab {
  font-family: 'Roboto', sans-serif; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 8px 14px; border-radius: 18px; cursor: pointer;
  border: 1px solid var(--line); background: none; color: var(--muted);
}
.sp-tab:hover { border-color: var(--accent); color: var(--accent); }
.sp-tab.activo { background: var(--ink); border-color: var(--ink); color: var(--paper); }

@media (max-width: 620px) {
  .sp-marcador { grid-template-columns: 1fr 1fr; }
  .sp-marcador div:first-child { grid-column: 1 / -1; }
  .sp-marcador strong { font-size: 23px; }
  .sp-mj-fila { flex-direction: column; align-items: flex-start; gap: 9px; }
  .sp-mj-ctrl { align-self: stretch; justify-content: space-between; }
  .sp-veredicto li { font-size: 15px; }
  .sp-tabla { font-size: 12.5px; }
  .sp-tabla .par { font-size: 11px; }
}

/* ---------- caja de plata ---------- */
.sp-panel-plata strong { color: var(--accent); white-space: nowrap; }
.sp-caja-plata {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  margin: 22px 0 4px; padding: 16px 18px;
  background: var(--paper-dim); border-radius: 4px;
  border-left: 3px solid var(--accent);
}
.sp-caja-plata strong {
  display: block; font-size: 26px; font-weight: 900; letter-spacing: -.03em;
  line-height: 1.1; margin-top: 3px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.sp-caja-plata > span { font-size: 12.5px; color: var(--muted); line-height: 1.5; text-align: right; max-width: 55%; }
.sp-menu { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.sp-menu .sp-btn { margin-top: 0; flex: 1; min-width: 130px; }
.sp-btn-riesgo { color: #B71C1C; border-color: rgba(183,28,28,.4); }
.sp-btn-riesgo:hover { background: #B71C1C; border-color: #B71C1C; color: #fff; }
.sp-btn-chico { padding: 9px 18px; font-size: 12px; margin-top: 0; white-space: nowrap; }

/* ---------- tienda ---------- */
.sp-tienda-cab {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; border-bottom: 3px solid var(--ink); margin-bottom: 4px;
}
.sp-tienda-cab .sp-escena-t { margin: 4px 0 0; }
.sp-tienda-plata { text-align: right; flex-shrink: 0; }
.sp-tienda-plata strong {
  display: block; font-size: 22px; font-weight: 900; color: var(--accent);
  letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sp-tienda { margin: 4px 0 20px; }
.sp-cat { margin-top: 24px; }
.sp-cat-t {
  font-family: 'Roboto', sans-serif; font-size: 11px; font-weight: 900;
  text-transform: uppercase; letter-spacing: .1em; color: var(--ink);
  margin: 0 0 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.sp-cat-t em { font-style: normal; font-weight: 500; color: var(--muted); letter-spacing: .04em; margin-left: 6px; }
.sp-articulo {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--line);
}
.sp-articulo.comprado { opacity: .45; }
.sp-articulo.sin-plata { opacity: .62; }
.sp-art-ico { font-size: 24px; line-height: 1.1; flex-shrink: 0; width: 30px; text-align: center; }
.sp-art-txt { flex: 1; min-width: 0; }
.sp-art-txt b { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; }
.sp-art-d { display: block; font-size: 13.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.sp-art-btn { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.sp-art-precio { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-art-ya, .sp-art-falta {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  font-weight: 700; color: var(--muted); white-space: nowrap;
}
.sp-art-falta { color: #B71C1C; text-transform: none; letter-spacing: 0; font-size: 12px; }
html[data-theme="dark"] .sp-art-falta { color: #EF9A9A; }

/* ---------- redes ---------- */
.sp-red-total { margin: 6px 0 20px; }
.sp-red-total strong {
  font-size: 40px; font-weight: 900; letter-spacing: -.04em; line-height: 1;
  display: block; font-variant-numeric: tabular-nums;
}
.sp-red-total span { font-size: 13px; color: var(--muted); }
.sp-redes { display: grid; gap: 10px; }
.sp-red { padding: 13px 15px; border-radius: 4px; background: var(--paper-dim); border-left: 3px solid var(--line); }
.sp-red-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sp-red-n { font-size: 14px; font-weight: 600; }
.sp-red-v { font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.sp-red-barra { height: 5px; border-radius: 3px; background: rgba(128,128,128,.18); margin-top: 9px; overflow: hidden; }
.sp-red-barra i { display: block; height: 100%; border-radius: 3px; }
.sp-red-ig { border-left-color: #D62976; } .sp-red-ig .sp-red-barra i { background: #D62976; }
.sp-red-tt { border-left-color: #00B8B8; } .sp-red-tt .sp-red-barra i { background: #00B8B8; }
.sp-red-fb { border-left-color: #1877F2; } .sp-red-fb .sp-red-barra i { background: #1877F2; }
.sp-red-x  { border-left-color: #55585C; } .sp-red-x  .sp-red-barra i { background: #55585C; }
.sp-red-yt { border-left-color: #C4302B; } .sp-red-yt .sp-red-barra i { background: #C4302B; }
.sp-red-nota { margin-top: 20px; font-size: 13.5px; }

/* ---------- carrera en la tabla de puntajes ---------- */
.sp-carrera {
  display: block; font-size: 11.5px; color: var(--muted);
  margin-top: 4px; line-height: 1.5;
}
.sp-carrera i { font-style: normal; opacity: .8; }
.sp-fecha { opacity: .7; font-size: 10.5px; }

@media (max-width: 620px) {
  .sp-caja-plata { flex-direction: column; align-items: flex-start; gap: 8px; }
  .sp-caja-plata > span { text-align: left; max-width: none; }
  .sp-tienda-cab { flex-direction: column; gap: 10px; }
  .sp-tienda-plata { text-align: left; }
  .sp-articulo { flex-wrap: wrap; }
  .sp-art-btn { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; margin-top: 4px; }
  .sp-menu { flex-direction: column; }
  .sp-menu .sp-btn { width: 100%; }
  .sp-red-total strong { font-size: 34px; }
}

/* ---------- sellos de la tienda ---------- */
.sp-sello {
  display: inline-block; font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  padding: 2px 7px; border-radius: 10px; vertical-align: 2px;
  border: 1px solid var(--line); color: var(--muted);
}
.sp-sello.permanente { color: var(--accent); border-color: rgba(255,107,0,.4); }

/* ---------- puerta a puerta ---------- */
.sp-puertas {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0 22px;
}
.sp-puerta {
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center;
  text-align: center; border-radius: 4px; padding: 6px;
  border: 1px solid var(--line); background: var(--paper-dim);
  font-size: 30px; cursor: pointer; font-family: inherit; color: var(--ink);
  transition: border-color .12s, transform .12s;
}
button.sp-puerta-btn:hover { border-color: var(--accent); transform: translateY(-2px); }
.sp-puerta.abierta { cursor: default; font-size: 11.5px; line-height: 1.35; font-weight: 600; }
.sp-puerta.abierta span { display: block; }
.sp-puerta.bien { border-color: rgba(27,94,32,.5); background: rgba(27,94,32,.09); color: #1B5E20; }
.sp-puerta.tibio { color: var(--muted); }
.sp-puerta.mal { border-color: rgba(183,28,28,.45); background: rgba(183,28,28,.08); color: #B71C1C; }
html[data-theme="dark"] .sp-puerta.bien { color: #81C784; }
html[data-theme="dark"] .sp-puerta.mal { color: #EF9A9A; }

/* ---------- redes, ajustes ---------- */
.sp-red-n em { display: block; font-style: normal; font-size: 11px; color: var(--muted); margin-top: 1px; }
.sp-red-v { text-align: right; }
.sp-red-v span { display: block; font-size: 9.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

@media (max-width: 620px) {
  .sp-puertas { grid-template-columns: repeat(3, 1fr); }
  .sp-puerta { font-size: 26px; }
  .sp-puerta.abierta { font-size: 10.5px; }
}

/* ---------- opciones que no puedes pagar ---------- */
.sp-opcion.bloqueada {
  cursor: not-allowed; opacity: .5;
  border-left-color: var(--line) !important; background: none;
}
.sp-opcion.bloqueada:hover { transform: none; }
.sp-op-bloq {
  display: block; margin-top: 9px; font-size: 11.5px; font-weight: 700;
  color: #B71C1C; letter-spacing: .01em;
}
html[data-theme="dark"] .sp-op-bloq { color: #EF9A9A; }

/* ---------- segunda fila de pestañas ---------- */
.sp-tabs-sec { margin-top: 8px; }
.sp-tabs-sec .sp-tab { font-size: 10.5px; padding: 6px 12px; }
.sp-tabs-sec .sp-tab.activo { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- subtítulo de la portada ---------- */
.sp-subtitulo {
  font-family: 'Roboto', sans-serif; font-size: 14px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .14em; color: var(--muted);
  margin: -6px 0 18px;
}

/* ---------- fichas del afiche ---------- */
.sp-afiche-grupo { margin-bottom: 18px; }
.sp-fichas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sp-ficha {
  font-family: 'Roboto', sans-serif; font-size: 13px; font-weight: 500;
  padding: 10px 15px; border-radius: 4px; cursor: pointer; text-align: left;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  transition: border-color .12s, background .12s;
}
.sp-ficha:hover { border-color: var(--accent); }
.sp-ficha.activa {
  border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700;
}

/* ---------- proyectos de ley ---------- */
.sp-leyes { margin: 20px 0 4px; }
.sp-leyes .sp-cat-t em { text-transform: none; letter-spacing: 0; }
.sp-ley { padding: 11px 0 12px; border-bottom: 1px solid var(--line); }
.sp-ley-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sp-ley-top b { font-size: 14px; font-weight: 600; line-height: 1.35; }
.sp-ley-top span {
  font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); white-space: nowrap; flex-shrink: 0;
}
.sp-ley-barra { height: 4px; border-radius: 2px; background: rgba(128,128,128,.18); margin-top: 8px; overflow: hidden; }
.sp-ley-barra i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.sp-noticias-ley li { border-left-color: var(--accent); }

/* ---------- portada del diario ---------- */
.sp-portada-diario {
  border: 2px solid var(--ink); padding: 16px 18px 14px; margin: 0 0 20px;
  background: var(--paper-dim);
}
.sp-portada-cab {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .16em;
  padding-bottom: 8px; border-bottom: 1px solid var(--ink); margin-bottom: 12px;
}
.sp-portada-t {
  font-family: 'Fraunces', Georgia, serif; font-weight: 900;
  font-size: 25px; line-height: 1.12; letter-spacing: -.02em; margin: 0;
}
.sp-portada-pie {
  font-size: 10px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin: 10px 0 0;
}

/* ---------- apodo ---------- */
.sp-apodo { font-size: 15px; color: var(--muted); margin: -8px 0 20px; }
.sp-apodo b { color: var(--accent); font-weight: 700; }

@media (max-width: 620px) {
  .sp-portada-t { font-size: 21px; }
}

/* ---------- balance del país ---------- */
.sp-tabla-pais .nom { font-weight: 500; }
.sp-tabla-pais .par, .sp-tabla-pais .pct { font-variant-numeric: tabular-nums; text-align: right; }
.sp-tabla-pais .par { color: var(--muted); }
.sp-tabla-pais .pct { font-weight: 700; color: var(--ink); }
.sp-dif { width: 26px; text-align: center; font-size: 12px; font-weight: 700; }
.sp-dif.mejor { color: #1B5E20; }
.sp-dif.peor { color: #B71C1C; }
.sp-dif.igual { color: var(--muted); }
html[data-theme="dark"] .sp-dif.mejor { color: #81C784; }
html[data-theme="dark"] .sp-dif.peor { color: #EF9A9A; }

/* ---------- denuncias ---------- */
.sp-noticias-denuncia li { border-left-color: #B71C1C; }
html[data-theme="dark"] .sp-noticias-denuncia li { border-left-color: #EF9A9A; }
.sp-espera {
  font-size: 12px; color: var(--muted); margin: 10px 0 0;
  padding-left: 16px; border-left: 2px dotted var(--line);
}

/* ---------- afinado general ---------- */
.sp-escena-t { text-wrap: balance; }
.sp-opcion { transition: border-color .14s, background .14s, transform .14s; }
.sp-btn { transition: background .14s, color .14s, border-color .14s; }
.sp-medidor-top b { font-variant-numeric: tabular-nums; }
.sp-panel { position: relative; }
.sp-panel::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1px; background: linear-gradient(90deg, var(--accent), transparent 65%);
}
.sp-tabla tbody tr { transition: background .12s; }
.sp-tabla tbody tr:hover { background: var(--paper-dim); }
.sp-resultado-pct { text-wrap: nowrap; }

/* =========================================================
   REVISIÓN DE DISEÑO
   Más aire entre bloques, jerarquía más clara y menos
   cuadritos pegados unos con otros.
   ========================================================= */

/* ---------- respiración general ---------- */
.sp-opciones { gap: 12px; margin-top: 24px; }
.sp-opcion { padding: 17px 19px; border-left-width: 4px; }
.sp-opcion:hover { border-left-color: var(--accent); transform: translateX(2px); }
.sp-op-t { font-size: 16px; }
.sp-op-d { font-size: 13px; margin-top: 6px; }
.sp-escena { margin-bottom: 8px; }
.sp-escena-t { margin-bottom: 10px; }
.sp-escena-d { margin-bottom: 4px; }
.sp-panel { margin-bottom: 30px; }

/* El botón principal nunca pegado al bloque anterior. */
.sp-btn { margin-top: 26px; }
.sp-opciones + .sp-btn,
.sp-opciones + .sp-menu,
.sp-mj + .sp-btn { margin-top: 22px; }

/* ---------- acciones secundarias bajo las opciones ---------- */
.sp-acciones-sec {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 26px; padding-top: 20px;
  border-top: 1px dashed var(--line);
}
.sp-acciones-sec .sp-btn { margin-top: 0; }
.sp-acciones-sec .sp-nota {
  font-size: 12.5px; color: var(--muted); margin: 0; align-self: center;
}

/* ---------- botón secundario, más liviano ---------- */
.sp-btn-sec {
  background: none; color: var(--ink); border-color: var(--line);
}
.sp-btn-sec:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- noticias con bajada ---------- */
.sp-noticias li {
  padding: 0; margin: 0 0 18px; border-left: 0;
  display: grid; grid-template-columns: 46px 1fr; gap: 14px; align-items: start;
}
.sp-noticias li:last-child { margin-bottom: 0; }
.sp-noti-sec {
  font-size: 8.5px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .08em; color: var(--paper); background: var(--ink);
  padding: 4px 0; text-align: center; border-radius: 2px; margin-top: 3px;
}
.sp-noti-sec.pais { background: var(--accent); }
.sp-noti-sec.dep { background: #1B5E20; }
.sp-noti-sec.tuyo { background: #B71C1C; }
.sp-noti-cuerpo { min-width: 0; }
.sp-noti-t {
  display: block; font-family: 'Fraunces', Georgia, serif;
  font-size: 17px; font-weight: 700; line-height: 1.28; letter-spacing: -.01em;
}
.sp-noti-b {
  display: block; font-size: 13px; line-height: 1.5;
  color: var(--muted); margin-top: 5px;
}
.sp-gob {
  font-style: normal; font-size: 13px; margin: 0 0 20px;
  padding: 11px 14px; background: var(--paper-dim); border-radius: var(--radius);
}

/* ---------- encuesta ---------- */
.sp-encuesta-cab {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding-bottom: 12px; border-bottom: 3px solid var(--ink); margin-bottom: 22px;
}
.sp-encuesta-casa { font-family: 'Fraunces', Georgia, serif; font-size: 21px; font-weight: 900; }
.sp-encuesta-margen { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }
.sp-encuesta-fila {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 18px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.sp-encuesta-cargo { font-size: 16px; font-weight: 600; }
.sp-encuesta-pct {
  font-size: 30px; font-weight: 900; letter-spacing: -.03em; line-height: 1;
  font-variant-numeric: tabular-nums; grid-row: span 2; align-self: center;
}
.sp-encuesta-barra {
  grid-column: 1; height: 8px; border-radius: 4px;
  background: rgba(128,128,128,.18); overflow: hidden; margin-top: 4px; position: relative;
}
.sp-encuesta-barra i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.sp-encuesta-barra u {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  background: var(--ink); text-decoration: none;
}
.sp-encuesta-nota { grid-column: 1 / -1; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sp-encuesta-nota b { color: var(--ink); }
.sp-encuesta-nota.entra b { color: #1B5E20; }
.sp-encuesta-nota.fuera b { color: #B71C1C; }
html[data-theme="dark"] .sp-encuesta-nota.entra b { color: #81C784; }
html[data-theme="dark"] .sp-encuesta-nota.fuera b { color: #EF9A9A; }

@media (max-width: 620px) {
  .sp-noticias li { grid-template-columns: 40px 1fr; gap: 11px; }
  .sp-noti-t { font-size: 15.5px; }
  .sp-encuesta-fila { grid-template-columns: 1fr; }
  .sp-encuesta-pct { grid-row: auto; font-size: 26px; }
  .sp-acciones-sec .sp-btn { width: 100%; }
}

/* ---------- juntar firmas ---------- */
.sp-firma[disabled] { cursor: default; opacity: .72; }
.sp-firma[disabled]:hover { transform: none; background: var(--paper); }
.sp-firma.sp-firma-si { border-left-color: #1B5E20; background: rgba(27,94,32,.06); opacity: 1; }
.sp-firma.sp-firma-si .sp-op-t::before { content: '✓ '; color: #1B5E20; }
.sp-firma.sp-firma-no { border-left-color: #B71C1C; opacity: .55; }
.sp-firma.sp-firma-no .sp-op-t::before { content: '✕ '; color: #B71C1C; }
html[data-theme="dark"] .sp-firma.sp-firma-si { background: rgba(129,199,132,.09); border-left-color: #81C784; }
html[data-theme="dark"] .sp-firma.sp-firma-si .sp-op-t::before { color: #81C784; }

/* ---------- presupuesto contra Hacienda ---------- */
.sp-mj-num.bajo { color: #B71C1C; }
html[data-theme="dark"] .sp-mj-num.bajo { color: #EF9A9A; }

/* =========================================================
   COLORES POR SECCIÓN DE NOTICIA
   Cada sección tiene su color fijo, siempre el mismo.
   ========================================================= */
.sp-noti-sec { background: #55585C; }
.sp-noti-sec.sec-pais        { background: #37474F; }
.sp-noti-sec.sec-politica    { background: #4A148C; }
.sp-noti-sec.sec-economia    { background: #1B5E20; }
.sp-noti-sec.sec-seguridad   { background: #B71C1C; }
.sp-noti-sec.sec-salud       { background: #00695C; }
.sp-noti-sec.sec-educacion   { background: #0D47A1; }
.sp-noti-sec.sec-agro        { background: #558B2F; }
.sp-noti-sec.sec-medioambiente { background: #00796B; }
.sp-noti-sec.sec-energia     { background: #E65100; }
.sp-noti-sec.sec-ciencia     { background: #283593; }
.sp-noti-sec.sec-tecnologia  { background: #4527A0; }
.sp-noti-sec.sec-transporte  { background: #455A64; }
.sp-noti-sec.sec-emergencia  { background: #BF360C; }
.sp-noti-sec.sec-sociedad    { background: #6A1B9A; }
.sp-noti-sec.sec-cultura     { background: #AD1457; }
.sp-noti-sec.sec-deportes    { background: #1B5E20; }

/* la etiqueta tiene que caber siempre */
.sp-noticias li { grid-template-columns: 82px 1fr; gap: 14px; }
.sp-noti-sec {
  font-size: 8px; letter-spacing: .06em; padding: 5px 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- barra de acciones arriba de las noticias ---------- */
.sp-barra-accion {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 22px 0 28px; padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.sp-barra-accion .sp-btn { margin-top: 0; }
.sp-barra-accion .sp-menu { margin-top: 0; flex: 1; min-width: 220px; }
.sp-barra-accion .sp-menu .sp-btn { min-width: 0; }
.sp-caja-plata { margin-top: 0; }

/* ---------- minuto final ---------- */
.sp-cierre-vista {
  font-family: 'Fraunces', Georgia, serif; font-size: 18px; line-height: 1.5;
  padding: 18px 20px; margin: 20px 0 0; border-left: 4px solid var(--accent);
  background: var(--paper-dim); border-radius: 0 var(--radius) var(--radius) 0;
}
.sp-ficha b { color: inherit; }

/* =========================================================
   CELULAR
   Todo el juego funciona con el pulgar, sin zoom.
   ========================================================= */
@media (max-width: 620px) {
  /* nada por debajo de 44px de alto, que es lo mínimo tocable */
  .sp-btn { padding: 15px 20px; width: 100%; }
  .sp-menu .sp-btn, .sp-barra-accion .sp-btn { width: 100%; }
  .sp-barra-accion { flex-direction: column; align-items: stretch; gap: 8px; }
  .sp-barra-accion .sp-menu { flex-direction: column; min-width: 0; width: 100%; }
  .sp-opcion { padding: 16px 15px; }
  .sp-mj-btn { width: 46px; height: 46px; font-size: 22px; }
  .sp-mj-num { min-width: 46px; font-size: 21px; }
  .sp-ficha { padding: 13px 15px; font-size: 14px; flex: 1 1 100%; }
  .sp-tab { padding: 11px 15px; }
  .sp-puerta { font-size: 30px; }
  .sp-btn-chico { padding: 12px 18px; width: auto; }

  /* que nada se salga de la pantalla */
  .sp-panel-cab { grid-template-columns: repeat(2, 1fr); gap: 12px 10px; }
  .sp-panel-cargo { grid-column: 1 / -1; }
  .sp-medidores { grid-template-columns: 1fr; }
  .sp-noticias li { grid-template-columns: 1fr; gap: 6px; }
  .sp-noti-sec { justify-self: start; padding: 4px 9px; }
  .sp-cierre-vista { font-size: 16px; padding: 15px 16px; }
  .sp-bio-titulo, .sp-titulo { font-size: 27px; line-height: 1.14; }
  .sp-form input, .sp-form select { font-size: 16px; }  /* evita el zoom de iOS */
  .sp-tabla-wrap { margin-left: -20px; margin-right: -20px; padding: 0 20px; }
}

@media (max-width: 400px) {
  .sp-puertas { grid-template-columns: repeat(3, 1fr); }
  .sp-marcador { grid-template-columns: 1fr; }
  .sp-marcador div:first-child { grid-column: auto; }
  .sp-op-t { font-size: 15px; }
  .sp-noti-t { font-size: 15px; }
}

/* nada de hover pegado en pantallas táctiles */
@media (hover: none) {
  .sp-opcion:hover { transform: none; background: var(--paper); border-left-color: var(--line); }
  .sp-opcion:active { background: var(--paper-dim); border-left-color: var(--accent); }
  .sp-btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
  .sp-btn:active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .sp-tabla tbody tr:hover { background: none; }
}

/* =========================================================
   PORTADA DEL DIARIO CON BAJADA
   ========================================================= */
.sp-portada-cab { gap: 12px; }
.sp-portada-sec { flex: 1; text-align: center; color: var(--accent); }
.sp-portada-b {
  font-size: 14.5px; line-height: 1.5; color: var(--text-soft);
  margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line);
}
.sp-portada-pie { margin-top: 12px; }

/* ---------- botones de la portada, juntos ---------- */
.sp-portada-acciones { display: grid; gap: 10px; margin-top: 28px; }
.sp-portada-acciones .sp-btn { margin-top: 0; }

/* =========================================================
   TABLA DE PUNTAJES
   ========================================================= */
.sp-rank-filtros {
  padding: 18px 0 16px; margin-bottom: 4px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.sp-rank-filtros .sp-tabs { margin: 0; }
.sp-rank-filtros .sp-tabs-sec { margin-top: 8px; }
.sp-rank-sub { font-size: 13px; color: var(--muted); margin: 14px 0 20px; }
.sp-rank-vacio {
  font-size: 15px; color: var(--muted); text-align: center;
  padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--radius);
}

.sp-rank { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.sp-rank-fila {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 14px;
  align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line);
}
.sp-rank-fila.podio { background: var(--paper-dim); padding: 16px 14px; margin: 0 -14px; }
.sp-rank-fila.p1 { box-shadow: inset 3px 0 0 var(--accent); }
.sp-rank-pos {
  font-size: 20px; font-weight: 900; text-align: center; line-height: 1.2;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.sp-rank-fila.podio .sp-rank-pos { font-size: 24px; }
.sp-rank-datos { min-width: 0; }
.sp-rank-nombre {
  display: block; font-family: 'Fraunces', Georgia, serif;
  font-size: 18px; font-weight: 700; line-height: 1.25;
}
.sp-rank-nombre em { font-style: normal; font-weight: 400; color: var(--accent); font-size: 15px; }
.sp-rank-cargo { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.sp-rank-cargo b { color: var(--ink); font-weight: 600; }
.sp-rank-carrera { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.sp-paso {
  font-size: 10.5px; padding: 3px 8px; border-radius: 11px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.sp-paso b { color: var(--ink); font-weight: 700; }
.sp-paso i { font-style: normal; opacity: .75; }
.sp-rank-pie { display: block; font-size: 11px; color: var(--muted); margin-top: 7px; opacity: .85; }
.sp-rank-cifra { text-align: right; min-width: 96px; }
.sp-rank-cifra b {
  display: block; font-size: 24px; font-weight: 900; letter-spacing: -.03em;
  line-height: 1; font-variant-numeric: tabular-nums;
}
.sp-rank-fila.p1 .sp-rank-cifra b { color: var(--accent); }
.sp-rank-cifra > span {
  display: block; font-size: 9.5px; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-top: 4px;
}
.sp-rank-barra {
  display: block; height: 4px; border-radius: 2px; margin-top: 8px;
  background: rgba(128,128,128,.18); overflow: hidden;
}
.sp-rank-barra i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }

@media (max-width: 620px) {
  .sp-rank-fila { grid-template-columns: 34px 1fr; gap: 10px; }
  .sp-rank-cifra {
    grid-column: 2; text-align: left; min-width: 0;
    display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; margin-top: 9px;
  }
  .sp-rank-cifra b { font-size: 20px; }
  .sp-rank-cifra > span { margin-top: 0; }
  .sp-rank-barra { width: 100%; margin-top: 6px; }
  .sp-rank-nombre { font-size: 16px; }
  .sp-portada-cab { flex-wrap: wrap; gap: 6px; }
  .sp-portada-sec { flex: 1 1 100%; text-align: left; order: 3; }
}

/* =========================================================
   BOTONES DE CONTINUAR
   Quedan al final del contenido, en su lugar de siempre.
   ========================================================= */
.sp-btn-fijo { position: static; }

/* ---------- barra de volver, arriba del contenido ---------- */
.sp-volver-barra { margin: 0 0 18px; }
.sp-volver-barra .sp-btn { margin-top: 0; }

/* ---------- separador en las fichas de carrera ---------- */
.sp-paso u { text-decoration: none; opacity: .45; margin: 0 5px; }
.sp-paso i { font-style: normal; opacity: .8; }

@media (max-width: 620px) {
  .sp-volver-barra .sp-btn { width: auto; }
}

/* ---------- portada del juego, más simple ---------- */
.sp-cabecera {
  text-align: center;
  padding: 10px 0 22px;
  margin-bottom: 24px;
  border-bottom: 3px solid var(--ink);
}
.sp-cabecera .sp-titulo {
  font-size: 54px; letter-spacing: -.045em; line-height: .95;
  margin: 0;
}
.sp-cabecera .sp-subtitulo {
  margin: 8px 0 0; font-size: 12px; letter-spacing: .22em;
  color: var(--accent); font-weight: 700;
}
.sp-portada .sp-bajada {
  text-align: center; font-size: 16px; line-height: 1.55;
  max-width: 460px; margin: 0 auto 26px;
}
@media (max-width: 620px) {
  .sp-cabecera .sp-titulo { font-size: 42px; }
  .sp-cabecera .sp-subtitulo { font-size: 11px; letter-spacing: .18em; }
  .sp-portada .sp-bajada { font-size: 15px; }
}

/* =========================================================
   APORTES DE CAMPAÑA
   ========================================================= */
.sp-aportes { margin: 20px 0 6px; border-top: 1px solid var(--line); }
.sp-aporte {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.sp-aporte-txt b { display: block; font-size: 15px; font-weight: 600; line-height: 1.3; }
.sp-aporte-txt span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.sp-aporte-monto {
  font-size: 16px; font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.sp-aporte.turbio { border-left: 3px solid #B71C1C; padding-left: 12px; }
.sp-aporte.turbio .sp-aporte-monto { color: #B71C1C; }
.sp-aporte.total {
  border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 16px; margin-top: 4px;
}
.sp-aporte.total .sp-aporte-txt b { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.sp-aporte.total .sp-aporte-monto { font-size: 24px; font-weight: 900; color: var(--accent); letter-spacing: -.02em; }
.sp-aviso-turbio {
  font-size: 13px; line-height: 1.5; color: #B71C1C;
  padding: 13px 15px; margin: 18px 0 0;
  background: rgba(183,28,28,.07); border-left: 3px solid #B71C1C; border-radius: 0 var(--radius) var(--radius) 0;
}
html[data-theme="dark"] .sp-aporte.turbio { border-left-color: #EF9A9A; }
html[data-theme="dark"] .sp-aporte.turbio .sp-aporte-monto,
html[data-theme="dark"] .sp-aviso-turbio { color: #EF9A9A; border-left-color: #EF9A9A; }

/* ---------- rendiciones del Servel ---------- */
.sp-noticias-servel {
  list-style: none; margin: 0 0 4px; padding: 0;
  display: grid; gap: 10px;
}
.sp-noticias-servel li {
  display: grid; grid-template-columns: 32px 1fr; gap: 12px;
  align-items: start; margin: 0; padding: 14px 16px;
  border: 1px solid var(--line); border-left-width: 3px;
  border-radius: var(--radius); background: var(--paper-dim);
}
.sp-noticias-servel li::before {
  content: 'SERVEL';
  writing-mode: vertical-rl; text-orientation: mixed;
  font-size: 8px; font-weight: 900; letter-spacing: .12em;
  color: var(--muted); align-self: center; justify-self: center;
  opacity: .7;
}
.sp-noticias-servel li b {
  display: block; font-family: 'Roboto', sans-serif;
  font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--ink);
}
.sp-noticias-servel li span {
  display: block; font-size: 13px; color: var(--muted);
  line-height: 1.5; margin-top: 4px;
}
.sp-noticias-servel li.ok { border-left-color: #1B5E20; }
.sp-noticias-servel li.ok::before { color: #1B5E20; opacity: .85; }
.sp-noticias-servel li.mal { border-left-color: #B71C1C; }
.sp-noticias-servel li.mal::before { color: #B71C1C; opacity: .85; }
.sp-noticias-servel li.mal b { color: #B71C1C; }
html[data-theme="dark"] .sp-noticias-servel li.ok { border-left-color: #81C784; }
html[data-theme="dark"] .sp-noticias-servel li.ok::before { color: #81C784; }
html[data-theme="dark"] .sp-noticias-servel li.mal { border-left-color: #EF9A9A; }
html[data-theme="dark"] .sp-noticias-servel li.mal::before,
html[data-theme="dark"] .sp-noticias-servel li.mal b { color: #EF9A9A; }

@media (max-width: 620px) {
  .sp-aporte { flex-direction: column; gap: 6px; }
  .sp-aporte-monto { align-self: flex-end; }
  .sp-aporte.total { flex-direction: row; align-items: baseline; }
}

/* ---------- avisos de error en el formulario ---------- */
.sp-error {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  color: #B71C1C;
  margin-top: 6px;
  font-weight: 500;
}
.sp-error:empty { display: none; }
.sp-form input.sp-malo,
.sp-form select.sp-malo {
  border-color: #B71C1C;
  box-shadow: 0 0 0 2px rgba(183, 28, 28, .12);
}
html[data-theme="dark"] .sp-error { color: #EF9A9A; }
html[data-theme="dark"] .sp-form input.sp-malo { border-color: #EF9A9A; }

/* ---------- cargos por nombramiento en el ranking ---------- */
.sp-paso.designado { border-style: dashed; }
.sp-paso.designado b { opacity: .85; }

/* ---------- aviso de riesgo en el panel ---------- */
.sp-riesgo-aviso {
  font-size: 12.5px; line-height: 1.45; color: #B71C1C;
  margin: 14px 0 0; padding: 9px 12px;
  background: rgba(183,28,28,.07);
  border-left: 3px solid #B71C1C; border-radius: 0 var(--radius) var(--radius) 0;
}
html[data-theme="dark"] .sp-riesgo-aviso { color: #EF9A9A; border-left-color: #EF9A9A; }

/* ---------- posición ideológica en el panel ---------- */
.sp-panel-cab strong { text-transform: none; }

@media (max-width: 620px) {
  .sp-noticias-servel li { grid-template-columns: 24px 1fr; gap: 9px; padding: 12px 13px; }
  .sp-noticias-servel li::before { font-size: 7px; }
  .sp-noticias-servel li b { font-size: 13.5px; }
}

/* =========================================================
   REVISIÓN DE ESPACIADO Y DETALLES
   ========================================================= */

/* ---------- los atributos necesitan aire ---------- */
.sp-medidores { gap: 18px 26px; margin-top: 20px; }
.sp-medidor-top { margin-bottom: 7px; }
.sp-panel-cab { gap: 16px 22px; padding-bottom: 18px; margin-bottom: 4px; }
.sp-ideo { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.sp-nivel { margin-top: 16px; }

/* ---------- el aviso de riesgo, ahora es un botón ---------- */
button.sp-riesgo-aviso {
  display: block; width: 100%; text-align: left; cursor: pointer;
  font-family: 'Roboto', sans-serif; font-size: 12.5px; line-height: 1.45;
  color: #B71C1C; margin: 16px 0 0; padding: 11px 14px;
  background: rgba(183,28,28,.07);
  border: 1px solid rgba(183,28,28,.25); border-left-width: 3px;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background .14s;
}
button.sp-riesgo-aviso:hover { background: rgba(183,28,28,.13); }
button.sp-riesgo-aviso span {
  display: inline-block; font-weight: 700; text-decoration: underline;
  margin-left: 4px; white-space: nowrap;
}
html[data-theme="dark"] button.sp-riesgo-aviso { color: #EF9A9A; border-color: rgba(239,154,154,.3); }

/* ---------- expedientes ---------- */
.sp-expedientes { margin: 20px 0 6px; border-top: 1px solid var(--line); }
.sp-exp {
  display: grid; grid-template-columns: 52px 1fr 46px; gap: 14px;
  align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line);
}
.sp-exp-anio { font-weight: 900; color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-exp-txt b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.sp-exp-txt span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.sp-exp-peso {
  text-align: right; font-weight: 900; font-size: 15px; color: #B71C1C;
  font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .sp-exp-peso { color: #EF9A9A; }

/* ---------- cargo dentro del partido ---------- */
.sp-cargo-partido {
  font-size: 12.5px; color: var(--accent); font-weight: 700;
  margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line);
}

/* ---------- aviso de trámites pendientes ---------- */
.sp-espera {
  font-size: 12.5px; color: var(--muted); margin: 16px 0 0;
  padding: 10px 14px; background: var(--paper-dim);
  border-left: 3px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- el menú del año, botones parejos ---------- */
.sp-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sp-menu .sp-btn { min-width: 0; width: 100%; padding-left: 8px; padding-right: 8px; font-size: 11.5px; }

@media (max-width: 620px) {
  .sp-menu { grid-template-columns: 1fr 1fr; }
  .sp-menu .sp-btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .sp-exp { grid-template-columns: 44px 1fr 40px; gap: 10px; }
}

/* ---------- trámites legislativos, compactos ---------- */
.sp-tramites { margin: 20px 0 4px; }
.sp-tramite {
  display: grid; grid-template-columns: 120px 1fr; gap: 12px;
  align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line);
}
.sp-tramite b {
  font-size: 9.5px; font-weight: 900; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
}
.sp-tramite span { font-size: 14px; line-height: 1.4; }
.sp-tramite.ok b { color: #1B5E20; }
.sp-tramite.ok span { font-weight: 700; }
.sp-tramite.mal b { color: #B71C1C; }
.sp-tramite.mal span { opacity: .7; text-decoration: line-through; }
html[data-theme="dark"] .sp-tramite.ok b { color: #81C784; }
html[data-theme="dark"] .sp-tramite.mal b { color: #EF9A9A; }

/* ---------- composición de las cámaras ---------- */
.sp-camara-nota {
  font-size: 13px; line-height: 1.5; color: var(--text-soft);
  margin: 8px 0 14px; padding: 11px 14px;
  background: var(--paper-dim); border-radius: var(--radius);
}

/* ---------- más aire para el bloque del Servel ---------- */
.sp-noticias-servel { margin: 22px 0 18px; }
.sp-noticias-servel + .sp-espera { margin-top: 4px; }
.sp-espera + .sp-caja-plata { margin-top: 20px; }

@media (max-width: 620px) {
  .sp-tramite { grid-template-columns: 1fr; gap: 3px; }
}

/* =========================================================
   ARREGLO: LAS DENUNCIAS NO SON NOTICIAS
   Heredaban la grilla de las noticias, que reserva una columna
   angosta para la etiqueta de sección. Como acá no hay
   etiqueta, el texto caía en esa columna de 82 píxeles y se
   leía en vertical. Ahora tienen su propio formato.
   ========================================================= */
.sp-noticias-denuncia {
  list-style: none;
  margin: 20px 0 4px;
  padding: 0;
  display: grid;
  gap: 10px;
}
.sp-noticias-denuncia li {
  display: block;
  grid-template-columns: none;
  margin: 0;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.5;
  background: var(--paper-dim);
  border: 1px solid var(--line);
  border-left: 3px solid #B71C1C;
  border-radius: 0 var(--radius) var(--radius) 0;
}
html[data-theme="dark"] .sp-noticias-denuncia li { border-left-color: #EF9A9A; }

/* Lo mismo para cualquier lista suelta que no lleve etiqueta. */
.sp-noticias-plana li {
  display: block;
  grid-template-columns: none;
  padding: 12px 15px;
  margin: 0 0 9px;
  font-size: 14.5px;
  line-height: 1.5;
  background: var(--paper-dim);
  border-radius: var(--radius);
}

/* ---------- aviso de presidente electo ---------- */
.sp-electo-aviso {
  font-size: 13px; font-weight: 700; color: var(--accent);
  margin: 14px 0 0; padding: 11px 14px;
  background: var(--paper-dim);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
