international guideline on etiopathogenesis clinical features and complication with recent advances in ppt form

Asking for Preferences
Reading File
Reading File
Reading File
Finding Sources
Searching PubMed

"hypertensive disorders of pregnancy" AND guidelines

Searching the Web

hypertensive disorders pregnancy international guidelines 2024 2025 etiopathogenesis preeclampsia

Finding Sources
Finding Sources
Reading Web Page

https://www.aafp.org/afp/2024/0300/hypertensive-disorders-of…

Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Running Command

mkdir -p /home/daytona/workspace/hdp-presentation && ls /home/daytona/workspace/hdp-presentation/

Writing File

~/hdp-presentation/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5"
pres.author = "Medical Education";
pres.title = "Hypertensive Disorders of Pregnancy";

// ─── COLOR PALETTE ──────────────────────────────────────────────
const DARK_NAVY   = "0D1B2A";   // dominant dark bg
const MED_BLUE    = "1B4F72";   // supporting
const ACCENT_TEAL = "1ABC9C";   // sharp accent
const LIGHT_BG    = "EAF2F8";   // light slide bg
const WHITE       = "FFFFFF";
const LIGHT_GRAY  = "D5D8DC";
const WARN_RED    = "C0392B";
const GOLD        = "F1C40F";
const TEXT_DARK   = "1A252F";
const TEXT_MID    = "2C3E50";

// ─── HELPER: Section header bar ──────────────────────────────────
function addSectionBar(slide, color, text) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.7, fill: { color } });
  slide.addText(text, { x: 0.3, y: 0, w: 12.7, h: 0.7, fontSize: 20, bold: true, color: WHITE, valign: "middle", margin: 0 });
}

// ─── HELPER: Bullet block ────────────────────────────────────────
function addBullets(slide, items, opts) {
  const { x, y, w, h, fontSize = 14, color = TEXT_DARK, indent = 0.3 } = opts;
  const textArr = items.map((item, i) => ({
    text: item,
    options: {
      bullet: { type: "bullet", indent },
      breakLine: i < items.length - 1,
      fontSize,
      color,
    }
  }));
  slide.addText(textArr, { x, y, w, h, valign: "top" });
}

// ─── HELPER: Colored box ─────────────────────────────────────────
function addBox(slide, { x, y, w, h, fill, text, titleFill, title, fontSize = 13, textColor = WHITE }) {
  if (title) {
    slide.addShape(pres.ShapeType.rect, { x, y, w, h: 0.38, fill: { color: titleFill || fill }, rectRadius: 0 });
    slide.addText(title, { x, y, w, h: 0.38, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
    slide.addShape(pres.ShapeType.rect, { x, y: y + 0.38, w, h: h - 0.38, fill: { color: fill }, rectRadius: 0 });
    const textArr = (Array.isArray(text) ? text : [text]).map((t, i, arr) => ({
      text: t, options: { bullet: { type: "bullet" }, breakLine: i < arr.length - 1, fontSize, color: textColor }
    }));
    slide.addText(textArr, { x: x + 0.1, y: y + 0.42, w: w - 0.2, h: h - 0.5, valign: "top", fontSize });
  } else {
    slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: fill } });
    const textArr = (Array.isArray(text) ? text : [text]).map((t, i, arr) => ({
      text: t, options: { bullet: { type: "bullet" }, breakLine: i < arr.length - 1, fontSize, color: textColor }
    }));
    slide.addText(textArr, { x: x + 0.1, y: y + 0.1, w: w - 0.2, h: h - 0.2, valign: "top", fontSize });
  }
}

// =================================================================
// SLIDE 1 — TITLE SLIDE
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  // Accent stripe
  s.addShape(pres.ShapeType.rect, { x: 0, y: 2.8, w: 13.3, h: 0.08, fill: { color: ACCENT_TEAL } });
  // Large title
  s.addText("Hypertensive Disorders\nof Pregnancy", {
    x: 1, y: 1.1, w: 11.3, h: 1.7, fontSize: 44, bold: true, color: WHITE, align: "center", valign: "middle"
  });
  s.addText("International Guidelines | Etiopathogenesis | Clinical Features | Complications | Recent Advances", {
    x: 1, y: 3.1, w: 11.3, h: 0.55, fontSize: 17, color: ACCENT_TEAL, align: "center", italic: true
  });
  // Stats boxes
  const stats = [
    { label: "Prevalence", val: "3-8%\nof pregnancies" },
    { label: "Maternal Deaths", val: "~16%\nglobally" },
    { label: "Annual Deaths", val: "~42,000\nper year (2023)" },
    { label: "US Hospital\nDeliveries", val: "1 in 7\naffected" }
  ];
  stats.forEach((st, i) => {
    const x = 1.2 + i * 2.85;
    s.addShape(pres.ShapeType.rect, { x, y: 4.0, w: 2.5, h: 1.3, fill: { color: MED_BLUE }, line: { color: ACCENT_TEAL, width: 1.5 } });
    s.addText(st.val, { x, y: 4.05, w: 2.5, h: 0.7, fontSize: 18, bold: true, color: GOLD, align: "center", valign: "middle" });
    s.addText(st.label, { x, y: 4.75, w: 2.5, h: 0.5, fontSize: 12, color: LIGHT_GRAY, align: "center" });
  });
  s.addText("Sources: WHO Factsheet Dec 2025 | ISSHP 2021 | ACOG 2020 | AFP 2024", {
    x: 1, y: 6.8, w: 11.3, h: 0.4, fontSize: 10, color: LIGHT_GRAY, align: "center", italic: true
  });
}

// =================================================================
// SLIDE 2 — TABLE OF CONTENTS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  s.addText("Contents", { x: 0.5, y: 0.3, w: 12.3, h: 0.7, fontSize: 28, bold: true, color: WHITE });
  s.addShape(pres.ShapeType.rect, { x: 0.5, y: 1.05, w: 3, h: 0.05, fill: { color: ACCENT_TEAL } });

  const items = [
    ["01", "Definitions & ISSHP 2021 Classification"],
    ["02", "Epidemiology & Risk Factors"],
    ["03", "Etiopathogenesis – Two-Stage Model"],
    ["04", "Angiogenic Imbalance (sFlt-1 / PlGF)"],
    ["05", "Immunologic & Genetic Mechanisms"],
    ["06", "Diagnostic Criteria"],
    ["07", "Clinical Features & Organ Systems"],
    ["08", "Complications – Maternal"],
    ["09", "Complications – Fetal/Neonatal"],
    ["10", "HELLP Syndrome"],
    ["11", "Management Overview"],
    ["12", "Antihypertensive Therapy"],
    ["13", "Prevention & Prophylaxis"],
    ["14", "Recent Advances 2023-2026"],
    ["15", "Long-term Consequences"],
  ];

  items.forEach((item, i) => {
    const col = i < 8 ? 0 : 1;
    const row = col === 0 ? i : i - 8;
    const x = col === 0 ? 0.5 : 7.0;
    const y = 1.3 + row * 0.67;
    s.addShape(pres.ShapeType.rect, { x, y: y - 0.02, w: 0.55, h: 0.45, fill: { color: ACCENT_TEAL } });
    s.addText(item[0], { x, y: y - 0.02, w: 0.55, h: 0.45, fontSize: 14, bold: true, color: DARK_NAVY, align: "center", valign: "middle", margin: 0 });
    s.addText(item[1], { x: x + 0.65, y: y - 0.02, w: 5.7, h: 0.45, fontSize: 13.5, color: WHITE, valign: "middle" });
  });
}

// =================================================================
// SLIDE 3 — DEFINITIONS & ISSHP 2021 CLASSIFICATION
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: LIGHT_BG } });
  addSectionBar(s, MED_BLUE, "01  |  Definitions & ISSHP 2021 Classification");

  const cats = [
    {
      title: "CHRONIC HYPERTENSION",
      fill: "1B4F72",
      items: [
        "BP ≥140/90 mmHg before 20 weeks' gestation",
        "OR pre-existing hypertension before pregnancy",
        "Includes essential & secondary hypertension",
        "Persists >12 weeks postpartum"
      ]
    },
    {
      title: "GESTATIONAL HYPERTENSION",
      fill: "21618C",
      items: [
        "New BP ≥140/90 mmHg after 20 weeks",
        "No proteinuria, no end-organ damage",
        "Resolves within 12 weeks postpartum",
        "If severe: ≥160/110 mmHg (severe feature)"
      ]
    },
    {
      title: "PREECLAMPSIA",
      fill: "1E8449",
      items: [
        "Gestational HTN + proteinuria (≥300 mg/24h)",
        "OR gestational HTN + end-organ damage",
        "After 20 weeks (can occur without proteinuria)",
        "Early-onset (<34 wks) vs Late-onset (≥34 wks)"
      ]
    },
    {
      title: "ECLAMPSIA",
      fill: "922B21",
      items: [
        "New-onset generalized seizures in preeclampsia",
        "No other cause for seizure",
        "Can occur antepartum, intrapartum, or postpartum",
        "Medical emergency requiring MgSO4"
      ]
    },
    {
      title: "SUPERIMPOSED PREECLAMPSIA",
      fill: "784212",
      items: [
        "Chronic HTN + new proteinuria after 20 wks",
        "OR sudden worsening of existing HTN",
        "OR new end-organ dysfunction in chronic HTN",
        "Higher risk than either condition alone"
      ]
    },
  ];

  cats.forEach((cat, i) => {
    const col = i < 3 ? i : i - 3;
    const row = i < 3 ? 0 : 1;
    const x = i < 3 ? 0.2 + i * 4.3 : 2.35 + col * 4.3;
    const y = i < 3 ? 0.9 : 4.1;
    const w = 3.9;
    const h = i < 3 ? 2.9 : 3.0;
    s.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color: cat.fill } });
    s.addText(cat.title, { x: x + 0.05, y: y + 0.05, w: w - 0.1, h: 0.5, fontSize: 11.5, bold: true, color: GOLD, valign: "middle", align: "center", margin: 0 });
    s.addShape(pres.ShapeType.line, { x: x + 0.15, y: y + 0.58, w: w - 0.3, h: 0, line: { color: GOLD, width: 0.8 } });
    const textArr = cat.items.map((t, idx) => ({
      text: t,
      options: { bullet: { type: "bullet" }, breakLine: idx < cat.items.length - 1, fontSize: 11, color: WHITE }
    }));
    s.addText(textArr, { x: x + 0.08, y: y + 0.65, w: w - 0.16, h: h - 0.75, valign: "top" });
  });

  s.addText("ISSHP 2021 Classification (Magee et al, Pregnancy Hypertens. 2022;27:148-169) | ACOG 2020", {
    x: 0.3, y: 7.2, w: 12.7, h: 0.25, fontSize: 9, color: MED_BLUE, italic: true
  });
}

// =================================================================
// SLIDE 4 — EPIDEMIOLOGY & RISK FACTORS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: LIGHT_BG } });
  addSectionBar(s, MED_BLUE, "02  |  Epidemiology & Risk Factors");

  // Epi panel
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 4.0, h: 6.3, fill: { color: MED_BLUE } });
  s.addText("EPIDEMIOLOGY", { x: 0.2, y: 0.85, w: 4.0, h: 0.45, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
  const epiItems = [
    "Affects 3-8% of pregnancies worldwide",
    "Increased prevalence 2017-2019 in US",
    "Accounts for 7% of US pregnancy-related deaths",
    "Responsible for ~16% of all maternal deaths globally (~42,000/year)",
    "Higher prevalence in LMICs",
    "Preeclampsia: 5-8% of pregnancies globally",
    "Eclampsia: 1-2% of preeclampsia cases",
    "Higher risk with multiple gestations:\n- Twins: 10-20%\n- Triplets: 25-60%\n- Quadruplets: up to 90%",
    "44% of maternal deaths in 1st 6 days post-delivery attributable to HDP",
  ];
  const epiArr = epiItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < epiItems.length - 1, fontSize: 11.5, color: WHITE } }));
  s.addText(epiArr, { x: 0.3, y: 1.35, w: 3.8, h: 5.7, valign: "top" });

  // Risk factor columns
  const rfCols = [
    {
      title: "Non-Modifiable", color: "1A5276",
      items: [
        "Nulliparity (primigravida)",
        "Age >35 or <18 years",
        "Prior preeclampsia history",
        "Family history (mother/sister)",
        "Multiple gestation",
        "ART/IVF conception",
        "Hydatidiform mole",
        "New paternity (partner change)",
        "Born small for gestational age",
        "Father born of PE pregnancy",
        "ICSI conception",
        "Black race / African descent"
      ]
    },
    {
      title: "Modifiable", color: "1E8449",
      items: [
        "Obesity / BMI >30 kg/m²",
        "Chronic hypertension",
        "Diabetes mellitus (T1 or T2)",
        "Chronic kidney disease",
        "Dyslipidemia",
        "Thrombophilia / APS",
        "Sleep-disordered breathing",
        "Autoimmune diseases (SLE, RA)",
        "High-salt diet",
        "Physical inactivity",
        "Anxiety / stress",
        "Low calcium/vitamin D intake"
      ]
    }
  ];
  rfCols.forEach((col, i) => {
    const x = 4.4 + i * 4.5;
    s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 4.1, h: 6.3, fill: { color: col.color } });
    s.addText(col.title.toUpperCase() + " RISK FACTORS", { x, y: 0.85, w: 4.1, h: 0.45, fontSize: 12, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
    const arr = col.items.map((t, idx) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: idx < col.items.length - 1, fontSize: 11.5, color: WHITE } }));
    s.addText(arr, { x: x + 0.1, y: 1.35, w: 3.9, h: 5.7, valign: "top" });
  });
}

