/* Acotada a .pn-inst desde el 2026-10-01: la comparación vive como pestaña del panel /mundo, en la
   misma página que la consulta de validez, y sus clases genéricas (.campo, .globo-pie, .fichas)
   le cambiaban el aspecto. instrumento.html lleva la clase en el body, por si alguien llega sin la
   redirección. */
/* Instrumento territorial — tres columnas.

   La retícula es de ancho completo, no de los 860px del resto del sitio: esto
   es un tablero, no un artículo. Debajo de 1100px se apila, porque tres
   columnas en un teléfono no son tres columnas, son tres pantallas. */

.cuerpo-instrumento .cab-in { max-width: none; }

.pn-inst .inst {/* ALTURA FIJA, no mínima, y cada columna rueda por su cuenta. Con
     min-height y align-items:stretch, la columna de corredores —41 filas—
     estiraba a las otras dos a ~2000px: el globo crecía hasta salirse de la
     pantalla y las barras quedaban debajo del pliegue, invisibles.
     Un tablero ocupa la pantalla; lo que sobra rueda dentro de su panel. */
  max-width: none; padding: 0;
  display: grid; grid-template-columns: 340px minmax(0, 1fr) 380px;
  
  height: calc(100vh - 58px); height: calc(100svh - 58px); overflow: hidden;
}
.pn-inst .inst-col {
  padding: 18px clamp(14px, 1.6vw, 22px) 26px; min-width: 0;
  overflow-y: auto; overscroll-behavior: contain;
}
.pn-inst .inst-entrada { border-right: var(--regla) solid var(--tinta); }
.pn-inst .inst-corredores { border-left: var(--regla) solid var(--tinta); }

.pn-inst .inst-rot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  margin: 0 0 18px; padding-bottom: 8px; border-bottom: 1px solid var(--pelo);
  font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--tinta-3);
}
.pn-inst .inst-rot b { color: var(--acento); }/* ── Columna 1 · entrada ────────────────────────────────── */



.pn-inst .campo { margin-bottom: 26px; }
.pn-inst .campo h2 {
  display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tinta-2);
}
.pn-inst .campo h2 i { font-style: normal; color: var(--tenue); }
.pn-inst .pista { margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--tenue); }
.pn-inst .pista a { color: var(--acento-osc); }

.pn-inst .rejilla-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pn-inst .opcion {
  display: flex; align-items: baseline; gap: 7px; text-align: left;
  padding: 10px 11px; cursor: pointer; font-family: var(--fuente); font-size: 14px;
  background: transparent; color: var(--tinta); border: var(--regla) solid var(--pelo);
}
.pn-inst .opcion i { font-style: normal; font-size: 10px; letter-spacing: 0.1em; color: var(--tenue); }
.pn-inst .opcion:hover { border-color: var(--tinta-3); }
.pn-inst .opcion.on { border-color: var(--acento); }
.pn-inst .opcion.on i { color: var(--acento); }

.pn-inst .inst input[type="range"] { width: 100%; accent-color: var(--acento); }
.pn-inst .cifra { margin: 0 0 6px; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.pn-inst .cifra small { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--tenue); vertical-align: 6px; }
.pn-inst .extremos { display: flex; justify-content: space-between; margin: 4px 0 0; font-size: 11px; color: var(--tenue); }

.pn-inst .fichas { display: flex; flex-wrap: wrap; gap: 7px; }
.pn-inst .ficha {
  padding: 7px 12px; cursor: pointer; font-family: var(--fuente);
  font-size: 12px; font-weight: 700;
  background: transparent; color: var(--tinta-3); border: var(--regla) solid var(--pelo);
}
.pn-inst .ficha:hover { color: var(--tinta); }
.pn-inst .ficha.on { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }/* ── Columna 2 · plano ──────────────────────────────────── *//* Se llaman .ejes/.eje y no .barras/.barra porque estilo.css YA define esos
   nombres para el medidor de las fichas de país: mi .barra heredaba su
   display:grid y el rótulo, la cifra y el riel salían en una sola fila,
   pisándose con la barra siguiente. Es la segunda colisión de nombres de esta
   hoja compartida — la primera fue .nota. */




