
84 P.3d 304 (2004)
COMMONWEALTH INSURANCE COMPANY OF AMERICA, Appellant/Cross-Respondent,
v.
GRAYS HARBOR COUNTY, Respondent/Cross-Appellant.
No. 28922-9-II.
Court of Appeals of Washington, Division 2.
February 18, 2004.
As Amended on Reconsideration April 13, 2004.
John Paul Zahner, Foster, Pepper & Shefelman, PLLC, Thomas Fitzgerald Ahearne, Seattle, WA, for respondent.
Mark Preston Scheer, Scheer & Sotirhos, LLP, Jerret E. Sale, Maria Elias Sotirhos, Bullivant, Houser, Bailey, PC, Seattle, WA, Douglas G. Houser, Bullivant, Houser, Bailey, Portland, OR, for appellant.
*305 ARMSTRONG, J.
This action arises out of a dispute between Grays Harbor County and its property insurer, Commonwealth Insurance, and concerns the extent of coverage for earthquake damage to the Grays Harbor County Courthouse in July 1999. Both parties submitted cost of repairs estimates to the city building official who was responsible for issuing the necessary building permit. But the County's estimate was much higher than Commonwealth's because the County included alterations that the city building official required to correct certain non-conforming conditions in the building. When the parties could not agree on Commonwealth's coverage, Commonwealth sued for declaratory relief. The trial court granted partial summary judgment in favor of Grays Harbor; both parties have appealed. We affirm that part of the summary judgment establishing that the alterations are covered if the earthquake damage caused the code enforcement resulting in the alterations. But we also hold that an issue of material fact exists as to whether the building official required the upgrades because of the earthquake damage. We remand for further proceedings.

FACTS

I. Damage
The July 1999 Satsop earthquake seriously damaged the Grays Harbor County Courthouse. Both Grays Harbor County and its property insurer, Commonwealth Insurance Company, hired engineering firms to investigate the earthquake damage and prepare repair proposals. The parties agreed that the earthquake's major structural damage was limited to the courthouse's clock, tower, dome, cupola, and one interior wall. But the engineering firms prepared repair proposals with very different scopes.
Commonwealth's engineer estimated the cost of repair at $1.2 million; the County's engineer estimated the cost at $7.2 million. Both proposals covered structural damage repairs. But only the County's proposal included upgrades to six aspects of the courthouse that were legal nonconforming conditions: egress, accessibility, fire alarm, fire protection, ventilation, and seismic systems. These upgrades account for some of the disparity in estimates. In addition, the County proposed to replace the original copper cupola, which had been painted white, with a new copper cupola. Commonwealth wanted to substitute a painted fiberglass cupola.
The City of Montesano building official decided to require the six upgrades as conditions of issuing a construction permit allowing repairs. The official required the upgrades even though the existing systems were legal nonconforming conditions undamaged by the earthquake.
Commonwealth's insurance contract provides in part:
12. BUILDING ORDINANCE
In the event of loss or damage under this Policy that causes the enforcement of any law or ordinance regulating the construction or repair of damaged facilities, this Company shall be liable for:
. . .
C. Increased cost of repair or reconstruction of the damaged and undamaged facility on same or another site and limited to the minimum requirements of such law or ordinance regulating the repair of [sic] reconstruction of the damaged property on the same site. However, the Company shall not be liable for any increased cost of construction loss unless the damaged facility is actually rebuilt or replaced.
Clerk's Papers (CP) at 75.

II. Trial Court's Ruling
The trial court ruled that Commonwealth's coverage included what the building code "might reasonably require." CP at 918. The court also concluded that under building code sections 102 and 103, the building official could refuse to allow the courthouse to be occupied until the safety improvements had been made. Finally, the court ruled that some of the improvements were authorized, including egress facilities, the fire alarm and fire protection system, ventilation, some of the accessibility improvements, seismic improvements, and the heating system improvements. But the court refused to rule *306 on the remaining upgrades and further concluded that "whether the actual expenditures were reasonable to meet the minimum requirements of a Section 102 directive remains to be determined." CP at 1101.

