import Foundation
import SharedModels

struct GrammarNote: Identifiable {
    let id: String
    let title: String
    let category: String
    let body: String

    static let allNotes: [GrammarNote] = [
        serVsEstar,
        porVsPara,
        preteriteVsImperfect,
        subjunctiveTriggers,
        reflexiveVerbs,
        objectPronouns,
        gustarLikeVerbs,
        comparativesSuperlatives,
        conditionalIfClauses,
        commandsImperative,
        saberVsConocer,
        doubleNegatives,
        adjectivePlacement,
        tenerExpressions,
        personalA,
        relativePronouns,
        futureVsIrA,
        accentMarksStress,
        seConstructions,
        estarGerundProgressive,
        spanishSuffixes,
        commonIrregularVerbs,
        typesOfIrregularVerbs,
    ]

    // MARK: - 1. Ser vs Estar

    private static let serVsEstar = GrammarNote(
        id: "ser-vs-estar",
        title: "Ser vs Estar",
        category: "Core Concepts",
        body: """
Spanish has two verbs meaning "to be": *ser* and *estar*. Choosing the wrong one changes the meaning of a sentence entirely — *ser* describes *what* something fundamentally is, while *estar* describes *how* or *where* it is right now.

        **Ser is used for** permanent or inherent qualities — identity, origin, profession, time, physical descriptions that don't change, personality traits, and the location of *events*.

        *Ella es doctora.* — She is a doctor.
        *Nosotros somos de México.* — We are from Mexico.
        *Son las tres de la tarde.* — It is three in the afternoon.
        *Mi hermano es alto y simpático.* — My brother is tall and friendly.
        *La fiesta es en mi casa.* — The party is at my house (an event).
        *El concierto fue increíble.* — The concert was incredible.

        **Estar is used for** temporary states, the physical location of *things and people*, emotions, conditions, and the results of actions. *Estar* also pairs with the gerund to form progressive tenses.

        *Estoy cansado hoy.* — I am tired today.
        *El libro está en la mesa.* — The book is on the table.
        *Ella está feliz porque aprobó el examen.* — She is happy because she passed the exam.
        *La sopa está caliente.* — The soup is hot.
        *Estamos estudiando español.* — We are studying Spanish.
        *Madrid está en España.* — Madrid is in Spain (location of a thing).

        **Memory aid:** Use **DOCTOR** for *ser* (**D**escription, **O**ccupation, **C**haracteristic, **T**ime, **O**rigin, **R**elationship) and **PLACE** for *estar* (**P**osition, **L**ocation, **A**ction in progress, **C**ondition, **E**motion).

        **Adjectives that change meaning** depending on which verb you use — this is one of the trickiest parts of the distinction:

        *Él es aburrido.* — He is boring (personality). / *Él está aburrido.* — He is bored (feeling).
        *Ella es lista.* — She is clever. / *Ella está lista.* — She is ready.
        *La manzana es verde.* — The apple is green (its color). / *La manzana está verde.* — The apple is unripe.
        *Es rico.* — He is rich (wealthy). / *Está rico.* — It tastes delicious.
        *Es malo.* — He is evil/bad. / *Está malo.* — He is sick (or it has gone bad).
        *Es vivo.* — He is sharp/lively. / *Está vivo.* — He is alive.
        *Es seguro.* — It is safe (inherently). / *Está seguro.* — He is sure (certain).

        **Common pitfalls for English speakers:**

        **1. Confusing location of events vs things.** Events use *ser*; physical objects and people use *estar*. *La reunión es en la oficina* (the meeting takes place in the office), but *Juan está en la oficina* (Juan is physically there).

        **2. Using *estar* for permanent traits.** English uses one verb for everything, so learners often say *Estoy alto* when they mean *Soy alto*. Height, nationality, and profession are *ser*.

        **3. Using *ser* for feelings.** *Soy feliz* is grammatical (deep, lasting happiness), but for "I am happy *today*" you need *estoy contento/feliz*. The same applies to *cansado, enojado, triste, enfermo* — all almost always *estar*.

        **4. Forgetting that *muerto* takes *estar*.** Death feels permanent, but Spanish treats it as a resulting state: *Está muerto* — He is dead.

        **5. Translating "to be + -ing" directly.** Progressive tenses use *estar* + gerund (*estoy comiendo*), never *ser*. And not every English "-ing" needs the progressive — Spanish simple present often covers it.
"""
    )

    // MARK: - 2. Por vs Para

    private static let porVsPara = GrammarNote(
        id: "por-vs-para",
        title: "Por vs Para",
        category: "Core Concepts",
        body: """
Both *por* and *para* translate to "for" in English, but they are not interchangeable. *Para* points forward toward a goal or destination; *por* looks back at a cause, route, or exchange.

        **Para is used for** purpose, destination, recipient, deadline, comparison, or employer — anything pointing *toward* a result.

        *Este regalo es para ti.* — This gift is for you (recipient).
        *Salimos para Madrid mañana.* — We leave for Madrid tomorrow (destination).
        *Estudio para aprender.* — I study in order to learn (purpose).
        *Necesito el informe para el lunes.* — I need the report by Monday (deadline).
        *Para ser estudiante, habla muy bien.* — For a student, she speaks very well (comparison).
        *Trabajo para una empresa grande.* — I work for a big company (employer).

        **Por is used for** cause, exchange, duration, movement through, means, or the agent in passive voice — anything explaining *why* or *how* something happens.

        *Gracias por tu ayuda.* — Thanks for your help (cause/reason).
        *Pagué veinte dólares por el libro.* — I paid twenty dollars for the book (exchange).
        *Caminamos por el parque.* — We walked through the park (movement through).
        *Estudié por dos horas.* — I studied for two hours (duration).
        *Te llamo por teléfono.* — I'll call you by phone (means).
        *La carta fue escrita por María.* — The letter was written by María (agent).

        **Memory aid — PRODDS for *por*:** **P**eriod of time, **R**eason/cause, **O**n behalf of, **D**uration, **D**estination through, **S**ubstitution/exchange. **Para** can be remembered as the "**D**estination, **D**eadline, **D**irection, **D**isparity (comparison)" verb, or just: *para* points forward (purpose, goal), *por* points backward (cause, path).

        **Contrast pairs — same sentence, different meaning:**

        *Trabajo para mi padre.* — I work for my father (he's my boss). / *Trabajo por mi padre.* — I work on behalf of my father (filling in for him).
        *Lo hago para ti.* — I do it for you (you'll benefit). / *Lo hago por ti.* — I do it because of you (you're the reason).
        *Salí para el parque.* — I left toward the park (destination). / *Salí por el parque.* — I left through the park (route).
        *Estudio para el examen.* — I study for the exam (goal). / *Estudio por el examen.* — I study because of the exam (cause).

        **Common fixed expressions with *por*:** *por favor* (please), *por supuesto* (of course), *por ejemplo* (for example), *por eso* (that's why), *por fin* (finally), *por lo menos* (at least), *por cierto* (by the way), *por ahora* (for now).

        **Common fixed expressions with *para*:** *para siempre* (forever), *para colmo* (to top it off), *para nada* (not at all), *no es para tanto* (it's not that big a deal).

        **Common pitfalls for English speakers:**

        **1. Using *para* for duration.** English "for two hours" tempts learners into *para dos horas*, but duration is *por*: *Estudié por dos horas*. (In casual speech, the preposition is often dropped entirely: *Estudié dos horas*.)

        **2. Using *por* for recipients.** Gifts and intended beneficiaries take *para*: *Este café es para ella* — not *por ella*, which would mean "in her place."

        **3. Mixing up *trabajar para* vs *trabajar por*.** *Para* = employer; *por* = on behalf of. Different relationships entirely.

        **4. Choosing *para* with "thanks."** *Gracias* is always followed by *por*: *Gracias por venir* — never *gracias para venir*.

        **5. Saying *para* with passive agents.** "Written by María" is *escrita por María* — *por* always marks the agent in passive constructions.
"""
    )

    // MARK: - 3. Preterite vs Imperfect

    private static let preteriteVsImperfect = GrammarNote(
        id: "preterite-vs-imperfect",
        title: "Preterite vs Imperfect",
        category: "Past Tenses",
        body: """
Spanish uses two simple past tenses: the preterite (*pretérito indefinido*) for completed actions with a clear endpoint, and the imperfect (*pretérito imperfecto*) for ongoing states, habits, or background scenery in the past.

        **Preterite** describes actions that started and ended at a specific point — one-time events, sequential actions, or completed stretches of time with defined limits.

        *Ayer comí una pizza.* — Yesterday I ate a pizza.
        *Ella llegó a las ocho.* — She arrived at eight.
        *Ellos vivieron en París por dos años.* — They lived in Paris for two years (and then stopped).
        *Me levanté, me duché y salí de casa.* — I got up, showered, and left the house.
        *El año pasado viajé a Perú.* — Last year I traveled to Peru.
        *De repente, oí un ruido.* — Suddenly, I heard a noise.

        **Imperfect** describes ongoing states, habitual actions, descriptions, age, time, weather, and feelings in the past — no defined endpoint, just "how things used to be" or "what was going on."

        *Cuando era niño, jugaba en el parque.* — When I was a child, I used to play in the park.
        *Hacía sol y los pájaros cantaban.* — It was sunny and the birds were singing.
        *Siempre comíamos juntos los domingos.* — We always ate together on Sundays.
        *Ella tenía diez años cuando se mudó.* — She was ten when she moved.
        *Eran las tres de la tarde.* — It was three in the afternoon.
        *Mi abuela era muy cariñosa.* — My grandmother was very loving.

        **The movie rule:** Think of a story as a movie. The **imperfect sets the scene** — background, descriptions, weather, feelings, what was already happening. The **preterite advances the plot** — the specific events that move the story forward.

        *Llovía mucho cuando de repente sonó el teléfono.* — It was raining a lot (scene) when suddenly the phone rang (plot).
        *Yo dormía cuando alguien tocó la puerta.* — I was sleeping (scene) when someone knocked (plot).

        **Key time markers:**
        Preterite: *ayer, anoche, una vez, dos veces, de repente, el año pasado, la semana pasada, en 1999*.
        Imperfect: *siempre, todos los días, normalmente, mientras, generalmente, de niño, cada verano, frecuentemente*.

        **Verbs that change meaning between tenses** — these are essential to memorize:

        *Conocí a Juan.* — I met Juan (first time). / *Conocía a Juan.* — I knew Juan (already familiar).
        *Supe la verdad.* — I found out the truth. / *Sabía la verdad.* — I knew the truth all along.
        *Quise abrir la puerta.* — I tried to open the door. / *Quería abrir la puerta.* — I wanted to open the door.
        *No quise ir.* — I refused to go. / *No quería ir.* — I didn't want to go.
        *Pude terminarlo.* — I managed to finish it. / *Podía terminarlo.* — I was able to (had the ability).
        *No pude hacerlo.* — I failed to do it (tried and couldn't). / *No podía hacerlo.* — I couldn't do it (general inability).
        *Tuve una idea.* — I got an idea (it struck me). / *Tenía una idea.* — I had an idea (it was in mind).

        **Common pitfalls for English speakers:**

        **1. Mapping English "used to" too narrowly.** "I used to live in Madrid" is imperfect (*vivía*), but so is "I lived in Madrid" when describing a habitual past period without a defined endpoint. English past simple maps to *both* tenses depending on context.

        **2. Defaulting to preterite for everything.** Beginners overuse the preterite because it feels like "the past tense." Description, age, time, weather, and feelings almost always need imperfect.

        **3. Treating duration as automatic imperfect.** A bounded duration ("for two years") is preterite if the period is closed: *Viví allí dos años*. Use imperfect only when the period is unbounded or backdrop: *Vivía allí cuando…*.

        **4. Forgetting "was + -ing" can be either.** "I was eating" is usually *comía*, but "I was eating when…" still uses imperfect for the ongoing part and preterite for the interruption.

        **5. Mixing up *conocer* and *saber* tense changes.** *Conocí* means *I met* (event), not *I knew*. *Supe* means *I found out*, not *I knew*. Confusing these flips the meaning of your sentence.
"""
    )

    // MARK: - 4. Subjunctive Triggers

    private static let subjunctiveTriggers = GrammarNote(
        id: "subjunctive-triggers",
        title: "Subjunctive Triggers",
        category: "Subjunctive",
        body: """
The subjunctive mood (*subjuntivo*) expresses wishes, doubts, emotions, and hypothetical situations — anything that isn't a stated fact. Use the acronym **WEIRDO** to remember the six categories that trigger it.

        **W — Wishes and desires:** Verbs like *querer, desear, esperar, preferir, insistir en*.
        *Quiero que vengas a la fiesta.* — I want you to come to the party.
        *Esperamos que todo salga bien.* — We hope everything goes well.
        *Prefiero que lo hagas tú.* — I prefer that you do it.

        **E — Emotions:** Verbs like *alegrarse de, temer, sentir, sorprender, gustar, molestar*.
        *Me alegra que estés aquí.* — I'm glad you are here.
        *Siento que no puedas venir.* — I'm sorry you can't come.
        *Me sorprende que no lo sepas.* — It surprises me that you don't know.

        **I — Impersonal expressions:** *Es importante que, es necesario que, es posible que, es bueno que, es raro que*.
        *Es necesario que estudies más.* — It's necessary that you study more.
        *Es posible que llueva mañana.* — It's possible that it will rain tomorrow.
        *Es una lástima que no vengas.* — It's a shame you're not coming.

        **R — Recommendations and requests:** Verbs like *recomendar, sugerir, pedir, aconsejar, exigir, mandar*.
        *Te recomiendo que pruebes la paella.* — I recommend that you try the paella.
        *El profesor pide que hagamos la tarea.* — The teacher asks that we do the homework.
        *Mi madre insiste en que coma más.* — My mother insists that I eat more.

        **D — Doubt and denial:** Verbs like *dudar, negar, no creer, no pensar, no estar seguro*.
        *Dudo que él sepa la respuesta.* — I doubt he knows the answer.
        *No creo que sea verdad.* — I don't think it's true.
        *Niego que haya pasado.* — I deny that it happened.

        **O — Ojalá:** This word (from Arabic *wa-šā Allāh*, "God willing") always triggers the subjunctive.
        *Ojalá que haga buen tiempo.* — I hope the weather is nice.
        *Ojalá pudiera viajar más.* — I wish I could travel more.

        **Important rule — change of subject:** The subjunctive almost always requires *two different subjects* connected by *que*. If the subject is the same, use the infinitive instead.
        *Quiero ir.* — I want to go (same subject).
        *Quiero que tú vayas.* — I want you to go (different subjects).
        *Espero terminar pronto.* — I hope to finish soon (same subject).
        *Espero que tú termines pronto.* — I hope you finish soon (different subjects).

        **Indicative vs subjunctive — the affirmation flip:**
        *Creo que es verdad.* — I think it's true (indicative — affirming).
        *No creo que sea verdad.* — I don't think it's true (subjunctive — doubting).
        *Es obvio que viene.* — It's obvious he's coming (indicative — fact).
        *No es obvio que venga.* — It's not obvious he's coming (subjunctive — uncertain).

        **Common trigger conjunctions** (always subjunctive after these): *antes de que* (before), *para que* (so that), *a menos que* (unless), *sin que* (without), *con tal de que* (provided that), *en caso de que* (in case).

        **Variable conjunctions** (subjunctive only for future/hypothetical, indicative for habitual/past): *cuando, hasta que, en cuanto, tan pronto como, después de que*.
        *Cuando llegue, te llamo.* — When he arrives, I'll call you (future — subjunctive).
        *Cuando llega, me llama.* — When he arrives, he calls me (habit — indicative).

        **Common pitfalls for English speakers:**

        **1. Forgetting the *que*.** The subjunctive almost never appears without a connecting *que* (or another trigger word). *Quiero vayas* is wrong — it must be *Quiero que vayas*.

        **2. Using subjunctive when subjects match.** *Quiero que yo vaya* sounds wrong; use the infinitive: *Quiero ir*. The subjunctive needs two different actors.

        **3. Missing the negation flip.** *Creo que* takes indicative, but *no creo que* takes subjunctive. The same flip happens with *pensar, parecer, ser obvio* — negation introduces doubt.

        **4. Overusing the subjunctive after *que*.** Not every *que* triggers it. *Sé que viene* (I know he's coming) is indicative because *saber* affirms a fact. The trigger must be a WEIRDO category, not just the word *que*.

        **5. Treating *cuando* as automatic subjunctive.** Use subjunctive only when referring to a future or hypothetical event. Habitual or past events with *cuando* take the indicative.
"""
    )

    // MARK: - 5. Reflexive Verbs

    private static let reflexiveVerbs = GrammarNote(
        id: "reflexive-verbs",
        title: "Reflexive Verbs",
        category: "Verb Types",
        body: """
Reflexive verbs (*verbos reflexivos*) indicate that the subject performs and receives the action — the action "reflects" back. They are identified by the pronoun *se* attached to the infinitive: *lavarse, vestirse, despertarse*.

**Reflexive pronouns** match the subject: *me* (yo), *te* (tú), *se* (él/ella/usted), *nos* (nosotros), *os* (vosotros), *se* (ellos/ustedes).

*Me despierto a las siete.* — I wake (myself) up at seven.
*Te duchas todas las mañanas.* — You shower every morning.
*Ella se viste rápidamente.* — She gets dressed quickly.
*Nos acostamos tarde los sábados.* — We go to bed late on Saturdays.

**Common reflexive verbs:** *levantarse* (to get up), *acostarse* (to go to bed), *sentarse* (to sit down), *llamarse* (to be called), *sentirse* (to feel), *preocuparse* (to worry), *quejarse* (to complain), *irse* (to leave), *ponerse* (to put on / to become), *divertirse* (to have fun).

**Pronoun placement — before or attached:** The pronoun goes *before* a conjugated verb, but *attaches* to the end of infinitives, gerunds, and affirmative commands. With *ir a* + infinitive or *estar* + gerund, either position is valid.

*Me lavo las manos.* — I wash my hands. (before conjugated)
*Voy a lavarme las manos.* / *Me voy a lavar las manos.* — I'm going to wash my hands.
*Estoy lavándome las manos.* / *Me estoy lavando las manos.* — I'm washing my hands.
*¡Lávate las manos!* — Wash your hands! (affirmative command, attached)
*¡No te laves las manos!* — Don't wash your hands! (negative command, before)

When the pronoun attaches, a written accent often appears to preserve the original stress: *lavándome, levántate, vestirse*.

**Mnemonic — the "self" test:** If you can naturally add "myself / yourself / himself" to the English translation, the verb is genuinely reflexive: *me visto* → "I dress myself." If you can't, watch out — Spanish may still require *se*, but for a different reason (see below).

**Reflexive vs non-reflexive — meaning shift:** Many verbs change meaning entirely when made reflexive. The reflexive form is not always literal "self" action.

*Dormir* (to sleep) → *Dormirse* (to fall asleep).
*Ir* (to go) → *Irse* (to leave / go away).
*Poner* (to put) → *Ponerse* (to put on / become).
*Llamar* (to call) → *Llamarse* (to be named).
*Parecer* (to seem) → *Parecerse a* (to resemble).
*Acordar* (to agree) → *Acordarse de* (to remember).
*Comer* (to eat) → *Comerse* (to eat up — emphasis).

**Reciprocal use — "each other":** Plural reflexive forms can mean the subjects act *on each other*, not on themselves. Context (or *el uno al otro* / *mutuamente*) disambiguates.

*Nos queremos mucho.* — We love each other a lot.
*Se escriben todos los días.* — They write to each other every day.
*Se miraron el uno al otro.* — They looked at each other (unambiguous).

**Edge case — verbs that aren't really "reflexive" in English:** Many Spanish verbs require *se* even though English uses no reflexive pronoun. Just memorize them.

*Quejarse* — to complain. (*Me quejo del ruido.* — I complain about the noise.)
*Atreverse a* — to dare. (*No me atrevo.* — I don't dare.)
*Arrepentirse de* — to regret. (*Se arrepiente de eso.* — He regrets that.)
*Reírse de* — to laugh at. (*Se ríen de mí.* — They laugh at me.)

**Common pitfalls:**

- *Reflexive vs impersonal/passive se.* The pronoun *se* also forms impersonal ("one does X") and passive constructions, which are NOT reflexive. *Se habla español aquí* (Spanish is spoken here) is not reflexive — Spanish isn't doing anything to itself.
- *Forgetting the pronoun.* Dropping *me/te/se* changes the meaning: *lavo el coche* (I wash the car) vs *me lavo* (I wash myself).
- *Double subject confusion.* In *me lavo las manos*, "las manos" is the direct object — Spanish uses the reflexive plus a definite article instead of "my hands." Never say *lavo mis manos*.
- *Reciprocal misread.* *Se besan* could mean "they kiss each other" (reciprocal) or "they kiss themselves" (literal). Context decides — add *el uno al otro* if you must be explicit.
"""
    )

