(function () {
  "use strict";

  var headerHTML =
    '<a class="skip-link" href="#main">Skip to main content</a>' +
    '<header class="site-header" id="site-header">' +
      '<div class="container header__inner">' +
        '<a href="index.html" class="brand" aria-label="Zentia Therapeutics — home">' +
          '<img src="assets/logo.svg" alt="" class="brand__mark" width="44" height="44">' +
          '<span class="brand__text">Zentia<span>therapeutics</span></span>' +
        '</a>' +
        '<nav class="nav" id="site-nav" aria-label="Primary">' +
          '<ul class="nav__list">' +
            '<li class="nav__item has-dropdown">' +
              '<button class="nav__link nav__toggle" type="button" aria-expanded="false" aria-haspopup="true">About<span class="nav__chevron" aria-hidden="true"></span></button>' +
              '<ul class="dropdown" aria-label="About submenu">' +
                '<li><a href="about.html">Our Story</a></li>' +
                '<li><a href="approach.html">Our Approach</a></li>' +
                '<li><a href="leadership.html">Leadership</a></li>' +
                '<li><a href="careers.html">Careers</a></li>' +
              '</ul>' +
            '</li>' +
            '<li class="nav__item has-dropdown">' +
              '<button class="nav__link nav__toggle" type="button" aria-expanded="false" aria-haspopup="true">Science<span class="nav__chevron" aria-hidden="true"></span></button>' +
              '<ul class="dropdown" aria-label="Science submenu">' +
                '<li><a href="approach.html">Science &amp; Discovery</a></li>' +
                '<li><a href="pipeline.html">Pipeline</a></li>' +
                '<li><a href="programs.html">Clinical Programs</a></li>' +
                '<li><a href="publications.html">Publications</a></li>' +
              '</ul>' +
            '</li>' +
            '<li class="nav__item"><a class="nav__link" href="pipeline.html">Pipeline</a></li>' +
            '<li class="nav__item has-dropdown">' +
              '<button class="nav__link nav__toggle" type="button" aria-expanded="false" aria-haspopup="true">Patients<span class="nav__chevron" aria-hidden="true"></span></button>' +
              '<ul class="dropdown" aria-label="Patients submenu">' +
                '<li><a href="therapy.html">About the Therapy</a></li>' +
                '<li><a href="trials.html">Clinical Trials</a></li>' +
                '<li><a href="faq.html">Patient FAQ</a></li>' +
              '</ul>' +
            '</li>' +
            '<li class="nav__item has-dropdown">' +
              '<button class="nav__link nav__toggle" type="button" aria-expanded="false" aria-haspopup="true">Investors<span class="nav__chevron" aria-hidden="true"></span></button>' +
              '<ul class="dropdown" aria-label="Investors submenu">' +
                '<li><a href="investors.html">Overview</a></li>' +
                // '<li><a href="news.html">News &amp; Events</a></li>' +
                '<li><a href="investors.html#presentation">Investor Presentation</a></li>' +
                '<li><a href="investors.html#stock">Stock Information</a></li>' +
                '<li><a href="contact.html">Contact IR</a></li>' +
              '</ul>' +
            '</li>' +
            '<li class="nav__item"><a class="nav__link" href="contact.html">Contact</a></li>' +
          '</ul>' +
          '<a href="contact.html" class="btn btn--primary nav__cta">Request Information</a>' +
        '</nav>' +
        '<button class="nav-toggle" id="nav-toggle" type="button" aria-expanded="false" aria-controls="site-nav" aria-label="Open menu">' +
          '<span class="nav-toggle__bar"></span><span class="nav-toggle__bar"></span><span class="nav-toggle__bar"></span>' +
        '</button>' +
      '</div>' +
    '</header>';

  var footerHTML =
    '<section class="cta">' +
      '<div class="container cta__inner">' +
        '<div class="cta__content reveal">' +
          '<p class="eyebrow eyebrow--light">Join us</p>' +
          '<h2 class="h2 h2--light">More choice. More possibility.<br>That\'s what we\'re building.</h2>' +
          '<p>Whether you\'re a patient, physician, researcher or investor — let\'s advance targeted options together.</p>' +
          '<div class="cta__actions">' +
            '<a href="contact.html" class="btn btn--light">Get in touch</a>' +
            '<a href="pipeline.html" class="btn btn--ghost-light">Explore the pipeline</a>' +
          '</div>' +
        '</div>' +
      '</div>' +
    '</section>' +

    '<footer class="site-footer" id="footer-contact">' +
      '<div class="container">' +
        '<div class="footer__grid">' +
          '<div class="footer__brand">' +
            '<a href="index.html" class="brand brand--footer" aria-label="Zentia Therapeutics — back to top">' +
              '<img src="assets/logo.svg" alt="" class="brand__mark" width="44" height="44">' +
              '<span class="brand__text">Zentia<span>therapeutics</span></span>' +
            '</a>' +
            '<p>A precision oncology company advancing targeted, biomarker-driven therapies to give patients more choice.</p>' +
            '<ul class="social">' +
              '<li><a href="https://www.linkedin.com" target="_blank" rel="noopener" aria-label="Zentia on LinkedIn"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6.5 8.5v11M3.5 5.5h.01M6.5 8.5H3.5v11M11 13v6.5M11 13a3.5 3.5 0 0 1 7 0v6.5" fill="none"/></svg></a></li>' +
              '<li><a href="https://twitter.com" target="_blank" rel="noopener" aria-label="Zentia on X (Twitter)"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 4l16 16M20 4L4 20" fill="none"/></svg></a></li>' +
              '<li><a href="https://www.youtube.com" target="_blank" rel="noopener" aria-label="Zentia on YouTube"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 8a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v8a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V8z" fill="none"/><path d="M10 9.5l5 2.5-5 2.5v-5z" fill="currentColor"/></svg></a></li>' +
            '</ul>' +
          '</div>' +
          '<nav class="footer__col" aria-label="Company">' +
            '<h3>Company</h3>' +
            '<ul>' +
              '<li><a href="about.html">Our story</a></li>' +
              '<li><a href="approach.html">Our approach</a></li>' +
              '<li><a href="voices.html">Voices</a></li>' +
              '<li><a href="contact.html">Contact</a></li>' +
            '</ul>' +
          '</nav>' +
          '<nav class="footer__col" aria-label="Science and pipeline">' +
            '<h3>Science &amp; pipeline</h3>' +
            '<ul>' +
              '<li><a href="approach.html">Research</a></li>' +
              '<li><a href="pipeline.html">Pipeline</a></li>' +
              '<li><a href="programs.html">Clinical programs</a></li>' +
              '<li><a href="publications.html">Publications</a></li>' +
            '</ul>' +
          '</nav>' +
          '<nav class="footer__col" aria-label="Patients and investors">' +
            '<h3>Patients &amp; investors</h3>' +
            '<ul>' +
              '<li><a href="trials.html">Clinical trials</a></li>' +
              '<li><a href="faq.html">Patient FAQ</a></li>' +
              // '<li><a href="news.html">News &amp; events</a></li>' +
              '<li><a href="investors.html">Investor resources</a></li>' +
            '</ul>' +
          '</nav>' +
          '<div class="footer__col footer__col--contact">' +
            '<h3>Contact</h3>' +
            '<address>8800 Discovery Way, Suite 200<br>San Diego, CA 92121</address>' +
            '<a href="tel:+18585550100">+1 (858) 555-0100</a>' +
            '<a href="mailto:info@zentia-therapeutics.com">info@zentia-therapeutics.com</a>' +
          '</div>' +
        '</div>' +
        '<div class="footer__bottom">' +
          '<p>Copyright © 2026 Zentia Therapeutics, Inc. All rights reserved.</p>' +
          '<ul class="footer__legal">' +
            '<li><a href="legal.html#privacy">Privacy policy</a></li>' +
            '<li><a href="legal.html#terms">Terms &amp; conditions</a></li>' +
            '<li><a href="legal.html#accessibility">Accessibility</a></li>' +
          '</ul>' +
        '</div>' +
      '</div>' +
    '</footer>' +

    '<div class="modal" id="modal-ir" role="dialog" aria-modal="true" aria-labelledby="modal-title" hidden>' +
      '<div class="modal__backdrop" data-modal-close></div>' +
      '<div class="modal__box">' +
        '<button class="modal__close" type="button" data-modal-close aria-label="Close dialog"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 5l14 14M19 5L5 19" fill="none"/></svg></button>' +
        '<p class="eyebrow">Investor resources</p>' +
        '<h2 class="h3" id="modal-title">Download the investor presentation</h2>' +
        '<p class="modal__sub">Share a few details and we\'ll send the latest corporate presentation and quarterly update.</p>' +
        '<form class="form" id="ir-form" novalidate>' +
          '<div class="form__field"><label for="ir-name">Full name</label><input id="ir-name" name="name" type="text" autocomplete="name" placeholder="Jordan Rivera" required><span class="form__error" role="alert"></span></div>' +
          '<div class="form__field"><label for="ir-email">Work email</label><input id="ir-email" name="email" type="email" autocomplete="email" placeholder="jordan@firm.com" required><span class="form__error" role="alert"></span></div>' +
          '<div class="form__field"><label for="ir-company">Company / institution</label><input id="ir-company" name="company" type="text" autocomplete="organization" placeholder="Acme Capital"><span class="form__error" role="alert"></span></div>' +
          '<button type="submit" class="btn btn--primary btn--full">Send presentation</button>' +
          '<p class="form__success" id="ir-success" role="status" hidden>The presentation is on its way to your inbox.</p>' +
        '</form>' +
      '</div>' +
    '</div>' +

    '<button class="to-top" id="to-top" type="button" aria-label="Back to top"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 15l6-6 6 6" fill="none"/></svg></button>';

  function inject() {
    var headers = document.querySelectorAll("[data-component='header']");
    for (var i = 0; i < headers.length; i++) {
      headers[i].outerHTML = headerHTML;
    }
    var footers = document.querySelectorAll("[data-component='footer']");
    for (var j = 0; j < footers.length; j++) {
      footers[j].outerHTML = footerHTML;
    }
    setActiveNav();
  }

  function setActiveNav() {
    var page = document.body.getAttribute("data-page");
    if (!page) return;
    var links = document.querySelectorAll(".nav__link");
    for (var i = 0; i < links.length; i++) {
      var href = links[i].getAttribute("href");
      if (!href || href.indexOf(".html") === -1) continue;
      var base = href.split("#")[0].replace(".html", "");
      if (base === page) {
        links[i].classList.add("is-active");
        var item = links[i].closest(".has-dropdown");
        if (item) item.classList.add("is-open");
      }
    }
  }

  if (document.readyState === "loading") {
    document.addEventListener("DOMContentLoaded", inject);
  } else {
    inject();
  }
})();
