:root {
  --bg: #f3efe6;
  --ink: #1c1915;
  --muted: #5c564c;
  --line: #ddd4c6;
  --card: #fffdf8;
  --pp: #143f86;
  --pp-fill: #1d4f9c;
  --vox: #0e6840;
  --vox-fill: #187a45;
  --gris: #5e584f;
  --gris-fill: #9e988c;
  --sombra: 0 1px 0 rgba(28, 25, 21, 0.04);
  --serif: "Liberation Serif", "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Liberation Sans", "Noto Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
}
img, svg { max-width: 100%; }
a { color: var(--pp); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
button, input, select { font: inherit; color: inherit; }
.saltar {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 5;
}
.saltar:focus { top: 12px; }

.franja { display: flex; height: 8px; }
.franja i { display: block; flex: 1; }
.franja .pp, i.pp { background: var(--pp); }
.franja .vox, i.vox { background: var(--vox); }
.franja .igual, i.igual { background: var(--gris-fill); }

.cabecera, main, .pie {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
.cabecera { padding: 28px 0 8px; }
.kicker {
  margin: 0 0 8px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em; }
h1 {
  margin: 0;
  font-size: clamp(2.15rem, 6.4vw, 3.7rem);
  line-height: 1.02;
  text-wrap: balance;
}
h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0 0 10px; line-height: 1.15; }
h3 { font-size: 1.35rem; margin: 1.4rem 0 0.4rem; }
.firma { margin: 12px 0 0; font-size: 1.15rem; }
.firma a { font-weight: 700; }
.entradilla {
  margin: 12px 0 0;
  max-width: 40rem;
  font-size: 1.18rem;
  line-height: 1.4;
}
.sello {
  margin: 14px 0 0;
  display: inline-block;
  background: var(--ink);
  color: #fff;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.cifras {
  display: grid;
  gap: 12px;
  margin: 22px 0 12px;
}
.cifras article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px 16px;
  box-shadow: var(--sombra);
}
.num {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 6vw, 2.7rem);
  line-height: 1;
  font-weight: 700;
}
.cifras p:last-child { margin: 8px 0 0; color: var(--ink); }
.cuenta { margin: 8px 0 14px; font-size: 1.08rem; }

.atajo { margin: 6px 0 0; }
.atajo a { font-weight: 700; }