III. The Dispute
Commonwealth contends that its scope of repair addresses all repairs required by the code and the trial court erred in extending coverage to all upgrades in the building permit. Commonwealth argues that its policy covers only the "minimum requirements" of the code, not the "substantial alteration" the County proposed. App. Br. at 14. Commonwealth urges us to hold that the building official lacked legal authority to require the upgrades under building code section 102 because the courthouse was not a public nuisance and did not qualify for abatement either before or after the earthquake. In addition, Commonwealth maintains that an issue of material fact exists as to whether the earthquake damage caused the building official to enforce the code. Finally, Commonwealth asks us to craft an instruction defining its "like kind and quality" language to mean the "functional equivalents." App. Br. at 40.
The County argues that it is entitled to summary judgment for all the upgrades because the code required it to apply for a building permit, the building official conditioned the permit on doing all the upgrades, and Commonwealth's policy can reasonably be read to cover all required upgrades.

ANALYSIS
We review a summary judgment by considering anew the motion documents submitted to the trial judge. Wilson v. Steinbach, 98 Wash.2d 434, 437, 656 P.2d 1030 (1982). Summary judgment is appropriate only if the submitted documents demonstrate the absence of any genuine issues of material fact and that the moving party is entitled to judgment as a matter of law. CR 56(c). We consider all facts with their reasonable inferences in the light most favorable to the nonmoving party. Wilson, 98 Wash.2d at 437, 656 P.2d 1030.
We interpret insurance contracts as a matter of law. McDonald v. State Farm Fire & Cas. Co., 119 Wash.2d 724, 730, 837 P.2d 1000 (1992) (citing Roller v. Stonewall Ins. Co., 115 Wash.2d 679, 682, 801 P.2d 207 (1990)). And we construe the policy language as an average person would understand it. Boeing Co. v. Aetna Cas. & Sur. Co., 113 Wash.2d 869, 881, 784 P.2d 507 (1990) (quoting Dairyland Ins. Co. v. Ward, 83 Wash.2d 353, 358, 517 P.2d 966 (1974)). But we construe ambiguities in the contract language in favor of coverage. Shotwell v. Transamerica Title Ins. Co., 91 Wash.2d 161, 167, 588 P.2d 208 (1978). A contract is ambiguous if we can fairly read it in two ways. City of Yakima v. Int'l Ass'n of Fire Fighters, AFL-CIO, Local 469, 117 Wash.2d 655, 669-70, 818 P.2d 1076 (1991) (citing Dep't of Transp. v. State Employees' Ins. Bd., 97 Wash.2d 454, 458, 645 P.2d 1076 (1982)).

