/* ===========================================================================
   Mapa de inteligencia competitiva · Argentina — identidad NEETI
   Mobile first: lo de abajo es para celular (390 px); luego tablet y escritorio.
   =========================================================================== */
:root {
  color-scheme: light;
  --navy: #0b1d3a;
  --navy-alto: #122b54;
  --crema: #fff8dc;
  --papel: #fbfaf6;
  --papel-hondo: #f1eee4;
  --hoja: #fffefb;
  --tinta: #0b1d3a;
  --tinta-media: #46567a;
  --tinta-tenue: #57657f;
  --linea: rgba(11, 29, 58, 0.14);
  --linea-firme: rgba(11, 29, 58, 0.3);
  --linea-tenue: rgba(11, 29, 58, 0.07);
  --realce: rgba(11, 29, 58, 0.04);
  --realce-fuerte: rgba(11, 29, 58, 0.07);
  --alta: #9b2c22;
  --media: #8a5b12;
  --baja: #3a5f8a;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Libre Franklin", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-ui: 0.875rem;
  --t-base: 0.9375rem;
  --t-doc: 1rem;
  --t-md: 1.125rem;
  --t-lg: 1.375rem;
  --t-xl: 1.75rem;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 20px;
  --space-xl: 28px;
  --radio: 2px;
  --barra-alto: 2.75rem;
  --transicion: 160ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: 100%; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: env(safe-area-inset-bottom);
}
::selection { background: #f4e3b0; color: var(--navy); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 1px; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
h1, h2, h3, h4 { margin: 0; }
.saltar { position: absolute; left: -999px; top: 0; background: var(--navy); color: var(--crema); padding: 10px 14px; z-index: 2000; }
.saltar:focus { left: 0; }

.titulo { font-family: var(--serif); font-size: clamp(1.625rem, 6.6vw, 2.625rem); font-weight: 400; line-height: 1.08; letter-spacing: -0.018em; text-wrap: balance; }
.rotulo { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tinta-tenue); }

/* ---------- cabecera institucional (la única franja de color de arriba) ---------- */
.masthead { display: flex; align-items: center; gap: var(--space-md); min-height: var(--barra-alto); padding: 0 16px; padding-top: env(safe-area-inset-top); background: var(--navy); }
.masthead-logo { height: 18px; width: auto; display: block; flex: none; }
.masthead-titulo { padding-left: var(--space-md); border-left: 1px solid rgba(255, 248, 220, 0.24); font-size: 0.6875rem; line-height: 1.2; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 248, 220, 0.82); }
.masthead-nota { display: none; margin-left: auto; font-size: var(--t-xs); white-space: nowrap; color: rgba(255, 248, 220, 0.55); }

/* ---------- botones ---------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm); min-height: 44px; padding: 8px 14px; background: var(--hoja); border: 1px solid var(--linea-firme); border-radius: var(--radio); font-weight: 500; color: var(--tinta); text-decoration: none; transition: background var(--transicion), border-color var(--transicion); }
.boton:hover { border-color: var(--tinta-media); }
.boton[aria-pressed="true"], .boton-principal { background: var(--navy); border-color: var(--navy); color: var(--crema); }
.boton-principal:hover { background: var(--navy-alto); }
.boton.chico { min-height: 36px; padding: 4px 10px; font-size: var(--t-sm); white-space: nowrap; flex: none; }
.enlace { border: 0; background: none; color: var(--navy); text-decoration: underline; text-underline-offset: 0.18em; padding: 10px 2px; min-height: 44px; font-weight: 500; }

/* ---------- herramientas: accesibilidad + búsqueda ---------- */
.herramientas { padding: 10px 16px; border-bottom: 1px solid var(--linea); display: flex; flex-direction: column; gap: 8px; }
.acc { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.acc::-webkit-scrollbar { display: none; }
.acc .rotulo { flex: none; margin-right: 4px; }
.buscador { position: relative; }
.buscador input { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--linea-firme); border-radius: var(--radio); background: var(--hoja); }
.sugerencias { position: absolute; left: 0; right: 0; top: 48px; z-index: 1500; margin: 0; padding: 4px; list-style: none; background: var(--hoja); border: 1px solid var(--linea-firme); border-radius: var(--radio); max-height: 50vh; overflow-y: auto; }
.sugerencias li button { width: 100%; text-align: left; border: 0; background: none; padding: 10px; min-height: 44px; border-radius: var(--radio); }
.sugerencias li button:hover, .sugerencias li button:focus-visible { background: var(--realce-fuerte); }
.sugerencias small { display: block; color: var(--tinta-tenue); }