.pn-inst .inst-plano { display: flex; flex-direction: column; }
.pn-inst .plano-cabeza { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.pn-inst .sup { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tenue); }
.pn-inst .inst-plano :is(h1, h2) {
  margin: 4px 0 2px; font-size: clamp(28px, 3.4vw, 44px); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1; display: flex; align-items: center; gap: 10px;
}
.pn-inst .inst-plano :is(h1, h2) .iso {
  font-size: 11px; letter-spacing: 0.1em; color: var(--acento);
  border: var(--regla) solid var(--acento); padding: 2px 6px; align-self: center;
}
.pn-inst .inst-plano .sub { margin: 0; font-size: 13px; color: var(--tinta-3); }/* El estado nunca viaja sólo como color: cuadro + palabra. Quien no distingue
   el verde del ámbar lee exactamente lo mismo. */


.pn-inst .estado { display: inline-flex; align-items: center; gap: 7px; margin: 10px 0 0;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.pn-inst .estado i { width: 9px; height: 9px; border-radius: 50%; background: var(--tenue); }
.pn-inst .v-viable i { background: var(--bien); }
.pn-inst .v-condicionado i { background: var(--aviso); }
.pn-inst .v-pendiente i { background: var(--mal); }

.pn-inst .compat { text-align: right; flex: 0 0 auto; }
.pn-inst .compat .rotulo { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tenue); }
.pn-inst .compat .valor { margin: 2px 0 0; line-height: 1; }
.pn-inst .compat .valor b { font-size: clamp(34px, 4vw, 52px); font-weight: 800; letter-spacing: -0.04em; }
.pn-inst .compat .valor small { font-size: 14px; color: var(--tenue); margin-left: 2px; }

.pn-inst .globo-caja {
  position: relative; flex: 1 1 auto; min-height: 380px; margin: 6px 0 10px;
  display: flex; flex-direction: column;
}
.pn-inst .globo-caja canvas { flex: 1 1 auto; }
.pn-inst .globo-caja canvas { width: 100%; min-height: 0; display: block; }
.pn-inst .globo-caja.sin-webgl canvas { display: none; }/* El pie va DEBAJO del lienzo, no encima. Flotaba en absoluto y con el globo
   ya a tamaño real se le encimaba a la figura, que es justo lo que no debe
   tapar un rótulo. */

.pn-inst .globo-pie {
  margin: 6px 0 0; text-align: center;
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tenue); pointer-events: none;
}

.pn-inst .ejes { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px;
  padding-top: 14px; border-top: 1px solid var(--pelo); }
