Diversity-enabled sweet spots in layered architectures and speed–accuracy trade-offs in sensorimotor control