// =================================================================
// SLIDE 5 — ETIOPATHOGENESIS: TWO-STAGE MODEL
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  addSectionBar(s, ACCENT_TEAL, "03  |  Etiopathogenesis – Two-Stage Model");

  // Stage 1 box
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 6.0, h: 6.3, fill: { color: "163A52" } });
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 6.0, h: 0.5, fill: { color: "1ABC9C" } });
  s.addText("STAGE 1 — Impaired Placentation (1st trimester)", {
    x: 0.2, y: 0.85, w: 6.0, h: 0.5, fontSize: 13, bold: true, color: DARK_NAVY, align: "center", valign: "middle", margin: 0
  });
  const stage1 = [
    "Occurs at 8-18 weeks gestation",
    "Extravillous trophoblasts (EVTs) invade decidua & myometrium",
    "Normal: EVTs remodel spiral arteries → low-resistance, high-flow vessels",
    "In preeclampsia: Shallow trophoblast invasion & incomplete spiral artery remodeling",
    "Myometrial segments remain muscular & vasoactive",
    "Results in uteroplacental ischemia and relative hypoxia",
    "Mechanism: Defective immune tolerance (NK cell / HLA-C mismatch)",
    "Genetic, immunologic & environmental factors contribute",
    "Hypoxia triggers HIF-1α → sFlt-1 upregulation",
    "Oxidative stress → NFkB activation → proinflammatory cytokines",
    "Pathologic acute atherosis in 10% of PE placentas",
    "Placental microparticle shedding → systemic inflammation",
    "This stage is clinically silent — no symptoms yet"
  ];
  const st1arr = stage1.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < stage1.length - 1, fontSize: 11.5, color: WHITE } }));
  s.addText(st1arr, { x: 0.35, y: 1.42, w: 5.7, h: 5.65, valign: "top" });

  // Arrow
  s.addShape(pres.ShapeType.rect, { x: 6.3, y: 3.5, w: 0.7, h: 0.5, fill: { color: GOLD } });
  s.addText("→", { x: 6.3, y: 3.5, w: 0.7, h: 0.5, fontSize: 22, bold: true, color: DARK_NAVY, align: "center", valign: "middle", margin: 0 });

  // Stage 2 box
  s.addShape(pres.ShapeType.rect, { x: 7.1, y: 0.85, w: 6.0, h: 6.3, fill: { color: "4A0E0E" } });
  s.addShape(pres.ShapeType.rect, { x: 7.1, y: 0.85, w: 6.0, h: 0.5, fill: { color: WARN_RED } });
  s.addText("STAGE 2 — Maternal Syndrome (2nd/3rd trimester)", {
    x: 7.1, y: 0.85, w: 6.0, h: 0.5, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
  });
  const stage2 = [
    "Release of antiangiogenic factors from diseased placenta",
    "sFlt-1 (soluble fms-like tyrosine kinase-1) markedly elevated",
    "Soluble endoglin (sEng) elevated — inhibits TGF-β signaling",
    "PlGF (placental growth factor) markedly reduced",
    "sFlt-1/PlGF ratio >38 predictive of PE (sensitivity >80%)",
    "Systemic endothelial dysfunction → widespread vasoconstriction",
    "Increased sensitivity to angiotensin II & vasopressors",
    "Decreased PGI2 (prostacyclin) / increased TXA2 (thromboxane)",
    "Disruption of NO-mediated vasodilation",
    "Proteinuria: glomerular endotheliosis (podocyte injury)",
    "3 mechanisms summarized (Creasy & Resnik):",
    "  1. Abnormal placentation → excess sFlt-1/sEng",
    "  2. Preexisting endothelial sensitization (e.g., obesity)",
    "  3. Excess placental mass (multiple gestation)"
  ];
  const st2arr = stage2.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < stage2.length - 1, fontSize: 11.5, color: WHITE } }));
  s.addText(st2arr, { x: 7.25, y: 1.42, w: 5.7, h: 5.65, valign: "top" });
}

// =================================================================
// SLIDE 6 — ANGIOGENIC IMBALANCE
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: LIGHT_BG } });
  addSectionBar(s, MED_BLUE, "04  |  Angiogenic Imbalance – sFlt-1, PlGF & Soluble Endoglin");

  // Normal pregnancy panel
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 5.9, h: 3.2, fill: { color: "D5F5E3" } });
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 5.9, h: 0.45, fill: { color: "1E8449" } });
  s.addText("NORMAL PREGNANCY", { x: 0.2, y: 0.85, w: 5.9, h: 0.45, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
  const normalItems = [
    "Balanced proangiogenic environment",
    "VEGF & PlGF bind VEGFR-1/2 on endothelium",
    "TGF-β1 signaling via endoglin promotes vessel stability",
    "Low circulating sFlt-1, low sEng",
    "Adequate uteroplacental perfusion",
    "Endothelial NO production preserved",
    "Peripheral vascular resistance falls by 25%"
  ];
  const narr = normalItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < normalItems.length - 1, fontSize: 12, color: TEXT_DARK } }));
  s.addText(narr, { x: 0.35, y: 1.35, w: 5.6, h: 2.65, valign: "top" });

  // Preeclampsia panel
  s.addShape(pres.ShapeType.rect, { x: 6.4, y: 0.85, w: 6.7, h: 3.2, fill: { color: "FDEDEC" } });
  s.addShape(pres.ShapeType.rect, { x: 6.4, y: 0.85, w: 6.7, h: 0.45, fill: { color: WARN_RED } });
  s.addText("PREECLAMPSIA", { x: 6.4, y: 0.85, w: 6.7, h: 0.45, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
  const peItems = [
    "↑ sFlt-1: sequesters free VEGF and PlGF → prevents endothelial receptor binding",
    "↑ sEng: blocks TGF-β1 signaling → impaired NO/PGI2 production",
    "↓ Free PlGF: marker detectable weeks before clinical disease",
    "sFlt-1/PlGF ratio >38 → preeclampsia within 4 weeks (Zeisler et al 2016)",
    "Ratio >85 = severe disease; correlates with fetal outcomes",
    "DELPHI study: ratio predicts PE 1-4 weeks in advance (NEJM 2016)",
    "Exogenous VEGF administration reverses PE in animal models"
  ];
  const pearr = peItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < peItems.length - 1, fontSize: 12, color: TEXT_DARK } }));
  s.addText(pearr, { x: 6.55, y: 1.35, w: 6.4, h: 2.65, valign: "top" });

  // Bottom row: Clinical utility
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 4.2, w: 12.9, h: 3.05, fill: { color: MED_BLUE } });
  s.addText("CLINICAL UTILITY OF BIOMARKERS (Recent Advances)", {
    x: 0.2, y: 4.2, w: 12.9, h: 0.45, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0
  });
  const bioItems = [
    ["sFlt-1/PlGF Ratio", "Rule-in/rule-out preeclampsia in symptomatic women (ISSHP 2021 & FIGO 2019 endorsed)", "FDA cleared 2023 for US use"],
    ["PlGF alone", "Low PlGF (<12 pg/mL at 19-23 wks) predicts severe early-onset PE; PlGF-based testing reduces NICU admissions (PARROT trial)", ""],
    ["Large-scale proteomics", "2024 JAMA Cardiol study: early pregnancy proteomics predicts HDP weeks before clinical onset (Greenland et al 2024)", ""],
    ["Polygenic risk score", "Honigberg et al Nat Med 2023: polygenic prediction improves pre-pregnancy risk stratification", ""]
  ];
  bioItems.forEach((bi, i) => {
    const x = 0.3 + i * 3.2;
    s.addShape(pres.ShapeType.rect, { x, y: 4.72, w: 3.0, h: 2.38, fill: { color: "163A52" } });
    s.addText(bi[0], { x, y: 4.72, w: 3.0, h: 0.42, fontSize: 11.5, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
    s.addText(bi[1] + (bi[2] ? " " + bi[2] : ""), { x: x + 0.05, y: 5.14, w: 2.9, h: 1.9, fontSize: 10.5, color: WHITE, valign: "top" });
  });
}

// =================================================================
// SLIDE 7 — IMMUNOLOGIC & GENETIC MECHANISMS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  addSectionBar(s, ACCENT_TEAL, "05  |  Immunologic, Genetic & Oxidative Stress Mechanisms");

  const panels = [
    {
      title: "IMMUNOLOGIC MECHANISMS",
      color: "1A5276",
      items: [
        "Fetal antigens trigger immune recognition",
        "Abnormal NK cell activity (uterine NK cells promote trophoblast invasion)",
        "KIR/HLA-C polymorphism mismatch: genetic evidence for immune dysregulation",
        "Increased dendritic cell & macrophage infiltration in PE placentas",
        "Chronic villitis & pathologic inflammation",
        "Angiotensin receptor autoantibodies (AT1R-AAs) activate renin-angiotensin axis",
        "Systemic neutrophil activation → vascular injury",
        "Placental microparticle shedding drives oxidative stress",
        "New partner / primipaternity: reduced immune tolerance to paternal antigens",
        "IVF & donor oocyte: diminished tolerance to foreign antigens"
      ]
    },
    {
      title: "GENETIC FACTORS",
      color: "1E5631",
      items: [
        "4x increased risk in sisters of affected women",
        "15% incidence in mothers of PE women vs 4% in mothers-in-law",
        "Multifactorial inheritance (no single gene identified)",
        "FinnGen 2023 (JAMA Cardiol): multiple genetic loci associated with HDP",
        "Polygenic risk scoring (Honigberg et al, Nat Med 2023)",
        "STAT3 signaling pathway implicated (Marzioni et al, 2025)",
        "Gene variants: COMT, heme oxygenase, corin",
        "These pathways converge to increase placental sFlt-1 production",
        "Mitochondrial variants: emerging evidence",
        "Epigenetic modifications of placental gene expression"
      ]
    },
    {
      title: "OXIDATIVE STRESS",
      color: "6E2F0C",
      items: [
        "Excess reactive oxygen species (ROS) beyond antioxidant capacity",
        "Lipid peroxidation products elevated in PE women",
        "Nitrotyrosine, protein carbonyls elevated in blood/placenta",
        "Reduced antioxidants (Vit C, E, glutathione)",
        "Antibodies to oxidized LDL excess",
        "Changes precede clinical preeclampsia",
        "However: Vit C + Vit E supplementation RCTs failed to prevent PE",
        "Oxidative stress likely a consequence rather than primary cause",
        "Interaction with antiangiogenic factors: complementary damage",
        "Endothelial mitochondrial dysfunction a key target"
      ]
    }
  ];

  panels.forEach((p, i) => {
    const x = 0.2 + i * 4.35;
    s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 4.1, h: 6.35, fill: { color: p.color } });
    s.addText(p.title, { x, y: 0.85, w: 4.1, h: 0.48, fontSize: 12, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
    s.addShape(pres.ShapeType.line, { x: x + 0.1, y: 1.36, w: 3.9, h: 0, line: { color: GOLD, width: 0.8 } });
    const arr = p.items.map((t, idx) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: idx < p.items.length - 1, fontSize: 11.2, color: WHITE } }));
    s.addText(arr, { x: x + 0.08, y: 1.42, w: 3.94, h: 5.7, valign: "top" });
  });
}

// =================================================================
// SLIDE 8 — DIAGNOSTIC CRITERIA
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: LIGHT_BG } });
  addSectionBar(s, MED_BLUE, "06  |  Diagnostic Criteria (ISSHP 2021 / ACOG 2020)");

  // BP criteria box
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 6.0, h: 2.8, fill: { color: MED_BLUE } });
  s.addText("BLOOD PRESSURE THRESHOLDS", { x: 0.2, y: 0.85, w: 6.0, h: 0.45, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
  const bpItems = [
    "Hypertension: ≥140 mmHg systolic AND/OR ≥90 mmHg diastolic",
    "Severe hypertension: ≥160 mmHg systolic OR ≥110 mmHg diastolic",
    "Minimum 2 readings at least 4 hours apart (or 15 min if severe)",
    "Measured after at least 5 minutes of seated rest",
    "Confirm with 24-hr ambulatory or home BP monitoring if borderline",
    "Target for treatment: <140/90 mmHg (ACOG/ISSHP consensus)"
  ];
  const bparr = bpItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < bpItems.length - 1, fontSize: 12, color: WHITE } }));
  s.addText(bparr, { x: 0.35, y: 1.35, w: 5.7, h: 2.25, valign: "top" });

  // Proteinuria box
  s.addShape(pres.ShapeType.rect, { x: 6.5, y: 0.85, w: 6.6, h: 2.8, fill: { color: "154360" } });
  s.addText("PROTEINURIA CRITERIA", { x: 6.5, y: 0.85, w: 6.6, h: 0.45, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
  const protItems = [
    "24-hour urine protein: ≥300 mg (gold standard)",
    "Protein:creatinine ratio (PCR): ≥30 mg/mmol (0.3 mg/mg)",
    "Urine dipstick 2+ (only if other methods unavailable)",
    "NOTE: Proteinuria is NO LONGER required for PE diagnosis if end-organ damage present",
    "End-organ criteria sufficient: thrombocytopenia, AKI, impaired liver, pulmonary edema, new-onset headache/visual symptoms"
  ];
  const protarr = protItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < protItems.length - 1, fontSize: 12, color: WHITE } }));
  s.addText(protarr, { x: 6.65, y: 1.35, w: 6.3, h: 2.25, valign: "top" });

  // Severe features row
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 3.8, w: 12.9, h: 0.45, fill: { color: WARN_RED } });
  s.addText("SEVERE FEATURES OF PREECLAMPSIA (any one = severe disease)", {
    x: 0.2, y: 3.8, w: 12.9, h: 0.45, fontSize: 13, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0
  });
  const sevFeats = [
    ["Neurologic", "Severe headache unresponsive to medication\nVisual disturbances (scotomata, photophobia)\nAltered mental status / seizure"],
    ["Hematologic", "Platelets <100,000/µL\nHemolysis\nDIC"],
    ["Hepatic", "AST/ALT >2× ULN\nSevere RUQ/epigastric pain\nSubcapsular hematoma"],
    ["Renal", "Creatinine >1.1 mg/dL or doubling\nOliguria <500 mL/24h"],
    ["Pulmonary", "Pulmonary edema\nO2 sat <94% on room air"],
    ["Vascular", "BP ≥160/110 mmHg\nFetal growth restriction\nReverse end-diastolic flow"]
  ];
  sevFeats.forEach((sf, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.2 + col * 4.3;
    const y = 4.32 + row * 1.48;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.05, h: 1.4, fill: { color: "4A0E0E" } });
    s.addText(sf[0], { x, y, w: 4.05, h: 0.38, fontSize: 12, bold: true, color: WARN_RED, align: "center", valign: "middle", margin: 0 });
    s.addText(sf[1], { x: x + 0.08, y: y + 0.4, w: 3.89, h: 0.95, fontSize: 10.5, color: WHITE, valign: "top" });
  });
}

// =================================================================
// SLIDE 9 — CLINICAL FEATURES
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  addSectionBar(s, ACCENT_TEAL, "07  |  Clinical Features – Organ System Involvement");

  const systems = [
    {
      sys: "CARDIOVASCULAR",
      color: "6E1010",
      items: [
        "Hypertension (may be labile)",
        "High systemic vascular resistance",
        "Low cardiac output (vs normal pregnancy)",
        "Increased sensitivity to angiotensin II",
        "Peripheral vasospasm",
        "Peripheral edema (non-dependent)"
      ]
    },
    {
      sys: "RENAL",
      color: "0E4D6E",
      items: [
        "Proteinuria (hallmark)",
        "Glomerular endotheliosis (pathognomonic)",
        "Oliguria (<500 mL/24h in severe disease)",
        "Raised serum creatinine & uric acid",
        "GFR reduction up to 30%",
        "Sodium and water retention"
      ]
    },
    {
      sys: "NEUROLOGIC",
      color: "4A1067",
      items: [
        "Severe frontal headache",
        "Visual disturbances (scotomata, blurring, photophobia)",
        "Hyperreflexia & clonus",
        "Cortical blindness (rare)",
        "Cerebral edema / PRES",
        "Eclamptic seizures (tonic-clonic)"
      ]
    },
    {
      sys: "HEPATIC",
      color: "765400",
      items: [
        "RUQ / epigastric pain (Glisson capsule distension)",
        "Elevated AST, ALT (2× ULN)",
        "Nausea and vomiting",
        "Subcapsular hematoma (rare)",
        "Liver rupture (rare, life-threatening)",
        "Component of HELLP syndrome"
      ]
    },
    {
      sys: "HEMATOLOGIC",
      color: "1E5631",
      items: [
        "Thrombocytopenia (<100,000/µL)",
        "Microangiopathic hemolytic anemia (MAHA)",
        "DIC (in severe cases)",
        "Elevated LDH (>600 U/L)",
        "Schistocytes on peripheral smear",
        "Reduced fibrinogen in severe cases"
      ]
    },
    {
      sys: "PLACENTAL/FETAL",
      color: "2E4057",
      items: [
        "Placental insufficiency / infarcts",
        "Fetal growth restriction (FGR)",
        "Oligohydramnios",
        "Abnormal umbilical artery Doppler",
        "Non-reassuring fetal status",
        "Increased perinatal mortality"
      ]
    }
  ];

  systems.forEach((sys, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.2 + col * 4.35;
    const y = 0.85 + row * 3.2;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.1, h: 3.1, fill: { color: sys.color } });
    s.addText(sys.sys, { x, y, w: 4.1, h: 0.45, fontSize: 12.5, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
    s.addShape(pres.ShapeType.line, { x: x + 0.1, y: y + 0.47, w: 3.9, h: 0, line: { color: GOLD, width: 0.8 } });
    const arr = sys.items.map((t, idx) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: idx < sys.items.length - 1, fontSize: 11.5, color: WHITE } }));
    s.addText(arr, { x: x + 0.1, y: y + 0.52, w: 3.9, h: 2.5, valign: "top" });
  });
}