I. Policy Coverage
Commonwealth reasons that we must measure its coverage by what the building code legally requires, not simply what the building official believed he had authority to enforce under the code. Commonwealth cites Graff v. Allstate Ins. Co., 113 Wash.App. 799, 804, 54 P.3d 1266 (2002), review denied, 149 Wash.2d 1013, 70 P.3d 964 (2003), for the proposition that the court, not the building official, "characterizes the peril causing the loss." App. Br. at 17. Commonwealth then engages in a legal analysis of the Uniform Building Code, particularly section 102, to show that the official exceeded his authority.
Graff does not help Commonwealth. In Graff, the insured owner of a rental house claimed a vandalism loss under his Allstate property insurance. Allstate's policy covered vandalism but not contamination damage. Because the insured's tenant operated a methamphetamine lab on the property that caused the damage, Allstate rejected the claim as contamination. We affirmed the trial's ruling that the loss was covered as vandalism. In support of its argument for contamination loss, Allstate pointed to the city inspector's finding of "contamination," "contamination" cleanup by an environmental firm, and the health department's finding *307 that the "contamination" had been cleaned up. Graff, 113 Wash.App. at 804, 54 P.3d 1266. In answering Allstate's argument, we explained that loss characterization was for the court to determine, not the city, the private firm, or the health department. Graff, 113 Wash.App. at 804, 54 P.3d 1266. We do the same here. The building official does not determine the insured risk. We do by applying the appropriate coverage test, as we discuss below, to the building official's decision.
The County reminds us that we are to broadly construe insurance policies, particularly "all-risk" policies, in favor of coverage. Resp. Br. at 18. It then argues that we should read the "law or ordinance" language to cover all the upgrades. Resp. Br. at 17. Specifically, the County argues that the ordinance includes "an authoritative decree or direction," and the building official's June 2000 decision requiring the six upgrades was such a decree or direction. Thus, according to the County, all six upgrades are covered.
Generally, we read insurance policies as the average lay purchaser of insurance would. Zinn v. Equitable Life Ins. Co. of Iowa, 6 Wash.2d 379, 384, 107 P.2d 921 (1940). Here, Commonwealth has complicated the matter by incorporating a lawthe building codeinto its definition of coverage. Thus, Commonwealth's coverage extends to repairs to undamaged parts of a covered building if the repairs result from enforcement of any law or ordinance. If we read the policy as Commonwealth urges, the average purchaser of insurance would probably not understand its coverage without consulting an attorney to analyze the applicable building code sections. And this would largely frustrate the law's intent to encourage insurance companies to plainly write their coverage so laypersons can understand it. See Kunin v. Benefit Tr. Life Ins. Co., 910 F.2d 534, 540 (9th Cir.1990) ("[T]he insurer should be expected to set forth any limitations on its liability clearly enough for a common layperson to understand."). If, on the other hand, we adopt the County's position, coverage would be set by whatever the city required without regard to its reasonableness. Thus, if the city required the entire courthouse to be rebuilt as a condition of issuing the permit, coverage would follow. We decline to adopt either position.
The trial court measured coverage by what the building code "might reasonably require." CP at 918. We agree with the need for reasonableness. But the test is not what the building official reasonably believes the code allows him to do. Nor is it what a lawyer or judge believes the code allows. Rather, the test is what a reasonable lay insurance purchaser would believe the code allows the city to enforce. See Starczewski v. Unigard Ins. Group, 61 Wash.App. 267, 274, 810 P.2d 58 (1991) (holding that the average person would believe coverage for "the amount necessary to repair or replace the damaged property" includes the amount necessary to comply with mandatory building codes) (quoting Odessa Sch. Dist. 105 v. Ins. Co. of Am., 57 Wash.App. 893, 897, 791 P.2d 237 (1990)). We next consider whether, under this test, the trial judge properly ruled that certain upgrades are covered by Commonwealth's building ordinance coverage.

