legal cognition