Cerebral edema ppt in 60 slides clean white from Bradley daroff

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

mkdir -p /home/daytona/workspace/cerebral-edema-ppt && ls /home/daytona/workspace/cerebral-edema-ppt/

Writing File

~/cerebral-edema-ppt/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Cerebral Edema";
pres.author = "Bradley and Daroff's Neurology in Clinical Practice";

// ─── Color Palette (clean white theme) ─────────────────────────────────────
const C = {
  white:      "FFFFFF",
  bg:         "FAFAFA",
  navy:       "1A3A5C",   // dominant header/accent
  teal:       "1B6E8F",   // secondary accent
  lightBlue:  "D6EAF8",   // light fill
  accentBlue: "2980B9",   // highlight
  slate:      "5D6D7E",   // subtext
  bodyText:   "2C3E50",   // body paragraphs
  rule:       "AED6F1",   // divider lines
  lightGray:  "F2F4F6",   // alternate bg
  medGray:    "BDC3C7",   // borders
  darkGray:   "7F8C8D",   // captions
  green:      "1A7A4A",   // management items
  orange:     "C0392B",   // warning/ICP
  yellow:     "F0B429",   // callout accent
};

// ─── Helpers ────────────────────────────────────────────────────────────────

function titleSlide(title, subtitle) {
  const s = pres.addSlide();
  // Full navy background
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
  // Teal accent bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 4.3, w: 10, h: 0.08, fill: { color: C.teal } });
  // White bar bottom
  s.addShape(pres.ShapeType.rect, { x: 0, y: 4.38, w: 10, h: 1.245, fill: { color: C.white } });

  s.addText(title, {
    x: 0.6, y: 1.5, w: 8.8, h: 1.4,
    fontSize: 40, bold: true, color: C.white, fontFace: "Calibri",
    align: "center", valign: "middle",
  });
  if (subtitle) {
    s.addText(subtitle, {
      x: 0.6, y: 3.0, w: 8.8, h: 0.8,
      fontSize: 20, color: C.rule, fontFace: "Calibri",
      align: "center", valign: "middle",
    });
  }
  s.addText("Bradley and Daroff's Neurology in Clinical Practice", {
    x: 0.6, y: 4.5, w: 8.8, h: 0.5,
    fontSize: 13, color: C.slate, fontFace: "Calibri",
    align: "center", italic: true,
  });
  return s;
}

function sectionDivider(sectionNum, title, subtitle) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightGray } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.22, h: 5.625, fill: { color: C.teal } });
  s.addShape(pres.ShapeType.rect, { x: 0.22, y: 2.4, w: 9.78, h: 0.07, fill: { color: C.rule } });

  s.addText(`SECTION ${sectionNum}`, {
    x: 0.5, y: 1.4, w: 9, h: 0.5,
    fontSize: 13, bold: true, color: C.teal, fontFace: "Calibri",
    charSpacing: 5,
  });
  s.addText(title, {
    x: 0.5, y: 1.9, w: 9, h: 1.3,
    fontSize: 34, bold: true, color: C.navy, fontFace: "Calibri",
  });
  if (subtitle) {
    s.addText(subtitle, {
      x: 0.5, y: 3.2, w: 9, h: 0.7,
      fontSize: 17, color: C.slate, fontFace: "Calibri", italic: true,
    });
  }
  return s;
}

function contentSlide(slideNum, title, bullets, opts = {}) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  // Navy header bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  // Teal accent stripe on left
  s.addShape(pres.ShapeType.rect, { x: 0, y: 1.0, w: 0.08, h: 4.625, fill: { color: C.teal } });

  s.addText(title, {
    x: 0.25, y: 0.1, w: 9.0, h: 0.8,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri",
    valign: "middle",
  });

  // Slide number badge
  s.addShape(pres.ShapeType.roundRect, {
    x: 9.3, y: 0.15, w: 0.55, h: 0.55,
    fill: { color: C.teal }, line: { color: C.teal, width: 0 },
    rectRadius: 0.1,
  });
  s.addText(String(slideNum), {
    x: 9.3, y: 0.15, w: 0.55, h: 0.55,
    fontSize: 11, bold: true, color: C.white, fontFace: "Calibri",
    align: "center", valign: "middle",
  });

  const bodyItems = bullets.map((b, i) => {
    if (typeof b === "string") {
      return { text: b, options: { bullet: { code: "25CF", indent: 15 }, breakLine: true, fontSize: opts.fontSize || 16, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 4 } };
    }
    if (b.sub) {
      return { text: b.sub, options: { bullet: { indent: 30, code: "2013" }, breakLine: true, fontSize: (opts.fontSize || 16) - 1.5, color: C.slate, fontFace: "Calibri", paraSpaceAfter: 2 } };
    }
    if (b.bold) {
      return { text: b.bold, options: { bullet: { code: "25CF", indent: 15 }, breakLine: true, fontSize: opts.fontSize || 16, color: C.navy, fontFace: "Calibri", bold: true, paraSpaceAfter: 4 } };
    }
    if (b.heading) {
      return { text: b.heading, options: { bullet: false, breakLine: true, fontSize: (opts.fontSize || 16) + 1, color: C.teal, fontFace: "Calibri", bold: true, paraSpaceAfter: 6 } };
    }
    return { text: b.text || "", options: { bullet: { code: "25CF", indent: 15 }, breakLine: true, fontSize: opts.fontSize || 16, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 4 } };
  });

  const yStart = opts.yStart || 1.15;
  const h = opts.h || 4.2;

  s.addText(bodyItems, {
    x: 0.28, y: yStart, w: 9.4, h: h,
    valign: "top", wrap: true, margin: 5,
  });

  // Source tag bottom right
  s.addText("Bradley & Daroff's Neurology", {
    x: 6.5, y: 5.35, w: 3.3, h: 0.2,
    fontSize: 8, color: C.medGray, fontFace: "Calibri",
    align: "right", italic: true,
  });

  return s;
}

function twoColSlide(slideNum, title, leftTitle, leftItems, rightTitle, rightItems) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 1.0, w: 0.08, h: 4.625, fill: { color: C.teal } });

  s.addText(title, {
    x: 0.25, y: 0.1, w: 9.0, h: 0.8,
    fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle",
  });

  // Slide num badge
  s.addShape(pres.ShapeType.roundRect, { x: 9.3, y: 0.15, w: 0.55, h: 0.55, fill: { color: C.teal }, line: { color: C.teal, width: 0 }, rectRadius: 0.1 });
  s.addText(String(slideNum), { x: 9.3, y: 0.15, w: 0.55, h: 0.55, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });

  // Column divider
  s.addShape(pres.ShapeType.line, { x: 5.1, y: 1.15, w: 0, h: 4.1, line: { color: C.rule, width: 1.5 } });

  // Left column header
  s.addShape(pres.ShapeType.rect, { x: 0.28, y: 1.1, w: 4.65, h: 0.38, fill: { color: C.lightBlue } });
  s.addText(leftTitle, { x: 0.28, y: 1.1, w: 4.65, h: 0.38, fontSize: 14, bold: true, color: C.navy, fontFace: "Calibri", align: "center", valign: "middle" });

  // Right column header
  s.addShape(pres.ShapeType.rect, { x: 5.25, y: 1.1, w: 4.55, h: 0.38, fill: { color: C.lightBlue } });
  s.addText(rightTitle, { x: 5.25, y: 1.1, w: 4.55, h: 0.38, fontSize: 14, bold: true, color: C.navy, fontFace: "Calibri", align: "center", valign: "middle" });

  const makeItems = (arr) => arr.map(b => {
    if (typeof b === "string") return { text: b, options: { bullet: { code: "25CF", indent: 10 }, breakLine: true, fontSize: 14.5, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 5 } };
    if (b.sub) return { text: b.sub, options: { bullet: { indent: 22, code: "2013" }, breakLine: true, fontSize: 13, color: C.slate, fontFace: "Calibri", paraSpaceAfter: 3 } };
    if (b.bold) return { text: b.bold, options: { bullet: { code: "25CF", indent: 10 }, breakLine: true, fontSize: 14.5, color: C.navy, fontFace: "Calibri", bold: true, paraSpaceAfter: 5 } };
    return { text: b.text || "", options: { bullet: { code: "25CF", indent: 10 }, breakLine: true, fontSize: 14.5, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 5 } };
  });

  s.addText(makeItems(leftItems), { x: 0.28, y: 1.55, w: 4.65, h: 3.8, valign: "top", wrap: true, margin: 4 });
  s.addText(makeItems(rightItems), { x: 5.25, y: 1.55, w: 4.55, h: 3.8, valign: "top", wrap: true, margin: 4 });

  s.addText("Bradley & Daroff's Neurology", { x: 6.5, y: 5.35, w: 3.3, h: 0.2, fontSize: 8, color: C.medGray, fontFace: "Calibri", align: "right", italic: true });

  return s;
}

