/* Blog — list page + article page */

const ARTICLES = [
  {
    slug: "ivf-spain-vs-usa-comparison",
    cover: "https://images.unsplash.com/photo-1554224155-6726b3ff858f?w=900&q=80&auto=format&fit=crop",
    title: "IVF in Spain vs. the USA: A Full Cost and Quality Comparison (2026)",
    excerpt: "A single US cycle can exceed $35,000 out-of-pocket. Spain's top clinics charge a fraction of that — without trading clinical quality. Here's the full breakdown.",
    date: "April 2026",
    readTime: "9 min read",
    tag: "Cost & Quality",
    content: `# IVF in Spain vs. the USA: A Full Cost and Quality Comparison (2026)

When American patients receive their first quote for in vitro fertilization (IVF) at a domestic clinic, the initial reaction is often shock. A single cycle, excluding medications, can range from $15,000 to $25,000. For patients requiring donor eggs, the cost frequently exceeds $30,000. Faced with these numbers, and often lacking comprehensive insurance coverage, a growing number of Americans are looking abroad.

Spain has established itself as the premier destination for cross-border fertility care. But how does it truly compare to the United States? This guide breaks down the differences in cost, clinical quality, regulatory oversight, and the overall patient experience.

## The Cost Comparison: Standard IVF (Own Eggs)

| Expense | United States | Spain |
|:---|:---|:---|
| IVF Cycle (Retrieval, ICSI, Transfer) | $15,000 – $25,000 | €5,000 – €7,000 |
| Medications | $4,000 – $8,000 | €1,000 – €2,000 |
| Pre-Cycle Testing | $1,000 – $2,500 | €500 – €1,000 |
| Travel & Accommodation (10–14 days) | N/A | $2,500 – $5,000 |
| **Total Estimated** | **$20,000 – $35,500** | **$9,500 – $15,500** |

Even when factoring in transatlantic flights and a two-week stay in a major Spanish city, the total cost of a cycle in Spain is frequently half that of a US cycle.

## The Cost Comparison: Donor Egg IVF

The financial gap widens significantly when donor eggs are required.

| Expense | United States | Spain |
|:---|:---|:---|
| Donor Egg Cycle (All-Inclusive) | $30,000 – $45,000 | €6,000 – €11,000 |
| Donor Compensation & Agency Fees | $10,000 – $20,000 | Included |
| Medications (Recipient) | $1,000 – $3,000 | €500 – €1,000 |
| Travel & Accommodation | N/A | $2,500 – $5,000 |
| **Total Estimated** | **$41,000 – $68,000** | **$9,500 – $17,500** |

In the US, the commercialization of egg donation—where donors are often compensated based on their physical traits or educational background—drives costs exponentially higher. In Spain, Law 14/2006 mandates anonymity and regulates donor compensation, creating a stable, affordable, and highly accessible donor pool.

## Clinical Quality and Technology

A common misconception is that lower costs equate to lower clinical standards. In the case of Spanish fertility care, this is demonstrably false.

Top-tier Spanish clinics utilize the same advanced laboratory equipment, incubators (like the EmbryoScope), and genetic testing protocols (PGT-A) as elite US clinics. Because Spanish clinics handle a higher volume of complex international cases, their laboratories are often exceptionally well-resourced. Data from the Spanish Fertility Society (SEF) consistently demonstrates success rates that meet or exceed European and US averages—particularly in donor egg cycles where Spain's large, young donor pool provides a significant clinical advantage.

## Regulatory Oversight: Fragmented vs. Protected

The regulatory environments in the US and Spain present a stark contrast.

**The US system** is largely self-regulated. While clinics report data to the CDC or SART, there is no centralized, federal oversight governing laboratory practices or the commercial aspects of donor compensation.

**Spain operates under Law 14/2006**, one of the most comprehensive assisted reproduction laws in the world. Key protections include:

- **Strict anonymity** for egg and sperm donors, protecting the privacy of all parties
- **Inclusivity** — the law explicitly guarantees access for single women and same-sex female couples
- **National registry** of donors and treatments to ensure traceability
- **Mandatory quality control** — clinics are subject to rigorous, regular inspections

## The Patient Experience

Perhaps the most profound difference reported by American patients is the shift in clinical culture. In the US, the high cost of care often creates a transactional environment. Patients frequently report feeling like "a number," struggling to secure time with their primary physician.

Spanish clinics catering to international patients emphasize a more patient-centered approach. The lower financial pressure allows the medical team to focus on the clinical outcome. Patients receive dedicated support from international coordinators who manage their schedule, translation needs, and logistics.

## Making the Choice

If you have comprehensive insurance that fully funds a US cycle, staying local may be the most convenient option. But if you are paying out-of-pocket, require donor eggs, or are seeking a more regulated and personalized clinical environment, Spain offers a compelling alternative.`
  },
  {
    slug: "how-to-evaluate-fertility-marketplace",
    cover: "https://images.unsplash.com/photo-1573497019418-b400bb3ab074?w=900&q=80&auto=format&fit=crop",
    title: "How to Evaluate a Fertility Tourism Marketplace (And Why Most Are Pay-to-Play)",
    excerpt: "Most fertility marketplaces operate as lead brokers — selling your inquiry to the highest-bidding clinic, not the best clinical fit. Here's how to tell the difference.",
    date: "April 2026",
    readTime: "7 min read",
    tag: "How to Choose",
    content: `# How to Evaluate a Fertility Tourism Marketplace (And Why Most Are Pay-to-Play)

When American patients begin researching IVF abroad, they quickly discover a fragmented and overwhelming landscape. A simple Google search for "best IVF clinics in Spain" yields dozens of websites, many of which appear to be helpful directories or "matching services." However, beneath the surface, the medical tourism industry is heavily influenced by aggregator platforms that operate on a pay-to-play model.

For patients seeking unbiased clinical recommendations, understanding how these marketplaces function — and how they generate revenue — is critical to making an informed decision.

## The Rise of the Medical Tourism Aggregator

Platforms like Bookimed, PlacidWay, and Qunomedical have built massive online directories covering everything from dental implants in Turkey to IVF in Spain. These sites capture high-intent search traffic and convert it into patient inquiries. The problem arises not from the concept of a directory, but from the underlying business model that dictates which clinics are recommended.

## How the Pay-to-Play Model Corrupts the "Match"

Most major medical tourism aggregators operate as lead-generation brokers. When a patient submits an inquiry, the platform's primary goal is to monetize that lead as efficiently as possible.

**Premium Placement and Auction Pricing**

The clinics that appear at the top of results or are most frequently recommended are rarely there because they have the highest success rates. They are there because they paid for premium placement. Aggregators frequently charge clinics a higher commission rate or flat monthly fee to be featured prominently. The patient's "best match" is often simply the highest bidder.

**Lead Resale and the "Blast" Effect**

When a patient submits her contact information to an aggregator, she expects to hear from one or two carefully selected clinics. In reality, the aggregator often sells that single inquiry to four or five different clinics simultaneously. The patient's inbox is immediately flooded with sales emails from multiple clinics — none of which have reviewed her medical history.

## The Consequences for the Patient

The pay-to-play model has real consequences in a field as complex and emotionally charged as fertility treatment:

- **Clinical Mismatch:** A clinic that pays top dollar for leads may not specialize in the patient's specific needs. A 41-year-old with low AMH requires a very different approach than a 34-year-old seeking donor egg IVF.
- **Information Overload:** Being bombarded by multiple clinics simultaneously increases anxiety and decision fatigue.
- **Erosion of Trust:** When patients realize their "match" was financially motivated, trust in the entire process is severely damaged.

## How to Identify an Unbiased Marketplace

When evaluating a fertility tourism marketplace, look for these three hallmarks of an unbiased platform:

**1. A Standard Commission Structure**

The single most important question: "Do you make the same commission regardless of which clinic I choose?" An unbiased platform charges every clinic the exact same rate per started cycle. If the platform earns 10% whether you choose Clinic A in Madrid or Clinic B in Valencia, the financial incentive to push you toward a specific clinic is eliminated.

**2. Transparent Vetting Criteria**

A trustworthy marketplace publishes its vetting criteria openly. Look for platforms that require high annual cycle volume, transparent success rate reporting, a dedicated international patient department with fluent English speakers, and strict adherence to Law 14/2006.

**3. Clinical-Fit Matching, Not Lead Brokering**

A genuine matching service asks detailed questions about your medical history before making a recommendation — your age, AMH levels, prior cycle outcomes, donor preferences, and budget. If a platform asks only for your name, email, and desired destination, they are brokering your lead, not matching your clinical profile.

## The Conceive Iberia Difference

Conceive Iberia was built specifically to solve the aggregator problem. The platform operates on a strict standard-commission model across its entire vetted network. When a patient completes the 5-minute matching quiz, the algorithm evaluates her specific medical profile and returns 2–3 clinic recommendations. The rationale for each recommendation is clearly explained, and the patient's contact information is never sold or blasted to multiple clinics.

By removing the pay-to-play distortion, Conceive Iberia ensures that the recommendation is genuinely a recommendation.`
  },
  {
    slug: "complete-guide-ivf-spain-american-patients",
    cover: "https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=900&q=80&auto=format&fit=crop",
    title: "The Complete Guide to IVF in Spain for American Patients (2026 Edition)",
    excerpt: "Spain performs 120,000+ fertility cycles per year. Up to 70% of patients at major clinics are international. Here's everything an American patient needs to know before booking.",
    date: "April 2026",
    readTime: "10 min read",
    tag: "Getting Started",
    content: `# The Complete Guide to IVF in Spain for American Patients (2026 Edition)

If you are an American patient considering IVF abroad, you are likely navigating a complex web of costs, clinical outcomes, and logistical hurdles. In the United States, a single IVF cycle can cost between $15,000 and $25,000, often with limited insurance coverage. Spain has emerged as the leading European destination for fertility care, offering world-class clinical standards, robust legal protections, and cycle costs that are frequently half of what you would pay at home.

## Why Spain is the Top Choice for American Patients

Spain performs the highest number of fertility procedures in Europe — approximately 120,000 cycles annually. Major Spanish clinics report that up to 70% of their patients travel internationally for care. The appeal of Spain is not merely financial; it is rooted in clinical excellence, progressive legislation, and a patient-centered approach to care.

**Clinical Excellence and Technology**

Spanish fertility clinics operate with the same, and often newer, laboratory equipment and protocols as top-tier US clinics. The medical teams are highly specialized and accustomed to treating complex cases, including patients with low AMH, recurrent implantation failure, or advanced maternal age. Unlike the US system, where patients often feel like numbers in a high-volume machine, Spanish clinics frequently emphasize a more personalized, measured approach.

**The Legal Framework: Law 14/2006**

Spain's assisted reproduction sector is governed by Law 14/2006, which provides a clear, progressive, and highly regulated environment. Key aspects include:

- **Anonymous Donation:** Egg and sperm donation is strictly anonymous by law, ensuring a large, diverse donor pool
- **Inclusivity:** The law explicitly permits fertility treatments for single women and same-sex female couples (including ROPA/reciprocal IVF)
- **Safety and Oversight:** Clinics must adhere to stringent national standards for laboratory quality, donor screening, and patient safety

## Understanding the Costs: Spain vs. the US

| Expense | United States | Spain |
|:---|:---|:---|
| Standard IVF Cycle (Own Eggs) | $15,000 – $25,000 | €5,000 – €7,000 |
| Donor Egg IVF Cycle | $25,000 – $40,000 | €6,000 – €11,000 |
| Medications | $4,000 – $8,000 | €1,000 – €2,000 |
| Travel & Accommodation | N/A | $2,500 – $5,000 |

Even when factoring in the cost of transatlantic flights and a two-week stay in cities like Madrid, Barcelona, or Valencia, the total expenditure for an American patient in Spain is typically $10,000 to $15,000 less than a comparable cycle in the US.

## Navigating the Logistics of Cross-Border Care

**The Timeline and Travel Requirements**

A typical IVF cycle in Spain requires a stay of 10 to 14 days. The process follows this timeline:

1. **Initial Consultation:** Conducted via video call from the US
2. **Ovarian Stimulation:** You begin stimulation medications at home, monitored through a local US clinic; results are sent to your Spanish team
3. **Travel to Spain:** You fly a few days before your scheduled egg retrieval
4. **Egg Retrieval and Fertilization:** Performed at the Spanish clinic
5. **Embryo Transfer:** Typically 3–5 days after retrieval
6. **Return Home:** You can safely fly back 1–2 days after transfer

**Overcoming the Language Barrier**

The leading Spanish fertility clinics maintain dedicated international departments. All medical consultations, documentation, and communications are conducted in fluent English.

**Finding the Right Clinic**

The most significant challenge for American patients is selecting the right clinic from afar. Aggregator websites often sell patient inquiries to the highest bidder, resulting in biased recommendations. To ensure a clinical match based on your specific medical profile — age, AMH, donor requirements — rather than a clinic's marketing budget, use a curated matching service that earns the same commission from every clinic in its network.

## Post-Cycle Care

If the cycle is successful, your Spanish clinic will provide telemedicine follow-ups during the early stages of pregnancy and coordinate directly with your US OB-GYN for a seamless transition of care.

If you have remaining frozen embryos, they can be safely stored at the Spanish clinic or transported back to a US clinic via specialized medical courier services.`
  },
  {
    slug: "complete-guide-donor-egg-ivf-spain",
    cover: "https://images.unsplash.com/photo-1576091160550-2173dba999ef?w=900&q=80&auto=format&fit=crop",
    title: "The Complete Guide to Donor Egg IVF in Spain (2026 Edition)",
    excerpt: "Spain has the largest egg donor pool in Europe, no waitlists, and all-inclusive pricing that's a fraction of US costs. What American patients need to know before choosing donor IVF.",
    date: "April 2026",
    readTime: "8 min read",
    tag: "Donor Egg IVF",
    content: `# The Complete Guide to Donor Egg IVF in Spain (2026 Edition)

For patients navigating the complexities of fertility treatments, the decision to pursue IVF using donor eggs is often a turning point. In the United States, this path is frequently fraught with prohibitive costs, long waitlists for donor matching, and a fragmented regulatory landscape. Spain has emerged as the premier global destination for donor egg IVF, offering a compelling alternative that combines clinical excellence, a robust legal framework, and significant cost savings.

## Why Spain is the Global Leader in Donor Egg IVF

Spain's dominance in the field of donor egg IVF is not accidental. It is the result of decades of progressive legislation and a cultural acceptance of assisted reproduction. The appeal of Spain rests on three foundational pillars: strict legal anonymity, a large and diverse donor pool, and a commitment to clinical transparency.

**The Legal Foundation: Law 14/2006 and Anonymity**

The cornerstone of Spain's fertility success is Law 14/2006, which comprehensively regulates assisted reproduction. A defining feature of this law is the mandate of absolute anonymity for both egg and sperm donors. Unlike the US, where "known" or "open identity" donation is common and can lead to complex legal scenarios later in life, Spanish law strictly prohibits the disclosure of a donor's identity. This anonymity significantly encourages donation, resulting in a large, readily available pool of donors.

**The Spanish Egg Donor Pool: Diversity and Availability**

The guarantee of anonymity, coupled with a culture of altruism and regulated compensation, has created the largest egg donor pool in Europe. For American patients, this means two crucial advantages:

- **No Waitlists:** In the US, finding a suitable egg donor can take months. In Spain, the matching process is typically completed within weeks.
- **Phenotypic Matching:** Spanish clinics have access to donors from diverse ethnic and phenotypic backgrounds, ensuring the donor closely resembles the recipient's physical characteristics — height, build, eye color, hair color, and blood type.

## The Donor Matching Process in Spain

**Comprehensive Donor Screening**

Before a woman can become an egg donor in Spain, she must undergo extensive screening:

- **Psychological Evaluation:** A thorough assessment to ensure the donor understands the implications of donation
- **Medical History and Physical Exam:** A complete review to rule out hereditary conditions
- **Genetic Carrier Screening:** Extensive testing for recessive genetic diseases (Cystic Fibrosis, Spinal Muscular Atrophy, and more)
- **Infectious Disease Testing:** Screening for HIV, Hepatitis B and C, Syphilis, and others

**The Matching Algorithm**

Once a donor is approved, the clinic's medical team uses a sophisticated matching algorithm to pair her with a recipient. This process is not a catalog selection, as is common in the US. Instead, specialists select the donor based on the recipient's phenotypic traits and immunological compatibility — ensuring the resulting child will closely resemble the recipient family, while maintaining the strict anonymity required by Spanish law.

## The Cost Advantage

The financial disparity between donor egg IVF in the US and Spain is stark.

| Expense | United States | Spain |
|:---|:---|:---|
| Donor Egg Cycle (All-Inclusive) | $30,000 – $45,000 | €6,000 – €11,000 |
| Donor Compensation / Agency Fees | $10,000 – $20,000 | Included |
| Medications (Recipient) | $1,000 – $3,000 | €500 – €1,000 |
| Travel & Accommodation | N/A | $2,500 – $5,000 |

Even when factoring in flights and a two-week stay, the total cost for an American patient is typically half of what they would pay domestically. Furthermore, many Spanish clinics offer guarantee programs — multiple cycles or a refund if a live birth is not achieved — offering financial peace of mind that is rare in the US market.

## The Role of a Concierge

While the clinical and financial benefits are clear, the logistics of coordinating care across borders can be overwhelming. Selecting the right clinic from a distance, understanding success rate methodologies, and managing travel arrangements require significant effort.

This is where a specialized matching and concierge service like Conceive Iberia becomes invaluable. Unlike aggregator websites that sell patient inquiries to multiple clinics, a curated service provides unbiased, clinical-fit matching. An optional White-Glove concierge service can further streamline the process, managing airport transfers, accommodation, and providing a dedicated coordinator — allowing you to focus entirely on your treatment.`
  },
  {
    slug: "day-by-day-ivf-cycle-spain",
    cover: "https://images.unsplash.com/photo-1436491865332-7a61a109cc05?w=900&q=80&auto=format&fit=crop",
    title: "The Day-by-Day IVF Cycle in Spain: A Real Patient Walkthrough",
    excerpt: "What actually happens from the moment you land to the day you fly home. A realistic, day-by-day walkthrough of a typical IVF cycle at a Spanish clinic.",
    date: "April 2026",
    readTime: "8 min read",
    tag: "The Journey",
    content: `# The Day-by-Day IVF Cycle in Spain: A Real Patient Walkthrough

When you decide to travel from the United States to Spain for IVF, the most common question is not about the medical science, but about the logistics: "What exactly happens when I get there?"

The fear of navigating a foreign healthcare system, managing a complex medication protocol across time zones, and dealing with the unpredictability of biology can feel overwhelming. However, the reality of a Spanish IVF cycle is highly structured. Clinics that cater to international patients have refined this process into a predictable, day-by-day sequence.

## Pre-Trip Preparation: The Hybrid Cycle

You do not spend the entire IVF cycle in Spain. Most international patients utilize a "hybrid" cycle model.

- **The First Consultation:** This happens via video call weeks or months before you travel. You will meet your Spanish doctor, review your medical records, and establish a treatment plan.
- **Ovarian Stimulation (At Home):** You will begin daily injections at home, purchasing your stimulation medications in the US or having them shipped internationally (often cheaper).
- **Local Monitoring:** You will visit a local US clinic for blood tests and ultrasounds. These results are sent same-day to your Spanish clinic, which adjusts your medication dosage accordingly.

You only fly to Spain when your follicles are approaching the optimal size for retrieval.

## The 10–14 Day Itinerary in Spain

### Day 1: Arrival and Acclimation

You arrive in your destination city — Madrid, Barcelona, Valencia, or Alicante. The primary goal is to check into your accommodation, combat jet lag, and locate the clinic. If you are using a concierge service, your airport transfer and accommodation will be pre-arranged, and your coordinator will confirm your arrival.

### Day 2: The Final Monitoring Appointment

Your first in-person appointment at the Spanish clinic includes:
- A comprehensive transvaginal ultrasound to measure the final size of your follicles
- Bloodwork to confirm hormone levels
- Instructions for the "trigger shot" (hCG or Lupron), which induces final egg maturation

### Day 3: The Trigger Shot and Rest

This is typically a rest day. The most critical event is administering the trigger shot at the exact time specified by your doctor — usually 36 hours before the scheduled retrieval. Precision is vital.

### Day 4: Egg Retrieval

This is the most medically intensive day of the trip.

- **The Procedure:** The egg retrieval is a minor surgical procedure performed under deep sedation. It takes about 15–30 minutes. You will not feel any pain during the procedure.
- **Recovery:** You will rest in a recovery room for 1–2 hours until the sedation wears off. You may experience mild cramping, similar to a menstrual period.
- **The Update:** Before you leave the clinic, the embryologist will inform you how many eggs were successfully retrieved.

### Day 5: The Fertilization Report

You will receive a call or message from the clinic's embryology lab detailing how many of the retrieved eggs were mature and how many successfully fertilized overnight.

### Days 6–8: Embryo Development

These days are a waiting game as your embryos develop in the lab's incubators (often monitored continuously by time-lapse technology like the EmbryoScope). The clinic will provide daily updates on their progress toward the blastocyst stage.

During this time, you are free to explore Spain. Many patients find this period less stressful than the stimulation phase, as the daily medical interventions are paused.

### Day 9: The Embryo Transfer

The embryo transfer is a simple, painless procedure that does not require sedation — it feels similar to a Pap smear. Using ultrasound guidance, the doctor places the best-quality embryo into your uterus via a thin catheter. Bed rest is no longer recommended; light, normal activity is encouraged.

*Note: If you are doing Preimplantation Genetic Testing (PGT-A), all embryos will be biopsied and frozen on Day 5/6. You will fly home, wait for the genetic results, and return for a Frozen Embryo Transfer (FET) a month or two later.*

### Day 10–11: Rest and Departure

You are medically cleared to fly back to the United States. The pressurized cabin of a commercial airliner does not negatively affect the embryo or implantation rates.

## Post-Trip: The True "Two-Week Wait"

The hardest part of the cycle often begins when you land back in the US.

- **The Pregnancy Test:** Approximately 10–14 days after the embryo transfer, you will take a blood test (Beta hCG) at a local US lab to determine if you are pregnant.
- **Ongoing Support:** Your Spanish clinic will coordinate with you via telemedicine. If positive, they will manage your early pregnancy protocol until you transition to your local OB-GYN at around 8–10 weeks of gestation.

A Spanish IVF cycle is a highly choreographed medical journey. By utilizing the hybrid model — handling the early monitoring in the US and traveling to Spain only for the critical procedures — patients minimize their time away from home while maximizing the clinical and financial benefits of European fertility care.`
  }
];