    // MARK: - 6. Direct & Indirect Object Pronouns

    private static let objectPronouns = GrammarNote(
        id: "object-pronouns",
        title: "Direct & Indirect Object Pronouns",
        category: "Pronouns",
        body: """
Object pronouns replace nouns to avoid repetition. Spanish distinguishes between direct objects (what receives the action) and indirect objects (who benefits from or is affected by the action).

**Direct object pronouns (DOPs):** *me, te, lo/la, nos, os, los/las*. They replace the thing or person directly acted upon.

*¿Tienes el libro? Sí, lo tengo.* — Do you have the book? Yes, I have it.
*Compré las flores. Las compré ayer.* — I bought the flowers. I bought them yesterday.
*No la conozco.* — I don't know her.
*Los vi en el parque.* — I saw them in the park.

**Indirect object pronouns (IOPs):** *me, te, le, nos, os, les*. They indicate to whom or for whom the action is done.

*Le doy el regalo a María.* — I give the gift to María.
*Nos escribió una carta.* — He wrote us a letter.
*Te compré un café.* — I bought you a coffee.
*Les mandé un mensaje.* — I sent them a message.

**Placement rules — before or attached:** Object pronouns go *before* a conjugated verb, or *attach* to infinitives, gerunds, and affirmative commands. With *ir a* + infinitive or *estar* + gerund, either position is valid.

*Lo veo.* — I see it/him. (before conjugated)
*Voy a verlo.* / *Lo voy a ver.* — I'm going to see it/him.
*Estoy leyéndolo.* / *Lo estoy leyendo.* — I'm reading it.
*¡Dámelo!* — Give it to me! (affirmative command, attached)
*No me lo des.* — Don't give it to me. (negative command, before)

A written accent usually appears when two pronouns attach, to preserve the original stress: *dándomelo, díganselo, escríbeselo*.

**Mnemonic — RID order for double pronouns:** When multiple pronouns stack onto one verb, the order is always **R**eflexive → **I**ndirect → **D**irect. Think "RID" — get RID of the noun by replacing it, keeping pronouns in that order.

*Se me cayó.* — I dropped it. (Reflexive *se* + Indirect *me*.)
*Se lo dije.* — I told it to him. (Indirect *se* (← *le*) + Direct *lo*.)
*Me lo pongo.* — I put it on. (Reflexive *me* + Direct *lo*.)
*Te lo mando mañana.* — I'll send it to you tomorrow. (Indirect *te* + Direct *lo*.)

**The "le → se" rule:** When both pronouns are third person (le/les + lo/la/los/las), *le/les* changes to *se* — Spanish refuses to say *le lo*. Memory hook: two l-sounds clash, so the first one "softens" to *se*.

*Le doy el libro a Juan.* → *Se lo doy.* (NOT *le lo doy*) — I give it to him.
*Les expliqué la regla.* → *Se la expliqué.* — I explained it to them.
*¿El regalo? Se lo mandé ayer.* — The gift? I sent it to her yesterday.

Since *se* is ambiguous (him? her? them? you-formal?), clarify with *a él / a ella / a ellos / a usted*: *Se lo di a ella.*

**Redundant pronoun — required, not optional:** Spanish almost always uses the IOP *even when the indirect object noun is also stated*. To the English ear this sounds redundant; to a Spanish ear, leaving it out sounds wrong.

*Le di el libro a María.* — I gave the book to María. (*le* is required.)
*A mis padres les gusta viajar.* — My parents like to travel.

**Personal *a*:** When the direct object is a specific person (or pet), add *a* before it: *Veo a mi madre* → *La veo*. This *a* has no English translation. It disappears in the pronoun version.

**Edge cases:**

- *Leísmo.* In much of Spain, *le* is used as the DOP for masculine people: *Le vi* instead of *Lo vi* ("I saw him"). This is accepted by the RAE for masculine singular people only. Latin American Spanish sticks to *lo*.
- *Loísmo / laísmo* (using *lo/la* for indirect objects) are considered incorrect — avoid them.
- *Lo as "neuter it."* *Lo* can replace whole ideas or clauses: *No lo sé* (I don't know it/that), *Lo creo* (I believe so).

**Common pitfalls:**

- *Wrong pronoun order.* English says "give it to me," but Spanish requires indirect before direct: *dámelo*, never *dálome*. Apply RID.
- *Forgetting le → se.* *Le lo dije* is wrong — it must be *se lo dije*.
- *Dropping the redundant le.* *Di el libro a María* is grammatical but feels incomplete; native speakers expect *le di el libro a María*.
- *Missing accent on attached forms.* *Damelo* should be *dámelo*; *digaselo* should be *dígaselo*.
- *Confusing lo/le.* *Lo* = direct, *le* = indirect. *Lo llamé* (I called him — DO), *Le hablé* (I spoke to him — IO, because *hablar* takes IO).
"""
    )

    // MARK: - 7. Gustar-like Verbs

    private static let gustarLikeVerbs = GrammarNote(
        id: "gustar-like-verbs",
        title: "Gustar-like Verbs",
        category: "Verb Types",
        body: """
*Gustar* and similar verbs work "backwards" compared to English. Instead of "I like pizza," Spanish literally says "Pizza is pleasing to me" — the thing liked is the grammatical subject, and the person who likes it is an indirect object.

**Mnemonic — flip the sentence:** Before translating, mentally rewrite the English: "I like X" → "X is pleasing TO ME." That "TO ME" is the indirect object pronoun (*me*), and X is the subject that drives verb agreement. This flip applies to every verb in this family.

**Structure:** Indirect object pronoun + *gusta/gustan* + subject (the thing liked).

*Me gusta el chocolate.* — I like chocolate. (chocolate is pleasing to me)
*Me gustan los perros.* — I like dogs. (dogs are pleasing to me)
*Te gusta bailar.* — You like to dance.
*Nos gusta la música.* — We like music.
*Les gustan las películas.* — They like movies.
*A Carlos le gustan los videojuegos.* — Carlos likes video games.

**Only two main forms in each tense:** Use *gusta* (singular) with a singular noun or one or more infinitives. Use *gustan* (plural) with a plural noun. The pronoun changes (me/te/le/nos/os/les), but the verb only agrees with the *thing*.

*Me gusta leer y escribir.* — I like to read and write. (infinitives count as singular)
*¿Te gustan estos zapatos?* — Do you like these shoes? (plural noun)
*A ella le gustaba el café.* — She used to like coffee. (imperfect, singular)
*Nos gustaron las canciones.* — We liked the songs. (preterite, plural)

**Clarifying or emphasizing with *a*:** Because *le* and *les* are ambiguous (him? her? you-formal? them?), add *a + name/pronoun* for clarity. With *me/te/nos/os*, the *a + pronoun* form adds emphasis or contrast — it is not required.

*A ella le gusta el café.* — She likes coffee. (disambiguates *le*)
*A mis padres les encanta viajar.* — My parents love to travel.
*A mí me gusta, pero a ti no te gusta.* — I like it, but you don't. (emphasis/contrast)
*¿A usted le interesa este tema?* — Are you interested in this topic? (formal)

**Other verbs that follow this pattern:**

*Encantar* — to love / delight: *Me encanta esta canción.* — I love this song.
*Molestar* — to bother: *Le molesta el ruido.* — The noise bothers him.
*Importar* — to matter / care about: *No me importa el precio.* — I don't care about the price.
*Interesar* — to interest: *Nos interesan las ciencias.* — Sciences interest us.
*Faltar* — to lack / be missing: *Me faltan dos páginas.* — I'm missing two pages.
*Doler* — to hurt: *Me duele la cabeza.* — My head hurts. (*Me duelen los pies.* — My feet hurt.)
*Parecer* — to seem: *Me parece una buena idea.* — It seems like a good idea to me.
*Quedar* — to remain / have left: *No nos queda tiempo.* — We have no time left.
*Fascinar* — to fascinate: *Les fascinan los dinosaurios.* — Dinosaurs fascinate them.
*Sobrar* — to be left over: *Me sobra comida.* — I have food left over.
*Tocar* — to be one's turn: *Te toca a ti.* — It's your turn.
*Apetecer* — to feel like: *¿Te apetece un café?* — Do you feel like a coffee?

**Edge cases:**

- *Doler* uses the body part as subject — never possessives. *Me duele la cabeza*, not *mi cabeza me duele*.
- *Encantar* already means "to love / be crazy about." Don't add *mucho* — *me encanta mucho* sounds redundant. Use *me gusta mucho* if you want intensity with *gustar*.
- *Gustar* used non-inverted (*Yo te gusto* — "You like me," literally "I am pleasing to you") is grammatical but mostly heard in flirty/romantic contexts. Beginners should stick to the inverted form.
- With a person as the thing-liked, add personal *a*: *Me gusta María* can sound romantic; *Me gusta cómo canta María* is safer for "I like how María sings."

**Common pitfalls:**

- *Wrong agreement.* "I like dogs" is *me gustan los perros*, not *me gusta los perros*. The verb agrees with *los perros* (subject), not with the speaker.
- *Treating the subject as English.* Don't say *Yo gusto pizza* — that means "I am pleasing pizza." Use *Me gusta la pizza.*
- *Forgetting the article.* Spanish almost always uses the definite article with the subject: *Me gusta el chocolate*, not *Me gusta chocolate*.
- *Dropping the redundant pronoun.* Even with *a + person*, the IOP stays: *A María le gusta…*, never *A María gusta…*.
- *Using subject pronouns.* *A yo me gusta* is wrong — after *a*, you need a prepositional pronoun: *a mí, a ti, a él, a ella, a nosotros, a vosotros, a ellos*.
"""
    )

    // MARK: - 8. Comparatives & Superlatives

    private static let comparativesSuperlatives = GrammarNote(
        id: "comparatives-superlatives",
        title: "Comparatives & Superlatives",
        category: "Adjectives",
        body: """
Comparatives and superlatives let you compare people, things, and actions. Spanish uses *más* (more), *menos* (less), and *tan/tanto* (as) instead of English suffixes like "-er" and "-est."

**Mnemonic — the three frames:** Three patterns cover almost everything. **Inequality:** *más/menos … que* ("more/less … than"). **Equality with qualities:** *tan … como* ("as … as"). **Superlative:** *el/la/los/las … más/menos … de* ("the most/least … in/of"). Lock those three skeletons in and most sentences fall into place.

**Comparatives of inequality:** *más/menos + adjective/adverb/noun + que*

*María es más alta que Juan.* — María is taller than Juan.
*Este libro es menos interesante que el otro.* — This book is less interesting than the other one.
*Ella corre más rápido que yo.* — She runs faster than me.
*Tengo más amigos que tú.* — I have more friends than you.
*Estudio menos que mi hermano.* — I study less than my brother.

**Comparatives of equality:** *tan + adjective/adverb + como* — for qualities. *tanto/tanta/tantos/tantas + noun + como* — for quantities (agrees in gender and number).

*Pedro es tan inteligente como su hermana.* — Pedro is as smart as his sister.
*Esta casa es tan grande como la tuya.* — This house is as big as yours.
*No corro tan rápido como tú.* — I don't run as fast as you.
*Tengo tantos libros como ella.* — I have as many books as she does.
*No hay tanta gente como ayer.* — There aren't as many people as yesterday.
*Bebe tanto café como yo.* — He drinks as much coffee as I do. (*tanto* as adverb)

**Superlatives — "the most / the least":** Definite article + *más/menos* + adjective + *de* (NOT *en* for "in" here).

*Es la ciudad más bonita de España.* — It's the most beautiful city in Spain.
*Él es el estudiante más trabajador de la clase.* — He is the hardest-working student in the class.
*Es el restaurante menos caro del barrio.* — It's the least expensive restaurant in the neighborhood.
*Son los días más cortos del año.* — They're the shortest days of the year.

Note: English "in" maps to Spanish *de* in superlatives — not *en*. *La más alta de la familia* (the tallest in the family), not *en la familia*.

**Absolute superlative — *-ísimo/a*:** Add the *-ísimo/a/os/as* suffix to an adjective for "extremely / very." It is not a real comparison — there's no "than" — just amplification.

*La comida está riquísima.* — The food is extremely delicious.
*Estoy cansadísimo.* — I am extremely tired.
*Es un libro interesantísimo.* — It's an incredibly interesting book.

Spelling shifts before *-ísimo*: *rico → riquísimo*, *largo → larguísimo*, *feliz → felicísimo*.

**Irregular comparatives — do NOT use *más/menos*:** Four pairs have their own forms. *Más bueno* and *más malo* exist for moral character but are rare; *mejor* and *peor* are the default.

*bueno* → *mejor* (better) → *el/la mejor* (the best)
*malo* → *peor* (worse) → *el/la peor* (the worst)
*grande* → *mayor* (older / greater) → *el/la mayor* (the oldest / greatest)
*pequeño* → *menor* (younger / lesser) → *el/la menor* (the youngest / least)

*Mi hermano mayor vive en Barcelona.* — My older brother lives in Barcelona.
*Esta película es mejor que la anterior.* — This movie is better than the previous one.
*Es el peor día de mi vida.* — It's the worst day of my life.
*La menor de las hermanas tiene ocho años.* — The youngest of the sisters is eight.

**Edge case — *mayor/menor* for age vs *más grande/pequeño* for size:** Use *mayor/menor* when comparing age or abstract rank; use *más grande/más pequeño* for physical size.

*Mi hermana es mayor que yo.* — My sister is older than me. (age)
*Mi casa es más grande que la tuya.* — My house is bigger than yours. (size)
*Tiene mayor importancia.* — It has greater importance. (abstract)

**Edge case — *de* before numbers:** With numbers and quantities, use *más/menos de*, not *que*. *Que* is reserved for comparing things to other things.

*Tengo más de veinte libros.* — I have more than twenty books. (number → *de*)
*Tengo más libros que tú.* — I have more books than you. (vs another thing → *que*)
*El viaje dura menos de tres horas.* — The trip takes less than three hours.

Exception: with a negative subordinate clause, *no … más que* means "only": *No tengo más que cinco euros* = "I only have five euros."

**Common pitfalls:**

- *Mixing up *que* and *de*.* Use *de* with numbers, *que* with comparisons of things. *Más que cinco* is wrong — say *más de cinco*.
- *Más mejor / más peor.* These don't exist — *mejor* and *peor* already mean "better/worse." Never combine with *más*.
- *Tan vs tanto.* *Tan* modifies adjectives and adverbs; *tanto* modifies nouns (and agrees) or stands alone as an adverb. *Tan libros* is wrong — say *tantos libros*.
- *Superlatives with *en*.* "The best in the world" is *el mejor del mundo*, not *el mejor en el mundo*.
- *Forgetting the article in superlatives.* "She's the smartest" is *Es la más inteligente*, not *Es más inteligente* (which just means "she's smarter").
- *Adjective agreement.* *Más* and *menos* don't change, but the adjective still agrees with the noun: *las chicas más altas*, not *las chicas más alto*.
"""
    )

    // MARK: - 9. Conditional & "If" Clauses

    private static let conditionalIfClauses = GrammarNote(
        id: "conditional-if-clauses",
        title: "Conditional & \"If\" Clauses",
        category: "Verb Tenses",
        body: """
Spanish conditional sentences (*oraciones condicionales*) follow strict tense pairings depending on how likely the condition is. There are three main types — learn the pairings and you can build any *si*-clause.

        **Quick reference — the three pairings:**

        Type 1 (real): *si* + present indicative → present / future / imperative
        Type 2 (hypothetical): *si* + imperfect subjunctive → conditional
        Type 3 (past unreal): *si* + pluperfect subjunctive → conditional perfect

        **Type 1 — Real / Possible conditions.** Use *si* + present indicative in the "if" clause; in the result clause use present, future, or a command. These describe situations that are likely, habitual, or genuinely possible.

        *Si llueve, me quedo en casa.* — If it rains, I stay home.
        *Si estudias mucho, aprobarás el examen.* — If you study a lot, you will pass the exam.
        *Si tienes tiempo, llámame.* — If you have time, call me.
        *Si no comes, vas a tener hambre.* — If you don't eat, you're going to be hungry.

        **Type 2 — Hypothetical / Unlikely / Counter-to-present conditions.** Use *si* + imperfect subjunctive (the *-ra* or *-se* form) in the "if" clause and the conditional in the result clause. These describe situations that are unlikely, imaginary, or contrary to present reality.

        *Si tuviera dinero, viajaría por el mundo.* — If I had money, I would travel the world.
        *Si yo fuera tú, no haría eso.* — If I were you, I wouldn't do that.
        *Si hablara español perfectamente, viviría en España.* — If I spoke Spanish perfectly, I would live in Spain.
        *Si pudiéramos volar, no necesitaríamos aviones.* — If we could fly, we wouldn't need airplanes.

        **Type 3 — Past unreal / Impossible conditions.** Use *si* + pluperfect subjunctive (*hubiera/hubiese* + past participle) in the "if" clause and the conditional perfect (*habría* + past participle) in the result clause. These describe situations that did not happen in the past.

        *Si hubiera estudiado, habría aprobado.* — If I had studied, I would have passed.
        *Si hubiéramos salido antes, habríamos llegado a tiempo.* — If we had left earlier, we would have arrived on time.
        *Si no hubiera llovido, habríamos ido a la playa.* — If it hadn't rained, we would have gone to the beach.

        **Mnemonic — "Present-Past-Pluperfect, climb the ladder":** As the condition gets more remote (real → hypothetical → impossible), the *si*-clause climbs one step into the past: present indicative → imperfect subjunctive → pluperfect subjunctive. The result clause follows in parallel: present/future → conditional → conditional perfect.

        **The cardinal rule — never after *si*:** Never use the present subjunctive or the simple conditional directly after *si*. Forms like *si tendría* or *si tenga* are always wrong. The conditional belongs in the result clause, not the *si*-clause.

        **Mixed conditionals.** You can mix Type 2 and Type 3 when a past condition affects the present, or vice versa.

        *Si hubiera desayunado, no tendría hambre ahora.* — If I had eaten breakfast, I wouldn't be hungry now. (past condition → present result)
        *Si fuera más organizado, habría terminado ayer.* — If I were more organized, I would have finished yesterday. (present trait → past result)

        **Common pitfalls.**
        — Don't translate "would" mechanically: English "would" can be conditional (*viajaría*) or imperfect habitual (*viajaba*). Only the former pairs with *si*.
        — *Como si* ("as if") always triggers the imperfect or pluperfect subjunctive, never the indicative: *Habla como si supiera todo* — He talks as if he knew everything.
        — Both *-ra* and *-se* endings of the imperfect subjunctive are valid (*tuviera* / *tuviese*); *-ra* is more common in speech.
        — Clause order is flexible: *Si tuviera tiempo, iría* and *Iría si tuviera tiempo* mean the same thing. Use a comma only when the *si*-clause comes first.
"""
    )

    // MARK: - 10. Commands (Imperative Mood)