function tableSlide(slideNum, title, headers, rows, colWidths) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 1.0, w: 0.08, h: 4.625, fill: { color: C.teal } });

  s.addText(title, { x: 0.25, y: 0.1, w: 9.0, h: 0.8, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  s.addShape(pres.ShapeType.roundRect, { x: 9.3, y: 0.15, w: 0.55, h: 0.55, fill: { color: C.teal }, line: { color: C.teal, width: 0 }, rectRadius: 0.1 });
  s.addText(String(slideNum), { x: 9.3, y: 0.15, w: 0.55, h: 0.55, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });

  const tableData = [];
  tableData.push(headers.map(h => ({
    text: h,
    options: { bold: true, fontSize: 13, color: C.white, fontFace: "Calibri", fill: { color: C.navy }, align: "center" }
  })));
  rows.forEach((row, ri) => {
    tableData.push(row.map((cell, ci) => ({
      text: cell,
      options: { fontSize: 12, color: C.bodyText, fontFace: "Calibri", fill: { color: ri % 2 === 0 ? C.white : C.lightGray }, align: ci === 0 ? "left" : "center", valign: "middle" }
    })));
  });

  s.addTable(tableData, {
    x: 0.28, y: 1.15, w: 9.5,
    colW: colWidths || headers.map(() => 9.5 / headers.length),
    border: { pt: 0.5, color: C.rule },
    rowH: 0.42,
  });

  s.addText("Bradley & Daroff's Neurology", { x: 6.5, y: 5.35, w: 3.3, h: 0.2, fontSize: 8, color: C.medGray, fontFace: "Calibri", align: "right", italic: true });
  return s;
}

function calloutSlide(slideNum, title, calloutText, bullets) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.0, fill: { color: C.navy } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 1.0, w: 0.08, h: 4.625, fill: { color: C.teal } });

  s.addText(title, { x: 0.25, y: 0.1, w: 9.0, h: 0.8, fontSize: 22, bold: true, color: C.white, fontFace: "Calibri", valign: "middle" });
  s.addShape(pres.ShapeType.roundRect, { x: 9.3, y: 0.15, w: 0.55, h: 0.55, fill: { color: C.teal }, line: { color: C.teal, width: 0 }, rectRadius: 0.1 });
  s.addText(String(slideNum), { x: 9.3, y: 0.15, w: 0.55, h: 0.55, fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle" });

  // Callout box
  s.addShape(pres.ShapeType.rect, { x: 0.28, y: 1.1, w: 9.4, h: 1.05, fill: { color: C.lightBlue }, line: { color: C.teal, width: 1.5 } });
  s.addText(calloutText, { x: 0.42, y: 1.15, w: 9.1, h: 0.95, fontSize: 15, color: C.navy, fontFace: "Calibri", bold: true, valign: "middle", wrap: true });

  const bodyItems = bullets.map(b => {
    if (typeof b === "string") return { text: b, options: { bullet: { code: "25CF", indent: 15 }, breakLine: true, fontSize: 15.5, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 5 } };
    if (b.sub) return { text: b.sub, options: { bullet: { indent: 28, code: "2013" }, breakLine: true, fontSize: 14, color: C.slate, fontFace: "Calibri", paraSpaceAfter: 3 } };
    if (b.bold) return { text: b.bold, options: { bullet: { code: "25CF", indent: 15 }, breakLine: true, fontSize: 15.5, color: C.navy, fontFace: "Calibri", bold: true, paraSpaceAfter: 5 } };
    return { text: b.text || "", options: { bullet: { code: "25CF", indent: 15 }, breakLine: true, fontSize: 15.5, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 5 } };
  });
  s.addText(bodyItems, { x: 0.28, y: 2.25, w: 9.4, h: 3.0, valign: "top", wrap: true, margin: 5 });

  s.addText("Bradley & Daroff's Neurology", { x: 6.5, y: 5.35, w: 3.3, h: 0.2, fontSize: 8, color: C.medGray, fontFace: "Calibri", align: "right", italic: true });
  return s;
}

// ═══════════════════════════════════════════════════════════════════════════
//  SLIDE CONTENT
// ═══════════════════════════════════════════════════════════════════════════

// Slide 1 – Title
titleSlide(
  "Cerebral Edema",
  "Pathophysiology, Classification, and Management"
);

// Slide 2 – Outline / Contents
contentSlide(2, "Presentation Outline", [
  { heading: "SECTION 1: Introduction & Definitions" },
  { sub: "Overview • Neurovascular Unit • Blood-Brain Barrier" },
  { heading: "SECTION 2: Classification of Cerebral Edema" },
  { sub: "Vasogenic • Cytotoxic / Ionic • Interstitial • Osmotic" },
  { heading: "SECTION 3: Molecular Cascade in Injury" },
  { sub: "Excitotoxicity • Free Radicals • Neuroinflammation • Aquaporins" },
  { heading: "SECTION 4: Specific Clinical Scenarios" },
  { sub: "Ischemia • Trauma • Hemorrhage • Venous occlusion • High-Altitude • Hepatic" },
  { heading: "SECTION 5: ICP Monitoring & Herniation" },
  { sub: "Herniation syndromes • Monroe-Kellie • ICP monitoring" },
  { heading: "SECTION 6: Treatment" },
  { sub: "Medical • Surgical • Osmotherapy • Steroids • Hypothermia" },
  { heading: "SECTION 7: Special Topics" },
  { sub: "Hypertension & osmolality effects • Idiopathic intracranial hypertension" },
], { fontSize: 14.5 });

// ─── SECTION 1: Introduction ─────────────────────────────────────────────
sectionDivider(1, "Introduction & Definitions", "Neurovascular Unit · Blood-Brain Barrier · CSF Circulation");

// Slide 4
contentSlide(4, "What is Cerebral Edema?", [
  "Abnormal accumulation of fluid within the brain parenchyma resulting in increased brain volume",
  "End result of many neurological diseases — trauma, ischemia, neoplasm, infection, metabolic disturbance",
  "Leads to increased intracranial pressure (ICP) and threatens cerebral perfusion",
  { bold: "Four major types:" },
  { sub: "Vasogenic – BBB disruption → extracellular fluid expansion" },
  { sub: "Cytotoxic (cellular) – cell membrane failure → intracellular swelling" },
  { sub: "Ionic – extracellular accumulation with intact BBB" },
  { sub: "Interstitial – hydrocephalus → transependymal periventricular spread" },
  "Increased ICP and cerebral edema are life-threatening complications of shifts in water between cells and tissue (Bradley & Daroff, Ch. 88)",
]);

// Slide 5
contentSlide(5, "The Neurovascular Unit (NVU)", [
  "The NVU is the primary structural basis for separation of brain fluids from blood",
  "Components: cerebral endothelial cells, astrocytes, pericytes, neurons, microglia, basement membrane",
  "Specialized proteins form tight junctions (claudin-5, occludin, ZO-1) at all blood-brain interfaces",
  "In addition to tight junctions, the NVU contains carrier molecules and electrolyte pumps to:",
  { sub: "Preserve fluid balance" },
  { sub: "Provide nutrients to brain tissue" },
  { sub: "Remove waste materials from metabolism (Iadecola et al., 2007)" },
  "Disruption of tight junctions is the key first step in vasogenic edema formation",
]);

// Slide 6
contentSlide(6, "Blood-Brain Barrier (BBB)", [
  "Concept arose from Ehrlich's dye experiments (1885, 1913) — dye stained all organs except brain",
  "The BBB maintains distinct compartments: blood, interstitial fluid (ISF), and CSF",
  "ISF bathes brain cells, delivers nutrients, and removes waste — functions as a lymphatic equivalent",
  "CSF formed mainly at the choroid plexus; absorbed at arachnoid granulations",
  "In 1925, Cushing and Weed named the CSF/ISF system the 'third circulation'",
  "BBB breakdown is the hallmark of vasogenic edema",
  { bold: "Key BBB proteins:" },
  { sub: "Aquaporin-4 (AQP4) — bidirectional water channel on astrocyte endfeet" },
  { sub: "SUR1-TRPM4 channel — key mediator of ionic and cytotoxic edema" },
]);

// Slide 7
contentSlide(7, "CSF Dynamics and Fluid Compartments", [
  "Brain fluid is divided into three compartments: intravascular, intracellular, and extracellular (including CSF and ISF)",
  { bold: "CSF production:" },
  { sub: "~500 mL/day produced mainly by choroid plexus" },
  { sub: "Total CSF volume ~150 mL; turns over 3–4 times daily" },
  { bold: "Absorption:" },
  { sub: "Arachnoid granulations → dural venous sinuses" },
  { sub: "Recent evidence for glymphatic pathway (perivascular spaces)" },
  "If CSF outflow is blocked → obstructive hydrocephalus → transependymal flow → interstitial edema",
  "Cellular membranes preserve compartmental structure; pathological water shifts lead to swelling",
]);

// Slide 8
contentSlide(8, "Monroe-Kellie Doctrine & ICP", [
  "Brain volume = brain parenchyma + blood + CSF (within a fixed skull)",
  "Normal ICP: 5–15 mmHg (supine adults)",
  "Compensatory mechanisms buffer initial volume increases:",
  { sub: "CSF displacement into spinal subarachnoid space" },
  { sub: "Reduction in cerebral blood volume" },
  "Once compensatory reserve is exhausted, small increases in volume cause exponential ICP rise",
  "Cerebral Perfusion Pressure (CPP) = MAP – ICP",
  { sub: "Normal CPP target: 60–70 mmHg" },
  { sub: "ICP > 20 mmHg is the widely accepted treatment threshold" },
  "Sustained ICP elevation leads to herniation syndromes and brainstem compression",
]);

// ─── SECTION 2: Classification ────────────────────────────────────────────
sectionDivider(2, "Classification of Cerebral Edema", "Vasogenic · Cytotoxic · Ionic · Interstitial · Osmotic");

// Slide 10
tableSlide(10, "Classification of Cerebral Edema — Overview",
  ["Type", "BBB Intact?", "Location", "Key Mechanism", "Typical Cause"],
  [
    ["Vasogenic", "No (disrupted)", "Extracellular", "Plasma protein leak across damaged BBB", "Tumor, abscess, contusion"],
    ["Cytotoxic", "Yes", "Intracellular", "Failure of Na+/K+ ATPase → cell swelling", "Ischemia, TBI, toxins"],
    ["Ionic", "Yes", "Extracellular", "Net ionic flux without protein leak", "Ischemia (early), hypo-osmolality"],
    ["Interstitial", "Yes", "Periventricular ISF", "CSF outflow obstruction → transependymal spread", "Hydrocephalus"],
    ["Osmotic", "Yes", "Intracellular", "Osmotic gradient (plasma hypo-osmolality)", "Hyponatremia, SIADH"],
  ],
  [1.6, 1.4, 1.5, 2.7, 2.3]
);

// Slide 11
twoColSlide(11,
  "Vasogenic vs. Cytotoxic Edema",
  "Vasogenic Edema",
  [
    "BBB disrupted — plasma constituents leak into extracellular space",
    "Expands extracellular compartment",
    "Moves preferentially in white matter (loosely arranged fiber tracts)",
    "Gray matter restricts fluid movement (dense neuropil)",
    "Cells remain intact → potentially reversible if BBB heals",
    { bold: "Causes:" },
    { sub: "Brain tumors (primary & metastatic)" },
    { sub: "Abscesses & encephalitis" },
    { sub: "Contusions, post-operative edema" },
    { sub: "Hypertensive encephalopathy (PRES)" },
  ],
  "Cytotoxic Edema",
  [
    "BBB remains intact",
    "Direct injury to cells — failure of Na+/K+-ATPase pump",
    "Na+ accumulates intracellularly → osmotic water influx",
    "Extracellular space contracts (cells swell)",
    "Irreversible when cell membrane integrity is lost",
    { bold: "Causes:" },
    { sub: "Cerebral ischemia & infarction" },
    { sub: "Traumatic brain injury" },
    { sub: "Acute hepatic failure" },
    { sub: "Certain toxins (cyanide, CO)" },
  ]
);

// Slide 12
contentSlide(12, "Ionic Edema", [
  "Occurs in the presence of an intact BBB — net ionic flux into the brain without protein leak",
  "Mechanism: glutamate-mediated opening of ion channels on cell membranes",
  { sub: "One Ca²⁺ is exchanged for three Na⁺ ions" },
  { sub: "Sodium buildup → osmotic gradient → water enters cells" },
  "While cell membrane is intact, the increase in water causes dysfunction but not permanent damage",
  "This stage has been referred to as 'ionic edema' (Simard et al., 2017)",
  "SUR1-TRPM4 non-selective cation channels play a key role in ionic edema development",
  "Ionic edema is an early, potentially reversible phase preceding full cytotoxic edema",
  "Seen in acute ischemia, early TBI, and hypo-osmolar states",
]);

// Slide 13
contentSlide(13, "Interstitial and Osmotic Edema", [
  { heading: "Interstitial Edema" },
  "Occurs in hydrocephalus — obstruction of CSF outflow leads to increased intraventricular pressure",
  "Transependymal flow: CSF crosses the ependymal lining → periventricular white matter edema",
  "MRI: periventricular T2/FLAIR hyperintensity (particularly around the frontal and occipital horns)",
  "Resolves partially with CSF diversion (ventriculoperitoneal shunt or EVD)",
  { heading: "Osmotic Edema" },
  "Due to decrease in plasma osmolality — water moves into brain cells along osmotic gradient",
  "Causes: hyponatremia, SIADH, water intoxication, rapid dialysis disequilibrium",
  "Acute severe hyponatremia (<125 mEq/L) can cause life-threatening cerebral edema",
  "Treatment: cautious sodium correction (avoid rapid correction to prevent central pontine myelinolysis)",
]);

// ─── SECTION 3: Molecular Cascade ────────────────────────────────────────
sectionDivider(3, "Molecular Cascade in Injury", "Excitotoxicity · Free Radicals · Neuroinflammation · Aquaporins · HIF-1α");

// Slide 15
calloutSlide(15, "Injury Cascade — Overview",
  "The cascade begins with depletion of energy and glutamate release into the extracellular space. This occurs during hypoxic, ischemic, or traumatic injury and causes cytotoxic damage. (Bradley & Daroff, Ch. 88)",
  [
    "Energy failure (ATP depletion) → failure of Na+/K+-ATPase and other membrane pumps",
    "Glutamate release → NMDA/AMPA receptor activation → Ca²⁺ influx",
    "Calcium accumulation → activation of calpains, phospholipases, nitric oxide synthase",
    "Formation of immediate-early genes (c-fos, c-jun) → cytokine/chemokine cascade",
    "Microglial activation → release of free radicals and proteases",
    "Irreversible membrane damage when integrity is lost → cytotoxic edema → cell death",
  ]
);

// Slide 16
contentSlide(16, "Excitotoxicity — Glutamate & Calcium", [
  "Glutamate is the primary excitatory neurotransmitter; pathological accumulation drives excitotoxicity",
  { bold: "Mechanism:" },
  { sub: "NMDA receptor activation → Ca²⁺ channel opening" },
  { sub: "AMPA receptor: Na⁺ influx → membrane depolarization" },
  { sub: "Massive Ca²⁺ entry overwhelms buffering capacity" },
  "Ca²⁺ activates destructive intracellular enzymes:",
  { sub: "Calpains — protease, degrades cytoskeletal proteins" },
  { sub: "Phospholipase A₂ — generates arachidonic acid (precursor of ROS)" },
  { sub: "Neuronal nitric oxide synthase (nNOS) → peroxynitrite" },
  "Calcium-mediated mitochondrial dysfunction → cytochrome c release → apoptosis",
  "NMDA antagonists (e.g., memantine) studied for neuroprotection",
]);

// Slide 17
contentSlide(17, "Free Radicals and Oxidative Stress", [
  "Free radicals are pluripotential substances produced in ischemic brain and after traumatic injury",
  { bold: "Arachidonic acid cascade produces reactive oxygen species (ROS):" },
  { sub: "Superoxide ion (O₂⁻)" },
  { sub: "Hydrogen peroxide (H₂O₂)" },
  { sub: "Hydroxyl ion (•OH) — most reactive" },
  { bold: "Endogenous antioxidant defenses:" },
  { sub: "Superoxide dismutase-1 (SOD-1) — catalyzes O₂⁻ breakdown" },
  { sub: "Catalase — H₂O₂ breakdown" },
  { sub: "Glutathione, ascorbic acid (Vitamin C), Vitamin E" },
  { sub: "Iron chelators (21-amino steroids)" },
  "Transgenic mice overexpressing SOD-1 have smaller infarcts after focal ischemia",
  "ROS attack membrane lipids (lipid peroxidation), proteins, and DNA → amplify BBB breakdown",
]);

// Slide 18
contentSlide(18, "Neuroinflammation and Vasogenic Edema", [
  "Inflammatory response amplifies BBB disruption and promotes vasogenic edema",
  { bold: "Key inflammatory mediators:" },
  { sub: "Tumor necrosis factor-α (TNF-α) — upregulates ICAM-1, promotes leukocyte adhesion" },
  { sub: "Interleukin-1β (IL-1β) — stimulates cyclooxygenase, fever, endothelial activation" },
  { sub: "Vascular endothelial growth factor (VEGF) — potent BBB permeabilizer" },
  { sub: "Matrix metalloproteinases (MMPs) — degrade tight junction proteins and basement membrane" },
  "Leukocyte extravasation and microglial activation further damage vessel walls",
  "Complement activation contributes to secondary neuronal injury",
  "Anti-inflammatory targets (e.g., dexamethasone in vasogenic edema) reduce BBB permeability",
]);

// Slide 19
contentSlide(19, "Aquaporins — Water Channel Proteins", [
  "Aquaporins (AQPs) form pores in membranes that facilitate passive bidirectional water movement",
  { bold: "AQP4 — the dominant brain water channel:" },
  { sub: "Located on astrocyte endfeet surrounding blood vessels" },
  { sub: "Bidirectional — contributes to BOTH edema formation and resolution" },
  { sub: "Upregulated after cerebral ischemia and TBI" },
  "AQP4 knockout mice develop LESS cytotoxic edema but MORE vasogenic edema after injury",
  "AQP4 facilitates water reabsorption from ISF back into blood — important for edema clearance",
  { bold: "Other relevant AQPs in brain:" },
  { sub: "AQP1 — choroid plexus epithelium (CSF production)" },
  { sub: "AQP9 — astrocytes and neurons, lactate/glycerol transport" },
  "AQP4 inhibition is being explored as a therapeutic target for cytotoxic edema",
]);

// Slide 20
contentSlide(20, "HIF-1α and Sur1-TRPM4 Channels", [
  { bold: "Hypoxia-Inducible Factor-1α (HIF-1α):" },
  "Transcription factor activated by hypoxia — acts as a master regulator of hypoxic response",
  "Upregulates genes for erythropoiesis, angiogenesis, glycolysis, and cell survival",
  "Also upregulates VEGF → increases vascular permeability → promotes vasogenic edema",
  "HIF-1α stabilizers and inhibitors are under investigation for neuroprotection",
  { bold: "SUR1-TRPM4 Non-Selective Cation Channel:" },
  "Formed by coassembly of SUR1 (sulfonylurea receptor 1) and TRPM4 subunits",
  "Not expressed in healthy brain; dramatically upregulated after ischemia and TBI",
  "Opens in response to ATP depletion → Na⁺ influx → ionic/cytotoxic edema → oncotic cell death",
  "Glibenclamide (glyburide) blocks SUR1-TRPM4 → reduces cerebral edema in experimental models",
  { sub: "Clinical trial: GAMES-RP trial in large hemispheric infarction" },
]);

// ─── SECTION 4: Clinical Scenarios ───────────────────────────────────────
sectionDivider(4, "Clinical Scenarios", "Ischemia · Trauma · Hemorrhage · Venous Occlusion · Altitude · Hepatic");

// Slide 22
contentSlide(22, "Brain Edema in Ischemic Stroke", [
  "Cerebrovascular diseases are the major cause of brain edema in adults due to the high incidence of cerebral ischemia in the elderly (Bradley & Daroff, Ch. 88)",
  { bold: "Time course:" },
  { sub: "Cytotoxic edema begins within minutes of ischemic onset" },
  { sub: "Vasogenic edema (BBB breakdown) develops hours to days later" },
  { sub: "Peak swelling: 2–5 days post-infarction" },
  "During the first week after acute cerebral infarction, the most common cause of deterioration is brain edema (Bradley & Daroff, Ch. 60)",
  { bold: "Malignant MCA infarction:" },
  { sub: "Large hemispheric swelling with midline shift" },
  { sub: "Mortality 50–80% with medical management alone" },
  { sub: "Decompressive hemicraniectomy within 48 hours reduces mortality" },
  "DWI-MRI detects cytotoxic edema (restricted diffusion) within minutes of infarction",
]);

// Slide 23
contentSlide(23, "Brain Edema in Traumatic Brain Injury (TBI)", [
  "TBI produces a combination of cytotoxic, ionic, and vasogenic edema simultaneously",
  { bold: "Pathophysiology of TBI edema:" },
  { sub: "Primary injury: contusion, diffuse axonal injury → direct cell membrane disruption" },
  { sub: "Secondary injury: ischemia, hypoxia, inflammation → amplify edema" },
  { sub: "BBB disruption: peaks 4–6 hours after injury; can persist for days" },
  { bold: "Secondary injury triggers:" },
  { sub: "Hypotension (SBP < 90 mmHg) — worsens ischemic edema" },
  { sub: "Hypoxia (PaO₂ < 60 mmHg) — augments cytotoxic cascade" },
  { sub: "Pyrexia — increases metabolic demand" },
  { sub: "Hyperglycemia — worsens intracellular acidosis" },
  "ICP monitoring is standard in severe TBI (GCS ≤ 8) — Brain Trauma Foundation guidelines",
]);

// Slide 24
contentSlide(24, "Brain Edema in Intracerebral Hemorrhage (ICH)", [
  "ICH produces edema by multiple mechanisms: mass effect, perihematomal ischemia, and toxic blood products",
  { bold: "Phases of edema in ICH:" },
  { sub: "Early (hours): clot retraction → plasma protein exudation → vasogenic perihematomal edema" },
  { sub: "Delayed (12–24h): hemoglobin degradation products (thrombin, iron, HgB) → secondary injury" },
  { sub: "Thrombin: activates protease-activated receptors → BBB disruption and inflammation" },
  "Perihematomal edema continues to expand for up to 14 days",
  "Edema volume independently predicts outcome in ICH",
  "Intensive blood pressure control (SBP < 140 mmHg) shown to reduce hematoma and edema expansion",
  "Deferoxamine (iron chelator) evaluated to reduce hemoglobin-mediated secondary injury",
  "Minimally invasive surgery to evacuate hematoma may reduce edema mass effect",
]);

// Slide 25
contentSlide(25, "Brain Edema in Venous Occlusion", [
  "Cerebral venous sinus thrombosis (CVST) produces a unique pattern of edema",
  { bold: "Mechanisms in CVST:" },
  { sub: "Venous hypertension → increased capillary pressure → vasogenic edema" },
  { sub: "Venous infarction → cytotoxic edema + hemorrhagic transformation" },
  { sub: "CSF outflow obstruction → raised ICP (if major sinus involved)" },
  "Unlike arterial infarcts, CVST edema does not respect vascular territories",
  "Hemorrhagic venous infarctions have high edema burden and mass effect",
  "Anticoagulation is the treatment of choice (even in hemorrhagic transformation)",
  "ICP management important when major sinuses (superior sagittal sinus) occluded",
  "Catheter-directed thrombolysis/thrombectomy for refractory cases",
]);

// Slide 26
contentSlide(26, "High-Altitude Cerebral Edema (HACE)", [
  "HACE occurs when the concentration of oxygen (normally 21%) is markedly reduced as altitude increases and atmospheric pressure is reduced (Bradley & Daroff, Ch. 88)",
  { bold: "Pathophysiology:" },
  { sub: "Hypobaric hypoxia → hypoxic cerebral vasodilation → increased CBF and capillary pressure" },
  { sub: "Hypoxia activates HIF-1α → VEGF upregulation → vasogenic edema" },
  { sub: "Tight junctions disrupted → protein-rich fluid leaks into brain" },
  { bold: "Clinical features:" },
  { sub: "Severe headache, ataxia, altered consciousness" },
  { sub: "Usually preceded by AMS (Acute Mountain Sickness)" },
  { sub: "Develops at altitudes > 2,500–3,000 m, more common above 4,000 m" },
  { bold: "Treatment:" },
  { sub: "Immediate descent (most effective)" },
  { sub: "Supplemental O₂, portable hyperbaric chamber (Gamow bag)" },
  { sub: "Dexamethasone — reduces vasogenic edema" },
  { sub: "Acetazolamide — prophylaxis" },
]);

// Slide 27
contentSlide(27, "Brain Edema in Hepatic Encephalopathy", [
  "In patients with acute hepatic failure, development of severe cerebral edema is common",
  "Leading cause of death in acute liver failure (ALF)",
  { bold: "Mechanism:" },
  { sub: "Ammonia (NH₃) metabolized to glutamine in astrocytes → astrocyte swelling (cytotoxic)" },
  { sub: "Oxidative stress in astrocytes → mitochondrial permeability transition" },
  { sub: "Inflammatory cytokines from failing liver amplify neuroinflammation" },
  { sub: "Loss of autoregulation → hyperemia → vasogenic component" },
  { bold: "Clinical features:" },
  { sub: "Grades I–IV hepatic encephalopathy → Grade IV: coma with ICP elevation" },
  { sub: "ICP often rises rapidly in ALF — urgent monitoring and intervention required" },
  { bold: "Management:" },
  { sub: "ICP monitoring (controversial due to coagulopathy)" },
  { sub: "Lactulose, rifaximin, sodium benzoate — reduce ammonia" },
  { sub: "Hypothermia and MARS (molecular adsorbent recirculating system)" },
  { sub: "Liver transplantation (definitive)" },
]);

// Slide 28
contentSlide(28, "Brain Edema in Diabetic Emergencies", [
  "Cerebral edema develops in approximately 1% of cases of diabetic ketoacidosis (DKA)",
  "Occurs rarely in diabetics older than 20 years — primarily a complication of pediatric DKA",
  { bold: "Mechanism (attributed etiology):" },
  { sub: "Retention of intracellular osmolytes (idiogenic osmoles) during hyperosmolar state" },
  { sub: "Rapid correction of hyperglycemia → osmotic shift → water enters brain cells" },
  { sub: "Rapid fluid administration may worsen cerebral edema" },
  { bold: "Clinical presentation:" },
  { sub: "Headache, declining consciousness during DKA treatment" },
  { sub: "Cushing's triad may develop if ICP becomes critical" },
  { bold: "Management:" },
  { sub: "Gradual correction of glucose and fluid deficits" },
  { sub: "Mannitol or hypertonic saline for acute cerebral edema" },
  { sub: "Avoid rapid osmolality changes" },
]);

// Slide 29
contentSlide(29, "PRES — Posterior Reversible Encephalopathy Syndrome", [
  "PRES is characterized by vasogenic edema predominantly in posterior brain regions",
  { bold: "Pathophysiology:" },
  { sub: "Severe hypertension overwhelms cerebrovascular autoregulation" },
  { sub: "Forced vasodilation → hyperperfusion → vasogenic edema (posterior > anterior)" },
  { sub: "Posterior circulation has less sympathetic innervation → less autoregulatory protection" },
  { bold: "Causes:" },
  { sub: "Hypertensive emergency, eclampsia, preeclampsia" },
  { sub: "Immunosuppressants (cyclosporine, tacrolimus)" },
  { sub: "Cytotoxic chemotherapy" },
  { bold: "Clinical features:" },
  { sub: "Headache, visual disturbances (cortical blindness), seizures, encephalopathy" },
  { bold: "MRI:" },
  { sub: "T2/FLAIR hyperintensity — posterior parietal and occipital lobes (bilateral)" },
  { sub: "Restricted diffusion absent (vasogenic, not cytotoxic)" },
  "Generally reversible with blood pressure control and removal of offending agent",
]);

// Slide 30
contentSlide(30, "Brain Edema in CNS Infections", [
  "Bacterial meningitis and encephalitis are important causes of cerebral edema",
  { bold: "Mechanisms in bacterial meningitis:" },
  { sub: "Direct BBB disruption by bacterial products (LPS, pneumococcal toxins)" },
  { sub: "Intense neutrophilic exudate → cytokine storm → vasogenic + cytotoxic edema" },
  { sub: "CSF outflow obstruction → communicating hydrocephalus → interstitial edema" },
  { sub: "Vasculitis → focal ischemia → additional cytotoxic edema" },
  { bold: "Mechanisms in herpes encephalitis:" },
  { sub: "Temporal lobe predilection — necrotizing encephalitis → hemorrhagic edema" },
  "Adjunct dexamethasone reduces mortality and neurological sequelae in bacterial meningitis:",
  { sub: "0.15 mg/kg IV q6h × 4 days, started before or with first antibiotic dose" },
  "ICP monitoring and osmotherapy may be required in severe cases",
  "Acyclovir (10 mg/kg IV q8h × 14–21 days) for HSV encephalitis",
]);

// ─── SECTION 5: ICP Monitoring & Herniation ──────────────────────────────
sectionDivider(5, "ICP Monitoring & Herniation Syndromes", "Monroe-Kellie · ICP Waveforms · Herniation Patterns");

// Slide 32
contentSlide(32, "Herniation Syndromes", [
  "Cerebral herniation occurs when raised ICP forces brain tissue across dural compartments",
  { bold: "1. Uncal (transtentorial) herniation:" },
  { sub: "Temporal lobe uncus herniates over tentorial edge" },
  { sub: "CN III compression → ipsilateral fixed dilated pupil (earliest sign)" },
  { sub: "Midbrain compression → contralateral hemiparesis (or ipsilateral — Kernohan's notch)" },
  { bold: "2. Central (transtentorial) herniation:" },
  { sub: "Symmetric downward displacement of diencephalon and brainstem" },
  { sub: "Bilateral small reactive pupils → fixed midposition pupils → death" },
  { bold: "3. Tonsillar (cerebellar) herniation:" },
  { sub: "Cerebellar tonsils forced through foramen magnum" },
  { sub: "Medullary compression → cardiorespiratory arrest" },
  { bold: "4. Subfalcine herniation:" },
  { sub: "Cingulate gyrus displaces under falx cerebri → ACA compression" },
]);

// Slide 33
contentSlide(33, "ICP Monitoring — Indications and Methods", [
  "ICP monitoring is standard of care in severe TBI (GCS ≤ 8 with abnormal CT head)",
  { bold: "Indications for ICP monitoring:" },
  { sub: "Severe TBI (GCS ≤ 8)" },
  { sub: "Large ischemic or hemorrhagic stroke with mass effect" },
  { sub: "Acute liver failure with Grade III-IV encephalopathy" },
  { sub: "CNS infections with decreased consciousness" },
  { bold: "Monitoring modalities:" },
  { sub: "Intraventricular catheter (EVD) — gold standard; allows CSF drainage" },
  { sub: "Intraparenchymal microsensor (Codman, Camino) — accurate, less risk of infection" },
  { sub: "Epidural — less accurate; not used for therapeutic CSF drainage" },
  { sub: "Non-invasive: transcranial Doppler (pulsatility index), optic nerve sheath diameter >5 mm" },
  "ICP > 20–22 mmHg requires treatment per Brain Trauma Foundation 4th Edition guidelines",
]);

// Slide 34
contentSlide(34, "ICP Waveforms and Clinical Interpretation", [
  { bold: "Normal ICP waveform (Lundberg waves):" },
  { sub: "P1 (percussion wave) — arterial pulsation; P2 (tidal wave) — brain compliance" },
  { sub: "P3 (dicrotic notch) — reflects aortic valve closure" },
  "Normal P1 > P2; P2 > P1 suggests decreased intracranial compliance (early warning sign)",
  { bold: "Plateau waves (Lundberg A waves):" },
  { sub: "Sustained ICP elevations 50–100 mmHg lasting 5–20 minutes" },
  { sub: "Indicate severely compromised compliance; require immediate intervention" },
  { bold: "B waves:" },
  { sub: "Regular oscillations 0.5–2/min; relate to respiratory cycle; indicate reduced reserve" },
  "Sustained ICP elevation > 20 mmHg → reduces CPP → risks ischemia",
  "CPP target: 60–70 mmHg (avoid CPP < 50 mmHg — ischemia; > 70 mmHg — aggressive therapy risk)",
]);

// ─── SECTION 6: Treatment ─────────────────────────────────────────────────
sectionDivider(6, "Treatment of Cerebral Edema", "Osmotherapy · Steroids · Hyperventilation · Hypothermia · Surgery");

// Slide 36
contentSlide(36, "General Principles of ICP Management", [
  { bold: "First-line measures (always apply):" },
  "Head of bed elevation 30–45° — reduces ICP without compromising CPP",
  "Avoid hypotension (SBP < 90 mmHg) — treat aggressively",
  "Avoid hypoxia (maintain PaO₂ > 80 mmHg; SpO₂ > 94%)",
  "Normothermia — fever increases ICP; use cooling devices if needed",
  "Normonatremia to mild hypernatremia (138–145 mEq/L for most cases)",
  "Normovolemia — avoid over-hydration with hypotonic fluids",
  { bold: "Seizure management:" },
  "Seizures acutely increase ICP; prophylaxis recommended in TBI and ICH",
  { bold: "Pain and agitation control:" },
  "Coughing, agitation, Valsalva maneuver acutely spike ICP",
  "Appropriate sedation (propofol, midazolam) and analgesia",
]);

// Slide 37
contentSlide(37, "Osmotherapy — Mannitol", [
  { bold: "Mannitol (20% solution) — first-line osmotherapy for ICP crises:" },
  "Mechanism: raises plasma osmolality → osmotic gradient draws water from brain into blood",
  "Also reduces blood viscosity → vasoconstriction → reduces CBV and ICP",
  { bold: "Dosing:" },
  { sub: "0.25–1.0 g/kg IV bolus over 15–20 minutes" },
  { sub: "Can repeat every 4–6 hours; maintain serum osmolality < 320 mOsm/kg" },
  { sub: "Insert Foley catheter — significant osmotic diuresis expected" },
  { bold: "Monitoring:" },
  { sub: "Serum osmolality, electrolytes, BUN, creatinine every 4–6 hours" },
  { sub: "Osmol gap > 20 mOsm/kg — drug accumulation; risk of renal failure" },
  { bold: "Contraindications:" },
  { sub: "Renal failure (relative), hypotension (relative), anuria" },
  { sub: "Caution in volume-depleted patients — may worsen hypotension" },
]);

// Slide 38
contentSlide(38, "Osmotherapy — Hypertonic Saline (HTS)", [
  { bold: "Hypertonic Saline (HTS) — increasingly preferred over mannitol:" },
  "Raises serum sodium and osmolality → creates osmotic gradient → reduces brain water",
  "Does not cause osmotic diuresis — useful in hypovolemic patients",
  "May be superior to mannitol in refractory ICP elevation and TBI",
  { bold: "Available formulations:" },
  { sub: "3% NaCl — continuous infusion (typically via central line) 0.1–1.0 mL/kg/hr" },
  { sub: "7.5% NaCl — bolus 1.5–3 mL/kg over 20–30 minutes" },
  { sub: "23.4% NaCl — 30 mL bolus for ICP crises (must have central access)" },
  { bold: "Targets:" },
  { sub: "Serum Na⁺: 145–155 mEq/L (some protocols target 150–160)" },
  { sub: "Serum osmolality: 300–320 mOsm/kg" },
  { bold: "Adverse effects:" },
  { sub: "Rebound edema if stopped abruptly; pulmonary edema; electrolyte disturbance" },
  { sub: "Central pontine myelinolysis with too-rapid sodium correction from hyponatremia" },
]);

// Slide 39
contentSlide(39, "Corticosteroids in Cerebral Edema", [
  { bold: "Dexamethasone — highly effective for VASOGENIC edema associated with brain tumors:" },
  "Reduces BBB permeability, inhibits VEGF, downregulates inflammatory mediators",
  "Standard regimen: 10 mg IV loading dose, then 4 mg IV q6h",
  "Effect on peritumoral edema: onset 6–24 hours; maximum effect at 48–72 hours",
  "Can dramatically reduce symptoms of raised ICP in neoplastic edema",
  { bold: "Indications:" },
  { sub: "Peritumoral vasogenic edema (primary brain tumors, metastases)" },
  { sub: "Bacterial meningitis (before or with first antibiotic dose)" },
  { sub: "High-altitude cerebral edema" },
  { sub: "Spinal cord compression (high-dose methylprednisolone — controversial)" },
  { bold: "NOT indicated for:" },
  { sub: "Cytotoxic edema (ischemia, TBI) — no benefit, potential harm (hyperglycemia, infection)" },
  { sub: "ICH — increases mortality; no benefit demonstrated in RCTs" },
]);

// Slide 40
contentSlide(40, "Hyperventilation", [
  { bold: "Hyperventilation — rapid, temporary ICP reduction:" },
  "↓ PaCO₂ → cerebral arteriolar vasoconstriction → ↓ CBV → ↓ ICP",
  "Each 1 mmHg decrease in PaCO₂ reduces ICP by approximately 2 mmHg",
  { bold: "Protocol:" },
  { sub: "Moderate hyperventilation: target PaCO₂ 30–35 mmHg (first-line)" },
  { sub: "Aggressive hyperventilation (PaCO₂ 25–30 mmHg) — reserved for herniation crises" },
  { bold: "Critical limitations:" },
  "Effect is transient — cerebral vasomotor adaptation occurs within 4–6 hours",
  "Prolonged hyperventilation → ischemia in already-compromised tissue",
  "NOT recommended as prophylaxis or for prolonged use",
  { bold: "Role in clinical practice:" },
  { sub: "Bridge therapy: herniation crisis while awaiting definitive intervention" },
  { sub: "Intraoperative ICP control" },
  { sub: "Target PaCO₂35–40 mmHg once acute crisis resolved" },
]);

// Slide 41
contentSlide(41, "Induced Hypothermia", [
  "Therapeutic hypothermia reduces ICP by decreasing cerebral metabolic rate",
  { bold: "Mechanisms of neuroprotection:" },
  { sub: "Reduces CMRO₂ by ~7% per 1°C decrease" },
  { sub: "Attenuates glutamate release and excitotoxicity" },
  { sub: "Reduces free radical generation and lipid peroxidation" },
  { sub: "Decreases inflammatory cytokine production" },
  { sub: "Reduces cerebral blood flow and ICP" },
  { bold: "Target temperature:" },
  { sub: "Mild: 35–36°C (fever prevention in TBI)" },
  { sub: "Moderate: 32–34°C (established cardiac arrest protocol, refractory ICP)" },
  "Meta-analysis of TBI trials: hypothermia reduces ICP but inconsistent outcome benefit",
  { bold: "Adverse effects:" },
  { sub: "Coagulopathy, infection risk, arrhythmias, electrolyte disturbances (K⁺, Mg²⁺, PO₄)" },
  { sub: "Rebound ICP elevation on rewarming — rewarm slowly (0.25°C/hour)" },
]);

// Slide 42
contentSlide(42, "Barbiturate Coma", [
  "High-dose barbiturate therapy reserved for refractory ICP elevation failing all other measures",
  { bold: "Mechanism:" },
  { sub: "Profound reduction in CMRO₂ and CBF" },
  { sub: "Reduces cerebral electrical activity → EEG burst suppression" },
  { sub: "Scavenges free radicals" },
  { bold: "Agent and dosing:" },
  { sub: "Pentobarbital: 5–10 mg/kg IV loading dose, then 1–4 mg/kg/hr infusion" },
  { sub: "Thiopental also used (less available in North America)" },
  "EEG monitoring required — titrate to burst suppression pattern",
  { bold: "Complications:" },
  { sub: "Cardiovascular depression — hypotension requiring vasopressors (nearly universal)" },
  { sub: "Ileus, immunosuppression, prolonged awakening" },
  { sub: "Confounds neurological assessment — use only when ICP monitoring in place" },
  "Brain Trauma Foundation: high-dose pentobarbital recommended for salvageable patients with refractory ICP",
]);

// Slide 43
contentSlide(43, "Surgical Management of Cerebral Edema", [
  { bold: "Decompressive Craniectomy (DC):" },
  "Removes a large bone flap to allow the edematous brain to herniate outward without brainstem compression",
  "DESTINY II trial (malignant MCA infarction > 60 years): DC reduces mortality but increases survivors with disability",
  "HAMLET, DECIMAL, DESTINY I trials (< 60 years): DC within 48 hours significantly reduces mortality (71% → 22%)",
  "Also used in refractory TBI with ICP > 20 mmHg unresponsive to medical therapy",
  { bold: "CSF Drainage:" },
  { sub: "External ventricular drain (EVD) — lowers ICP by draining CSF" },
  { sub: "Lumbar drain — caution if posterior fossa mass (risk of herniation)" },
  { bold: "Hematoma evacuation:" },
  { sub: "Supratentorial ICH with herniation: surgical evacuation considered" },
  { sub: "Cerebellar ICH > 3 cm or causing obstructive hydrocephalus: urgent surgical evacuation" },
  { sub: "Minimally invasive hematoma evacuation (MIS) techniques — ongoing trials" },
]);

// Slide 44
contentSlide(44, "Effect of Blood Pressure & Osmolality on Brain Edema", [
  { bold: "Blood Pressure Effects:" },
  "Autoregulation normally maintains CBF constant despite MAP 50–150 mmHg",
  "In injured brain: autoregulation is impaired or absent",
  { sub: "Hypotension → reduction in CPP → ischemia → cytotoxic edema worsening" },
  { sub: "Severe hypertension → breakthrough hyperperfusion → vasogenic edema (PRES)" },
  "Blood pressure management must balance adequate CPP vs. reducing edema-promoting hypertension",
  { bold: "Osmolality Effects:" },
  "Brain water content is exquisitely sensitive to plasma osmolality",
  { sub: "Hypo-osmolality (↓ Na⁺) → brain water increases (osmotic edema)" },
  { sub: "Hyperosmolality (↑ Na⁺ or mannitol) → brain water decreases" },
  "Each 1 mOsm/kg change in plasma osmolality changes brain water by ~0.2 mL/100g brain",
  "Avoid hypotonic IV fluids (0.45% NaCl, dextrose 5% water) in brain-injured patients",
]);

// ─── SECTION 7: Special Topics ────────────────────────────────────────────
sectionDivider(7, "Special Topics", "IIH · Imaging · Monitoring Goals · Neuroprotection");

// Slide 46
contentSlide(46, "Idiopathic Intracranial Hypertension (IIH)", [
  "IIH (pseudotumor cerebri): elevated ICP without identifiable cause or ventriculomegaly",
  { bold: "Epidemiology:" },
  { sub: "Primarily affects obese women of childbearing age (BMI > 30)" },
  { sub: "Incidence: 1–2/100,000; 15–19/100,000 in obese women aged 20–44 years" },
  { bold: "Clinical features:" },
  { sub: "Headache (>90%), pulsatile tinnitus, transient visual obscurations" },
  { sub: "Papilledema (bilateral optic disc swelling) — hallmark finding" },
  { sub: "Sixth nerve palsy (false localizing sign)" },
  { sub: "Visual field defects — enlarged blind spot, arcuate scotoma" },
  { bold: "Diagnosis (Modified Dandy Criteria):" },
  { sub: "Elevated opening pressure > 25 cmH₂O on LP with patient in lateral decubitus" },
  { sub: "Normal CSF composition, normal brain imaging, no other identifiable cause" },
]);

// Slide 47
contentSlide(47, "IIH — Brain Edema and Treatment", [
  "Brain edema in IIH: may involve interstitial edema due to elevated CSF pressure",
  "The precise mechanism by which obesity promotes IIH remains incompletely understood",
  { bold: "Proposed mechanisms:" },
  { sub: "Increased intra-abdominal pressure → elevated intracranial venous pressure" },
  { sub: "Adipokines and hormonal factors increase CSF production or reduce absorption" },
  { sub: "Venous sinus stenosis (lateral sinuses) — secondary effect or contributing cause" },
  { bold: "Treatment:" },
  "Weight loss (first-line in obese patients) — can normalize ICP",
  "Acetazolamide (carbonic anhydrase inhibitor) — reduces CSF production; 500mg–4g/day",
  "Topiramate — modest carbonic anhydrase inhibition; weight-reducing effect beneficial",
  "Furosemide — modest second-line agent",
  { bold: "If medical therapy fails or vision threatened:" },
  { sub: "Serial lumbar punctures — temporary relief" },
  { sub: "Optic nerve sheath fenestration — protects vision" },
  { sub: "CSF shunting (VP or LP shunt)" },
  { sub: "Venous sinus stenting (if venous stenosis demonstrated)" },
]);

// Slide 48
contentSlide(48, "Neuroimaging in Cerebral Edema", [
  { bold: "CT Head (non-contrast):" },
  { sub: "First-line — detects hemorrhage, shift, hydrocephalus, herniation" },
  { sub: "Edema appears as hypodensity; loss of gray-white differentiation in ischemia" },
  { sub: "Sulcal effacement, compressed basal cisterns — signs of severe edema" },
  { bold: "MRI Sequences:" },
  { sub: "T2/FLAIR — detects vasogenic edema (hyperintense); best overall edema visualization" },
  { sub: "DWI/ADC — restricted diffusion (bright DWI, dark ADC) = cytotoxic edema (ischemia)" },
  { sub: "T1+Gd — BBB breakdown: contrast enhancement in vasogenic edema (tumors, abscesses)" },
  { sub: "SWI/GRE — blood products, microhemorrhages in hemorrhagic edema" },
  { bold: "Advanced imaging:" },
  { sub: "MR perfusion — CBF/CBV/MTT/Tmax; defines ischemic penumbra" },
  { sub: "MR spectroscopy — lactate peak in ischemia, NAA reduction in injury" },
  { sub: "CT perfusion — acute stroke triage; rapid and widely available" },
]);

// Slide 49
contentSlide(49, "Neuroprotective Strategies — Current Evidence", [
  { bold: "Glibenclamide (Glyburide):" },
  "SUR1-TRPM4 blocker; reduces ionic/cytotoxic edema in preclinical models",
  { sub: "GAMES-RP trial: reduced MLS in large hemispheric infarction; phase III ongoing" },
  { bold: "Erythropoietin (EPO):" },
  "HIF-1α target gene; neuroprotective in animal models via anti-apoptotic and anti-inflammatory effects",
  { sub: "Phase III trials in TBI failed to show consistent clinical benefit" },
  { bold: "AQP4 modulators:" },
  "Selective AQP4 inhibitors to reduce cytotoxic edema — preclinical stage only",
  { bold: "Anti-VEGF therapy:" },
  "Bevacizumab reduces vasogenic edema in radiation necrosis and recurrent glioblastoma",
  { bold: "Progesterone:" },
  "Animal data showed reduction of TBI edema; ProTECT III/SyNAPSe clinical trials were negative",
  { bold: "Minocycline, NAC, NXY-059:" },
  "Anti-inflammatory/free radical approaches — largely negative in Phase III stroke trials",
]);

// Slide 50
contentSlide(50, "Monitoring Bundle in Severe Cerebral Edema", [
  { bold: "Multimodal monitoring (MMM) approach:" },
  "ICP — ventriculostomy or intraparenchymal probe; target < 20–22 mmHg",
  "CPP — target 60–70 mmHg (MAP minus ICP)",
  "Brain tissue oxygen (PbtO₂) — Licox probe; target > 20 mmHg",
  { sub: "Scalp edema and forehead abrasion can interfere with cerebral oximetry (Bradley & Daroff)" },
  "Jugular venous oximetry (SjO₂) — global cerebral oxygen extraction; target 55–75%",
  "Transcranial Doppler (TCD) — non-invasive CBF estimation; pulsatility index",
  "Continuous EEG — detect non-convulsive status epilepticus (common in comatose patients)",
  "Temperature — continuous core temperature; fever increases ICP and metabolic demand",
  { bold: "Laboratory monitoring:" },
  { sub: "Serum Na⁺, osmolality q4–6h during osmotherapy" },
  { sub: "Blood glucose q1–4h; maintain 140–180 mg/dL" },
  { sub: "Coagulation, CBC — especially in ICH/anticoagulated patients" },
]);

// Slide 51
tableSlide(51, "ICP Treatment Ladder — Stepwise Protocol",
  ["Step", "Intervention", "Target / Notes"],
  [
    ["1 (Universal)", "HOB 30°, normovolemia, normothermia, normoxia, avoid hyponatremia", "Applies to ALL patients"],
    ["2 (ICP > 20)", "Sedation + analgesia (propofol, fentanyl)", "Reduces agitation-related ICP spikes"],
    ["3 (ICP > 20)", "CSF drainage via EVD", "1st choice if EVD in situ"],
    ["4 (ICP > 20)", "Osmotherapy: mannitol 0.25–1 g/kg OR 23.4% NaCl 30 mL bolus", "Check osmolality q4–6h"],
    ["5 (ICP > 20)", "Moderate hyperventilation: PaCO₂ 30–35 mmHg", "Temporary bridge only"],
    ["6 (Refractory)", "Decompressive craniectomy", "Malignant stroke / TBI"],
    ["7 (Refractory)", "Barbiturate coma (pentobarbital) + EEG monitoring", "Last resort; requires vasopressors"],
    ["8 (Refractory)", "Therapeutic hypothermia (32–34°C)", "Rewarm slowly (0.25°C/hr)"],
  ],
  [0.4, 4.5, 4.6]
);

// Slide 52
tableSlide(52, "Drug Summary — Pharmacotherapy of Cerebral Edema",
  ["Drug", "Mechanism", "Indication", "Dose"],
  [
    ["Mannitol 20%", "Osmotic gradient, ↓ viscosity", "Cytotoxic/vasogenic ICP crisis", "0.25–1 g/kg IV bolus q4–6h"],
    ["HTS 23.4%", "Osmotic gradient, no diuresis", "TBI, malignant infarct, ICH", "30 mL IV bolus (central access)"],
    ["Dexamethasone", "↓ BBB permeability, anti-VEGF", "Tumor/abscess vasogenic edema", "10 mg IV then 4 mg q6h"],
    ["Acetazolamide", "↓ CSF production (CA inhibitor)", "IIH, altitude prophylaxis", "250–500 mg PO/IV BID"],
    ["Pentobarbital", "↓ CMRO₂, CBF; burst suppression", "Refractory ICP (TBI)", "5–10 mg/kg load; 1–4 mg/kg/hr"],
    ["Dexamethasone", "Reduces vasogenic edema", "HACE, meningitis", "0.15 mg/kg q6h (meningitis)"],
    ["Glibenclamide", "SUR1-TRPM4 blocker", "Large hemispheric infarct (investigational)", "Clinical trials"],
    ["Hypertonic NaCl 3%", "Osmotherapy, ↑ Na", "Sustained ICP elevation", "0.1–1 mL/kg/hr (central)"],
  ],
  [1.8, 2.2, 2.5, 3.0]
);

// Slide 53
contentSlide(53, "Edema Resolution and Repair", [
  "Resolution of cerebral edema requires both cessation of fluid entry and active clearance",
  { bold: "Vasogenic edema resolution:" },
  { sub: "Depends on restoration of BBB integrity" },
  { sub: "AQP4-mediated water reabsorption through astrocyte endfeet" },
  { sub: "Potentially reversible if underlying cause (e.g., tumor, hypertension) is treated" },
  { bold: "Cytotoxic edema resolution:" },
  { sub: "Generally irreversible once cell membrane integrity is lost" },
  { sub: "Necrotic tissue → macrophage/microglia phagocytosis → cystic encephalomalacia" },
  { bold: "Interstitial edema resolution:" },
  { sub: "Variable — depends on degree of CSF pressure reduction" },
  { sub: "Partial resolution with CSF diversion (VP or LP shunt)" },
  "Glymphatic system (perivascular clearance) — emerging evidence for edema clearance during sleep",
  "Post-edema brain atrophy and gliosis contribute to chronic neurological deficits",
]);

// Slide 54
contentSlide(54, "Pediatric Considerations in Cerebral Edema", [
  "Cerebral edema in children has unique features compared to adults",
  { bold: "Key differences:" },
  { sub: "Open fontanelles/sutures in infants allow partial buffering of ICP" },
  { sub: "Higher brain water content in neonates — more susceptible to osmotic shifts" },
  { sub: "DKA-related cerebral edema occurs almost exclusively in children" },
  { sub: "Reye syndrome — now rare (aspirin avoidance); cytotoxic + vasogenic edema in acute liver failure" },
  { bold: "TBI in children:" },
  { sub: "Diffuse cerebral swelling more common than focal hematomas (compared to adults)" },
  { sub: "Hyperemia (increased CBF) contributes to ICP elevation more than in adults" },
  { sub: "Better recovery potential due to neuroplasticity" },
  { bold: "ICP monitoring in children:" },
  { sub: "Same principles as adults; weight-adjusted drug dosing" },
  { sub: "Acetazolamide well-tolerated in pediatric IIH" },
]);

// Slide 55
contentSlide(55, "Prognosis and Outcomes", [
  { bold: "Factors predicting poor outcome in cerebral edema:" },
  "Sustained ICP > 20 mmHg despite maximal therapy",
  "Loss of pressure autoregulation (PRx > 0 continuously)",
  "Bilateral pupillary dilation (uncal herniation with brainstem compression)",
  "Brain tissue PO₂ < 10 mmHg",
  "Age > 60 years (reduced plasticity and comorbidities)",
  "Underlying cause (GBM — median survival 15 months; ischemic stroke — 30-day mortality 25–30%)",
  { bold: "Markers of favorable prognosis:" },
  "Early restoration of cerebral autoregulation",
  "ICP < 20 mmHg within 24 hours of treatment",
  "Intact brainstem reflexes",
  "Young age, previously healthy",
  "Vasogenic edema (potentially reversible) vs. cytotoxic (usually irreversible)",
]);

// Slide 56
contentSlide(56, "Rehabilitation After Cerebral Edema", [
  "Neurological deficits after cerebral edema depend on the extent and location of irreversible injury",
  { bold: "Common sequelae:" },
  { sub: "Cognitive impairment (memory, attention, executive function)" },
  { sub: "Motor deficits (hemiparesis, ataxia)" },
  { sub: "Language disorders (aphasia, dysarthria)" },
  { sub: "Seizures (post-stroke, post-TBI epilepsy)" },
  { sub: "Psychiatric comorbidities (depression, PTSD, anxiety)" },
  { bold: "Rehabilitation principles:" },
  "Early mobilization and physical therapy — reduces complications and promotes recovery",
  "Cognitive rehabilitation — targeted memory, attention, and language programs",
  "Occupational and speech therapy",
  "Anti-epileptic drugs for post-injury seizures (levetiracetam preferred — no drug interactions)",
  "Neuroplasticity supports long-term functional recovery even after significant injury",
]);

// Slide 57
contentSlide(57, "Emerging Research and Future Directions", [
  { bold: "Glymphatic system:" },
  { sub: "Perivascular CSF-ISF exchange driven by AQP4 on astrocytes" },
  { sub: "Sleep-dependent clearance of waste products (including Aβ and tau)" },
  { sub: "Glymphatic dysfunction may amplify edema and impair clearance" },
  { bold: "Stem cell and gene therapy:" },
  { sub: "Endothelial progenitor cells to repair BBB after injury" },
  { sub: "Gene silencing of AQP4 to reduce cytotoxic edema" },
  { bold: "Biomarkers for bedside monitoring:" },
  { sub: "GFAP (glial fibrillary acidic protein) — astrocyte injury marker" },
  { sub: "UCH-L1 (ubiquitin C-terminal hydrolase L1) — neuronal injury marker" },
  { sub: "S100B — non-specific glial marker; correlates with edema severity" },
  { bold: "Drug targets under investigation:" },
  { sub: "SUR1-TRPM4 inhibitors (glibenclamide/BIIB093)" },
  { sub: "MMP inhibitors (reduce BBB breakdown)" },
  { sub: "Anti-VEGF (bevacizumab) for radiation necrosis/tumor edema" },
]);

// Slide 58
contentSlide(58, "Clinical Pearls — Key Take-Home Points", [
  "Cerebral edema is a final common pathway of injury in most serious neurological diseases",
  "Classify edema type FIRST — vasogenic vs. cytotoxic — as treatment differs fundamentally",
  "Corticosteroids work for vasogenic edema (tumors, abscesses, HACE) — not for cytotoxic (stroke, TBI)",
  "Maintain CPP 60–70 mmHg; ICP > 20 mmHg requires treatment",
  "Osmotherapy (mannitol or HTS) is the cornerstone of acute ICP management",
  "Hyperventilation is a bridge — temporary; avoid prolonged use (ischemia risk)",
  "Decompressive craniectomy is life-saving in malignant MCA infarction (< 60 yr within 48 h)",
  "Avoid hypotonic fluids, hypotension, hypoxia, hyperthermia, and hypoglycemia in all brain-injured patients",
  "Papilledema + headache + obese woman = IIH until proven otherwise",
  "AQP4 and SUR1-TRPM4 are the most important emerging molecular targets for edema therapy",
]);

// Slide 59
tableSlide(59, "Quick Reference — Cerebral Edema at a Glance",
  ["Parameter", "Target / Threshold", "Clinical Notes"],
  [
    ["ICP (normal)", "5–15 mmHg", "Supine adult; treatment threshold >20 mmHg"],
    ["CPP target", "60–70 mmHg", "Avoid <50 (ischemia) and >70 (aggressive therapy)"],
    ["Serum Na⁺", "138–145 (standard) / 145–155 (HTS)", "Avoid hypotonic fluids; mild hypernatremia protective"],
    ["Osmolality", "<320 mOsm/kg (mannitol max)", "Monitor q4–6h; stop if osmol gap >20"],
    ["PaCO₂", "35–40 mmHg normal; 30–35 mmHg acute ICP", "Avoid prolonged hyperventilation"],
    ["PbtO₂", ">20 mmHg", "Licox probe; <10 mmHg = critical ischemia"],
    ["Temperature", "36–37°C", "Fever significantly worsens outcome"],
    ["Blood glucose", "140–180 mg/dL", "Avoid hypoglycemia (<70) and severe hyperglycemia (>180)"],
    ["SBP (TBI)", ">90 mmHg (min); 100–110 optimal", "Hypotension doubles mortality in TBI"],
  ],
  [2.5, 2.8, 4.2]
);

// Slide 60 – Closing
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 4.0, w: 10, h: 0.08, fill: { color: C.teal } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 4.08, w: 10, h: 1.545, fill: { color: C.white } });

  s.addText("Cerebral Edema", {
    x: 0.6, y: 0.8, w: 8.8, h: 1.1,
    fontSize: 38, bold: true, color: C.white, fontFace: "Calibri", align: "center",
  });
  s.addText("Pathophysiology · Classification · Treatment", {
    x: 0.6, y: 1.9, w: 8.8, h: 0.7,
    fontSize: 20, color: C.rule, fontFace: "Calibri", align: "center",
  });
  s.addText([
    { text: "Source: ", options: { bold: true, color: C.bodyText } },
    { text: "Bradley and Daroff's Neurology in Clinical Practice, 8th Edition, Chapter 88", options: { color: C.bodyText } },
  ], { x: 0.6, y: 4.2, w: 8.8, h: 0.6, fontSize: 15, fontFace: "Calibri", align: "center" });
  s.addText("For educational and clinical reference purposes only", {
    x: 0.6, y: 4.85, w: 8.8, h: 0.4,
    fontSize: 11, color: C.darkGray, fontFace: "Calibri", align: "center", italic: true,
  });
}

