/* Academia Naval V60 - legibilidad global estable.
 * Solo refuerza contraste y tamanos de texto secundarios. No usa JavaScript,
 * capas superpuestas, animaciones ni cambios de estructura. */

:root{
  --anv-readable-small:10.5px;
  --anv-readable-meta:9.5px;
}

html:not([data-theme="dark"]){
  --muted:#52636c;
  --gris:#52636c;
}

html[data-theme="dark"],body.dark{
  --muted:#bed0df;
  --gris:#bed0df;
}

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body{
  font-synthesis:none;
}

/* El texto secundario conserva jerarquia mediante color, no mediante
   transparencia: asi sigue siendo legible en cualquier tema o paleta. */
body :where(small,time,em){
  opacity:1!important;
  text-shadow:none!important;
}

body :where(
  .public-disclaimer,.esp-public-disclaimer,
  .especificos-nota,.ai-naval-note,
  .simulacro-config-info small,.simulacro-aviso small,
  .fuego-materia small,.guardadas-vacio small,
  .cobro-seguro,.cobro-divisor small,.cobro-terminos,
  .quiz-progress-copy small,.quiz-progress-copy strong em,
  .quiz-progress-stats,.quiz-map-head small,.quiz-map-summary span,
  .quiz-xp-copy small,.quiz-xp-copy strong em,.quiz-xp-caption,
  .quiz-switcher-main small,
  .esp-brand small,.esp-section-head>span,.esp-card-copy small,
  .esp-question-head small,.esp-source,.esp-sheet-top p,
  .esp-sheet-choice small,.esp-sheet-selection small,.esp-sheet-note,
  .esp-purchase-title p,.esp-purchase-row span,.esp-payment-lock small,
  .perfil-indice-niveles span,.perfil-indice-card>p,
  .perfil-dominio-absoluto small,.perfil-indice-detalles summary span,
  .perfil-dominio-fila>small,.perfil-racha-contenido>small,
  .perfil-racha-contenido>div span,
  .social-tab small,.social-message-reply-ref small,
  .social-message-attachment small,.social-receipt,
  .social-mini-state,.social-compose-preview small,
  .social-notification-kind,.social-voice-recording small,
  .social-resource-row small,.social-resources-empty,
  .social-pinned-head small,.social-pinned-list small,
  .social-study-card-meta,.social-study-card-compare,
  .social-media-viewer-copy small
){
  opacity:1!important;
}

/* Inicio, Estudiar, Perfil, Ranking y sus modales. */
body :where(
  #homeHub,#studyHub,#perfilPanel,#rankingHub,
  #modalRecordatorioPerfil,#modalAudioPerfil,#modalAnaliticaPerfil,
  #modalBibliotecaEspecificos,#especificosTomosPanel,
  #marinerosPanel,#doctrinaPanel,#legislacionPanel,#culturaPanel,#tomosPanel,
  #simulacroPanel,#retosPanel,#resultado,#pay
) small{
  font-size:var(--anv-readable-small)!important;
  line-height:1.38!important;
}

body :where(
  .accion-ruta-chip,.tema-ruta-chip,
  .simulacro-insignia,.simulacro-distribucion span,.simulacro-materias span,
  .fuego-reglas span,.infiltrado-expediente,
  .tomo-etiqueta,.subtema-chip,
  .guardadas-mini-lista-head button,
  .progreso-leyenda,.progreso-pregunta.marcada::after,
  .estadisticas-reglas span,.indice-reglas span,
  .indice-niveles-leyenda span,.indice-niveles-leyenda b,
  .perfil-reglas-indice span,.perfil-datos-grid b,
  .perfil-indice-niveles b,.perfil-metrica-contenido b,
  .perfil-dominio-fila b
){
  font-size:var(--anv-readable-meta)!important;
  line-height:1.3!important;
}

html body .especificos-biblioteca-boton-eyebrow{
  font-size:10px!important;
  line-height:1.25!important;
  opacity:1!important;
}
html body .tomo-portada span,
html body .tomo-etiqueta,
html body .tomo-progreso-cabecera{
  font-size:var(--anv-readable-meta)!important;
  line-height:1.25!important;
}
html body #perfilPanel .perfil-identidad-texto>span#perfilEmail,
html body #perfilPanel .perfil-quitar-foto{
  font-size:var(--anv-readable-small)!important;
  line-height:1.3!important;
}

/* Ranking: nombres, porcentajes y estados no se reducen en pantallas angostas. */
#rankingHub .ranking-resumen>small:first-child,
#rankingHub .ranking-total,
#rankingHub #rankingEstado{
  font-size:11px!important;
  line-height:1.35!important;
}
#rankingHub .ranking-marca-yo{font-size:10px!important}
#rankingHub .ranking-podio-nombre{font-size:12px!important;line-height:1.22!important}
#rankingHub .ranking-podio-puesto-1 .ranking-podio-nombre{font-size:12.5px!important}
#rankingHub .ranking-podio-puntos{font-size:11.5px!important}
#rankingHub .ranking-rack-nombre{font-size:12.5px!important}
#rankingHub .ranking-rack-puntos{font-size:11.5px!important}

/* Especialidad y tomos: las etiquetas impresas conservan el formato compacto,
   pero ya no bajan a los 6 o 7 pixeles. */