/* ---------- menú ---------- */
.menu { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px; border-bottom: 1px solid var(--linea); scrollbar-width: none; }
.menu::-webkit-scrollbar { display: none; }
.menu a { flex: none; padding: 12px 8px; min-height: 44px; font-size: var(--t-ui); font-weight: 500; text-decoration: none; color: var(--tinta-media); border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--navy); border-bottom-color: var(--linea-firme); }
.menu a[hidden] { display: none; }

/* ---------- portada y «sobre el mapa» ---------- */
.portada { padding: 24px 16px 8px; max-width: 1200px; margin: 0 auto; }
.migas { margin: 0 0 8px; font-size: var(--t-sm); color: var(--tinta-tenue); }
.sobre { max-width: 1200px; margin: 0 auto; padding: 8px 16px 28px; display: grid; gap: 24px; }
.sobre-texto p { font-family: var(--serif); font-size: var(--t-doc); line-height: 1.6; max-width: 62ch; margin: 12px 0 0; }
.sobre-texto .rotulo { display: block; }
.sobre-texto .boton { margin-top: 4px; font-family: var(--sans); }
.pasos { margin: 0; padding: 0; list-style: none; counter-reset: paso; border-top: 1px solid var(--linea); }
.pasos li { counter-increment: paso; position: relative; padding: 14px 0 14px 2.5rem; border-bottom: 1px solid var(--linea); font-size: var(--t-ui); color: var(--tinta-media); }
.pasos li::before { content: counter(paso); position: absolute; left: 0; top: 12px; font-family: var(--serif); font-size: var(--t-xl); line-height: 1; color: var(--tinta); }
.pasos b { color: var(--tinta); font-weight: 600; }

/* ---------- sección del mapa ---------- */
.mapa-seccion { max-width: 1280px; margin: 0 auto; padding: 8px 0 24px; }
.seccion-rotulo { display: block; padding: 0 16px 8px; }

.pestanas { display: flex; gap: 2px; overflow-x: auto; padding: 0 12px; border-bottom: 1px solid var(--linea); background: var(--papel); position: sticky; top: 0; z-index: 900; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas button { flex: none; border: 0; background: none; min-height: 44px; padding: 10px 10px; font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tinta-tenue); border-bottom: 3px solid transparent; white-space: nowrap; }
.pestanas button:hover { color: var(--navy); }
.pestanas button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); }

/* ---------- filtros ---------- */
.filtros { padding: 12px 16px 0; }
#btnFiltros .cont { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; background: var(--navy); color: var(--crema); font-size: var(--t-xs); text-align: center; line-height: 20px; border-radius: var(--radio); }
#btnFiltros .cont[hidden] { display: none; }
.filtros-cuerpo { display: none; margin-top: 8px; padding: 12px; background: var(--hoja); border: 1px solid var(--linea); border-radius: var(--radio); grid-template-columns: 1fr 1fr; gap: 10px; }
.filtros-cuerpo.abierto { display: grid; }
.filtros-cuerpo label { display: flex; flex-direction: column; gap: 4px; font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tinta-tenue); min-width: 0; }
.filtros-cuerpo select { min-height: 44px; padding: 0 8px; border: 1px solid var(--linea-firme); border-radius: var(--radio); background: var(--papel); font-weight: 400; font-size: var(--t-base); letter-spacing: 0; text-transform: none; color: var(--tinta); width: 100%; min-width: 0; }
.mas-filtros:not([hidden]) { display: contents; }
.mas-filtros[hidden] { display: none; }
.filtros-acciones { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; }