.pn-inst .eje .rotulo { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--tinta-3); }
.pn-inst .eje .rotulo em { font-style: normal; color: var(--tenue); }
.pn-inst .eje .num { margin: 2px 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.pn-inst .eje .riel { height: 5px; background: var(--pelo); }
.pn-inst .eje .riel span { display: block; height: 100%; background: var(--tinta); }
.pn-inst .eje .det { margin: 5px 0 0; font-size: 11px; color: var(--tenue); }
.pn-inst .eje.apagada { opacity: 0.45; }
.pn-inst .eje.apagada .riel span { background: var(--tenue); }
.pn-inst .eje.sin-dato .num { color: var(--tenue); }

.pn-inst .tiras { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 0;
  margin-top: 16px; border-top: var(--regla) solid var(--tinta); }
.pn-inst .tira { padding: 12px 14px 12px 0; }
.pn-inst .tira .rotulo { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--tenue); }
.pn-inst .tira .dato { margin: 3px 0 0; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.pn-inst .tira.accion {
  display: flex; align-items: center; gap: 8px; padding: 12px 18px;
  background: var(--acento); color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 700;
}
.pn-inst .tira.accion:hover { background: var(--acento-osc); }/* ── Columna 3 · corredores ─────────────────────────────── */



.pn-inst .corredores { list-style: none; margin: 0; padding: 0; }
.pn-inst .corredor {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto auto;
  align-items: center; gap: 10px; padding: 10px 8px;
  border-bottom: 1px solid var(--pelo); cursor: pointer;
}
.pn-inst .corredor:hover { background: var(--superficie); }
.pn-inst .corredor.on { background: var(--tinta); }
.pn-inst .corredor.on, .pn-inst .corredor.on b, .pn-inst .corredor.on .pct { color: var(--papel); }
.pn-inst .corredor.on .donde, .pn-inst .corredor.on .orden { color: var(--tenue); }

.pn-inst .corredor .orden { font-size: 11px; font-weight: 700; color: var(--tenue); }
.pn-inst .corredor .quien { min-width: 0; }
.pn-inst .corredor .quien b { display: block; font-size: 15px; letter-spacing: -0.01em; }
.pn-inst .corredor .donde { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--tinta-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pn-inst .corredor .via { display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  font-size: 11px; font-weight: 700; white-space: nowrap; }
.pn-inst .corredor .via i { display: none; }
.pn-inst .corredor .via::before { content: ''; }
.pn-inst .corredor .via .margen { font-weight: 400; color: var(--tinta-3); }
.pn-inst .corredor.on .via .margen { color: var(--tenue); }
.pn-inst .corredor .v-viable { color: var(--bien); }
.pn-inst .corredor .v-condicionado { color: var(--aviso); }
.pn-inst .corredor .v-pendiente { color: var(--mal); }

.pn-inst .corredor .fav { background: transparent; border: 0; cursor: pointer; font-size: 15px;
  color: var(--tenue); padding: 0 2px; }
.pn-inst .corredor .fav.on { color: var(--acento); }
.pn-inst .corredor .pct { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.pn-inst .corredor .pct small { font-size: 10px; color: var(--tenue); }
.pn-inst .corredores .vacio { padding: 20px 0; color: var(--tinta-3); }

.pn-inst .procedencia { margin-top: 22px; padding-top: 12px; border-top: var(--regla) solid var(--tinta); }
.pn-inst .procedencia .rotulo { margin: 0 0 8px; font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--tenue); }
.pn-inst .procedencia ul { list-style: none; margin: 0; padding: 0; }
.pn-inst .procedencia li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 11px; }
.pn-inst .procedencia li b { font-weight: 700; color: var(--tinta-2); }
.pn-inst .procedencia li span { color: var(--tenue); text-align: right; }/* ── Apilado ────────────────────────────────────────────── */



@media (max-width: 1100px) {
  .pn-inst .inst { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .pn-inst .inst-col { overflow: visible; }
  .pn-inst .inst-entrada, .pn-inst .inst-corredores { border: 0; border-top: var(--regla) solid var(--tinta); }
  .pn-inst .inst-entrada { order: 1; } .pn-inst .inst-plano { order: 2; } .pn-inst .inst-corredores { order: 3; }
  .pn-inst .globo-caja { min-height: 320px; }
  .pn-inst .tiras { grid-template-columns: repeat(3, 1fr); }
  .pn-inst .tira.accion { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 560px) {
  .pn-inst .plano-cabeza { flex-direction: column; }
  .pn-inst .compat { text-align: left; }
  .pn-inst .corredor { grid-template-columns: 22px minmax(0, 1fr) auto auto; row-gap: 4px; }
  .pn-inst .corredor .via { grid-column: 2 / -1; flex-direction: row; align-items: baseline;
    justify-content: flex-start; gap: 8px; }
}/* ── Contexto del destino ─────────────────────────────────
   Va debajo de la decisión: primero si puede ir, después cómo es. Cada celda
   lleva su año — un dato de 2021 sin fecha es una mentira por omisión. */


.pn-inst .contexto { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--pelo); }
.pn-inst .contexto .rotulo { margin: 0 0 10px; font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--tenue); }
.pn-inst .ctx-rejilla { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 20px; }
.pn-inst .ctx-celda span { display: block; font-size: 10px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--tinta-3); }
.pn-inst .ctx-celda b { display: block; margin-top: 2px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.pn-inst .ctx-celda em { display: block; margin-top: 2px; font-style: normal; font-size: 11px; color: var(--tenue); }
.pn-inst .contexto .rotulo em { font-style: normal; letter-spacing: 0; text-transform: none;
  font-weight: 400; color: var(--tenue); }/* Selector de pasaporte. Nativo a propósito: con 184 opciones se busca
   escribiendo, funciona con teclado y lector de pantalla, y en el móvil abre
   la rueda del sistema. */


.pn-inst .sel-nacion {
  width: 100%; padding: 11px 12px; cursor: pointer;
  font-family: var(--fuente); font-size: 15px;
  background: var(--papel); color: var(--tinta);
  border: var(--regla) solid var(--tinta);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.pn-inst .sel-nacion:focus-visible { outline: var(--regla) solid var(--acento); outline-offset: 2px; }/* ── Expediente en capa ───────────────────────────────────
   Se abre sobre el tablero en vez de navegar: el dato ya está cargado, y con
   184 pasaportes y sólo 19 páginas estáticas, enlazar fuera daba 404 al 90 %
   de los visitantes. */


.pn-inst .capa {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: flex-start; justify-content: center;
  padding: clamp(12px, 4vh, 48px) 16px;
  background: rgba(0, 0, 0, 0.55);
  overflow-y: auto; overscroll-behavior: contain;
}
.pn-inst .capa[hidden] { display: none; }
body.con-capa { overflow: hidden; }

.pn-inst .capa-caja {
  width: 100%; max-width: 620px;
  background: var(--papel); color: var(--tinta);
  border: var(--regla) solid var(--tinta);
}
.pn-inst .capa-cab {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 18px 20px 14px; border-bottom: var(--regla) solid var(--tinta);
  position: sticky; top: 0; background: var(--papel);
}
.pn-inst .capa-cab h3 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.pn-inst .capa-cab p { margin: 3px 0 0; font-size: 12px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--tinta-3); }
.pn-inst .capa-cab button {
  flex: 0 0 auto; appearance: none; background: transparent; border: 0; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--tenue); padding: 0 4px;
}
.pn-inst .capa-cab button:hover { color: var(--tinta); }