    private static let commandsImperative = GrammarNote(
        id: "commands-imperative",
        title: "Commands (Imperative Mood)",
        category: "Verb Tenses",
        body: """
The imperative mood (*el imperativo*) is used to give commands, instructions, and requests. Spanish has five distinct command forms — one for each "you" plus an inclusive *nosotros* — and each has an affirmative and a negative version.

        **The five forms at a glance:**

        *tú* (informal singular) — affirmative uses 3rd-person present; negative uses present subjunctive
        *vosotros* (informal plural, Spain) — affirmative replaces infinitive *-r* with *-d*; negative uses present subjunctive
        *usted* (formal singular) — uses present subjunctive for both
        *ustedes* (formal/plural, all of Latin America) — uses present subjunctive for both
        *nosotros* ("let's…") — uses present subjunctive for both

        **Affirmative tú commands** are usually the same as the third-person singular present indicative: *habla* (speak), *come* (eat), *escribe* (write).

        *Habla más despacio, por favor.* — Speak more slowly, please.
        *Come tus verduras.* — Eat your vegetables.
        *Abre la puerta.* — Open the door.

        **Eight irregular affirmative tú commands** must be memorized:
        *di* (decir), *haz* (hacer), *ve* (ir), *pon* (poner), *sal* (salir), *sé* (ser), *ten* (tener), *ven* (venir).

        Mnemonic: **"Vin Diesel has ten weapons"** → *ven, di, sal, haz, ten, ve, pon, sé*.

        *Haz tu tarea ahora.* — Do your homework now.
        *Ven aquí, por favor.* — Come here, please.
        *Pon la mesa antes de cenar.* — Set the table before dinner.
        *Sé bueno con tu hermana.* — Be good to your sister.

        **Negative tú commands** use the present subjunctive *tú* form — they are not the same as affirmative commands.

        *No hables tan rápido.* — Don't speak so fast.
        *No comas eso.* — Don't eat that.
        *No vayas solo.* — Don't go alone.
        *No hagas ruido.* — Don't make noise.

        **Vosotros commands (Spain).** Affirmative: drop the *-r* of the infinitive and add *-d*: *hablar* → *hablad*, *comer* → *comed*, *escribir* → *escribid*. Negative: present subjunctive *vosotros* form.

        *Hablad más alto.* — Speak louder.
        *Venid conmigo.* — Come with me.
        *No habléis durante el examen.* — Don't talk during the exam.
        *No comáis tan rápido.* — Don't eat so fast.

        Reflexive twist: the final *-d* drops before *os*: *sentarse* → *sentaos* (sit down). Exception: *idos* (go).

        **Usted / Ustedes commands** use the present subjunctive for both affirmative and negative — they're the polite choice and the default plural in Latin America.

        *Hable con el gerente, por favor.* — Speak with the manager (usted).
        *Pasen, por favor.* — Come in, please (ustedes).
        *No se preocupen.* — Don't worry (ustedes).
        *No fume aquí.* — Don't smoke here (usted).

        **Nosotros commands ("let's…")** use the present subjunctive *nosotros* form for both polarities.

        *Hablemos del tema.* — Let's talk about the topic.
        *Comamos ya.* — Let's eat now.
        *No salgamos todavía.* — Let's not leave yet.

        Exception: affirmative "let's go" is *vamos* (not *vayamos*); the negative reverts to *no vayamos*.

        Reflexive twist: the final *-s* of the verb drops before *nos*: *sentémonos* (let's sit down), *vámonos* (let's get going).

        **Pronoun placement.** Affirmative: pronouns attach to the end of the verb (one word). Negative: pronouns sit between *no* and the verb.

        *Dímelo.* — Tell it to me.
        *No me lo digas.* — Don't tell it to me.
        *Siéntate aquí.* — Sit here.
        *No te sientes ahí.* — Don't sit there.
        *Cómpramelo.* — Buy it for me.
        *No me lo compres.* — Don't buy it for me.

        Order is always reflexive → indirect → direct (RID): *Pónganselo* — Put it on him/her/them.

        **Accent rules when attaching pronouns.** Adding pronouns lengthens the word, so the original stressed syllable usually needs a written accent to keep its stress.
        — One-syllable command + one pronoun: often no accent needed (*dame*, *hazlo*).
        — Two or more added syllables, or a multi-syllable command: add the accent (*díme*lo*, *cóm*pramelo*, *siéntate*, *levántense*).
        Rule of thumb: count back three syllables from the end — that's where the accent goes if it isn't naturally stressed there.
"""
    )

    // MARK: - 11. Saber vs Conocer

    private static let saberVsConocer = GrammarNote(
        id: "saber-vs-conocer",
        title: "Saber vs Conocer",
        category: "Core Concepts",
        body: """
Spanish has two verbs that both translate as "to know": *saber* and *conocer*. They are not interchangeable — each refers to a different kind of knowing.

        **Saber = facts, information, and learned skills.** It answers "Do you know this piece of information?" or "Do you know how to do this?" Followed by a fact, a *que*-clause, an indirect question (*si*, *cuándo*, *dónde*, *qué*…), or by an infinitive meaning "know how to".

        *Sé la respuesta.* — I know the answer.
        *¿Sabes dónde está el banco?* — Do you know where the bank is?
        *Ella sabe hablar tres idiomas.* — She knows how to speak three languages.
        *Sé nadar.* — I know how to swim.
        *No sabemos cuándo llega el tren.* — We don't know when the train arrives.
        *Sabemos que es difícil.* — We know that it's difficult.

        **Conocer = familiarity / acquaintance with people, places, and things.** It implies first-hand experience, not factual knowledge. You *conocer* something the way you'd know a city, a book, or a friend — through exposure.

        *Conozco Madrid muy bien.* — I know Madrid very well.
        *¿Conoces a mi hermana?* — Do you know my sister?
        *Conocemos ese restaurante.* — We know (are familiar with) that restaurant.
        *No conozco esa canción.* — I don't know (am not familiar with) that song.
        *Ella conoce la obra de Picasso.* — She is familiar with Picasso's work.

        **Mnemonic — "Saber the facts, Conocer the faces."** If you can write the answer on a quiz card, it's *saber*. If you'd recognize it walking down the street, it's *conocer*.

        **Side-by-side contrast.**

        *Sé que Madrid es la capital de España.* — I know that Madrid is the capital of Spain (fact).
        *Conozco Madrid porque viví allí dos años.* — I know Madrid because I lived there for two years (familiarity).
        *Sé quién es Shakira.* — I know who Shakira is (information).
        *Conozco a Shakira.* — I know Shakira (personally acquainted).

        **Preterite meaning shifts.** Both verbs change meaning in the preterite, because completing the act of knowing implies the moment it started.

        *Supe la verdad ayer.* — I found out the truth yesterday (the moment of learning).
        *Conocí a tu hermana ayer.* — I met your sister yesterday (first encounter).
        *Supimos que estaba enferma.* — We found out she was sick.
        *Cuando conocí Barcelona, me enamoré.* — When I first saw Barcelona, I fell in love.

        Compare with the imperfect, which keeps the original "know" meaning:
        *Sabía la verdad.* — I knew the truth (already, ongoing).
        *Conocía a tu hermana.* — I knew your sister (already, ongoing acquaintance).

        **The personal *a*.** *Conocer* always takes the personal *a* before a specific person: *Conozco a tu profesor*. *Saber* never uses the personal *a* — even when followed by *quién* it stays bare: *Sé quién es tu profesor*.

        **Common pitfalls.**
        — "I know how to…" is always *saber* + infinitive, never *conocer*. ✗ *Conozco nadar* → ✓ *Sé nadar*.
        — Knowing a person is always *conocer*, never *saber*. ✗ *Sé a María* → ✓ *Conozco a María*.
        — Knowing a fact is always *saber*. ✗ *Conozco que es tarde* → ✓ *Sé que es tarde*.
        — *Saber* in the *yo* present is irregular: *sé* (with accent to distinguish from the reflexive *se*).
        — *Saber* also means "to taste" in some contexts: *Esta sopa sabe a ajo* — This soup tastes like garlic.
"""
    )

    // MARK: - 12. Double Negatives

    private static let doubleNegatives = GrammarNote(
        id: "double-negatives",
        title: "Double Negatives",
        category: "Sentence Structure",
        body: """
Unlike English, where double negatives are considered incorrect ("I don't know nothing" → "anything"), Spanish *requires* them. When a negative word follows the verb, *no* must also appear before the verb. This isn't slang — it's standard, correct grammar.

        **The core rule — position determines structure:**

        — Negative word **before** the verb: no *no* needed. *Nunca como pizza.*
        — Negative word **after** the verb: *no* must precede the verb. *No como pizza nunca.*

        Both sentences above mean "I never eat pizza" and both are correct. The post-verb version is more common in everyday speech.

        **Mnemonic — "Bookend the verb."** A negative word can stand alone before the verb, or it can come after — but if it comes after, *no* must bookend the verb on the front side.

        **No…nada** (nothing / anything):
        *No quiero nada.* — I don't want anything / I want nothing.
        *Nada me sorprende.* — Nothing surprises me.
        *No dijo nada importante.* — He didn't say anything important.

        **No…nunca / no…jamás** (never):
        *No como carne nunca.* — I never eat meat.
        *Nunca llueve en el desierto.* — It never rains in the desert.
        *No he ido jamás a Japón.* — I have never been to Japan.
        (*Jamás* is more emphatic than *nunca* — closer to "never ever".)

        **No…nadie** (nobody / anybody):
        *No vi a nadie en la calle.* — I didn't see anyone on the street.
        *Nadie sabe la respuesta.* — Nobody knows the answer.
        *No le dijo a nadie.* — He didn't tell anyone.
        (Note the personal *a* before *nadie* — it refers to a person.)

        **No…ninguno / ningún / ninguna** (no, not any, none):
        *No tengo ningún problema.* — I don't have any problem.
        *Ninguna tienda está abierta.* — No store is open.
        *No queda ninguno.* — There are none left.
        (*Ninguno* shortens to *ningún* before a masculine singular noun, like *bueno → buen*. Plural forms exist but are rare.)

        **No…tampoco** (neither, not either):
        *No me gusta tampoco.* — I don't like it either.
        *Tampoco quiero ir.* — I don't want to go either.
        *Ella no fue y yo tampoco.* — She didn't go and I didn't either.

        **No…ni…ni** (neither…nor):
        *No tengo ni tiempo ni dinero.* — I have neither time nor money.
        *Ni come ni deja comer.* — He neither eats nor lets others eat. (proverb)
        *No quiero ni café ni té.* — I want neither coffee nor tea.

        **Stacking — multiple negatives are fine.** Spanish happily piles them up; each one reinforces rather than cancels.

        *No le dije nada a nadie nunca.* — I never said anything to anyone.
        *Nadie sabe nada de ningún problema.* — Nobody knows anything about any problem.
        *No quiero hacer nada con nadie nunca más.* — I don't want to do anything with anyone ever again.

        **Affirmative vs negative pairs to memorize.** After *no*, switch every affirmative word to its negative counterpart.

        *algo* (something) → *nada* (nothing)
        *alguien* (someone) → *nadie* (no one)
        *alguno / algún / alguna* (some) → *ninguno / ningún / ninguna* (none)
        *siempre* (always) → *nunca / jamás* (never)
        *también* (also) → *tampoco* (neither)
        *o…o* (either…or) → *ni…ni* (neither…nor)

        **Common pitfalls.**
        — Saying *No quiero algo* (incorrect) instead of *No quiero nada*. After a negative verb, every indefinite must flip.
        — Forgetting the personal *a*: *No vi a nadie*, not *No vi nadie*.
        — Translating "any" with *cualquier*: in negative contexts, "any" is usually *ninguno* or *nada*, not *cualquier* (which means "any/whichever" in a positive sense).
        — Dropping the *no* when the negative word follows the verb: ✗ *Como nunca carne* → ✓ *No como nunca carne* or *Nunca como carne*.
"""
    )

    // MARK: - 13. Adjective Placement

    private static let adjectivePlacement = GrammarNote(
        id: "adjective-placement",
        title: "Adjective Placement",
        category: "Sentence Structure",
        body: """
In English, adjectives almost always come before the noun ("a red car"). In Spanish, the default position is *after* the noun, and placing an adjective before the noun adds a subjective, emotional, or emphatic quality. A small group of adjectives even change meaning depending on which side of the noun they sit on.

        **Default position — after the noun.** Most descriptive adjectives follow the noun and provide objective, distinguishing information: color, shape, nationality, condition, category.

        *Un coche rojo.* — A red car.
        *Una casa grande.* — A big house.
        *Un hombre inteligente.* — An intelligent man.
        *Quiero agua fría.* — I want cold water.
        *Es una decisión importante.* — It's an important decision.
        *Una mujer española.* — A Spanish woman.

        **Before the noun — subjective, emotional, or inherent quality.** Placing the adjective before the noun suggests the speaker considers the quality already known, inherent, or emotionally charged. It's the "poetic" position.

        *Una hermosa ciudad.* — A beautiful city (admiration, not contrast with ugly cities).
        *Un gran hombre.* — A great man (character).
        *Los pequeños detalles importan.* — The little details matter (emphasis).
        *La blanca nieve.* — The white snow (poetic — snow is inherently white).

        **Adjectives that change meaning by position.** This is the trickiest area of Spanish adjective placement. Memorize these pairs:

        *Pobre:* *el pobre hombre* — the unfortunate man / *el hombre pobre* — the man with no money.
        *Viejo:* *un viejo amigo* — a long-standing friend / *un amigo viejo* — an elderly friend.
        *Nuevo:* *un nuevo coche* — a different (new-to-me) car / *un coche nuevo* — a brand-new car.
        *Mismo:* *el mismo problema* — the same problem / *el problema mismo* — the problem itself.
        *Grande:* *una gran mujer* — a great woman / *una mujer grande* — a large woman.
        *Único:* *la única oportunidad* — the only opportunity / *una oportunidad única* — a unique opportunity.
        *Antiguo:* *mi antiguo jefe* — my former boss / *un mueble antiguo* — an antique piece of furniture.
        *Propio:* *mi propio coche* — my own car / *el nombre propio* — the proper noun.

        **Shortened forms before masculine singular nouns** (apocopation). Some adjectives drop their final *-o* when they immediately precede a masculine singular noun.

        *Bueno → buen:* *Es un buen libro.* — It's a good book.
        *Malo → mal:* *Hace mal tiempo.* — The weather is bad.
        *Primero → primer:* *El primer día de clase.* — The first day of class.
        *Tercero → tercer:* *El tercer piso.* — The third floor.
        *Alguno → algún / Ninguno → ningún:* *algún día* — someday / *ningún problema* — no problem.
        *Grande → gran* (before any singular noun, masculine *or* feminine): *un gran momento, una gran idea.*
        *Santo → San* before most male saints' names: *San Juan, San Pedro* (but *Santo Tomás, Santo Domingo*).

        **Quantifiers and numerals always precede the noun:** *mucho, poco, otro, cada, ambos, varios, tanto, demasiado,* and cardinal numbers.

        *Hay muchas personas aquí.* — There are many people here.
        *Quiero otra oportunidad.* — I want another chance.
        *Tengo tres hermanos.* — I have three siblings.

        **Agreement — gender and number.** Adjectives match the noun they modify. Most adjectives ending in *-o* have four forms (*-o, -a, -os, -as*); those ending in *-e* or a consonant typically have only two (singular/plural).

        *un chico alto / una chica alta / unos chicos altos / unas chicas altas.*
        *un libro interesante / una novela interesante / libros interesantes.*
        Nationality adjectives ending in a consonant *do* take *-a*: *un escritor español → una escritora española.*

        **Memory aid — "BANGS go before, the rest go after."** **B**eauty (*hermoso, bello*), **A**ge (*joven, viejo, nuevo*), **N**umbers (*tres, primer, mucho*), **G**oodness (*bueno, malo*), **S**ize (*gran, pequeño*) often appear before the noun when used in a subjective or expected way. Everything else (color, shape, type, nationality, condition) goes after.

        **Common pitfalls for English speakers:**

        **1. Putting every adjective before the noun.** *Un rojo coche* sounds wrong — say *un coche rojo.* The English instinct is the single biggest source of error.

        **2. Forgetting agreement.** *Una problema importante* is wrong twice: *problema* is masculine (Greek origin), and you'd want *un problema importante.* Always check both gender and number.

        **3. Missing the meaning shift.** Telling someone *eres una vieja amiga* is a compliment (long-time friend); *eres una amiga vieja* calls them elderly. Position carries real meaning.

        **4. Forgetting apocopation.** *Un bueno libro* should be *un buen libro.* The shortening only happens before masculine singular nouns — *una buena idea* keeps the full form.
"""
    )

    // MARK: - 14. Tener Expressions

    private static let tenerExpressions = GrammarNote(
        id: "tener-expressions",
        title: "Tener Expressions",
        category: "Core Concepts",
        body: """
One of the most common traps for English speakers is translating "I am hungry" or "I am 25 years old" word-for-word. Spanish uses *tener* (to have) where English uses "to be" for many physical states, ages, and feelings. You literally "have hunger," "have cold," "have 25 years" — rather than "being" any of those things. The thing you "have" is a *noun*, which changes how you modify it.

        **Age — *tener + number + años*.** Never *ser* and never *estar*.

        *Tengo veinticinco años.* — I am twenty-five years old.
        *¿Cuántos años tienes?* — How old are you?
        *Mi abuela tiene ochenta y dos años.* — My grandmother is eighty-two.

        **Physical sensations.** Hunger, thirst, temperature, sleepiness.

        *Tener hambre* — to be hungry: *Tengo mucha hambre.* — I'm very hungry.
        *Tener sed* — to be thirsty: *¿Tienes sed? Hay agua en la nevera.* — Are you thirsty? There's water in the fridge.
        *Tener calor* — to be hot: *Tenemos calor porque no hay aire acondicionado.* — We're hot because there's no AC.
        *Tener frío* — to be cold: *¿Tienes frío? Te presto mi chaqueta.* — Are you cold? I'll lend you my jacket.
        *Tener sueño* — to be sleepy: *Los niños tienen sueño después de jugar.* — The kids are sleepy after playing.
        *Tener dolor de + body part* — to have a __ ache: *Tengo dolor de cabeza.* — I have a headache.

        **Emotional states and judgments.**

        *Tener miedo (de)* — to be afraid (of): *Ella tiene miedo de las arañas.* — She's afraid of spiders.
        *Tener vergüenza* — to be embarrassed/ashamed: *Tengo vergüenza de hablar en público.* — I'm embarrassed to speak in public.
        *Tener celos* — to be jealous: *Tiene celos de su hermana.* — He's jealous of his sister.
        *Tener razón* — to be right: *Tienes razón, es mejor esperar.* — You're right, better to wait.
        *No tener razón* — to be wrong: *No tienes razón en esto.* — You're wrong about this.
        *Tener suerte* — to be lucky: *Tuvimos mucha suerte con el clima.* — We were very lucky with the weather.
        *Tener prisa* — to be in a hurry: *Tengo prisa, hablamos luego.* — I'm in a hurry, we'll talk later.
        *Tener cuidado* — to be careful: *Ten cuidado con el hielo.* — Be careful with the ice.
        *Tener paciencia* — to be patient: *Hay que tener paciencia con los niños.* — You have to be patient with children.

        **Desire, obligation, and outcome.**

        *Tener ganas de + infinitive* — to feel like (doing): *Tengo ganas de bailar.* — I feel like dancing.
        *Tener que + infinitive* — to have to: *Tenemos que irnos ya.* — We have to leave now.
        *Tener la culpa* — to be at fault: *No tengo la culpa de nada.* — Nothing is my fault.
        *Tener sentido* — to make sense: *Eso no tiene sentido.* — That doesn't make sense.
        *Tener éxito* — to be successful: *La película tuvo mucho éxito.* — The movie was very successful.
        *Tener lugar* — to take place: *La boda tendrá lugar el sábado.* — The wedding will take place Saturday.

        **Memory aid — "Spanish HAS what English IS."** If an English speaker says *I am ___*, ask whether the blank is something you can possess — hunger, fear, 25 years, a reason, luck. If yes, Spanish uses *tener.* For genuine states of being (tired, sick, happy, located), Spanish uses *estar*; for identity (a doctor, tall, from Spain), Spanish uses *ser.*

        **Common pitfalls for English speakers:**

        **1. Using *muy* instead of *mucho/mucha*.** Because *hambre, sed, frío, miedo* are nouns, you intensify them with the adjective *mucho/mucha,* not the adverb *muy.* *Tengo mucha hambre* (correct) — *Tengo muy hambre* (wrong). The agreement also matters: *mucha hambre, mucha sed, mucho calor, mucho frío, mucho miedo.*

        **2. Using *ser* or *estar* for age.** *Soy veinticinco* and *Estoy veinticinco años* are both wrong. Always *tengo veinticinco años.*

        **3. Forgetting the article rule with *dolor*.** *Tengo dolor de cabeza* — no article before *cabeza* in the fixed expression. But *Me duele la cabeza* (with *doler*) does take the article.

        **4. Confusing *tener miedo de* with *tener miedo a*.** Both exist; *de* is more common for the cause of fear (*tengo miedo de las arañas*), *a* can be used with people (*tiene miedo a su padre*).

        **5. Overusing *tener que* when the meaning is "should" or "must."** *Tener que* expresses obligation; for softer "should," use *deber + infinitive*. *Tengo que estudiar* (I have to) vs. *Debería estudiar* (I should).

        **6. Translating literally back to English.** *Tengo hambre* is "I'm hungry," not "I have hunger." Train yourself to map the whole expression, not the words.
"""
    )

