
24 Cal.Rptr.3d 895 (2005)
127 Cal.App.4th 248
Barbara DIECKMEYER, Plaintiff and Respondent,
v.
REDEVELOPMENT AGENCY OF THE CITY OF HUNTINGTON BEACH et al., Defendants and Appellants.
No. G031869.
Court of Appeal, Fourth District, Division Three.
February 28, 2005.
*896 Jennifer McGrath, City Attorney, and Scott F. Field, Assistant City Attorney, for Defendants and Appellants.
*897 Craton & Switzer and Curt R. Craton, Long Beach, for Plaintiff and Respondent.

OPINION
BEDSWORTH, J.
The Redevelopment Agency of the City of Huntington Beach and the City of Huntington Beach (collectively the City unless otherwise stated) appeal from a judgment that directed issuance of a writ of mandate. The writ compelled the City to accept prepayment of Barbara Dieckmeyer's promissory note and reconvey a deed of trust securing the note. The City argues it was entitled to impose additional conditions on repayment, to protect its right to an equity share and ensure compliance with recorded affordable housing restrictions. Alternatively, the City argues the existing deed of trust will survive prepayment and remain as security for these additional obligations.
We conclude partial performance of a secured obligation does not extinguish the lien. Since the deed of trust secures both the note and other promises, payment of the former will not affect the security for the latter. Dieckmeyer can prepay the loan without the City's new conditions, but she is not entitled to reconveyance of the trust deed. We reverse the judgment to correct that error.[1]

