
105 Cal.Rptr.2d 802 (2001)
88 Cal.App.4th 451
COALITION ADVOCATING LEGAL HOUSING OPTIONS et al, Plaintiffs and Appellants,
v.
CITY OF SANTA MONICA, Defendant and Respondent.
No. B135879.
Court of Appeal, Second District, Division Seven.
March 13, 2001.
As Modified on Denial of Rehearing April 11, 2001.
Review Denied July 11, 2001.[*]
*803 Isaacs, Clouse & Crose, James B. Isaacs, Jr., Santa Monica, and John A. Crose, Jr., for Plaintiffs and Appellants.
Marsha Jones Moutrie, City Attorney, Barry A. Rosenbaum, Senior Land Use Attorney, and Cara E. Silver, Deputy City Attorney, for Defendant and Respondent.
BOLAND, J.[**]

INTRODUCTION
This lawsuit, brought by the Coalition Advocating Legal Housing Options and Lou Moench, challenges the constitutionality of a Santa Monica zoning ordinance. The ordinance allows the creation of "second units" in single-family residential zones, but only if the person occupying the second unit is the property owner or his/ her dependent, or a caregiver for the property owner or dependent. Since the ordinance's distinction among permissible users of second units violates both privacy and equal protection rights under established constitutional principles, the judgment upholding the ordinance must be reversed.