// =================================================================
// SLIDE 10 — MATERNAL COMPLICATIONS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: LIGHT_BG } });
  addSectionBar(s, WARN_RED, "08  |  Maternal Complications");

  const acuteCx = [
    "Eclampsia (seizures)",
    "HELLP syndrome",
    "Acute pulmonary edema",
    "Acute kidney injury (AKI)",
    "Placental abruption",
    "DIC / coagulopathy",
    "Stroke / intracranial hemorrhage",
    "Liver rupture / subcapsular hematoma",
    "Myocardial infarction / heart failure",
    "Retinal detachment",
    "Maternal death"
  ];
  const acutearr = acuteCx.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < acuteCx.length - 1, fontSize: 12.5, color: WHITE } }));
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 5.9, h: 6.35, fill: { color: "6E1010" } });
  s.addText("ACUTE / IMMEDIATE", { x: 0.2, y: 0.85, w: 5.9, h: 0.48, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
  s.addText(acutearr, { x: 0.35, y: 1.38, w: 5.6, h: 5.75, valign: "top" });

  const longCx = [
    "Hypertension (4.6× risk within 14 years)",
    "Cardiovascular disease (2× lifetime risk of MI, stroke)",
    "Chronic kidney disease (CKD)",
    "Increased dementia risk (meta-analysis 2024)",
    "Increased stroke risk (meta-analysis 2023)",
    "Type 2 diabetes mellitus",
    "Metabolic syndrome",
    "Subclinical cardiac dysfunction",
    "Risk of recurrence in subsequent pregnancies (15-25%)",
    "Increased all-cause mortality long-term"
  ];
  const longarr = longCx.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < longCx.length - 1, fontSize: 12.5, color: WHITE } }));
  s.addShape(pres.ShapeType.rect, { x: 7.2, y: 0.85, w: 5.9, h: 6.35, fill: { color: "4A1067" } });
  s.addText("LONG-TERM / REMOTE", { x: 7.2, y: 0.85, w: 5.9, h: 0.48, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
  s.addText(longarr, { x: 7.35, y: 1.38, w: 5.6, h: 5.75, valign: "top" });

  // Arrow / divider
  s.addShape(pres.ShapeType.rect, { x: 6.25, y: 3.2, w: 0.8, h: 0.7, fill: { color: WARN_RED } });
  s.addText("⟹", { x: 6.25, y: 3.2, w: 0.8, h: 0.7, fontSize: 20, color: WHITE, align: "center", valign: "middle", margin: 0 });
}

// =================================================================
// SLIDE 11 — FETAL/NEONATAL COMPLICATIONS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  addSectionBar(s, ACCENT_TEAL, "09  |  Fetal & Neonatal Complications");

  const fetalCx = [
    { cat: "GROWTH", items: ["Fetal growth restriction (FGR)", "Small for gestational age (SGA)", "Low birth weight (<2500g)", "Oligohydramnios"] },
    { cat: "DELIVERY", items: ["Preterm birth (iatrogenic)", "Emergency cesarean section", "Low gestational age at birth", "Higher NICU admission rates"] },
    { cat: "PERFUSION", items: ["Uteroplacental insufficiency", "Abnormal umbilical artery Doppler (absent/reversed EDF)", "Perinatal asphyxia", "Stillbirth / fetal death"] },
    { cat: "NEONATAL", items: ["Respiratory distress syndrome", "Necrotizing enterocolitis", "Intraventricular hemorrhage", "Retinopathy of prematurity"] },
    { cat: "PLACENTA", items: ["Placental abruption (maternal hemorrhage)", "Placental infarcts", "Abnormal placental shape", "Abnormal insertion/abnormal cord"] },
    { cat: "LONG-TERM\n(OFFSPRING)", items: ["Hypertension in adult life", "Obesity risk", "Cardiovascular disease risk", "Cognitive development issues (maternal inflammation)"] }
  ];

  fetalCx.forEach((fc, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.2 + col * 4.35;
    const y = 0.85 + row * 3.2;
    s.addShape(pres.ShapeType.rect, { x, y, w: 4.1, h: 3.1, fill: { color: i < 3 ? "163A52" : "2E4057" } });
    s.addText(fc.cat, { x, y, w: 4.1, h: 0.45, fontSize: 12.5, bold: true, color: ACCENT_TEAL, align: "center", valign: "middle", margin: 0 });
    s.addShape(pres.ShapeType.line, { x: x + 0.1, y: y + 0.47, w: 3.9, h: 0, line: { color: ACCENT_TEAL, width: 0.8 } });
    const arr = fc.items.map((t, idx) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: idx < fc.items.length - 1, fontSize: 12, color: WHITE } }));
    s.addText(arr, { x: x + 0.1, y: y + 0.52, w: 3.9, h: 2.5, valign: "top" });
  });
}

// =================================================================
// SLIDE 12 — HELLP SYNDROME
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: LIGHT_BG } });
  addSectionBar(s, WARN_RED, "10  |  HELLP Syndrome – Diagnosis & Management");

  // HELLP acronym boxes
  const hellp = [
    { letter: "H", full: "Hemolysis", details: "MAHA — LDH >600 U/L\nAbnormal peripheral smear (schistocytes)\nTotal bilirubin >1.2 mg/dL" },
    { letter: "EL", full: "Elevated Liver Enzymes", details: "AST/ALT >70 U/L\nAST/ALT >2× ULN\nRUQ/epigastric pain" },
    { letter: "LP", full: "Low Platelets", details: "Platelets <100,000/µL\nClass I: <50,000\nClass II: 50,000-100,000" }
  ];
  hellp.forEach((h, i) => {
    const x = 0.2 + i * 4.35;
    s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 4.1, h: 1.5, fill: { color: WARN_RED } });
    s.addText(h.letter, { x, y: 0.85, w: 1.2, h: 1.5, fontSize: 52, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
    s.addText(h.full, { x: x + 1.25, y: 0.85, w: 2.75, h: 0.55, fontSize: 14, bold: true, color: GOLD, valign: "bottom" });
    s.addText(h.details, { x: x + 1.25, y: 1.4, w: 2.75, h: 0.9, fontSize: 11, color: WHITE, valign: "top" });
  });

  // Tennessee vs Mississippi classification
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 2.5, w: 5.9, h: 1.8, fill: { color: "154360" } });
  s.addText("TENNESSEE CLASSIFICATION", { x: 0.2, y: 2.5, w: 5.9, h: 0.4, fontSize: 12, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
  s.addText("Complete HELLP: all 3 criteria present\nPartial (Incomplete) HELLP: 1-2 criteria", {
    x: 0.3, y: 2.95, w: 5.7, h: 1.25, fontSize: 12.5, color: WHITE, valign: "top"
  });

  s.addShape(pres.ShapeType.rect, { x: 6.4, y: 2.5, w: 6.7, h: 1.8, fill: { color: "154360" } });
  s.addText("MISSISSIPPI CLASSIFICATION", { x: 6.4, y: 2.5, w: 6.7, h: 0.4, fontSize: 12, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
  s.addText("Class I: Plt <50,000 + LDH ≥600 + AST/ALT ≥70\nClass II: Plt 50-100,000 + LDH ≥600 + AST/ALT ≥70\nClass III: Plt 100-150,000 + LDH ≥600 + AST/ALT mildly elevated", {
    x: 6.55, y: 2.95, w: 6.4, h: 1.25, fontSize: 12, color: WHITE, valign: "top"
  });

  // Management
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 4.45, w: 12.9, h: 0.42, fill: { color: MED_BLUE } });
  s.addText("MANAGEMENT OF HELLP", { x: 0.2, y: 4.45, w: 12.9, h: 0.42, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });

  const mgtCols = [
    { title: "Immediate", items: ["IV MgSO4 for seizure prophylaxis", "Antihypertensives (BP ≥160/110)", "IV access, crossmatch, ICU criteria", "Expedite delivery if ≥34 weeks"] },
    { title: "Stabilization", items: ["Dexamethasone 10mg IV q12h (< 34 wks)", "Platelet transfusion if <50,000 + bleeding", "Correct coagulopathy (FFP, cryoprecipitate)", "Hepatology input if liver involvement"] },
    { title: "Delivery", items: ["Delivery is definitive treatment", "Vaginal delivery if feasible", "If <34 wks: steroids first, then deliver", "Postpartum worsening can occur 24-48h"] }
  ];
  mgtCols.forEach((mc, i) => {
    const x = 0.2 + i * 4.35;
    s.addShape(pres.ShapeType.rect, { x, y: 4.92, w: 4.1, h: 2.35, fill: { color: "4A1A0E" } });
    s.addText(mc.title, { x, y: 4.92, w: 4.1, h: 0.4, fontSize: 12, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
    const arr = mc.items.map((t, idx) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: idx < mc.items.length - 1, fontSize: 11.5, color: WHITE } }));
    s.addText(arr, { x: x + 0.1, y: 5.35, w: 3.9, h: 1.85, valign: "top" });
  });
}

// =================================================================
// SLIDE 13 — MANAGEMENT OVERVIEW
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  addSectionBar(s, ACCENT_TEAL, "11  |  Management Overview – by Severity & Gestational Age");

  // Table header
  const cols = ["Category", "Gestation", "BP Target", "Antihypertensive", "MgSO4", "Delivery Timing"];
  const colW = [2.5, 1.6, 1.6, 2.3, 1.2, 3.7];
  let startX = 0.15;
  cols.forEach((c, i) => {
    s.addShape(pres.ShapeType.rect, { x: startX, y: 0.85, w: colW[i], h: 0.5, fill: { color: MED_BLUE } });
    s.addText(c, { x: startX, y: 0.85, w: colW[i], h: 0.5, fontSize: 11, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
    startX += colW[i];
  });

  const rows = [
    ["Chronic HTN", "Any", "<140/90", "Labetalol, Nifedipine, Methyldopa", "No", "≥37 wks (uncomplicated)"],
    ["Gestational HTN\n(non-severe)", "≥20 wks", "<140/90", "Oral agents if sustained ≥140/90", "No", "37-38 wks"],
    ["Gestational HTN\n(severe)", "≥20 wks", "<160/110", "IV Labetalol / IV Hydralazine / oral Nifedipine", "Consider", "Deliver after stabilization"],
    ["Preeclampsia\nw/o severe features", "≥20 wks", "<140/90", "Oral agents as needed", "No", "37 wks"],
    ["Preeclampsia\nw/ severe features ≥34 wks", "≥34 wks", "<160/110", "IV agents within 30-60 min", "Yes", "Deliver after stabilization"],
    ["Preeclampsia\nw/ severe 24-34 wks", "24-34 wks", "<160/110", "IV agents + steroids", "Yes", "Expectant to 34 wks if stable"],
    ["Eclampsia", "Any", "<160/110", "IV agents urgently", "Yes — 4g IV bolus then 1-2g/h", "Deliver after seizure control"],
    ["HELLP", "Any", "<160/110", "IV agents urgently", "Yes", "Deliver if ≥34 wks or unstable"]
  ];

  const rowColors = ["163A52", "163A52", "4A1A0E", "1E5631", "4A0E0E", "6E2F0C", "6E1010", "4A1067"];
  rows.forEach((row, ri) => {
    let rx = 0.15;
    const y = 1.4 + ri * 0.73;
    row.forEach((cell, ci) => {
      s.addShape(pres.ShapeType.rect, { x: rx, y, w: colW[ci], h: 0.68, fill: { color: rowColors[ri] } });
      s.addText(cell, { x: rx + 0.05, y, w: colW[ci] - 0.1, h: 0.68, fontSize: 10, color: WHITE, valign: "middle", align: ci === 0 ? "left" : "center" });
      rx += colW[ci];
    });
  });
  s.addText("Sources: ACOG Practice Bulletin 2020 | ISSHP 2021 | NICE 2023 | ESC 2018", {
    x: 0.3, y: 7.2, w: 12.7, h: 0.25, fontSize: 9, color: LIGHT_GRAY, italic: true
  });
}

// =================================================================
// SLIDE 14 — ANTIHYPERTENSIVE THERAPY
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: LIGHT_BG } });
  addSectionBar(s, MED_BLUE, "12  |  Antihypertensive Therapy in Pregnancy");

  const drugs = [
    {
      name: "LABETALOL\n(α & β blocker)",
      color: "1A5276",
      acute: "20-40mg IV q10-15min\nMax 300mg total\nInfusion: 1-2 mg/min",
      chronic: "100-400 mg BD-TID",
      safe: "Yes",
      avoid: "Asthma, heart block"
    },
    {
      name: "HYDRALAZINE\n(Direct vasodilator)",
      color: "1E5631",
      acute: "5-10mg IV q20min\nMax 20mg per episode",
      chronic: "10-50 mg TID-QID",
      safe: "Yes",
      avoid: "Tachycardia risk, lupus-like syndrome"
    },
    {
      name: "NIFEDIPINE\n(CCB)",
      color: "6E2F0C",
      acute: "10-20mg oral (immediate)\nRepeat in 30 min if needed\nDo NOT use sublingual",
      chronic: "30-60 mg XR OD",
      safe: "Yes",
      avoid: "With MgSO4: ↑ neuromuscular blockade"
    },
    {
      name: "METHYLDOPA\n(Central α agonist)",
      color: "154360",
      acute: "Not used acutely",
      chronic: "250-500 mg TID-QID\nMax 3g/day",
      safe: "Yes (most experience)",
      avoid: "Depression, sedation"
    }
  ];

  drugs.forEach((d, i) => {
    const x = 0.15 + i * 3.28;
    s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 3.1, h: 6.35, fill: { color: d.color } });
    s.addText(d.name, { x, y: 0.85, w: 3.1, h: 0.7, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle" });
    s.addShape(pres.ShapeType.line, { x: x + 0.1, y: 1.57, w: 2.9, h: 0, line: { color: GOLD, width: 0.8 } });

    const labels = ["Acute (IV/oral):", "Chronic use:", "Pregnancy safe:", "Cautions:"];
    const vals = [d.acute, d.chronic, d.safe, d.avoid];
    labels.forEach((l, li) => {
      const ly = 1.65 + li * 1.35;
      s.addText(l, { x: x + 0.1, y: ly, w: 2.9, h: 0.35, fontSize: 11, bold: true, color: ACCENT_TEAL, valign: "middle" });
      s.addText(vals[li], { x: x + 0.1, y: ly + 0.35, w: 2.9, h: 0.9, fontSize: 10.5, color: WHITE, valign: "top" });
    });
  });

  // Drugs to AVOID
  s.addShape(pres.ShapeType.rect, { x: 0.15, y: 6.15, w: 12.9, h: 1.1, fill: { color: WARN_RED } });
  s.addText("CONTRAINDICATED IN PREGNANCY:", {
    x: 0.25, y: 6.15, w: 3.2, h: 1.1, fontSize: 12, bold: true, color: WHITE, valign: "middle"
  });
  s.addText("ACE Inhibitors (enalapril, lisinopril) | ARBs (losartan, valsartan) — teratogenic (renal agenesis, oligohydramnios)  |  Direct renin inhibitors (aliskiren)  |  Nitroprusside (fetal cyanide toxicity)", {
    x: 3.55, y: 6.15, w: 9.4, h: 1.1, fontSize: 11.5, color: WHITE, valign: "middle"
  });
}