II. UBC § 102Building Official's Authority
UBC section 102 provides:
All buildings or structures regulated by this code that are structurally unsafe or not provided with adequate egress, or that constitute a fire hazard, or are otherwise dangerous to human life are, for the purpose of this section, unsafe. Any use of buildings or structures constituting a hazard to safety, health or public welfare by reason of inadequate maintenance, dilapidation, obsolescence, fire hazard, disaster, damage or abandonment is, for the purpose of this section, an unsafe use....
All such unsafe buildings, structures or appendages are hereby declared to be public nuisances and shall be abated by repair, rehabilitation, demolition or removal.
Commonwealth argues that section 102 applies only to buildings that qualify as a public nuisance under common law. According to Commonwealth, the courthouse did not rise to the level of a public nuisance before the earthquake because the disputed systems *308 were legal nonconforming uses. We reject Commonwealth's reading of section 102. Plainly read, section 102 does not require a common law analysis. Rather it defines an unsafe building as one with structural flaws, inadequate egress, fire hazards, or other conditions that make the building dangerous to human life. It then characterizes such buildings as public nuisances that shall be abated by repair or other means. And contrary to Commonwealth's argument, section 102 does not apply only to "extreme situations." App. Br. at 25. Thus, we agree with the trial judge's conclusion. A reasonable lay purchaser of insurance would conclude that the building official has authority under section 102 to require alterations to existing, nonconforming uses that are dangerous to human life.
But Commonwealth also contends that the building official could not logically find the nonconforming uses unsafe. Commonwealth argues that the nonconforming uses existed before the earthquake and the earthquake did not damage the uses. Thus, the uses must have been unsafe before the earthquake and the building official should have abated them then. But the building official testified that he lacked authority to do so. Commonwealth's argument assumes, however, that the unsafe, hazardous, and dangerous conditions referred to in section 102 are all or nothing: if the building is so unsafe now as to require upgrades, it was so unsafe before the earthquake that the city should have shut it down. Section 102 can be easily read, however, as contemplating degrees of safety, hazard, and danger. Thus, the deficiencies in the building may not have been so obvious or immediate as to require building condemnation before the earthquake damage; but they may be sufficiently serious to address as part of major repairs required by the earthquake damage. Moreover, to the extent "unsafe," "hazardous," and "dangerous" can fairly be read in two ways, we must adopt the meaning that favors coverage. Shotwell, 91 Wash.2d 161, 588 P.2d 208.
Finally, Commonwealth drafted the policy language. And they wrote coverage in broad terms, covering reconstruction of undamaged parts of the facility if required by enforcement of a law or ordinance. The phrase "enforcement of any law" focuses not on what the code might legally require but on what the building official requires (enforces). CP at 75. Commonwealth could have limited coverage to reconstruction legally required by the code, or it could have written other restrictions on coverage for undamaged parts of the insured building. It did not. Again, to the extent Commonwealth's language is ambiguous, we construe it in favor of coverage.
We hold that a reasonable lay purchaser of this insurance would conclude that even though the nonconforming uses existed before the earthquake, the County's need to obtain a permit to repair the damage gave the building official authority to require safety upgrades. Accordingly, we hold that Commonwealth's policy does cover the safety upgrades if the County can show the earthquake damage caused the building official to enforce the law requiring the upgrades.

