/* Investigadores UTM — portal público de producción científica */
:root {
  --g1: #185a10; --g2: #1e6b14; --g3: #2e8a1f; --g4: #4aab30; --g6: #e6f3de;
  --amarillo-pastel: #f7e9a3; --amarillo-texto: #6a5300;
  --y3: #e0b010; --rojo: #a3322a;
  --bg: #f4f6f1; --sup: #ffffff; --sup2: #eef1ea; --borde: #e3e7dd;
  --texto: #16210e; --texto2: #4f5a44; --texto3: #8f9985;
  --r: 16px; --rc: 14px;
  --sombra: 0 1px 2px rgba(20,40,10,.05), 0 8px 28px rgba(20,40,10,.07);
  --sombra2: 0 2px 6px rgba(20,40,10,.06), 0 18px 44px rgba(20,40,10,.12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Montserrat', system-ui, sans-serif; background: var(--bg);
  color: var(--texto); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--g2); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-family: 'Montserrat', sans-serif; }

/* ---- barra superior ---- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--borde); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 20px 32px 20px 24px;
  min-height: 76px; display: flex; align-items: center; gap: 16px; }
.marca { display: flex; align-items: center; color: inherit; }
.marca:hover { text-decoration: none; }
.marca img { height: 78px; width: auto; }

/* título del portal, junto al logo, alineado a la izquierda */
.topbar-titulo { margin: 0 auto 0 0; text-align: left; font-family: 'Montserrat', sans-serif;
  font-size: 20px; font-weight: 700; color: var(--g1); line-height: 1.2; letter-spacing: -.01em; }

.barra-amarilla { height: 4px; background: linear-gradient(90deg, var(--g2), var(--y3)); }

@media (max-width: 720px) {
  .topbar-inner { min-height: 84px; padding: 22px 22px 22px 18px; gap: 10px; }
  .marca img { height: 60px; }
  .topbar-titulo { font-size: 18px; }
}

