/* ============ RESEARCH SECTION (landing page) ============ */

function ResearchSection() {
  const traits = [
  { trait: "Eye / hair color", h: "95–98%", ev: 5, study: "Visible Trait Genetics Consortium", link: "https://www.cell.com/ajhg/fulltext/S0002-9297(14)00516-2" },
  { trait: "Height", h: "~80%", ev: 5, study: "Yengo et al., Nature, 2022", link: "https://www.nature.com/articles/s41586-022-05275-y" },
  { trait: "Intelligence (adult)", h: "50–80%", ev: 5, study: "Plomin & Deary, Mol. Psychiatry, 2015", link: "https://www.nature.com/articles/mp201475" },
  { trait: "Autism spectrum", h: "~80%", ev: 5, study: "Sandin et al., JAMA, 2017", link: "https://jamanetwork.com/journals/jama/fullarticle/2654804" },
  { trait: "Type 1 diabetes", h: "~88%", ev: 5, study: "Hyttinen et al., Diabetes, 2003", link: "https://diabetesjournals.org/diabetes/article/52/4/1052/27001" },
  { trait: "ADHD", h: "~74%", ev: 5, study: "Faraone & Larsson, Mol. Psych., 2019", link: "https://www.nature.com/articles/s41380-018-0070-0" },
  { trait: "Personality (Big Five)", h: "40–60%", ev: 4, study: "Vukasović & Bratko, Psych. Bulletin, 2015", link: "https://psycnet.apa.org/record/2015-21379-001" },
  { trait: "Depression", h: "37–48%", ev: 4, study: "Sullivan et al., Am. J. Psych., 2000", link: "https://ajp.psychiatryonline.org/doi/10.1176/appi.ajp.157.10.1552" },
  { trait: "Heart disease", h: "40–60%", ev: 4, study: "Zdravkovic et al., J. Internal Med., 2002", link: "https://onlinelibrary.wiley.com/doi/10.1046/j.1365-2796.2002.01029.x" },
  { trait: "Alcohol use disorder", h: "50–60%", ev: 4, study: "Verhulst et al., Psych. Medicine, 2015", link: "https://www.cambridge.org/core/journals/psychological-medicine/article/abs/heritability-of-alcohol-use-disorder/" },
  { trait: "Subjective well-being", h: "33–50%", ev: 3, study: "Bartels, Behavior Genetics, 2015", link: "https://link.springer.com/article/10.1007/s10519-015-9713-y" },
  { trait: "Longevity", h: "25–30%", ev: 3, study: "Ruby et al., Genetics, 2018", link: "https://academic.oup.com/genetics/article/210/3/1109/5931017" }];


  return (
    <section className="research-section">
      <div className="research-head">
        <h2 className="sci-headline" style={{ marginTop: 0, maxWidth: 800, textAlign: "center", fontSize: "clamp(28px, 3vw, 40px)" }}>
          What the science <em>actually</em> says.
        </h2>
        <p className="sci-body" style={{ fontSize: 17, maxWidth: 620, margin: "36px auto 0", textAlign: "center" }}>Below is the foundation we point women to when they ask why donor selection matters.
Every claim links to peer-reviewed work.
        </p>
      </div>

      <div className="research-callout">
        <div className="research-callout-label">The one-liner</div>
        <blockquote>
          "A meta-analysis of 2,748 twin studies covering 14.5 million twins found that genes account for roughly half of all human trait variation — and for many traits parents care about most, it's significantly higher."
        </blockquote>
        <a className="research-cite-link" href="https://www.nature.com/articles/ng.3285" target="_blank" rel="noopener noreferrer">
          Polderman et al. · Nature Genetics, 2015 ↗
        </a>
      </div>

      <div className="research-table-wrap">
        <table className="donor-table research-table">
          <thead>
            <tr>
              <th>Trait</th>
              <th>Heritability</th>
              <th>Evidence</th>
              <th>Key study</th>
            </tr>
          </thead>
          <tbody>
            {traits.map((r, i) =>
            <tr key={i} className="row">
                <td>{r.trait}</td>
                <td><span className="chip-iq">{r.h}</span></td>
                <td>
                  <span className="ev-grid" title={`${r.ev} of 5`}>
                    {Array.from({ length: 5 }).map((_, i) => (
                      <span key={i} className={`ev-block ${i < r.ev ? "filled" : ""}`} />
                    ))}
                  </span>
                </td>
                <td>
                  <a href={r.link} target="_blank" rel="noopener noreferrer" className="research-link">
                    {r.study} <span style={{ opacity: 0.5 }}>↗</span>
                  </a>
                </td>
              </tr>
            )}
          </tbody>
        </table>
      </div>

      <div className="research-grid">
        <div className="research-card">
          <div className="research-card-num">2,748</div>
          <div className="research-card-label">Twin studies analyzed</div>
          <div className="research-card-meta">Polderman et al. mega-meta · 14.5M twin pairs · 17,804 traits</div>
          <a className="research-link small" href="https://www.nature.com/articles/ng.3285" target="_blank" rel="noopener noreferrer">Nature Genetics, 2015 ↗</a>
        </div>
        <div className="research-card">
          <div className="research-card-num">500K</div>
          <div className="research-card-label">UK Biobank participants</div>
          <div className="research-card-meta">Genetic + lifestyle + health records. Powers most modern GWAS.</div>
          <a className="research-link small" href="https://www.ukbiobank.ac.uk/" target="_blank" rel="noopener noreferrer">ukbiobank.ac.uk ↗</a>
        </div>
        <div className="research-card">
          <div className="research-card-num">1.1M</div>
          <div className="research-card-label">Educational attainment GWAS</div>
          <div className="research-card-meta">Polygenic score now explains ~12% of variance in years of schooling.</div>
          <a className="research-link small" href="https://www.nature.com/articles/s41588-018-0147-3" target="_blank" rel="noopener noreferrer">Lee et al., Nat. Gen., 2018 ↗</a>
        </div>
        <div className="research-card">
          <div className="research-card-num">6,000+</div>
          <div className="research-card-label">GWAS Catalog studies</div>
          <div className="research-card-meta">Linking specific variants to traits — the public scaffold underneath modern donor screening.</div>
          <a className="research-link small" href="https://www.ebi.ac.uk/gwas/" target="_blank" rel="noopener noreferrer">ebi.ac.uk/gwas ↗</a>
        </div>
      </div>

      <p className="research-footnote">
        Heritability ≠ destiny. These are population-level estimates; individual outcomes always involve environment, chance, and choice. We share the data so you can decide with your eyes open.
      </p>
    </section>);

}

window.ResearchSection = ResearchSection;