Pharmacology and therapeutics: comprehensive notes on autocoids on Pharmacological basis as a pptx in clean visible structured

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
I found Katzung's pharmacology textbook - which is the gold standard for this topic. Let me read the relevant sections.
Reading File
Excellent - I now have comprehensive content from Katzung. Let me also read the histamine section and eicosanoids section from Katzung.
Finding Sources
Finding Sources
I have all the location data. Now let me read both sections in parallel - histamine and eicosanoids from Katzung.
Reading File
Reading File
I have enough rich content from Katzung. Now let me also quickly read the eicosanoids/prostaglandins section from the same Katzung block, and then build the PPTX.
Reading File
I now have comprehensive content from Katzung's pharmacology textbook. Let me now build the full PPTX presentation with all the autocoid content.
Running Command

mkdir -p /home/daytona/workspace/autocoids-pptx && ls /home/daytona/workspace/autocoids-pptx

Writing File

~/autocoids-pptx/build.js

const pptxgen = require("pptxgenjs");
const pres = new pptxgen();

pres.layout = "LAYOUT_WIDE"; // 13.3" x 7.5"
pres.title = "Autocoids – Pharmacological Basis";
pres.author = "Pharmacology & Therapeutics Notes";

// ─── Colour palette ──────────────────────────────────────────────
const C = {
  navy:    "0B1F3A",   // dominant dark
  teal:    "0D7377",   // heading accent
  mint:    "14A085",   // bullet accent
  gold:    "F0A500",   // highlight / callout
  white:   "FFFFFF",
  offwhite:"F2F6FB",
  lightgrey:"DDE6F0",
  text:    "1C2B3A",
  subtext: "3D5A80",
};

// ─── Reusable helpers ────────────────────────────────────────────

function addBackground(slide, color) {
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 13.3, h: 7.5,
    fill: { color },
    line: { color, width: 0 },
  });
}

function addSlideHeader(slide, title, subtitle) {
  // top accent bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 13.3, h: 0.12,
    fill: { color: C.gold }, line: { color: C.gold },
  });
  // left accent bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0.12, w: 0.08, h: 7.38,
    fill: { color: C.teal }, line: { color: C.teal },
  });
  slide.addText(title, {
    x: 0.22, y: 0.18, w: 12.8, h: 0.62,
    fontSize: 22, bold: true, color: C.navy, fontFace: "Calibri",
    margin: 0,
  });
  if (subtitle) {
    slide.addShape(pres.ShapeType.rect, {
      x: 0.22, y: 0.82, w: 2.5, h: 0.04,
      fill: { color: C.teal }, line: { color: C.teal },
    });
    slide.addText(subtitle, {
      x: 0.22, y: 0.88, w: 12.6, h: 0.36,
      fontSize: 12, color: C.subtext, italic: true, fontFace: "Calibri", margin: 0,
    });
  }
}

function box(slide, x, y, w, h, fillColor, radius) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w, h,
    fill: { color: fillColor },
    line: { color: fillColor },
    rectRadius: radius || 0.07,
  });
}

function bullets(slide, items, x, y, w, h, opts) {
  const textArr = items.map((item, i) => ({
    text: item,
    options: {
      bullet: { type: "bullet", code: "25B6", color: C.mint },
      breakLine: i < items.length - 1,
      fontSize: opts?.fontSize || 13,
      color: opts?.color || C.text,
      fontFace: "Calibri",
      paraSpaceAfter: 3,
    },
  }));
  slide.addText(textArr, { x, y, w, h, valign: "top", margin: 6 });
}

function label(slide, text, x, y, w, h, color, bg, fontSize, bold) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w, h, fill: { color: bg }, line: { color: bg }, rectRadius: 0.06,
  });
  slide.addText(text, {
    x, y, w, h, fontSize: fontSize || 11, bold: bold || false,
    color: color || C.white, fontFace: "Calibri", align: "center", valign: "middle", margin: 0,
  });
}

// ─── SLIDE 1: Title ──────────────────────────────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.navy);
  // decorative shapes
  sl.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 13.3, h: 0.18, fill: { color: C.gold }, line: { color: C.gold },
  });
  sl.addShape(pres.ShapeType.rect, {
    x: 0, y: 7.32, w: 13.3, h: 0.18, fill: { color: C.teal }, line: { color: C.teal },
  });
  sl.addShape(pres.ShapeType.ellipse, {
    x: 9.5, y: 1.2, w: 4.2, h: 4.2,
    fill: { color: "0D3B6E", transparency: 30 }, line: { color: "0D3B6E" },
  });
  sl.addShape(pres.ShapeType.ellipse, {
    x: 10.2, y: 2.0, w: 2.8, h: 2.8,
    fill: { color: C.teal, transparency: 50 }, line: { color: C.teal },
  });

  sl.addText("AUTOCOIDS", {
    x: 0.7, y: 1.5, w: 9, h: 1.1,
    fontSize: 52, bold: true, color: C.white, fontFace: "Calibri", charSpacing: 8,
  });
  sl.addText("Pharmacological Basis & Therapeutics", {
    x: 0.7, y: 2.65, w: 9, h: 0.6,
    fontSize: 22, color: C.gold, fontFace: "Calibri", italic: false,
  });
  sl.addShape(pres.ShapeType.rect, {
    x: 0.7, y: 3.35, w: 4, h: 0.05, fill: { color: C.mint }, line: { color: C.mint },
  });
  sl.addText("Comprehensive Notes  |  Katzung's Pharmacology 16e", {
    x: 0.7, y: 3.5, w: 9, h: 0.45,
    fontSize: 14, color: C.lightgrey, fontFace: "Calibri", italic: true,
  });

  // Topic pills
  const topics = ["Histamine", "Serotonin", "Eicosanoids", "Kinins", "Nitric Oxide", "Peptides"];
  topics.forEach((t, i) => {
    label(sl, t, 0.7 + i * 2.1, 5.0, 1.9, 0.45, C.white, C.teal, 12, true);
  });
  sl.addText("Pharmacology & Therapeutics  |  May 2026", {
    x: 0.7, y: 7.0, w: 12, h: 0.3,
    fontSize: 10, color: C.lightgrey, fontFace: "Calibri",
  });
}