.compartir {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  align-items: center;
}
.btn-comp {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
}
.btn-comp svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.btn-comp:hover { background: var(--ink); color: #fff; }
.aviso-copia {
  flex-basis: 100%;
  margin: 4px 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--vox);
}
.cifras article.total {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.cifras article.total p:last-child { color: #fff; }

.quien { scroll-margin-top: 16px; }
.embed-dr {
  margin: 8px 0 8px;
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.embed-dr iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
  background: #fff;
}

.redes-marcial {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 4px 0 0;
}
.redes-marcial a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
}
.redes-marcial a:hover { background: var(--ink); color: #fff; }
.redes-marcial svg { width: 18px; height: 18px; }


.aviso {
  background: #fff6d8;
  border: 1px solid #e4d39a;
  border-radius: 14px;
  padding: 12px 16px;
  margin: 0 0 18px;
}
.aviso p { margin: 0; }

.escenario { display: flex; flex-direction: column; gap: 16px; }
.busqueda { display: grid; gap: 12px; }
.campo { position: relative; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input[type="search"], select {
  width: 100%;
  min-height: 52px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  padding: 10px 14px;
  font-size: 1.05rem;
}
#sugerencias {
  list-style: none;
  margin: 6px 0 0;
  padding: 6px;
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  max-height: 280px;
  overflow: auto;
}
#sugerencias[hidden] { display: none; }
#sugerencias button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 8px 10px;
  cursor: pointer;
}
#sugerencias button[aria-selected="true"],
#sugerencias button:hover { background: #efe8da; }

.ficha {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px 16px;
  border-left: 10px solid var(--gris-fill);
  min-height: 180px;
}
.ficha.pp { border-left-color: var(--pp); }
.ficha.vox { border-left-color: var(--vox); }
.ficha.igual { border-left-color: var(--gris-fill); }
.vacia { margin: 8px 0; font-size: 1.25rem; color: var(--muted); }
.lugar {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.consejo {
  margin: 4px 0 8px;
  font-family: var(--serif);
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  line-height: 0.92;
  font-weight: 700;
}
.consejo.pp { color: var(--pp); }
.consejo.vox { color: var(--vox); }
.consejo.igual { color: var(--gris); }
.marca {
  display: inline-block;
  margin: 0 0 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.motivo { margin: 0 0 12px; font-size: 1.18rem; line-height: 1.4; }
.metas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}
.metas .ancho { grid-column: 1 / -1; }
.metas div {
  background: #f7f3ea;
  border-radius: 10px;
  padding: 8px 10px;
}
.metas dt { margin: 0; color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.metas dd { margin: 2px 0 0; font-weight: 700; }
.ver {
  margin-top: 12px;
  background: #f7f3ea;
  border-radius: 10px;
  padding: 8px 12px;
}
.ver summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.ver p { margin: 8px 0; }
.mini {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 8px 0 4px;
}
.mini th, .mini td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.mini th { color: var(--muted); font-size: 0.8rem; }

.mapa-cabeza { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.mapa-cabeza h2 { margin-right: auto; }
.leyenda { display: flex; flex-wrap: wrap; gap: 8px 14px; font-weight: 700; }
.leyenda span, .leyenda { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.zoom { display: flex; gap: 6px; }
.zoom button, .filtros button {
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: #fff;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 700;
}
.zoom button:hover, .filtros button:hover, .filtros button.on { background: var(--ink); color: #fff; }
.nota-mapa, .nota-filtro { color: var(--muted); margin: 6px 0 8px; font-size: 0.95rem; }
.lienzo {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffdf8;
  touch-action: pan-x pan-y;
}
#mapa { display: block; width: 100%; min-width: 860px; height: auto; background: #fffdf8; }
#mapa path, #mapa .marca-ciudad { cursor: pointer; }
#mapa .etiqueta { font-family: var(--sans); font-size: 15px; font-weight: 700; fill: var(--ink); pointer-events: none; }
#mapa .canarias { fill: none; stroke: var(--muted); stroke-dasharray: 5 5; }
.error {
  background: #fde8e4;
  border: 1px solid #e3b2a8;
  border-radius: 12px;
  padding: 12px;
}

.listado { margin-top: 36px; }
.lista-cabeza { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: space-between; }
.filtros { display: flex; flex-wrap: wrap; gap: 6px; }
.tabla-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
caption.saltar {
  position: absolute;
  width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
th, td { text-align: left; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--line); }
thead th { font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
tbody tr[hidden] { display: none; }
.nombre-btn {
  background: none;
  border: 0;
  padding: 0;
  font-weight: 700;
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
}
.pastilla {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}
.pastilla.pp { background: var(--pp); color: #fff; }
.pastilla.vox { background: var(--vox); color: #fff; }
.pastilla.igual { background: #e7e1d6; color: var(--ink); }
.mini-marca { display: block; margin-top: 4px; font-size: 0.82rem; font-weight: 700; }

.prosa { margin-top: 36px; max-width: 44rem; }
.prosa p { margin: 0 0 1rem; }

.pie {
  margin-top: 28px;
  padding: 18px 0 40px;
  border-top: 1px solid var(--line);
}
.pie p { margin: 6px 0; color: var(--muted); }
.pie .firma { color: var(--ink); }

@media (min-width: 640px) {
  .cifras { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .cifras { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 760px) {
  .busqueda { grid-template-columns: 1.3fr 1fr; align-items: end; }
  #mapa { min-width: 0; }
}
@media (min-width: 980px) {
  .escenario {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    grid-template-areas:
      "busca busca"
      "mapa ficha";
    align-items: start;
    gap: 22px 28px;
  }
  .busqueda { grid-area: busca; }
  .mapa-col { grid-area: mapa; }
  .ficha { grid-area: ficha; position: sticky; top: 16px; }
}
@media (max-width: 720px) {
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table, tbody, tr, td, th { display: block; width: 100%; }
  tbody tr {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    margin: 0 0 10px;
    padding: 8px 10px 12px;
  }
  td, th { border: 0; padding: 4px 4px; }
  td[data-etiqueta]::before {
    content: attr(data-etiqueta);
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}
