Text this: A variational method for efficient estimation of diffusion and free-energy profiles along collective variables.