Cardiff relegated from EPL after home loss