// =================================================================
// SLIDE 15 — PREVENTION & PROPHYLAXIS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  addSectionBar(s, ACCENT_TEAL, "13  |  Prevention & Prophylaxis – International Recommendations");

  const prevs = [
    {
      title: "LOW-DOSE ASPIRIN\n(LSAS — Grade A)",
      color: "1ABC9C",
      textColor: DARK_NAVY,
      items: [
        "Recommended for women with ≥1 HIGH risk factor or ≥2 moderate risk factors",
        "Dose: 100-162 mg/day (ISSHP: 150 mg/day optimal)",
        "Start: 11-16 weeks gestation (ideally 12 wks), continue to 36 wks",
        "High risk: prior PE, CKD, autoimmune, diabetes, chronic HTN",
        "ASPRE trial: 150 mg at night reduces early PE by 62%",
        "First-trimester combined screening (FMF algorithm) identifies high-risk women",
        "USPSTF 2023: Screening + aspirin recommendation reaffirmed"
      ]
    },
    {
      title: "CALCIUM SUPPLEMENTATION",
      color: "1B4F72",
      textColor: WHITE,
      items: [
        "Dose: 1.5-2g/day elemental calcium",
        "For women with LOW dietary calcium intake",
        "WHO 2018 recommendation: reduces PE by ~50% in low-Ca populations",
        "Mechanism: lowers PTH → reduces intracellular calcium → vasodilation",
        "ISSHP 2021 endorses calcium for populations with low dietary intake",
        "No benefit shown in populations with adequate dietary calcium",
        "Safe, inexpensive, widely available"
      ]
    },
    {
      title: "OTHER STRATEGIES",
      color: "163A52",
      textColor: WHITE,
      items: [
        "Weight optimization pre-pregnancy (BMI <30)",
        "Treatment of underlying conditions (DM, CKD, autoimmune)",
        "Folic acid 400 mcg/day (neural tube + vascular protection)",
        "Vitamin D: emerging evidence but not yet standard",
        "Pravastatin: under investigation (promising in RCTs — 2024/2025)",
        "Antioxidants (Vit C + E): NOT recommended (failed in large RCTs)",
        "Metformin: under investigation for obese/insulin-resistant women",
        "Lifestyle: physical activity, low-salt diet, stress management",
        "Vaginal microbiome optimization (L. crispatus — emerging evidence)"
      ]
    }
  ];

  prevs.forEach((p, i) => {
    const x = 0.2 + i * 4.35;
    s.addShape(pres.ShapeType.rect, { x, y: 0.85, w: 4.1, h: 6.35, fill: { color: p.color } });
    s.addText(p.title, { x, y: 0.85, w: 4.1, h: 0.7, fontSize: 12.5, bold: true, color: i === 0 ? DARK_NAVY : GOLD, align: "center", valign: "middle" });
    s.addShape(pres.ShapeType.line, { x: x + 0.1, y: 1.57, w: 3.9, h: 0, line: { color: i === 0 ? DARK_NAVY : GOLD, width: 0.8 } });
    const arr = p.items.map((t, idx) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: idx < p.items.length - 1, fontSize: 11.5, color: p.textColor } }));
    s.addText(arr, { x: x + 0.1, y: 1.65, w: 3.9, h: 5.65, valign: "top" });
  });
}

// =================================================================
// SLIDE 16 — RECENT ADVANCES 2023-2026
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: LIGHT_BG } });
  addSectionBar(s, MED_BLUE, "14  |  Recent Advances 2023-2026");

  const advances = [
    {
      title: "BIOMARKER ADVANCES",
      color: "1A5276",
      year: "2023-2025",
      items: [
        "sFlt-1/PlGF ratio: FDA cleared in US 2023 (Elecsys BRAHMS)",
        "PlGF-based management reduces NICU admissions (PARROT trial)",
        "Large-scale proteomics predicts HDP weeks before onset (Greenland et al, JAMA Cardiol 2024)",
        "Polygenic risk score for preeclampsia (Honigberg et al, Nat Med 2023)",
        "Maternal serum PIGF at 11-13 wks combined with uterine artery Doppler + MAP → PE screening algorithm",
        "Cell-free DNA: low fetal fraction → adverse outcomes including HDP (2024 meta-analysis)"
      ]
    },
    {
      title: "GENETICS & MOLECULAR",
      color: "1E5631",
      year: "2023-2025",
      items: [
        "FinnGen/Estonian Biobank GWAS: multiple HDP genetic loci (Tyrmi et al, JAMA Cardiol 2023)",
        "STAT3 signaling pathway in preeclampsia (Marzioni et al, Int J Mol Med 2025)",
        "Mitochondrial dysfunction as therapeutic target",
        "Epigenetic modifications: placental DNA methylation patterns",
        "Complement pathway activation in atypical HDP",
        "Microbiome studies: vaginal L. crispatus reduces HDP risk (Li et al, 2024)"
      ]
    },
    {
      title: "NOVEL THERAPEUTICS",
      color: "6E2F0C",
      year: "2024-2026",
      items: [
        "Pravastatin: statin therapy trials for PE prevention (ongoing RCTs — promising safety/efficacy 2024)",
        "Recombinant PlGF (VEGF-mimetics): investigational",
        "Dextran sulfate apheresis to reduce sFlt-1: pilot trials show promise (NKF Primer 2023)",
        "Metformin for PE prevention in obese/insulin-resistant women: meta-analyses ongoing",
        "SGLT2 inhibitors: safety not established, under study",
        "Anti-sFlt-1 aptamers: preclinical stage"
      ]
    },
    {
      title: "GUIDELINES UPDATES",
      color: "154360",
      year: "2021-2025",
      items: [
        "ISSHP 2021: revised classification, endorsed sFlt-1/PlGF for diagnosis",
        "ACOG 2020 (reaffirmed 2023): recommends antihypertensives for all BP ≥140/90",
        "NICE 2023 UK: recommends aspirin 75-150mg for high-risk women",
        "ESC 2018/2022: cardiovascular management during pregnancy",
        "WHO 2025 Factsheet: updated global burden (~42,000 deaths/year)",
        "AHA 2025: new high BP guidelines emphasizing pregnancy health",
        "USPSTF 2023: screening for HDP recommendation statement"
      ]
    }
  ];

  advances.forEach((a, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.2 + col * 6.55;
    const y = 0.85 + row * 3.2;
    s.addShape(pres.ShapeType.rect, { x, y, w: 6.25, h: 3.1, fill: { color: a.color } });
    s.addShape(pres.ShapeType.rect, { x: x + 4.65, y, w: 1.55, h: 0.45, fill: { color: GOLD } });
    s.addText(a.year, { x: x + 4.65, y, w: 1.55, h: 0.45, fontSize: 11, bold: true, color: DARK_NAVY, align: "center", valign: "middle", margin: 0 });
    s.addText(a.title, { x, y, w: 4.6, h: 0.45, fontSize: 12, bold: true, color: GOLD, valign: "middle" });
    s.addShape(pres.ShapeType.line, { x: x + 0.1, y: y + 0.47, w: 6.05, h: 0, line: { color: GOLD, width: 0.8 } });
    const arr = a.items.map((t, idx) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: idx < a.items.length - 1, fontSize: 11.5, color: WHITE } }));
    s.addText(arr, { x: x + 0.1, y: y + 0.55, w: 6.05, h: 2.48, valign: "top" });
  });
}

// =================================================================
// SLIDE 17 — LONG-TERM CONSEQUENCES & POSTPARTUM CARE
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  addSectionBar(s, ACCENT_TEAL, "15  |  Long-Term Consequences & Postpartum Surveillance");

  // Left: long-term consequences timeline
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 0.85, w: 6.6, h: 6.35, fill: { color: "163A52" } });
  s.addText("LONG-TERM MATERNAL RISKS", { x: 0.2, y: 0.85, w: 6.6, h: 0.45, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });

  const ltRisks = [
    ["Hypertension", "4.6× higher risk within 14 years post-PE (BMJ 2017 cohort)"],
    ["CVD", "2× lifetime risk of MI and ischemic heart disease"],
    ["Stroke", "Meta-analysis 2023 (PMID 36990309): significant long-term stroke risk"],
    ["Dementia", "Meta-analysis 2024 (PMID 38278201): increased cognitive decline risk"],
    ["CKD", "Proteinuria, microalbuminuria, impaired renal function"],
    ["Metabolic syndrome", "Insulin resistance, dyslipidemia, obesity cluster"],
    ["Recurrence", "15-25% risk in subsequent pregnancies"],
    ["Offspring", "Increased lifetime CVD/HTN/obesity risk in children born of PE pregnancies"]
  ];

  ltRisks.forEach((r, i) => {
    const y = 1.37 + i * 0.73;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 1.8, h: 0.62, fill: { color: WARN_RED } });
    s.addText(r[0], { x: 0.3, y, w: 1.8, h: 0.62, fontSize: 11, bold: true, color: WHITE, align: "center", valign: "middle", margin: 0 });
    s.addText(r[1], { x: 2.2, y, w: 4.5, h: 0.62, fontSize: 11, color: WHITE, valign: "middle" });
  });

  // Right: postpartum surveillance
  s.addShape(pres.ShapeType.rect, { x: 7.0, y: 0.85, w: 6.1, h: 6.35, fill: { color: "1E5631" } });
  s.addText("POSTPARTUM SURVEILLANCE", { x: 7.0, y: 0.85, w: 6.1, h: 0.45, fontSize: 13, bold: true, color: GOLD, align: "center", valign: "middle", margin: 0 });
  const ppItems = [
    "BP monitoring: every 15 min for 1h postpartum, then 4-hourly",
    "Continue antihypertensives if BP remains ≥150/100 postpartum",
    "MgSO4: continue for 24-48h after delivery",
    "Assess for HELLP: LFTs, CBC 24-48h post delivery",
    "6-week postpartum: check BP, urine PCR, renal function",
    "Echocardiography if postpartum pulmonary edema",
    "Annual CVD screening thereafter: BP, lipids, glucose",
    "Advise lifestyle modification: diet, exercise, weight",
    "Aspirin pre-conception in future pregnancies if prior PE",
    "Inform GP of future cardiovascular risk",
    "Offer preconception counseling before next pregnancy",
    "Consider cardiology/nephrology referral if persistent dysfunction"
  ];
  const ppArr = ppItems.map((t, i) => ({ text: t, options: { bullet: { type: "bullet" }, breakLine: i < ppItems.length - 1, fontSize: 11.5, color: WHITE } }));
  s.addText(ppArr, { x: 7.1, y: 1.35, w: 5.9, h: 5.75, valign: "top" });
}

// =================================================================
// SLIDE 18 — SUMMARY / CONCLUSION
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: DARK_NAVY } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.08, fill: { color: ACCENT_TEAL } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 7.42, w: 13.3, h: 0.08, fill: { color: ACCENT_TEAL } });

  s.addText("Key Takeaways", { x: 0.5, y: 0.25, w: 12.3, h: 0.65, fontSize: 30, bold: true, color: WHITE });

  const keyPoints = [
    "HDP affects 3-8% of pregnancies globally and causes ~16% of all maternal deaths — a major public health crisis.",
    "ISSHP 2021 classifies HDP into: Chronic HTN, Gestational HTN, Preeclampsia (with/without severe features), Eclampsia, and Superimposed PE.",
    "Pathogenesis follows a Two-Stage Model: Stage 1 (silent impaired placentation at 8-18 wks) → Stage 2 (clinical maternal syndrome driven by sFlt-1/sEng release causing endothelial dysfunction).",
    "Proteinuria is NO LONGER required for PE diagnosis — end-organ damage alone is sufficient (ISSHP 2021).",
    "sFlt-1/PlGF ratio is the best validated biomarker for diagnosis and risk stratification; now FDA-cleared in the US (2023).",
    "MgSO4 is the drug of choice for seizure prophylaxis and treatment; reduces eclampsia by >50%.",
    "Antihypertensives of choice: IV Labetalol / IV Hydralazine / oral Nifedipine for acute; Labetalol / Nifedipine XR / Methyldopa for maintenance.",
    "ACE inhibitors and ARBs are CONTRAINDICATED in pregnancy.",
    "Aspirin 100-150 mg/day from 12-16 weeks is recommended for high-risk women (Grade A evidence; ASPRE trial: 62% reduction in early-onset PE).",
    "Delivery is the only definitive treatment; timing depends on severity and gestational age.",
    "HDP confers significant long-term CVD, hypertension, stroke, dementia, and CKD risks — lifelong surveillance is essential.",
    "Recent advances: biomarker-guided management, genetic risk scoring, statin trials, and apheresis therapy are transforming the field."
  ];

  keyPoints.forEach((kp, i) => {
    const col = i < 6 ? 0 : 1;
    const row = col === 0 ? i : i - 6;
    const x = col === 0 ? 0.3 : 6.85;
    const y = 1.1 + row * 1.02;
    s.addShape(pres.ShapeType.rect, { x, y, w: 0.38, h: 0.38, fill: { color: ACCENT_TEAL } });
    s.addText(String(i + 1), { x, y, w: 0.38, h: 0.38, fontSize: 12, bold: true, color: DARK_NAVY, align: "center", valign: "middle", margin: 0 });
    s.addText(kp, { x: x + 0.45, y, w: 6.0, h: 0.95, fontSize: 10.5, color: WHITE, valign: "top" });
  });
}

// =================================================================
// WRITE FILE
// =================================================================
pres.writeFile({ fileName: "/home/daytona/workspace/hdp-presentation/HDP_Presentation.pptx" })
  .then(() => console.log("SUCCESS: /home/daytona/workspace/hdp-presentation/HDP_Presentation.pptx"))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
Reading File

PLEASE DO MAKE PPT

Running Command

ls /home/daytona/workspace/hdp-presentation/

Writing File

~/hdp-presentation/build_new.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5"
pres.author = "Medical Education";
pres.title = "Hypertensive Disorders of Pregnancy";