* * *
In March 1994, Dieckmeyer purchased a condominium offered under an affordable housing program. Certain restrictions were imposed as part of that program. They are reflected in a "Declaration of Covenants, Conditions, and Restrictions for Affordable Housing" (CC & R's) previously recorded by the developer. The CC & R's are binding on any successor in interest to the property "or any part thereof." They are for the benefit of the City and remain in effect for 30 years (denominated the "affordability period").
The CC & R's set an affordable price for the units. An income limit is set for initial buyers. Occupancy is restricted to lower or moderate income households, as defined. There are two limits on future purchasers and occupants. First, the developer must require all buyers to record a covenant to run with the land and bind successors "that will ensure that all subsequent Buyers and occupants qualify as low, very low or moderate income households." Second, the developer must include in each deed a provision that incorporates the CC & R's and makes them binding on successors and all occupants. There is an exception: "Owner-occupants who were qualified buyers on the date of sale but are no longer qualified by virtue of an elevation of household income since the date of sale will not be subject to this affordability covenant."
The CC & R's further provide that units shall not be sold, leased, or transferred without written approval from the City. Any such act in violation of the CC & R's is declared void. If the City fails to respond *898 to a request for approval within 30 days, it is deemed to consent.
Dieckmeyer's deed includes a clause in which she consents to the CC & R's. She also covenants, for herself, her successors, and assignees, that "all subsequent buyers and occupants of the Unit will qualify as Low, Very Low, or Moderate Income Households as defined in the [CC & R's]."
The City helped Dieckmeyer finance the purchase with a $23,000 loan to cover closing costs, loan fees, and the down payment. The parties executed a loan agreement, note, and deed of trust.
The loan agreement sets out various terms and conditions. Section 1 states that the loan, together with accrued interest and an equity share, are due when Dieckmeyer sells the property to a non-qualified buyer, fails to comply with the terms of the loan agreement, trust deed and rider, CC & R's, or any requirement of the affordable housing program. Section 3 contains an acceleration clause. It provides that the loan, accrued interest, and the equity share "shall be due and payable" upon sale, transfer, or other disposition to anyone except a purchaser approved by the City; refinancing the first mortgage for more than its existing balance or for a longer term; material default under the loan agreement or CC & R's; breach of the note or trust deed; or the borrower's death, subject to certain exceptions.
Section 4 provides the equity share is not due if the property is sold to a low or moderate income buyer approved by the City, and the buyer assumes the loan. It goes on as follows: "If the [City] is unable to verify the Buyer's income .... the Equity Share Amount shall be due and payable concurrent with the repayment of the Note Amount plus interest."
Section 12, entitled "Equity Share," states in part as follows: "In the event that the [note] becomes due and payable prior to the thirtieth anniversary of the date of this Agreement, [Dieckmeyer] shall pay to [City] concurrent with the principal and accrued interest, an amount equal to the `equity share.'" The equity share is a percentage of the profit on the sale. It declines from 50 percent, if the property is sold within 5 years of purchase, to zero if the sale takes place after 30 years.
A further assurances clause requires Dieckmeyer to "execute any further documents consistent with the terms of this Agreement, including documents in recordable form, as the [City] shall from time to time find necessary or appropriate to effectuate its purposes in entering into this Agreement and making the Loan."[2]
The note refers to the loan agreement and CC & R's. It provides the principal and interest are due when the property is sold, or upon the occurrence of various events specified in an acceleration clause that is functionally the same as that in the loan agreement.[3] The note also addresses the equity share  if the property is transferred to a buyer qualified to participate in *899 the affordable housing program who is approved by the City, "no equity share amount shall be due." Such a buyer may assume the loan. Prepayment is permitted: "Privilege is reserved to make prepayments of principal on this Note without penalty or fee."
The deed of trust secures repayment of the note, future advances or obligations of the borrower, and "[p]erformance of each and every obligation, covenant, promise or agreement of Trustor contained herein in the Loan Agreement between Beneficiary and Trustor ... and in that certain Affordable Housing Agreement [the CC & R's] currently recorded on the property...."
In 2001, Dieckmeyer asked the City for a loan payoff amount. She explained she was thinking of prepaying the loan or selling the condominium. Later, Dieckmeyer decided to prepay. The City provided the payoff amount. At first, it demanded payment of the equity share. After further correspondence, the City changed its mind and told Dieckmeyer she could prepay the loan without the equity share. But there was a hitch. The City wanted Dieckmeyer to execute a "zero promissory note and second deed of trust." The new trust deed would secure payment of the equity share and performance of the affordable housing restrictions. According to the City, this was necessary to give notice of the restrictions to any subsequent purchaser, and to give notice of any pending sale to the City (presumably because a buyer would have to contact the City regarding the new trust deed).
Dieckmeyer responded with the instant writ petition. After reciting the facts set out in the preceding paragraph, the petition alleges the loan documents do not require Dieckmeyer to execute a zero note or deed of trust as a condition of prepayment. She prays for a peremptory writ of mandate to compel the City to provide a payoff amount, accept payment, cancel the note, and reconvey the deed of trust.
The answer sets out several affirmative defenses. Two are relevant to this appeal. The City asserts Dieckmeyer breached the loan documents (the alleged breach is not specified), and the equity share is due because the note was accelerated under the loan agreement. The City also submitted opposing declarations from two officials, in which they describe the affordable housing program and explain why the City needs the zero note and deed of trust.
The trial court received in evidence the loan documents and correspondence referred to above, and it heard oral argument. In a statement of decision, the court found the loan documents did not require Dieckmeyer to execute the zero note and trust deed as a condition of prepayment. It did not explain why. The court also determined Dieckmeyer was no longer subject to the CC & R's, since she could take refuge under the increased income exception. And the court found the equity share was not due, none of the triggering events having occurred.
Judgment was entered granting the petition. A later order awarded Dieckmeyer attorney fees of $23,405.50, finding reciprocal a provision in the note that the borrower is liable for fees in an action to enforce or construe the note or trust deed.

I
The City appears to argue the equity share is due on prepayment. We say "appears" because there are ambiguous statements in the City's reply brief that first back away from the argument, then return to it. In any event, there is nothing to the point.
Section 12 of the loan agreement requires payment of equity share if the loan "becomes due and payable prior to the *900 thirtieth anniversary of the date of this Agreement." Two provisions bear on when that happens. Section 1 states the loan is payable upon sale to a non-qualified buyer, breach of the loan agreement, deed of trust, CC & R's, "any other law, requirement or condition of the Affordable Housing Program or governmental entity." Section 3, the acceleration clause, provides the loan is also payable on sale, transfer, or other disposition to a purchaser not approved by the City; refinancing the first mortgage for an amount in excess of the then-current balance; default under the loan agreement, CC & R's, note or deed of trust; or death of the borrower unless survived by a household member who is qualified to participate in the affordable housing program.
None of these events has yet occurred so prepayment of the note does not entitle the City to the equity share. Prepayment is not a breach of the loan documents, CC & R's, or any law pointed to by the City, nor is it one of the events listed in the acceleration clause. While the City could have written the loan agreement to make the equity share due upon prepayment of the note, it did not.
The City's arguments to correct this oversight, if such it was, are not persuasive. It contends section 12 of the loan agreement provides the equity share is due if the loan "was paid" prior to its 30th anniversary. But that misstates the record. Section 12 says the equity share is payable if the loan becomes "due and payable" before the 30-year mark. Prepayment does not make the loan due and payable as defined in the loan agreement, so section 12 does not help the City.
Equally wide of the mark is the contention that under section 5 of the loan agreement, the only time the equity share is not due is upon sale to an approved buyer who assumes the loan. That is not so. Section 5 excuses the obligation upon sale to a qualified, assuming buyer. But saying when an obligation is excused cannot create an obligation that does not exist. Other provisions, set out above, state when the equity share is due. That happens only upon certain events, and prepayment is not one of them. So the equity share is not due upon prepayment of the note.

II
The City argues it is entitled to demand the zero note and trust deed under the further assurances clause, and it needs those documents to preserve its equity share and the restrictions in the CC & R's. Alternatively, the City argues the existing deed of trust will survive prepayment of the note and remain as security for performance of the the equity share. On the latter issue, Dieckmeyer responds that prepayment of the note will extinguish the equity share, whereupon she will be entitled to reconveyance of the deed of trust.
We conclude the zero note and deed of trust are unnecessary since the existing deed of trust secures multiple obligations. Prepayment of the note will not relieve Dieckmeyer of the equity share obligation. It will satisfy one secured obligation, the note, but it will not extinguish the security for the others.

A
Dieckmeyer advances several arguments why prepayment of the note extinguishes the equity share. As a corollary, she argues prepayment entitles her to reconveyance of the deed of trust. We consider the first point here, and the second in Part IIB.
Dieckmeyer first contends the loan documents show the equity share is extinguished upon prepayment of the note. *901 The argument goes like this. Sections 4 and 12 of the loan agreement provide the equity share, if due, is to be paid "concurrent" with repayment of the note.[4] Prepayment extinguishes the loan but does not trigger the equity share. Thereafter, the equity share can never be paid concurrent with repayment of the note, so it, too, must be extinguished by prepayment. It is a good argument, but one we cannot agree with.
We do not read the loan agreement as allowing a borrower to both prepay the loan and simultaneously terminate the City's equity share. Prepayment will not affect the equity share, which will remain due upon sale to a buyer who is not of low or moderate income, or upon any of the conditions or breaches specified in the agreement.
The concurrent repayment language of sections 4 and 12, reasonably read, does not indicate the parties intended prepayment to extinguish the equity share. Section 4 states the equity share is due "concurrent with repayment" of the note. Section 12 says it is due "concurrent with the principal and accrued interest." This means no more than the equity share is due at the same time as the note comes due under the loan agreement.
To say use of the word "concurrent" means the equity share cannot be paid later is manifestly unreasonable. It would require us to infer the parties contemplated prepayment and used very obscure language to say prepayment releases the equity share. We find it difficult to believe the parties intended to deal with such an important point in such a back-handed way.
More fundamentally, the argument rests on circular reasoning. The problem arises because the loan agreement does not deal with the impact of prepayment on the equity share, so an interpretation that assumes it was considered does not advance the analysis. And, at bottom, Dieckmeyer's reading conflicts with the purpose for the equity share. The equity share is designed to recapture some of the profit if the unit is sold at market price, outside of the affordable housing program, during the 30-year affordability period when the CC & R's are in effect. That purpose would be undermined if the equity share could be eliminated by the simple expedient of prepaying the City's small down payment/closing costs loan. Reasonably read, the loan documents do not say prepayment extinguishes the equity share.
Next, Dieckmeyer argues the equity share is "not an ongoing form of profit participation mandated by law." There are actually two points here. First, the equity share is unenforceable after prepayment because it cannot survive as either a debt or profit participation share. Second, the City does not need the equity share to carry out its affordable housing program. Both are red herrings.
The loan agreement characterizes the parties' relationship as debtor and creditor, not joint venturers or partners. From this, Dieckmeyer reasons the equity share is unenforceable as a share of the profit from sale of her condominium, and it cannot be enforced as a debt because prepayment of the loan extinguishes the debt. But Dieckmeyer fails to explain why characterization of the obligation affects its validity, or cite any supporting authority, and we remain unconvinced.
The statutory argument is that inclusion of an equity share in the sale of affordable housing is permitted by statute, *902 but not required (Health & Saf.Code, § 33334.3, subd. (f)(1)(B)), and the City does not need the equity share to protect its investment in the Dieckmeyer's property. The argument is legally unsound and presumptuous. Inclusion of an equity share is authorized by law, in the City's discretion, not Dieckmeyer's. It is a means of recovering a portion of the proceeds realized when an affordable housing unit is sold for more than an affordable housing price, and the proceeds received must be deposited in a special Low and Moderate Income Housing Fund to be used for the eponymous purpose. (Health & Saf.Code, § 33334.3, subds. (c), (f)(1)(B).) Dieckmeyer chose to take advantage of the affordable housing program and enter into the loan agreement. If she felt the equity share was an unfair or unwise term, she should not have purchased the property. Having done so, Dieckmeyer cannot now complain about terms she accepted.[5]
Finally, Dieckmeyer argues that imposing the equity share after prepayment violates a legislative intent to expand housing opportunities for people of all economic levels, because it would deny her profits she could use to buy a better home. She is far wide of the mark.
The legislative intent relied upon is found in a statute that deals with the housing elements of the general plan that cities and counties are required to adopt. (Gov.Code, § 65580 et seq.) A preamble declares, inter alia, "the early attainment of decent housing and a suitable living environment for every Californian ... is a priority of the highest order." (Gov.Code, § 65580, subd. (a.).) It also says early attainment of this goal requires government and private cooperation "to expand housing opportunities and accommodate the housing needs of Californians of all economic levels." (Id., subd. (b).)
Nothing in this legislative policy allows Dieckmeyer to avoid the terms of a contract she entered into voluntarily. Dieckmeyer claims that holding her to the equity share denies lower income earners the opportunity to improve their financial condition, stifles housing opportunity because she cannot buy a better home, and would force her to "forfeit the American dream of home ownership if she relocates." Hyperbole aside, what Dieckmeyer is trying to do is get out of a contract in order to make more money. As we have said, if Dieckmeyer did not like the deal, she should not have taken it. Having enjoyed the benefits of owning a home through the affordable housing program, she cannot now reject its obligations.
The bottom line is the equity share will not be extinguished by prepayment of the loan made by the City. We turn to the impact of prepayment on the trust deed.

B
Dieckmeyer argues the property must be reconveyed upon prepayment of the loan pursuant to the reconveyance clause in the trust deed, and because the City previously conceded reconveyance was required. We cannot agree.
*903 A mortgage or deed of trust is security "for the performance of an act." (Civ.Code, § 2920, subd. (a).) While the obligation most often secured is payment of a note, it may also be performance of a contract. (Stub v. Belmont (1942) 20 Cal.2d 208, 213-214, 124 P.2d 826; 4 Miller & Starr, Cal. Real Estate (3d ed.2000) § 10:10, pp. 39-40.) Partial performance of the obligation secured does not extinguish the lien. (Civ.Code, § 2912.)
Here, the existing trust deed secures the note and performance of the obligation of the loan agreement and CC & R's. If the note is paid, that will be part performance of the secured obligation. But such payment does not extinguish the security. The trust deed will remain as security for payment of the equity share, along with Dieckmeyer's other obligations under the CC & R's and the loan agreement.
Dieckmeyer argues the reconveyance clause in the trust deed requires reconveyance upon prepayment of the note. It provides that "upon written request of the Beneficiary stating that all sums secured hereby have been paid, and upon surrender of this Deed of Trust and said Note or Notes to Trustee for cancellation and retention, ... Trustee shall reconvey, without warranty, the property held hereunder." Dieckmeyer's position is that with prepayment of the note, all sums secured will have been paid because she does not owe the equity share. But the argument against the equity share is no more persuasive here than it was earlier (see Part IIA, above), so the language of the reconveyance clause does not help Dieckmeyer.[6]
Dieckmeyer also points out that prior to oral argument, the City took the position it was required to reconvey the property upon prepayment of the loan. She suggests it cannot now make a different argument, without explaining why or citing any authority. The point is not well taken. A party may raise a new theory on appeal where it involves a purely legal question (Mattco Forge, Inc. v. Arthur Young & Co. (1997) 52 Cal.App.4th 820, 847, 60 Cal.Rptr.2d 780), and the City's supplemental brief argues reconveyance is not required. The failure to raise the argument previously did not waive the issue.
So prepayment of the note does not eliminate the equity share, and the deed of trust will remain as security for that obligation along with performance of the other obligations of the loan agreement and the CC & R's.

III
We address briefly whether Dieckmeyer is released from the obligations of the CC & R's under the increased income exception. She is not.
The exception states that "[o]wner-occupants who were qualified buyers on the date of sale but are no longer qualified by virtue of an elevation of household income since the date of sale will not be subject to this affordability covenant." The term "affordability covenant" is not defined in the CC & R's.
We think the only reasonable interpretation of the exception is that it frees an owner from the occupancy restriction (low/moderate income households), but nothing more. This allows an owner to keep his home despite an increase in income, and it preserves the remaining restrictions. It also accords with the obvious purpose of preserving the condominium *904 project as low/moderate income housing for the 30-year duration of the CC & R's. Nothing suggests the parties intended to undercut the 30-year restrictions by allowing each unit to be sold at market price when the owner's income increases, and we are unwilling to interpret the exception in a way that leads to such an anomalous result. This accords with our duty to interpret a declaration of covenants, conditions and restrictions in a way that is both reasonable and carries out the intended purpose of the contract. (Battram v. Emerald Bay Community Assn. (1984) 157 Cal.App.3d 1184, 1189, 204 Cal.Rptr. 107.)

IV
The City argues the fee award should be reversed because Dieckmeyer sought a writ of mandate rather than commencing an action for breach of contract. We cannot agree.
The City concedes the note and deed of trust contain fee clauses that would be reciprocal had Dieckmeyer sued for breach of contract or declaratory relief. But, it says, Civil Code section 1717 only makes a fee clause reciprocal in an "action on a contract," and this is a special proceeding. Granted there is a distinction between an action and a special proceeding. (Code Civ. Proc., §§ 20-23.) But the City makes no effort to explain the scope of that procedural distinction, why "action" in Civil Code section 1717 should not be read as synonymous with "lawsuit," or what policy would be served by the narrow reading it advocates. While we cannot say how we would decide the issue if appropriately briefed, in this case the appellant has failed to carry its burden of affirmatively demonstrating error in the judgment below.
Alternatively, the City argues that if we reverse in part, the fee award should also be reversed. Its reasoning goes like this: If we hold Dieckmeyer remains subject to the CC & R's and the equity share, it will have won in part, requiring reconsideration of the prevailing party question. But this point was raised for the first time in the City's reply brief, and that is too late. An appellant's failure to raise an argument in its opening brief waives the issue on appeal. (Tisher v. California Horse Racing Bd. (1991) 231 Cal.App.3d 349, 361, 282 Cal.Rptr. 330.) There was no error in the fee award.
In sum, Dieckmeyer can prepay the loan without executing the zero note and deed of trust demanded by the City. But she is not entitled to reconveyance of the deed of trust, since it also secures performance of the loan agreement and CC & R's.
The judgment is reversed. The trial court shall enter a new judgment that directs the issuance of a writ of mandate to compel the City to provide Dieckmeyer with a payoff amount for the note, accept payment, and cancel the note. Dieckmeyer shall not be required to pay the equity share, nor to execute a zero note or new deed of trust. The City shall not be required to reconvey the existing deed of trust upon prepayment of the note. In the interests of justice, each side shall bear its own costs on appeal.
WE CONCUR: SILLS, P.J., and RYLAARSDAM, J.
NOTES
[1]  This is the second time we consider this case. Dieckmeyer's petition for review of our prior opinion was granted. The Supreme Court transferred the case to this court with directions to vacate our opinion and determine whether the issue on which the case was decided was fairly encompassed within the parties' briefs. To afford the parties all benefit of the doubt, we invited them to submit supplemental briefs on two questions: (1) assuming the note may be prepaid, would prepayment extinguish the equity share, and if not, when would the equity share be due; (2) assuming prepayment does not extinguish the equity share, would prepayment entitle Dieckmeyer to reconveyance of the deed of trust. Both sides responded. In this opinion, we discuss those issues and reach the same conclusion as before.
[2]  Mention should also be made of a rider to the trust deed, which for the most part repeats the provisions of the loan agreement. The CC & R's, the deed to Dieckmeyer, and the deed of trust were all duly recorded. The remaining documents were not.
[3]  The acceleration clause provides the note is due upon the following events: (a) sale to a buyer not approved by the City as qualified to participate in the affordable housing program; (b) refinancing of a senior lien for more than its existing balance; (c) the borrower's failure to occupy the unit as a principal residence, breach of the underlying loan agreement, or breach of the CC & R's; (d) the closing of probate following the borrower's death; (e) default on the note; or (f) default on the deed of trust.
[4]  Dieckmeyer also cites sections of the rider, but they simply repeat the provisions of the loan agreement and do not add to her arguments.
[5]  Dieckmeyer also implies the equity share is an invalid penalty, citing Ridgley v. Topa Thrift & Loan Assn. (1998) 17 Cal.4th 970, 73 Cal.Rptr.2d 378, 953 P.2d 484. The reliance is misplaced. Ridgley held a late payment charge of six months' interest on the principal balance of a $2.3 million loan was unenforceable as a liquidated damage clause, since the charge bore no reasonable relationship to the anticipated damages. Here, the equity share is not liquidated damages. Rather, it is a statutorily authorized recovery of a portion of the proceeds in excess of the affordable housing resale price of the property, to be used for additional low and moderate income housing.
[6]  Dieckmeyer does not suggest the "all sums secured" language in the reconveyance clause excludes the non-monetary obligations of the loan agreement and the CC & R's, so we have no occasion to consider that issue.