// ─── SLIDE 2: Overview / Definition ─────────────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "What Are Autocoids?", "Definition, Classification & General Properties");

  box(sl, 0.22, 1.4, 12.8, 1.4, C.navy);
  sl.addText(
    "Autocoids (from Greek: autos = self, akos = remedy) are biologically active substances synthesized and released locally by cells to act on nearby cells (paracrine) or on the same cell (autocrine). They are neither classic hormones nor classic neurotransmitters.",
    { x: 0.42, y: 1.48, w: 12.3, h: 1.2, fontSize: 13.5, color: C.white, fontFace: "Calibri", valign: "middle" }
  );

  // classification boxes
  const cats = [
    { title: "AMINES", items: ["Histamine", "Serotonin (5-HT)", "Dopamine"], color: C.teal },
    { title: "LIPIDS", items: ["Prostaglandins (PG)", "Thromboxanes (TX)", "Leukotrienes (LT)", "Lipoxins"], color: "0B4F6C" },
    { title: "PEPTIDES", items: ["Bradykinin", "Angiotensin II", "Substance P", "Natriuretic peptides"], color: "1B4332" },
    { title: "GASES", items: ["Nitric Oxide (NO)", "Carbon Monoxide (CO)", "Hydrogen Sulfide (H₂S)"], color: "4A0E8F" },
  ];
  cats.forEach((c, i) => {
    const x = 0.22 + i * 3.27;
    box(sl, x, 3.0, 3.1, 0.42, c.color);
    sl.addText(c.title, { x, y: 3.0, w: 3.1, h: 0.42, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    const txt = c.items.map((item, j) => ({
      text: "▸ " + item,
      options: { breakLine: j < c.items.length - 1, fontSize: 12, color: C.text, fontFace: "Calibri", paraSpaceAfter: 2 },
    }));
    box(sl, x, 3.44, 3.1, 3.3, C.white);
    sl.addShape(pres.ShapeType.rect, { x, y: 3.44, w: 3.1, h: 3.3, fill: { color: "EBF5FB" }, line: { color: C.lightgrey } });
    sl.addText(txt, { x: x + 0.1, y: 3.55, w: 2.9, h: 3.1, valign: "top", margin: 4 });
  });

  sl.addText("Source: Katzung's Basic & Clinical Pharmacology, 16e", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 3: Histamine – Basic Pharmacology ────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "Histamine – Basic Pharmacology", "Chemistry, Synthesis, Storage & Release");

  // Left panel
  box(sl, 0.22, 1.35, 6.1, 5.85, C.navy);
  sl.addText("SYNTHESIS & DISTRIBUTION", {
    x: 0.32, y: 1.42, w: 5.9, h: 0.4,
    fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0,
  });
  const synItems = [
    "Formed by decarboxylation of L-histidine by histidine decarboxylase",
    "Stored in mast cell & basophil granules (bound, inactive form)",
    "Non-mast cell sources: brain neurons (neurotransmitter), ECL cells (gastric acid secretion)",
    "Metabolised → N-methylhistamine, methylimidazoleacetic acid, imidazoleacetic acid",
    "Elevated in: mastocytosis, urticaria pigmentosa, gastric carcinoid, some leukaemias",
  ];
  bullets(sl, synItems, 0.32, 1.88, 5.85, 5.0, { fontSize: 12, color: C.white });

  // Right panel – release mechanisms
  sl.addText("RELEASE MECHANISMS", {
    x: 6.55, y: 1.42, w: 6.5, h: 0.4,
    fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri", margin: 0,
  });

  const relData = [
    { title: "Immunologic (most important)", color: C.teal,
      desc: "IgE antibody on mast cell surface + antigen → explosive degranulation. Ca²⁺ & energy dependent. Also releases ATP, other mediators." },
    { title: "Chemical / Drug-induced", color: "B5451B",
      desc: "Basic drugs, opioids (morphine, codeine), tubocurarine, vancomycin. Mechanism: direct displacement from granules, not IgE-mediated." },
    { title: "Physical Stimuli", color: "4A0E8F",
      desc: "Trauma, cold, heat, pressure, radiation → direct mast cell disruption." },
  ];

  relData.forEach((r, i) => {
    const y = 1.95 + i * 1.7;
    box(sl, 6.55, y, 6.5, 0.4, r.color);
    sl.addText(r.title, { x: 6.65, y: y, w: 6.3, h: 0.4, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 4 });
    sl.addShape(pres.ShapeType.rect, { x: 6.55, y: y + 0.4, w: 6.5, h: 1.2, fill: { color: "EDF2FA" }, line: { color: C.lightgrey } });
    sl.addText(r.desc, { x: 6.65, y: y + 0.42, w: 6.3, h: 1.16, fontSize: 11.5, color: C.text, fontFace: "Calibri", valign: "middle", margin: 4 });
  });

  sl.addText("Katzung 16e, Ch. 16", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 4: Histamine Receptors & Actions ─────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "Histamine Receptors – Types & Pharmacological Actions", "H1 • H2 • H3 • H4");

  const receptors = [
    {
      label: "H1", color: "C0392B",
      location: "Smooth muscle, endothelium, CNS, airway",
      signal: "Gq → PLC → IP₃/DAG → ↑Ca²⁺",
      actions: ["Bronchoconstriction", "↑ GI motility", "Vasodilation (NO)", "↑ vascular permeability", "Pruritus & pain", "CNS: wakefulness"],
      drugs: "Blocked by H1-antihistamines (diphenhydramine, cetirizine, fexofenadine)",
    },
    {
      label: "H2", color: "0B4F6C",
      location: "Gastric parietal cells, heart, smooth muscle",
      signal: "Gs → adenylyl cyclase → ↑cAMP",
      actions: ["Gastric acid secretion (main effect)", "↑ Heart rate & contractility", "Vasodilation", "Bronchial relaxation (weak)"],
      drugs: "Blocked by H2-antagonists (ranitidine, famotidine, cimetidine)",
    },
    {
      label: "H3", color: "1B4332",
      location: "CNS presynaptic, peripheral nerves",
      signal: "Gi → ↓cAMP, ↓Ca²⁺ channels",
      actions: ["Autoreceptor: inhibits histamine synthesis & release", "Modulates release of ACh, DA, 5-HT, NE", "Regulates sleep/wakefulness", "Appetite & cognition modulation"],
      drugs: "Pitolisant (H3 inverse agonist) – narcolepsy",
    },
    {
      label: "H4", color: "4A0E8F",
      location: "Mast cells, eosinophils, basophils, dendritic cells",
      signal: "Gi/Go → ↓cAMP",
      actions: ["Chemotaxis of mast cells & eosinophils", "Cytokine release modulation", "Role in chronic pruritus & allergy", "Potential target in asthma/atopy"],
      drugs: "H4 antagonists under investigation (ZPL-3893888)",
    },
  ];

  receptors.forEach((r, i) => {
    const x = 0.22 + i * 3.27;
    // Header
    box(sl, x, 1.35, 3.1, 0.52, r.color);
    sl.addText(`H${i+1} Receptor`, { x, y: 1.35, w: 3.1, h: 0.52, fontSize: 15, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    // Body
    sl.addShape(pres.ShapeType.rect, { x, y: 1.87, w: 3.1, h: 5.35, fill: { color: "EDF6FF" }, line: { color: C.lightgrey } });
    // Location
    sl.addText("Location", { x: x + 0.08, y: 1.93, w: 2.94, h: 0.26, fontSize: 10, bold: true, color: r.color, fontFace: "Calibri", margin: 0 });
    sl.addText(r.location, { x: x + 0.08, y: 2.19, w: 2.94, h: 0.4, fontSize: 10, color: C.text, fontFace: "Calibri", margin: 0 });
    // Signal
    sl.addText("Signal Transduction", { x: x + 0.08, y: 2.62, w: 2.94, h: 0.26, fontSize: 10, bold: true, color: r.color, fontFace: "Calibri", margin: 0 });
    sl.addText(r.signal, { x: x + 0.08, y: 2.88, w: 2.94, h: 0.36, fontSize: 10, color: C.text, fontFace: "Calibri", margin: 0 });
    // Actions
    sl.addText("Key Actions", { x: x + 0.08, y: 3.27, w: 2.94, h: 0.26, fontSize: 10, bold: true, color: r.color, fontFace: "Calibri", margin: 0 });
    const acts = r.actions.map((a, j) => ({
      text: "• " + a,
      options: { breakLine: j < r.actions.length - 1, fontSize: 10, color: C.text, fontFace: "Calibri", paraSpaceAfter: 2 },
    }));
    sl.addText(acts, { x: x + 0.08, y: 3.55, w: 2.94, h: 1.85, valign: "top", margin: 0 });
    // Drug note
    box(sl, x + 0.05, 5.6, 3.0, 0.55, r.color);
    sl.addText(r.drugs, { x: x + 0.1, y: 5.6, w: 2.9, h: 0.55, fontSize: 9.5, color: C.white, fontFace: "Calibri", valign: "middle", margin: 4 });
  });

  sl.addText("Katzung 16e, Ch. 16", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 5: Antihistamines ─────────────────────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "H1-Antihistamines – Clinical Pharmacology", "First & Second Generation Drugs");

  // Table header
  const cols = ["Property", "1st Generation", "2nd Generation"];
  const colW = [2.8, 4.9, 4.9];
  const colX = [0.22, 3.02, 7.92];
  const rowH = 0.45;

  cols.forEach((c, i) => {
    box(sl, colX[i], 1.38, colW[i], rowH, C.navy);
    sl.addText(c, { x: colX[i], y: 1.38, w: colW[i], h: rowH, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  const rows = [
    ["CNS Penetration", "High (crosses BBB)\n→ sedation, drowsiness", "Low / minimal\n→ non-sedating"],
    ["Duration", "4–6 hours\nRequires frequent dosing", "12–24 hours\nOnce/twice daily"],
    ["Anticholinergic Effects", "Yes: dry mouth, blurred vision, urinary retention, constipation", "Minimal or absent"],
    ["Examples", "Diphenhydramine, Chlorpheniramine, Promethazine, Hydroxyzine", "Cetirizine, Loratadine, Fexofenadine, Azelastine"],
    ["Clinical Uses", "Allergy, motion sickness, nausea, sleep aid, anaphylaxis adjunct", "Allergic rhinitis, urticaria, atopic dermatitis, conjunctivitis"],
    ["Selectivity", "H1 + muscarinic, α₁, 5-HT receptors", "Highly selective H1"],
  ];

  rows.forEach((row, ri) => {
    const y = 1.38 + (ri + 1) * rowH;
    const bg = ri % 2 === 0 ? "EDF6FF" : "FFFFFF";
    row.forEach((cell, ci) => {
      sl.addShape(pres.ShapeType.rect, { x: colX[ci], y, w: colW[ci], h: rowH, fill: { color: bg }, line: { color: C.lightgrey } });
      sl.addText(cell, { x: colX[ci] + 0.06, y, w: colW[ci] - 0.1, h: rowH, fontSize: 10.5, color: ci === 0 ? C.navy : C.text, bold: ci === 0, fontFace: "Calibri", valign: "middle", margin: 0 });
    });
  });

  // callout box
  box(sl, 0.22, 4.82, 12.8, 1.0, "FFF3CD");
  sl.addShape(pres.ShapeType.rect, { x: 0.22, y: 4.82, w: 12.8, h: 1.0, fill: { color: "FFF3CD" }, line: { color: C.gold } });
  sl.addText([
    { text: "⚠  Clinical Pearls: ", options: { bold: true, fontSize: 12, color: "856404", fontFace: "Calibri" } },
    { text: "Fexofenadine has NO hepatic metabolism (P-gp substrate). Cetirizine is mildly sedating at higher doses. Promethazine (1st gen) is used IV for antiemesis and pre-anaesthetic sedation. Diphenhydramine is preferred for acute anaphylaxis adjunct and motion sickness.", options: { fontSize: 11.5, color: "856404", fontFace: "Calibri" } },
  ], { x: 0.35, y: 4.86, w: 12.5, h: 0.9, valign: "middle" });

  sl.addText("Katzung 16e, Ch. 16", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 6: H2 Antagonists & Gastric Acid ─────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "H2-Receptor Antagonists – Gastric Pharmacology", "Mechanism, Drugs & Clinical Uses");

  // Mechanism diagram (text-based flow)
  box(sl, 0.22, 1.38, 12.8, 1.8, C.navy);
  sl.addText("GASTRIC ACID SECRETION PATHWAY", {
    x: 0.35, y: 1.42, w: 12.5, h: 0.35, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", margin: 0,
  });
  const steps = [
    { label: "Gastrin\n(G-cells)", color: "8E44AD" },
    { label: "ACh\n(Vagus)", color: "2C3E50" },
    { label: "Histamine\n(ECL cells)", color: C.teal },
    { label: "H₂ Receptor\n(Parietal cell)", color: "B5451B" },
    { label: "↑ cAMP\n→ H⁺/K⁺ ATPase", color: "C0392B" },
    { label: "HCl\nsecretion", color: "922B21" },
  ];
  steps.forEach((s, i) => {
    label(sl, s.label, 0.35 + i * 2.14, 1.82, 1.9, 0.75, C.white, s.color, 10, true);
    if (i < steps.length - 1) {
      sl.addText("→", { x: 0.35 + i * 2.14 + 1.9, y: 1.92, w: 0.24, h: 0.55, fontSize: 16, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle" });
    }
  });

  // Drug table
  const drugs = [
    { drug: "Cimetidine", dose: "400 mg BD", notes: "Inhibits CYP450 (1A2, 2C9, 3A4) — many drug interactions. May cause gynaecomastia, impotence, CNS effects" },
    { drug: "Ranitidine", dose: "150 mg BD", notes: "Withdrawn (NDMA contamination). Less CYP inhibition than cimetidine" },
    { drug: "Famotidine", dose: "20–40 mg OD", notes: "Most potent H2 blocker. No CYP inhibition. Preferred in renal impairment (dose adjust)" },
    { drug: "Nizatidine", dose: "150 mg BD", notes: "Similar to ranitidine. Minimal drug interactions" },
  ];

  sl.addText("H2-RECEPTOR ANTAGONISTS", {
    x: 0.22, y: 3.38, w: 12.8, h: 0.38, fontSize: 13, bold: true, color: C.navy, fontFace: "Calibri", margin: 0,
  });
  const hcols = ["Drug", "Dose", "Key Pharmacology Notes"];
  const hcolW = [2.2, 2.2, 8.0];
  const hcolX = [0.22, 2.42, 4.62];
  hcols.forEach((c, i) => {
    box(sl, hcolX[i], 3.78, hcolW[i], 0.38, C.teal);
    sl.addText(c, { x: hcolX[i], y: 3.78, w: hcolW[i], h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  });
  drugs.forEach((d, ri) => {
    const y = 3.78 + (ri + 1) * 0.38;
    const bg = ri % 2 === 0 ? "EDF6FF" : C.white;
    const cells = [d.drug, d.dose, d.notes];
    cells.forEach((c, ci) => {
      sl.addShape(pres.ShapeType.rect, { x: hcolX[ci], y, w: hcolW[ci], h: 0.38, fill: { color: bg }, line: { color: C.lightgrey } });
      sl.addText(c, { x: hcolX[ci] + 0.06, y, w: hcolW[ci] - 0.1, h: 0.38, fontSize: 10, color: C.text, bold: ci === 0, fontFace: "Calibri", valign: "middle", margin: 0 });
    });
  });

  sl.addText("Clinical Indications: Peptic ulcer disease · GORD / GERD · Zollinger-Ellison syndrome · NSAID-associated ulcer prophylaxis · Dyspepsia", {
    x: 0.22, y: 6.42, w: 12.8, h: 0.55, fontSize: 11.5, color: C.navy, fontFace: "Calibri", bold: false,
  });
  sl.addText("Katzung 16e, Ch. 16 & 62", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 7: Serotonin – Basic Pharmacology ────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "Serotonin (5-HT) – Basic Pharmacology", "Chemistry, Synthesis, Receptors & Pharmacokinetics");

  // Left: synthesis / distribution
  box(sl, 0.22, 1.38, 5.9, 5.85, "1B2A3B");
  sl.addText("SYNTHESIS & DISTRIBUTION", {
    x: 0.35, y: 1.44, w: 5.6, h: 0.4, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", margin: 0,
  });
  const synth5HT = [
    "L-Tryptophan → (tryptophan hydroxylase-1) → 5-hydroxytryptophan → (AADC) → 5-HT",
    "Rate-limiting step: tryptophan hydroxylase-1 (inhibited by PCPA/fenclonine)",
    "Telotristat ethyl: orally active TrpH inhibitor; approved for carcinoid diarrhoea",
    ">90% stored in GIT enterochromaffin cells",
    "Blood: concentrated in platelets via SERT (serotonin transporter)",
    "CNS: raphe nuclei → projects to cortex, limbic system, spinal cord",
    "In pineal gland: serotonin → melatonin (N-acetyltransferase then HIOMT)",
    "Inactivated by MAO → 5-HIAA (main urinary metabolite – elevated in carcinoid)",
    "Reserpine depletes serotonin from vesicles (blocks VAT)",
  ];
  bullets(sl, synth5HT, 0.35, 1.9, 5.65, 5.1, { fontSize: 11, color: C.white });

  // Right: receptor subtypes
  sl.addText("5-HT RECEPTOR SUBTYPES", {
    x: 6.32, y: 1.44, w: 6.7, h: 0.4, fontSize: 12, bold: true, color: C.navy, fontFace: "Calibri", margin: 0,
  });

  const rec5HT = [
    { type: "5-HT1 (A–F)", signal: "Gi – ↓cAMP", effect: "CNS inhibition, vasoconstriction, autoreceptor. Buspirone (5-HT1A agonist) – anxiolytic. Triptans (5-HT1B/1D) – migraine" },
    { type: "5-HT2 (A–C)", signal: "Gq – ↑IP₃/DAG", effect: "Platelet aggregation, smooth muscle contraction, CNS excitation. 5-HT2C: appetite suppression" },
    { type: "5-HT3", signal: "Ligand-gated ion channel (Na⁺/K⁺)", effect: "GI motility, nausea/vomiting, vagal activation. Blocked by ondansetron (antiemetic)" },
    { type: "5-HT4", signal: "Gs – ↑cAMP", effect: "↑ GI motility (prokinetic). Metoclopramide, cisapride partial agonists" },
    { type: "5-HT5,6,7", signal: "Various G proteins", effect: "CNS modulation: mood, cognition, sleep regulation. Targets for antipsychotics & antidepressants" },
  ];

  rec5HT.forEach((r, i) => {
    const y = 1.9 + i * 1.05;
    const bg = i % 2 === 0 ? "EDF6FF" : "F8F9FA";
    sl.addShape(pres.ShapeType.rect, { x: 6.32, y, w: 6.7, h: 1.0, fill: { color: bg }, line: { color: C.lightgrey } });
    box(sl, 6.32, y, 1.45, 1.0, C.teal);
    sl.addText(r.type, { x: 6.32, y, w: 1.45, h: 1.0, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addText(r.signal, { x: 7.82, y: y + 0.02, w: 2.0, h: 0.4, fontSize: 10, bold: true, color: C.navy, fontFace: "Calibri", margin: 4 });
    sl.addText(r.effect, { x: 7.82, y: y + 0.44, w: 5.1, h: 0.5, fontSize: 10, color: C.text, fontFace: "Calibri", margin: 4 });
  });

  sl.addText("Katzung 16e, Ch. 16", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 8: Serotonin Clinical Pharmacology ───────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "Serotonin – Clinical Pharmacology & Drug Targets", "Agonists, Antagonists & Clinical Applications");

  const groups = [
    {
      title: "5-HT AGONISTS", color: C.teal,
      items: [
        "Triptans (sumatriptan, rizatriptan): 5-HT1B/D agonists → cranial vasoconstriction + ↓trigeminal neuropeptide release → migraine treatment",
        "Buspirone: 5-HT1A partial agonist → anxiolytic (no sedation/dependence)",
        "Tegaserod: 5-HT4 agonist → prokinetic for constipation-predominant IBS",
        "Ergonovine/ergotamine: partial 5-HT1 agonist → uterine contraction, migraine",
      ],
    },
    {
      title: "5-HT ANTAGONISTS", color: "B5451B",
      items: [
        "Ondansetron, granisetron, dolasetron: 5-HT3 antagonists → prevent chemo-induced nausea/vomiting (CINV)",
        "Metoclopramide: 5-HT3/4 antagonist + D2 blocker → antiemetic, gastroparesis",
        "Cyproheptadine: H1 + 5-HT2 antagonist → used in carcinoid syndrome, appetite stimulation",
        "Ketanserin: 5-HT2A antagonist → antihypertensive (investigational)",
        "Pizotifen/methysergide: 5-HT2 blockers → migraine prophylaxis",
      ],
    },
    {
      title: "SEROTONIN SYNDROME", color: "922B21",
      items: [
        "Caused by excess serotonergic activity (SSRIs + MAOIs, triptans + SSRIs, linezolid + SSRIs)",
        "Triad: Altered mental status + autonomic instability + neuromuscular abnormalities (clonus, hyperreflexia, tremor)",
        "Treatment: Discontinue offending drug, cyproheptadine (5-HT2 antagonist), benzodiazepines, supportive care",
        "Distinguished from NMS by onset (hours vs days) and presence of clonus",
      ],
    },
    {
      title: "CARCINOID SYNDROME", color: "4A0E8F",
      items: [
        "Tumour of enterochromaffin cells → excessive 5-HT, histamine, tachykinins secretion",
        "Symptoms: Flushing, diarrhoea, bronchospasm, right heart disease (tricuspid/pulmonary valve)",
        "Diagnosis: ↑ urine 5-HIAA",
        "Treatment: Octreotide (somatostatin analogue) + Telotristat (TrpH inhibitor) for diarrhoea",
      ],
    },
  ];

  groups.forEach((g, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.22 + col * 6.55;
    const y = 1.38 + row * 3.0;
    box(sl, x, y, 6.28, 0.42, g.color);
    sl.addText(g.title, { x, y, w: 6.28, h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addShape(pres.ShapeType.rect, { x, y: y + 0.42, w: 6.28, h: 2.5, fill: { color: i % 2 === 0 ? "EDF6FF" : "FDF2F8" }, line: { color: C.lightgrey } });
    bullets(sl, g.items, x + 0.1, y + 0.48, 6.0, 2.35, { fontSize: 11, color: C.text });
  });

  sl.addText("Katzung 16e, Ch. 16", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 9: Eicosanoids – Overview ────────────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "Eicosanoids – Prostaglandins, Thromboxanes & Leukotrienes", "Biosynthesis, Receptors & Pharmacology");

  // Biosynthesis cascade – text-based
  box(sl, 0.22, 1.38, 12.8, 1.7, C.navy);
  sl.addText("BIOSYNTHESIS CASCADE", {
    x: 0.35, y: 1.42, w: 12, h: 0.38, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", margin: 0,
  });
  const cascade = [
    { label: "Membrane\nPhospholipids", color: "1B4332" },
    { label: "Arachidonic\nAcid", color: C.teal },
    { label: "COX-1 / COX-2\n(PGG₂ → PGH₂)", color: "B5451B" },
    { label: "Prostanoids\n(PGE₂,PGI₂,TXA₂)", color: "8E44AD" },
    { label: "5-LOX\n(LTA₄ → LTB₄,C₄,D₄)", color: "D35400" },
    { label: "Leukotrienes\n(LTB4, cys-LTs)", color: "C0392B" },
  ];
  cascade.forEach((c, i) => {
    label(sl, c.label, 0.33 + i * 2.14, 1.84, 1.9, 0.72, C.white, c.color, 10, true);
    if (i === 1) {
      sl.addText("↙PLA₂", { x: 2.47, y: 1.9, w: 0.24, h: 0.35, fontSize: 9, color: C.gold, fontFace: "Calibri", align: "center" });
    }
    if (i < cascade.length - 1 && i !== 1) {
      sl.addText("→", { x: 0.33 + i * 2.14 + 1.9, y: 1.93, w: 0.24, h: 0.52, fontSize: 16, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle" });
    }
  });
  sl.addText("Phospholipase A₂ (PLA₂) — activated by trauma, ischaemia, hormones — liberates arachidonic acid from membrane phospholipids. Glucocorticoids inhibit PLA₂ via lipocortin (annexin) synthesis.", {
    x: 0.35, y: 2.58, w: 12.5, h: 0.42, fontSize: 10.5, color: C.lightgrey, fontFace: "Calibri", margin: 0,
  });

  // Three column panels
  const panels = [
    {
      title: "PROSTAGLANDINS", color: C.teal,
      items: [
        "PGE₂: vasodilation, pain sensitisation (↑cAMP in nociceptors), fever (hypothalamic), gastric cytoprotection, uterine contraction",
        "PGI₂ (prostacyclin): vasodilation + ↓platelet aggregation (endothelial, Gs→↑cAMP)",
        "PGD₂: bronchoconstriction, mast cell mediator, sleep regulation",
        "PGF₂α: luteolysis, uterotonic, bronchoconstriction",
        "Drugs: Misoprostol (PGE1 analogue), Alprostadil, Dinoprostone (PGE₂)",
      ],
    },
    {
      title: "THROMBOXANES", color: "B5451B",
      items: [
        "TXA₂: synthesised in platelets; vasoconstriction + platelet aggregation (Gq → ↑Ca²⁺)",
        "TXA₂ opposes PGI₂: TXA₂ (pro-thrombotic) vs PGI₂ (anti-thrombotic) balance",
        "Half-life ~30 sec (TXA₂) → TXB₂ (inactive)",
        "Aspirin: irreversibly acetylates COX-1 in platelets (no nucleus → permanent inhibition) → ↓TXA₂ → antiplatelet effect",
        "Selective TXA₂ antagonists: seratrodast, picotamide (investigational)",
      ],
    },
    {
      title: "LEUKOTRIENES", color: "4A0E8F",
      items: [
        "Synthesised via 5-lipoxygenase (5-LOX) + FLAP in mast cells, eosinophils, neutrophils",
        "LTB₄: potent neutrophil chemotaxis, adhesion to endothelium",
        "Cysteinyl-LTs (LTC₄, LTD₄, LTE₄): bronchoconstriction (1000× more potent than histamine), ↑ mucus secretion, ↑ vascular permeability",
        "Formerly called 'Slow-Reacting Substance of Anaphylaxis (SRS-A)'",
        "Drugs: Zileuton (5-LOX inhibitor); Montelukast, Zafirlukast (LT receptor antagonists) → asthma prophylaxis",
      ],
    },
  ];

  panels.forEach((p, i) => {
    const x = 0.22 + i * 4.38;
    box(sl, x, 3.12, 4.15, 0.42, p.color);
    sl.addText(p.title, { x, y: 3.12, w: 4.15, h: 0.42, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addShape(pres.ShapeType.rect, { x, y: 3.54, w: 4.15, h: 3.6, fill: { color: "EDF6FF" }, line: { color: C.lightgrey } });
    bullets(sl, p.items, x + 0.1, 3.6, 3.95, 3.45, { fontSize: 10.5, color: C.text });
  });

  sl.addText("Katzung 16e, Ch. 18", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 10: NSAIDs & COX Inhibitors ──────────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "NSAIDs & COX Inhibitors – Pharmacological Basis", "COX-1 vs COX-2, Drug Classes & Clinical Implications");

  // COX1 vs COX2 comparison
  const coxPanels = [
    {
      title: "COX-1 (Constitutive)", color: "0B4F6C",
      items: [
        "Expressed constitutively in most tissues",
        "Produces 'housekeeping' prostanoids",
        "Gastric cytoprotection (PGE₂, PGI₂ → mucus + bicarb secretion)",
        "Platelet TXA₂ synthesis → haemostasis",
        "Renal prostaglandins → afferent arteriolar dilation",
        "Inhibition → GI ulceration, bleeding risk, renal effects",
      ],
    },
    {
      title: "COX-2 (Inducible)", color: "B5451B",
      items: [
        "Induced by cytokines (IL-1, TNF-α), growth factors, LPS",
        "Expressed at inflammatory sites, CNS (fever), kidney",
        "Mediates pain, inflammation, fever",
        "Constitutive in kidney, endothelium (PGI₂ synthesis)",
        "Selective inhibition → ↓ inflammation but ↑ cardiovascular risk (unmasked TXA₂)",
        "COX-2 also has role in colon cancer risk (COX-2 overexpressed in CRC)",
      ],
    },
  ];
  coxPanels.forEach((p, i) => {
    const x = 0.22 + i * 6.55;
    box(sl, x, 1.38, 6.28, 0.45, p.color);
    sl.addText(p.title, { x, y: 1.38, w: 6.28, h: 0.45, fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addShape(pres.ShapeType.rect, { x, y: 1.83, w: 6.28, h: 2.2, fill: { color: "EDF6FF" }, line: { color: C.lightgrey } });
    bullets(sl, p.items, x + 0.1, 1.88, 6.0, 2.1, { fontSize: 11, color: C.text });
  });

  // Drug table
  sl.addText("NSAID DRUG CLASSES", {
    x: 0.22, y: 4.12, w: 12.8, h: 0.38, fontSize: 13, bold: true, color: C.navy, fontFace: "Calibri", margin: 0,
  });

  const dcols = ["Class", "Examples", "Selectivity", "Key Notes"];
  const dcolW = [2.2, 3.2, 2.4, 4.8];
  const dcolX = [0.22, 2.42, 5.62, 8.02];
  dcols.forEach((c, i) => {
    box(sl, dcolX[i], 4.52, dcolW[i], 0.38, C.teal);
    sl.addText(c, { x: dcolX[i], y: 4.52, w: dcolW[i], h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
  });
  const drugRows = [
    ["Non-selective NSAID", "Ibuprofen, Naproxen, Diclofenac, Indomethacin", "COX-1 & COX-2", "Analgesic, antipyretic, anti-inflammatory. GI risk. Take with food/PPI"],
    ["Salicylates", "Aspirin (low-dose)", "COX-1 >> COX-2 (irreversible)", "Antiplatelet at 75–300 mg/day. Anti-inflammatory at >2g/day. Reye's syndrome in children"],
    ["Selective COX-2", "Celecoxib, Etoricoxib, Parecoxib", "COX-2 selective", "↓GI risk, ↑CV risk (MI, stroke). Contraindicated in IHD. Avoid post-CABG"],
    ["Acetaminophen/Paracetamol", "Paracetamol", "COX-3? / central", "Analgesic + antipyretic but NO anti-inflammatory. Hepatotoxic in overdose (NAC antidote)"],
  ];
  drugRows.forEach((row, ri) => {
    const y = 4.52 + (ri + 1) * 0.42;
    const bg = ri % 2 === 0 ? "EDF6FF" : C.white;
    row.forEach((cell, ci) => {
      sl.addShape(pres.ShapeType.rect, { x: dcolX[ci], y, w: dcolW[ci], h: 0.42, fill: { color: bg }, line: { color: C.lightgrey } });
      sl.addText(cell, { x: dcolX[ci] + 0.06, y, w: dcolW[ci] - 0.1, h: 0.42, fontSize: 10, color: C.text, bold: ci === 0, fontFace: "Calibri", valign: "middle", margin: 0 });
    });
  });

  sl.addText("Katzung 16e, Ch. 36", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 11: Kinins & Bradykinin ──────────────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "Kinins – Bradykinin & Kallikrein-Kinin System", "Synthesis, Receptors, Actions & Drug Targets");

  box(sl, 0.22, 1.38, 12.8, 1.58, C.navy);
  sl.addText("KININ BIOSYNTHESIS PATHWAY", {
    x: 0.35, y: 1.42, w: 12, h: 0.36, fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", margin: 0,
  });
  const kinPath = [
    { label: "Prekallikrein\n(plasma)", color: "1B4332" },
    { label: "Kallikrein\n(contact activation)", color: C.teal },
    { label: "Kininogens\n(HMW & LMW)", color: "0B4F6C" },
    { label: "Bradykinin /\nKallidin", color: C.teal },
    { label: "ACE / Kininase II\n(degradation)", color: "B5451B" },
    { label: "Inactive\nfragments", color: "666666" },
  ];
  kinPath.forEach((k, i) => {
    label(sl, k.label, 0.33 + i * 2.14, 1.82, 1.92, 0.72, C.white, k.color, 10, true);
    if (i < kinPath.length - 1) {
      sl.addText("→", { x: 0.33 + i * 2.14 + 1.92, y: 1.92, w: 0.22, h: 0.52, fontSize: 16, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle" });
    }
  });
  sl.addText("Note: ACE inhibitors block degradation of bradykinin → accumulation → dry cough, angio-oedema (major side effects of ACEi)", {
    x: 0.35, y: 2.56, w: 12.5, h: 0.32, fontSize: 10.5, color: C.lightgrey, fontFace: "Calibri", margin: 0,
  });

  // Left: receptors
  const recPanels = [
    {
      title: "B1 RECEPTOR", color: "4A0E8F",
      items: [
        "Inducible – upregulated by inflammation/tissue injury",
        "Gq signalling → ↑IP₃/DAG → ↑Ca²⁺",
        "Mediates chronic inflammatory pain and hyperalgesia",
        "Activated by des-Arg⁹-bradykinin (BK metabolite)",
        "Role in chronic pain, inflammation, diabetic neuropathy",
      ],
    },
    {
      title: "B2 RECEPTOR", color: C.teal,
      items: [
        "Constitutively expressed; primary bradykinin receptor",
        "Gq & Gi signalling → PLC, arachidonic acid, NO release",
        "Mediates: vasodilation, ↑ vascular permeability, oedema, bronchoconstriction",
        "Pain sensitisation at peripheral nociceptors",
        "Icatibant: selective B2 antagonist → hereditary angio-oedema (HAE)",
      ],
    },
    {
      title: "PHARMACOLOGICAL SIGNIFICANCE", color: "B5451B",
      items: [
        "ACE Inhibitors (ramipril, lisinopril): block bradykinin degradation → ↑BK → cough (10–15% patients), angio-oedema (rare but severe)",
        "ARBs (losartan): do NOT inhibit kininase → less cough",
        "Icatibant (B2 antagonist): treatment of HAE attacks",
        "C1-esterase inhibitor concentrate: prophylaxis in HAE",
        "Kinins contribute to post-MI cardiac remodelling protection with ACEi",
      ],
    },
  ];
  recPanels.forEach((p, i) => {
    const x = 0.22 + i * 4.38;
    box(sl, x, 3.05, 4.15, 0.4, p.color);
    sl.addText(p.title, { x, y: 3.05, w: 4.15, h: 0.4, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addShape(pres.ShapeType.rect, { x, y: 3.45, w: 4.15, h: 3.6, fill: { color: "EDF6FF" }, line: { color: C.lightgrey } });
    bullets(sl, p.items, x + 0.1, 3.52, 3.95, 3.45, { fontSize: 11, color: C.text });
  });

  sl.addText("Katzung 16e, Ch. 17", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 12: Nitric Oxide & Other Autocoids ───────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "Nitric Oxide (NO) & Other Vasoactive Autocoids", "NO · Endothelin · ANP · PAF · Substance P");

  // NO panel
  box(sl, 0.22, 1.38, 6.4, 5.85, C.navy);
  sl.addText("NITRIC OXIDE (NO)", {
    x: 0.35, y: 1.44, w: 6.1, h: 0.38, fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri", margin: 0,
  });
  const noItems = [
    "Synthesised from L-arginine by NOS (nitric oxide synthase)",
    "3 isoforms: eNOS (endothelial, Gq/Ca²⁺), nNOS (neural), iNOS (inducible – immune cells)",
    "Mechanism: NO → activates soluble guanylyl cyclase → ↑cGMP → smooth muscle relaxation",
    "Endothelial: vasodilation (EDRF), ↓platelet aggregation, ↓leukocyte adhesion",
    "Neuronal: retrograde synaptic messenger, LTP, GI motility (NANC)",
    "Immune (iNOS): macrophage killing of pathogens (cytotoxic)",
    "Drugs exploiting NO pathway:",
    "• Nitrates (GTN, ISDN): donate NO → venodilation → ↓preload → angina treatment",
    "• Sildenafil: PDE-5 inhibitor → ↑cGMP in corpus cavernosum → erectile dysfunction",
    "• Sildenafil also for pulmonary arterial hypertension (PAH)",
    "• Inhaled NO: PAH, ARDS, neonatal pulmonary hypertension (direct pulmonary vasodilation)",
    "Excess NO (iNOS): contributes to septic shock hypotension",
  ];
  bullets(sl, noItems, 0.35, 1.88, 6.1, 5.1, { fontSize: 11, color: C.white });

  // Right column: other autocoids
  const others = [
    {
      title: "ENDOTHELIN (ET-1)", color: C.teal,
      items: [
        "Potent vasoconstrictor – synthesised by endothelium",
        "ETA: vasoconstriction, cardiac hypertrophy",
        "ETB: vasodilation (via NO & PGI₂ release), clearance",
        "Role: pulmonary hypertension, heart failure, renal disease",
        "Drugs: Bosentan, Ambrisentan (ET receptor antagonists) → PAH treatment",
      ],
    },
    {
      title: "ATRIAL NATRIURETIC PEPTIDE (ANP)", color: "0B4F6C",
      items: [
        "Released from atria in response to ↑wall stretch / volume overload",
        "Actions: natriuresis, diuresis, vasodilation, ↓renin & aldosterone",
        "Sacubitril (neprilysin inhibitor) inhibits ANP breakdown → used in HFrEF (with valsartan)",
      ],
    },
    {
      title: "PLATELET-ACTIVATING FACTOR (PAF)", color: "B5451B",
      items: [
        "Phospholipid mediator released by platelets, mast cells, macrophages",
        "Promotes platelet aggregation, bronchoconstriction, ↑ vascular permeability",
        "Key role in anaphylaxis and ARDS",
        "PAF receptor antagonists under investigation",
      ],
    },
    {
      title: "SUBSTANCE P & NEUROPEPTIDES", color: "4A0E8F",
      items: [
        "Substance P: tachykinin – released from C-fibres; pain transmission, neurogenic inflammation",
        "CGRP: potent vasodilator – role in migraine pathogenesis",
        "Gepants (ubrogepant, rimegepant): CGRP receptor antagonists → migraine treatment",
        "Erenumab, fremanezumab: anti-CGRP monoclonal antibodies → migraine prophylaxis",
      ],
    },
  ];
  others.forEach((o, i) => {
    const row = Math.floor(i / 1);
    const y = 1.38 + i * 1.54;
    box(sl, 6.82, y, 6.26, 0.38, o.color);
    sl.addText(o.title, { x: 6.82, y, w: 6.26, h: 0.38, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });
    sl.addShape(pres.ShapeType.rect, { x: 6.82, y: y + 0.38, w: 6.26, h: 1.12, fill: { color: i % 2 === 0 ? "EDF6FF" : "F8F9FA" }, line: { color: C.lightgrey } });
    bullets(sl, o.items, 6.9, y + 0.42, 6.08, 1.05, { fontSize: 10, color: C.text });
  });

  sl.addText("Katzung 16e, Ch. 17–19", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 13: High-Yield Summary Table ─────────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.offwhite);
  addSlideHeader(sl, "High-Yield Summary – Autocoids at a Glance", "Key Drugs, Mechanisms & Clinical Uses");

  const hcols2 = ["Autocoid", "Key Receptor/Enzyme", "Main Action", "Key Drugs", "Indication"];
  const hw = [1.7, 2.4, 2.4, 2.8, 3.3];
  const hx = [0.22, 1.92, 4.32, 6.72, 9.52];
  hcols2.forEach((c, i) => {
    box(sl, hx[i], 1.38, hw[i], 0.42, C.navy);
    sl.addText(c, { x: hx[i], y: 1.38, w: hw[i], h: 0.42, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  const rows2 = [
    ["Histamine", "H1 / H2 / H3 / H4", "Allergy, gastric acid, CNS", "Diphenhydramine, Cetirizine, Famotidine, Pitolisant", "Allergy, GORD, narcolepsy"],
    ["Serotonin (5-HT)", "5-HT1B/D, 5-HT2, 5-HT3, 5-HT4", "Mood, GI, platelets, migraine", "Sumatriptan, Ondansetron, Buspirone, Metoclopramide", "Migraine, CINV, anxiety, prokinetic"],
    ["Prostaglandins", "EP1-4 (Gs/Gq/Gi)", "Inflammation, pain, fever, cytoprotection", "Misoprostol, Dinoprostone, Alprostadil, Latanoprost", "Ulcer, abortion, ED, glaucoma"],
    ["Thromboxane A₂", "TP receptor (Gq)", "Vasoconstriction, platelet aggregation", "Aspirin (↓TXA₂ via COX-1)", "Antiplatelet (ACS, stroke)"],
    ["Leukotrienes", "CysLT1/LT4 receptor, 5-LOX", "Bronchoconstriction, mucus, eosinophilia", "Montelukast, Zafirlukast, Zileuton", "Asthma, allergic rhinitis"],
    ["Bradykinin", "B1 / B2 receptor", "Vasodilation, pain, oedema, cough", "Icatibant (B2 antagonist)", "Hereditary angio-oedema"],
    ["Nitric Oxide", "sGC → ↑cGMP", "Vasodilation, platelet inhibition, NANC", "GTN, Sildenafil, Inhaled NO", "Angina, ED, PAH, ARDS"],
    ["Endothelin-1", "ETA / ETB", "Vasoconstriction / vasodilation", "Bosentan, Ambrisentan, Macitentan", "Pulmonary arterial hypertension"],
    ["ANP / BNP", "NPR-A (↑cGMP)", "Natriuresis, vasodilation", "Sacubitril + Valsartan", "Heart failure (HFrEF)"],
    ["CGRP", "CGRP receptor", "Potent vasodilation, migraine", "Erenumab, Rimegepant, Ubrogepant", "Migraine prophylaxis/treatment"],
  ];
  rows2.forEach((row, ri) => {
    const y = 1.8 + ri * 0.47;
    const bg = ri % 2 === 0 ? "EDF6FF" : C.white;
    row.forEach((cell, ci) => {
      sl.addShape(pres.ShapeType.rect, { x: hx[ci], y, w: hw[ci], h: 0.47, fill: { color: bg }, line: { color: C.lightgrey } });
      sl.addText(cell, { x: hx[ci] + 0.04, y, w: hw[ci] - 0.08, h: 0.47, fontSize: 9.5, color: ci === 0 ? C.navy : C.text, bold: ci === 0, fontFace: "Calibri", valign: "middle", margin: 0 });
    });
  });

  sl.addText("Source: Katzung's Basic & Clinical Pharmacology, 16e", {
    x: 0.22, y: 7.15, w: 12, h: 0.28,
    fontSize: 9, color: C.subtext, italic: true, fontFace: "Calibri",
  });
}

// ─── SLIDE 14: End / Thank You ───────────────────────────────────
{
  const sl = pres.addSlide();
  addBackground(sl, C.navy);
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.18, fill: { color: C.gold }, line: { color: C.gold } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 7.32, w: 13.3, h: 0.18, fill: { color: C.teal }, line: { color: C.teal } });
  sl.addShape(pres.ShapeType.ellipse, { x: -1.0, y: 3.5, w: 5, h: 5, fill: { color: "0D3B6E", transparency: 40 }, line: { color: "0D3B6E" } });
  sl.addShape(pres.ShapeType.ellipse, { x: 10.0, y: 1.0, w: 4, h: 4, fill: { color: C.teal, transparency: 60 }, line: { color: C.teal } });

  sl.addText("Key Takeaways", {
    x: 2.0, y: 0.8, w: 9, h: 0.7,
    fontSize: 30, bold: true, color: C.gold, fontFace: "Calibri", align: "center",
  });
  sl.addShape(pres.ShapeType.rect, { x: 3.5, y: 1.55, w: 6, h: 0.06, fill: { color: C.mint }, line: { color: C.mint } });

  const takeaways = [
    "Autocoids are local mediators acting in an autocrine/paracrine manner",
    "Histamine acts via H1-H4 GPCRs – H1 (allergy), H2 (gastric acid), H3 (CNS modulation)",
    "Serotonin has 7 receptor families – triptans, ondansetron & SSRIs exploit these targets",
    "Eicosanoids (PG, TX, LT) arise from arachidonic acid – NSAIDs & coxibs block COX enzymes",
    "Bradykinin accumulation from ACEi → cough & angio-oedema; icatibant treats HAE",
    "NO → sGC → cGMP: basis for nitrates (angina), sildenafil (ED/PAH) & inhaled NO (PAH/ARDS)",
    "CGRP pathway is the new frontier in migraine pharmacotherapy (gepants, anti-CGRP mAbs)",
  ];
  const taArr = takeaways.map((t, i) => ({
    text: "✦  " + t,
    options: { breakLine: i < takeaways.length - 1, fontSize: 13.5, color: i % 2 === 0 ? C.white : C.lightgrey, fontFace: "Calibri", paraSpaceAfter: 4 },
  }));
  sl.addText(taArr, { x: 1.5, y: 1.7, w: 10, h: 5.2, valign: "middle", margin: 8 });

  sl.addText("Pharmacology & Therapeutics  |  Katzung's Basic & Clinical Pharmacology 16e  |  May 2026", {
    x: 1.0, y: 7.0, w: 11, h: 0.28,
    fontSize: 9.5, color: C.lightgrey, fontFace: "Calibri", align: "center",
  });
}

// ─── Write file ──────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/autocoids-pptx/Autocoids_Pharmacology_Notes.pptx" })
  .then(() => console.log("✅ PPTX written successfully"))
  .catch(e => { console.error("❌ Error:", e); process.exit(1); });
Editing File

~/autocoids-pptx/build.js

Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/autocoids-pptx/build.js'
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.