// ─── Write file ─────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pptx" })
  .then(() => console.log("SUCCESS: Presentation written."))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/cerebral-edema-ppt && node build.js 2>&1

Running Command

ls -lh /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pptx && python3 -c " from pptx import Presentation prs = Presentation('/home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pptx') print(f'Total slides: {len(prs.slides)}') for i, sl in enumerate(prs.slides, 1): texts = [sh.text_frame.text[:50] for sh in sl.shapes if sh.has_text_frame and sh.text_frame.text.strip()] print(f' Slide {i}: {texts[0] if texts else \"(no text)\"}') "

Running Command

node -e " const pptx = require('pptxgenjs'); const AdmZip = require('adm-zip'); const zip = new AdmZip('/home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pptx'); const entries = zip.getEntries().map(e => e.entryName).filter(n => n.startsWith('ppt/slides/slide') && n.endsWith('.xml') && !n.includes('/_rels/') && !n.includes('slideLayout')); console.log('Slide count:', entries.length); entries.sort().forEach((e,i) => console.log(i+1, e)); " 2>&1

Running Command

cd /home/daytona/workspace/cerebral-edema-ppt && unzip -l Cerebral_Edema_Bradley_Daroff.pptx | grep "ppt/slides/slide[0-9]" | grep -v "_rels\|Layout\|layout" | wc -l