// ─── COLOR PALETTE ───────────────────────────────────────────────
const DARK_NAVY   = "0D1B2A";
const MED_BLUE    = "1B4F72";
const ACCENT_TEAL = "1ABC9C";
const LIGHT_BG    = "EAF2F8";
const WHITE       = "FFFFFF";
const LIGHT_GRAY  = "D5D8DC";
const WARN_RED    = "C0392B";
const GOLD        = "F1C40F";
const TEXT_DARK   = "1A252F";

// ─── HELPERS ────────────────────────────────────────────────────
function sectionBar(slide, color, text) {
  slide.addShape(pres.ShapeType.rect, { x:0, y:0, w:13.3, h:0.72, fill:{color} });
  slide.addText(text, { x:0.3, y:0, w:12.7, h:0.72, fontSize:20, bold:true, color:WHITE, valign:"middle", margin:0 });
}

function bullets(slide, items, opts) {
  const {x,y,w,h,fontSize=13,color=TEXT_DARK} = opts;
  slide.addText(
    items.map((t,i)=>({ text:t, options:{ bullet:true, breakLine: i<items.length-1, fontSize, color } })),
    {x,y,w,h,valign:"top"}
  );
}

// =================================================================
// SLIDE 1 — TITLE
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, {x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  // gradient stripe
  s.addShape(pres.ShapeType.rect, {x:0,y:2.75,w:13.3,h:0.07,fill:{color:ACCENT_TEAL}});
  s.addShape(pres.ShapeType.rect, {x:0,y:2.83,w:13.3,h:0.05,fill:{color:"16A085"}});

  s.addText("Hypertensive Disorders\nof Pregnancy", {
    x:0.8, y:0.8, w:11.7, h:1.85,
    fontSize:46, bold:true, color:WHITE, align:"center", valign:"middle"
  });
  s.addText("International Guidelines  |  Etiopathogenesis  |  Clinical Features  |  Complications  |  Recent Advances 2023–2026", {
    x:0.8, y:3.0, w:11.7, h:0.5,
    fontSize:15, italic:true, color:ACCENT_TEAL, align:"center"
  });

  const stats = [
    {v:"3–8%",    l:"of all pregnancies"},
    {v:"~16%",    l:"of maternal deaths"},
    {v:"~42,000", l:"deaths/year (2023)"},
    {v:"1 in 7",  l:"US hospital deliveries"}
  ];
  stats.forEach((st,i)=>{
    const x = 0.9 + i*2.9;
    s.addShape(pres.ShapeType.rect, {x, y:3.75, w:2.6, h:1.45, fill:{color:MED_BLUE}, line:{color:ACCENT_TEAL,width:1.5}});
    s.addText(st.v, {x, y:3.78, w:2.6, h:0.75, fontSize:22, bold:true, color:GOLD, align:"center", valign:"middle"});
    s.addText(st.l, {x, y:4.5,  w:2.6, h:0.6,  fontSize:11, color:LIGHT_GRAY, align:"center"});
  });

  s.addText("WHO Dec 2025  |  ISSHP 2021  |  ACOG 2020  |  AFP 2024  |  Creasy & Resnik MFM", {
    x:0.5,y:6.95,w:12.3,h:0.35, fontSize:9.5, color:LIGHT_GRAY, align:"center", italic:true
  });
}

// =================================================================
// SLIDE 2 — TABLE OF CONTENTS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, {x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  s.addText("Contents", {x:0.5,y:0.25,w:8,h:0.65, fontSize:28, bold:true, color:WHITE});
  s.addShape(pres.ShapeType.rect, {x:0.5,y:0.95,w:2.5,h:0.06,fill:{color:ACCENT_TEAL}});

  const items = [
    ["01","Definitions & ISSHP 2021 Classification"],
    ["02","Epidemiology & Risk Factors"],
    ["03","Etiopathogenesis — Two-Stage Model"],
    ["04","Angiogenic Imbalance (sFlt-1 / PlGF)"],
    ["05","Immunologic, Genetic & Oxidative Stress"],
    ["06","Diagnostic Criteria"],
    ["07","Clinical Features — Organ Systems"],
    ["08","Maternal Complications"],
    ["09","Fetal & Neonatal Complications"],
    ["10","HELLP Syndrome"],
    ["11","Management Overview"],
    ["12","Antihypertensive Therapy"],
    ["13","Prevention & Prophylaxis"],
    ["14","Recent Advances 2023–2026"],
    ["15","Long-term Consequences & Postpartum Care"],
  ];
  items.forEach((it,i)=>{
    const col = i<8?0:1;
    const row = col===0?i:i-8;
    const x = col===0 ? 0.5 : 7.0;
    const y = 1.1 + row*0.77;
    s.addShape(pres.ShapeType.rect, {x, y, w:0.58, h:0.55, fill:{color:ACCENT_TEAL}});
    s.addText(it[0], {x, y, w:0.58, h:0.55, fontSize:14, bold:true, color:DARK_NAVY, align:"center", valign:"middle", margin:0});
    s.addText(it[1], {x:x+0.68, y, w:5.8, h:0.55, fontSize:13.5, color:WHITE, valign:"middle"});
  });
}