BACKGROUND AND PROCEDURAL HISTORY
A second unit is an attached or detached unit that provides complete independent living facilities for one or more persons. The zoning ordinance under review was passed because of a state law encouraging local agencies to permit the creation of second units in single- and multiple-family zones. The statute authorizes such local ordinances, and indeed requires local agencies to permit second units meeting state-set standards unless the locality either (1) passes its own ordinance providing for such units which may have requirements stricter than the state standards, or (2) totally precludes them in single-family or multiple-family zoned areas. (Govt.Code, § 65852.2.) But a locality cannot totally preclude second units unless its ordinance contains findings that the ban is justified by specific adverse impacts on the public health, safety and welfare that would result from allowing second units. (Id. at subd. (c).)
The state's statute on second units was originally enacted in 1982, with legislative findings that, inter alia, there was a tremendous unmet need for new housing and many benefits associated with creation of second-family residential units on existing single-family lots. These included providing a cost-effective means of serving development of housing through use of existing infrastructures, providing relatively affordable housing without public subsidy, providing a means for purchasers to meet payments on high interest loans, and providing security for homeowners. (Stats. 1982, ch. 1440, § 1.)
*804 The statute was amended in 1994. The amendment's legislative history indicates that local governments had responded to the existing law either by embracing second units as a source of affordable housing, or by discouraging their creation through complicated and expensive application procedures or other means. (Assem. Com. on Housing & Community Development, Analysis of A.B. 3198 (1993-1994 Sess.) as amended May 4, 1994, p. 4.) The amendment imposed new requirements on local jurisdictions, including limits on the size and parking requirements that could be imposed for second units. (Govt.Code, § 65852.2, subds. (d) & (e).) It also specifically declared the Legislature's intent that "any second-unit ordinances adopted by local agencies have the effect of providing for the creation of second units," and that provisions of such ordinances "are not so arbitrary, excessive, or burdensome so as to unreasonably restrict the ability of homeowners to create second units in zones in which they are authorized by local ordinance." (Govt. Code, § 65852.150.)
The City of Santa Monica (the City) received its first application for a second unit in June 1996, 13 years after the initial state law went into effect. Under state law, the City then had 120 days to pass its own ordinance, either providing for creation of second units or totally precluding them. Alternatively, the City would be required to grant a permit for the second unit if the application complied with state statutory requirements. (Govt.Code, § 65852.2, subd. (b)(1).)
The staff of the City Council recommended that the Council direct the staff to prepare an ordinance creating local standards regulating second units. The staffs report advised that the City's then-current prohibition on second units in R-1 single family districts "does not meet the requirements of State law."[1] The report said that the staff did not believe that specific findings justifying a prohibition could be made.[2] The staffs report also included a copy of a 1990 publication from the State Department of Housing and Community Development, indicating that a local ordinance limiting occupancy to persons related to the owner would be susceptible to legal challenge.
The Council held a public hearing on August 13, 1996, and accepted the staffs recommendation, and directed staff to prepare an ordinance regulating second units. The staff did so, and presented it to the Council at its meeting on September 24, 1996, again stating its view that there was not sufficient evidence to adopt the findings necessary for a ban of second units. The Planning Commission had also voted unanimously to recommend an ordinance legalizing second-unit creation in 1 zones.
Some 24 members of the public spoke at the September hearing, the majority opposing the proposal and supporting a ban on second units. The speakers opined that second units would mean more congestion, air pollution, noise, traffic, and on-street parking; would add to the burden on the water supply, trash disposal, and schools; and would divert police resources from other areas to handle the increased crime in R-1 neighborhoods.
After discussion, the Council rejected the staffs recommendation and instructed the staff to prepare new recommendations for adoption of an ordinance that would *805 prohibit rental units in the R-1 area, with the appropriate findings. The staff was also asked to evaluate whether any limited hardship exceptions should be included in such an ordinance.
The Council held a hearing on October 8, 1996, on a revised ordinance. The proposed ordinance prohibited second units in R-1 districts, with a limited exception for second units used for the owner's child or parent in cases of substantial hardship. There were 20 speakers, and again most opposed second units. Two speakers asked for a modification to expand the exception to include relatives and household help.
After discussion, the Council voted four to three to adopt Interim Ordinance 1866, allowing second units only for use by dependents/caregivers rather than only parent/child, with a requirement for a demonstration of substantial hardship and a specific prohibition against renting the unit. The following month the ordinance was extended for 18 months.
A similar interim ordinance (Ordinance No.1916) was introduced and passed four to three on June 9, 1998. It eliminated the hardship requirement, permitting second units intended and used solely for occupancy by dependents or caregivers. The ordinance also contained regulations governing lot size, density, maximum and minimum unit size, parcel coverage, parking requirements, design standards and other requirements for second units.
Before the scheduled expiration in June 1999 of Interim Ordinance No.1916, the Planning Commission recommended that the Council take a different approach to second units by controlling them through either density or concentration regulations. At the Council's meeting on April 27, 1999, the staff presented alternative ordinances for the Council's consideration, one to extend the interim ordinance temporarily, and the other to enact the same standards permanently. The staff recommended that the Council extend the interim ordinance to allow the opportunity to explore the alternatives proposed by the Planning Commission.
Again, most of the speakers at the Council's meeting opposed second units, and the Council adopted the permanent ordinance (Ordinance No.1942) on May 11, 1999, by a five to two vote.[3]
Meanwhile, in September 1998, shortly after the adoption of Interim Ordinance No.1916, the Coalition and Moench, a member of the Coalition and former member of the Planning Commission, filed a petition for writ of mandate. The petition sought a writ requiring the City Council to cease enforcement of the dependent/caregiver provision of Ordinance No.1916 or to adopt an ordinance eliminating it, and to process otherwise eligible permit applications without regard to intent or use of the second unit. After the trial court indicated that alternative forms of relief might be more appropriate, the petition was amended to add a claim for declaratory and injunctive relief. The petition was later deemed amended so as to challenge the permanent ordinance (Ordinance No.1942) upon its enactment.
The matter was heard on July 9, 1999, after filing of supplemental papers, including lengthy transcripts of the public hearings. After brief oral argument, the court took the matter under submission, and a few days later issued a minute order denying the petition, without analysis.
This appeal followed.

DISCUSSION

A. The municipal affairs doctrine does not apply.
The City argues as a preliminary matter that, as a charter city, it is not required to comply with the state statute on second units, under the "municipal affairs" *806 doctrine. That doctrine says that a charter city's ordinances relating to purely municipal affairs prevail over state laws on the same subject.
The City is incorrect. In the first place, while the City's response to the petition asserted the municipal affairs doctrine as a defense, the City did not raise the issue in its briefs to the trial court, and it is not appropriate to raise it for the first time on appeal. In the second place, if a matter is of statewide concern, charter cities must yield to applicable general state laws. (Baggett v. Gates (1982) 32 Cal.3d 128, 136, 185 Cal.Rptr. 232, 649 P.2d 874.) The Legislature has expressly declared housing to be a matter of statewide concern (e.g., Govt.Code, § 65580, subd. (a) ["availability of housing is of vital statewide importance"]; see Govt.Code, § 65852.150 ["second units are a valuable form of housing in California"]), as have the courts. (Buena Vista Gardens Apartments Assn. v. City of San Diego Planning Dept. (1985) 175 Cal. App.3d 289, 306-307, 220 Cal.Rptr. 732 (citing cases).) Santa Monica is required to comply with section 65852.2, as it recognizes in the introductory words to its own ordinance.

