SCOTUS rules in favor of religion