Your presentation is ready - exactly 60 slides confirmed.

Cerebral Edema Bradley Daroff

Presentation · PPTX


What's inside (60 slides, clean white theme, sourced from Bradley and Daroff's Neurology in Clinical Practice):
SectionSlidesContent
1 - Introduction3–8Definitions, Neurovascular Unit, BBB, CSF dynamics, Monroe-Kellie, ICP
2 - Classification9–13Full comparison table, vasogenic vs. cytotoxic, ionic, interstitial, osmotic edema
3 - Molecular Cascade14–20Excitotoxicity, Ca²⁺ influx, free radicals, neuroinflammation, AQP4, HIF-1α, SUR1-TRPM4
4 - Clinical Scenarios21–30Ischemic stroke, TBI, ICH, venous thrombosis, high-altitude HACE, hepatic failure, DKA, PRES, meningitis
5 - ICP / Herniation31–34Herniation syndromes (uncal, central, tonsillar), ICP monitoring methods, waveforms (A/B/plateau waves)
6 - Treatment35–44General principles, mannitol, hypertonic saline, corticosteroids, hyperventilation, hypothermia, barbiturate coma, surgery
7 - Special Topics45–60IIH, MRI sequences, neuroprotection trials, monitoring bundle, stepwise ICP ladder table, drug reference table, prognosis, rehabilitation, emerging research, clinical pearls, quick-reference table, closing slide
Design: Clean white background, navy header bars, teal accent stripe, two-column comparison slides, tables with alternating row shading, and slide number badges throughout.

Pdf format

Reading File
Running Command

libreoffice --headless --convert-to pdf --outdir /home/daytona/workspace/cerebral-edema-ppt/ /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pptx 2>&1

Running Command

mkdir -p /home/daytona/workspace/cerebral-edema-ppt/pdf_out && libreoffice --headless --convert-to pdf --outdir /home/daytona/workspace/cerebral-edema-ppt/pdf_out/ /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pptx 2>&1

Running Command

ls -la /home/daytona/workspace/cerebral-edema-ppt/pdf_out/ && chmod 777 /home/daytona/workspace/cerebral-edema-ppt/pdf_out && HOME=/tmp libreoffice --headless --convert-to pdf --outdir /home/daytona/workspace/cerebral-edema-ppt/pdf_out/ /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pptx 2>&1

Running Command

ls -la /home/daytona/workspace/cerebral-edema-ppt/ && ls -la /home/daytona/workspace/

Running Command

HOME=/tmp libreoffice --headless --convert-to pdf --outdir /home/daytona/workspace/cerebral-edema-ppt /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pptx 2>&1; ls -la /home/daytona/workspace/cerebral-edema-ppt/

Running Command

HOME=/tmp libreoffice --headless --convert-to pdf --outdir /tmp /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pptx 2>&1 && ls -lh /tmp/Cerebral_Edema_Bradley_Daroff.pdf

Running Command

cp /tmp/Cerebral_Edema_Bradley_Daroff.pdf /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pdf && ls -lh /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_Bradley_Daroff.pdf

Done. Here's your PDF:

Cerebral Edema Bradley Daroff

PDF Document · PDF

60 slides, 512 KB, converted from the PPTX via LibreOffice. All formatting, tables, and content are preserved.

All White slides pdf format

Writing File

~/cerebral-edema-ppt/build_white.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Cerebral Edema";
pres.author = "Bradley and Daroff's Neurology in Clinical Practice";

// ─── ALL-WHITE Color Palette ─────────────────────────────────────────────────
const C = {
  white:     "FFFFFF",
  navy:      "1A3A5C",   // title text, headings
  teal:      "1B6E8F",   // accents, subheadings
  bodyText:  "2C3E50",   // body paragraphs
  slate:     "5D6D7E",   // sub-bullets, captions
  rule:      "C8D8E8",   // thin divider lines
  lightLine: "E8EEF4",   // very subtle row shading
  medGray:   "BDC3C7",   // borders, slide number
  darkGray:  "7F8C8D",   // source tag
  green:     "1A7A4A",   // management items
};

// ─── Helpers ─────────────────────────────────────────────────────────────────

function addSourceTag(s) {
  s.addText("Bradley & Daroff's Neurology in Clinical Practice", {
    x: 0.3, y: 5.42, w: 9.4, h: 0.18,
    fontSize: 7.5, color: C.medGray, fontFace: "Calibri",
    align: "right", italic: true,
  });
}