// =================================================================
// SLIDE 3 — CLASSIFICATION
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, {x:0,y:0,w:13.3,h:7.5,fill:{color:LIGHT_BG}});
  sectionBar(s, MED_BLUE, "01  |  Definitions & ISSHP 2021 Classification");

  const cats = [
    { title:"CHRONIC\nHYPERTENSION",      fill:"1B4F72",
      items:["BP ≥140/90 mmHg before 20 wks gestation","Pre-existing hypertension before pregnancy","Includes essential & secondary hypertension","Persists >12 weeks postpartum"] },
    { title:"GESTATIONAL\nHYPERTENSION",   fill:"21618C",
      items:["New BP ≥140/90 after 20 weeks' gestation","No proteinuria, no end-organ damage","Resolves within 12 weeks postpartum","Severe if ≥160/110 mmHg"] },
    { title:"PREECLAMPSIA",                 fill:"117A65",
      items:["Gestational HTN + proteinuria (≥300 mg/24h)","OR Gestational HTN + end-organ damage","Proteinuria no longer mandatory (ISSHP 2021)","Early-onset (<34 wks) vs Late-onset (≥34 wks)"] },
    { title:"ECLAMPSIA",                    fill:"922B21",
      items:["New-onset generalised seizures in preeclampsia","No other attributable cause","Antepartum / intrapartum / postpartum","Medical emergency — MgSO₄ treatment"] },
    { title:"SUPERIMPOSED\nPREECLAMPSIA",  fill:"784212",
      items:["Chronic HTN + new proteinuria after 20 wks","Sudden worsening of pre-existing HTN","New end-organ dysfunction on chronic HTN","Higher risk than either condition alone"] },
  ];

  cats.forEach((c,i)=>{
    const col = i<3?i:i-3;
    const x   = i<3 ? 0.15+i*4.35 : 2.35+col*4.35;
    const y   = i<3 ? 0.9 : 4.05;
    const w=4.1, h=i<3?2.9:3.0;
    s.addShape(pres.ShapeType.rect, {x,y,w,h,fill:{color:c.fill}});
    s.addText(c.title, {x,y:y+0.05,w,h:0.65,fontSize:12.5,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
    s.addShape(pres.ShapeType.line,{x:x+0.15,y:y+0.73,w:w-0.3,h:0,line:{color:GOLD,width:0.8}});
    bullets(s, c.items, {x:x+0.1,y:y+0.78,w:w-0.2,h:h-0.88,fontSize:11.5,color:WHITE});
  });
  s.addText("Magee et al. Pregnancy Hypertens. 2022;27:148–169 (ISSHP 2021)  |  ACOG Practice Bulletin 2020",
    {x:0.3,y:7.22,w:12.7,h:0.24,fontSize:8.5,color:MED_BLUE,italic:true});
}

// =================================================================
// SLIDE 4 — EPIDEMIOLOGY & RISK FACTORS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, {x:0,y:0,w:13.3,h:7.5,fill:{color:LIGHT_BG}});
  sectionBar(s, MED_BLUE, "02  |  Epidemiology & Risk Factors");

  // Epi panel
  s.addShape(pres.ShapeType.rect, {x:0.15,y:0.85,w:4.1,h:6.4,fill:{color:MED_BLUE}});
  s.addText("EPIDEMIOLOGY", {x:0.15,y:0.85,w:4.1,h:0.45,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
  bullets(s,[
    "3–8% of all pregnancies worldwide",
    "Prevalence rising in USA (2017–2019)",
    "7% of US pregnancy-related deaths",
    "~16% of global maternal deaths",
    "~42,000 deaths/year (WHO 2023)",
    "HDP: leading maternal cause in Indiana (2025)",
    "Preeclampsia: 5–8% globally",
    "Eclampsia: 1–2% of PE cases",
    "Twins: 10–20% PE incidence",
    "Triplets: 25–60% PE incidence",
    "Quadruplets: up to 90% PE incidence",
    "44% of maternal deaths in 1st 6 days post-delivery linked to HDP",
  ],{x:0.28,y:1.35,w:3.85,h:5.8,fontSize:11.5,color:WHITE});

  // Risk factor columns
  const rfCols=[
    {title:"NON-MODIFIABLE", fill:"1A5276", items:[
      "Nulliparity (primigravida)","Age >35 or <18 years",
      "Prior preeclampsia history","Family history (mother/sister)",
      "Multiple gestation","IVF / ART conception",
      "Hydatidiform mole","New paternity / primipaternity",
      "Born small for gestational age","Father born of PE pregnancy",
      "ICSI conception","Black/African-descent ethnicity"
    ]},
    {title:"MODIFIABLE", fill:"1E5631", items:[
      "Obesity / BMI >30 kg/m²","Chronic hypertension",
      "Diabetes mellitus (T1 or T2)","Chronic kidney disease",
      "Dyslipidemia","Thrombophilia / APS",
      "Sleep-disordered breathing","Autoimmune disease (SLE, RA)",
      "High-sodium diet","Physical inactivity",
      "Chronic psychosocial stress","Low calcium / vitamin D intake"
    ]},
  ];
  rfCols.forEach((col,i)=>{
    const x=4.4+i*4.5;
    s.addShape(pres.ShapeType.rect,{x,y:0.85,w:4.2,h:6.4,fill:{color:col.fill}});
    s.addText(col.title+" RISK FACTORS",{x,y:0.85,w:4.2,h:0.45,fontSize:12,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
    bullets(s,col.items,{x:x+0.12,y:1.35,w:3.96,h:5.8,fontSize:11.5,color:WHITE});
  });
}

// =================================================================
// SLIDE 5 — ETIOPATHOGENESIS: TWO-STAGE MODEL
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, {x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  sectionBar(s, ACCENT_TEAL, "03  |  Etiopathogenesis — Two-Stage Model (Roberts & Hubel)");

  // Stage 1
  s.addShape(pres.ShapeType.rect, {x:0.15,y:0.85,w:6.05,h:6.4,fill:{color:"163A52"}});
  s.addShape(pres.ShapeType.rect, {x:0.15,y:0.85,w:6.05,h:0.52,fill:{color:ACCENT_TEAL}});
  s.addText("STAGE 1 — Impaired Placentation  (8–18 weeks, clinically silent)", {
    x:0.15,y:0.85,w:6.05,h:0.52,fontSize:12.5,bold:true,color:DARK_NAVY,align:"center",valign:"middle",margin:0
  });
  bullets(s,[
    "Extravillous trophoblasts (EVTs) invade decidua & myometrium",
    "Normal: EVTs remodel spiral arteries → low-resistance, high-flow vessels",
    "In PE: Shallow trophoblast invasion — incomplete spiral artery remodeling",
    "Myometrial segments remain muscular & vasoactive",
    "Results in uteroplacental ischaemia & placental hypoxia",
    "Hypoxia triggers HIF-1α → upregulates sFlt-1 production",
    "NFkB activation → proinflammatory cytokine cascade",
    "Pathologic acute atherosis in 10% of PE placentas",
    "Defective immune tolerance: NK cell/HLA-C mismatch",
    "AT1R autoantibodies activate renin-angiotensin axis",
    "Increased necrotic trophoblast shedding → systemic inflammation",
    "Placental microparticle shedding → oxidative stress",
    "This stage is clinically SILENT — no symptoms"
  ],{x:0.28,y:1.42,w:5.78,h:5.75,fontSize:11.5,color:WHITE});

  // Arrow
  s.addShape(pres.ShapeType.rect,{x:6.35,y:3.55,w:0.7,h:0.55,fill:{color:GOLD}});
  s.addText("→",{x:6.35,y:3.55,w:0.7,h:0.55,fontSize:24,bold:true,color:DARK_NAVY,align:"center",valign:"middle",margin:0});

  // Stage 2
  s.addShape(pres.ShapeType.rect,{x:7.1,y:0.85,w:6.05,h:6.4,fill:{color:"4A0E0E"}});
  s.addShape(pres.ShapeType.rect,{x:7.1,y:0.85,w:6.05,h:0.52,fill:{color:WARN_RED}});
  s.addText("STAGE 2 — Maternal Syndrome  (clinical disease, 2nd/3rd trimester)",{
    x:7.1,y:0.85,w:6.05,h:0.52,fontSize:12.5,bold:true,color:WHITE,align:"center",valign:"middle",margin:0
  });
  bullets(s,[
    "Diseased placenta releases antiangiogenic factors systemically",
    "↑ sFlt-1 (soluble fms-like tyrosine kinase-1) — markedly elevated",
    "↑ Soluble endoglin (sEng) — inhibits TGF-β signaling",
    "↓ Free PlGF (placental growth factor) — markedly reduced",
    "sFlt-1 sequesters free VEGF and PlGF → endothelial receptor blockade",
    "Systemic endothelial dysfunction → vasoconstriction",
    "↑ Sensitivity to angiotensin II, vasopressin, norepinephrine",
    "↓ Prostacyclin (PGI₂) / ↑ Thromboxane A₂ (TXA₂) imbalance",
    "Disrupted NO-mediated vasodilation",
    "Glomerular endotheliosis → proteinuria (pathognomonic on biopsy)",
    "3 mechanisms (Creasy & Resnik): (1) Abnormal placentation → excess sFlt-1/sEng; (2) Preexisting endothelial sensitization (e.g., obesity); (3) Excess placental mass (multiple gestation)",
  ],{x:7.22,y:1.42,w:5.78,h:5.75,fontSize:11.5,color:WHITE});
}

// =================================================================
// SLIDE 6 — ANGIOGENIC IMBALANCE
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:LIGHT_BG}});
  sectionBar(s, MED_BLUE, "04  |  Angiogenic Imbalance — sFlt-1, PlGF & Soluble Endoglin");

  // Normal
  s.addShape(pres.ShapeType.rect,{x:0.15,y:0.85,w:6.1,h:3.0,fill:{color:"D5F5E3"}});
  s.addShape(pres.ShapeType.rect,{x:0.15,y:0.85,w:6.1,h:0.45,fill:{color:"1E8449"}});
  s.addText("NORMAL PREGNANCY",{x:0.15,y:0.85,w:6.1,h:0.45,fontSize:13,bold:true,color:WHITE,align:"center",valign:"middle",margin:0});
  bullets(s,[
    "Balanced proangiogenic environment",
    "VEGF & PlGF bind VEGFR-1/2 on endothelium freely",
    "TGF-β1 signalling via endoglin → vessel stability",
    "Low circulating sFlt-1 and sEng",
    "Adequate uteroplacental perfusion maintained",
    "Endothelial NO production preserved → vasodilation",
    "Peripheral vascular resistance falls ~25% in normal pregnancy",
  ],{x:0.28,y:1.35,w:5.84,h:2.42,fontSize:12,color:TEXT_DARK});

  // PE
  s.addShape(pres.ShapeType.rect,{x:6.55,y:0.85,w:6.6,h:3.0,fill:{color:"FDEDEC"}});
  s.addShape(pres.ShapeType.rect,{x:6.55,y:0.85,w:6.6,h:0.45,fill:{color:WARN_RED}});
  s.addText("PREECLAMPSIA",{x:6.55,y:0.85,w:6.6,h:0.45,fontSize:13,bold:true,color:WHITE,align:"center",valign:"middle",margin:0});
  bullets(s,[
    "↑↑ sFlt-1: sequesters free VEGF + PlGF → endothelial receptor blockade",
    "↑ sEng: blocks TGF-β1 → impaired NO/PGI₂ production",
    "↓↓ Free PlGF: marker detectable weeks before clinical disease",
    "sFlt-1/PlGF ratio >38 predicts PE within 4 weeks (Zeisler et al, NEJM 2016)",
    "Ratio >85 = severe disease; correlates with adverse outcomes",
    "Exogenous VEGF administration reverses PE in animal models",
  ],{x:6.68,y:1.35,w:6.34,h:2.42,fontSize:12,color:TEXT_DARK});

  // Biomarker utility strip
  s.addShape(pres.ShapeType.rect,{x:0.15,y:4.0,w:12.95,h:0.45,fill:{color:MED_BLUE}});
  s.addText("CLINICAL UTILITY OF BIOMARKERS — Recent Advances",
    {x:0.15,y:4.0,w:12.95,h:0.45,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});

  const bio=[
    {t:"sFlt-1/PlGF Ratio",d:"FDA-cleared in USA 2023 (Elecsys BRAHMS). ISSHP 2021 & FIGO 2019 endorsed for rule-in/rule-out of PE in symptomatic women."},
    {t:"PlGF-based mgmt",d:"PARROT RCT: PlGF-based testing reduces NICU admissions. Low PlGF (<12 pg/mL at 19–23 wks) predicts severe early-onset PE."},
    {t:"Early-pregnancy proteomics",d:"Greenland et al, JAMA Cardiol 2024: large-scale proteomics in early pregnancy predicts HDP weeks before clinical onset."},
    {t:"Polygenic risk score",d:"Honigberg et al, Nat Med 2023: polygenic prediction improves preconception risk stratification for PE and gestational HTN."},
  ];
  bio.forEach((b,i)=>{
    const x=0.22+i*3.25;
    s.addShape(pres.ShapeType.rect,{x,y:4.5,w:3.1,h:2.75,fill:{color:"163A52"}});
    s.addText(b.t,{x,y:4.5,w:3.1,h:0.45,fontSize:12,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
    s.addText(b.d,{x:x+0.08,y:4.98,w:2.94,h:2.2,fontSize:11,color:WHITE,valign:"top"});
  });
}

// =================================================================
// SLIDE 7 — IMMUNOLOGIC & GENETIC
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  sectionBar(s, ACCENT_TEAL, "05  |  Immunologic, Genetic & Oxidative Stress Mechanisms");

  const panels=[
    {title:"IMMUNOLOGIC\nMECHANISMS", fill:"1A5276", items:[
      "Fetal antigens trigger immune recognition in mother",
      "Abnormal uterine NK cell activity",
      "KIR/HLA-C polymorphism: molecular evidence for immune dysregulation",
      "Increased dendritic cells & macrophage infiltration in PE placentas",
      "Chronic villitis and pathologic inflammation",
      "AT1R autoantibodies activate renin-angiotensin system",
      "Systemic neutrophil activation → vascular injury",
      "Primipaternity / new partner: reduced immune tolerance",
      "IVF/donor oocyte: diminished tolerance to foreign antigens",
      "NK/macrophage ratio alteration in decidua"
    ]},
    {title:"GENETIC\nFACTORS", fill:"1E5631", items:[
      "4× increased risk in sisters of preeclamptic women",
      "15% incidence in mothers vs 4% in mothers-in-law",
      "Multifactorial inheritance — no single causative gene",
      "FinnGen/Estonian GWAS: multiple HDP loci (Tyrmi et al, JAMA Cardiol 2023)",
      "Polygenic risk scoring (Honigberg et al, Nat Med 2023)",
      "STAT3 signalling pathway (Marzioni et al, Int J Mol Med 2025)",
      "COMT, heme oxygenase, corin gene variants → ↑ sFlt-1",
      "Mitochondrial genetic variants: emerging evidence",
      "Epigenetic modifications of placental gene expression",
      "Complement pathway activation in atypical HDP"
    ]},
    {title:"OXIDATIVE\nSTRESS", fill:"6E2F0C", items:[
      "Excess reactive oxygen species (ROS) beyond antioxidant capacity",
      "Lipid peroxidation products elevated in PE serum",
      "Nitrotyrosine, protein carbonyls in blood/vessels/placenta",
      "Reduced antioxidants: Vit C, Vit E, glutathione",
      "Antibodies to oxidised LDL in excess",
      "Changes precede clinical preeclampsia onset",
      "Large RCTs: Vit C + Vit E failed to prevent PE",
      "Oxidative stress likely consequence rather than primary cause",
      "Endothelial mitochondrial dysfunction: key emerging target",
      "Interacts with antiangiogenic factors in vascular damage"
    ]},
  ];
  panels.forEach((p,i)=>{
    const x=0.15+i*4.38;
    s.addShape(pres.ShapeType.rect,{x,y:0.85,w:4.15,h:6.4,fill:{color:p.fill}});
    s.addText(p.title,{x,y:0.85,w:4.15,h:0.65,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
    s.addShape(pres.ShapeType.line,{x:x+0.1,y:1.52,w:3.95,h:0,line:{color:GOLD,width:0.8}});
    bullets(s,p.items,{x:x+0.1,y:1.58,w:3.95,h:5.6,fontSize:11.5,color:WHITE});
  });
}

// =================================================================
// SLIDE 8 — DIAGNOSTIC CRITERIA
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:LIGHT_BG}});
  sectionBar(s, MED_BLUE, "06  |  Diagnostic Criteria (ISSHP 2021 / ACOG 2020)");

  s.addShape(pres.ShapeType.rect,{x:0.15,y:0.85,w:6.15,h:2.85,fill:{color:MED_BLUE}});
  s.addText("BLOOD PRESSURE THRESHOLDS",{x:0.15,y:0.85,w:6.15,h:0.45,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
  bullets(s,[
    "Hypertension: ≥140 mmHg systolic AND/OR ≥90 mmHg diastolic",
    "Severe HTN: ≥160 mmHg systolic OR ≥110 mmHg diastolic",
    "Minimum 2 readings at least 4 hours apart (15 min if severe)",
    "Measured after ≥5 min rest in seated position",
    "Confirm with ABPM or home monitoring if borderline",
    "Treatment target: <140/90 mmHg (ACOG/ISSHP consensus)"
  ],{x:0.28,y:1.35,w:5.9,h:2.25,fontSize:12,color:WHITE});

  s.addShape(pres.ShapeType.rect,{x:6.5,y:0.85,w:6.65,h:2.85,fill:{color:"154360"}});
  s.addText("PROTEINURIA CRITERIA",{x:6.5,y:0.85,w:6.65,h:0.45,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
  bullets(s,[
    "24-hour urine protein: ≥300 mg (gold standard)",
    "Protein:creatinine ratio (PCR): ≥30 mg/mmol (0.3 mg/mg)",
    "Dipstick 2+ only if other methods unavailable",
    "Proteinuria is NOT mandatory for PE diagnosis (ISSHP 2021)",
    "End-organ damage alone is sufficient: thrombocytopenia, AKI, liver injury, pulmonary oedema, new neurologic symptoms"
  ],{x:6.65,y:1.35,w:6.38,h:2.25,fontSize:12,color:WHITE});

  // Severe features table
  s.addShape(pres.ShapeType.rect,{x:0.15,y:3.82,w:12.95,h:0.45,fill:{color:WARN_RED}});
  s.addText("SEVERE FEATURES OF PREECLAMPSIA — any one criterion = severe disease",
    {x:0.15,y:3.82,w:12.95,h:0.45,fontSize:13,bold:true,color:WHITE,align:"center",valign:"middle",margin:0});

  const sev=[
    {cat:"Neurologic",   items:["Severe unresponsive headache","Visual disturbances (scotomata)","Altered consciousness / seizure"]},
    {cat:"Hematologic",  items:["Platelets <100,000/µL","Hemolysis (MAHA)","DIC / coagulopathy"]},
    {cat:"Hepatic",      items:["AST/ALT >2× ULN","Severe RUQ/epigastric pain","Subcapsular hematoma"]},
    {cat:"Renal",        items:["Creatinine >1.1 mg/dL","Oliguria <500 mL/24 h","GFR significantly reduced"]},
    {cat:"Pulmonary",    items:["Pulmonary oedema","O₂ sat <94% on room air","Dyspnoea at rest"]},
    {cat:"BP / Fetal",   items:["BP ≥160/110 mmHg","Fetal growth restriction","Reverse end-diastolic flow"]},
  ];
  sev.forEach((sf,i)=>{
    const col=i%3, row=Math.floor(i/3);
    const x=0.15+col*4.32, y=4.35+row*1.55;
    s.addShape(pres.ShapeType.rect,{x,y,w:4.1,h:1.48,fill:{color:"4A0E0E"}});
    s.addText(sf.cat,{x,y,w:4.1,h:0.38,fontSize:12,bold:true,color:WARN_RED,align:"center",valign:"middle",margin:0});
    bullets(s,sf.items,{x:x+0.08,y:y+0.4,w:3.94,h:1.02,fontSize:11,color:WHITE});
  });
}

// =================================================================
// SLIDE 9 — CLINICAL FEATURES
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  sectionBar(s, ACCENT_TEAL, "07  |  Clinical Features — Organ System Involvement");

  const sys=[
    {name:"CARDIOVASCULAR",fill:"6E1010",items:["Hypertension (may be labile)","↑ Systemic vascular resistance","↓ Cardiac output vs normal pregnancy","Exaggerated response to vasopressors","Peripheral vasospasm","Non-dependent peripheral oedema"]},
    {name:"RENAL",          fill:"0E4D6E",items:["Proteinuria (hallmark of PE)","Glomerular endotheliosis (pathognomonic)","Oliguria (<500 mL/24h in severe PE)","↑ Serum creatinine & uric acid","GFR reduction up to 30%","Sodium and water retention"]},
    {name:"NEUROLOGIC",     fill:"4A1067",items:["Severe frontal headache","Visual disturbances (scotomata, blurring)","Hyperreflexia and clonus","Cortical blindness (rare)","Cerebral oedema / PRES syndrome","Tonic-clonic seizures (eclampsia)"]},
    {name:"HEPATIC",        fill:"765400",items:["RUQ / epigastric pain","Elevated AST, ALT (>2× ULN)","Nausea and vomiting","Subcapsular hematoma (rare)","Liver rupture (life-threatening)","Component of HELLP syndrome"]},
    {name:"HEMATOLOGIC",    fill:"1E5631",items:["Thrombocytopenia (<100,000/µL)","Microangiopathic haemolytic anaemia","DIC in severe cases","↑ LDH (>600 U/L)","Schistocytes on peripheral smear","Reduced fibrinogen (severe)"]},
    {name:"PLACENTA/FETAL", fill:"2E4057",items:["Placental insufficiency / infarcts","Fetal growth restriction (FGR)","Oligohydramnios","Absent/reversed umbilical Doppler","Non-reassuring fetal status","↑ Perinatal mortality"]},
  ];
  sys.forEach((sy,i)=>{
    const col=i%3, row=Math.floor(i/3);
    const x=0.15+col*4.38, y=0.85+row*3.27;
    s.addShape(pres.ShapeType.rect,{x,y,w:4.15,h:3.15,fill:{color:sy.fill}});
    s.addText(sy.name,{x,y,w:4.15,h:0.48,fontSize:12.5,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
    s.addShape(pres.ShapeType.line,{x:x+0.1,y:y+0.5,w:3.95,h:0,line:{color:GOLD,width:0.8}});
    bullets(s,sy.items,{x:x+0.1,y:y+0.56,w:3.95,h:2.52,fontSize:11.5,color:WHITE});
  });
}

// =================================================================
// SLIDE 10 — MATERNAL COMPLICATIONS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:LIGHT_BG}});
  sectionBar(s, WARN_RED, "08  |  Maternal Complications");

  s.addShape(pres.ShapeType.rect,{x:0.15,y:0.85,w:6.05,h:6.4,fill:{color:"6E1010"}});
  s.addText("ACUTE / IMMEDIATE",{x:0.15,y:0.85,w:6.05,h:0.45,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
  bullets(s,[
    "Eclampsia (generalised seizures)",
    "HELLP syndrome (haemolysis, ↑LFTs, ↓platelets)",
    "Acute pulmonary oedema",
    "Acute kidney injury (AKI)",
    "Placental abruption",
    "Disseminated intravascular coagulation (DIC)",
    "Stroke / intracranial haemorrhage",
    "Liver rupture / subcapsular haematoma",
    "Myocardial infarction / acute heart failure",
    "Retinal detachment / cortical blindness",
    "Hypertensive encephalopathy",
    "Maternal death"
  ],{x:0.28,y:1.35,w:5.8,h:5.8,fontSize:12.5,color:WHITE});

  s.addShape(pres.ShapeType.rect,{x:7.1,y:0.85,w:6.05,h:6.4,fill:{color:"4A1067"}});
  s.addText("LONG-TERM / REMOTE",{x:7.1,y:0.85,w:6.05,h:0.45,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
  bullets(s,[
    "Hypertension: 4.6× risk within 14 years (BMJ 2017)",
    "Cardiovascular disease: 2× lifetime risk of MI/stroke",
    "Chronic kidney disease (CKD) and proteinuria",
    "Increased dementia risk (meta-analysis, PMID 38278201, 2024)",
    "Increased stroke risk (meta-analysis, PMID 36990309, 2023)",
    "Type 2 diabetes mellitus",
    "Metabolic syndrome (obesity, dyslipidaemia, insulin resistance)",
    "Subclinical cardiac dysfunction",
    "Risk of recurrence in subsequent pregnancies: 15–25%",
    "Offspring: ↑ lifetime CVD, HTN, obesity risk",
    "Increased all-cause mortality (long-term studies)"
  ],{x:7.22,y:1.35,w:5.8,h:5.8,fontSize:12.5,color:WHITE});

  s.addShape(pres.ShapeType.rect,{x:6.25,y:3.3,w:0.8,h:0.7,fill:{color:WARN_RED}});
  s.addText("⟹",{x:6.25,y:3.3,w:0.8,h:0.7,fontSize:24,color:WHITE,align:"center",valign:"middle",margin:0});
}

// =================================================================
// SLIDE 11 — FETAL COMPLICATIONS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  sectionBar(s, ACCENT_TEAL, "09  |  Fetal & Neonatal Complications");

  const fc=[
    {cat:"FETAL GROWTH",     fill:"163A52", items:["Fetal growth restriction (FGR)","Small for gestational age (SGA)","Low birth weight (<2500 g)","Oligohydramnios"]},
    {cat:"DELIVERY OUTCOMES",fill:"1A5276", items:["Iatrogenic preterm birth","Emergency caesarean section","Low gestational age at delivery","High NICU admission rates"]},
    {cat:"PERFUSION",        fill:"0E4D6E", items:["Uteroplacental insufficiency","Absent/reversed end-diastolic flow","Perinatal asphyxia","Stillbirth / fetal death"]},
    {cat:"NEONATAL",         fill:"2E4057", items:["Respiratory distress syndrome","Necrotising enterocolitis","Intraventricular haemorrhage","Retinopathy of prematurity"]},
    {cat:"PLACENTAL",        fill:"4A1A0E", items:["Placental abruption","Placental infarcts","Abnormal placental morphology","Abnormal cord insertion"]},
    {cat:"LONG-TERM\nOFFSPRING",fill:"1E5631",items:["Hypertension in adult life","Obesity and metabolic syndrome","Cardiovascular disease risk","Cognitive/neurodevelopmental issues (maternal inflammation — Maher et al 2019)"]},
  ];
  fc.forEach((f,i)=>{
    const col=i%3, row=Math.floor(i/3);
    const x=0.15+col*4.38, y=0.85+row*3.27;
    s.addShape(pres.ShapeType.rect,{x,y,w:4.15,h:3.15,fill:{color:f.fill}});
    s.addText(f.cat,{x,y,w:4.15,h:0.48,fontSize:12.5,bold:true,color:ACCENT_TEAL,align:"center",valign:"middle",margin:0});
    s.addShape(pres.ShapeType.line,{x:x+0.1,y:y+0.5,w:3.95,h:0,line:{color:ACCENT_TEAL,width:0.8}});
    bullets(s,f.items,{x:x+0.1,y:y+0.56,w:3.95,h:2.52,fontSize:12,color:WHITE});
  });
}

// =================================================================
// SLIDE 12 — HELLP SYNDROME
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:LIGHT_BG}});
  sectionBar(s, WARN_RED, "10  |  HELLP Syndrome — Classification, Diagnosis & Management");

  const hellp=[
    {letter:"H",  full:"Haemolysis",           detail:"LDH >600 U/L\nTotal bilirubin >1.2 mg/dL\nSchistocytes on peripheral smear"},
    {letter:"EL", full:"Elevated Liver Enzymes", detail:"AST/ALT >70 U/L (>2× ULN)\nRUQ / epigastric pain\nNausea and vomiting"},
    {letter:"LP", full:"Low Platelets",          detail:"Plt <100,000/µL\nClass I: <50,000\nClass II: 50,000–100,000"},
  ];
  hellp.forEach((h,i)=>{
    const x=0.15+i*4.38;
    s.addShape(pres.ShapeType.rect,{x,y:0.85,w:4.15,h:1.6,fill:{color:WARN_RED}});
    s.addText(h.letter,{x,y:0.85,w:1.1,h:1.6,fontSize:56,bold:true,color:WHITE,align:"center",valign:"middle",margin:0});
    s.addText(h.full,{x:x+1.12,y:0.85,w:2.95,h:0.55,fontSize:14,bold:true,color:GOLD,valign:"bottom"});
    s.addText(h.detail,{x:x+1.12,y:1.42,w:2.95,h:0.95,fontSize:11,color:WHITE,valign:"top"});
  });

  // Classification boxes
  s.addShape(pres.ShapeType.rect,{x:0.15,y:2.6,w:6.1,h:2.0,fill:{color:"154360"}});
  s.addText("TENNESSEE CLASSIFICATION",{x:0.15,y:2.6,w:6.1,h:0.42,fontSize:12.5,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
  s.addText("Complete HELLP: All 3 criteria present\nPartial (Incomplete) HELLP: 1 or 2 criteria\nHigher risk with complete HELLP",
    {x:0.28,y:3.05,w:5.86,h:1.45,fontSize:13,color:WHITE,valign:"top"});

  s.addShape(pres.ShapeType.rect,{x:6.5,y:2.6,w:6.65,h:2.0,fill:{color:"154360"}});
  s.addText("MISSISSIPPI CLASSIFICATION (Martin et al)",{x:6.5,y:2.6,w:6.65,h:0.42,fontSize:12.5,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
  s.addText("Class I: Plt <50,000 + LDH ≥600 + AST/ALT ≥70 — worst prognosis\nClass II: Plt 50,000–100,000 + LDH ≥600 + AST/ALT ≥70\nClass III: Plt 100,000–150,000 + mild enzyme elevation",
    {x:6.65,y:3.05,w:6.4,h:1.45,fontSize:12.5,color:WHITE,valign:"top"});

  // Management
  s.addShape(pres.ShapeType.rect,{x:0.15,y:4.72,w:12.95,h:0.42,fill:{color:MED_BLUE}});
  s.addText("MANAGEMENT",{x:0.15,y:4.72,w:12.95,h:0.42,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});

  const mgt=[
    {t:"Immediate",  items:["IV MgSO₄ for seizure prophylaxis","IV antihypertensives (BP ≥160/110)","IV access, crossmatch, ICU criteria","Expedite delivery if ≥34 weeks"]},
    {t:"Stabilise",  items:["Dexamethasone 10 mg IV q12h (<34 wks)","Platelet transfusion if <50,000 + bleeding","Correct coagulopathy: FFP, cryoprecipitate","Hepatology input if liver involvement"]},
    {t:"Delivery",   items:["Delivery is DEFINITIVE treatment","Vaginal delivery if feasible","<34 wks: steroids first, then deliver","Postpartum worsening: watch 24–48h"]},
  ];
  mgt.forEach((m,i)=>{
    const x=0.15+i*4.38;
    s.addShape(pres.ShapeType.rect,{x,y:5.18,w:4.15,h:2.2,fill:{color:"4A1A0E"}});
    s.addText(m.t,{x,y:5.18,w:4.15,h:0.4,fontSize:12.5,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
    bullets(s,m.items,{x:x+0.1,y:5.62,w:3.95,h:1.7,fontSize:11.5,color:WHITE});
  });
}

// =================================================================
// SLIDE 13 — MANAGEMENT OVERVIEW TABLE
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  sectionBar(s, ACCENT_TEAL, "11  |  Management Overview — by Severity & Gestational Age");

  const cols=["Category","Gestation","BP Target","Antihypertensive","MgSO₄","Delivery Timing"];
  const cw=[2.55,1.45,1.45,2.5,1.1,4.1];
  let sx=0.1;
  cols.forEach((c,i)=>{
    s.addShape(pres.ShapeType.rect,{x:sx,y:0.85,w:cw[i],h:0.52,fill:{color:MED_BLUE}});
    s.addText(c,{x:sx,y:0.85,w:cw[i],h:0.52,fontSize:11,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
    sx+=cw[i];
  });

  const rows=[
    ["Chronic HTN","Any","<140/90","Labetalol, Nifedipine XR, Methyldopa","No","≥37 wks (uncomplicated)"],
    ["Gestational HTN\n(non-severe)","≥20 wks","<140/90","Oral agents if sustained ≥140/90","No","37–38 wks"],
    ["Gestational HTN\n(severe-range)","≥20 wks","<160/110","IV Labetalol / IV Hydralazine / oral Nifedipine","Consider","After stabilisation"],
    ["Preeclampsia\nw/o severe features","≥20 wks","<140/90","Oral agents as needed","No","37 wks"],
    ["Preeclampsia\nw/ severe ≥34 wks","≥34 wks","<160/110","IV agents within 30–60 min","Yes","After stabilisation"],
    ["Preeclampsia\nw/ severe 24–34 wks","24–34 wks","<160/110","IV agents + corticosteroids","Yes","Expectant to 34 wks if stable"],
    ["Eclampsia","Any","<160/110","IV agents urgently","Yes — 4g bolus, 1–2g/h","After seizure control"],
    ["HELLP Syndrome","Any","<160/110","IV agents urgently","Yes","≥34 wks or if unstable: deliver"],
  ];
  const rc=["163A52","163A52","4A1A0E","1E5631","4A0E0E","6E2F0C","6E1010","4A1067"];
  rows.forEach((row,ri)=>{
    let rx=0.1;
    const y=1.42+ri*0.74;
    row.forEach((cell,ci)=>{
      s.addShape(pres.ShapeType.rect,{x:rx,y,w:cw[ci],h:0.7,fill:{color:rc[ri]}});
      s.addText(cell,{x:rx+0.04,y,w:cw[ci]-0.08,h:0.7,fontSize:9.8,color:WHITE,valign:"middle",align:ci===0?"left":"center"});
      rx+=cw[ci];
    });
  });
  s.addText("ACOG Practice Bulletin 2020  |  ISSHP 2021  |  NICE 2023  |  ESC 2018",
    {x:0.3,y:7.24,w:12.7,h:0.22,fontSize:9,color:LIGHT_GRAY,italic:true});
}

// =================================================================
// SLIDE 14 — ANTIHYPERTENSIVE THERAPY
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:LIGHT_BG}});
  sectionBar(s, MED_BLUE, "12  |  Antihypertensive Therapy in Pregnancy");

  const drugs=[
    {name:"LABETALOL\n(α+β blocker)",   fill:"1A5276",
     acute:"20–40 mg IV q10–15 min\nMax 300 mg total\nInfusion: 1–2 mg/min",
     oral:"100–400 mg BD–TID",safe:"Yes",ci:"Asthma, bradycardia, heart block"},
    {name:"HYDRALAZINE\n(Vasodilator)",  fill:"1E5631",
     acute:"5–10 mg IV q20 min\nMax 20 mg/episode",
     oral:"10–50 mg TID–QID",safe:"Yes",ci:"Reflex tachycardia, lupus-like syndrome"},
    {name:"NIFEDIPINE\n(CCB)",           fill:"6E2F0C",
     acute:"10–20 mg oral (immediate release)\nRepeat in 30 min if needed\nNOT sublingual",
     oral:"30–60 mg XR once daily",safe:"Yes",ci:"With MgSO₄: ↑ neuromuscular blockade"},
    {name:"METHYLDOPA\n(Central α₂ agonist)",fill:"154360",
     acute:"Not used acutely",
     oral:"250–500 mg TID–QID\nMax 3 g/day",safe:"Yes (most safety data)",ci:"Sedation, depression, hepatotoxicity"},
  ];
  drugs.forEach((d,i)=>{
    const x=0.15+i*3.28;
    s.addShape(pres.ShapeType.rect,{x,y:0.85,w:3.1,h:5.55,fill:{color:d.fill}});
    s.addText(d.name,{x,y:0.85,w:3.1,h:0.72,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle"});
    s.addShape(pres.ShapeType.line,{x:x+0.1,y:1.58,w:2.9,h:0,line:{color:GOLD,width:0.8}});

    const rows=[["Acute dose:",d.acute],["Oral/chronic:",d.oral],["Pregnancy safe:",d.safe],["Cautions:",d.ci]];
    rows.forEach((r,ri)=>{
      const ry=1.65+ri*1.2;
      s.addText(r[0],{x:x+0.1,y:ry,w:2.9,h:0.35,fontSize:11.5,bold:true,color:ACCENT_TEAL,valign:"middle"});
      s.addText(r[1],{x:x+0.1,y:ry+0.34,w:2.9,h:0.78,fontSize:10.5,color:WHITE,valign:"top"});
    });
  });

  s.addShape(pres.ShapeType.rect,{x:0.15,y:6.52,w:12.95,h:0.85,fill:{color:WARN_RED}});
  s.addText("CONTRAINDICATED IN PREGNANCY:",{x:0.25,y:6.52,w:3.3,h:0.85,fontSize:12.5,bold:true,color:WHITE,valign:"middle"});
  s.addText("ACE inhibitors (captopril, enalapril, lisinopril) | ARBs (losartan, valsartan, irbesartan) — teratogenic: renal agenesis, oligohydramnios, IUGR, fetal death\nDirect renin inhibitors (aliskiren) | Nitroprusside (fetal cyanide toxicity) | Spironolactone (anti-androgenic effects on fetus)",
    {x:3.7,y:6.52,w:9.3,h:0.85,fontSize:10.5,color:WHITE,valign:"middle"});
}

// =================================================================
// SLIDE 15 — PREVENTION
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  sectionBar(s, ACCENT_TEAL, "13  |  Prevention & Prophylaxis — International Recommendations");

  const prevs=[
    {title:"LOW-DOSE ASPIRIN\n(Grade A Evidence)", fill:ACCENT_TEAL, tc:DARK_NAVY, items:[
      "Recommended for women with ≥1 HIGH-risk or ≥2 moderate-risk factors",
      "Dose: 100–162 mg/day (ISSHP: 150 mg nightly — optimal)",
      "Start: 11–16 weeks gestation (ideally by 12 wks)",
      "Continue until 36 weeks of gestation",
      "High-risk factors: prior PE, CKD, autoimmune disease, DM, chronic HTN, multiple gestation",
      "ASPRE trial: 150 mg at night → 62% reduction in early-onset PE",
      "First-trimester combined screening (FMF algorithm) identifies high-risk women",
      "USPSTF 2023: reaffirmed screening + aspirin recommendation",
    ]},
    {title:"CALCIUM\nSUPPLEMENTATION", fill:MED_BLUE, tc:WHITE, items:[
      "Dose: 1.5–2 g/day elemental calcium",
      "Recommended for women with LOW dietary calcium intake",
      "WHO 2018: reduces PE risk by ~50% in low-calcium populations",
      "Mechanism: lowers PTH → reduces intracellular calcium → vasodilation",
      "ISSHP 2021 endorses calcium supplementation",
      "No benefit in populations with adequate dietary calcium",
      "Safe, inexpensive and widely available globally",
      "Beneficial in LMICs where calcium intake is often deficient",
    ]},
    {title:"EMERGING &\nOTHER STRATEGIES", fill:"163A52", tc:WHITE, items:[
      "Folic acid 400 mcg/day (neural tube + vascular protection)",
      "Weight optimisation pre-pregnancy (BMI <30 kg/m²)",
      "Treat underlying conditions: DM, CKD, autoimmune disease",
      "Pravastatin: promising in 2024–25 RCTs for PE prevention",
      "Vitamin D: growing evidence but not yet standard recommendation",
      "Metformin: under investigation for obese/insulin-resistant women",
      "Antioxidants (Vit C+E): NOT recommended — failed RCTs",
      "Vaginal microbiome: L. crispatus dominance may reduce HDP risk (2024)",
      "Lifestyle: physical activity, low-salt diet, stress reduction",
    ]},
  ];
  prevs.forEach((p,i)=>{
    const x=0.15+i*4.38;
    s.addShape(pres.ShapeType.rect,{x,y:0.85,w:4.15,h:6.4,fill:{color:p.fill}});
    s.addText(p.title,{x,y:0.85,w:4.15,h:0.72,fontSize:13,bold:true,color:p.tc,align:"center",valign:"middle"});
    s.addShape(pres.ShapeType.line,{x:x+0.1,y:1.58,w:3.95,h:0,line:{color:p.tc===DARK_NAVY?DARK_NAVY:GOLD,width:0.8}});
    bullets(s,p.items,{x:x+0.1,y:1.64,w:3.95,h:5.54,fontSize:11.5,color:p.tc});
  });
}

// =================================================================
// SLIDE 16 — RECENT ADVANCES 2023-2026
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:LIGHT_BG}});
  sectionBar(s, MED_BLUE, "14  |  Recent Advances 2023–2026");

  const adv=[
    {title:"BIOMARKER &\nDIAGNOSTIC ADVANCES",fill:"1A5276",yr:"2023–2025",items:[
      "sFlt-1/PlGF ratio: FDA-cleared in USA 2023 (Elecsys BRAHMS) for PE rule-in/rule-out",
      "PlGF-based management reduces NICU admissions (PARROT RCT, UK)",
      "Large-scale proteomics in early pregnancy predicts HDP weeks before onset (Greenland et al, JAMA Cardiol 2024)",
      "Polygenic risk score: improved preconception risk stratification (Honigberg et al, Nat Med 2023)",
      "Low fetal fraction (cfDNA) associated with adverse outcomes including HDP (meta-analysis 2024)",
      "First-trimester PE screening: MAP + uterine artery PI + PIGF algorithm (Nicolaides/FMF)",
    ]},
    {title:"GENETICS &\nMOLECULAR BIOLOGY",fill:"1E5631",yr:"2023–2025",items:[
      "FinnGen + Estonian Biobank GWAS: multiple HDP genetic loci identified (Tyrmi et al, JAMA Cardiol 2023)",
      "STAT3 signalling pathway confirmed in preeclampsia pathogenesis (Marzioni et al, 2025)",
      "Mitochondrial dysfunction and maternal endothelial senescence: emerging targets",
      "Epigenetic modifications of placental DNA methylation patterns",
      "Complement pathway activation in atypical HDP presentations",
      "Vaginal microbiome: L. crispatus dominant community reduces HDP risk (Li et al, 2024)",
    ]},
    {title:"NOVEL\nTHERAPEUTICS",fill:"6E2F0C",yr:"2024–2026",items:[
      "Pravastatin: RCT evidence for PE prevention — promising safety + efficacy in 2024 studies",
      "Recombinant PlGF / VEGF-mimetics: investigational Phase II trials underway",
      "Dextran sulfate apheresis to reduce sFlt-1: pilot data shows benefit in early-onset PE",
      "Metformin for PE prevention in obese women: ongoing meta-analyses",
      "SGLT2 inhibitors: safety profile in pregnancy under active investigation",
      "Anti-sFlt-1 aptamers and RNA-based therapies: preclinical development",
    ]},
    {title:"GUIDELINE\nUPDATES",fill:"154360",yr:"2021–2025",items:[
      "ISSHP 2021: revised classification, endorsed sFlt-1/PlGF, proteinuria no longer mandatory",
      "ACOG 2020 (reaffirmed 2023): treat all BP ≥140/90; CHAP trial endorsed",
      "NICE 2023 (UK): aspirin 75–150 mg for high-risk women; sFlt-1/PlGF endorsed",
      "ESC 2018/2022: cardiovascular management framework during pregnancy",
      "WHO Dec 2025: updated global burden data (~42,000 maternal deaths/year)",
      "AHA Aug 2025: new high BP guidelines emphasising pregnancy health and prevention",
    ]},
  ];
  adv.forEach((a,i)=>{
    const col=i%2, row=Math.floor(i/2);
    const x=0.15+col*6.6, y=0.85+row*3.27;
    s.addShape(pres.ShapeType.rect,{x,y,w:6.3,h:3.15,fill:{color:a.fill}});
    s.addShape(pres.ShapeType.rect,{x:x+4.7,y,w:1.55,h:0.46,fill:{color:GOLD}});
    s.addText(a.yr,{x:x+4.7,y,w:1.55,h:0.46,fontSize:11,bold:true,color:DARK_NAVY,align:"center",valign:"middle",margin:0});
    s.addText(a.title,{x:x+0.08,y,w:4.58,h:0.46,fontSize:12.5,bold:true,color:GOLD,valign:"middle"});
    s.addShape(pres.ShapeType.line,{x:x+0.1,y:y+0.49,w:6.1,h:0,line:{color:GOLD,width:0.8}});
    bullets(s,a.items,{x:x+0.1,y:y+0.56,w:6.1,h:2.52,fontSize:11.2,color:WHITE});
  });
}

// =================================================================
// SLIDE 17 — LONG-TERM CONSEQUENCES
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  sectionBar(s, ACCENT_TEAL, "15  |  Long-Term Consequences & Postpartum Surveillance");

  s.addShape(pres.ShapeType.rect,{x:0.15,y:0.85,w:6.55,h:6.4,fill:{color:"163A52"}});
  s.addText("LONG-TERM MATERNAL RISKS",{x:0.15,y:0.85,w:6.55,h:0.45,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});

  const lt=[
    ["Hypertension","4.6× higher risk within 14 years (BMJ 2017 nationwide cohort)"],
    ["CVD / IHD","2× lifetime risk of myocardial infarction and ischaemic heart disease"],
    ["Stroke","Significant long-term risk (PMID 36990309, systematic review 2023)"],
    ["Dementia","Increased cognitive decline risk (PMID 38278201, meta-analysis 2024)"],
    ["CKD","Persistent proteinuria, microalbuminuria, impaired GFR"],
    ["Metabolic syndrome","Insulin resistance, dyslipidaemia, central obesity"],
    ["Recurrence","15–25% risk in subsequent pregnancies"],
    ["Offspring effects","↑ Lifetime CVD, HTN, obesity, cognitive issues in children"],
  ];
  lt.forEach((r,i)=>{
    const y=1.37+i*0.74;
    s.addShape(pres.ShapeType.rect,{x:0.28,y,w:1.85,h:0.62,fill:{color:WARN_RED}});
    s.addText(r[0],{x:0.28,y,w:1.85,h:0.62,fontSize:11.5,bold:true,color:WHITE,align:"center",valign:"middle",margin:0});
    s.addText(r[1],{x:2.22,y,w:4.38,h:0.62,fontSize:11.5,color:WHITE,valign:"middle"});
  });

  s.addShape(pres.ShapeType.rect,{x:6.95,y:0.85,w:6.2,h:6.4,fill:{color:"1E5631"}});
  s.addText("POSTPARTUM SURVEILLANCE",{x:6.95,y:0.85,w:6.2,h:0.45,fontSize:13,bold:true,color:GOLD,align:"center",valign:"middle",margin:0});
  bullets(s,[
    "BP monitoring: every 15 min for 1 h then 4-hourly postpartum",
    "Continue antihypertensives if BP remains ≥150/100 postpartum",
    "Continue MgSO₄ for 24–48 h after delivery",
    "HELLP: check LFTs + CBC at 24–48 h post-delivery",
    "6-week postnatal check: BP, urine PCR, renal function",
    "Echocardiography if postpartum pulmonary oedema",
    "Annual CVD screening: BP, lipids, fasting glucose",
    "Advise lifestyle: diet, exercise, weight management",
    "Aspirin pre-conception in future pregnancies if prior PE",
    "Inform GP / primary care of long-term cardiovascular risk",
    "Preconception counselling before next pregnancy",
    "Cardiology/nephrology referral if persistent dysfunction",
  ],{x:7.08,y:1.35,w:5.95,h:5.8,fontSize:11.5,color:WHITE});
}

// =================================================================
// SLIDE 18 — KEY TAKEAWAYS
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:0.07,fill:{color:ACCENT_TEAL}});
  s.addShape(pres.ShapeType.rect,{x:0,y:7.43,w:13.3,h:0.07,fill:{color:ACCENT_TEAL}});

  s.addText("Key Takeaways",{x:0.5,y:0.2,w:12.3,h:0.62,fontSize:30,bold:true,color:WHITE});
  s.addShape(pres.ShapeType.rect,{x:0.5,y:0.85,w:2.2,h:0.05,fill:{color:ACCENT_TEAL}});

  const kp=[
    "HDP affects 3–8% of pregnancies globally, causing ~16% of all maternal deaths (~42,000/year in 2023) — a major public health emergency.",
    "ISSHP 2021 classification: Chronic HTN | Gestational HTN | Preeclampsia (with/without severe features) | Eclampsia | Superimposed PE.",
    "Pathogenesis follows a Two-Stage Model: Stage 1 (silent impaired placentation at 8–18 wks) → Stage 2 (clinical maternal endothelial dysfunction driven by sFlt-1/sEng release).",
    "Proteinuria is NO LONGER required for PE diagnosis — end-organ damage alone is sufficient per ISSHP 2021.",
    "sFlt-1/PlGF ratio is the best-validated biomarker for diagnosis and risk stratification; FDA-cleared in USA (2023).",
    "MgSO₄ is the drug of choice for eclampsia seizure prophylaxis and treatment, reducing eclampsia by >50%.",
    "Acute antihypertensives of choice: IV Labetalol / IV Hydralazine / oral Nifedipine (treat BP ≥160/110 within 30–60 min).",
    "ACE inhibitors, ARBs, and direct renin inhibitors are ABSOLUTELY CONTRAINDICATED in pregnancy.",
    "Low-dose aspirin 100–150 mg/day from 12–16 weeks is Grade A evidence for high-risk women (ASPRE trial: 62% reduction).",
    "Delivery is the ONLY definitive treatment; timing depends on severity and gestational age.",
    "HDP confers significant long-term CVD, hypertension, stroke, and dementia risks — lifelong surveillance is essential.",
    "Recent advances: FDA-cleared biomarkers, genetic risk scoring, pravastatin trials, and apheresis therapy are reshaping management.",
  ];
  kp.forEach((k,i)=>{
    const col=i<6?0:1;
    const row=col===0?i:i-6;
    const x=col===0?0.3:6.9;
    const y=1.02+row*1.04;
    s.addShape(pres.ShapeType.rect,{x,y,w:0.4,h:0.4,fill:{color:ACCENT_TEAL}});
    s.addText(String(i+1),{x,y,w:0.4,h:0.4,fontSize:12,bold:true,color:DARK_NAVY,align:"center",valign:"middle",margin:0});
    s.addText(k,{x:x+0.48,y,w:6.08,h:0.97,fontSize:10.5,color:WHITE,valign:"top"});
  });
}