B. The occupancy limitation in the ordinance violates the right to privacy guaranteed by the California Constitution.
The Coalition's first argument is that, by limiting residents of second units based on familial relationships, the user provisions of the City's ordinance violate the right of privacy under the California Constitution, as described in City of Santa Barbara v. Adamson (1980) 27 Cal.3d 123, 164 Cal.Rptr. 539, 610 P.2d 436. We agree, as it is difficult to see any principled distinction between that case and this.
In Adamson, the Supreme Court invalidated an ordinance which prevented unrelated groups of more than five persons from occupying a home in a single-family zone. This prevented a group of 12 adults from living in a 24-room, 10-bedroom house owned by one of them. The question posed by the court was whether a law to promote and protect family values "may deny to individuals who are not family members certain benefits that family members enjoy." (City of Santa Barbara v. Adamson, supra, 27 Cal.3d at p. 128, 164 Cal.Rptr. 539, 610 P.2d 436.) The court said that the California constitutional right to privacy required that any incursion into individual privacy, such as Santa Barbara's restriction on communal living, be justified by a compelling public interest. (Id. at p. 131, 164 Cal.Rptr. 539, 610 P.2d 436.) The ordinance's goal of "preservation of a residential environment" was not advanced by the "rule-of-five." The court was "not persuaded" that a residential environment was in fact dependent on a blood, marriage or adoption relationship among the residents of a house. (Id. at p. 132, 164 Cal.Rptr. 539, 610 P.2d 436.) The rule-of-five was "not pertinent to noise, traffic or parking congestion, kinds of activity, or other conditions that conceivably might alter the land-use-related `characteristics' or `environment' of the districts." (Id. at pp. 132-133, 164 Cal.Rptr. 539, 610 P.2d 436.)
The court concluded that the city's stated goals could be enhanced by means less restrictive of freedom than the rule-of-five, such as reference to floor space and facilities and limitations on the number of cars applied evenly to all households, and that "[i ]n general, zoning ordinances are much less suspect when they focus on the use than when they command inquiry into who are the users." (Id. at p. 133, 164 Cal.Rptr. 539, 610 P.2d 436, emphasis in original; see also Park Redlands Covenant Control Committee v. Simon (1986) 181 Cal.App.3d 87, 96-97, 226 Cal.Rptr. 199 [invalidating covenant limiting number of occupants of house to three on privacy grounds].)
This case is only a step removed from Adamson: Santa Monica's ordinance does not control who may live in the main residence on a single-family lot, but does control *807 who may live in an independent part of the main residence (if attached) or in close proximity to it (if detached). Unless we are to say that a second unit is not a part of one's home, personal decisions about who may live in the second unit are no less entitled to privacy protection than decisions about who may live together in the main residence.
In short, the right to privacy includes the right to be left alone in our homes. (City of Santa Barbara v. Adamson, supra, 27 Cal.3d at p. 130, 164 Cal. Rptr. 539, 610 P.2d 436.) If there is a privacy right to choose with whom to live in the main residence, that same principle must apply to the right to decide who may live in the second unit, because the second unit, while allowing independent living, is still a part of the home. As Adamson warned, a zoning ordinance requiring inquiry into the identity of the user is suspect. (Id. at p. 133, 164 Cal.Rptr. 539, 610 P.2d 436.) Government may legitimately decide whether second units may be constructed in particular zones, but may not determine who may live in them.
The City argues that Adamson is no longer good law, because more recent decisions have modified the privacy standard, particularly the requirement for a "compelling interest" justifying an intrusion into privacy. The City cites Hill v. National Collegiate Athletic Assn. (1994) 7 Cal.4th 1, 26 Cal.Rptr.2d 834, 865 P.2d 633 [state constitutional right of privacy applies to private, as well as to state, action; NCAA drug testing program does not violate that right]. But the Hill standards offer the City no solace either, as decisions following Hill make it clear that the result in Adamson remains unchanged.
It is true that Hill concluded that not every assertion of a privacy interest must be overcome by a compelling interest; where the privacy interest is less central or in bona fide dispute, general balancing tests may be employed. (Hill v. National Collegiate Athletic Assn., supra, 7 Cal.4th at p. 34, 26 Cal.Rptr.2d 834, 865 P.2d 633.) Hill identified three threshold elements for establishing a violation of the right to privacy under the California Constitutiona legally protected privacy interest, a reasonable expectation of privacy, and a serious invasion of privacyand said that a privacy invasion must be evaluated by the extent to which it furthers legitimate and competing interests. (Id. at pp. 35-38, 26 Cal.Rptr.2d 834, 865 P.2d 633.) And, if legitimate objectives can be readily accomplished by alternative means with little or no privacy impact, "the prospect of actionable invasion of privacy is enhanced." (Id. at p. 38, 26 Cal.Rptr.2d 834, 865 P.2d 633.)
Applying those standards does not change the result in Adamson, or here, and the City is mistaken when it argues that Adamson is "inapposite." Indeed, in subsequent cases the Supreme Court emphasized that Hill "should not be interpreted as establishing significant new requirements or hurdles that a plaintiff must meet" [emphasis in original], or as a departure from decisionsspecifically including Adamsonthat "uniformly hold that when a challenged practice or conduct intrudes upon a constitutionally protected privacy interest, the interests or justifications supporting the challenged practice must be weighed or balanced against the intrusion on privacy imposed by the practice." (Loder v. City of Glendale (1997) 14 Cal.4th 846, 891, 59 Cal.Rptr.2d 696, 927 P.2d 1200.)
In Loder, the court cited Adamson among others, specifically noting its holding that an intrusion on a resident's privacy interest in living with unrelated persons is not justified by governmental interests underlying the local zoning ordinance. Loder went on to say that "[n]othing in Hill suggests that the court intended to reject the constitutional analysis applied in all of these cases." (Loder v. City of Glendale, supra, at p. 892, 59 Cal.Rptr.2d 696, 927 P.2d 1200.) The court explained that the three threshold elements identified in Hill merely permit courts "to weed out claims that involve so insignificant or de minimis *808 an intrusion on a constitutionally protected privacy interest as not even to require an explanation or justification by the defendant." (Id. at p. 893, 59 Cal.Rptr.2d 696, 927 P.2d 1200.) Loder was clear that Hill did not adopt "a sweeping new rule" under which a challenge to conduct that significantly affects a privacy interest may be rejected without considering "the legitimacy or strength" of the justification for it. (Id. at pp. 893-894, 59 Cal.Rptr.2d 696, 927 P.2d 1200.)
It is clear from Adamson that the right to choose with whom to live is fundamentalnot "so insignificant or de minimis an intrusion" as to require no justification and nothing in any subsequent case suggests otherwise. The suggestion that this right may be curtailed when the home is constructed with independent living facilities included is unpersuasive.[4] The Hill threshold requirements are plainly met.
The City says it has legitimate countervailing interests to justify the occupancy restriction, such as preservation of the character of single family neighborhoods, reduction of noise, traffic and crime, and ensuring adequate parking. But, as in Adamson, it is difficult to see how excluding unrelated persons and non-dependent family members from second units, while permitting dependents and caregivers, advances the preservation of the character of the neighborhood, or is pertinent to noise, traffic, crime or parking congestion. (City of Santa Barbara v. Adamson, supra, 27 Cal.3d at 132-133, 164 Cal.Rptr. 539, 610 P.2d 436.)[5]
Using the Hill analysis, if legitimate objectives can be readily accomplished by alternative means with little or no privacy impact, the likelihood of an actionable invasion of privacy is increased. (Hill v. National Collegiate Athletic Assn., supra, 7 Cal.4th at p. 38, 26 Cal.Rptr.2d 834, 865 P.2d 633.) Here, there are alternative means with no privacy impact, as the City Council was repeatedly advised by its own staff and the Planning Commission. Those include limitations on numbers of permits issued as well as size, density, structural, parking and other requirements already in the City's ordinance. In sum, consideration of either "the legitimacy or strength" of the City's justification for the restriction on occupancy of second units makes the balance clear: the privacy intrusion effected by the ordinance violates the California Constitution.