function titleSlide(title, subtitle) {
  const s = pres.addSlide();
  // Full white background
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  // Top accent line (thin teal)
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: C.teal } });
  // Bottom accent line
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.555, w: 10, h: 0.07, fill: { color: C.teal } });
  // Centered title block
  s.addText(title, {
    x: 0.8, y: 1.4, w: 8.4, h: 1.5,
    fontSize: 44, bold: true, color: C.navy, fontFace: "Calibri",
    align: "center", valign: "middle",
  });
  // Thin rule under title
  s.addShape(pres.ShapeType.rect, { x: 2.5, y: 3.05, w: 5.0, h: 0.04, fill: { color: C.teal } });
  if (subtitle) {
    s.addText(subtitle, {
      x: 0.8, y: 3.18, w: 8.4, h: 0.65,
      fontSize: 20, color: C.teal, fontFace: "Calibri",
      align: "center", valign: "middle",
    });
  }
  s.addText("Bradley and Daroff's Neurology in Clinical Practice", {
    x: 0.8, y: 4.7, w: 8.4, h: 0.45,
    fontSize: 13, color: C.slate, fontFace: "Calibri",
    align: "center", italic: true,
  });
  return s;
}

function sectionDivider(num, title, subtitle) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  // Left vertical teal bar (thin)
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: C.teal } });
  // Horizontal rule
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 3.05, w: 9.45, h: 0.04, fill: { color: C.rule } });

  s.addText(`SECTION ${num}`, {
    x: 0.45, y: 1.5, w: 9.1, h: 0.4,
    fontSize: 12, bold: true, color: C.teal, fontFace: "Calibri",
    charSpacing: 6,
  });
  s.addText(title, {
    x: 0.45, y: 1.9, w: 9.1, h: 1.1,
    fontSize: 36, bold: true, color: C.navy, fontFace: "Calibri",
  });
  if (subtitle) {
    s.addText(subtitle, {
      x: 0.45, y: 3.18, w: 9.1, h: 0.65,
      fontSize: 16, color: C.slate, fontFace: "Calibri", italic: true,
    });
  }
  return s;
}

function contentSlide(num, title, bullets, opts = {}) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  // Thin top border full width
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.05, fill: { color: C.teal } });
  // Title text (no colored header box)
  s.addText(title, {
    x: 0.35, y: 0.12, w: 9.0, h: 0.72,
    fontSize: 22, bold: true, color: C.navy, fontFace: "Calibri",
    valign: "middle",
  });
  // Rule under title
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.88, w: 9.3, h: 0.025, fill: { color: C.rule } });

  // Slide number (subtle, top right)
  s.addText(String(num), {
    x: 9.45, y: 0.12, w: 0.45, h: 0.55,
    fontSize: 11, color: C.medGray, fontFace: "Calibri",
    align: "center", valign: "middle",
  });

  const bodyItems = bullets.map(b => {
    if (typeof b === "string") {
      return { text: b, options: { bullet: { code: "25CF", indent: 14 }, breakLine: true, fontSize: opts.fontSize || 15.5, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 5 } };
    }
    if (b.sub) return { text: b.sub, options: { bullet: { code: "2013", indent: 28 }, breakLine: true, fontSize: (opts.fontSize || 15.5) - 1.5, color: C.slate, fontFace: "Calibri", paraSpaceAfter: 3 } };
    if (b.bold) return { text: b.bold, options: { bullet: { code: "25CF", indent: 14 }, breakLine: true, fontSize: opts.fontSize || 15.5, color: C.navy, fontFace: "Calibri", bold: true, paraSpaceAfter: 5 } };
    if (b.heading) return { text: b.heading, options: { bullet: false, breakLine: true, fontSize: (opts.fontSize || 15.5) + 0.5, color: C.teal, fontFace: "Calibri", bold: true, paraSpaceAfter: 6, paraSpaceBefore: 4 } };
    return { text: b.text || "", options: { bullet: { code: "25CF", indent: 14 }, breakLine: true, fontSize: opts.fontSize || 15.5, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 5 } };
  });

  s.addText(bodyItems, {
    x: 0.35, y: 0.95, w: 9.3, h: opts.h || 4.2,
    valign: "top", wrap: true, margin: 4,
  });

  addSourceTag(s);
  return s;
}

function twoColSlide(num, title, leftTitle, leftItems, rightTitle, rightItems) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.05, fill: { color: C.teal } });
  s.addText(title, { x: 0.35, y: 0.12, w: 9.0, h: 0.72, fontSize: 22, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle" });
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.88, w: 9.3, h: 0.025, fill: { color: C.rule } });
  s.addText(String(num), { x: 9.45, y: 0.12, w: 0.45, h: 0.55, fontSize: 11, color: C.medGray, fontFace: "Calibri", align: "center", valign: "middle" });

  // Column vertical divider
  s.addShape(pres.ShapeType.rect, { x: 5.08, y: 0.95, w: 0.025, h: 4.3, fill: { color: C.rule } });

  // Column headers (text only, no fill box)
  s.addText(leftTitle, { x: 0.35, y: 0.95, w: 4.55, h: 0.38, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri", align: "left" });
  s.addText(rightTitle, { x: 5.2, y: 0.95, w: 4.55, h: 0.38, fontSize: 14, bold: true, color: C.teal, fontFace: "Calibri", align: "left" });

  const makeItems = (arr) => arr.map(b => {
    if (typeof b === "string") return { text: b, options: { bullet: { code: "25CF", indent: 10 }, breakLine: true, fontSize: 14, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 4 } };
    if (b.sub) return { text: b.sub, options: { bullet: { code: "2013", indent: 20 }, breakLine: true, fontSize: 12.5, color: C.slate, fontFace: "Calibri", paraSpaceAfter: 3 } };
    if (b.bold) return { text: b.bold, options: { bullet: { code: "25CF", indent: 10 }, breakLine: true, fontSize: 14, color: C.navy, fontFace: "Calibri", bold: true, paraSpaceAfter: 4 } };
    return { text: b.text || "", options: { bullet: { code: "25CF", indent: 10 }, breakLine: true, fontSize: 14, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 4 } };
  });

  s.addText(makeItems(leftItems),  { x: 0.35, y: 1.38, w: 4.55, h: 3.8, valign: "top", wrap: true, margin: 3 });
  s.addText(makeItems(rightItems), { x: 5.2,  y: 1.38, w: 4.55, h: 3.8, valign: "top", wrap: true, margin: 3 });

  addSourceTag(s);
  return s;
}

function tableSlide(num, title, headers, rows, colWidths) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.05, fill: { color: C.teal } });
  s.addText(title, { x: 0.35, y: 0.12, w: 9.0, h: 0.72, fontSize: 22, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle" });
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.88, w: 9.3, h: 0.025, fill: { color: C.rule } });
  s.addText(String(num), { x: 9.45, y: 0.12, w: 0.45, h: 0.55, fontSize: 11, color: C.medGray, fontFace: "Calibri", align: "center", valign: "middle" });

  const tableData = [];
  tableData.push(headers.map(h => ({
    text: h,
    options: { bold: true, fontSize: 12.5, color: C.white, fontFace: "Calibri", fill: { color: C.navy }, align: "center", valign: "middle" }
  })));
  rows.forEach((row, ri) => {
    tableData.push(row.map((cell, ci) => ({
      text: cell,
      options: {
        fontSize: 11.5, color: C.bodyText, fontFace: "Calibri",
        fill: { color: ri % 2 === 0 ? C.white : C.lightLine },
        align: ci === 0 ? "left" : "left", valign: "middle"
      }
    })));
  });

  s.addTable(tableData, {
    x: 0.28, y: 1.0, w: 9.5,
    colW: colWidths || headers.map(() => 9.5 / headers.length),
    border: { pt: 0.5, color: C.rule },
    rowH: 0.44,
  });

  addSourceTag(s);
  return s;
}

function calloutSlide(num, title, calloutText, bullets) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.05, fill: { color: C.teal } });
  s.addText(title, { x: 0.35, y: 0.12, w: 9.0, h: 0.72, fontSize: 22, bold: true, color: C.navy, fontFace: "Calibri", valign: "middle" });
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 0.88, w: 9.3, h: 0.025, fill: { color: C.rule } });
  s.addText(String(num), { x: 9.45, y: 0.12, w: 0.45, h: 0.55, fontSize: 11, color: C.medGray, fontFace: "Calibri", align: "center", valign: "middle" });

  // Callout box — white fill, teal left border only
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.0, w: 9.3, h: 1.0, fill: { color: C.lightLine }, line: { color: C.teal, width: 2 } });
  s.addText(calloutText, { x: 0.5, y: 1.04, w: 9.1, h: 0.92, fontSize: 14, color: C.navy, fontFace: "Calibri", italic: true, valign: "middle", wrap: true });

  const bodyItems = bullets.map(b => {
    if (typeof b === "string") return { text: b, options: { bullet: { code: "25CF", indent: 14 }, breakLine: true, fontSize: 15, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 5 } };
    if (b.sub) return { text: b.sub, options: { bullet: { code: "2013", indent: 28 }, breakLine: true, fontSize: 13.5, color: C.slate, fontFace: "Calibri", paraSpaceAfter: 3 } };
    if (b.bold) return { text: b.bold, options: { bullet: { code: "25CF", indent: 14 }, breakLine: true, fontSize: 15, color: C.navy, fontFace: "Calibri", bold: true, paraSpaceAfter: 5 } };
    return { text: b.text || "", options: { bullet: { code: "25CF", indent: 14 }, breakLine: true, fontSize: 15, color: C.bodyText, fontFace: "Calibri", paraSpaceAfter: 5 } };
  });
  s.addText(bodyItems, { x: 0.35, y: 2.1, w: 9.3, h: 3.1, valign: "top", wrap: true, margin: 4 });

  addSourceTag(s);
  return s;
}

// ═══════════════════════════════════════════════════════════════════════════
//  SLIDES
// ═══════════════════════════════════════════════════════════════════════════

// 1 — Title
titleSlide("Cerebral Edema", "Pathophysiology, Classification, and Management");

// 2 — Outline
contentSlide(2, "Presentation Outline", [
  { heading: "SECTION 1: Introduction & Definitions" },
  { sub: "Overview · Neurovascular Unit · Blood-Brain Barrier · CSF dynamics" },
  { heading: "SECTION 2: Classification of Cerebral Edema" },
  { sub: "Vasogenic · Cytotoxic/Ionic · Interstitial · Osmotic" },
  { heading: "SECTION 3: Molecular Cascade in Injury" },
  { sub: "Excitotoxicity · Free Radicals · Neuroinflammation · Aquaporins · HIF-1α" },
  { heading: "SECTION 4: Clinical Scenarios" },
  { sub: "Ischemia · TBI · ICH · Venous · High-Altitude · Hepatic · DKA · PRES · Infection" },
  { heading: "SECTION 5: ICP Monitoring & Herniation" },
  { sub: "Monroe-Kellie · Herniation syndromes · ICP monitoring" },
  { heading: "SECTION 6: Treatment" },
  { sub: "Osmotherapy · Steroids · Hyperventilation · Hypothermia · Surgery" },
  { heading: "SECTION 7: Special Topics & Reference" },
  { sub: "IIH · Imaging · Drug summary · Prognosis · Rehabilitation · Emerging research" },
], { fontSize: 14 });

// ─── SECTION 1 ────────────────────────────────────────────────────────────────
sectionDivider(1, "Introduction & Definitions", "Neurovascular Unit · Blood-Brain Barrier · CSF Circulation");

// 4
contentSlide(4, "What is Cerebral Edema?", [
  "Abnormal accumulation of fluid within the brain parenchyma resulting in increased brain volume",
  "End result of many neurological diseases: trauma, ischemia, neoplasm, infection, metabolic disturbance",
  "Leads to raised intracranial pressure (ICP) threatening cerebral perfusion",
  { bold: "Four major types:" },
  { sub: "Vasogenic — BBB disruption → extracellular fluid expansion" },
  { sub: "Cytotoxic (cellular) — cell membrane failure → intracellular swelling" },
  { sub: "Ionic — extracellular accumulation with intact BBB" },
  { sub: "Interstitial — hydrocephalus → transependymal periventricular spread" },
  "Increased ICP and cerebral edema are life-threatening complications of shifts in water between cells and tissue — final common pathway of injury in many neurological disorders (Bradley & Daroff, Ch. 88)",
]);

// 5
contentSlide(5, "The Neurovascular Unit (NVU)", [
  "The NVU is the primary structural basis for separation of brain fluids from blood",
  { bold: "Components:" },
  { sub: "Cerebral endothelial cells (tight junctions: claudin-5, occludin, ZO-1)" },
  { sub: "Astrocyte endfeet surrounding blood vessels (AQP4 water channels)" },
  { sub: "Pericytes — structural and signaling roles" },
  { sub: "Neurons, microglia, basement membrane" },
  "NVU contains carrier molecules and electrolyte pumps to preserve fluid balance, provide nutrients, and remove metabolic waste (Iadecola et al., 2007)",
  "Disruption of tight junctions is the key first step in vasogenic edema formation",
  "Loss of pericyte coverage — major contributor to BBB breakdown in ischemia and TBI",
]);

// 6
contentSlide(6, "Blood-Brain Barrier (BBB)", [
  "Concept arose from Ehrlich's dye experiments (1885): dye stained all organs except the brain",
  "In 1913, Ehrlich's student injected dye directly into mouse brain — only the brain turned blue",
  "In 1925, Cushing and Weed named the CSF/ISF system the 'third circulation'",
  "BBB maintains distinct compartments: blood, interstitial fluid (ISF), and CSF",
  "ISF bathes brain cells, delivers nutrients, and removes waste — functions as the brain's lymphatic system",
  { bold: "Key BBB proteins and channels:" },
  { sub: "Tight junction proteins (claudin-5, occludin, ZO-1, ZO-2)" },
  { sub: "Aquaporin-4 (AQP4) — bidirectional water channel on astrocyte endfeet" },
  { sub: "SUR1-TRPM4 channel — key mediator of ionic and cytotoxic edema" },
  "BBB breakdown is the hallmark of vasogenic edema",
]);

// 7
contentSlide(7, "CSF Dynamics and Fluid Compartments", [
  "Brain fluid is divided into three compartments: intravascular, intracellular, and extracellular (CSF + ISF)",
  { bold: "CSF production and circulation:" },
  { sub: "~500 mL/day produced mainly by choroid plexus" },
  { sub: "Total CSF volume ~150 mL; turns over 3–4 times daily" },
  { sub: "Absorbed at arachnoid granulations into dural venous sinuses" },
  { sub: "Glymphatic pathway (perivascular spaces) — emerging route of clearance" },
  "If CSF outflow is blocked → obstructive hydrocephalus → transependymal flow → interstitial edema",
  "Cellular membranes preserve compartmental structure; pathological water shifts cause swelling",
  "ISF is continuous with CSF and functions as the brain's lymphatic equivalent",
]);

// 8
contentSlide(8, "Monroe-Kellie Doctrine and ICP", [
  "Brain volume = parenchyma + blood + CSF within a rigid fixed skull",
  "Normal ICP: 5–15 mmHg (supine adult)",
  { bold: "Compensatory mechanisms buffer initial volume increases:" },
  { sub: "CSF displacement into spinal subarachnoid space" },
  { sub: "Reduction in cerebral blood volume (venous compression)" },
  "Once compensatory reserve is exhausted, small volume increases cause exponential ICP rise",
  "Cerebral Perfusion Pressure (CPP) = MAP – ICP",
  { sub: "Target CPP: 60–70 mmHg" },
  { sub: "ICP > 20–22 mmHg is the widely accepted treatment threshold" },
  "Sustained ICP elevation leads to herniation syndromes and brainstem compression",
]);

// ─── SECTION 2 ────────────────────────────────────────────────────────────────
sectionDivider(2, "Classification of Cerebral Edema", "Vasogenic · Cytotoxic · Ionic · Interstitial · Osmotic");

// 10
tableSlide(10, "Classification of Cerebral Edema — Overview",
  ["Type", "BBB Intact?", "Fluid Location", "Key Mechanism", "Typical Cause"],
  [
    ["Vasogenic", "No", "Extracellular", "Plasma protein leak across damaged BBB", "Tumor, abscess, contusion"],
    ["Cytotoxic", "Yes", "Intracellular", "Na+/K+-ATPase failure → cell swelling", "Ischemia, TBI, toxins"],
    ["Ionic", "Yes", "Extracellular", "Net ionic flux without protein leak", "Early ischemia, hypo-osmolality"],
    ["Interstitial", "Yes", "Periventricular ISF", "CSF outflow obstruction → transependymal flow", "Hydrocephalus"],
    ["Osmotic", "Yes", "Intracellular", "Osmotic gradient (low plasma osmolality)", "Hyponatremia, SIADH"],
  ],
  [1.6, 1.3, 1.5, 2.7, 2.4]
);

// 11
twoColSlide(11, "Vasogenic vs. Cytotoxic Edema",
  "Vasogenic Edema",
  [
    "BBB disrupted — plasma constituents leak into extracellular space",
    "Expands extracellular compartment",
    "Moves preferentially in white matter (loosely arranged fiber tracts)",
    "Gray matter restricts flow (dense neuropil)",
    "Potentially reversible if BBB heals",
    { bold: "Causes:" },
    { sub: "Brain tumors (primary & metastatic)" },
    { sub: "Abscesses, encephalitis" },
    { sub: "Contusions, post-operative edema" },
    { sub: "PRES (hypertensive breakthrough)" },
  ],
  "Cytotoxic Edema",
  [
    "BBB remains intact",
    "Direct injury to cells — failure of Na+/K+-ATPase",
    "Na+ accumulates → osmotic water influx into cells",
    "Extracellular space contracts (cells swell)",
    "Generally irreversible once membrane integrity is lost",
    { bold: "Causes:" },
    { sub: "Cerebral ischemia & infarction" },
    { sub: "Traumatic brain injury" },
    { sub: "Acute hepatic failure" },
    { sub: "Certain toxins (cyanide, CO)" },
  ]
);

// 12
contentSlide(12, "Ionic Edema", [
  "Occurs with an intact BBB — net ionic flux into the brain without protein leak",
  { bold: "Mechanism:" },
  { sub: "Glutamate-mediated NMDA receptor activation → Ca²⁺/Na⁺ channel opening" },
  { sub: "One Ca²⁺ is exchanged for three Na⁺ ions — sodium builds up intracellularly" },
  { sub: "Osmotic gradient → water enters cells" },
  "While cell membrane is intact, increase in water causes dysfunction but not permanent damage",
  "This stage has been referred to as 'ionic edema' (Simard et al., 2017)",
  "SUR1-TRPM4 non-selective cation channels are key mediators of ionic edema",
  "Early, potentially reversible phase preceding full cytotoxic edema",
  "Seen in acute ischemia (first minutes), early TBI, and hypo-osmolar states",
]);