/* ---------- indicadores: líneas finas, cifras en serif ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 12px 16px; border-top: 1px solid var(--linea-firme); border-left: 1px solid var(--linea); }
.kpi { padding: 10px 12px; border-right: 1px solid var(--linea); border-bottom: 1px solid var(--linea); background: var(--hoja); min-width: 0; }
.kpi small { display: block; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tinta-tenue); }
.kpi strong { display: block; margin-top: 2px; font-family: var(--serif); font-weight: 400; font-size: 1.625rem; line-height: 1.15; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi strong.largo { font-size: 1.125rem; }
.kpi span { display: block; font-size: var(--t-xs); color: var(--tinta-media); margin-top: 2px; }

/* ---------- paneles ---------- */
.panel { margin: 0 16px 16px; background: var(--hoja); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; }
.panel-titulo { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px 4px; }
.panel-titulo h3 { font-family: var(--serif); font-weight: 400; font-size: var(--t-md); line-height: 1.25; letter-spacing: -0.005em; }
.panel-titulo select { max-width: 100%; min-height: 36px; margin-top: 4px; padding: 0 6px; border: 1px solid var(--linea-firme); border-radius: var(--radio); background: var(--papel); font-family: var(--sans); font-size: var(--t-ui); }
.nota { margin: 0; padding: 8px 14px 12px; color: var(--tinta-media); font-size: var(--t-sm); }

/* Aviso visible de cobertura, situado después del mapa para conservarlo a la vista en celular. */
.aviso-datos { margin: 0 16px 16px; padding: 12px 14px 12px 16px; background: #fff8dc; border: 1px solid var(--media); border-left: 5px solid var(--alta); color: var(--tinta); }
.aviso-datos[hidden] { display: none; }
.aviso-datos h3 { margin: 0 0 6px; font-family: var(--sans); font-size: var(--t-base); font-weight: 600; line-height: 1.35; }
.aviso-datos ul { margin: 0; padding-left: 1.15rem; font-size: var(--t-sm); line-height: 1.5; }
.aviso-datos li + li { margin-top: 4px; }

.capas { display: flex; gap: 6px; overflow-x: auto; padding: 8px 14px; scrollbar-width: none; }
.capas[hidden] { display: none; }
.capas::-webkit-scrollbar { display: none; }
.capas label { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--linea-firme); border-radius: var(--radio); font-size: var(--t-sm); background: var(--hoja); cursor: pointer; white-space: nowrap; }
.capas label:has(input:checked) { background: var(--navy); border-color: var(--navy); color: var(--crema); }
.capas input { accent-color: var(--crema); margin: 0; }
.capas i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1px solid var(--crema); }

.mapa-caja { position: relative; background: #e4e7ee; }
#mapa { height: 62vh; min-height: 340px; background: #e4e7ee; }
.mapa-caja:fullscreen, .mapa-caja.pantalla-completa { position: fixed; inset: 0; z-index: 3000; background: var(--papel); }
.mapa-caja:fullscreen #mapa, .mapa-caja.pantalla-completa #mapa { height: 100%; }
/* mapa base apagado para que las capas se lean sobre papel */
#mapa .leaflet-tile-pane { filter: grayscale(0.9) contrast(0.92) brightness(1.04); opacity: 0.85; }
.leyenda { position: absolute; left: 8px; bottom: 8px; z-index: 450; max-width: 72%; background: rgba(255, 254, 251, 0.94); border: 1px solid var(--linea-firme); border-radius: var(--radio); padding: 6px 8px; font-size: 0.6875rem; line-height: 1.5; pointer-events: none; }
.leyenda:empty { display: none; }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 1px solid rgba(11,29,58,.3); }

/* controles propios del mapa (inicio y pantalla completa) */
.leaflet-bar a, .leaflet-bar a:hover { border-radius: 0; color: var(--navy); }
.leaflet-touch .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; }
.ctl-mapa { font-size: 15px; font-weight: 600; text-decoration: none; display: flex !important; align-items: center; justify-content: center; }
.leaflet-container { font-family: var(--sans); }
.leaflet-container a { color: var(--navy); }

