| ¶ This appeal asks whether the parties’ purchase agreement supports at least two reasonable interpretations on when Bee-Three Development, LLC could terminate its agreement with the Prochazkas and scuttle the sale of a commercial lot. If the agreement is not open to varying interpretations, then the Pope County Circuit Court’s summary judgment in favor of Bee-Three Development, LLC may be affirmed. If, however, the contract was open to different reasonable interpretations on the termination question, then the court erred as a matter of law in granting summary judgment.
I.
Bee-Three Development, LLC entered into a written agreement to purchase a commercial lot from Robert and Donna Prochazka. During the inspection period Bee-Three terminated the agreement and demanded that the Prochazkas return $7,000 in |2earnest money. The Prochaz-kas refused. Bee-Three sued for the earnest money; the Prochazkas counterclaimed for breach of contract and asked that the earnest money be forfeited to them as liquidated damages. Bee-Three then moved for summary judgment, and the circuit court granted the motion, concluding that one of the contract’s three termination clauses unambiguously gave Bee-Three an “absolute” right to terminate the contract within the inspection period. Because we are persuaded that the termination clause is ambiguous when the entire contract is considered, we reverse the summary judgment, reinstate the counterclaim, and remand.
This controversy centers on Article 4 of the purchase agreement, which states:
Article 4
Inspection of Property
4.1 Inspection Period. During the Inspection Period, Buyer may conduct soil, engineering, environmental, geotechnical, and other tests with regard to the Property, including phase 1 and phase 11 environmental studies; investigate the availability of necessary permits and licenses and the applicable governmental *451requirements relating to Buyer’s intended use of the Property, will satisfy itself that the Property is or, in a timeframe and at a cost acceptable to Buyer, can be platted as a separate single tax lot, will satisfy itself that the Property has utilities sufficient for Buyer’s intended use, and that the Land and that the Property has the right of access and determine generally the desirability and utility of the Property for Buyer’s planned use of the Property.... Upon the expiration of the Inspection Period, the Earnest Money shall be non-refundable and “at-risk” other than as a result of a default by Seller.
4.2 [Intentionally Omitted]
4.3 Right to Terminate. If Buyer determines, in its sole and absolute discretion, that the Property is not suitable for Buyer’s intended use, then Buyer may terminate this Agreement by notifying Seller in writing of its election to terminate on or before the last day of the Inspection Period. If Buyer timely gives the notice on or before the expiration of the Inspection Period, this Agreement will terminate and the parties will have no further rights, liabilities, or obligations, except for those which are expressly to 1¡¡survive, and the Earnest Money, less the independent consideration paid to Seller shall be returned to Buyer[.]
If Buyer does not timely give written notice of its election to terminate this Agreement, Buyer has no further right to terminate this Agreement pursuant to this Section. Upon the expiration of the Inspection Period the Title Company is irrevocably authorized and directed to deliver the Earnest Money to Seller.
And here is the heart of the circuit court’s ruling on ambiguity as it granted summary judgment to Bee-Three:
When the Parties’ contract reserved to [Bee-Three] the right to terminate the contract “in its sole and absolute discretion,” that right was, by the very words that created it, absolute. To posit an interdependence between the “right to terminate” paragraph of the contract and the “right to inspect” paragraph, when the contract does not support such a nexus, is a violation of the clear meaning of the language and introduces an unwarranted and unjustifiable occasion to impute [an] ambiguity when there really is none.
In line with its finding that there was no ambiguity in the contract, the court ruled that Bee-Three properly exercised a right to terminate the contract, granted its motion for summary judgment, and awarded Bee-Three the $7,000 earnest money and costs. The Prochazkas appeal that decision.
II.
A circuit court may grant a summary judgment when there are no genuine issues of material fact to be decided by a trier of fact and the moving party is entitled to judgment as a matter of law. Benton Cnty. v. Overland Dev. Co., 371 Ark. 559, 268 S.W.3d 885 (2007). After a moving party has established a prima facie entitlement to summary judgment, the opposing party must meet proof with proof and demonstrate the existence of a material issue of fact. Id. On appeal, we determine if summary judgment was | ^appropriate based on whether the eviden-tiary items presented by the moving party in support of its motion leave a material fact unanswered. Id. This court views the evidence in the light most favorable to the party against whom the motion was filed, resolving all doubts and inferences against the moving party. Id. Our review is not limited to the pleadings; we usually also focus on the affidavits, if any, and other *452documents filed by the parties, though this case is a bit different for reasons that will be explained in due course.
Circuit courts initially decide whether a contract is ambiguous. Keller v. Safeco Ins. Co. of Am., 317 Ark. 308, 312, 877 S.W.2d 90, 93 (1994). A contractual provision is ambiguous when, as we stated at the outset, there is doubt or uncertainty as to its meaning so that it is open to at least two reasonable interpretations. Elam v. First Unum Life Ins. Co., 346 Ark. 291, 297, 57 S.W.3d 165, 169 (2001). The primary contract-interpretation rule is to give the parties’ words the meaning that they intended them to have. E.g., Singletary v. Singletary, 2013 Ark. 506, at 10, 431 S.W.3d 234, 240-41. And we must give the words their plain and ordinary meaning. Id. “The best construction is that which is made by viewing the subject of the contract, as the mass of mankind would view it, as it may be safely assumed that such was the aspect in which the parties themselves viewed it.” Id. Another settled rule is that the parties’ intention must be gathered, not from particular words and phrases, but from the entire agreement. Id.
When a contract is unambiguous the circuit court applies the plain language of the parties’ terms and determines as a matter of law how to apply the contract. Roberts Contracting Co. v. Valentine-Wooten Rd. Pub. Facility Bd., 2009 Ark. App. 437, 320 S.W.3d 1; see also Fryer v. Boyett, 64 Ark. App. 7, 978 S.W.2d 304 (1998).
Ifjlf an ambiguity is present, the circuit court may nonetheless apply the contract as a matter of law if the ambiguity can be resolved by referring to the contract. See Zulpo v. Farm Bureau Mut. Ins. Co., 98 Ark. App. 320, 255 S.W.3d 494 (2007). If the contract’s terms cannot sweep away the initial uncertainty, then the court may look outside the contract. Singletary, supra. Considerable weight may be given to how the parties themselves understood a contract’s terms, as shown by their subsequent statements, acts, and conduct. Id.
III.
The Prochazkas maintain here, as they did in circuit court, that the termination language contained in Section 4.3 is ambiguous because it reasonably has more than one possible meaning. It could be read, as the circuit court did, to allow Bee-Three to terminate the contract within the inspection period because a potential (but undisclosed) tenant had backed out for reasons totally unrelated to the commercial lot’s ability to serve the undisclosed end user’s purposes. Or the contract could be read to mean what the Prochazkas believe it does: the termination must be related to an intended purpose of the inspection period as specified in paragraph 4.1 — for example, permits, engineering tests, utilities, rights of access to and from the property, tax-related issues, and the like. Given the reasonable differences in opinion on the parties’ contractual right to terminate, the Prochazkas argue that the court erred “when it substituted its opinion as the meaning of the language” instead of leaving it “to the trier-of-fact to determine the intent of the parties.”
IfiWe begin by asking if the disputed contractual term in Section 4.3 is ambiguous, based on a four-comers reading of the document. See State Auto Prop. & Cas. Ins. Co. v. Ark. Dep’t of Envt’l Quality, 370 Ark. 251, 258, 258 S.W.3d 736, 742 (2007). In doing so we will not at this point consider the affiants’ testimony as is usually done in a summary-judgment case; that extrinsic evidence may not be used to create an ambiguity within the contract where one may not exist. Here again is *453the main provision at issue: “If Buyer determines, in its sole and absolute discretion, that the Property is not suitable for Buyer’s intended use, then Buyer may terminate this Agreement by notifying Seller in writing of its election to terminate on or before the last day of the Inspection Period.” Two additional termination clauses are present in the contract, and they each appear at different places. The second termination clause appears in Section 4.6 (titled “Utilities”) and allows the contract to be terminated “[i]f Buyer shall determine that any of the above is not true.” The third termination clause appears in Section 5.2 (titled “Covenants”) and allows Bee-Three to have a choice of remedies, including termination, if the Proehazkas made “untrue or misleading” representations or warranties. A reasonable view of the contract, which is opposite Bee-Three’s and the circuit court’s, is that the termination clauses are anchored more or less to the subject matter of the sections in which they appear. If that is so, then the termination clause in Section 4.B does not empower Bee-Three, as a matter of law, to terminate for the reason it has provided.
A material ambiguity exists because Bee-Three’s right to terminate the purchase agreement could be viewed as being as “absolute” as the circuit court concluded it to be. Our dissenting colleagues see it this way, But in our view, the disputed termination 17provision can be read to mean that Bee-Three’s exercise of its termination right under Paragraph 4.3 must be substantially related to the purpose of the inspection period and the events and concerns expressed in Article 4. Why else place a termination clause under Article 4? Why not make the argued for “absolute right to terminate” provision a standalone provision, unmoored from any other subject matter or cohtext like an inspection period? See, e.g., Harris Corp. v. Giesting & Assoc., Inc., 297 F.3d 1270, 1272 (11th Cir.2002) (convenience-term case) (finding contractual language that a party “may terminate this Agreement for convenience at any time upon sixty days written notice to the other” to be unambiguous and allowed the party to terminate the contract for any reason). Moreover, the contract in this case does not define the term “intended use.”
Having decided that there is an ambiguity within the contract that cannot be resolved by the contract itself, we may turn to the affidavits. They show that a genuine issue of material fact exists about the intended operation of Section 4.3’s termination clause. Bee-Three submitted an affidavit from Rob Holliday, who was one of Bee-Three’s managing members. According to him, after Bee-Three had a property under contract it would ensure the property was “viable” for the “specifications of the end user.” The “end use” in this -case, Holliday explained, was that Bee-Three would improve the property and then lease it to a client (the end user). Bee-Three terminated the agreement because, according to Holliday, “the client changed their mind and renewed [a lease] in their current location ... without a tenant or user we have no need to purchase the land and develop the property.” Holliday’s affidavit does not connect the failure to procure a tenant to some physical, engineering, permitting, or tax-related failure that was discovered |sduring the-inspection period. Robert Prochazka filed an opposing affidavit and stated that there were no “discussions about the contract being contingent upon [Bee-Three] securing a tenant.” He testified that Bee-Three shrouded the true purpose of the transaction — including the existence of its anticipated end-user client — in secrecy and should not be allowed to terminate the agreement under the circumstances.
*454IV.
How the parties intended the ambiguous purchase agreement to operate should be resolved by a trier of fact. See Tri-Eagle Enterprises v. Regions Bank, 2010 Ark. App. 64, at 5-6, 373 S.W.3d 399, 403-04. We therefore reverse the summary judgment, reinstate the Prochazkas’ counterclaim, and remand for further proceedings consistent with this opinion.
Reversed and remanded.
Abramson, Kinard, and Whiteaker, JJ., agree.
Virden, J., concurs.
Gruber, Vaught, Hoofman, and Brown, JJ., dissent.