/* ---- hero ---- */
.hero { background: linear-gradient(135deg, #185a10, #0f3e0b 55%, #123a15);
  color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(224,176,16,.22), transparent 70%); }
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 22px 24px 40px; position: relative; z-index: 1; }
.hero h1 { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.hero p { max-width: 640px; margin-top: 4px; font-size: 15px; opacity: .92; }
/* métricas institucionales como pastillas tipo KPI (mismos iconos y paleta) */
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 4px; margin-top: 26px; }
.hero-stats .s { display: flex; align-items: center; gap: 11px; background: transparent;
  border: none; border-radius: var(--rc); padding: 14px 8px; color: #fff; }
.hero-stats .s svg { width: 24px; height: 24px; color: #fff; opacity: 1; flex-shrink: 0; }
.hero-stats .s b { font-family: 'Montserrat', sans-serif; font-size: 20px; font-weight: 700;
  display: block; line-height: 1; color: #fff; }
.hero-stats .s span { font-size: 11px; font-weight: 600; letter-spacing: .05em;
  color: #fff; opacity: .85; margin-top: 4px; display: block; }

/* ---- contenedor ---- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 24px; }

/* ---- controles ---- */
.controles { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.buscador { flex: 1; min-width: 260px; position: relative; }
.buscador input { width: 100%; box-sizing: border-box; height: 40px; padding: 0 16px 0 40px;
  border: 1px solid var(--borde); border-radius: 10px; font-size: 14px; font-family: inherit;
  background: var(--sup); box-shadow: var(--sombra); outline: none; }
.buscador input:focus { border-color: var(--g3); }
.buscador svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto3); }
.selector { box-sizing: border-box; height: 40px; padding: 0 14px; border: 1px solid var(--borde);
  border-radius: 10px; font-size: 14px; font-family: inherit; background: var(--sup); box-shadow: var(--sombra); outline: none; }
.conteo { width: 100%; font-size: 12.5px; color: var(--texto3); margin-top: 2px; }

/* alfabeto */
.alfabeto { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 20px; }
.alfabeto button { border: 1px solid var(--borde); background: var(--sup); color: var(--texto2);
  min-width: 30px; height: 30px; padding: 0 8px; box-sizing: border-box; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.alfabeto button:hover { border-color: var(--g4); color: var(--g1); }
.alfabeto button.on { background: var(--g2); color: #fff; border-color: var(--g2); }

/* paginación numérica */
.paginacion { display: flex; justify-content: center; align-items: center; gap: 6px;
  flex-wrap: wrap; margin-top: 26px; }
.paginacion:empty { display: none; }
#pagTop { margin-top: 14px; margin-bottom: 28px; }
.paginacion button { min-width: 38px; height: 38px; padding: 0 11px; border: 1px solid var(--borde);
  background: var(--sup); color: var(--texto2); border-radius: 9px; font-size: 13.5px; font-weight: 600; }
.paginacion button:hover:not(:disabled):not(.on) { border-color: var(--g4); color: var(--g1); }
.paginacion button.on,
.paginacion button.on:hover { background: var(--g2); color: #fff; border-color: var(--g2); }
.paginacion button:disabled { opacity: .4; cursor: default; }
.paginacion .puntos { color: var(--texto3); padding: 0 2px; }

/* desglose por tipo de documento (barras) */
.subtitulo-panel { font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0;
  color: var(--texto2); margin: 18px 0 10px; }
.tipos-barras { display: flex; flex-direction: column; gap: 8px; }
/* nombre · barra · (nº + %) en una sola línea: la última columna se dimensiona
   según su contenido y nunca parte el texto. */
.tipo-fila { display: grid; grid-template-columns: minmax(60px, 120px) minmax(24px, 1fr) auto;
  align-items: center; gap: 10px; font-size: 12.5px; }
.tipo-fila .tn { color: var(--texto2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tipo-fila .tb { height: 9px; background: var(--sup2); border-radius: 99px; overflow: hidden; min-width: 0; }
.tipo-fila .tb > div { height: 100%; background: var(--g3); border-radius: 99px; }
.tipo-fila .tv { text-align: right; color: var(--texto2); font-variant-numeric: tabular-nums;
  white-space: nowrap; }
.metricas-autoria { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--borde); }
.metricas-autoria .ma { background: var(--sup2); border-radius: var(--rc); padding: 12px 14px; }
.metricas-autoria .ma b { display: block; font-family: 'Montserrat', sans-serif; font-size: 22px;
  font-weight: 700; color: var(--texto); line-height: 1; }
.metricas-autoria .ma span { display: block; font-size: 11.5px; color: var(--texto2); margin-top: 5px; }

/* ---- grid de investigadores ---- */
.grid-inv { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }
.card-inv { display: flex; gap: 13px; background: var(--sup); border: 1px solid var(--borde);
  border-radius: var(--rc); padding: 16px; box-shadow: var(--sombra); cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; text-align: left; }
.card-inv:hover { transform: translateY(-3px); box-shadow: var(--sombra2); border-color: var(--g4); }
.avatar { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; overflow: hidden;
  background: var(--amarillo-pastel); color: var(--amarillo-texto);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
  font-family: 'Montserrat', sans-serif; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.card-inv .info { min-width: 0; flex: 1; }
.card-inv .nom { font-weight: 700; font-size: 13.5px; line-height: 1.25; color: var(--texto);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card-inv .anios { font-size: 11.5px; color: var(--texto3); margin: 3px 0 9px; }
.mini { display: flex; gap: 11px; flex-wrap: wrap; }
.mini div { line-height: 1.1; }
.mini b { font-size: 15px; color: var(--g1); font-variant-numeric: tabular-nums; }
.mini span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--texto3); }

.cargar-mas { display: block; margin: 22px auto 0; padding: 11px 26px; border: 1px solid var(--g3);
  background: var(--sup); color: var(--g1); border-radius: 10px; font-weight: 600; font-size: 14px; }
.cargar-mas:hover { background: var(--g6); }
.vacio { padding: 50px; text-align: center; color: var(--texto3); }

/* ---- destacados (portada) ---- */
.destacados { margin-bottom: 22px; }
.top-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.top-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
/* Las pestañas conservan su ancho de contenido y no se encogen: así el texto
   nunca se recorta (p. ej. la "s" de "Filiaciones") y, si no caben en una línea,
   pasan a la siguiente en vez de desbordar. */
.top-tab { font-family: 'Montserrat', sans-serif; font-size: 12.5px; font-weight: 700; text-transform: none;
  letter-spacing: 0; color: var(--texto2); background: transparent; border: 1px solid var(--borde);
  border-radius: 99px; padding: 6px 15px; cursor: pointer; transition: all .15s;
  white-space: nowrap; flex: 0 0 auto; }
.top-tab:hover { color: var(--g1); border-color: var(--g3); }
.top-tab.on { color: #fff; background: var(--g2); border-color: var(--g2); }
.dir-tit { font-size: 20px; color: var(--g1); margin: 6px 0 14px; }
.destacado { display: flex; align-items: center; gap: 11px; padding: 9px 2px; border-bottom: 1px solid var(--borde); }
.destacado:last-child { border-bottom: none; }
.destacado .rk { width: 22px; text-align: center; font-weight: 700; color: var(--texto3); font-size: 13px; flex-shrink: 0; }
.destacado .avatar { width: 38px; height: 38px; font-size: 13px; }
.destacado .dn { flex: 1; min-width: 0; }
.destacado .dn a { font-weight: 600; font-size: 13.5px; color: var(--texto); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.destacado .dn small { color: var(--texto3); font-size: 11.5px; }
.destacado .dm { text-align: right; white-space: nowrap; font-size: 11px; color: var(--texto3); line-height: 1.2; }
.destacado .dm b { display: block; color: var(--g1); font-size: 15px; }
.recip { padding: 9px 0; border-bottom: 1px solid var(--borde); }
.recip:last-child { border-bottom: none; }
.recip .rt, .recip .rt a { font-weight: 600; font-size: 13px; line-height: 1.35; color: var(--texto); }
.recip .rm { font-size: 11.5px; color: var(--texto3); margin-top: 3px; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.recip-citas { font-weight: 700; color: var(--texto); font-variant-numeric: tabular-nums; }
.fingerprint a { cursor: pointer; }

/* botón "Inicio de la página" (mismo estilo que la paginación) */
.top-page { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px;
  border: 1px solid var(--borde); background: var(--sup); color: var(--texto2);
  border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.top-page:hover { color: var(--g1); border-color: var(--g4); }

/* ayudas de filtros y paginación */
.ayuda-filtros { font-size: 12px; color: var(--texto3); margin: -10px 0 16px; }
.pag-actual { flex-basis: 100%; text-align: center; font-size: 12.5px; font-weight: 600;
  color: var(--texto2); margin-bottom: 4px; }

/* control de registros por página en el perfil */
.h3-flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-ctrl { margin-left: auto; font-weight: 400; text-transform: none; letter-spacing: 0;
  color: var(--texto2); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.pp-ctrl .selector { height: auto; padding: 6px 8px; font-size: 12.5px; box-shadow: none; }

/* info corta bajo el gráfico por año */
.info-anios { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px;
  padding-top: 11px; border-top: 1px solid var(--borde); font-size: 12px; color: var(--texto2); }
.info-anios em { color: var(--texto3); font-style: normal; }

/* popover contextual flotante al hacer clic en un gráfico */
.ctx-hint { font-size: 11px; color: var(--texto3); margin-top: 10px; }
.popover-ctx { position: fixed; z-index: 100; width: 330px; max-width: calc(100vw - 20px);
  background: var(--sup); border: 1px solid var(--borde); border-radius: 12px;
  box-shadow: var(--sombra2); overflow: hidden; }
/* Globo de tooltip por toque (móvil), para las pastillas de cuartil. */
.tip-toque { position: fixed; z-index: 120; max-width: min(280px, calc(100vw - 24px));
  background: #16210e; color: #fff; font-size: 12px; line-height: 1.4;
  padding: 8px 11px; border-radius: 9px; box-shadow: var(--sombra2); pointer-events: none; }
.pop-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #2f333a; color: #fff; font-size: 12px; font-weight: 700; padding: 8px 11px; }
.pop-cab .pop-punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle; flex: none; background: var(--y3); }
.pop-x { border: none; background: none; cursor: pointer; color: inherit; font-weight: 700; font-size: 13px; line-height: 1;
  opacity: .75; }
.pop-x:hover { opacity: 1; }
.pop-body { max-height: 300px; overflow-y: auto; padding: 4px 12px 8px; }
.ctx-row { padding: 7px 2px; border-bottom: 1px solid var(--borde); }
.ctx-row:last-child { border-bottom: none; }
.ctx-t, .ctx-t a { font-size: 12.5px; font-weight: 600; line-height: 1.35; color: var(--texto); }
.ctx-m { font-size: 11px; color: var(--texto3); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tipo-fila:hover .tn { color: var(--g1); }
.leyenda span[data-cat]:hover { color: var(--g1); }

/* ---- perfil ---- */
.volver { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 14px; font-size: 13.5px; color: var(--texto2); }
.perfil-hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  background: var(--sup); border: 1px solid var(--borde); border-radius: var(--r);
  padding: 26px; box-shadow: var(--sombra); margin-bottom: 18px;
  border-left: 5px solid var(--g2); }
.perfil-hero .avatar { width: 84px; height: 84px; font-size: 28px; box-shadow: var(--sombra); }
.perfil-hero h2 { font-size: 22px; line-height: 1.15; }
.perfil-hero .sub { color: var(--texto2); font-size: 13.5px; margin-top: 6px; }
.enlaces { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.btn-ext { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; background: var(--g6); color: var(--g1); border: 1px solid transparent; }
.btn-ext:hover { text-decoration: none; border-color: var(--g4); }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 13px; margin-bottom: 18px; }
.kpi { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--rc);
  padding: 15px 17px; box-shadow: var(--sombra); position: relative; overflow: hidden; }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--g3); }
.kpi .v { font-family: 'Montserrat', sans-serif; font-size: 27px; font-weight: 700; color: var(--g1); line-height: 1; }
.kpi .e { font-size: 11px; font-weight: 600; text-transform:  letter-spacing: .05em; color: var(--texto3); margin-top: 5px; }
.kpi .x { font-size: 10.5px; color: var(--texto3); margin-top: 3px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.grid2 > * { min-width: 0; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }
.panel { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--r);
  padding: 18px 20px; box-shadow: var(--sombra); min-width: 0; overflow-wrap: anywhere; }
/* títulos de panel en tipo oración (no versalitas), en toda la app */
.panel h3 { font-family: 'Montserrat', sans-serif; font-size: 13.5px; font-weight: 700; text-transform: none;
  letter-spacing: 0; color: var(--texto2); margin-bottom: 14px; }

/* fingerprint de áreas: chips escalados por frecuencia */
/* Áreas Scopus como barras ordenadas con su conteo. */
.areas-barras { display: flex; flex-direction: column; gap: 7px; }
.area-fila { display: flex; align-items: center; gap: 10px; border-radius: 8px; padding: 2px 4px; }
.area-fila:hover { background: var(--sup2); }
.area-fila .area-n { flex: 1 1 45%; min-width: 0; font-size: 13px; color: var(--texto); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-fila .area-bar { flex: 1 1 40%; height: 8px; background: var(--sup); border-radius: 99px; overflow: hidden; }
.area-fila .area-bar > span { display: block; height: 100%; background: var(--g3); border-radius: 99px; }
.area-fila .area-c { flex: 0 0 auto; font-size: 12.5px; color: var(--texto2); font-variant-numeric: tabular-nums; min-width: 20px; text-align: right; }
/* Frases frecuentes de los títulos, como chips clicables. */
.frases { display: flex; flex-wrap: wrap; gap: 7px; }
.frase-chip { background: var(--g6); color: var(--g1); border-radius: 99px; padding: 4px 11px; font-size: 12.5px; overflow-wrap: anywhere; }
.frase-chip b { margin-left: 5px; font-weight: 700; color: var(--g2); }
.frase-chip:hover { background: #d9ecca; }

/* donut cuartiles */
.donut-fila { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.leyenda { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--texto2); }
.leyenda span { display: flex; align-items: center; gap: 7px; }
.leyenda i { width: 11px; height: 11px; border-radius: 3px; }
.leyenda b { margin-left: auto; font-variant-numeric: tabular-nums; }
.leyenda em { font-style: normal; font-size: 11px; color: var(--texto3);
  font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }
.tipo-fila .tv em { font-style: normal; font-size: 11px; color: var(--texto3); margin-left: 4px; }

/* coautores */
.coautores { display: flex; flex-direction: column; gap: 2px; }
.coautor { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 9px; }
.coautor:hover { background: var(--sup2); }
.coautor-ir { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.coautor-ir:hover { text-decoration: none; }
.coautor .cc { cursor: pointer; }
.coautor .cc:hover { color: var(--g1); text-decoration: underline; }
/* Número de publicaciones clicable (Top 10 del landing). */
.pub-link { cursor: pointer; }
.pub-link:hover { color: var(--g1); text-decoration: underline; }
.coautor .avatar { width: 34px; height: 34px; font-size: 12.5px; }
.coautor .cn { flex: 1; min-width: 0; font-size: 13px; color: var(--texto); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coautor .cc { font-size: 11.5px; color: var(--texto3); white-space: nowrap; }

/* revistas y conferencias */
.panel-fuentes { margin-bottom: 18px; }
.revistas { display: flex; flex-direction: column; gap: 2px; min-height: 185px; }
.revista-fila { display: flex; align-items: center; gap: 10px; padding: 8px 6px;
  border-radius: 9px; border-bottom: 1px solid var(--borde); }
.revista-fila:last-child { border-bottom: none; }
.revista-fila:hover { background: var(--sup2); }
.revista-fila .rv-n { flex: 1; min-width: 0; font-size: 13px; color: var(--texto); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.revista-fila .rv-c { font-size: 11.5px; color: var(--texto3); white-space: nowrap; cursor: pointer; }
.revista-fila .rv-c:hover { color: var(--g1); text-decoration: underline; }

/* publicaciones */
.pubs { }
.pub { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--borde); }
.pub:last-child { border-bottom: none; }
.pub .anio { flex-shrink: 0; width: 46px; text-align: center; }
.pub .anio b { font-family: 'Montserrat', sans-serif; font-size: 15px; color: var(--texto); }
.pub .cuerpo { min-width: 0; }
.pub .t, .pub .t a { font-weight: 600; font-size: 14px; line-height: 1.4; color: var(--texto); }
.pub .m { font-size: 12px; color: var(--texto3); margin-top: 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pub .m.aut-pub { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.45; }
.insig-q { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 700; }
.oa-tag { color: var(--g3); font-weight: 600; }

/* pie */
.pie { border-top: 1px solid var(--borde); background: var(--sup); margin-top: 30px; }
.pie-inner { max-width: 1180px; margin: 0 auto; padding: 22px 24px; display: flex; align-items: center;
  gap: 14px; color: var(--texto3); font-size: 12px; line-height: 1.6; }
.pie-inner img { height: 34px; opacity: .9; flex-shrink: 0; }
.pie-inner strong { color: var(--texto2); font-weight: 700; }

@media (max-width: 560px) {
  .hero h1 { font-size: 26px; } .perfil-hero { padding: 18px; }
  .perfil-hero .avatar { width: 64px; height: 64px; font-size: 22px; }
  /* En móvil se estrecha el nombre y se reduce la tipografía para que la fila
     (nombre, barra, nº y %) siga entrando en una sola línea. */
  .tipo-fila { grid-template-columns: minmax(52px, 92px) minmax(18px, 1fr) auto;
    gap: 7px; font-size: 11.5px; }
  .tipo-fila .tv em { font-size: 10px; margin-left: 3px; }
}

/* coautoría externa */
.ce-sub { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--texto2);
  font-weight: 700; margin: 10px 0 6px; }
.ce-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ce-chip { background: var(--g6); color: var(--g1); border-radius: 99px; padding: 3px 10px; font-size: 12.5px; }
.ce-chip b { margin-left: 5px; font-weight: 700; color: var(--texto); }
.ce-inst { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0;
  border-bottom: 1px solid var(--borde); font-size: 12.5px; color: var(--texto2); }
.ce-inst span { min-width: 0; overflow-wrap: anywhere; }
.ce-inst b { color: var(--g1); flex-shrink: 0; }
.ce-chip { overflow-wrap: anywhere; }

/* temas recurrentes: nube de palabras */
.nube { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; line-height: 1.35; padding: 4px 0; }
.nube-w { font-weight: 700; letter-spacing: -.01em; }
.mas-citada { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700;
  color: #b8900a; background: #f7e9a3; border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.retirada { display: inline-block; font-size: 11px; font-weight: 700;
  color: #c0392b; background: #fceeed; border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.ex-utm { display: inline-block; margin: 8px 0 6px; font-size: 12px; font-weight: 600;
  color: #8a6d0b; background: #fdf3d0; border: 1px solid #f0dfa0; border-radius: 6px; padding: 2px 8px; }

/* identificadores de Scopus del autor (uno o varios si el perfil está unificado) */
.ids-scopus { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.ids-et { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--texto3); }
.ids-lista { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.id-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 99px; border: 1px solid #e6e6e1; background: #f4f4f0;
  font-size: 12px; font-variant-numeric: tabular-nums; color: var(--texto2);
  text-decoration: none; transition: border-color .13s, color .13s, background .13s; }
.id-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: #b8b8ae; flex-shrink: 0; }
.id-chip:hover { border-color: #e8d79a; color: #7a6208; background: #fdf6dc; text-decoration: none; }
.id-chip.principal { border-color: #efe0a6; color: #7a6208; background: #fdf3d0; font-weight: 700; }
.id-chip.principal::before { background: #d4a80a; }
.ex-utm-mini { display: inline-block; margin: 6px 0 2px; font-size: 10px; font-weight: 700;
  line-height: 1.3; color: #8a6d0b; background: #fdf3d0; border: 1px solid #f0dfa0;
  border-radius: 5px; padding: 1px 6px; }

/* grafo de comunidades de coautoría */
.com-wrap { position: relative; width: 100%; height: 440px; border: 1px solid var(--borde);
  border-radius: 10px; overflow: hidden; background: var(--sup); }
.com-wrap canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.com-wrap .vacio { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.com-leyenda { position: absolute; left: 10px; bottom: 10px; display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 11px; color: var(--texto2); background: rgba(255,255,255,.82); padding: 6px 9px; border-radius: 8px; }
.com-leyenda span { display: inline-flex; align-items: center; gap: 4px; }
.com-leyenda i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.com-leyenda .com-lg { cursor: pointer; padding: 2px 6px; border-radius: 6px; border: 1px solid transparent; }
.com-leyenda .com-lg:hover { background: rgba(30,107,20,.08); }
.com-leyenda .com-lg.on { background: rgba(30,107,20,.14); border-color: var(--g4); font-weight: 700; }
.com-zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 5px; }
.com-zoom button { width: 32px; height: 32px; border: 1px solid var(--borde); background: rgba(255,255,255,.9);
  border-radius: 8px; font-size: 16px; font-weight: 700; color: var(--texto2); cursor: pointer; line-height: 1; }
.com-zoom button:hover { border-color: var(--g4); color: var(--g1); }
.com-sel { margin-top: 12px; border: 1px solid var(--borde); border-radius: 10px; background: var(--sup); overflow: hidden; }
.com-sel-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 10px 12px; background: var(--sup2); border-bottom: 1px solid var(--borde); }
.com-sel-cab strong { display: block; font-size: 14px; color: var(--texto1); }
.com-sel-cab span { font-size: 12px; color: var(--texto2); }
.com-sel-x { border: none; background: none; font-size: 15px; color: var(--texto3); cursor: pointer; padding: 0 2px; }
.com-sel-lista { max-height: 320px; overflow-y: auto; }
.com-pub { padding: 8px 12px; border-bottom: 1px solid var(--borde); }
.com-pub:last-child { border-bottom: none; }
.com-pt { font-size: 13px; font-weight: 600; line-height: 1.35; }
.com-pm { font-size: 11.5px; color: var(--texto3); margin-top: 2px; }
@media (max-width: 640px) { .com-wrap { height: 360px; } .com-leyenda { font-size: 10px; gap: 7px; } }

/* impresión / CV en PDF */
@media print {
  .hero, .volver, .acciones, .enlaces, .ayuda-filtros, .paginacion, .pp-ctrl, .ctx-hint,
  .busq-global, .pie, .controles, .alfabeto { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .panel, .kpi { break-inside: avoid; box-shadow: none; }
  a { color: inherit; text-decoration: none; }
}