#especialidadPanel :where(small,em),
#tomosPanel :where(small,em),
#especificosTomosPanel :where(small,em){
  font-size:var(--anv-readable-small)!important;
  line-height:1.35!important;
}
#especialidadPanel :where(
  .esp-preview-chip,.esp-kicker,.esp-payline span,.esp-count,
  .esp-breadcrumb span,.esp-rank-label,
  .esp-rank-code-1 b,.esp-rank-code-2 b,.esp-rank-code-3 b,.esp-rank-code-4 b,
  .esp-rank-code-5 b,.esp-rank-code-6 b,.esp-rank-code-7 b,.esp-rank-code-8 b,
  .esp-rank-marineria b,.esp-tema-chip,.esp-tomo-portada::before,
  .esp-tomo-portada>span,.esp-tomo-etiquetas em,.esp-tomo-academia>b
),
#tomosPanel :where(.tomo-portada::before,.tomo-portada span,.tomo-etiqueta){
  font-size:var(--anv-readable-meta)!important;
  line-height:1.2!important;
}
html body #especialidadPanel .esp-rank-label,
html body #especialidadPanel .esp-rank-code-1 b,
html body #especialidadPanel .esp-rank-code-2 b,
html body #especialidadPanel .esp-rank-code-3 b,
html body #especialidadPanel .esp-rank-code-4 b,
html body #especialidadPanel .esp-rank-code-5 b,
html body #especialidadPanel .esp-rank-code-6 b,
html body #especialidadPanel .esp-rank-code-7 b,
html body #especialidadPanel .esp-rank-code-8 b,
html body #especialidadPanel .esp-rank-marineria b{
  font-size:var(--anv-readable-meta)!important;
  line-height:1.15!important;
}

/* Perfil analitico: elimina los textos de 5-8 px sin alterar sus graficas. */
.perfil-analitica-card small,
.perfil-analitica-resumen small,
.resultado-analitica-sesion small{
  font-size:var(--anv-readable-small)!important;
  line-height:1.35!important;
}
.perfil-analitica-card :where(
  .analitica-confianza,.analitica-confianza b,
  .analitica-trayectoria>span,.analitica-trayectoria>div span,
  .analitica-senales div>span,.analitica-seccion-titulo>span,
  .analitica-dominio b,.analitica-dominio strong,
  .analitica-carga-cabecera strong,.analitica-carga-datos span
),
.resultado-analitica-sesion :where(
  .resultado-analitica-cabecera b,.resultado-analitica-cabecera strong,
  .resultado-analitica-datos span,button
){
  font-size:10px!important;
  line-height:1.3!important;
}
.perfil-analitica-card :where(
  .perfil-analitica-titulo p,.analitica-prioridad p,.analitica-accion p,
  .analitica-carga p,.analitica-insights li,.analitica-metodo
),
.resultado-analitica-sesion p{
  font-size:10.5px!important;
  line-height:1.5!important;
}
.perfil-analitica-card .analitica-grafica :where(.label,.guide-label){
  font-size:9px!important;
}

/* Cuestionarios y controles de estudio. */
#quiz small,.modo-guardia-panel small{
  font-size:var(--anv-readable-small)!important;
  line-height:1.38!important;
}
#quiz :where(
  .quiz-switcher-tool b,.quiz-command-tool b,
  .quiz-progress-stats,.quiz-map-summary span,
  .quiz-xp-rank,.quiz-xp-caption,.quiz-question-label-v4638
){
  font-size:10px!important;
  line-height:1.3!important;
}

/* Chat Naval: metadatos y acciones siguen compactos, pero se pueden leer. */
#socialPanel small,#socialPanel time{
  font-size:10px!important;
  line-height:1.35!important;
}
#socialPanel :where(
  .social-list-head>button,.social-unread,.social-section-alert,
  .social-role-kicker,.social-action,.social-mini-action,
  .social-slot-empty,.social-danger-soft,.social-mini-state,
  .social-chat-search-form button,.social-filter-chip.compact,
  .social-attachment-icon,.social-edit-actions button,
  .social-section-message-top>b,.social-announcement-badge,
  .social-announcement-compose,.social-section-detail-tabs button small,
  .social-notification-badge,.social-notification-enable,
  .social-notification-kind,.social-voice-recording button,
  .social-message-actions button,.social-action-label,
  .social-important-badge,.social-resource-type,
  .social-study-counts button,.social-history-recent,
  .social-jump-latest,.social-study-card-kicker,.social-study-card-action,
  .social-media-viewer-close,.social-media-viewer-save,
  .social-message-pin-badge,.social-pin-options button,.social-pin-remove
){
  font-size:10px!important;
  line-height:1.25!important;
}

/* Asistente, audiolibros y controles globales. */
#asistenteNavalPanel small,#audiolibrosPanel small,
.ai-naval-note,.ai-naval-progress small,
.ai-menu-fab-text,.ai-menu-fab-pct{
  font-size:var(--anv-readable-small)!important;
  line-height:1.35!important;
}
.audiolibros-categoria-meta i{font-size:var(--anv-readable-meta)!important}
.academia-bottom-nav-item{font-size:10.5px!important}
.academia-bottom-nav-badge{font-size:9.5px!important}

/* Solar Icons conserva su duotono interno, pero el contenedor nunca se atenúa
   por una regla de texto secundaria. Los estados deshabilitados siguen usando
   la opacidad de su control padre. */
.solar-slot,.solar-slot>svg{
  color:inherit;
  text-shadow:none!important;
}

@media(max-width:390px){
  #rankingHub .ranking-podio-nombre{font-size:11.5px!important}
  #rankingHub .ranking-podio-puesto-1 .ranking-podio-nombre{font-size:12px!important}
  #rankingHub .ranking-podio-puntos{font-size:11px!important}
  .academia-bottom-nav-item{font-size:10px!important}
}

@media(prefers-contrast:more){
  html:not([data-theme="dark"]){--muted:#3f5059;--gris:#3f5059}
  html[data-theme="dark"],body.dark{--muted:#d5e2ec;--gris:#d5e2ec}
}