/* ---------- ranking y barras ---------- */
.ranking, .barras { list-style: none; margin: 0; padding: 4px 6px 6px; }
.ranking li button { width: 100%; display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; text-align: left; border: 0; background: none; padding: 8px; min-height: 48px; border-radius: var(--radio); border-bottom: 1px solid var(--linea-tenue); }
.ranking li button:hover { background: var(--realce); }
.ranking .pos { color: var(--tinta-tenue); font-size: var(--t-xs); text-align: right; font-variant-numeric: tabular-nums; }
.ranking .nom { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ranking .nom small { display: block; font-weight: 400; color: var(--tinta-media); }
.ranking .val { font-variant-numeric: tabular-nums; font-weight: 600; }
.ver-mas { display: flex; width: calc(100% - 24px); margin: 4px 12px 12px; }
.ver-mas[hidden] { display: none; }
.barras li button { width: 100%; display: block; border: 0; background: none; padding: 6px 8px; text-align: left; min-height: 44px; border-radius: var(--radio); }
.barras li button:hover { background: var(--realce); }
.barras .fila, .mini .fila { display: flex; justify-content: space-between; gap: 8px; font-size: var(--t-sm); }
.barras .fila span:last-child, .mini .fila span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.barras .riel, .mini .riel { height: 6px; margin-top: 4px; background: var(--linea-tenue); overflow: hidden; }
.barras .riel b, .mini .riel b { display: block; height: 100%; background: var(--navy); }
.mini { margin: 0 0 8px; }
.comentarios { margin: 0 16px 16px; }
.comentarios[hidden] { display: none; }

/* ---------- estudios y contacto ---------- */
.estudios, .contacto { max-width: 1200px; margin: 0 auto; padding: 20px 16px 8px; }
.estudios .bajada { margin: 8px 0 12px; color: var(--tinta-media); }
.lista-estudios { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--linea-firme); }
.lista-estudios li { padding: 14px 0; border-bottom: 1px solid var(--linea); }
.lista-estudios h3 { font-family: var(--serif); font-weight: 400; font-size: var(--t-md); line-height: 1.25; }
.lista-estudios p { margin: 4px 0 6px; color: var(--tinta-media); font-size: var(--t-ui); max-width: 62ch; }
.contacto[hidden] { display: none; }
.contacto dl { margin: 12px 0 0; display: grid; gap: 4px; }
.contacto dt { font-size: var(--t-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tinta-tenue); margin-top: 8px; }
.contacto dd { margin: 0; }

/* ---------- pie ---------- */
.pie { display: flex; align-items: flex-start; gap: var(--space-md); margin-top: 24px; padding: 14px 16px; background: var(--navy); color: rgba(255, 248, 220, 0.8); font-size: var(--t-sm); line-height: 1.4; }
.pie-logo { display: none; flex: none; height: 13px; width: auto; opacity: 0.85; margin-top: 3px; }
.pie-texto p { margin: 0 0 6px; max-width: 90ch; }
.pie a { color: var(--crema); }

/* ---------- ficha ---------- */
.ficha { width: 100%; max-width: 100%; margin: auto 0 0; padding: 0; border: 0; background: var(--hoja); color: var(--tinta); border-top: 3px solid var(--navy); border-radius: 0; max-height: 86vh; overflow-y: auto; }
.ficha::backdrop { background: rgba(11, 29, 58, 0.5); }
.ficha .cerrar { position: sticky; top: 8px; float: right; margin: 8px 8px 0 0; width: 44px; height: 44px; border: 1px solid var(--linea-firme); border-radius: var(--radio); background: var(--hoja); font-size: 26px; line-height: 1; }
.ficha-cuerpo { padding: 16px 16px 24px; }
.ficha h3 { margin: 0 52px 2px 0; font-family: var(--serif); font-weight: 400; font-size: var(--t-xl); line-height: 1.1; letter-spacing: -0.012em; }
.ficha .sub { margin: 4px 0 12px; color: var(--tinta-media); font-size: var(--t-sm); }
.ficha dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0 0 14px; border-top: 1px solid var(--linea); border-left: 1px solid var(--linea); }
.ficha dl div { padding: 8px 10px; min-width: 0; border-right: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.ficha dt { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--tinta-tenue); }
.ficha dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ficha dd small { font-weight: 400; color: var(--tinta-media); }
.ficha h4 { margin: 16px 0 6px; font-size: var(--t-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--tinta-tenue); }

/* ---------- popup del mapa ---------- */
.leaflet-popup-content-wrapper { border-radius: var(--radio); box-shadow: 0 1px 4px rgba(11, 29, 58, 0.25); }
.leaflet-popup-content { margin: 10px 12px; font: 13px/1.4 var(--sans); color: var(--tinta); }
.pop b { display: block; font-family: var(--serif); font-weight: 600; font-size: 15px; }
.pop small { color: var(--tinta-media); }
.pop button { margin-top: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--navy); border-radius: var(--radio); background: var(--navy); color: var(--crema); font-weight: 500; }