C. The occupancy limitation in the ordinance violates California equal protection principles.
The City's ordinance effectively classifying permissible users of second *809 units also violates the equal protection clause of the California Constitution.
The City correctly observes that its zoning powers are broad and that courts must defer to legislative judgments where the validity of a zoning ordinance is fairly debatable. Of course that is so; courts must give legislative findings great weight and uphold them unless they are arbitrary and unreasonable. But even if the classification of permissible occupiers of the second unit did not infringe as it does on a fundamental right, it must bear a rational relationship to a legitimate state purpose. (Elysium Institute, Inc. v. County of Los Angeles (1991) 232 Cal. App.3d 408, 427-428, 432, 283 Cal.Rptr. 688 [distinction between nudist camps and recreational clubs, restricting former to 2 zone, bears no rational relationship to a conceivable legitimate purpose].) The ordinance fails that test as well.[6]
The City argues that its objective is to preserve the "character and integrity of single family neighborhoods" and avoid an undue concentration of population and traffic. These are certainly legitimate legislative goals, but it is difficult to see how the status of the occupier of a second unitan unrelated renter versus a dependent or caregiver who is allowed to pay rentbears any relationship to either one.
The City's own housing element shows that neighborhood character has nothing to do with the identity of the person using the second unit.[7] The housing element specifically undertakes to clarify the terms "neighborhood character" and "neighborhood quality," so that there will be a "common understanding" on which to base the City's neighborhood preservation policy. And it is clear these terms do not refer to the residents of the neighborhood. The "key component" of neighborhood character is "recurring building patterns" within given neighborhoods, and these patterns are defined by such key variables as lot size, lot development patterns and density, open space and lot coverage, building setbacks, height and architecture, and the rate of new development in those neighborhoods. (City of Santa Monica Housing Element, at 11-67 to 11-68.) Notably, the second units allowed by the City must meet specific requirements in virtually all these categories.
Nor does the occupancy restriction bear any rational relationship to the legislative goal of preventing undue concentration of population and traffic. The circumstances here are indistinguishable in principle from those in College Area Renters & Landlord Assn. v. City of San Diego (1996) 43 Cal.App.4th 677, 50 Cal.Rptr.2d 515. There, the court invalidated, on equal protection grounds, an ordinance that distinguished between tenant-occupants and owner-occupants of detached dwellings in single-family residential neighborhoods. The ordinance was designed to address nuisance problems associated with non-owner-occupied rentals, including overcrowding, lack of parking, excessive noise, and inadequate maintenance "which adversely affects the character of one-family residential zones." (Id. at p. 680, 50 Cal.Rptr.2d 515.) It regulated the number of persons over age 18 who could live in a non-owner-occupied residence based on square footage, number of bathrooms and parking facilities, but no such occupancy restriction applied to owner-residents. (Id. at p. 681, 50 Cal. *810 Rptr.2d 515.) The court could "perceive of no justification for making a distinction between the two types of detached dwelling residents," and said that if the city wanted to address problems associated with overcrowded detached homes, it should do so with a law applying evenly to all households. (Id. at p. 687, 50 Cal. Rptr.2d 515.)
Here, as to second units in single-family residential neighborhoods, the ordinance similarly distinguishes between tenant-occupants who are not dependents/caregivers and owner-occupants and/or their dependents/caregivers. It not only regulates but completely prohibits the former while permitting the latter. As in College Area Renters, if the city wants to avoid an "undue concentration of population and traffic" expected to be caused by second units, it should do so with an ordinance applying evenly to all households.
The City argues that because it could have banned second units entirely, it therefore may restrict their use. For one thing, it is questionable whether the City's findings, based not on population or traffic or any other kind of studies, but solely on opinions expressed by residents of R-1 districts, could constitute the required statutory findings that a total ban is justified by "specific adverse impacts on the public health, safety, and welfare that would result from allowing second units within single-family and multifamily zoned areas ...."[8] (Govt.Code, § 65852.2, subd. (c) [emphasis added].) Assuming the City made or could make appropriate findings to ban second units, it cannot ban them selectively in a manner violating constitutional rights.

