Scotland passes controversial gender-recognition reforms