.pn-inst .capa-cuerpo { padding: 4px 20px 22px; }
.pn-inst .capa-cuerpo section { padding: 14px 0; border-bottom: 1px solid var(--pelo); }
.pn-inst .capa-cuerpo section:last-of-type { border-bottom: 0; }
.pn-inst .capa-cuerpo h4 {
  margin: 0 0 10px; font-size: 10px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--tenue);
}

.pn-inst .exp-fila { display: grid; grid-template-columns: 42% 1fr; gap: 4px 14px; padding: 6px 0; align-items: baseline; }
.pn-inst .exp-fila span { font-size: 13px; color: var(--tinta-3); }
.pn-inst .exp-fila b { font-size: 15px; font-weight: 700; }
.pn-inst .exp-fila em { grid-column: 2; font-style: normal; font-size: 11px; color: var(--tenue); }

.pn-inst .exp-cita {
  margin: 0; padding-left: 12px; border-left: var(--regla) solid var(--pelo);
  font-size: 13px; color: var(--tinta-2);
}
.pn-inst .exp-aviso { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--tinta-2); }
.pn-inst .exp-fuentes p { margin: 0; font-size: 11px; line-height: 1.6; color: var(--tenue); }
.pn-inst .exp-fuentes a { color: var(--acento-osc); }

.pn-inst .exp-acciones { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 16px; }
.pn-inst .exp-sec { font-size: 12px; color: var(--tinta-3); }
.pn-inst .exp-sec:hover { color: var(--acento); }/* El disparador es un <button>, no un enlace: no navega. */


.pn-inst button.tira.accion { font-family: var(--fuente); border: 0; cursor: pointer; text-align: left; }

@media (max-width: 520px) {
  .pn-inst .exp-fila { grid-template-columns: 1fr; }
  .pn-inst .exp-fila em { grid-column: 1; }
}/* -- Conmutador de forma ---------------------------------
   Flota sobre el lienzo, arriba a la derecha: es una propiedad de la figura,
   no un ajuste del panel, y ponerlo en la columna de entrada lo alejaria de
   lo que modifica. */


.pn-inst .forma-sw {
  position: absolute; top: 0; right: 0; z-index: 2;
  display: inline-flex; border: var(--regla) solid var(--tinta);
  background: var(--papel);
}
.pn-inst .forma-sw button {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  font-family: var(--fuente); font-size: 10px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--tinta-3); padding: 5px 11px;
  border-left: 1px solid var(--pelo);
}
.pn-inst .forma-sw button:first-child { border-left: 0; }
.pn-inst .forma-sw button:hover { color: var(--tinta); }
.pn-inst .forma-sw button.on { background: var(--tinta); color: var(--papel); }/* En plano la caja toma proporcion 2:1: asi el mapa cruza el modulo de lado a
   lado en vez de quedar atravesado en el medio con aire arriba y abajo. */


.pn-inst .globo-caja.es-plano { aspect-ratio: 2 / 1; min-height: 0; flex: 0 0 auto; }
.pn-inst .globo-caja.es-plano canvas { cursor: crosshair; }/* -- Rotulos del mapa de pais -----------------------------
   Texto real sobre el lienzo. Las particulas dibujan las formas; los nombres
   los pone el navegador, que es el unico que los deja legibles. */


.pn-inst .rotulos { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.pn-inst .rotulos span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; }

.pn-inst .rot-ciudad {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--tinta);
  text-shadow: 0 0 4px var(--papel), 0 0 8px var(--papel);
}
.pn-inst .rot-ciudad i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--tinta);
  flex: 0 0 auto;
}/* La capital no es una ciudad mas: va marcada y con el acento. */

.pn-inst .rot-ciudad.es-capital { font-size: 12px; }
.pn-inst .rot-ciudad.es-capital i {
  width: 8px; height: 8px; background: var(--acento);
  box-shadow: 0 0 0 2px var(--papel);
}

.pn-inst .rot-vecino {
  font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tenue);
  text-shadow: 0 0 4px var(--papel);
}