    // MARK: - 15. The Personal "A"

    private static let personalA = GrammarNote(
        id: "personal-a",
        title: "The Personal \"A\"",
        category: "Sentence Structure",
        body: """
Spanish requires the preposition *a* before direct objects that are *specific people* (and certain personified beings). This is called the **personal *a*** (*la a personal*). It has no English equivalent — it doesn't translate to "to" or anything else. It simply flags that the direct object is a person the speaker considers individuated. It's one of the few features that's truly unique to Spanish.

        **The core rule.** When the direct object of a verb is a specific, known person, place *a* before them.

        *Veo a María.* — I see María.
        *Llamo a mi madre todos los días.* — I call my mother every day.
        *Conozco a tu profesor.* — I know your teacher.
        *Extraño a mis amigos.* — I miss my friends.
        *Invité a Juan y a Sofía a la fiesta.* — I invited Juan and Sofía to the party.
        *Esperamos a los niños afuera.* — We're waiting for the kids outside.

        **No personal a — non-human direct objects.** Things don't get the personal *a*.

        *Veo la mesa.* — I see the table.
        *Busco mis llaves.* — I'm looking for my keys.
        *Leo un libro.* — I'm reading a book.
        *Compré una casa.* — I bought a house.

        **Pets and personified things.** The personal *a* extends to beloved pets and anything the speaker treats as a person — a country, a beloved object, a fictional character.

        *Llevo a mi perro al veterinario.* — I take my dog to the vet.
        *Los niños quieren a su gato.* — The kids love their cat.
        *Amo a mi país.* — I love my country.

        **NOT used after *tener*.** This is the most important exception. *Tener* never takes the personal *a*, even when its object is a specific person. *Tener* conveys possession/relationship, not action *upon* someone.

        *Tengo dos hermanos.* — I have two siblings.
        *Tiene tres hijos.* — She has three children.
        *Tenemos un nuevo vecino.* — We have a new neighbor.
        Exception: when *tener* means "to hold" or describes a state, the *a* can return — *Tengo a mi hijo en brazos* (I'm holding my child in my arms), *Tengo a María en mi equipo* (I have María on my team).

        **NOT used with indefinite or non-specific people.** When you mean "any person of that type," omit the *a*. When you mean a specific known individual, include it. This contrast is meaningful.

        *Busco un doctor.* — I'm looking for a doctor (any doctor will do).
        *Busco a un doctor.* — I'm looking for a (specific) doctor.
        *Necesito un traductor.* — I need a translator (anyone qualified).
        *Necesito a mi traductor.* — I need my translator (a specific person).
        *Conozco a un abogado que puede ayudarte.* — I know a (specific) lawyer who can help you.

        **With *nadie, alguien, quién/quiénes*.** These indefinite pronouns referring to people take the personal *a*.

        *No veo a nadie.* — I don't see anyone.
        *¿Conoces a alguien aquí?* — Do you know anyone here?
        *¿A quién llamaste?* — Whom did you call?
        *¿A quiénes invitaron?* — Whom (plural) did they invite?

        **Contraction with *el*.** *a + el → al*. Always contract.

        *Vi al profesor.* — I saw the teacher (not *Vi a el profesor*).
        *Llamé al doctor.* — I called the doctor.
        But *a la, a los, a las* don't contract: *Vi a la profesora, llamé a los doctores.*

        **Memory aid — "If you can put a name in the blank, use *a*."** "I see ___." If you could naturally fill in *María, mi abuela, el profesor,* you need the personal *a*: *Veo a María.* If the natural fill is *la mesa, un libro,* skip it: *Veo la mesa.* For pets you love, names work — so they get *a* too.

        **Common pitfalls for English speakers:**

        **1. Forgetting it entirely.** English has no equivalent, so learners drop it. *Veo María* sounds incomplete to a Spanish ear — always *Veo a María.*

        **2. Using it with *tener*.** *Tengo a dos hermanos* is wrong (for ordinary "have"). Just *Tengo dos hermanos.*

        **3. Mistaking it for "to."** The personal *a* looks identical to the preposition *a* meaning "to," but they're different functions. *Voy a María* would mean "I'm going toward María"; *Veo a María* means "I see María." Same word, different jobs.

        **4. Missing the specific-vs-generic distinction.** *Busco un doctor* and *Busco a un doctor* mean different things — generic vs. specific. Decide which you mean before you speak.

        **5. Forgetting the *al* contraction.** *A el* must become *al*. Never written out in full.
"""
    )

    // MARK: - 16. Relative Pronouns

    private static let relativePronouns = GrammarNote(
        id: "relative-pronouns",
        title: "Relative Pronouns",
        category: "Sentence Structure",
        body: """
Relative pronouns link a subordinate clause to a main clause, adding information about a noun (the *antecedent*). English uses "that," "which," "who," "whom," and "whose" — often interchangeably and often droppable. Spanish has more relative pronouns, each with a specific job, and you can almost never drop them.

        **Que — the default, the workhorse.** Means "that," "which," or "who." Works for people or things, in both restrictive and non-restrictive clauses, and is what you should reach for first.

        *La chica que vive aquí es mi amiga.* — The girl who lives here is my friend.
        *El libro que compré es muy bueno.* — The book that I bought is very good.
        *La película que vimos anoche fue aburrida.* — The movie we saw last night was boring.
        *Los estudiantes que estudian aprueban.* — Students who study pass.
        Note: English often drops "that" (*the book I bought*); Spanish never does — *el libro que compré.*

        **Quien / quienes — for people, especially after prepositions.** *Quien* is singular, *quienes* is plural. After a preposition referring to a person, use *quien(es)*, not *que*.

        *La persona con quien hablé es la directora.* — The person with whom I spoke is the director.
        *Los amigos a quienes invité no vinieron.* — The friends whom I invited didn't come.
        *El profesor de quien te hablé.* — The teacher I told you about.
        *Fue mi madre quien me lo dijo.* — It was my mother who told me (cleft sentence — emphasis).
        *Quien mucho abarca, poco aprieta.* — He who grasps at too much holds little (proverb).

        **El que / la que / los que / las que — clarification and "the one who."** Agrees in gender and number with the antecedent. Three main uses:

        (a) After a preposition, especially when *quien* would be ambiguous about gender or for things:
        *La casa en la que vivo es vieja.* — The house I live in is old.
        *El amigo con el que viajé.* — The friend I traveled with.

        (b) To disambiguate when the antecedent is far away or could refer to multiple things:
        *La hermana de Juan, la que vive en Madrid, me llamó.* — Juan's sister, the one who lives in Madrid, called me.

        (c) Standing alone meaning "the one(s) who/that":
        *El que llegó tarde fue Pedro.* — The one who arrived late was Pedro.
        *Las que quieren ir, levanten la mano.* — Those (women) who want to go, raise your hand.

        **Lo que — "what" / "that which" — abstract.** Refers to an entire idea, action, or situation, not a specific noun.

        *No entiendo lo que dices.* — I don't understand what you're saying.
        *Lo que necesitas es descansar.* — What you need is to rest.
        *Haz lo que quieras.* — Do what you want.
        *Lo que pasó ayer fue increíble.* — What happened yesterday was incredible.
        Use *lo cual* (not *lo que*) when you're referring back to a *specific previously stated clause*: *Llegó tarde, lo cual me molestó.* — He arrived late, which annoyed me.

        **El cual / la cual / los cuales / las cuales — formal, mostly after prepositions.** Same agreement rules as *el que*, but registers as more formal or literary. Common after long or compound prepositions (*por, sin, durante, a través de, dentro de*).

        *La casa en la cual nací ya no existe.* — The house in which I was born no longer exists.
        *Los problemas por los cuales renunció eran graves.* — The problems for which he resigned were serious.
        *La razón por la cual te llamé es importante.* — The reason I called you is important.
        *El puente bajo el cual pasamos.* — The bridge under which we passed.

        **Cuyo / cuya / cuyos / cuyas — "whose."** Agrees in gender and number with the *thing possessed*, not with the possessor. There is no article between *cuyo* and the noun.

        *El hombre cuya hija conoces es mi vecino.* — The man whose daughter you know is my neighbor.
        *La autora cuyos libros he leído viene mañana.* — The author whose books I've read is coming tomorrow.
        *El país cuyo idioma estudio es España.* — The country whose language I study is Spain.
        Important: *cuyo* is literary/written. In spoken Spanish, people often rephrase: *El hombre que tiene una hija que tú conoces…*

        **Donde — "where," for places.** Replaceable by *en (el) que* or *en el cual*.

        *La ciudad donde nací es pequeña.* — The city where I was born is small.
        *El restaurante donde comimos estaba lleno.* — The restaurant where we ate was full.
        *Adonde* (or *a donde*) when motion is involved: *El pueblo adonde vamos.* — The town we're going to.

        **Memory aid — "Default to *que*, switch when you have a reason."** Reach for *que* first. Switch to *quien* when the antecedent is a person *and* there's a preposition. Switch to *el que / el cual* when you need gender/number clarity or formality after a preposition. Use *lo que* when there's no specific noun to point at. Use *cuyo* for possession. Use *donde* for places.

        **Common pitfalls for English speakers:**

        **1. Dropping the relative pronoun.** English allows "the book I bought." Spanish requires *el libro que compré* — never *el libro compré.*

        **2. Using *que* after a preposition referring to a person.** *La persona que hablé con* is wrong twice. Say *la persona con quien hablé* (or *con la que hablé*). Preposition + *que* alone doesn't work for people.

        **3. Translating "whose" as *quien.*** *Quien* never means "whose." Use *cuyo/a/os/as,* and remember it agrees with the *possessed* noun: *el hombre cuya hija* (hija is feminine), *la mujer cuyos hijos* (hijos is plural).

        **4. Confusing *lo que* and *lo cual*.** *Lo que* introduces an abstract idea fresh ("what you said"). *Lo cual* refers back to a specific previous statement ("which annoyed me"). They aren't interchangeable.

        **5. Forgetting agreement with *el que / el cual / cuyo*.** These all agree with their antecedent (or for *cuyo*, the possessed noun). Forgetting this is the biggest written-Spanish giveaway.

        **6. Writing *quién* with an accent in a relative clause.** *Quién* (with accent) is the question word "who?". The relative pronoun *quien* takes no accent. *¿Quién vino?* vs. *La persona quien vino.*
"""
    )

    // MARK: - 17. Future vs "Ir a + Infinitive"

    private static let futureVsIrA = GrammarNote(
        id: "future-vs-ir-a",
        title: "Future vs \"Ir a + Infinitive\"",
        category: "Verb Tenses",
        body: """
Spanish has two main ways to talk about the future: the simple future tense (*futuro simple*) and the construction *ir a + infinitive* (the "going to" future). Both translate to English's future, but they live in different registers, and the simple future does one job English has no clean equivalent for.

        **Ir a + infinitive — the near, conversational future.** Conjugate *ir* in the present, then *a*, then the infinitive. By far the most common way to talk about the future in everyday speech, especially in Latin America. Signals plans, intentions, and things about to happen.

        *Voy a comer con mis amigos.* — I'm going to eat with my friends.
        *¿Qué vas a hacer este fin de semana?* — What are you going to do this weekend?
        *Vamos a llegar tarde si no nos apuramos.* — We're going to be late if we don't hurry.

        **Simple future — the "will" future.** Add *-é, -ás, -á, -emos, -éis, -án* to the full infinitive (no dropping endings). Feels more formal, distant, or emphatic — promises, predictions, firm resolutions, news headlines.

        *Mañana lloverá todo el día.* — Tomorrow it will rain all day (prediction).
        *Te prometo que vendré temprano.* — I promise I will come early (promise).
        *El presidente visitará Madrid en mayo.* — The president will visit Madrid in May.

        **Future of probability — the killer feature.** The simple future also speculates about *the present*. No clean English equivalent — we say "must be," "probably," or "I wonder." *Ir a + infinitive* can also express conjecture, but the simple future is the default.

        *¿Qué hora será?* — I wonder what time it is.
        *¿Dónde estará mi teléfono?* — Where could my phone be?
        *Estará en casa, no contesta el móvil.* — He's probably home, he's not picking up.
        *Tendrá unos treinta años.* — He must be around thirty.

        **Memory aid — GOING vs WILL.** Would you say "going to" in English? Reach for *ir a + infinitive*. Would you say "will" — promise, prediction, formal — or are you guessing about right now? Reach for the simple future.

        **Irregular future stems** (shared with the conditional): *tener → tendr-*, *salir → saldr-*, *venir → vendr-*, *poner → pondr-*, *poder → podr-*, *saber → sabr-*, *hacer → har-*, *decir → dir-*, *querer → querr-*, *haber → habr-*. Endings are the same as for regular verbs.

        **Regional flavor.** In spoken Latin American Spanish, *ir a + infinitive* dominates — many speakers reserve the simple future almost exclusively for conjecture. Peninsular Spanish uses the simple future a bit more freely, but *voy a* is still the everyday choice.

        **Common pitfalls for English speakers:**

        **1. Forgetting the *a*.** It's *voy a comer*, never *voy comer*. Mandatory.

        **2. Conjugating the wrong word.** Only *ir* is conjugated; the second verb stays in the infinitive. *Vamos a comemos* is wrong — it's *vamos a comer*.

        **3. Missing the accent on the future endings.** Every form except *nosotros* carries one: *hablaré, hablarás, hablará, hablaremos, hablaréis, hablarán*.

        **4. Translating "I will" too literally.** A friend would say *Te voy a llamar luego*, not *Te llamaré luego* — the latter sounds stiff or like a firmer commitment.

        **5. Missing the conjecture use.** *¿Dónde estará?* means "where could it be?" *right now* — not "where will it be?" in the future. Learners often translate it backwards.

        **6. Using *iba a* for present plans.** *Iba a comer* (imperfect of *ir* + a + infinitive) means "I was going to eat" — a past plan, often one that didn't happen. Don't confuse it with *voy a*.
"""
    )

    // MARK: - 18. Accent Marks & Stress Rules

    private static let accentMarksStress = GrammarNote(
        id: "accent-marks-stress",
        title: "Accent Marks & Stress Rules",
        category: "Pronunciation",
        body: """
Spanish stress is predictable. Learn three rules and you can pronounce almost any word — and the written accent (*tilde*) tells you exactly when a word breaks the default. There are no decorative accents in Spanish: every *tilde* changes either where you stress the word or what the word means.

        **Rule 1 — Words ending in a vowel, *-n*, or *-s*:** stress on the second-to-last syllable. These are *palabras llanas* (or *graves*) — the most common pattern.

        *hablo* — HA-blo. *comen* — CO-men. *zapatos* — za-PA-tos. *examen* — e-XA-men.

        **Rule 2 — Words ending in any other consonant:** stress on the last syllable. These are *palabras agudas*.

        *hablar* — ha-BLAR. *ciudad* — ciu-DAD. *español* — es-pa-ÑOL. *reloj* — re-LOJ.

        **Rule 3 — When the word breaks the default, write a *tilde*.** Any word stressed on the third-to-last syllable (*esdrújula*) or earlier (*sobresdrújula*) *always* takes an accent — no exceptions.

        *café* — ca-FÉ (vowel, stressed last). *canción* — can-CIÓN (-n, stressed last). *difícil* — di-FÍ-cil (consonant, stressed second-to-last). *teléfono* — te-LÉ-fo-no (*esdrújula*, always accented). *dándomelo* — *sobresdrújula*.

        **Memory aid — "*n*, *s*, or vowel → second-to-last; otherwise last."** If the word follows the rule, no accent. If it breaks the rule, write one. All *esdrújulas* are accented, always.

        **Diacritic accents (*tildes diacríticas*) — same spelling, different word.** One-syllable words don't need a stress accent on their own, but they wear one to distinguish them from a same-spelled twin.

        *si* (if) / *sí* (yes): *Si dices que sí, vamos.*
        *el* (the) / *él* (he): *Él tiene el libro.*
        *tu* (your) / *tú* (you): *Tú tienes tu mochila.*
        *mi* (my) / *mí* (me, after preposition): *Este regalo es para mí.*
        *se* (pronoun) / *sé* (I know / be!): *Yo sé que se fue.*
        *de* (of/from) / *dé* (give — subjunctive of *dar*): *Quiero que me dé café.*
        *te* (you, object) / *té* (tea): *Te invito un té.*
        *mas* (but — literary) / *más* (more): *Quiero más, mas no puedo.*

        **Interrogatives and exclamatives always wear an accent.** *qué, cómo, dónde, cuándo, cuál, quién, cuánto, por qué* — when they ask or exclaim, they take a tilde. Without the accent, the same words are relatives or conjunctions. The accent also survives in indirect questions.

        *¿Cuándo llega?* (when?) / *Sé cuando llega.* (I know when…)
        *¿Qué quieres?* (what?) / *Quiero que vengas.*
        *¿Por qué?* (why?) / *porque* (because) / *porqué* (the noun "reason") — all different.
        *No sé qué hacer.* — I don't know what to do (accent stays).

        **Accent shift when pronouns attach.** Adding object or reflexive pronouns to a gerund, infinitive, or affirmative command doesn't move the stress — but the word gets longer, so it may now break the default rule and need a written accent.

        *come* → *cómelo* (eat it — *esdrújula*).
        *da* → *dame* → *dámelo* (give it to me — *sobresdrújula*).
        *hablando* → *hablándole* (talking to him).
        *decir* → *decírselo* (to say it to him).

        **Common pitfalls for English speakers:**

        **1. Treating accents as optional.** They aren't. *Esta* (this) vs *está* (he is). *Hablo* (I speak) vs *habló* (he spoke). The accent flips both stress and meaning.

        **2. Forgetting the accent when pronouns attach.** *Dame* is fine, but *dámelo* must be accented — without it the word reads as da-ME-lo.

        **3. Confusing *aún* and *aun*.** *Aún* (with accent) = "still / yet." *Aun* (no accent) = "even." *Aún no llega* vs *Aun los expertos se equivocan*.

        **4. Adding accents to *fui*, *vio*, *dio*, *fue*, *ti*.** Monosyllabic and twin-less — they go bare under current rules.
"""
    )

    // MARK: - 19. "Se" Constructions