III. Causation
Commonwealth argues that an issue of fact exists as to whether the earthquake damage caused the building official to enforce the building code and require the upgrades. Commonwealth maintains that the County's repair proposal "was so expansive the Building Official said he considered the scope a `substantial alteration' of the courthouse," and that this "caused him to believe he possessed the authority under the Code to add even further upgrades and safety improvements." App. Br. at 8. Commonwealth relies on the building official's deposition where Commonwealth's attorney asked, "[s]o based on Reid Middleton's proposal, which they estimated at seven million, you said, `Aha, this is substantial. Therefore, I'm going to require these additional code compliance or upgrades[']?" CP at 123. And the building official responded, "No." CP at 123. The building official then explained that he had considered the large discrepancy between the two proposals and determined that the real figure "was going to be somewhere in the middle" so he "treated it as [a] substantial alteration and asked for some code upgrades." CP at 124. And he testified that *309 since the County was "doing this much work," he decided to tell the County "this is what I want done;" moreover, the project was of "such a size and nature that, while we're doing it, let's do it-maybe not completely-but... enough to get everybody off of the third floor." CP at 151. He also described the Reid Middleton scope as a "maximum" scope of work that went beyond mere repair or renovation, to where he considered it a "substantial alteration" that triggered chapter 11's code upgrade requirements.[1] CP at 145.
Commonwealth also claims that it was "not permitted to submit its scope of repair" so "the Building Official did not consider it in arriving at his permit decision." App. Br. at 9-10. The record does not support this claim. The building official did receive Commonwealth's proposal. And the building official specifically said that he considered the discrepancy between the two proposals in making his decision.
The County paints the issue with a broader brush. It reasons that the earthquake damage "caused the County to have to get a building permit from the City." Resp. Br. at 23. And to get the permit, the "City required the County to do the six upgrades." Resp. Br. at 23. Thus, according to the County, the "efficient proximate cause of the County's being compelled to do the six code upgrades" was the earthquake damage. Resp. Br. at 23.
Although we agree that the earthquake damage led to the need for a permit, the building official's testimony creates an issue of fact on the more narrow question of what caused him to enforce the code.[2] Commonwealth's language is unambiguous; the earthquake damage must cause enforcement of the code. If the official enforced the code because of the proposed repairs to the earthquake damage, Commonwealth covers the upgrades at least to the minimum code requirements. But if the building official enforced the code because of the scope of the County's proposal, which included the proposed upgrades, then the upgrades are not covered or at least not entirely covered.[3] Because the County included alterations to undamaged nonconforming systems in its proposal, and it is not clear whether the building official required the alterations solely because of the earthquake damage or because of the expanded scope of the County's proposal, the fact-finder must resolve this issue.

IV. The Minimum Requirements
Commonwealth's policy covers the increased cost of repair of damaged and undamaged parts of the facility on the "same or another site and limited to the minimum requirements of such law or ordinance regulating the repair of [sic] reconstruction of the damaged property on the same site." CP at 75. Commonwealth maintains that this limits its liability to the minimum code requirements. The County argues that the section does not apply because the limiting language applies only if the County elects to build on another site.
We agree with Commonwealth. As punctuated, the phrase "limited to the minimum requirements of the law" does not modify another site construction only. Rather, it applies to construction either at the same or another site. If Commonwealth had intended the limiting language to apply only to another site construction, it would have set off the other site and limiting language by commas to make clear such intent. It did not. Moreover, the County's reading of the section would mean that Commonwealth intended to limit its liability to the minimum requirements at another site but not at the original sitea result at odds with common sense. The plain meaning of the paragraph *310 is that the limiting language applies to repairs at the same or another site. The trial judge properly ruled that the issue of "whether the actual expenditures were reasonable to meet the minimum requirements of a section 102 directive remains to be determined." CP at 1101.

V. Like Kind and Quality
Commonwealth argues that the court should interpret the phrase "like kind and quality" to include "functional equivalents and modern building material or methods" and asks us to draft an instruction to this effect. App. Br. at 40. Commonwealth advances this argument because it proposed replacing the damaged copper cupola with a fiberglass cupola. But we do not give advisory opinions. Washington Beauty Coll., Inc. v. Huse, 195 Wash. 160, 164, 80 P.2d 403 (1938). And because this issue has not been litigated below and may never be, we decline to address it.

VI. Attorney Fees
The County asserts that it is entitled to attorney fees because it had to litigate to establish coverage. "[A]n award of fees is required in any legal action where the insurer compels the insured to assume the burden of legal action, to obtain the full benefit of his insurance contract." Olympic S.S. Co., Inc. v. Centennial Ins. Co., 117 Wash.2d 37, 53, 811 P.2d 673 (1991). Although we have held that at least some of the upgrades may be covered by Commonwealth, actual coverage and the extent of it turns on at least two factual questions: (1) whether the building official enforced the code because of the need to repair the damaged parts of the courthouse and (2) whether the actual expenditures were reasonable to meet the minimum requirements of section 102, an issue the trial judge did not resolve on summary judgment. In addition, it is not clear whether the trial court reserved ruling on some of the upgrades because it could not decide on summary judgment whether they were dangerous to human life. If so, these issues must be resolved upon further submissions by the parties or by trial. Should the County prevail below, the trial court shall award costs and attorney fees incurred in this appeal.
We hold that Commonwealth's policy covers alterations to undamaged, nonconforming systems in the courthouse if the earthquake damage caused the building official to require the alterations and then only to the minimum code requirements (as explained earlier in this opinion, the test for the "minimum code requirements" covered by Commonwealth's policy is what a reasonable lay insurance purchaser would believe the code allows the city to enforce); we also hold that an issue of fact exists as to what caused the city to enforce its code and require the alterations; and we decline to rule on Commonwealth's proposed jury instruction. We remand for further proceedings.
We concur: HOUGHTON, J., and QUINN-BRINTNALL, A.C.J.
NOTES
[1]  Chapter 11 sets forth accessibility requirements and requires code upgrades where there is a substantial alteration. It also defines the phrase "substantial alteration."
[2]  The trial court apparently believed this to be an issue of fact also but explained that, "[i]t's not an appropriate function for a jury to determine and predict the behavior of one human being." CP at 915.
[3]  The fact-finder could conclude that although the building official did not require all the upgrades solely because of the earthquake damage, he would have required some of them because of the earthquake damage.
