The Supreme Court (pictured) referred a case about a transgender female's pension to the Court of Justice of the European Union