/* Render markdown-ish content: supports headers, bold, tables, lists, paragraphs */
const MarkdownRenderer = ({ content }) => {
  const lines = content.split('\n');
  const elements = [];
  let i = 0;
  let keyCounter = 0;
  const key = (prefix) => `${prefix}-${keyCounter++}`;

  while (i < lines.length) {
    const line = lines[i];

    // Skip empty lines between blocks
    if (line.trim() === '') { i++; continue; }

    // H1
    if (line.startsWith('# ')) {
      elements.push(
        <h1 key={key('h1')} className="font-serif text-[42px] md:text-[58px] leading-[0.95] tracking-displaytight text-ink mb-6">
          {line.slice(2)}
        </h1>
      );
      i++; continue;
    }

    // H2
    if (line.startsWith('## ')) {
      elements.push(
        <h2 key={key('h2')} className="font-serif text-[26px] md:text-[32px] tracking-display leading-tight text-ink mt-12 mb-4">
          {line.slice(3)}
        </h2>
      );
      i++; continue;
    }

    // H3
    if (line.startsWith('### ')) {
      elements.push(
        <h3 key={key('h3')} className="font-serif text-[20px] md:text-[24px] tracking-display leading-tight text-ink mt-8 mb-3">
          {line.slice(4)}
        </h3>
      );
      i++; continue;
    }

    // Bold standalone line (used as sub-section labels)
    if (line.startsWith('**') && line.endsWith('**') && line.length > 4) {
      elements.push(
        <p key={key('bold')} className="font-semibold text-[16px] text-ink mt-6 mb-2">
          {line.slice(2, -2)}
        </p>
      );
      i++; continue;
    }

    // Table
    if (line.includes('|') && line.trim().startsWith('|')) {
      const tableLines = [];
      while (i < lines.length && lines[i].includes('|')) {
        tableLines.push(lines[i]);
        i++;
      }
      const headerCells = tableLines[0].split('|').filter(c => c.trim() !== '');
      const bodyRows = tableLines.slice(2).map(r => r.split('|').filter(c => c.trim() !== ''));
      elements.push(
        <div key={key('table')} className="my-8 overflow-x-auto rounded-xl border border-sand">
          <table className="w-full text-[14px]">
            <thead>
              <tr className="bg-cream">
                {headerCells.map((c, ci) => (
                  <th key={ci} className="text-left px-4 py-3 font-semibold text-ink border-b border-sand first:rounded-tl-xl last:rounded-tr-xl">
                    {c.trim().replace(/\*\*/g, '')}
                  </th>
                ))}
              </tr>
            </thead>
            <tbody>
              {bodyRows.map((row, ri) => (
                <tr key={ri} className={ri % 2 === 0 ? 'bg-bone' : 'bg-cream/50'}>
                  {row.map((cell, ci) => (
                    <td key={ci} className="px-4 py-3 text-inksoft border-b border-sand/60 last:border-0">
                      {cell.trim().replace(/\*\*/g, '')}
                    </td>
                  ))}
                </tr>
              ))}
            </tbody>
          </table>
        </div>
      );
      continue;
    }

    // Unordered list
    if (line.startsWith('- ')) {
      const items = [];
      while (i < lines.length && lines[i].startsWith('- ')) {
        items.push(lines[i].slice(2));
        i++;
      }
      elements.push(
        <ul key={key('ul')} className="my-4 space-y-2 pl-0">
          {items.map((item, idx) => {
            const parts = item.split(/\*\*(.*?)\*\*/g);
            return (
              <li key={idx} className="flex gap-3 text-[15.5px] text-inksoft leading-relaxed">
                <span className="mt-2 flex-shrink-0 w-1.5 h-1.5 rounded-full bg-teal" />
                <span>{parts.map((p, pi) => pi % 2 === 1 ? <strong key={pi} className="text-ink font-semibold">{p}</strong> : p)}</span>
              </li>
            );
          })}
        </ul>
      );
      continue;
    }

    // Numbered list
    if (/^\d+\. /.test(line)) {
      const items = [];
      while (i < lines.length && /^\d+\. /.test(lines[i])) {
        items.push(lines[i].replace(/^\d+\. /, ''));
        i++;
      }
      elements.push(
        <ol key={key('ol')} className="my-4 space-y-2 pl-0">
          {items.map((item, idx) => {
            const parts = item.split(/\*\*(.*?)\*\*/g);
            return (
              <li key={idx} className="flex gap-4 text-[15.5px] text-inksoft leading-relaxed">
                <span className="flex-shrink-0 w-6 h-6 mt-0.5 rounded-full bg-teal/10 text-teal text-[12px] font-mono font-semibold flex items-center justify-center">
                  {idx + 1}
                </span>
                <span>{parts.map((p, pi) => pi % 2 === 1 ? <strong key={pi} className="text-ink font-semibold">{p}</strong> : p)}</span>
              </li>
            );
          })}
        </ol>
      );
      continue;
    }

    // Regular paragraph
    const parts = line.split(/\*\*(.*?)\*\*/g);
    elements.push(
      <p key={key('p')} className="text-[16px] leading-[1.75] text-inksoft my-3">
        {parts.map((p, pi) => pi % 2 === 1 ? <strong key={pi} className="text-ink font-semibold">{p}</strong> : p)}
      </p>
    );
    i++;
  }

  return <div>{elements}</div>;
};