// 13
contentSlide(13, "Interstitial and Osmotic Edema", [
  { heading: "Interstitial Edema" },
  "Occurs in hydrocephalus — CSF outflow obstruction → elevated intraventricular pressure",
  "Transependymal flow: CSF crosses ependymal lining → periventricular white matter edema",
  "MRI: periventricular T2/FLAIR hyperintensity (frontal and occipital horns predominate)",
  "Resolves partially with CSF diversion (VP shunt, EVD, LP shunt)",
  { heading: "Osmotic Edema" },
  "Decrease in plasma osmolality → water moves into brain cells along osmotic gradient",
  "Causes: hyponatremia, SIADH, water intoxication, dialysis disequilibrium",
  "Acute severe hyponatremia (<125 mEq/L) can cause life-threatening cerebral edema",
  "Treatment: cautious sodium correction — avoid rapid correction (central pontine myelinolysis risk)",
]);

// ─── SECTION 3 ────────────────────────────────────────────────────────────────
sectionDivider(3, "Molecular Cascade in Injury", "Excitotoxicity · Free Radicals · Neuroinflammation · Aquaporins · HIF-1α");

// 15
calloutSlide(15, "Injury Cascade — Overview",
  "The cascade begins with depletion of energy and glutamate release into the extracellular space. This occurs during hypoxic, ischemic, or traumatic injury and causes cytotoxic damage. (Bradley & Daroff, Ch. 88)",
  [
    "Energy failure (ATP depletion) → failure of Na+/K+-ATPase and membrane pumps",
    "Glutamate release → NMDA/AMPA receptor activation → massive Ca²⁺ influx",
    "Calcium accumulation → activation of calpains, phospholipases, nitric oxide synthase",
    "Formation of immediate-early genes (c-fos, c-jun) → cytokine/chemokine cascade",
    "Microglial activation → free radicals and proteases → membrane/capillary attack",
    "Irreversible membrane damage → cytotoxic edema → cell death",
  ]
);

// 16
contentSlide(16, "Excitotoxicity — Glutamate and Calcium", [
  "Glutamate is the primary excitatory neurotransmitter; pathological accumulation drives excitotoxicity",
  { bold: "Mechanism:" },
  { sub: "NMDA receptor activation → Ca²⁺ channel opening" },
  { sub: "AMPA receptor: Na⁺ influx → membrane depolarization" },
  { sub: "Massive Ca²⁺ entry overwhelms intracellular buffering" },
  { bold: "Ca²⁺ activates destructive enzymes:" },
  { sub: "Calpains — degrade cytoskeletal proteins (spectrin, MAP2)" },
  { sub: "Phospholipase A₂ → arachidonic acid → reactive oxygen species" },
  { sub: "Neuronal NOS (nNOS) → nitric oxide → peroxynitrite" },
  "Calcium-mediated mitochondrial dysfunction → cytochrome c release → apoptosis cascade",
  "Glutamate antagonists (memantine) and Ca²⁺ channel blockers studied for neuroprotection",
]);

// 17
contentSlide(17, "Free Radicals and Oxidative Stress", [
  "Free radicals are pluripotential substances produced in the ischemic brain and after traumatic injury",
  { bold: "Reactive oxygen species (ROS) from arachidonic acid cascade:" },
  { sub: "Superoxide ion (O₂⁻)" },
  { sub: "Hydrogen peroxide (H₂O₂)" },
  { sub: "Hydroxyl radical (•OH) — most reactive; attacks membrane lipids, proteins, DNA" },
  { bold: "Endogenous antioxidant defenses:" },
  { sub: "Superoxide dismutase-1 (SOD-1) — catalyzes O₂⁻ breakdown" },
  { sub: "Catalase — H₂O₂ breakdown" },
  { sub: "Glutathione, ascorbic acid (Vitamin C), Vitamin E" },
  { sub: "Iron chelators (21-amino steroids, deferoxamine)" },
  "Transgenic mice overexpressing SOD-1 have significantly smaller infarcts after focal ischemia",
  "ROS cause lipid peroxidation, amplify BBB breakdown, and drive inflammatory cascade",
]);

// 18
contentSlide(18, "Neuroinflammation and Vasogenic Edema", [
  "Inflammatory response amplifies BBB disruption and promotes vasogenic edema",
  { bold: "Key inflammatory mediators:" },
  { sub: "TNF-α — upregulates ICAM-1, promotes leukocyte adhesion and transmigration" },
  { sub: "IL-1β — stimulates cyclooxygenase, endothelial activation, fever response" },
  { sub: "VEGF — potent vascular permeabilizer; major driver of vasogenic edema" },
  { sub: "Matrix metalloproteinases (MMP-2, MMP-9) — degrade tight junctions and basement membrane" },
  "Leukocyte extravasation and microglial activation further damage vessel walls",
  "Complement activation contributes to secondary neuronal injury",
  { bold: "Anti-inflammatory targets:" },
  { sub: "Dexamethasone — reduces BBB permeability and VEGF expression (vasogenic edema)" },
  { sub: "MMP inhibitors — under investigation for ischemic stroke" },
  { sub: "Minocycline — broad anti-inflammatory; limited clinical benefit in trials" },
]);

// 19
contentSlide(19, "Aquaporins — Water Channel Proteins", [
  "Aquaporins (AQPs) form pores in cell membranes that facilitate passive bidirectional water movement",
  { bold: "AQP4 — the dominant brain water channel:" },
  { sub: "Located on astrocyte endfeet surrounding blood vessels and synapses" },
  { sub: "Bidirectional — contributes to both edema formation and resolution" },
  { sub: "Upregulated after cerebral ischemia, TBI, and subarachnoid hemorrhage" },
  "AQP4-knockout mice develop LESS cytotoxic edema but MORE vasogenic edema after injury",
  "AQP4 facilitates water reabsorption from ISF back into blood — important for edema clearance",
  { bold: "Other relevant brain aquaporins:" },
  { sub: "AQP1 — choroid plexus epithelium (CSF production)" },
  { sub: "AQP9 — astrocytes and neurons; lactate and glycerol transport" },
  "AQP4 inhibition is under investigation as a therapeutic target for cytotoxic edema",
]);

// 20
contentSlide(20, "HIF-1α and SUR1-TRPM4 Channels", [
  { bold: "Hypoxia-Inducible Factor-1α (HIF-1α):" },
  "Transcription factor activated by hypoxia — master regulator of the hypoxic response",
  "Upregulates genes for erythropoiesis, angiogenesis, glycolysis, and cell survival",
  "Also upregulates VEGF → vascular permeability → vasogenic edema",
  "HIF-1α stabilizers and inhibitors are under active investigation for neuroprotection",
  { bold: "SUR1-TRPM4 Non-Selective Cation Channel:" },
  "Formed by coassembly of SUR1 (sulfonylurea receptor 1) and TRPM4 subunits",
  "Not expressed in healthy brain; dramatically upregulated after ischemia and TBI",
  "Opens in response to ATP depletion → Na⁺ influx → ionic/cytotoxic edema → oncotic cell death",
  "Glibenclamide (glyburide) blocks SUR1-TRPM4 → reduces edema in experimental models",
  { sub: "GAMES-RP trial: reduced midline shift in large hemispheric infarction; Phase III ongoing" },
]);

// ─── SECTION 4 ────────────────────────────────────────────────────────────────
sectionDivider(4, "Clinical Scenarios", "Ischemia · TBI · ICH · Venous · High-Altitude · Hepatic · DKA · PRES · Infection");

// 22
contentSlide(22, "Brain Edema in Ischemic Stroke", [
  "Cerebrovascular disease is the major cause of brain edema in adults (Bradley & Daroff, Ch. 88)",
  { bold: "Time course:" },
  { sub: "Cytotoxic edema — begins within minutes of ischemic onset (restricted diffusion on DWI)" },
  { sub: "Vasogenic edema (BBB breakdown) — hours to days later" },
  { sub: "Peak swelling: 2–5 days post-infarction" },
  "Most common cause of neurological deterioration in the first week after infarction is brain edema",
  { bold: "Malignant MCA infarction:" },
  { sub: "Large hemispheric swelling with midline shift — mortality 50–80% with medical therapy alone" },
  { sub: "Decompressive hemicraniectomy within 48 hours reduces mortality significantly" },
  { sub: "HAMLET + DESTINY I + DECIMAL trials: mortality reduced from ~71% to ~22% (<60 yr)" },
  "DWI-MRI detects cytotoxic edema within minutes; FLAIR detects vasogenic edema later",
]);

// 23
contentSlide(23, "Brain Edema in Traumatic Brain Injury (TBI)", [
  "TBI produces a combination of cytotoxic, ionic, and vasogenic edema simultaneously",
  { bold: "Primary injury:" },
  { sub: "Contusion and diffuse axonal injury → direct cell membrane disruption" },
  { bold: "Secondary injury cascade (amplifies edema):" },
  { sub: "BBB disruption peaks 4–6 hours after injury; persists for days" },
  { sub: "Hypotension (SBP < 90 mmHg) — worsens ischemic edema" },
  { sub: "Hypoxia (PaO₂ < 60 mmHg) — augments cytotoxic cascade" },
  { sub: "Pyrexia — increases metabolic demand and ICP" },
  { sub: "Hyperglycemia — worsens intracellular acidosis and edema" },
  "ICP monitoring is standard in severe TBI (GCS ≤ 8 with abnormal CT)",
  "Brain Trauma Foundation 4th Edition: ICP-guided therapy target < 22 mmHg",
]);

// 24
contentSlide(24, "Brain Edema in Intracerebral Hemorrhage (ICH)", [
  "ICH produces edema by multiple mechanisms: mass effect, perihematomal ischemia, toxic blood products",
  { bold: "Phases of edema:" },
  { sub: "Early (hours): clot retraction → plasma protein exudation → vasogenic perihematomal edema" },
  { sub: "Delayed (12–24h): hemoglobin degradation products (thrombin, iron) → secondary injury" },
  { sub: "Thrombin activates protease-activated receptors → BBB disruption and inflammation" },
  "Perihematomal edema continues expanding for up to 14 days",
  "Edema volume independently predicts functional outcome in ICH",
  { bold: "Management:" },
  { sub: "Intensive BP control (SBP < 140 mmHg) — reduces hematoma and edema expansion" },
  { sub: "Deferoxamine (iron chelator) — evaluated to reduce hemoglobin-mediated injury" },
  { sub: "Minimally invasive surgery (MIS) for hematoma evacuation — ongoing trials" },
]);

// 25
contentSlide(25, "Brain Edema in Cerebral Venous Sinus Thrombosis (CVST)", [
  "CVST produces a unique pattern of edema not respecting arterial vascular territories",
  { bold: "Mechanisms:" },
  { sub: "Venous hypertension → increased capillary pressure → vasogenic edema" },
  { sub: "Venous infarction → cytotoxic edema + hemorrhagic transformation" },
  { sub: "CSF outflow obstruction → raised ICP (if major sinus occluded)" },
  "Hemorrhagic venous infarctions carry high edema burden and mass effect",
  { bold: "Management:" },
  { sub: "Anticoagulation (LMWH or UFH) is treatment of choice — even with hemorrhagic transformation" },
  { sub: "ICP management when major sinuses (superior sagittal sinus) occluded" },
  { sub: "Catheter-directed thrombolysis/thrombectomy for refractory cases" },
  { sub: "Decompressive craniectomy for malignant CVST with herniation" },
]);

// 26
contentSlide(26, "High-Altitude Cerebral Edema (HACE)", [
  "HACE occurs when oxygen concentration is markedly reduced as altitude increases and atmospheric pressure falls (Bradley & Daroff, Ch. 88)",
  { bold: "Pathophysiology:" },
  { sub: "Hypobaric hypoxia → cerebral vasodilation → increased CBF and capillary pressure" },
  { sub: "Hypoxia activates HIF-1α → VEGF upregulation → vasogenic edema" },
  { sub: "Tight junctions disrupted → protein-rich fluid leaks into brain parenchyma" },
  { bold: "Clinical features:" },
  { sub: "Severe headache, ataxia (hallmark), altered consciousness, confusion" },
  { sub: "Usually preceded by Acute Mountain Sickness (AMS); develops > 2,500–3,000 m" },
  { bold: "Treatment:" },
  { sub: "Immediate descent — most effective intervention" },
  { sub: "Supplemental O₂, portable hyperbaric chamber (Gamow bag)" },
  { sub: "Dexamethasone 8 mg IM/IV, then 4 mg q6h — reduces vasogenic edema" },
  { sub: "Acetazolamide 250 mg BID — prophylaxis and adjunct treatment" },
]);

// 27
contentSlide(27, "Brain Edema in Acute Hepatic Failure", [
  "Severe cerebral edema is common in acute liver failure (ALF) — leading cause of death",
  { bold: "Mechanism:" },
  { sub: "Ammonia (NH₃) metabolized to glutamine in astrocytes → astrocyte swelling (cytotoxic)" },
  { sub: "Oxidative stress in astrocytes → mitochondrial permeability transition pore opening" },
  { sub: "Inflammatory cytokines from failing liver amplify cerebral neuroinflammation" },
  { sub: "Loss of cerebrovascular autoregulation → hyperemia → vasogenic component" },
  { bold: "Clinical features:" },
  { sub: "Hepatic encephalopathy grades I–IV; Grade III–IV → ICP elevation" },
  { sub: "ICP often rises rapidly — urgent monitoring and intervention required" },
  { bold: "Management:" },
  { sub: "ICP monitoring (controversial due to coagulopathy)" },
  { sub: "Lactulose, rifaximin, sodium benzoate — reduce ammonia load" },
  { sub: "Mild hypothermia (34–35°C) and MARS (molecular adsorbent recirculating system)" },
  { sub: "Liver transplantation — definitive treatment" },
]);

// 28
contentSlide(28, "Brain Edema in Diabetic Ketoacidosis (DKA)", [
  "Cerebral edema develops in ~1% of DKA cases — rare in adults, primarily a pediatric complication",
  { bold: "Mechanism (attributed etiology):" },
  { sub: "Retention of intracellular osmolytes (idiogenic osmoles) during hyperosmolar state" },
  { sub: "Rapid correction of hyperglycemia → osmotic shift → water enters brain cells" },
  { sub: "Overly aggressive IV fluid administration may worsen cerebral edema" },
  { bold: "Clinical presentation:" },
  { sub: "Headache and declining consciousness during or after DKA treatment" },
  { sub: "Cushing's triad may develop if ICP becomes critical" },
  { bold: "Management:" },
  { sub: "Gradual correction of glucose and fluid deficits over 24–48 hours" },
  { sub: "Mannitol or hypertonic saline for acute ICP crisis" },
  { sub: "Avoid rapid osmolality changes" },
  "Mortality from DKA-associated cerebral edema remains ~20–25%",
]);

// 29
contentSlide(29, "Posterior Reversible Encephalopathy Syndrome (PRES)", [
  "PRES is characterized by vasogenic edema predominantly in posterior brain regions",
  { bold: "Pathophysiology:" },
  { sub: "Severe hypertension overwhelms cerebrovascular autoregulation" },
  { sub: "Forced vasodilation → hyperperfusion → vasogenic edema (posterior > anterior)" },
  { sub: "Posterior circulation has less sympathetic innervation → less autoregulatory protection" },
  { bold: "Causes:" },
  { sub: "Hypertensive emergency, eclampsia, preeclampsia" },
  { sub: "Immunosuppressants (cyclosporine, tacrolimus)" },
  { sub: "Cytotoxic chemotherapy" },
  { bold: "Clinical features:" },
  { sub: "Headache, visual disturbances (cortical blindness), seizures, encephalopathy" },
  { bold: "MRI:" },
  { sub: "T2/FLAIR hyperintensity — posterior parietal and occipital lobes (bilateral)" },
  { sub: "No restricted diffusion (vasogenic, not cytotoxic) — hallmark of reversibility" },
  "Generally reversible with BP control and removal of offending agent",
]);

// 30
contentSlide(30, "Brain Edema in CNS Infections", [
  { bold: "Bacterial meningitis mechanisms:" },
  { sub: "Direct BBB disruption by bacterial products (LPS, pneumococcal toxins)" },
  { sub: "Intense neutrophilic exudate → cytokine storm → vasogenic + cytotoxic edema" },
  { sub: "CSF outflow obstruction → communicating hydrocephalus → interstitial edema" },
  { sub: "Vasculitis → focal ischemia → additional cytotoxic edema" },
  { bold: "Herpes encephalitis:" },
  { sub: "Temporal lobe predilection — necrotizing encephalitis → hemorrhagic vasogenic edema" },
  { bold: "Management:" },
  "Adjunct dexamethasone: 0.15 mg/kg IV q6h × 4 days — before or with first antibiotic dose",
  { sub: "Reduces mortality and neurological sequelae in bacterial meningitis (Brouwer et al., 2015)" },
  "Acyclovir 10 mg/kg IV q8h × 14–21 days for HSV encephalitis",
  "ICP monitoring and osmotherapy for severe cases with declining consciousness",
]);

// ─── SECTION 5 ────────────────────────────────────────────────────────────────
sectionDivider(5, "ICP Monitoring & Herniation Syndromes", "Monroe-Kellie · Herniation Patterns · ICP Waveforms");

// 32
contentSlide(32, "Herniation Syndromes", [
  { bold: "1. Uncal (lateral transtentorial) herniation:" },
  { sub: "Temporal lobe uncus herniates over tentorial edge" },
  { sub: "CN III compression → ipsilateral fixed dilated pupil (earliest sign!)" },
  { sub: "Midbrain compression → contralateral hemiparesis (or ipsilateral — Kernohan's notch phenomenon)" },
  { bold: "2. Central (symmetric transtentorial) herniation:" },
  { sub: "Bilateral downward displacement of diencephalon and brainstem" },
  { sub: "Small reactive pupils → fixed midposition pupils → death" },
  { bold: "3. Tonsillar (cerebellar) herniation:" },
  { sub: "Cerebellar tonsils forced through foramen magnum" },
  { sub: "Medullary compression → cardiorespiratory arrest" },
  { bold: "4. Subfalcine herniation:" },
  { sub: "Cingulate gyrus displaces under falx cerebri → ACA compression → leg weakness" },
  "Clinical hallmarks: pupillary changes, motor posturing (decorticate → decerebrate), Cushing's triad",
]);