/* ---------- gráficos y tablas ---------- */
.widget .nota { padding-top: 4px; }
.barras .fila-barra { padding: 5px 8px; }
.barras .fila-barra .fila span:first-child { overflow-wrap: anywhere; }
.tabla-caja { overflow-x: auto; margin: 4px 14px 0; border: 1px solid var(--linea); max-height: 520px; overflow-y: auto; }
.tabla { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 520px; }
.tabla th, .tabla td { padding: 6px 10px; border-bottom: 1px solid var(--linea-tenue); text-align: left; vertical-align: top; }
.tabla thead th { position: sticky; top: 0; background: var(--papel-hondo); border-bottom: 1px solid var(--linea-firme); z-index: 1; font-weight: 600; }
.tabla th button { border: 0; background: none; font: inherit; font-weight: 600; text-align: inherit; padding: 4px 0; min-height: 32px; cursor: pointer; white-space: normal; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla .pos { width: 2.2rem; color: var(--tinta-tenue); background: var(--realce); text-align: right; font-variant-numeric: tabular-nums; }
.tabla tbody tr:hover td { background: var(--realce); }
.tabla-pie { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 4px 14px 10px; font-size: var(--t-sm); color: var(--tinta-media); }
.mapa-mundo { height: 320px; margin: 4px 14px 0; border: 1px solid var(--linea); background: #e4e7ee; }
.mapa-mundo .leaflet-tile-pane { filter: grayscale(0.9) contrast(0.92) brightness(1.04); opacity: 0.85; }

/* ---------- panel de capas y búsqueda dentro del mapa ---------- */
.ctl-capas { position: relative; }
.ctl-boton { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; background: var(--hoja); border: 1px solid var(--linea-firme); border-radius: var(--radio); color: var(--navy); font-weight: 600; font-size: var(--t-sm); }
.panel-capas { position: absolute; right: 0; top: 44px; width: min(280px, 78vw); max-height: 60vh; overflow-y: auto; background: var(--hoja); border: 1px solid var(--linea-firme); border-radius: var(--radio); padding: 10px 12px; }
.panel-capas[hidden] { display: none; }
.panel-capas label, .panel-capas .leg { display: flex; align-items: center; gap: 8px; min-height: 32px; font-size: var(--t-sm); }
.panel-capas i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(11,29,58,.3); flex: none; display: inline-block; }
.panel-capas .rotulo { margin: 8px 0 2px; }
.panel-capas .rotulo:first-child { margin-top: 0; }
.panel-acciones { display: grid; margin-top: 8px; border-top: 1px solid var(--linea); padding-top: 4px; }
.panel-acciones .enlace { text-align: left; min-height: 36px; font-size: var(--t-sm); padding: 6px 0; }
.leyenda { display: none; }
.cluster-neeti { width: 34px; height: 34px; border-radius: 50%; background: rgba(155, 44, 34, 0.85); border: 2px solid var(--hoja); color: var(--crema); font-weight: 600; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.kpi { position: relative; }
.kpi .info { position: absolute; right: 8px; top: 8px; width: 16px; height: 16px; border: 1px solid var(--linea-firme); border-radius: 50%; font: italic 600 10px/14px var(--serif); text-align: center; color: var(--tinta-media); }

/* ---------- formulario de comentarios ---------- */
.formulario { padding: 8px 16px 20px; display: grid; gap: 14px; max-width: 640px; }
.formulario label, .formulario legend { display: grid; gap: 4px; font-size: var(--t-sm); font-weight: 600; color: var(--tinta); }
.formulario legend { padding: 0; margin-bottom: 4px; }
.formulario fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
.formulario input:not([type="checkbox"]), .formulario textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--linea-firme); border-radius: var(--radio); background: var(--papel); font-weight: 400; font-size: var(--t-base); }
.formulario .par { display: grid; gap: 10px; }
.formulario .opcion { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 400; }
.formulario .opcion input { width: 20px; height: 20px; accent-color: var(--navy); }
.estado-form { margin: 0; font-size: var(--t-sm); color: var(--tinta-media); min-height: 1.2em; }
.formulario .boton { justify-self: start; }