/* Individual article page */
const ArticlePage = ({ slug }) => {
  const article = ARTICLES.find(a => a.slug === slug);
  if (!article) return (
    <PageShell>
      <div className="max-w-[720px] mx-auto px-6 py-20 text-center">
        <p className="text-inksoft">Article not found.</p>
        <a href="#/blog" className="text-teal underline mt-4 inline-block">Back to blog</a>
      </div>
    </PageShell>
  );

  const otherArticles = ARTICLES.filter(a => a.slug !== slug).slice(0, 3);

  return (
    <PageShell className="bg-bone">
      {/* Article header */}
      <section className="px-6 md:px-10 pt-10 pb-12 border-b border-sand">
        <div className="max-w-[760px] mx-auto">
          <a href="#/blog" className="inline-flex items-center gap-2 text-[13px] text-teal mb-8 hover:underline">
            <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
              <polyline points="15 18 9 12 15 6"/>
            </svg>
            All articles
          </a>
          <div className="flex items-center gap-3 mb-5">
            <span className="text-[11px] uppercase tracking-[0.2em] text-teal font-medium">{article.tag}</span>
            <span className="w-1 h-1 rounded-full bg-sand" />
            <span className="text-[13px] text-inksoft/60">{article.date}</span>
            <span className="w-1 h-1 rounded-full bg-sand" />
            <span className="text-[13px] text-inksoft/60">{article.readTime}</span>
          </div>
          <h1 className="font-serif text-[38px] md:text-[52px] leading-[1.0] tracking-display text-ink mb-6">
            {article.title}
          </h1>
          <p className="text-[17px] text-inksoft leading-relaxed max-w-[640px]">{article.excerpt}</p>
        </div>
      </section>

      {/* Article body */}
      <section className="px-6 md:px-10 py-14">
        <div className="max-w-[720px] mx-auto">
          <MarkdownRenderer content={article.content} />

          {/* CTA at bottom of article */}
          <div className="mt-16 p-7 md:p-9 rounded-2xl bg-teal text-bone">
            <Eyebrow dark>Ready to start?</Eyebrow>
            <h3 className="mt-3 font-serif text-[28px] md:text-[34px] tracking-display leading-tight">
              Find your matched clinic in 5 minutes. Free.
            </h3>
            <p className="mt-3 text-[15px] text-bone/75 max-w-lg leading-relaxed">
              Answer 12 questions about your medical profile. We return 2–3 vetted Spanish clinics that genuinely fit — with a written rationale for each.
            </p>
            <div className="mt-6">
              <Btn href="#/quiz" variant="coral">Take the matching quiz</Btn>
            </div>
          </div>
        </div>
      </section>

      {/* More articles */}
      {otherArticles.length > 0 && (
        <section className="px-6 md:px-10 pb-20 border-t border-sand pt-12">
          <div className="max-w-[1100px] mx-auto">
            <Eyebrow>More reading</Eyebrow>
            <h2 className="mt-3 font-serif text-[32px] tracking-display mb-8">More from the blog</h2>
            <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
              {otherArticles.map(a => (
                <a key={a.slug} href={`#/blog/${a.slug}`} className="group p-6 rounded-2xl border border-sand hover:border-teal/40 transition-colors bg-cream">
                  <span className="text-[11px] uppercase tracking-[0.2em] text-teal/80">{a.tag}</span>
                  <h3 className="mt-2 font-serif text-[19px] tracking-display leading-tight group-hover:text-teal transition-colors">{a.title}</h3>
                  <p className="mt-2 text-[13.5px] text-inksoft/70 leading-relaxed line-clamp-3">{a.excerpt}</p>
                  <div className="mt-4 text-[12px] text-inksoft/50">{a.readTime}</div>
                </a>
              ))}
            </div>
          </div>
        </section>
      )}
    </PageShell>
  );
};