// 33
contentSlide(33, "ICP Monitoring — Indications and Methods", [
  { bold: "Indications for ICP monitoring:" },
  { sub: "Severe TBI (GCS ≤ 8 with abnormal CT head) — Brain Trauma Foundation standard" },
  { sub: "Large ischemic or hemorrhagic stroke with mass effect" },
  { sub: "Acute liver failure with Grade III–IV encephalopathy" },
  { sub: "CNS infections with decreased consciousness and clinical signs of raised ICP" },
  { bold: "Monitoring modalities:" },
  { sub: "Intraventricular catheter (EVD) — gold standard; allows therapeutic CSF drainage" },
  { sub: "Intraparenchymal microsensor (Codman, Camino) — accurate; reduced infection risk" },
  { sub: "Epidural — less accurate; cannot drain CSF; rarely used" },
  { bold: "Non-invasive surrogates:" },
  { sub: "Transcranial Doppler — pulsatility index (PI > 1.4 suggests raised ICP)" },
  { sub: "Optic nerve sheath diameter > 5 mm (ultrasound) — correlates with ICP > 20 mmHg" },
  { sub: "Pupillometry — automated pupil light reflex quantification" },
]);

// 34
contentSlide(34, "ICP Waveforms and Clinical Interpretation", [
  { bold: "Normal ICP waveform components (Lundberg):" },
  { sub: "P1 (percussion wave) — arterial pulsation transmitted to CSF" },
  { sub: "P2 (tidal wave) — brain compliance; P2 > P1 = decreased compliance (early warning)" },
  { sub: "P3 (dicrotic notch) — reflects aortic valve closure" },
  { bold: "Pathological waveforms:" },
  { sub: "Plateau waves (Lundberg A): ICP 50–100 mmHg, lasting 5–20 min — critical reserve loss" },
  { sub: "B waves: regular oscillations 0.5–2/min; reduced reserve; relate to respiration" },
  { sub: "C waves: 4–8/min; associated with arterial BP oscillations; less clinically significant" },
  "Sustained ICP > 20 mmHg → reduces CPP → risks ischemia → requires treatment",
  { bold: "CPP targets:" },
  { sub: "Target 60–70 mmHg" },
  { sub: "CPP < 50 mmHg → ischemia; CPP > 70 mmHg → aggressive therapy complications" },
]);

// ─── SECTION 6 ────────────────────────────────────────────────────────────────
sectionDivider(6, "Treatment of Cerebral Edema", "Osmotherapy · Steroids · Hyperventilation · Hypothermia · Surgery");

// 36
contentSlide(36, "General Principles — First-Line ICP Management", [
  { bold: "Universal measures (apply to ALL brain-injured patients):" },
  "Head of bed elevation 30–45° — reduces ICP without compromising CPP",
  "Avoid hypotension (SBP < 90 mmHg) — treat aggressively with vasopressors if needed",
  "Avoid hypoxia — maintain PaO₂ > 80 mmHg; SpO₂ > 94%",
  "Normothermia — fever increases ICP and metabolic demand; use active cooling if needed",
  "Normonatremia to mild hypernatremia (target Na⁺ 138–145 mEq/L)",
  "Normovolemia — avoid over-hydration and hypotonic IV fluids",
  { bold: "Seizure management:" },
  { sub: "Seizures acutely spike ICP; prophylaxis recommended in TBI and ICH" },
  { sub: "Levetiracetam preferred (minimal drug interactions, no hepatic induction)" },
  { bold: "Sedation and analgesia:" },
  { sub: "Coughing, agitation, Valsalva — all acutely elevate ICP" },
  { sub: "Propofol (short-acting, allows neurological assessment), fentanyl for analgesia" },
]);

// 37
contentSlide(37, "Osmotherapy — Mannitol", [
  { bold: "Mannitol 20% — first-line osmotherapy for ICP crises:" },
  { bold: "Mechanisms:" },
  { sub: "Raises plasma osmolality → osmotic gradient draws water from brain into blood" },
  { sub: "Reduces blood viscosity → reflex vasoconstriction → reduces CBV and ICP" },
  { bold: "Dosing:" },
  { sub: "0.25–1.0 g/kg IV bolus over 15–20 minutes" },
  { sub: "Repeat every 4–6 hours as needed; maintain serum osmolality < 320 mOsm/kg" },
  { sub: "Insert Foley catheter — significant osmotic diuresis expected" },
  { bold: "Monitoring:" },
  { sub: "Serum osmolality, electrolytes, BUN, creatinine every 4–6 hours" },
  { sub: "Osmol gap > 20 mOsm/kg → drug accumulation; risk of acute kidney injury" },
  { bold: "Contraindications/cautions:" },
  { sub: "Renal failure (relative), hypotension, anuria" },
  { sub: "Caution in volume-depleted patients — may cause hypotension" },
]);

// 38
contentSlide(38, "Osmotherapy — Hypertonic Saline (HTS)", [
  { bold: "Hypertonic Saline (HTS) — increasingly preferred over mannitol in many settings:" },
  "Raises serum sodium and osmolality → osmotic gradient → reduces brain water content",
  "Does NOT cause osmotic diuresis — advantage in hypovolemic patients",
  "May be superior to mannitol for refractory ICP and TBI with hypotension",
  { bold: "Available formulations:" },
  { sub: "3% NaCl — continuous infusion 0.1–1.0 mL/kg/hr via central line" },
  { sub: "7.5% NaCl — bolus 1.5–3 mL/kg over 20–30 minutes" },
  { sub: "23.4% NaCl — 30 mL bolus for ICP crises (must have central venous access)" },
  { bold: "Targets:" },
  { sub: "Serum Na⁺: 145–155 mEq/L (some protocols target 150–160 for refractory ICP)" },
  { sub: "Serum osmolality: 300–320 mOsm/kg" },
  { bold: "Adverse effects:" },
  { sub: "Rebound edema if stopped abruptly; pulmonary edema; electrolyte disturbance" },
  { sub: "Central pontine myelinolysis with too-rapid sodium correction from hyponatremia" },
]);

// 39
contentSlide(39, "Corticosteroids in Cerebral Edema", [
  { bold: "Dexamethasone — highly effective for VASOGENIC edema from brain tumors:" },
  "Mechanism: reduces BBB permeability, inhibits VEGF, downregulates inflammatory mediators",
  "Standard regimen: 10 mg IV loading dose, then 4 mg IV q6h",
  "Onset 6–24 hours; maximum effect at 48–72 hours",
  { bold: "INDICATED for:" },
  { sub: "Peritumoral vasogenic edema (primary and metastatic brain tumors)" },
  { sub: "Adjunct in bacterial meningitis: 0.15 mg/kg IV q6h × 4 days (before/with first antibiotic)" },
  { sub: "High-altitude cerebral edema (HACE)" },
  { sub: "Spinal cord compression (high-dose methylprednisolone — controversial)" },
  { bold: "NOT indicated for:" },
  { sub: "Cytotoxic edema from ischemia or TBI — no benefit; causes hyperglycemia and infection risk" },
  { sub: "Intracerebral hemorrhage — increases mortality; no benefit in RCTs" },
  { sub: "Osmotic or interstitial edema" },
]);

// 40
contentSlide(40, "Hyperventilation", [
  { bold: "Mechanism:" },
  "Reduced PaCO₂ → cerebral arteriolar vasoconstriction → decreased CBV → decreased ICP",
  "Each 1 mmHg decrease in PaCO₂ reduces ICP by approximately 2 mmHg",
  { bold: "Protocol:" },
  { sub: "Moderate hyperventilation: target PaCO₂ 30–35 mmHg (first-line ICP bridge)" },
  { sub: "Aggressive (PaCO₂ 25–30 mmHg) — reserved for acute herniation crises only" },
  { bold: "Critical limitations:" },
  "Effect is TRANSIENT — cerebral vasomotor adaptation occurs within 4–6 hours",
  "Prolonged hyperventilation → ischemia in already-compromised tissue (vasoconstriction reduces O₂ delivery)",
  "NOT recommended as prophylaxis or for prolonged use",
  { bold: "Role in clinical practice:" },
  { sub: "Bridge therapy during herniation crisis while awaiting definitive intervention" },
  { sub: "Intraoperative ICP control" },
  { sub: "Resume normocapnia (PaCO₂ 35–40 mmHg) once crisis resolved" },
]);

// 41
contentSlide(41, "Induced Hypothermia", [
  "Therapeutic hypothermia reduces ICP by decreasing cerebral metabolic rate",
  { bold: "Mechanisms of neuroprotection:" },
  { sub: "Reduces CMRO₂ by ~7% per 1°C decrease in temperature" },
  { sub: "Attenuates glutamate release and excitotoxicity" },
  { sub: "Reduces free radical generation and lipid peroxidation" },
  { sub: "Decreases inflammatory cytokine production (IL-1β, TNF-α)" },
  { sub: "Reduces cerebral blood flow and ICP" },
  { bold: "Temperature targets:" },
  { sub: "Mild (35–36°C): fever prevention in TBI — safe, often used" },
  { sub: "Moderate (32–34°C): cardiac arrest post-resuscitation, refractory ICP" },
  "Meta-analysis: hypothermia reduces ICP in TBI but inconsistent functional outcome benefit",
  { bold: "Adverse effects:" },
  { sub: "Coagulopathy, pneumonia, arrhythmias, electrolyte disturbances (K⁺, Mg²⁺, PO₄)" },
  { sub: "Rebound ICP elevation on rewarming — rewarm slowly at 0.25°C/hour" },
]);

// 42
contentSlide(42, "Barbiturate Coma", [
  "Reserved for refractory ICP elevation failing all other measures",
  { bold: "Mechanism:" },
  { sub: "Profound reduction in CMRO₂ and CBF" },
  { sub: "Reduces cerebral electrical activity → EEG burst suppression pattern" },
  { sub: "Scavenges free radicals" },
  { bold: "Agent and dosing:" },
  { sub: "Pentobarbital: 5–10 mg/kg IV loading dose, then 1–4 mg/kg/hr continuous infusion" },
  { sub: "Thiopental: alternative (less available in North America)" },
  "Continuous EEG monitoring required — titrate to burst suppression (1 burst/10 sec)",
  { bold: "Complications (nearly universal):" },
  { sub: "Cardiovascular depression — hypotension requiring vasopressors" },
  { sub: "Paralytic ileus, immunosuppression, prolonged awakening" },
  { sub: "Confounds neurological examination — use only with ICP monitoring in situ" },
  "Brain Trauma Foundation: recommended for salvageable patients with refractory ICP elevation",
]);

// 43
contentSlide(43, "Surgical Management", [
  { bold: "Decompressive Craniectomy (DC):" },
  "Removes large bone flap allowing edematous brain to herniate outward without brainstem compression",
  { sub: "DESTINY I, HAMLET, DECIMAL (< 60 yr): DC within 48h reduces mortality 71% → 22%" },
  { sub: "DESTINY II (> 60 yr): reduces mortality but increases survivors with severe disability" },
  "Also used for refractory TBI ICP > 20 mmHg unresponsive to maximal medical therapy",
  { bold: "CSF Drainage:" },
  { sub: "External ventricular drain (EVD) — lowers ICP by draining CSF continuously or intermittently" },
  { sub: "Lumbar drain — caution if posterior fossa mass (risk of upward herniation)" },
  { bold: "Hematoma evacuation:" },
  { sub: "Cerebellar ICH > 3 cm or causing obstructive hydrocephalus — urgent surgical evacuation" },
  { sub: "Supratentorial ICH with herniation — surgical evacuation considered case-by-case" },
  { sub: "Minimally invasive surgery (MIS) with alteplase — MISTIE III trial; ongoing refinement" },
]);

// 44
contentSlide(44, "Effect of Blood Pressure and Osmolality on Brain Edema", [
  { bold: "Blood Pressure Effects:" },
  "Cerebral autoregulation normally maintains CBF constant across MAP 50–150 mmHg",
  "In injured brain, autoregulation is impaired or absent:",
  { sub: "Hypotension → reduced CPP → ischemia → cytotoxic edema worsening" },
  { sub: "Severe hypertension → breakthrough hyperperfusion → vasogenic edema (PRES)" },
  "BP management must balance adequate CPP vs. reducing edema-promoting hypertension",
  { bold: "Osmolality Effects:" },
  "Brain water content is exquisitely sensitive to plasma osmolality",
  { sub: "Hypo-osmolality (low Na⁺) → brain water increases (osmotic edema)" },
  { sub: "Hyperosmolality (mannitol, HTS) → brain water decreases" },
  "Each 1 mOsm/kg change in plasma osmolality changes brain water by ~0.2 mL/100g brain",
  "AVOID hypotonic IV fluids (0.45% NaCl, D5W) in all brain-injured patients",
]);

// ─── SECTION 7 ────────────────────────────────────────────────────────────────
sectionDivider(7, "Special Topics & Reference", "IIH · Imaging · Drug Summary · Prognosis · Emerging Research");

// 46
contentSlide(46, "Idiopathic Intracranial Hypertension (IIH)", [
  "IIH (pseudotumor cerebri): elevated ICP with no identifiable structural cause and no ventriculomegaly",
  { bold: "Epidemiology:" },
  { sub: "Primarily obese women of childbearing age (BMI > 30)" },
  { sub: "Incidence 1–2/100,000 overall; 15–19/100,000 in obese women aged 20–44 years" },
  { bold: "Clinical features:" },
  { sub: "Headache (> 90%), pulsatile tinnitus, transient visual obscurations (TVOs)" },
  { sub: "Papilledema (bilateral optic disc swelling) — hallmark finding" },
  { sub: "Sixth nerve palsy (false localizing sign due to raised ICP)" },
  { sub: "Visual field defects — enlarged blind spot, arcuate scotoma, progressive loss" },
  { bold: "Diagnosis (Modified Dandy Criteria):" },
  { sub: "Opening pressure > 25 cmH₂O on LP with patient in lateral decubitus" },
  { sub: "Normal CSF composition, normal brain imaging, no other cause identified" },
]);

// 47
contentSlide(47, "IIH — Treatment", [
  { bold: "Medical treatment:" },
  "Weight loss (first-line in obese patients) — can normalize ICP with 5–10% weight reduction",
  "Acetazolamide (carbonic anhydrase inhibitor) — reduces CSF production",
  { sub: "Starting dose 500 mg BID; titrate up to 4 g/day; monitor electrolytes and renal function" },
  "Topiramate — modest CA inhibition plus weight-reducing effect; useful second-line agent",
  "Furosemide — modest benefit as add-on therapy",
  { bold: "If medical therapy fails or vision threatened:" },
  { sub: "Serial lumbar punctures — temporary relief; not practical long-term" },
  { sub: "Optic nerve sheath fenestration (ONSF) — primarily for visual protection" },
  { sub: "CSF shunting (VP shunt or LP shunt) — for headache and ICP control" },
  { sub: "Venous sinus stenting — if lateral sinus stenosis demonstrated on venography" },
  "Brain edema in IIH may involve interstitial edema from elevated CSF pressure (Bradley & Daroff)",
]);

// 48
contentSlide(48, "Neuroimaging in Cerebral Edema", [
  { bold: "CT Head (non-contrast) — first-line, widely available:" },
  { sub: "Detects hemorrhage, hydrocephalus, mass lesions, midline shift, herniation" },
  { sub: "Edema appears as hypodensity; loss of gray-white differentiation in ischemia" },
  { sub: "Sulcal effacement, compressed basal cisterns — signs of severe generalized edema" },
  { bold: "MRI Sequences:" },
  { sub: "T2/FLAIR — best overall edema visualization; vasogenic edema is hyperintense" },
  { sub: "DWI/ADC — restricted diffusion (bright DWI, dark ADC) = cytotoxic edema (ischemia)" },
  { sub: "T1 + Gadolinium — BBB breakdown: enhancement in tumor, abscess, active inflammation" },
  { sub: "SWI/GRE — blood products, microhemorrhages, hemorrhagic transformation" },
  { bold: "Advanced imaging:" },
  { sub: "MR perfusion (DSC/ASL) — CBF/CBV/MTT/Tmax; defines ischemic penumbra" },
  { sub: "MR spectroscopy — lactate peak in ischemia, reduced NAA in neuronal injury" },
  { sub: "CT perfusion — acute stroke triage; rapid, widely available in most centers" },
]);

// 49
contentSlide(49, "Neuroprotective Strategies — Current Evidence", [
  { bold: "Glibenclamide (Glyburide / BIIB093):" },
  { sub: "SUR1-TRPM4 blocker; reduces ionic and cytotoxic edema in preclinical models" },
  { sub: "GAMES-RP trial: reduced midline shift in large hemispheric infarction — Phase III ongoing" },
  { bold: "Erythropoietin (EPO):" },
  { sub: "HIF-1α target gene; neuroprotective in animals via anti-apoptotic and anti-inflammatory effects" },
  { sub: "Phase III trials in TBI (ProTECT, EPO-TBI) — no consistent clinical benefit demonstrated" },
  { bold: "AQP4 modulators:" },
  { sub: "Selective AQP4 inhibitors to reduce cytotoxic edema — currently preclinical only" },
  { bold: "Anti-VEGF therapy:" },
  { sub: "Bevacizumab reduces vasogenic edema in radiation necrosis and recurrent glioblastoma" },
  { bold: "Progesterone:" },
  { sub: "Promising animal data; ProTECT III and SyNAPSe trials in TBI — negative results" },
  { bold: "Free radical scavengers (NXY-059, tirilazad, NAC):" },
  { sub: "Largely negative in large Phase III stroke and TBI trials despite promising animal data" },
]);

// 50
contentSlide(50, "Multimodal Monitoring Bundle", [
  { bold: "Core monitoring targets in severe cerebral edema:" },
  "ICP: intraparenchymal or ventricular catheter — target < 20–22 mmHg",
  "CPP: MAP – ICP — target 60–70 mmHg",
  "Brain tissue O₂ (PbtO₂): Licox probe — target > 20 mmHg; < 10 mmHg = critical ischemia",
  { sub: "Scalp edema and forehead abrasion can interfere with cerebral oximetry (Bradley & Daroff)" },
  "Jugular venous oximetry (SjO₂): global extraction — target 55–75%",
  "Transcranial Doppler (TCD): pulsatility index as non-invasive ICP surrogate",
  "Continuous EEG: detect non-convulsive status epilepticus (common in comatose patients)",
  "Core temperature: fever acutely elevates ICP and metabolic demand",
  { bold: "Laboratory monitoring during osmotherapy:" },
  { sub: "Serum Na⁺ and osmolality every 4–6 hours" },
  { sub: "Blood glucose every 1–4 hours; target 140–180 mg/dL" },
  { sub: "Coagulation, CBC — especially in ICH or anticoagulated patients" },
]);