/* ---------- accesibilidad ---------- */
html.gris { filter: grayscale(1); }
html.subrayar a { text-decoration: underline !important; }
html.contraste { --papel: #ffffff; --hoja: #ffffff; --papel-hondo: #ffffff; --tinta: #000000; --tinta-media: #000000; --tinta-tenue: #1a1a1a; --navy: #000000; --navy-alto: #1a1a1a; --linea: #000000; --linea-firme: #000000; --linea-tenue: #666666; }
html.contraste .masthead, html.contraste .pie { background: #000; }
html.contraste .leaflet-popup-content-wrapper { border: 1px solid #000; }

/* ---------- preguntas frecuentes ---------- */
.faq { max-width: 860px; margin: 0 auto; padding: 8px 16px 24px; }
.faq details { border-bottom: 1px solid var(--linea); }
.faq details:first-of-type { border-top: 1px solid var(--linea-firme); }
.faq summary { list-style: none; cursor: pointer; padding: 14px 28px 14px 0; position: relative; font-family: var(--serif); font-size: var(--t-md); line-height: 1.3; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 10px; font-family: var(--sans); font-size: 1.5rem; line-height: 1; color: var(--tinta-media); }
.faq details[open] summary::after { content: "−"; }
.faq .respuesta { padding: 0 0 16px; font-family: var(--serif); font-size: var(--t-doc); max-width: 66ch; }
.faq .respuesta p { margin: 0 0 10px; }
.faq .respuesta ul { margin: 0 0 10px; padding-left: 1.2rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ---------- tablet ---------- */
@media (min-width: 768px) {
  .masthead { padding: 0 32px; }
  .masthead-nota { display: block; }
  .pie { padding: 14px 32px; }
  .pie-logo { display: block; }
  .herramientas { flex-direction: row; justify-content: space-between; align-items: center; padding: 10px 32px; gap: 20px; }
  .acc { flex-wrap: wrap; overflow: visible; }
  .buscador { width: 320px; flex: none; }
  .menu { padding: 0 28px; }
  .portada { padding: 32px 32px 8px; }
  .sobre { padding: 8px 32px 32px; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: start; }
  .seccion-rotulo { padding: 0 32px 8px; }
  .pestanas { padding: 0 18px; }
  .pestanas button { padding: 10px 14px; }
  .filtros { padding: 12px 32px 0; }
  #btnFiltros { display: none; }
  .filtros-cuerpo { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 0; }
  .kpis { grid-template-columns: repeat(3, 1fr); margin: 12px 32px; }
  .panel { margin: 0 32px 16px; }
  .aviso-datos { margin: 0 32px 16px; }
  #mapa { height: 68vh; min-height: 480px; }
  .estudios, .contacto { padding: 24px 32px 8px; }
  .lista-estudios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px; border-top: 0; }
  .lista-estudios li { border-top: 1px solid var(--linea-firme); }
  .comentarios { margin: 0 32px 16px; }
  .ficha { max-width: 560px; margin: auto; border: 1px solid var(--linea-firme); border-top: 3px solid var(--navy); max-height: 90vh; }
  .faq { padding: 16px 32px 32px; }
  .formulario .par { grid-template-columns: 1fr 1fr; }
  .mapa-mundo { height: 420px; }
}

/* ---------- escritorio ---------- */
@media (min-width: 1100px) {
  .filtros-cuerpo { grid-template-columns: repeat(5, 1fr); }
  .kpis { grid-template-columns: repeat(6, 1fr); }
  #mapa { height: 72vh; min-height: 560px; }
}

/* fuentes de cada pantalla */
.fuentes-pantalla ul { margin: 0; padding: 4px 14px 4px 32px; display: grid; gap: 8px; font-size: var(--t-sm); line-height: 1.4; }
.fuentes-pantalla a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.fuentes-pantalla a:hover { color: var(--alta); }

/* video guía «Sobre el mapa»: vertical, primero celular */
.video-guia { margin: 16px 0 0; }
.video-guia video { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; border-radius: var(--radio); background: var(--navy); aspect-ratio: 390 / 844; }
.video-guia figcaption { margin-top: 6px; text-align: center; color: var(--tinta-media); font-size: var(--t-sm); }
@media (min-width: 900px) { .video-guia video { max-height: 70vh; width: auto; } }

/* Campo trampa del formulario: invisible para personas y disponible para filtros anti-spam. */
.campo-trampa { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