/* Blog list page */
const BlogPage = () => {
  var featured = ARTICLES[0];
  var rest = ARTICLES.slice(1);

  return (
    React.createElement(PageShell, { className: "bg-bone" },

      React.createElement("section", { className: "px-6 md:px-10 pt-10 pb-12 border-b border-sand" },
        React.createElement("div", { className: "max-w-[1200px] mx-auto" },
          React.createElement(Eyebrow, null, "Resources"),
          React.createElement("h1", { className: "mt-4 font-serif text-[52px] md:text-[80px] leading-[0.92] tracking-displaytight" },
            "The ",
            React.createElement("span", { className: "italic font-normal text-teal" }, "honest"),
            " guide to IVF abroad."
          ),
          React.createElement("p", { className: "mt-5 text-[16.5px] text-inksoft max-w-2xl leading-relaxed" },
            "No aggregator marketing. No clinic sponsorships. Just the information American patients actually need to navigate Spanish fertility care."
          )
        )
      ),

      featured && React.createElement("section", { className: "px-6 md:px-10 pt-10 pb-6" },
        React.createElement("div", { className: "max-w-[1200px] mx-auto" },
          React.createElement("a", {
            href: "#/blog/" + featured.slug,
            className: "group grid grid-cols-12 gap-0 rounded-2xl border border-sand overflow-hidden hover:border-teal/40 transition-all bg-cream"
          },
            React.createElement("div", {
              className: "col-span-12 md:col-span-6",
              style: { background: "url(" + featured.cover + ") center/cover no-repeat", minHeight: "280px" }
            }),
            React.createElement("div", { className: "col-span-12 md:col-span-6 p-7 md:p-10 flex flex-col justify-center" },
              React.createElement("div", { className: "flex items-center gap-3 mb-4" },
                React.createElement("span", { className: "inline-flex items-center px-2.5 py-1 rounded-full bg-teal/10 text-teal text-[11px] uppercase tracking-[0.18em] font-medium" }, featured.tag),
                React.createElement("span", { className: "text-[12px] text-inksoft/50" }, featured.readTime)
              ),
              React.createElement("h2", { className: "font-serif text-[26px] md:text-[34px] tracking-display leading-tight group-hover:text-teal transition-colors" }, featured.title),
              React.createElement("p", { className: "mt-4 text-[15px] text-inksoft/70 leading-relaxed" }, featured.excerpt),
              React.createElement("div", { className: "mt-7 inline-flex items-center gap-2 text-teal text-[14px] font-medium" },
                "Read article ", React.createElement(IArrow, { size: 14, stroke: 2 })
              )
            )
          )
        )
      ),

      React.createElement("section", { className: "px-6 md:px-10 pb-10" },
        React.createElement("div", { className: "max-w-[1200px] mx-auto" },
          React.createElement("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5" },
            rest.map(function(a) {
              return React.createElement("a", {
                key: a.slug,
                href: "#/blog/" + a.slug,
                className: "group flex flex-col rounded-2xl border border-sand overflow-hidden hover:border-teal/40 transition-all bg-cream"
              },
                React.createElement("div", {
                  style: { background: "url(" + a.cover + ") center/cover no-repeat", height: "200px" }
                }),
                React.createElement("div", { className: "p-6 flex flex-col flex-1" },
                  React.createElement("div", { className: "flex items-center gap-2 mb-3" },
                    React.createElement("span", { className: "inline-flex items-center px-2.5 py-1 rounded-full bg-teal/10 text-teal text-[10.5px] uppercase tracking-[0.16em] font-medium" }, a.tag),
                    React.createElement("span", { className: "text-[11.5px] text-inksoft/45" }, a.readTime)
                  ),
                  React.createElement("h2", { className: "font-serif text-[20px] md:text-[22px] tracking-display leading-tight group-hover:text-teal transition-colors" }, a.title),
                  React.createElement("p", { className: "mt-2 text-[13.5px] text-inksoft/60 leading-relaxed" }, a.excerpt),
                  React.createElement("div", { className: "mt-5 inline-flex items-center gap-1.5 text-teal text-[13px] font-medium" },
                    "Read article ", React.createElement(IArrow, { size: 12, stroke: 2 })
                  )
                )
              );
            }),
            React.createElement("div", { className: "flex flex-col rounded-2xl border border-dashed border-sand overflow-hidden opacity-50" },
              React.createElement("div", { className: "bg-cream flex items-center justify-center", style: { height: "200px" } },
                React.createElement("span", { className: "font-serif italic text-inksoft/20", style: { fontSize: "48px" } }, "+")
              ),
              React.createElement("div", { className: "p-6" },
                React.createElement("p", { className: "text-[10.5px] uppercase tracking-[0.18em] text-inksoft/40 mb-2" }, "Coming soon"),
                React.createElement("p", { className: "font-serif text-[20px] tracking-display leading-tight text-inksoft/40" }, "More guides, clinic deep-dives, and patient stories."),
                React.createElement("div", { className: "mt-5" }, React.createElement(Btn, { href: "#/quiz", variant: "outline" }, "Take the quiz instead"))
              )
            )
          )
        )
      ),

      React.createElement("section", { className: "mx-6 md:mx-10 mb-20 mt-6" },
        React.createElement("div", { className: "max-w-[1200px] mx-auto px-8 py-10 md:p-12 rounded-2xl bg-ink text-bone" },
          React.createElement("div", { className: "flex flex-col md:flex-row md:items-center md:justify-between gap-6" },
            React.createElement("div", null,
              React.createElement(Eyebrow, { dark: true }, "Skip the research"),
              React.createElement("h2", { className: "mt-3 font-serif text-[28px] md:text-[36px] tracking-display leading-tight" }, "Ready to find your clinic?"),
              React.createElement("p", { className: "mt-2 text-[15px] text-bone/65 max-w-md leading-relaxed" }, "Take the 5-minute quiz. Get 2-3 vetted Spanish clinic recommendations matched to your medical profile.")
            ),
            React.createElement(Btn, { href: "#/quiz", variant: "coral" }, "Start matching")
          )
        )
      )
    )
  );
};

Object.assign(window, { BlogPage, ArticlePage, ARTICLES });