    private static let seConstructions = GrammarNote(
        id: "se-constructions",
        title: "\"Se\" Constructions",
        category: "Advanced",
        body: """
The word *se* is the Swiss Army knife of Spanish grammar. It appears in five distinct constructions, plus a sneaky sixth role as a pronoun substitute — one of the biggest hurdles between intermediate and advanced Spanish.

        **1. Reflexive *se* — the subject acts on itself.** The action loops back to the doer. Conjugate with the matching reflexive pronoun: *me, te, se, nos, os, se*. Common with grooming, daily routine, and change-of-state verbs.

        *Ella se lava las manos.* — She washes her hands.
        *Me levanto a las siete.* — I get up at seven.
        *Se vistieron rápidamente.* — They got dressed quickly.

        **2. Reciprocal *se* — subjects act on each other.** Only with plural subjects (*nos, os, se*). Add *el uno al otro* to disambiguate from a reflexive reading when needed.

        *Se aman mucho.* — They love each other a lot.
        *Nos vemos todos los viernes.* — We see each other every Friday.
        *Mis padres se conocieron en Madrid.* — My parents met in Madrid.

        **3. Passive *se* — the thing receives the action.** Doer unimportant or unknown. The verb agrees in number with the grammatical subject. Very common on signs.

        *Se venden casas.* — Houses are sold / for sale.
        *Se necesitan profesores.* — Teachers are needed.
        *Se hablan varios idiomas en Suiza.* — Several languages are spoken in Switzerland.

        **4. Impersonal *se* — no specific subject at all.** Translates as "one," "you," "they," or "people." The verb is always third-person *singular*.

        *Se dice que va a llover.* — They say it's going to rain.
        *¿Cómo se dice esto en español?* — How do you say this in Spanish?
        *En España se cena muy tarde.* — In Spain, people eat dinner very late.
        *Se vive bien en esta ciudad.* — One lives well in this city.

        *Passive vs impersonal.* Passive has a grammatical subject and the verb agrees with it (*Se venden casas* — plural). Impersonal has no subject and is always singular (*Se vive bien aquí*).

        **5. Accidental / unintentional *se* — the "it happened to me" construction.** Spanish dodges blame: instead of "I broke the glass," it says "the glass broke on me." Structure: *se + indirect-object pronoun (me/te/le/nos/os/les) + verb + subject*. Verb agrees with the *thing*.

        *Se me cayó el vaso.* — I dropped the glass.
        *Se le olvidaron las llaves.* — He forgot the keys.
        *Se nos rompió la ventana.* — The window broke on us.
        *Se me acabó la paciencia.* — I ran out of patience.

        Common verbs: *caer* (drop), *olvidar* (forget), *romper* (break), *perder* (lose), *acabar* (run out), *quedar* (be left).

        **6. The sneaky bonus — *le/les* → *se* before *lo/la/los/las*.** When an indirect *le/les* meets a direct *l-* pronoun, the two *l*'s clash and *le/les* becomes *se*. Pure phonetics, no meaning.

        *Le doy el libro a María.* → *Se lo doy.* — I give it to her. (Never *le lo doy*.)
        *Les escribí a mis padres.* → *Se la escribí.* — I wrote it to them.

        **Memory aid — five faces of *se***: **R**eflexive, **R**eciprocal, **P**assive, **I**mpersonal, **A**ccidental — plus phonetic *se* (le-lo → se-lo). When you see *se*, ask: who's the subject? Singular or plural verb? Is there an indirect-object pronoun next to it?

        **Common pitfalls for English speakers:**

        **1. Reading every *se* as reflexive.** *Se vende esta casa* isn't "this house sells itself" — it's passive, "this house is for sale."

        **2. Wrong agreement in accidental *se*.** The verb agrees with the *thing*, not the person it happened to. *Se me cayeron los libros* (plural) vs *Se me cayó el libro* (singular). *Me* never controls agreement.

        **3. Forgetting *le → se*.** You cannot say *le lo doy*. Spanish forces *se lo doy*. Always.

        **4. Pluralizing impersonal *se*.** *Se vive bien aquí* is singular, always. *Se viven bien* is wrong. A plural verb means you're reaching for passive *se*, which needs a grammatical subject.
"""
    )

    // MARK: - 20. Estar + Gerund (Progressive Tenses)

    private static let estarGerundProgressive = GrammarNote(
        id: "estar-gerund-progressive",
        title: "Estar + Gerund (Progressive Tenses)",
        category: "Verb Tenses",
        body: """
Spanish forms its progressive tenses with *estar* + the gerund (*gerundio*, the *-ando/-iendo* form). It emphasizes that an action is *unfolding right now* — or *was unfolding* at a past moment. It looks like English "be + -ing," but Spanish uses it more sparingly, and there's one big trap: it cannot point to the future.

        **Present progressive — *estar* (present) + gerund.** Use it for actions in progress at the moment of speech — not for habits, not for plans.

        *Estoy hablando por teléfono.* — I am speaking on the phone (right now).
        *¿Qué estás haciendo?* — What are you doing?
        *Los niños están jugando en el parque.* — The kids are playing in the park.

        **Gerund formation — regular verbs.** *-ar* → *-ando* (*hablar → hablando*); *-er* → *-iendo* (*comer → comiendo*); *-ir* → *-iendo* (*vivir → viviendo*).

        **Irregular gerunds.** Two patterns. (1) *-ir* stem-changers shift e→i or o→u: *decir → diciendo*, *dormir → durmiendo*, *sentir → sintiendo*, *pedir → pidiendo*, *seguir → siguiendo*, *morir → muriendo*, *venir → viniendo*, *poder → pudiendo*. (2) Stems ending in a vowel turn *-iendo* into *-yendo*: *leer → leyendo*, *oír → oyendo*, *caer → cayendo*, *traer → trayendo*, *construir → construyendo*, *ir → yendo*.

        **Past progressive — *estar* (imperfect) + gerund.** What was in the middle of happening at a past moment, often interrupted by a preterite.

        *Estaba leyendo cuando llegaste.* — I was reading when you arrived.
        *¿Qué estabas haciendo anoche?* — What were you doing last night?

        **Memory aid — "in flagrante."** The progressive catches the verb *in the act*. Unfolding right now (or at a past moment)? Use *estar* + gerund. Habit or plan? Use the simple present or *ir a + infinitive*.

        **Critical difference #1 — NOT for the future.** English uses the progressive for future plans ("I'm leaving tomorrow"). Spanish refuses — use the simple present or *ir a + infinitive*.

        *Me voy mañana.* — I'm leaving tomorrow. (simple present — correct)
        *Voy a salir mañana.* — I'm going to leave tomorrow. (*ir a* — correct)
        *Estoy yendo mañana.* — INCORRECT.

        **Critical difference from English #2 — NOT for habits or ongoing states.** Where English says "I'm studying medicine" to describe your major, Spanish prefers the simple present: *Estudio medicina*. *Estoy estudiando medicina* means "right this minute" or a clearly temporary phase. The progressive sounds odd with verbs of state — avoid *estoy sabiendo*, *estoy teniendo*.

        **Pronoun placement.** Object and reflexive pronouns can attach to the gerund or go before *estar*. Both are correct, but attaching to the gerund forces a written accent.

        *Estoy haciéndolo.* / *Lo estoy haciendo.* — I am doing it.
        *Está duchándose.* / *Se está duchando.* — He is showering.

        **Other verbs that pair with gerunds.** *Seguir* (keep on), *llevar* (duration), *andar* (going around), *ir* (gradually).

        *Sigo estudiando español.* — I keep on studying Spanish.
        *Llevo tres años viviendo aquí.* — I've been living here for three years.

        **Common pitfalls for English speakers:**

        **1. Using the progressive for future plans.** *Estoy saliendo mañana* is wrong. Use *Salgo mañana* or *Voy a salir mañana*.

        **2. Overusing the progressive.** English reaches for "I'm + -ing" constantly. In Spanish, the simple present handles a lot of that. *¿Qué haces?* is perfectly natural for "what are you doing?" right now.

        **3. Forgetting the accent when pronouns attach.** *Haciendolo* is wrong — it must be *haciéndolo*.

        **4. Missing the stem change in *-ir* gerunds.** *Dormiendo* is wrong; it's *durmiendo*. Same family as the preterite stem changes.

        **5. Writing *-iendo* after a vowel.** *Leiendo* is wrong; *i* becomes *y*: *leyendo*, *oyendo*, *cayendo*.

        **6. Using *ser* + gerund.** Never. Progressive is always *estar*. *Soy hablando* is not a sentence.
"""
    )

    // MARK: - 21. Spanish Suffixes

    private static let spanishSuffixes = GrammarNote(
        id: "spanish-suffixes",
        title: "Spanish Suffixes",
        category: "Word Building",
        body: """
Spanish builds vocabulary by stacking suffixes onto roots. Once you spot the pattern, you decode thousands of words from a handful of stems — *pan* → *panadero* (baker) → *panadería* (bakery) → *panecillo* (bread roll). The suffix decides size, tone, part of speech, and region.

        **Diminutives — small, cute, affectionate.**

        *-ito / -ita* — the default: *perro → perrito* (puppy), *casa → casita*, *abuela → abuelita* (granny), *momento → momentito*.
        *-cito / -cita* — after *-e, -n, -r*, or a stressed vowel: *café → cafecito*, *amor → amorcito* (sweetheart), *pobre → pobrecito*.
        *-illo / -illa* — less affectionate, often forms new words: *chico → chiquillo*, *bolso → bolsillo* (pocket), *guerra → guerrilla*.
        *-ico / -ica* — regional (Colombia, Cuba, Costa Rica): *rato → ratico*, *momento → momentico*.
        *-uelo / -uela* — older or literary: *plaza → plazuela*, *río → riachuelo* (stream).

        **Augmentatives — big, intense, exaggerated.**

        *-ón / -ona* — big or "given to": *silla → sillón* (armchair), *cabeza → cabezón* (stubborn), *llorar → llorón* (crybaby).
        *-azo / -aza* — big *and* "a blow with": *perro → perrazo*, *gol → golazo* (stunning goal), *codo → codazo* (elbow jab).
        *-ote / -ota* — big and clumsy: *grande → grandote*, *palabra → palabrota* (swear word).
        *-udo / -uda* — "full of": *pelo → peludo*, *barba → barbudo*.

        **Pejoratives — contemptuous tone.**

        *-ucho / -ucha*: *casa → casucha* (dump), *delgado → delgaducho* (scrawny).
        *-acho / -acha*: *pueblo → poblacho*, *rico → ricacho* (vulgar nouveau riche).
        *-aco / -aca*: *pájaro → pajarraco*, *libro → libraco*.

        **Abstract-noun suffixes — qualities, results, actions.** The backbone of formal vocabulary.

        *-ción / -sión* (always feminine): *acción, decisión, comunicación*.
        *-miento* (always masculine): *conocimiento, sentimiento, movimiento*.
        *-dad / -tad* (feminine): *libertad, realidad, felicidad, amistad*.
        *-ura*: *dulzura, locura, altura, pintura*.
        *-eza*: *belleza, tristeza, pureza, naturaleza*.
        *-anza / -encia / -ancia*: *esperanza, paciencia, importancia*.

        **Agent and place suffixes.**

        *-ero / -era* (person, trade): *panadero, cartero, cocinero*.
        *-dor / -dora* (doer or device): *jugador, trabajador, lavadora*.
        *-ista* (gender-neutral): *artista, dentista, pianista*.
        *-ería* (the shop): *panadería, librería* (bookstore!), *zapatería*.

        **Adjective and adverb suffixes.**

        *-oso / -osa*: *peligroso, cariñoso, exitoso*.
        *-ble*: *posible, increíble, agradable*.
        *-ivo / -iva*: *creativo, productivo*.
        *-ano, -eño, -ense* (from a place): *mexicano, panameño, costarricense*.
        *-mente* (English *-ly*) — attaches to the feminine adjective: *rápida → rápidamente*. Two in a row, only the second keeps it: *clara y rápidamente*.
        *-ísimo / -ísima* (absolute superlative): *rapidísimo, bellísima, muchísimo*.

        **Mnemonic — "Size, Shop, Shape, Slur":** **Size** (diminutives & augmentatives), **Shop** (-ero/-ería/-ista name people and places), **Shape** (-dad/-ción/-miento/-ura/-eza mold abstract nouns), **Slur** (-ucho/-acho/-aco add contempt). Most words land in one of those four buckets.

        **Regional notes.** *-ito* dominates everywhere; *-ico* is a Caribbean/Colombian badge; *-illo* leans Spain over Latin America; *-ín / -iña* survives in Asturias and Galicia. Compare *computador* (LatAm) vs *ordenador* (Spain).

        **Common pitfalls.**
        — Not every *-ón* is augmentative: *ratón, limón, jamón* are just nouns.
        — *librería* is a **bookstore**, not a library (*biblioteca*). *-ería* names the place, *-ero* names the worker.
        — Diminutives can lose the original sense: *bolsillo* (pocket), *cigarrillo* (cigarette), *bombilla* (lightbulb).
        — Greek *-ma* nouns stay masculine: *problema → problemita*, *tema → temita*.
        — *-ísimo* drops the final vowel and adds an accent: *fácil → facilísimo*, not *fácilísimo*.
"""
    )

    // MARK: - 22. Most Common Irregular Verbs

    private static let commonIrregularVerbs = GrammarNote(
        id: "common-irregular-verbs",
        title: "Most Common Irregular Verbs",
        category: "Irregular Verbs",
        body: """
Eighteen verbs do most of the heavy lifting in spoken Spanish — and every one is irregular. Memorize the *yo* form and one other quirky form for each, and you've cracked the bulk of conversation. The verbs cluster into a few families; learning the families is faster than memorizing 18 tables.

        **Group 1 — The "to be / to go" set (totally irregular).**

        *ser* (to be — essence). *soy, eres, es, somos, sois, son* / pret. *fui, fuiste, fue.* — *Soy estudiante.*
        *estar* (to be — state/location). *estoy, estás, está, estamos, estáis, están* / pret. *estuve, estuviste, estuvo.* — *Estoy cansado.*
        *ir* (to go). *voy, vas, va, vamos, vais, van* / pret. *fui, fuiste, fue* — identical to *ser*; context disambiguates. — *Voy al mercado.*
        *dar* (to give). *doy, das, da, damos, dais, dan* / pret. *di, diste, dio, dimos, disteis, dieron.* — *Dame un momento.*

        **Group 2 — The *-go* verbs (irregular *yo*).** The signature: a *yo* ending in *-go* you can't guess from the infinitive.

        *tener* — *tengo, tienes, tiene* / pret. *tuve.* — *Tengo dos hermanos.*
        *poner* — *pongo, pones, pone* / pret. *puse.* — *Pongo la mesa.*
        *salir* — *salgo, sales, sale* / fut. *saldré.* — *Salgo a las ocho.*
        *venir* — *vengo, vienes, viene* / pret. *vine.* — *Vengo de la tienda.*
        *hacer* — *hago, haces, hace* / pret. *hice, hiciste, hizo* (note the *z*). — *¿Qué haces?*
        *decir* — *digo, dices, dice* (also *e→i*) / pret. *dije, dijiste, dijo, dijimos, dijisteis, dijeron* (no *i* in *-jeron*). — *¿Qué dices?*
        *traer* — *traigo, traes, trae* / pret. *traje... trajeron.* — *Traigo el postre.*
        *oír* — *oigo, oyes, oye, oímos, oís, oyen* (note the *y*) / pret. *oí, oíste, oyó.* — *No te oigo.*

        **Group 3 — The *-zco* verbs.** Vowel + *-cer* or *-cir* takes *-zco* in the *yo*.

        *conocer* — *conozco, conoces, conoce.* — *Conozco a María.*
        *conducir* — *conduzco, conduces, conduce* / pret. *conduje, condujiste, condujo, condujimos, condujisteis, condujeron* (the *-jeron* family again). — *Conduzco con cuidado.*
        Same pattern: *parecer, ofrecer, traducir, producir, agradecer*.

        **Group 4 — Strong-preterite stem-changers.**

        *poder* (can). Present *o→ue*: *puedo, puedes, puede, podemos, podéis, pueden* / pret. *pude, pudiste, pudo* / fut. *podré.* — *No puedo dormir.*
        *querer* (want/love). Present *e→ie*: *quiero, quieres, quiere* / pret. *quise, quisiste, quiso* / fut. *querré.* — *Quiero agua.*
        *saber* (know facts). *sé, sabes, sabe* / pret. *supe, supiste, supo* / fut. *sabré.* — *No sé.*
        *haber* (auxiliary). *he, has, ha, hemos, habéis, han* — impersonal *hay* ("there is/are") / pret. *hube.* — *He comido ya.* Never means possession; that's *tener*.

        **Group 5 — Seeing.**

        *ver*. *veo, ves, ve, vemos, veis, ven* / imp. *veía, veías, veía.* — *¿Ves eso?*

        **Mnemonic — "Five Families":** **Be-Go** (ser/estar/ir/dar), **-go** (tengo/pongo/salgo/vengo/hago/digo/traigo/oigo), **-zco** (conozco/conduzco), **Strong preterite** (poder/querer/saber/haber), **See** (veo). Memorize one verb per family and the rest fall into place.

        **Common pitfalls.**
        — *Ser* and *ir* share the preterite. *Fui a Madrid* (I went) vs *Fui estudiante allí* (I was a student). Context only.
        — *Haber* never means "to have" in the possession sense — that's *tener*. *Haber* is the auxiliary in compound tenses or impersonal *hay/había/habrá*.
        — *Saber* = know facts or how to do something; *conocer* = be acquainted with people or places. *Sé nadar* vs *Conozco Madrid*.
        — Preterite stems ending in *-j-* (*dije, traje, conduje*) drop the *i* in third-person plural: *dijeron*, *trajeron*, *condujeron* — never *dijieron*.
        — The *yo* of *saber* is *sé* with an accent; the reflexive pronoun *se* has none. Always write the accent.
        — *Hay* is invariable — say *hay muchos coches*, never *han muchos coches*.
"""
    )

    // MARK: - 23. Types of Irregular Verbs

