; or (v) any online operations or activities of an organization exempt under this section. (B) The following shall not be a place of public accommodation, even if used for a commercial purpose, except within the area and during the time that the property or facility is open to the public; operated primarily for a commercial purpose; and not primarily related to the inculcation, promotion, or expression of religion— (i) other appurtenant properties or facilities owned or operated by a church, by another house of worship, or by a religious educational institution; or (ii) a property owned or operated primarily for noncommercial purposes by a nonprofit religious corporation that holds itself out to the public as substantially religious, has as its stated purpose in its organic documents that it is religious, and is substantially religious in its current operations. (C) This paragraph (11) shall not apply to a person or entity that discriminates because of race, color, or national origin with respect to a property or facility enumerated in (A) or (B). (12) Provided that equivalent treatment, services, facilities, and benefits are made available and without prejudicing rights or protections based on any other protected class status— (A) nothing in this title that refers to sex shall be construed to prevent a fitness center, spa, or similar place, whose services or facilities are intended for the exclusive use of persons of the same sex, from providing the use of those services or facilities exclusively to persons of that sex or prohibit a place of public accommodation from temporarily restricting access to a fitness center, spa, pool, or similar place, according to sex