// =================================================================
// SLIDE 19 — REFERENCES
// =================================================================
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect,{x:0,y:0,w:13.3,h:7.5,fill:{color:DARK_NAVY}});
  sectionBar(s, MED_BLUE, "References & Sources");

  const refs=[
    "1. Magee LA, Brown MA, Hall DR, et al. The 2021 ISSHP classification, diagnosis & management recommendations for international practice. Pregnancy Hypertens. 2022;27:148–169.",
    "2. ACOG Practice Bulletin No. 222. Gestational Hypertension and Preeclampsia. Obstet Gynecol. 2020;135(6):e237–e260.",
    "3. WHO. Pre-eclampsia fact sheet. December 2025. who.int",
    "4. Creasy RK, Resnik R et al. Maternal-Fetal Medicine: Principles and Practice, 8th edition. Elsevier/Saunders. 2019.",
    "5. Brenner BM. Brenner and Rector's The Kidney, 11th edition. Elsevier. 2020.",
    "6. Zeisler H, Llurba E, Chantraine F, et al. Predictive value of the sFlt-1:PlGF ratio in women with suspected preeclampsia. NEJM. 2016;374(1):13–22.",
    "7. Rolnik DL, Wright D, Poon LC, et al. Aspirin versus placebo in pregnancies at high risk for preterm PE (ASPRE). NEJM. 2017;377:613–622.",
    "8. Brohan MP, Daly FP, Kelly L. HDP and long-term risk of maternal stroke — systematic review & meta-analysis. Am J Obstet Gynecol. 2023 (PMID 36990309).",
    "9. Carey C, Mulcahy E, McCarthy FP. HDP and risk of maternal dementia. Am J Obstet Gynecol. 2024 (PMID 38278201).",
    "10. Honigberg MC, Truong B, Khan RR, et al. Polygenic prediction of preeclampsia and gestational hypertension. Nat Med. 2023;29(6):1540–1549.",
    "11. Greenland P, Segal MR, McNeil RB, et al. Large-scale proteomics in early pregnancy and HDP. JAMA Cardiol. 2024;9(9):791–799.",
    "12. Tyrmi JS, Kaartokallio T, Lokki AI, et al. Genetic risk factors associated with PE and HDP. JAMA Cardiol. 2023;8(7):674–683.",
    "13. Marzioni D, Piani F, Di Simone N, et al. Importance of STAT3 signaling in preeclampsia. Int J Mol Med. 2025;55(4):58.",
    "14. USPSTF. Screening for HDP: Final Recommendation Statement. JAMA. 2023 Sep 19 (PMID 37721605).",
    "15. Brown MA, Magee LA, Kenny LC, et al. ISSHP 2018 Classification. Hypertension. 2018;72(1):24–43.",
  ];
  const col1=refs.slice(0,8), col2=refs.slice(8);
  [col1,col2].forEach((col,ci)=>{
    const x=ci===0?0.2:6.8;
    col.forEach((r,ri)=>{
      s.addText(r,{x,y:0.85+ri*0.82,w:6.3,h:0.75,fontSize:10,color:LIGHT_GRAY,valign:"top"});
    });
  });
}