// 51
tableSlide(51, "ICP Treatment Ladder — Stepwise Protocol",
  ["Step", "Intervention", "Target / Notes"],
  [
    ["1 (Universal)", "HOB 30°, normothermia, normoxia, normovolemia, no hypotonic fluids", "ALL brain-injured patients"],
    ["2 (ICP > 20)", "Sedation + analgesia (propofol, fentanyl)", "Reduce agitation-related ICP spikes"],
    ["3 (ICP > 20)", "CSF drainage via EVD (intermittent or continuous)", "1st choice if EVD in situ"],
    ["4 (ICP > 20)", "Osmotherapy: mannitol 0.25–1 g/kg OR 23.4% NaCl 30 mL bolus", "Monitor osmolality q4–6h"],
    ["5 (ICP > 20)", "Moderate hyperventilation: PaCO₂ 30–35 mmHg", "Bridge only — transient effect"],
    ["6 (Refractory)", "Decompressive craniectomy", "Malignant stroke / TBI"],
    ["7 (Refractory)", "Barbiturate coma: pentobarbital + continuous EEG monitoring", "Last resort; vasopressors required"],
    ["8 (Refractory)", "Therapeutic hypothermia: 32–34°C", "Rewarm slowly 0.25°C/hr"],
  ],
  [0.5, 4.5, 4.5]
);

// 52
tableSlide(52, "Pharmacotherapy of Cerebral Edema — Drug Summary",
  ["Drug", "Mechanism", "Indication", "Dose"],
  [
    ["Mannitol 20%", "Osmotic gradient, reduces viscosity", "ICP crisis (any cause)", "0.25–1 g/kg IV bolus q4–6h"],
    ["HTS 23.4%", "Osmotic gradient, no diuresis", "TBI, malignant infarct, refractory ICP", "30 mL IV bolus (central)"],
    ["HTS 3%", "Osmotic gradient, sustained", "Sustained ICP elevation", "0.1–1 mL/kg/hr infusion (central)"],
    ["Dexamethasone", "Reduces BBB permeability, anti-VEGF", "Tumor / abscess vasogenic edema; HACE", "10 mg IV, then 4 mg q6h"],
    ["Dexamethasone", "Anti-inflammatory", "Bacterial meningitis adjunct", "0.15 mg/kg IV q6h × 4 days"],
    ["Acetazolamide", "Reduces CSF production (CA inhibitor)", "IIH; altitude prophylaxis", "250–500 mg PO/IV BID"],
    ["Pentobarbital", "Reduces CMRO₂, CBF; burst suppression", "Refractory ICP in TBI", "5–10 mg/kg load; 1–4 mg/kg/hr"],
    ["Glibenclamide", "SUR1-TRPM4 channel blocker", "Large hemispheric infarct (investigational)", "Phase III trials ongoing"],
  ],
  [1.9, 2.3, 2.5, 2.8]
);

// 53
contentSlide(53, "Edema Resolution and Repair", [
  "Resolution requires both cessation of fluid entry AND active clearance mechanisms",
  { bold: "Vasogenic edema resolution:" },
  { sub: "Depends on restoration of BBB tight junction integrity" },
  { sub: "AQP4-mediated water reabsorption through astrocyte endfeet back into bloodstream" },
  { sub: "Potentially fully reversible if underlying cause is treated (e.g., tumor, hypertension)" },
  { bold: "Cytotoxic edema resolution:" },
  { sub: "Generally irreversible once cell membrane integrity is permanently lost" },
  { sub: "Necrotic tissue → macrophage/microglia phagocytosis → cystic encephalomalacia over weeks" },
  { bold: "Interstitial edema resolution:" },
  { sub: "Variable — depends on degree of CSF pressure reduction" },
  { sub: "Partial resolution with CSF diversion (VP or LP shunt)" },
  "Glymphatic system (perivascular clearance during sleep) — emerging role in edema clearance",
  "Post-edema brain atrophy and reactive gliosis contribute to chronic neurological deficits",
]);

// 54
contentSlide(54, "Pediatric Considerations", [
  { bold: "Key differences from adults:" },
  "Open fontanelles and sutures in infants allow partial buffering of ICP increase",
  "Higher brain water content in neonates — more susceptible to osmotic shifts",
  "DKA-related cerebral edema occurs almost exclusively in children (<20 years)",
  "Reye syndrome (rare now): cytotoxic + vasogenic edema in acute liver failure + encephalopathy",
  { bold: "Pediatric TBI:" },
  { sub: "Diffuse cerebral swelling more common than focal hematomas (vs. adults)" },
  { sub: "Hyperemia (increased CBF) contributes to ICP elevation more than in adults" },
  { sub: "Greater neuroplasticity — better recovery potential despite significant injury" },
  { bold: "Management in children:" },
  { sub: "Same ICP principles as adults; weight-adjusted drug dosing required" },
  { sub: "Acetazolamide well-tolerated for pediatric IIH" },
  { sub: "Normal ICP slightly lower in young children (<10 mmHg in infants)" },
]);

// 55
contentSlide(55, "Prognosis and Outcomes", [
  { bold: "Factors predicting poor outcome:" },
  "Sustained ICP > 20 mmHg despite maximal therapy",
  "Loss of cerebrovascular pressure reactivity (PRx > 0 continuously)",
  "Bilateral fixed dilated pupils (uncal herniation with brainstem compression)",
  "Brain tissue PO₂ < 10 mmHg sustained",
  "Age > 60 years (reduced neuroplasticity, more comorbidities)",
  { bold: "Factors predicting favorable outcome:" },
  "Early restoration of cerebrovascular autoregulation",
  "ICP < 20 mmHg within 24 hours of treatment initiation",
  "Intact brainstem reflexes (pupillary, oculocephalic, corneal)",
  "Young age, previously healthy, vasogenic (reversible) vs. cytotoxic (irreversible) edema",
  "Underlying cause amenable to definitive treatment (e.g., tumor, IIH, HACE)",
]);

// 56
contentSlide(56, "Rehabilitation after Cerebral Edema", [
  "Neurological deficits after cerebral edema depend on extent and location of irreversible injury",
  { bold: "Common sequelae:" },
  { sub: "Cognitive impairment — memory, attention, executive function, processing speed" },
  { sub: "Motor deficits — hemiparesis, ataxia, spasticity" },
  { sub: "Language disorders — aphasia (dominant hemisphere), dysarthria" },
  { sub: "Seizures — post-stroke epilepsy, post-TBI epilepsy (5–15% incidence)" },
  { sub: "Psychiatric comorbidities — depression (30–40%), PTSD, anxiety disorders" },
  { bold: "Rehabilitation principles:" },
  "Early mobilization and physical therapy — reduces complications and promotes neurological recovery",
  "Cognitive rehabilitation — targeted programs for memory, attention, language",
  "Occupational and speech/language therapy",
  "Neuroplasticity supports long-term functional recovery even months to years after injury",
  "Regular vision and hearing assessment — often overlooked deficits after cerebral edema",
]);

// 57
contentSlide(57, "Emerging Research and Future Directions", [
  { bold: "Glymphatic system:" },
  { sub: "Perivascular CSF-ISF exchange driven by AQP4 on astrocytes — clears waste (Aβ, tau)" },
  { sub: "Sleep-dependent; glymphatic dysfunction may amplify edema and impair toxin clearance" },
  { bold: "Targeted molecular therapies:" },
  { sub: "SUR1-TRPM4 inhibitors (glibenclamide/BIIB093) — Phase III trials in large hemispheric infarction" },
  { sub: "MMP inhibitors — reduce BBB breakdown acutely after ischemia" },
  { sub: "Anti-VEGF (bevacizumab) — radiation necrosis and recurrent glioblastoma vasogenic edema" },
  { bold: "Biomarkers for bedside monitoring:" },
  { sub: "GFAP (glial fibrillary acidic protein) — astrocyte injury marker; correlates with edema severity" },
  { sub: "UCH-L1 — neuronal injury marker; FDA-approved for TBI prognostication" },
  { sub: "S100B — non-specific glial marker; elevated in significant BBB disruption" },
  { bold: "Gene and cell therapies:" },
  { sub: "Endothelial progenitor cells to repair BBB; AQP4 gene silencing for cytotoxic edema" },
]);

// 58
contentSlide(58, "Clinical Pearls — Key Take-Home Points", [
  "Cerebral edema is a final common pathway of injury in most serious neurological diseases",
  "Classify edema type FIRST — vasogenic vs. cytotoxic — as treatment differs fundamentally",
  "Corticosteroids work for vasogenic edema (tumors, abscesses, HACE) — NOT for cytotoxic (stroke, TBI)",
  "Maintain CPP 60–70 mmHg; treat ICP > 20 mmHg aggressively with the stepwise ladder",
  "Osmotherapy (mannitol or HTS) is the cornerstone of acute ICP pharmacological management",
  "Hyperventilation is a bridge — temporary only; avoid prolonged use (ischemia risk)",
  "Decompressive craniectomy is life-saving in malignant MCA infarction (< 60 yr, within 48 hours)",
  "Avoid the 5 Hs in all brain-injured patients: Hypotension, Hypoxia, Hyperthermia, Hyponatremia, Hypoglycemia",
  "Papilledema + chronic headache + obese woman of childbearing age = IIH until proven otherwise",
  "AQP4 and SUR1-TRPM4 are the most promising emerging molecular targets for edema therapy",
]);

// 59
tableSlide(59, "Quick Reference — Targets and Thresholds",
  ["Parameter", "Normal / Target", "Treatment Threshold / Notes"],
  [
    ["ICP", "5–15 mmHg", "Treat if > 20–22 mmHg; herniation signs = immediate intervention"],
    ["CPP", "60–70 mmHg", "Avoid < 50 (ischemia); avoid > 70 with aggressive therapies"],
    ["PaCO₂", "35–40 mmHg", "Hyperventilate to 30–35 mmHg only for ICP crisis (temporary)"],
    ["PbtO₂", "> 20 mmHg", "< 10 mmHg = critical; optimize CPP and FiO₂"],
    ["Serum Na⁺", "138–145 mEq/L", "Mild hypernatremia (145–155) acceptable during HTS therapy"],
    ["Osmolality", "285–295 mOsm/kg", "< 320 mOsm/kg with mannitol (stop if osmol gap > 20)"],
    ["Temperature", "36–37°C", "Treat fever aggressively; mild hypothermia for cardiac arrest/refractory ICP"],
    ["Blood glucose", "140–180 mg/dL", "Avoid < 70 (hypoglycemia) and > 180 (hyperglycemia worsens edema)"],
    ["SBP (TBI)", "> 100–110 mmHg", "Avoid SBP < 90 mmHg — independently doubles TBI mortality"],
  ],
  [2.2, 2.5, 4.8]
);

// 60 — Closing
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.white } });
  // Top and bottom teal bars
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.07, fill: { color: C.teal } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.555, w: 10, h: 0.07, fill: { color: C.teal } });

  s.addText("Cerebral Edema", {
    x: 0.8, y: 1.3, w: 8.4, h: 1.2,
    fontSize: 42, bold: true, color: C.navy, fontFace: "Calibri", align: "center",
  });
  // Thin rule
  s.addShape(pres.ShapeType.rect, { x: 2.5, y: 2.65, w: 5.0, h: 0.04, fill: { color: C.teal } });
  s.addText("Pathophysiology · Classification · Treatment", {
    x: 0.8, y: 2.78, w: 8.4, h: 0.6,
    fontSize: 18, color: C.teal, fontFace: "Calibri", align: "center",
  });
  s.addText([
    { text: "Source: ", options: { bold: true, color: C.navy } },
    { text: "Bradley and Daroff's Neurology in Clinical Practice, 8th Edition, Chapter 88", options: { color: C.bodyText } },
  ], {
    x: 0.8, y: 4.0, w: 8.4, h: 0.6,
    fontSize: 14, fontFace: "Calibri", align: "center",
  });
  s.addText("For educational and clinical reference purposes only", {
    x: 0.8, y: 4.7, w: 8.4, h: 0.4,
    fontSize: 11, color: C.slate, fontFace: "Calibri", align: "center", italic: true,
  });
}

// ─── Write file ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_AllWhite.pptx" })
  .then(() => console.log("SUCCESS"))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/cerebral-edema-ppt && node build_white.js 2>&1

Running Command

unzip -l /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_AllWhite.pptx | grep "ppt/slides/slide[0-9]" | grep -v "_rels\|Layout\|layout" | wc -l && HOME=/tmp libreoffice --headless --convert-to pdf --outdir /tmp /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_AllWhite.pptx 2>&1

Running Command

cp /tmp/Cerebral_Edema_AllWhite.pdf /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_AllWhite.pdf && ls -lh /home/daytona/workspace/cerebral-edema-ppt/Cerebral_Edema_AllWhite.pdf

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

All White slides pdf format

Running Command

ls -lh /home/daytona/workspace/cerebral-edema-ppt/

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.

All White slides pdf format

The file is already ready from yesterday's session. Here it is:

Cerebral Edema AllWhite

PDF Document · PDF

60 slides, fully white background, 493 KB - all slides use white backgrounds with navy/teal text only, thin accent lines, no dark header bars or colored fills. Sourced from Bradley and Daroff's Neurology in Clinical Practice.

In ppt format

The PPTX file is already available from yesterday. Here it is:

Cerebral Edema AllWhite

Presentation · PPTX

60 slides, fully white design, 1.1 MB - same all-white content as the PDF, fully editable in PowerPoint. Sourced from Bradley and Daroff's Neurology in Clinical Practice.

Cauda equina vs conus medullaris

Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Loading Image
Loading Image
Here is a comprehensive comparison, fully sourced from Bradley and Daroff's Neurology in Clinical Practice (Chapters 27 and 63).

Conus Medullaris vs. Cauda Equina Syndrome

Anatomy

Conus medullaris is the tapered terminal end of the spinal cord. Its location is variable but lies between the T12-L1 disc space and the middle third of L2 in most people. It contains the lumbar parasympathetic fibers, sacral sympathetic fibers, and sacral somatic nerve origins — representing the transition from CNS to PNS.
Cauda equina (Latin: "horse's tail") is the bundle of lumbar and sacral nerve roots (L2–S5) that descend below the conus within the lumbar cistern to reach their exit foramina. It is the only neurological structure in this region; there is no spinal cord tissue here.

MRI Examples from Bradley & Daroff

Conus Medullaris Syndrome — T12 burst fracture:
Conus Medullaris Syndrome — T2 sagittal MRI showing T12 burst fracture
Fig. 63.5 - T2 sagittal MRI showing T12 burst fracture resulting in conus medullaris syndrome
Cauda Equina Syndrome — L3 burst fracture:
Cauda Equina Syndrome — T2 sagittal MRI showing L3 burst fracture
Fig. 63.6 - T2 sagittal MRI showing L3 burst fracture resulting in cauda equina syndrome

Side-by-Side Comparison (Table 63.2, Bradley & Daroff)

FeatureConus Medullaris SyndromeCauda Equina Syndrome
Level of injuryT12–L2 (spinal cord terminus)Below L2 (nerve roots only)
Structure damagedSpinal cord (CNS)Peripheral nerve roots (PNS)
Motor neuron typeMixed UMN + LMNPure LMN only
Motor weaknessSymmetricalAsymmetrical
Muscle toneVariable (may be spastic or flaccid)Flaccid, reduced tone
Deep tendon reflexesAbsent (lower limbs)Absent
UMN signsMay be present (Babinski, spasticity)Absent
Saddle anesthesiaPresent (bilateral, symmetric)Present (often asymmetric)
Bladder/bowelAreflexic (permanent)Areflexic (permanent)
Bulbocavernosus reflexAbsent (permanently lost)Absent
Erectile functionReflexogenic erection lostReflexogenic erection lost
PainLess prominentBack + radicular leg pain common; ≥1/3 have central pain
ProgressionMore rapidly progressiveOften insidious (unless acute trauma)
PrognosisGuarded (spinal cord — limited regeneration)Better (peripheral nerve roots regenerate)

Key Distinguishing Points in Detail

Motor Neuron Pattern

The most important distinguishing feature is the motor neuron pattern:
  • Conus medullaris produces a mixed UMN + LMN picture because the terminal cord still contains upper motor neuron tracts. Some patients show spasticity above the injury level alongside areflexia below it.
  • Cauda equina is a pure LMN injury — only nerve roots are damaged, so there is never any UMN involvement. Weakness is always flaccid.

Symmetry

  • Conus lesions tend to produce symmetric deficits because they compress the cord centrally.
  • Cauda equina lesions are often asymmetric because individual roots are compressed selectively (e.g., a lateralized disc herniation may compress only L4 or L5 on one side).

Reflexes

Both syndromes lose the bulbocavernosus and anal reflexes. In higher spinal cord injuries (above conus), these reflexes return within 48 hours of spinal shock. Permanent loss of the bulbocavernosus reflex differentiates conus syndrome from higher SCI (Bradley & Daroff, Ch. 63).

Prognosis

Cauda equina injuries have better recoveries due to the resiliency of peripheral nerve roots and their greater capacity for regeneration compared to spinal cord tissue. However, the sacral roots are very delicate, and damage to them may be permanent. Conus injuries have guarded prognoses since spinal cord regeneration is poor.

Common Causes

Conus MedullarisCauda Equina
TraumaBurst fracture / fracture-dislocation T12–L2Burst fracture / fracture-dislocation distal to L2
Disc diseaseCentral disc herniation at thoracolumbar junctionCentral lumbar disc herniation (L3-S1)
TumorInfiltrating conus tumor; ependymomaIntradural extramedullary tumors (meningioma, schwannoma), drop metastases
VascularConus infarction, AVMAVM with vascular steal
InfectionTransverse myelitis, abscessEpidural/intradural abscess
IatrogenicSpinal procedure complicationLumbar puncture, spinal procedure complication
Spinal stenosisThoracolumbar stenosisLumbar canal stenosis (L3-S1) — neurogenic claudication

Neurogenic Claudication (Cauda Equina)

Lumbar spinal stenosis due to a congenitally narrow canal or disc/spondylotic narrowing below L1 classically produces neurogenic claudication — lower extremity numbness, pain, and weakness in an L3–S1 radicular pattern aggravated by walking and standing, relieved by sitting and flexion. A useful bedside test: examine muscle strength after the patient walks ~500 ft, as transient paresis in the affected root distribution appears immediately after walking and resolves within 1–2 minutes (Bradley & Daroff, Ch. 27).

Management

  • Cauda equina syndrome from disc herniation: treat surgically within 24 hours if possible to prevent residual deficits (Kennedy et al., 1999).
  • Conus medullaris: no strong evidence favoring surgical over non-surgical intervention, nor for timing of decompression.
  • Imaging: MRI is the preferred modality for both. CT with contrast if MRI is contraindicated.
  • Both benefit from bladder management (clean intermittent catheterization), bowel programs, and rehabilitation.

Source: Bradley and Daroff's Neurology in Clinical Practice, 8th Edition, Chapters 27 and 63
This is a shared conversation. Sign in to Orris to start your own chat.