    private static let typesOfIrregularVerbs = GrammarNote(
        id: "types-of-irregular-verbs",
        title: "Types of Irregular Verbs",
        category: "Irregular Verbs",
        body: """
Spanish irregular verbs fall into six recognizable families. Name the family and you can usually predict every form. Tackle them one family at a time, not verb by verb.

        **1. Stem-changing verbs (boot verbs).** The stressed stem vowel changes in the present, but only when the stress lands on the stem — so *nosotros* and *vosotros* keep the original vowel. The changed forms outline a boot on the grid.

        *e → ie*: *pensar → pienso, piensas, piensa, pensamos, pensáis, piensan.* Also *querer, cerrar, preferir, empezar*.
        *o → ue*: *poder → puedo, puede, podemos, pueden.* Also *dormir, volver, encontrar, contar*.
        *e → i* (only *-ir*): *pedir → pido, pides, pide, pedimos, pedís, piden.* Also *servir, repetir, seguir, vestir*.
        *u → ue*: *jugar → juego, juegas, jugamos* — the only verb.

        Stem changes also surface in the preterite third person of *-ir* verbs (*durmió, sirvió*) and the gerund (*durmiendo, sirviendo*).

        **2. Spelling-change verbs.** Pronunciation stays the same — the spelling flexes because Spanish needs different letters before *e/i* vs *a/o/u*.

        *c → qu* before *e*: *buscar → busqué.* Also *tocar, sacar*.
        *g → gu* before *e*: *pagar → pagué.* Also *llegar, jugar*.
        *z → c* before *e*: *empezar → empecé.* Also *almorzar, cruzar*.
        *gu → gü* before *e*: *averiguar → averigüé.*
        *g → j* before *a/o*: *coger → cojo.* Also *proteger, elegir*.
        *gu → g* before *a/o*: *seguir → sigo.*
        *i → y* between vowels: *leer → leyó, leyeron, leyendo.* Also *oír, caer, construir*.

        **3. Irregular *yo* — *-go* verbs.** Otherwise-regular verbs throw an unpredictable *yo* in *-go*. The pattern propagates through the entire present subjunctive (free bonus).

        *tener → tengo, poner → pongo, salir → salgo, venir → vengo, hacer → hago, decir → digo, traer → traigo, oír → oigo, caer → caigo, valer → valgo.* — *Tengo que salir.*

        **4. Irregular *yo* — *-zco* verbs.** Verbs in **vowel +** *-cer* / *-cir* take *-zco* in the *yo*. The vowel-before condition matters: *vencer* (consonant + *cer*) becomes *venzo*, not *venzco*.

        *conocer → conozco, parecer → parezco, ofrecer → ofrezco, conducir → conduzco, traducir → traduzco, producir → produzco.* — *Conozco a María.*

        **5. Totally irregular verbs.** A small set has wildly irregular forms — pure memorization, but they're the most-used verbs, so frequency does the work.

        *ser*: *soy, eres, es, somos, sois, son* / pret. *fui, fuiste, fue* / imp. *era, eras*.
        *ir*: *voy, vas, va, vamos, vais, van* / pret. *fui* (same as ser!) / imp. *iba, ibas*.
        *haber*: *he, has, ha (hay), hemos, habéis, han* — auxiliary only.
        *dar*: *doy, das, da, damos, dais, dan* / pret. *di, dio* (with *-er/-ir* endings).
        *ver*: *veo, ves, ve* / imp. *veía, veías*.
        *saber*: *sé, sabes, sabe* / pret. *supe, supiste, supo*.

        **6. Defective verbs.** Conjugated in only a few persons, because their meanings don't fit other subjects.

        **Weather verbs** — third-person singular only: *llover → llueve* (it rains), *nevar → nieva* (it snows), *granizar → graniza*, *amanecer → amanece*. *Llueve mucho en abril.*

        **Gustar-style verbs** — inverted syntax: the thing liked is the subject, the person is the indirect object. Used in third-person singular or plural: *gustar, encantar, doler, importar, faltar*. *Me gusta el café* (literally "coffee is pleasing to me"). *Me duelen los pies.* *Le faltan dos euros.*

        Also *soler* (no future or conditional) and *atañer* (third person only).

        **Mnemonic — "Stem, Spell, Go, Zco, Wild, Few":** Six families in six syllables. For any new irregular verb, ask: does it (1) change a stem vowel, (2) flex spelling to keep the sound, (3) take *-go* in the *yo*, (4) take *-zco* in the *yo*, (5) belong to the wild handful, or (6) only conjugate in a few persons? Most verbs land in one bucket; a few (*tener* — stem-change + *-go*) sit in two.

        **Common pitfalls.**
        — Stem changes do **not** happen in *nosotros / vosotros* in the present: *podemos*, not *puedemos*.
        — *-ir* stem-changers keep changing in the preterite third person (*durmió, pidieron*) and gerund (*durmiendo*). *-ar* and *-er* stem-changers don't.
        — Spelling changes preserve *sound*: *busqué* sounds like *buscar* would if you could write *bus-cé*.
        — *-cer* preceded by a consonant takes *-zo*, not *-zco*: *vencer → venzo*, *ejercer → ejerzo*.
        — *Gustar* verbs aren't exotic — they're regular *-ar* verbs. What's unusual is the syntax: subject/object swap, indirect-object pronoun required.
"""
    )

    // MARK: - BEGIN generated notes (do not edit — regenerate via scrape/work/generate_swift.py)