// WRITE
pres.writeFile({fileName:"/home/daytona/workspace/hdp-presentation/HDP_Presentation_v2.pptx"})
  .then(()=>console.log("SUCCESS"))
  .catch(e=>{console.error(e);process.exit(1);});
Running Command

cd /home/daytona/workspace/hdp-presentation && node build_new.js 2>&1

Running Command

ls -lh /home/daytona/workspace/hdp-presentation/HDP_Presentation_v2.pptx

Your PowerPoint is ready! Here's your download link:

HDP Presentation v2

Presentation · PPTX


What's Inside — 19 Slides

#Slide
1Title Slide - with 4 key global statistics
2Table of Contents
3ISSHP 2021 Classification - all 5 categories with criteria
4Epidemiology & Risk Factors - modifiable vs non-modifiable
5Etiopathogenesis — Two-Stage Model - Stage 1 (silent placentation) → Stage 2 (maternal syndrome)
6Angiogenic Imbalance - sFlt-1, PlGF, sEng with clinical biomarker utility
7Immunologic, Genetic & Oxidative Stress Mechanisms
8Diagnostic Criteria - BP thresholds, proteinuria, severe features table
9Clinical Features - 6 organ systems (CV, renal, neuro, hepatic, hematologic, placental)
10Maternal Complications - acute + long-term
11Fetal & Neonatal Complications
12HELLP Syndrome - Tennessee/Mississippi classification + management
13Management Table - all HDP categories by gestational age & severity
14Antihypertensive Therapy - doses, contraindications
15Prevention & Prophylaxis - aspirin, calcium, emerging strategies
16Recent Advances 2023-2026 - biomarkers, genetics, novel therapeutics, guideline updates
17Long-term Consequences & Postpartum Care
18Key Takeaways - 12 summary points
19References - 15 primary sources
Design: Dark navy/teal color scheme with gold accents, wide (13.3" × 7.5") format, suitable for academic/CME presentations.
This is a shared conversation. Sign in to Orris to start your own chat.