D. The remedy for the constitutional violations is severance of the occupancy limitation.
The City argues that if the Coalition prevails, the appropriate remedy is "severance of the exemption for dependents and caregivers," which it says "would leave in place a prohibition against second units in the R-1 zone." However, the Coalition did not seek that remedy, and it is not appropriate for the court to decide what the Council would have done if it had not passed the ordinance under review.
The ordinance amends a number of sections of the City's Municipal Code to provide, in considerable detail, for second units, and in a single sentence (Muni.Code, § 9.04.13.040, subd. (a)) restricts their occupancy. The Coalition challenged only that restriction, and section 13 of the ordinance itself specifies that if any "section, subsection, sentence, clause, or phrase" is held unconstitutional, that decision "shall not affect the validity of the remaining portions of this Ordinance." It is proper for a reviewing court to correct a discriminatory classification by invalidating only the invidious exception (In re Kapperman (1974) 11 Cal.3d 542, 550, 114 Cal.Rptr. 97, 522 P.2d 657), and that is what we do here.

DISPOSITION
The judgment is reversed and the case remanded to the trial court with directions to enter a new and different judgment declaring unconstitutional and enjoining enforcement of the occupancy limitations contained in section 9.04.13.040, subd. (a), of the Santa Monica Municipal Code. Appellants shall recover their costs on appeal.
LILLIE, P.J., and WOODS, J., concur.
NOTES
[*]   Brown, J., dissented.
[**]   Judge of the Los Angeles Superior Court, assigned by the Chief Justice pursuant to article VI, section 6 of the California Constitution.
[1]  In 1988, Santa Monica's City Attorney had given the City Council similar advice, opining that the City's zoning ordinance prohibiting second units in R-1 districts was based on findings that were "legally indefensible," and that the prohibition was therefore unlawful.
[2]  The staff's report pointed out that Santa Monica's infrastructure was adequate to support development of additional units, particularly in single-family areas; that single-family areas generally had the lowest traffic volumes of any area in the City; and that additional impacts from a modest rate of second-unit development could be absorbed without significant effects.
[3]  The word "solely" was eliminated from the permanent ordinance, to make clear that, for example, a caregiver's spouse or children could live with him/her in a second unit.
[4]  The ordinance would prevent a non-dependent adult child or relative, as well unrelated persons, from occupying a second unit, so the ordinance intrudes on familial decisions as well. We note that Hill cited "the freedom to pursue consensual familial relationships" as one of those vital privacy interests that are "fundamental to personal autonomy" and require the presence of a compelling interest to overcome the privacy interest. (Hill v. National Collegiate Athletic Assn. supra, 7 Cal.4th at p. 34, 26 Cal.Rptr.2d 834, 865 P.2d 633.)
[5]  The City apparently fears an "undue concentration" of second units, which it found would not occur if occupancy were restricted to dependents and caregivers. But the only evidence in the record suggested there would not be many second units under any scenario. The City's own Housing Element Update for 1998-2003 said that, even if the City's second-unit ordinance were liberalized, "it is unlikely that second units would have a significant impact on the new housing stock during this planning period." The report explained that the majority of such requests for second units would likely be to legalize existing "bootleg" units "and not for the construction of new housing units." The staff said, in response to council-member questions, that information from other cities which have allowed second units was that there were not a significant number of second units established. And, the City Council was advised in 1988 that it could alleviate any concern about proliferation of second units by establishing a yearly limit on the number of permits which could be issued in the R-1 district. There was also a reference to American Planning Association statistics suggesting an expected range of one to three second units per thousand R-1 homes per year.
[6]  Because we invalidate the occupancy limitation on constitutional grounds, we need not consider the Coalition's additional claims that the ordinance violates the state statute on second units and the State's Fair Employment and Housing Act.
[7]  The record contains selected portions of the City's housing element and the City requests that the court take judicial notice of inadvertently omitted portions of the housing element. The omitted portion notes that one of the City's primary housing goals seeks to preserve the quality and character of its existing single- and multiple-family residential neighborhoods, and discusses the meaning and importance of the City's neighborhood preservation policy. The City's request for judicial notice is granted.
[8]  The City Council also found that a substantial number of second units already exist in R-1 neighborhoods, either built as accessory units not permitted for dwelling or built without permits. None of this substantial number of owners (except the original permit applicant) spoke at any of the public hearings.