    static let generatedNotes: [GrammarNote] = [
        GrammarNote(
            id: "present-indicative-conjugation",
            title: "Present Indicative Conjugation",
            category: "Core Concepts",
            body: """
The present indicative (*presente de indicativo*) is the workhorse tense — it covers what happens now, what happens regularly, what's coming up soon, and what is generally true. To conjugate a regular verb, drop the *-ar / -er / -ir* ending and add the personal ending that matches the subject.

        **The three regular endings.**

        *-ar* — *hablar*: *hablo, hablas, habla, hablamos, habláis, hablan.*
        *-er* — *comer*: *como, comes, come, comemos, coméis, comen.*
        *-ir* — *vivir*: *vivo, vives, vive, vivimos, vivís, viven.*

        *-er* and *-ir* share every ending **except** *nosotros* and *vosotros* (*-emos/-éis* vs *-imos/-ís*). Every *yo* ends in *-o*, regardless of group.

        *Yo hablo español todos los días.* — I speak Spanish every day.
        *¿Tú comes carne?* — Do you eat meat?
        *Ellos viven en Madrid.* — They live in Madrid.

        **When to use it — four jobs.**

        **1. Current state or action right now.** *Estoy en casa.* (I'm at home.) *Llueve mucho.* (It's raining.) — Spanish uses the simple present where English often uses the progressive.

        **2. Habitual actions and routines.** *Trabajo de lunes a viernes.* (I work Monday to Friday.) *Siempre tomo café.* (I always have coffee.)

        **3. Near or planned future.** *Mañana viajo a Madrid.* (Tomorrow I'm flying to Madrid.) *Te llamo más tarde.* (I'll call you later.) — A future time marker makes the simple present the natural choice.

        **4. General truths and definitions.** *El agua hierve a cien grados.* (Water boils at 100°.) *Los gatos duermen mucho.* (Cats sleep a lot.)

        It also handles the historical present (*Cervantes escribe el Quijote en 1605*) and the near past (*Vengo de la tienda — acabo de comprar pan*).

        **Stem changes in the present — the "boot".** A big family of verbs changes the stressed stem vowel in every form *except* *nosotros* and *vosotros*. The changed forms outline a boot on the grid.

        *e → ie*: *pensar → pienso, piensas, piensa, pensamos, pensáis, piensan.* Also *querer, cerrar, preferir, empezar*.
        *o → ue*: *poder → puedo, puedes, puede, podemos, podéis, pueden.* Also *dormir, volver, encontrar, contar*.
        *e → i* (only *-ir*): *pedir → pido, pides, pide, pedimos, pedís, piden.* Also *servir, repetir, seguir*.
        *u → ue*: *jugar → juego, juegas, jugamos* — the only verb.

        **Irregular *yo* forms.** Many common verbs are regular in five of six persons but throw a curveball in the *yo*.

        ***-go* verbs**: *tener → tengo, poner → pongo, salir → salgo, venir → vengo, hacer → hago, decir → digo, traer → traigo, oír → oigo, caer → caigo.* Some also stem-change in the other persons (*tengo, tienes, tiene*).

        ***-zco* verbs** (vowel + *-cer* / *-cir*): *conocer → conozco, parecer → parezco, conducir → conduzco, producir → produzco.*

        **One-offs**: *ser → soy, estar → estoy, ir → voy, dar → doy, haber → he, saber → sé, ver → veo.* The most-used verbs in the language — memorize them early.

        **Subject pronouns are optional.** The ending already names the subject, so *yo, tú, nosotros* are dropped unless you need them for contrast: *Hablo español* already means "I speak Spanish"; *Yo hablo, pero tú no* uses the pronouns precisely because the contrast matters.

        **Mnemonic — "AR-O, ER-O, IR-O — same vowel down the column":** Every *yo* ends in *-o*. The *nosotros / vosotros* row is the only place *-er* and *-ir* split. Two facts, and the regular tables snap into focus.

        **Common pitfalls.**
        — Don't reach for *estar + gerundio* every time English uses "-ing". *Como aquí los lunes* covers "I eat here on Mondays" *and* "I'm eating here today". The progressive is only for *right this instant*.
        — *Nosotros* and *vosotros* never stem-change in the present indicative: *podemos*, not *puedemos*.
        — *-cer / -cir* takes *-zco* only after a **vowel**. *Conocer → conozco*, but *vencer → venzo* (consonant + *cer*).
        — *Voy a + infinitive* expresses the near future, but the simple present with a time marker works just as well: *Mañana voy* = *Mañana voy a ir*.
        — Accents on *está, estás, están* aren't optional; *estoy* has none.
        — *Él / ella / usted* share the same form, so add the pronoun when context is ambiguous: *Habla español* could be he, she, or formal-you.
"""
        ),
        GrammarNote(
            id: "articles-and-gender",
            title: "Articles & Gender",
            category: "Core Concepts",
            body: """
Every Spanish noun carries a grammatical gender (masculine or feminine) and a number (singular or plural). The article in front of it — and any adjective attached to it — must agree with both. There's no neuter noun in Spanish; even *el libro* and *la mesa* are gendered.

        **Definite articles** — "the":
        *el* (m. sing.), *la* (f. sing.), *los* (m. pl.), *las* (f. pl.)

        **Indefinite articles** — "a / an / some":
        *un* (m. sing.), *una* (f. sing.), *unos* (m. pl.), *unas* (f. pl.)

        *el libro / los libros* — the book(s)
        *la mesa / las mesas* — the table(s)
        *un amigo / unos amigos* — a friend / some friends

        **Predicting gender — the reliable patterns:**

        — **-o** → usually masculine: *el carro, el vino.*
        — **-a** → usually feminine: *la casa, la pluma.*
        — **-ción, -sión, -dad, -tad, -tud, -umbre** → feminine: *la canción, la ciudad, la libertad, la actitud.*
        — **-ma, -pa, -ta** of Greek origin → masculine: *el problema, el mapa, el tema, el idioma, el sistema.*
        — **-or, -aje** → usually masculine: *el color, el viaje.*

        **Common exceptions to memorize:**
        *la mano, la foto, la moto, la radio* — feminine, end in -o.
        *el día, el sofá, el tranvía* — masculine, end in -a.

        **The *el agua* rule.** Singular feminine nouns starting with a stressed *a-* or *ha-* take *el* (or *un*) for sound, but they stay grammatically feminine — adjectives and plurals are feminine:

        *el agua fría* / *las aguas frías* — the cold water / waters
        *el águila majestuosa* / *las águilas*
        *un hacha afilada* — a sharp axe

        **When the article is required.** Spanish uses the definite article far more than English:

        — General statements: *Me gusta el café.* — I like coffee.
        — Days of the week: *El lunes tengo clase.* — On Monday I have class.
        — Languages (except right after *hablar, en, de*): *El español es bonito*, but *Hablo español.*
        — Body parts and clothing: *Me duele la cabeza.* — My head hurts. *Se puso el abrigo.* — He put on his coat.
        — Titles when talking *about* someone: *El señor García vive aquí*, but addressing him directly: *Buenos días, señor García.*

        **When the article is omitted:**

        — After *ser* + profession / religion / nationality, with no adjective: *Es médico*, but *Es un médico excelente*.
        — After *hay*: *Hay libros en la mesa* — never *hay unos libros* unless you mean specific ones.
        — Before *otro, cierto, medio, tal*: *otro día, cierta persona, medio kilo.*

        **The neuter *lo*.** Spanish has no neuter noun, but *lo* + masculine-singular adjective forms an abstract concept — "the [adjective] thing."

        *Lo bueno es que llegamos.* — The good thing is we arrived.
        *Lo importante es la salud.* — What's important is health.
        *No sabes lo difícil que fue.* — You don't know how hard it was.

        **Mandatory contractions:**
        *a + el = al* — *Voy al mercado.*
        *de + el = del* — *El libro del profesor.*
        These don't contract with the pronoun *él*: *Hablé de él.*

        **Memory aid — "ARTICLE FIRST."** Learn every new noun *with* its article: never just *mano*, always *la mano*. The article tells you the gender for every future agreement.

        **Common pitfalls for English speakers:**

        **1. Dropping the article in general statements.** English says "I like coffee," but Spanish needs *Me gusta el café.* Omission sounds clipped.

        **2. Using a possessive with body parts.** Spanish prefers *Me lavo las manos*, not *Lavo mis manos.* Reflexive + definite article is the natural pattern.

        **3. Adding *un* after *ser* + profession.** *Soy un profesor* sounds odd — say *Soy profesor.* The article reappears only when a description follows: *Soy un profesor estricto.*

        **4. Forgetting the *el agua* trick.** Learners write *la agua* because the noun is feminine. The article switches for sound; the adjective stays feminine: *el agua clara*, never *el agua claro*.

        **5. Missing the mandatory contractions.** *a el* and *de el* are never written that way — always *al* and *del*, except before the pronoun *él*.
"""
        ),
        GrammarNote(
            id: "possessive-adjectives",
            title: "Possessive Adjectives",
            category: "Adjectives",
            body: """
Spanish has two sets of possessive adjectives: the **short (unstressed) forms** that go *before* the noun, and the **long (stressed) forms** that go *after* the noun. Both agree in number with the *thing possessed* — not with the possessor — and the long forms also agree in gender.

        **Short forms — before the noun (the everyday set):**

        | Possessor | Singular | Plural |
        |---|---|---|
        | yo (my) | *mi* | *mis* |
        | tú (your, informal) | *tu* | *tus* |
        | él / ella / Ud. | *su* | *sus* |
        | nosotros (our) | *nuestro / nuestra* | *nuestros / nuestras* |
        | vosotros (your, Spain) | *vuestro / vuestra* | *vuestros / vuestras* |
        | ellos / ellas / Uds. | *su* | *sus* |

        *mi libro / mis libros* — my book(s)
        *tu casa / tus casas* — your house(s)
        *su perro / sus perros* — his / her / your / their dog(s)
        *nuestra familia / nuestros amigos* — our family / our friends

        **Agreement reminder.** *Mi, tu, su* change only for number. *Nuestro* and *vuestro* are the only short forms that also change for gender — match them to the *thing*: *nuestra casa* (f.), *nuestro perro* (m.).

        **The accent trap:** *tu* (your) vs *tú* (you); *mi* (my) vs *mí* (me, after prepositions). The accent is the only signal: *Tu libro es para mí.* — Your book is for me.

        **Long / stressed forms — after the noun.** These agree in both gender and number. Use them for emphasis, in contrast, after *un / el*, or as standalone pronouns.

        | | m. sing. | f. sing. | m. pl. | f. pl. |
        |---|---|---|---|---|
        | mine | *mío* | *mía* | *míos* | *mías* |
        | yours (tú) | *tuyo* | *tuya* | *tuyos* | *tuyas* |
        | his/hers/yours(Ud.) | *suyo* | *suya* | *suyos* | *suyas* |
        | ours | *nuestro* | *nuestra* | *nuestros* | *nuestras* |
        | yours (vosotros) | *vuestro* | *vuestra* | *vuestros* | *vuestras* |
        | theirs/yours(Uds.) | *suyo* | *suya* | *suyos* | *suyas* |

        *un amigo mío* — a friend of mine
        *Este libro es mío.* — This book is mine.
        *La casa es nuestra.* — The house is ours.
        *¡Dios mío!* — My God! (vocative)
        *Hijo mío, ven aquí.* — My son, come here.

        **Possessive pronouns.** Add the definite article before a stressed form to drop the noun:

        *Mi coche es rojo; el tuyo es azul.* — My car is red; yours is blue.
        *Tu casa es grande, pero la mía es más bonita.* — Your house is big, but mine is prettier.
        *Estos libros son los míos.* — These books are mine.

        **The ambiguity of *su* — and how to fix it.** *Su / sus* can mean *his, her, its, your* (Ud./Uds.), or *their*. Context usually clarifies, but when it doesn't, replace with *de + pronoun*:

        *Su coche es rojo.* — His / Her / Your / Their car is red.
        *El coche de él es rojo.* — His car is red.
        *El coche de ella es rojo.* — Her car is red.

        Spanish speakers do this constantly — it's not awkward, it's standard.

        **Body parts and clothing — drop the possessive.** Spanish prefers the definite article plus a reflexive or indirect object pronoun:

        *Me lavo las manos.* — I wash my hands. (not *mis manos*)
        *Se puso el abrigo.* — He put on his coat.
        *Le duele la cabeza.* — His/her head hurts.

        **Memory aid — "TWO POSITIONS, ONE OWNER."** Short forms ride *in front* for everyday possession; stressed forms sit *behind* for emphasis or to stand alone. Both agree with the *possessed*, never the possessor — *sus libros* (her books) matches *libros*, not "her."

        **Common pitfalls for English speakers:**

        **1. Making the possessive agree with the possessor.** English speakers think "her" needs a feminine form. It doesn't — Spanish marks the *thing*: *sus libros* (her books) matches *libros*.

        **2. Using *mi/tu/su* after the noun.** *Un amigo mi* is wrong; it must be the stressed *un amigo mío.*

        **3. Forgetting the article with stressed pronoun forms.** "Mine is bigger" is *El mío es más grande*, not *Mío es más grande.*

        **4. Over-using *su*.** When *su* would be ambiguous, switch to *de él / de ella / de ellos*. Native speakers do this all the time.

        **5. Writing *mi* when you mean *mí*.** The accent is meaningful: *Es para mí* (for me) vs *Es mi libro* (my book).
"""
        ),
        GrammarNote(
            id: "demonstrative-adjectives",
            title: "Demonstrative Adjectives",
            category: "Adjectives",
            body: """
Demonstratives point to something and agree with the noun in gender and number. Spanish makes a three-way distinction English collapses into "this" and "that" — *este* (near me), *ese* (near you), and *aquel* (far from both, or remote in time). Get the distance wrong and the sentence still parses, but it sounds off.

        **The three degrees of distance:**

        *este / esta / estos / estas* — this / these — near the speaker
        *ese / esa / esos / esas* — that / those — near the listener
        *aquel / aquella / aquellos / aquellas* — that / those over there — far from both, or distant in time

        **Full agreement table:**

        | | m. sing. | f. sing. | m. pl. | f. pl. |
        |---|---|---|---|---|
        | this / these | *este* | *esta* | *estos* | *estas* |
        | that / those (near you) | *ese* | *esa* | *esos* | *esas* |
        | that / those (yonder) | *aquel* | *aquella* | *aquellos* | *aquellas* |

        *este libro / estos libros* — this book / these books
        *esta mesa / estas mesas* — this table / these tables
        *ese hombre / esos hombres* — that man / those men (near you)
        *aquel árbol / aquellos árboles* — that tree / those trees (in the distance)
        *aquella montaña / aquellas casas* — that mountain / those houses (far away)

        **Position.** Demonstratives almost always go *before* the noun. You'll occasionally see them *after* for a dismissive flavor, with the definite article in front: *el libro ese* — "that book (of yours)," often with a slight eye-roll. Reserve this for casual speech.

        **Distance can be temporal.** *Aquel* often means "back in those days," not just "over there":

        *En aquel entonces no había móviles.* — Back then there were no cell phones.
        *Aquellos años fueron difíciles.* — Those years were hard.

        **Demonstrative pronouns — same words, no noun.** Drop the noun and the demonstrative stands alone:

        *Me gusta este, no ese.* — I like this one, not that one.
        *Estas son mías.* — These ones are mine.
        *Aquel de allá es mi primo.* — That one over there is my cousin.

        **The 2010 RAE reform — no more accents on demonstrative pronouns.** Older Spanish put accents on the pronoun forms (*éste, ése, aquél*) to distinguish them from adjectives. The Real Academia Española declared in 2010 that the accents are no longer required, since context makes the role obvious. You'll still see the accented spellings in older books — they aren't wrong, just dated.

        **Neuter demonstratives — *esto, eso, aquello*.** These three forms have no gender and no plural. Use them when pointing to:
        — Something unidentified: *¿Qué es esto?* — What is this?
        — An abstract idea, a whole situation, or what someone just said: *Eso no me gusta.* — I don't like that. *Aquello fue un desastre.* — That (whole thing) was a disaster.

        They never modify a noun directly — never *esto libro*. To say "this book," it's *este libro*, because *libro* is masculine.

        *¿Qué significa esto?* — What does this mean?
        *Eso es verdad.* — That is true.
        *Por eso te llamé.* — That's why I called you.

        **Memory aid — "this, that, yonder."** Picture three concentric circles: *este* hugs you, *ese* belongs to the person you're talking to, *aquel* lives off in the distance. In time: *este → now, ese → recently, aquel → long ago.*

        **Common pitfalls for English speakers:**

        **1. Collapsing *ese* and *aquel*.** English has only "that," so learners default to *ese* for everything not nearby. Use *aquel* when the object is far from both of you, or distant in time: *aquel verano* (that summer years ago), not *ese verano* if it was long ago.

        **2. Using a neuter form before a noun.** *Esto libro* is wrong — *esto* is a standalone pronoun. With a noun, gender matters: *este libro* (m.), *esta mesa* (f.).

        **3. Adding accents to modern demonstrative pronouns.** Writing *éste, ése, aquél* is no longer required since 2010. The unaccented spellings are now standard.

        **4. Mismatching gender or number.** *Este* must match its noun: *estas casas* (not *estos casas*), *aquellas montañas* (not *aquellos montañas*).

        **5. Confusing the spelling of *ese* vs *este*.** *Este* has a *t* — closer to the speaker, like "this" has a *t*. *Ese* has no *t* — slightly further away. A small mnemonic, but it sticks.
"""
        ),
        GrammarNote(
            id: "greetings-farewells",
            title: "Greetings & Farewells",
            category: "Core Concepts",
            body: """
Spanish greetings are highly time-of-day aware and signal formality at the same time. Using the wrong one — *buenos días* at midnight, or *¿cómo estás?* to your boss — sounds jarring. A small kit of phrases covers almost every situation once you learn which are formal and which are casual.

        **Time-of-day greetings.** Note the plural — Spanish says *good days*, not *good day*:

        *hola* — hi (anytime, any formality)
        *buenos días* — good morning (until ~noon, sometimes until lunch ~2pm)
        *buenas tardes* — good afternoon (noon until sunset)
        *buenas noches* — good evening / good night (after dark; also used when leaving)
        *buenas* — casual shortening of *buenas tardes/noches* ("hey there")

        **Asking how someone is — informal (*tú*):**

        *¿cómo estás?* — how are you? (neutral)
        *¿qué tal?* — how's it going? (very common, casual)
        *¿qué pasa?* — what's up? (Spain especially)
        *¿qué hay (de nuevo)?* — what's new?
        *¿cómo te va?* — how's it going?
        *¿cómo andas?* / *¿cómo andás?* — how are you doing? (the *-ás* form is *voseo*: Argentina, Uruguay, Central America)

        **Asking how someone is — formal (*usted*):**

        *¿cómo está usted?* — how are you? (formal sing.)
        *¿cómo están ustedes?* — how are you all? (default plural in Latin America)
        *¿cómo le va?* — how's it going for you?

        **Typical responses:**

        *bien, gracias* — fine, thanks
        *muy bien* — very well
        *más o menos* — so-so
        *todo bien* — all good (Latin America)
        *aquí, andando* — getting by
        *no me quejo* — can't complain

        Echo the question back: *¿Y tú?* (informal) or *¿Y usted?* (formal). Skipping the echo sounds curt.

        **Introductions:**

        *mucho gusto* — nice to meet you
        *encantado / encantada* — delighted (matches the *speaker's* gender)
        *igualmente* — likewise
        *el gusto es mío* — the pleasure is mine
        *¿cómo te llamas? / ¿cómo se llama (usted)?* — what's your name? (informal / formal)
        *me llamo... / soy...* — my name is...
        *te presento a... / le presento a...* — let me introduce you to... (informal / formal)

        **Formal address — titles you'll hear constantly:**

        *señor / señora / señorita* — Mr. / Mrs. / Miss (*señora* is the safer default for adult women now)
        *don / doña* + first name — respectful but warm address for older or higher-status people you know: *don Carlos, doña María*. Between "Mr./Mrs." and "sir/ma'am."

        Drop the article when speaking *to* the person, use it when speaking *about* them: *Buenos días, señor García* vs *El señor García no está.*

        **Farewells — from formal to casual:**

        *adiós* — goodbye (final-feeling)
        *hasta luego* — see you later (the all-purpose farewell)
        *hasta pronto* — see you soon
        *hasta mañana* — see you tomorrow
        *hasta la próxima* — until next time
        *nos vemos* — see you around
        *que te vaya bien / que le vaya bien* — may things go well (informal / formal)
        *cuídate / cuídese* — take care (informal / formal)
        *chao / chau* — bye (casual, common in Latin America)
        *un abrazo / un beso / besos* — a hug / a kiss(es) — common closings on calls or messages

        **Regional flavor:**
        — Spain: *¿qué tal?, ¿qué pasa?, ¿qué hay?*
        — Mexico: *¿qué onda?, ¿qué hubo?* (*quiúbo*)
        — Argentina / Uruguay: *¿cómo andás?, ¿todo bien?* — *voseo* country
        — Colombia: *¿qué más?, ¿quiubo?, ¿bien o no?*

        **Memory aid — "TIME, TONE, TITLE."** Three quick checks:
        — **Time**: morning, afternoon, or evening? → *buenos días / buenas tardes / buenas noches*.
        — **Tone**: do you know this person? → *¿cómo estás?* (yes) vs *¿cómo está usted?* (no, or formal).
        — **Title**: stranger, older person, customer? → *señor / señora* with last name, or *don / doña* with first.

        **Common pitfalls for English speakers:**

        **1. Saying *buen día* instead of *buenos días*.** *Buenos días* is standard. *Buen día* is heard in Argentina but sounds odd elsewhere.

        **2. Treating *buenas noches* as bedtime-only.** It's both the evening greeting *and* the bedtime farewell.

        **3. Defaulting to *tú* with everyone.** With strangers, older people, customers, bosses — start with *usted* and *¿cómo está?* until invited to switch.

        **4. Mixing up *encantado* and *encantada*.** The form matches the *speaker's* gender, not the listener's. A woman always says *encantada*.

        **5. Using *adiós* for every parting.** *Adiós* sounds more final than English "goodbye." For routine exits, *hasta luego* feels lighter and is far more common.

        **6. Forgetting to echo the greeting.** Skipping *¿y tú? / ¿y usted?* sounds abrupt. Spanish greetings expect a small back-and-forth.

        **7. Treating *¿qué tal?* as "how are you?".** It's softer — closer to "how's it going?" — and the expected reply is short: *bien, ¿y tú?*. A full health report is overkill.
"""
        ),
        GrammarNote(
            id: "poder-infinitive",
            title: "Poder + Infinitive",
            category: "Irregular Verbs",
            body: """
*Poder* means "to be able to / can" and is the headliner of a whole family of Spanish verbs that take an **infinitive directly** — no preposition, no *que*, no conjugation of the second verb. Learn the pattern and you unlock a huge chunk of everyday speech.

**Core pattern:** [conjugated verb] + [infinitive]. Only the first verb changes for person and tense; the second stays in its dictionary form.

*Puedo nadar.* — I can swim.
*Puedes hablar más despacio.* — You can speak more slowly.
*¿Puedes ayudarme?* — Can you help me? (object pronoun attaches to the infinitive)
*No pudimos ir al concierto.* — We couldn't go to the concert.

**Poder is irregular.** *Puedo, puedes, puede, podemos, podéis, pueden* (o→ue stem change, except *nosotros/vosotros*). Preterite stem *pud-*: *pude, pudiste, pudo, pudimos, pudisteis, pudieron*. Future/Conditional stem *podr-*: *podré...* / *podría...*

**Preterite nuance:** *pude* often means "managed to / succeeded in"; *no pude* means "I failed to / couldn't." Compare with imperfect *podía* — "was able to / used to be able to" (ongoing ability).

**The modal-like verb family.** Several other verbs take a raw infinitive the same way *poder* does.

*Querer* + inf (to want to) — *Quiero comer.*
*Deber* + inf (should / must) — *Debes estudiar más.*
*Necesitar* + inf (to need to) — *Necesito dormir.*
*Saber* + inf (to know how to — a skill) — *Sé cocinar.*
*Soler* + inf (to usually do) — *Suelo desayunar tarde.*
*Preferir* + inf (to prefer to) — *Prefiero quedarme.*

**Saber vs poder for "can":** *Sé nadar* = I know how to swim (skill). *Puedo nadar* = I'm able to swim right now (no broken arm, pool is open). English "can" hides both meanings; Spanish forces you to pick.

**Obligation patterns — *tener que* and *hay que*.** These add a preposition between the verb and the infinitive — don't drop it.

*Tener que* + inf — personal obligation ("have to"), with a specific subject.
*Tengo que estudiar.* — I have to study.
*Tenemos que salir temprano.* — We have to leave early.

*Hay que* + inf — impersonal obligation ("one must"). No subject; *hay* never changes.
*Hay que respetar las reglas.* — One must respect the rules.
*Hay que tener paciencia.* — You've got to be patient.

**Near future — *ir a* + infinitive.** The most useful construction in everyday speech.
*Voy a comer.* — I'm going to eat.
*¿Qué vas a hacer mañana?* — What are you going to do tomorrow?

**Progressive vs "about to" — *estar + gerund* vs *estar por + infinitive*.** *Estar* pairs with the *-ando / -iendo* form, not the infinitive: *Estoy comiendo* (I'm eating), never *Estoy comer*. Don't confuse with *estar por* + infinitive, "to be about to / to feel like": *Estoy por salir* (I'm about to leave).

**Memory aid — the "no-preposition" club** takes a raw infinitive: *poder, querer, deber, necesitar, saber, soler, preferir, gustar*. The **"preposition required" club**: *ir **a*** + inf, *tener **que*** + inf, *hay **que*** + inf, *acabar **de*** + inf (just did), *empezar **a*** + inf (start to), *volver **a*** + inf (do again).

**Common pitfalls:**

- **Conjugating the second verb.** *Quiero comer*, never *Quiero como*. Only the first verb agrees.
- **Dropping *que* after *tener*.** *Tengo estudiar* is wrong — must be *Tengo que estudiar*.
- **Adding *a* after *poder*.** *Puedo a ir* is wrong; *poder* takes the bare infinitive: *Puedo ir*.
- **Confusing *poder* and *saber*.** Skill vs ability — see above.
- **Using *podría* for every "could".** *Podría* is conditional, for polite requests (*¿Podrías pasar la sal?*) or hypotheticals. For past ability, use *pude* (managed to) or *podía* (was able to).
"""
        ),
        GrammarNote(
            id: "al-del-contractions",
            title: "al & del Contractions",
            category: "Core Concepts",
            body: """
Spanish has only **two mandatory contractions** in the entire language, and they both collapse the awkward vowel cluster between a preposition and the masculine article *el*.

**a + el = al** (to the)
**de + el = del** (of the / from the)

*Voy al banco.* — I'm going to the bank. (NOT *a el banco*)
*Llamo al médico.* — I'm calling the doctor.
*La casa del médico.* — The doctor's house. (NOT *de el médico*)
*Vengo del trabajo.* — I'm coming from work.
*El precio del coche.* — The price of the car.

**These two are the whole list.** No other preposition contracts, even when followed by *el*.

*en el parque* — in the park
*con el amigo* — with the friend
*por el camino* — along the path
*para el jefe* — for the boss
*sin el dinero* — without the money
*sobre el libro* — about the book

**No other article contracts either.** Feminine *la / las* and masculine plural *los* stay separate. Only singular masculine *el* triggers the merge.

*a la escuela* — to school
*a las chicas* — to the girls
*a los niños* — to the boys
*de la casa* — from the house
*de las montañas* — from the mountains
*de los libros* — of the books

**Mnemonic — "Spanish hates a-e and e-e collisions."** Say *a el* out loud — your mouth wants to slur it into *al*. Same with *de el* → *del*. The contraction is a written confession of what speakers were already doing. Every other preposition + article pair keeps a consonant between the vowels (*en**l***a, *con**l***a), so there's nothing to collapse.

**Exception 1 — the pronoun *él* (he / him).** *Él* with an accent is a pronoun, not an article, so it never contracts. The accent is your only visual cue.

*Le doy el regalo a él.* — I give the gift to him. (NOT *al*)
*Hablo de él, no de ella.* — I'm talking about him, not her. (NOT *del*)
*Este libro es de él.* — This book is his.

**Exception 2 — proper names that start with capital *El*.** Country names, city names, and titles that begin with capitalized *El* are treated as one fixed name.

*Voy a El Salvador.* — I'm going to El Salvador. (NOT *Al Salvador*)
*Vuelvo de El Paso.* — I'm coming back from El Paso. (NOT *Del Paso*)
*Soy fan de El Greco.* — I'm a fan of El Greco.

The test: if you'd capitalize *El* in writing because it's part of the name, don't contract.

**Where you'll see al / del constantly:**

- **Direction** — *al cine, al trabajo, al baño, al supermercado*.
- **Origin / possession** — *del norte, del jefe, del año pasado*.
- **Time expressions** — *al día siguiente* (the next day), *al final, al principio*.
- **Personal *a* before *el*** — *Veo al profesor* (I see the teacher). The personal *a* still contracts.
- **Verbs that govern *a* or *de*** — *jugar al fútbol* (to play soccer), *acordarse del pasado*, *llegar al aeropuerto*.

**Common pitfalls:**

- **Writing *a el* / *de el* in formal text.** It's not stylistic — these contractions are obligatory. *Voy a el banco* is simply wrong.
- **Contracting *él* the pronoun.** Always check for the accent. *Hablamos del jefe* (about the boss) but *Hablamos de él* (about him).
- **Contracting feminine or plural articles.** *Al chica* and *del las casas* are wrong. Only *el*.
- **Forgetting that the personal *a* still contracts.** *Llamo a el médico* should be *Llamo al médico*.
- **Capitalized place names.** *Voy al Salvador* is wrong; it's *Voy a El Salvador*.
"""
        ),
        GrammarNote(
            id: "prepositional-pronouns",
            title: "Prepositional Pronouns",
            category: "Pronouns",
            body: """
After most prepositions (*a, de, en, para, por, sin, sobre, contra, hacia, hasta...*) Spanish uses a special set of **prepositional pronouns**. The good news: only *yo* and *tú* change shape. The rest match the subject pronouns exactly.

**The full table:**

| Subject | After preposition |
|---|---|
| yo | **mí** |
| tú | **ti** |
| él / ella / usted | él / ella / usted |
| nosotros / nosotras | nosotros / nosotras |
| vosotros / vosotras | vosotros / vosotras |
| ellos / ellas / ustedes | ellos / ellas / ustedes |

*Este regalo es para mí.* — This gift is for me.
*No puedo ir sin ti.* — I can't go without you.
*Hablan de nosotros.* — They're talking about us.
*Pienso en ella todo el día.* — I think about her all day.
*El paquete es para usted.* — The package is for you (formal).

**Watch the accent.** *Mí* (me) has an accent to distinguish it from *mi* (my). *Ti* never carries an accent.

*Es para mí.* — It's for me.
*Es mi libro.* — It's my book.

**The CON fusions — conmigo, contigo, consigo.** The preposition *con* (with) fuses with *mí, ti,* and the reflexive *sí* into single irregular words. These are the only fusions of their kind in Spanish.

*conmigo* — with me
*contigo* — with you (informal singular)
*consigo* — with himself / herself / themselves / yourself (reflexive only)

*¿Quieres venir conmigo?* — Do you want to come with me?
*Iré contigo al cine.* — I'll go to the movies with you.
*Llevó el libro consigo.* — He took the book with him(self).

*Con* does NOT fuse with any other pronoun: *con él, con ella, con usted, con nosotros, con ellos*.

**Consigo is reflexive only.** Use *consigo* only when the "with him/her/them" refers back to the subject. Different person → *con él / con ella*.

*Juan habla consigo mismo.* — Juan talks to himself.
*Juan habla con él.* — Juan talks with him (some other guy).

**Reflexive *sí* after other prepositions.** Just like *consigo*, plain *sí* (with accent) is the third-person reflexive prepositional pronoun.

*Piensa solo en sí mismo.* — He only thinks about himself.
*Lo guardó para sí.* — She kept it for herself.
*Hablan entre sí.* — They talk among themselves.

Add *mismo / misma / mismos / mismas* for emphasis — almost always present in practice.

**The big exception — six prepositions that take subject pronouns.** After this short list, Spanish reverts to *yo* and *tú* instead of *mí* and *ti*. Memorize them as a unit.

**entre, según, excepto, salvo, menos, incluso** (and the comparison words *como, que*)

*entre tú y yo* — between you and me (NOT *entre ti y mí*)
*según tú* — according to you
*según yo* — in my opinion
*excepto yo* — except me
*salvo tú* — except you
*incluso tú* — even you
*Es más alto que yo.* — He's taller than I am.
*Trabaja tanto como tú.* — She works as much as you.

**Memory aid — "MI TI, CON-MI-GO CON-TI-GO, but ENTRE-TÚ-Y-YO."** Three layers: regular prepositions take *mí / ti*, *con* fuses to *conmigo / contigo / consigo*, and the *entre-según-excepto* group flips back to *tú / yo*.

**Common pitfalls:**

- **Saying *con mí* / *con ti*.** Never — they fuse: *conmigo, contigo*. A giveaway beginner mistake.
- **Writing *mi* without the accent for "me".** *Es para mi* should be *Es para mí*.
- **Using *mí / ti* after *entre, según, excepto*.** *Entre ti y mí* sounds wrong; use *entre tú y yo*.
- **Using *consigo* for a different person.** *Consigo* is reflexive. For "with him" (someone else), use *con él*.
- **Forgetting feminine *nosotras / vosotras / ellas*** in all-female groups: *Es para nosotras.*
"""
        ),
        GrammarNote(
            id: "irregular-yo-verbs",
            title: "Irregular Yo Verbs",
            category: "Irregular Verbs",
            body: """
A group of Spanish verbs conjugates regularly in every present-tense form **except *yo***, which takes a special irregular ending. The payoff: the irregular *yo* stem also feeds the **present subjunctive** and the **negative *tú* command**, so learning the *yo* unlocks three tenses at once.

**The -GO group (the largest).** The *yo* form ends in *-go*; the rest of the present may still stem-change for other reasons.

*tener → tengo* (I have) — *tienes, tiene, tenemos, tenéis, tienen*
*poner → pongo* (I put)
*venir → vengo* (I come) — *vienes, viene, venimos, venís, vienen*
*salir → salgo* (I leave / go out)
*hacer → hago* (I do / make)
*decir → digo* (I say) — *dices, dice, decimos, decís, dicen*
*traer → traigo* (I bring)
*caer → caigo* (I fall)
*oír → oigo* (I hear)
*valer → valgo* (I'm worth)

*Tengo dos hermanos.* — I have two brothers.
*Hago la tarea cada día.* — I do homework every day.
*Salgo del trabajo a las seis.* — I leave work at six.
*No oigo nada.* — I can't hear anything.

**The -ZCO group.** Verbs ending in **-cer or -cir after a vowel** insert *z* before the *c* in the *yo*. The rest of the present is regular.

*conocer → conozco* (I know — a person / place)
*parecer → parezco* (I seem)
*ofrecer → ofrezco* (I offer)
*agradecer → agradezco* (I thank)
*conducir → conduzco* (I drive)
*traducir → traduzco* (I translate)
*producir → produzco* (I produce)

*Conozco a tu hermana.* — I know your sister.
*Te ofrezco mi ayuda.* — I offer you my help.
*Conduzco al trabajo cada día.* — I drive to work every day.

(Exception: *-cer / -cir* after a **consonant** doesn't follow this — *vencer → venzo*.)

**The -OY group.** Four short verbs end *yo* in *-oy*.

*dar → doy* — *Te doy las gracias.*
*estar → estoy* — *Estoy en casa.*
*ir → voy* — *Voy al mercado.*
*ser → soy* — *Soy estudiante.*

**Standalone irregulars.**

*ver → veo* (I see) — *Veo la televisión.*
*saber → sé* (I know — a fact / skill, accented) — *Sé la respuesta.*
*caber → quepo* (I fit) — *No quepo en este coche.*
*haber → he* (I have, as auxiliary) — *He visto esa película.*

**Why this matters — the *yo* form is the root of two more conjugations.**

**1. Present subjunctive.** Drop the *-o* from the *yo* form and add the opposite endings (*-ar* takes *-e*; *-er / -ir* take *-a*). The irregularity carries through every subjunctive form.

*tengo → tenga, tengas, tenga, tengamos, tengáis, tengan*
*conozco → conozca, conozcas, conozca, conozcamos, conozcáis, conozcan*
*hago → haga, hagas, haga, hagamos, hagáis, hagan*

*Quiero que tengas paciencia.* — I want you to be patient.
*Es importante que conozcas la verdad.* — It's important you know the truth.

**2. Negative *tú* command.** Same trick — start from the *yo*, drop the *-o*, add the opposite ending. (The affirmative *tú* command is different and usually shorter — *ten, pon, ven, sal, haz, di*.)

*¡No tengas miedo!* — Don't be afraid!
*¡No pongas eso ahí!* — Don't put that there!
*¡No hagas ruido!* — Don't make noise!
*¡No digas eso!* — Don't say that!
*¡No vengas tarde!* — Don't come late!

**Memory aid — "the YO knows."** If you can produce *tengo, pongo, salgo, hago, digo, traigo, caigo, oigo, conozco, conduzco, doy, estoy, voy, soy, veo, sé, quepo* on demand, you've also unlocked their subjunctives and negative commands.

**Common pitfalls:**

- **Regularizing the *yo*.** *Teno, salo, haco* — all wrong. Memorize them.
- **Carrying the irregularity into *tú / él / nosotros*.** *Yo tengo* but *tú tienes* — the *-go* irregularity is *yo*-only.
- **Forgetting the subjunctive ripple.** *Que él tene* should be *que él tenga*. Subjunctive is built from the *yo*.
- **Mixing affirmative vs negative *tú* commands.** *¡Ten paciencia!* (affirmative — short irregular) but *¡No tengas miedo!* (negative — subjunctive form). Two different patterns.
- **Confusing *sé* and *se*.** *Yo sé* (I know) vs reflexive/impersonal *se* — the accent is critical.
- **Confusing *conocer* and *saber*.** *Conozco a Juan* (acquainted) vs *Sé la respuesta* (a fact). See the *saber vs conocer* note.
"""
        ),
        GrammarNote(
            id: "stem-changing-verbs",
            title: "Stem-Changing Verbs",
            category: "Irregular Verbs",
            body: """
Stem-changing verbs (*verbos con cambio de raíz*) keep regular endings but mutate the stressed vowel inside their stem. The change happens in **all present-tense forms EXCEPT nosotros and vosotros** — which traces out a boot on the conjugation chart, the source of the nickname *boot verbs*.

**Why the boot shape?** Spanish only changes the vowel when it carries the stress. In *nosotros* and *vosotros*, stress moves to the ending (*pen-SA-mos*, *pen-SÁIS*), so the stem vowel stays unstressed and unchanged. In the other four forms, stress falls on the stem (*PIEN-so*, *PIEN-sas*), and the vowel diphthongizes or shifts.

**The four patterns:**

**1. e → ie** — the largest group. Works with -ar, -er, and -ir verbs.
*pensar* (think) → *pienso, piensas, piensa, pensamos, pensáis, piensan*
Also: *querer, perder, cerrar, empezar, entender, sentir, preferir, mentir, despertarse, recomendar*.

**2. o → ue** — second largest. Also -ar, -er, -ir.
*poder* (be able) → *puedo, puedes, puede, podemos, podéis, pueden*
Also: *dormir, contar, volver, encontrar, recordar, morir, almorzar, costar*.

**3. e → i** — ONLY -ir verbs. No -ar or -er verbs do this.
*pedir* (ask for) → *pido, pides, pide, pedimos, pedís, piden*
Also: *servir, repetir, seguir, vestirse, medir, reír, competir*.

**4. u → ue** — the rarity. *Jugar* (to play) is the only common verb in this class.
*juego, juegas, juega, jugamos, jugáis, juegan*

**Example sentences:**

*Yo quiero un café, pero nosotros queremos té.* — I want coffee, but we want tea. (*nosotros* stays regular)
*Ella duerme ocho horas; nosotros dormimos cinco.* — She sleeps eight hours; we sleep five.
*Pido la cuenta cuando tú pides el postre.* — I ask for the check when you ask for dessert.

**Deep point — -ir stem-changers go further.** The -ir verbs in groups 1, 2, and 3 also change their stem in two extra places that regular -ar/-er stem-changers do NOT:

**(a) The gerund (present participle):** e → i, o → u.
*dormir → durmiendo* (sleeping)
*pedir → pidiendo* (asking)
*sentir → sintiendo* (feeling)
*morir → muriendo* (dying)

Compare *pensar* (an -ar verb): gerund is regular *pensando*, NOT *piensando*.

**(b) The 3rd-person preterite (singular and plural):** same e → i, o → u shift.
*dormir → durmió, durmieron*
*pedir → pidió, pidieron*
*sentir → sintió, sintieron*

Compare *volver* (an -er o→ue verb): preterite is fully regular — *volví, volvió, volvimos, volvieron*, no stem change.

This same shift carries into the imperfect subjunctive of -ir stem-changers (built from the preterite stem): *durmiera, pidiera, sintiera*.

**Present subjunctive:** Stem changes carry through. -ar/-er verbs follow the boot pattern again (*piense, pienses, piense, pensemos, penséis, piensen*). -ir verbs additionally shift in *nosotros / vosotros* — exactly where the indicative doesn't change: *durmamos, durmáis; pidamos, pidáis; sintamos, sintáis*.

**Mnemonic — "Stress changes the vowel."** If the stem vowel is stressed, it diphthongizes (or shifts to *i*). If the ending is stressed, the stem stays plain. The "boot" is just a visual reminder that *nosotros / vosotros* sit outside the stress zone.

**Common pitfalls:**

**1. Treating *nosotros* as a stem-changer.** Beginners often say *piensamos* or *duermimos*. Wrong — it's always *pensamos*, *dormimos*. The boot has a hole in it.

**2. Applying e→i to -ar or -er verbs.** *Pedir* shifts to *pido*, but there's no *cerrar → cirro* or *perder → pirdo*. Only -ir verbs do e→i.

**3. Forgetting the gerund/preterite shift for -ir verbs.** Saying *dormiendo* instead of *durmiendo*, or *pedió* instead of *pidió*. One of the most common intermediate errors.

**4. Inventing u→ue verbs.** *Jugar* is essentially alone. Don't extend the pattern to *gustar*, *buscar*, *usar* — they're regular.

**5. Spelling traps with *seguir*.** *Seguir* (e→i) drops the silent *u* before *o/a*: *sigo, sigues, sigue, seguimos, seguís, siguen*. The *u* exists only to keep *g* hard before *e/i*.
"""
        ),
        GrammarNote(
            id: "stressed-possessives",
            title: "Stressed Possessive Adjectives",
            category: "Adjectives",
            body: """
Stressed possessives (*posesivos tónicos*) are the long-form possessives — used for emphasis, contrast, predicate ownership, or as pronouns. Unlike the short forms (*mi, tu, su, nuestro, vuestro*), they appear **after** the noun (or after *ser*, or standing alone) and agree with the possessed item in BOTH gender AND number.

**Full table:**

| Owner | Singular m. / f. | Plural m. / f. |
|---|---|---|
| mine (yo) | *mío / mía* | *míos / mías* |
| yours (tú) | *tuyo / tuya* | *tuyos / tuyas* |
| his / hers / yours (Ud.) | *suyo / suya* | *suyos / suyas* |
| ours (nosotros) | *nuestro / nuestra* | *nuestros / nuestras* |
| yours (vosotros) | *vuestro / vuestra* | *vuestros / vuestras* |
| theirs / yours (Uds.) | *suyo / suya* | *suyos / suyas* |

Note that *nuestro* and *vuestro* look identical in their short and long forms — they're the only ones without a *-yo / -ya* ending. They already inflected for gender in the short form.

**Short form vs long form — the contrast.** Short forms sit *before* the noun and agree only in number (*mi libro / mis libros*; *nuestra casa / nuestras casas*). Long forms sit *after* and agree in gender and number.

*mi amigo* (my friend) → *un amigo mío* (a friend of mine)
*tus llaves* (your keys) → *unas llaves tuyas* (some keys of yours)
*nuestra casa* (our house) → *una casa nuestra* (a house of ours)

**Three main uses:**

**1. After a noun — "of mine / of yours."** Adds emphasis or signals "one among several." Almost always with an indefinite article (*un / una / unos / unas*) or no article at all.

*Un amigo mío vive en Sevilla.* — A friend of mine lives in Seville.
*Esa actitud tuya me molesta.* — That attitude of yours bothers me.
*Unos primos nuestros vienen mañana.* — Some cousins of ours are coming tomorrow.
*¡Dios mío!* — My God! (fixed expression)

**2. As a predicate adjective after *ser*** — to assert ownership.

*El libro es mío.* — The book is mine.
*Esta casa es nuestra.* — This house is ours.
*¿Son tuyas estas llaves?* — Are these keys yours?

No article is used here. *El libro es el mío* shifts to "the book is the one that belongs to me" — grammatical but more pointed.

**3. As a possessive pronoun with the definite article** — *el mío, la mía, los míos, las mías,* etc. The article replaces the noun entirely.

*Mi coche es rojo; el tuyo es azul.* — My car is red; yours is blue.
*Tus hijos y los míos juegan juntos.* — Your kids and mine play together.
*Mi propuesta y la suya son distintas.* — My proposal and his/hers differ.

The article matches the gender and number of the original noun: *coche* (m. sg.) → *el tuyo*; *hijos* (m. pl.) → *los míos*.

**The *suyo* ambiguity.** Like short *su*, the long form *suyo / suya / suyos / suyas* can mean **his, hers, yours (Ud. / Uds.), or theirs** — six possible owners hidden in one word. Context usually resolves it. When it doesn't, Spanish swaps to a *de + pronoun* phrase:

*un amigo suyo* → ambiguous
*un amigo de él / de ella / de usted / de ellos / de ustedes* — disambiguated

The same trick works for the pronoun form: *el suyo* → *el de él, el de ella, el de ustedes*.

**Mnemonic — "after the noun, after *ser*, or standing alone."** That's the entire usage rule. If the possessive comes BEFORE its noun (*mi casa*), it's short. If it comes AFTER, replaces the noun, or follows *ser*, it's long.

**Common pitfalls:**

**1. Mixing the two forms.** *Mi amigo mío* is redundant — pick one. Either *mi amigo* (my friend, neutral) or *un amigo mío* (a friend of mine, emphatic).

**2. Forgetting gender agreement.** The long form agrees with the *thing owned*, not the owner. A man saying "the keys are mine" still says *Las llaves son mías* — because *llaves* is feminine plural.

**3. Translating "It's mine" as *Es el mío*.** Plain *Es mío* is usually more natural. Use *el mío* only when contrasting with another item: *No, ese es el mío*.

**4. Stress accent on *mío / mía*.** The accent on *í* is mandatory — it breaks the diphthong and gives the word two syllables (*mí-o*). Same logic for *tía, día, frío*: when *í* meets another vowel and the *í* is stressed, the accent is required.
"""
        ),
        GrammarNote(
            id: "present-perfect-tense",
            title: "Present Perfect",
            category: "Verb Tenses",
            body: """
The present perfect (*pretérito perfecto compuesto*) expresses what someone **has done** — an action completed in the recent past, or completed within a time frame that still extends to the present (today, this week, this year, ever in your life).

**Formula:** *haber* (present) + past participle.

| Pronoun | *haber* |
|---|---|
| yo | he |
| tú | has |
| él / ella / Ud. | ha |
| nosotros | hemos |
| vosotros | habéis |
| ellos / Uds. | han |

**Past participle formation:**
-ar verbs → **-ado**: *hablar → hablado*, *trabajar → trabajado*
-er / -ir verbs → **-ido**: *comer → comido*, *vivir → vivido*

**The 14 irregular past participles you must memorize:**

*abrir → abierto* (opened)
*cubrir → cubierto* (covered)
*decir → dicho* (said)
*descubrir → descubierto* (discovered)
*devolver → devuelto* (gave back)
*escribir → escrito* (written)
*hacer → hecho* (done/made)
*morir → muerto* (died)
*poner → puesto* (put)
*resolver → resuelto* (resolved)
*romper → roto* (broken)
*satisfacer → satisfecho* (satisfied)
*ver → visto* (seen)
*volver → vuelto* (came back)

Compounds inherit the irregularity: *describir → descrito*, *componer → compuesto*, *deshacer → deshecho*.

**Example sentences:**

*He comido demasiado hoy.* — I've eaten too much today.
*¿Has visto la nueva película?* — Have you seen the new movie?
*Todavía no han llegado.* — They haven't arrived yet.
*Este año hemos viajado mucho.* — This year we've traveled a lot.
*Nunca he estado en Madrid.* — I've never been to Madrid.

**Trigger words that signal present perfect:**

*hoy* (today), *esta mañana / tarde / noche*, *esta semana / este mes / este año*, *ya* (already), *todavía no / aún no* (not yet), *nunca / jamás* (never), *alguna vez* (ever in your life), *últimamente* (lately).

*Esta semana he trabajado mucho.* — This week I've worked a lot.
*Ya he terminado el libro.* — I've already finished the book.
*Todavía no he comido.* — I haven't eaten yet.

**Regional usage divide — important.** This is one of the biggest dialectal splits in Spanish:

**Spain (especially Castilian):** Uses present perfect freely for any past action within today or a current time frame — *Hoy me he levantado tarde* (I got up late today).

**Most of Latin America:** Often substitutes the simple preterite for the same situations — *Hoy me levanté tarde*. The present perfect is reserved for more distant or vague past actions still relevant now. Mexico, Argentina, Chile, and most other countries prefer preterite where Spain uses perfect.

Both are correct; just match your audience.

**The two halves must stay together.** *Haber* and the past participle behave as a single unit. Nothing — adverbs, pronouns, negations — can wedge between them.

*Lo he comido.* — I've eaten it. ✓
*He lo comido.* ✗
*No he comido.* — I haven't eaten. ✓ (the *no* goes before *he*)
*Siempre he querido viajar.* — I've always wanted to travel. ✓
*He siempre querido viajar.* ✗

**The participle is invariable in this tense.** In compound tenses, the past participle always ends in *-o*. It does NOT agree with subject or object.

*Ella ha comido.* — not *comida*
*Las cartas las he escrito.* — not *escritas*

Agreement only happens when the participle works as a true adjective: *La puerta está abierta*, *una carta escrita a mano*.

**Mnemonic — "haber + done."** English "have + past participle" maps one-to-one onto *haber + participio*. The catch: *haber* is the ONLY auxiliary for perfect tenses. Never use *tener* here — *tener* means "to possess," not "to have done."

**Common pitfalls:**

**1. Using *tener* as the auxiliary.** False-cognate trap. Stick with *haber*.

**2. Making the participle agree.** In compound tenses, the participle freezes at *-o*. The agreement instinct from adjectives is wrong here.

**3. Forgetting the irregular participles.** *He hacido* or *He decido* — both fatal. It's *hecho* and *dicho*.

**4. Separating *haber* and the participle.** Pronouns and adverbs go BEFORE *haber*, not between: *Nunca lo he visto*, not *He nunca lo visto*.

**5. Overusing it in Latin American contexts.** If your target is Mexican or South American Spanish, the simple preterite often sounds more natural: *Hoy comí pizza* over *Hoy he comido pizza*.

**6. Confusing *ha* with *a*.** Both sound identical. *Ha llegado* (he's arrived) vs *a llegar* (to arrive) — context tells you which.
"""
        ),
        GrammarNote(
            id: "future-perfect-tense",
            title: "Future Perfect",
            category: "Verb Tenses",
            body: """
The future perfect (*futuro perfecto*) describes what **will have happened** by some point in the future. It also has a second, very common life as a tool for speculation about the recent past — what English handles with "must have…" or "probably has…".

**Formula:** *haber* (future) + past participle.

| Pronoun | *haber* |
|---|---|
| yo | habré |
| tú | habrás |
| él / ella / Ud. | habrá |
| nosotros | habremos |
| vosotros | habréis |
| ellos / Uds. | habrán |

The past participle follows the same rules as in any compound tense — *-ado / -ido* for regulars, plus the 14 irregulars: *abierto, cubierto, dicho, escrito, hecho, muerto, puesto, resuelto, roto, satisfecho, visto, vuelto, descubierto, devuelto* (and compounds like *descrito, compuesto, deshecho*).

**Use 1 — Completion before a future reference point.**

By X future time, the action will be finished. English: "will have done."

*Para las ocho, habré terminado el trabajo.* — By eight, I will have finished the work.
*Cuando lleguen, ya habremos cenado.* — By the time they arrive, we'll have already eaten.
*En un año, habrás aprendido mucho español.* — In a year, you'll have learned a lot of Spanish.
*Para diciembre, habremos pagado la hipoteca.* — By December, we'll have paid off the mortgage.

**Use 2 — Conjecture / probability about the recent past.**

Just as the simple future is used for guesses about the present (*Serán las cinco* — it must be around five), the future perfect makes guesses about something that has probably already happened. English equivalents: "must have…", "probably (has)…", "I guess (he) has…".

*Habrá olvidado la cita.* — He must have forgotten the appointment.
*Se habrán ido ya.* — They must have left already.
*¿Habrás dejado las llaves en casa?* — Could you have left the keys at home?
*No contesta — habrá perdido el móvil.* — She's not answering — she's probably lost her phone.

This conjecture use is heard constantly in everyday speech, especially in Spain. It's often more common than the textbook "completed before X" use.

**Trigger words and phrases for Use 1:** *para + future time* (*para mañana, para las nueve*), *cuando + subjunctive*, *antes de que + subjunctive*, *para cuando + subjunctive*, *ya* (already), *en + time period* (*en dos años*).

**The subjunctive partner.** Time clauses with *cuando, antes de que, para cuando, en cuanto, tan pronto como* take the subjunctive when the main clause is in the future or future perfect. Main clause carries the future perfect; time clause carries present subjunctive.

*Cuando **vengas**, ya **habré salido**.* — When you come, I'll already have left.
*Antes de que **amanezca**, **habrán terminado**.* — Before dawn breaks, they'll have finished.

**Contrast with simple future.** Choose by completion:

*Mañana **trabajaré**.* — Tomorrow I'll work. (action ongoing or starting then)
*Para mañana **habré trabajado** ocho horas.* — By tomorrow I'll have worked eight hours. (action completed by then)

Same contrast for conjecture: *Serán las cinco* (it must be five o'clock — guess about now) vs *Habrán dado las cinco* (five must have struck — guess about a recent past event).

**Mnemonic — "future haber + done."** Build it like the present perfect, but bump *haber* into the future: *he comido* (I have eaten) → *habré comido* (I will have eaten / I must have eaten).

Both uses spring from the same insight: *habré comido* literally means "I will be in the state of having eaten." Whether that future-state is real (Use 1) or speculative (Use 2) depends on context.

**The two halves stay together.** Like all compound tenses, nothing wedges between *haber* and the participle. Pronouns climb in front: *Lo habré visto* — *Habré lo visto* is wrong. Adverbs and negations sit before *haber*: *No habrá llegado*, *Ya habremos comido*.

**Common pitfalls:**

**1. Mistaking it for simple future.** *Habré comido* ≠ *Comeré*. The first means "I'll have eaten / I must have eaten"; the second is plain "I'll eat."

**2. Forgetting the subjunctive in time clauses.** *Cuando habré llegado* is wrong — *cuando* in a future context requires the subjunctive: *cuando llegue, ya habré comido*.

**3. Using *tener* instead of *haber*.** *Tendré comido* is not a thing.

**4. Inflecting the participle.** It stays *-o* always in compound tenses. *Las cartas las habré escrito* — never *escritas*.

**5. Missing the conjecture use.** Many learners only know Use 1 and panic when a native says *Habrá llegado ya* about something happening right now. They're guessing, not predicting the future.

**6. Overusing it for distant futures.** For long-range predictions where the completion point isn't anchored, simple future is more natural: *En el futuro, los coches volarán* — not *habrán volado*.
"""
        ),
    ]

    /// Combined list used by the UI: 24 hand-authored notes + generated ones.
    static let allNotesIncludingGenerated: [GrammarNote] = allNotes + generatedNotes

    // MARK: - END generated notes

}
