Guedels stag3 of anaesthesia

Reading File
Finding Sources
Finding Sources
Searching the Web

Guedel stage 3 anaesthesia planes signs

Finding Sources
Reading Web Page

https://www.medicalalgorithms.com/guedels-stages-and-planes-…

Finding Sources
Finding Sources
Finding Sources
Searching the Web

Guedel stage 3 surgical anaesthesia four planes detailed signs pupils respiration

Finding Sources
Reading Web Page

https://www.ncbi.nlm.nih.gov/books/NBK557596/

Finding Sources
Finding Sources
Reading File
Reading File
I have enough information from both the textbook (Katzung's Basic and Clinical Pharmacology) and web sources (Wikipedia, MedicoNotebook, StatPearls) to give a comprehensive answer on Guedel's Stage 3.

Guedel's Stage III — Surgical Anaesthesia

Described originally for diethyl ether induction (with morphine + atropine premedication), Stage III is defined as the period from the onset of automatic (regular) respiration to complete cessation of spontaneous respiration (apnea).
It is the stage at which surgery is performed, and is subdivided into four planes based on progressive changes in ocular movements, eye reflexes, pupil size, and respiratory muscle activity.

The Four Planes of Stage III

SignPlane IPlane IIPlane IIIPlane IV
Eyeball movementPresent (oscillating/roving)Ceases (fixed, central)FixedFixed
Eyelid reflexLostLostLostLost
Conjunctival reflexLost at bottom of planeLostLostLost
Corneal reflexPresentLostLostLost
LacrimationPresentIncreased (sign of light anaesthesia) → decreasesAbsentAbsent
Pupil sizeNormal/mildly dilatedModerate dilatationDilated, light reflex abolishedMaximally dilated
Laryngeal reflexPresentLostLost (but can be provoked by cervical/anal dilatation)Lost
Swallowing reflexLostLostLostLost
RespirationAutomatic, regularAutomatic, regularDiaphragmatic only (intercostal paralysis progressing)Diaphragmatic → apnea
Intercostal musclesActiveBeginning paralysisProgressive → complete paralysisComplete paralysis
Response to skin stimulationPresentLostLostLost

Plane-by-Plane Detail

Plane IOnset of automatic respiration → cessation of eyeball movements
  • Eyelid reflex lost, swallowing reflex disappears
  • Eyeballs may show marked oscillating/roving movements
  • Conjunctival reflex lost at the bottom of this plane
  • Respiration: automatic and regular
  • This marks the entry into safe surgical anaesthesia — eyeball oscillation indicates an adequate but not overly deep level
Plane IICessation of eyeball movements → beginning of intercostal muscle paralysis
  • Eyeballs now fixed and central
  • Corneal reflex lost
  • Laryngeal reflex lost (though upper respiratory inflammation raises irritability)
  • Lacrimation increases (a useful clinical sign of light anaesthesia in this plane)
  • Respiration: automatic and regular; no movement or deep breathing response to skin stimulation
  • Most minor and moderate surgery performed here
Plane IIIBeginning → completion of intercostal muscle paralysis
  • Diaphragmatic respiration persists but intercostal muscles are progressively then completely paralysed
  • Pupils dilated, light reflex abolished
  • Laryngeal reflex is lost, but can still be triggered by painful stimuli from cervical or anal dilatation
  • This was the preferred plane for major surgery before neuromuscular blocking agents were available (allowing adequate abdominal relaxation)
Plane IVComplete intercostal paralysis → diaphragmatic paralysis (apnea)
  • Diaphragm progressively paralysed → apnea
  • Pupils maximally dilated, all reflexes absent
  • Merges into Stage IV (medullary depression / overdose)
  • Dangerous zone — border of anaesthetic overdose

Key Clinical Mnemonics / Points

  • Entry into Stage III is signalled by: onset of regular automatic breathing + eyeball oscillation
  • Eyeball oscillation = safe surgical plane (not too deep)
  • Eyeball fixation = deeper plane; watch for depth
  • Pupil dilatation + loss of light reflex = Plane III or beyond → dangerously deep
  • Increased lacrimation = light anaesthesia (Plane II)
  • The progression through planes follows: eye signs → respiratory muscle signs

Important Caveats

  • Guedel's classification was based on ether with morphine/atropine premedication — stages may not be clearly demarcated with modern agents (propofol, sevoflurane, etc.)
  • Neuromuscular blocking drugs eliminate the respiratory muscle signs, making traditional Guedel monitoring unreliable
  • Modern anaesthesia uses balanced techniques (IV agents + volatiles + NMBDs) where clinical signs are partially masked; depth is now monitored with BIS (Bispectral Index) or other EEG-based monitors
  • Katzung's Basic and Clinical Pharmacology, 16th Ed., p. 701
  • Guedel's Classification — Wikipedia / StatPearls (NCBI Bookshelf)

Guedels stage of anaesthesia in MD anaesthesia. ..Make a ppt

Reading File
Reading File
Reading File
Finding Sources
Searching Images

Guedel stages of anaesthesia chart diagram planes

Reading File
Running Command

mkdir -p /home/daytona/workspace/guedel-anaesthesia && ls /home/daytona/workspace/guedel-anaesthesia/

Writing File

~/guedel-anaesthesia/guedel_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Guedel's Stages of Anaesthesia";
pres.author = "MD Anaesthesia";

// ─── Colour Palette ───────────────────────────────────────────────
const C = {
  navy:    "0A1628",   // dominant dark bg
  teal:    "0D7377",   // accent
  tealLt:  "14BDBE",   // lighter accent
  gold:    "F5A623",   // highlight
  white:   "FFFFFF",
  offWhite:"E8F4F8",
  gray:    "8EB8C2",
  plane1:  "1ABC9C",
  plane2:  "3498DB",
  plane3:  "E67E22",
  plane4:  "E74C3C",
  red:     "C0392B",
  green:   "27AE60",
};

// ─── Helper: add a slide background ──────────────────────────────
function navyBg(slide) {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.navy } });
}

// ─── Helper: header bar ──────────────────────────────────────────
function headerBar(slide, title, subtitle = "") {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 1.05, fill: { color: C.teal } });
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 1.0, w: 10, h: 0.06, fill: { color: C.gold } });
  slide.addText(title, {
    x: 0.35, y: 0.05, w: 9.3, h: 0.7,
    fontSize: 26, bold: true, color: C.white, fontFace: "Calibri", valign: "middle", margin: 0
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.35, y: 0.72, w: 9.3, h: 0.3,
      fontSize: 12, color: C.offWhite, fontFace: "Calibri", italic: true, margin: 0
    });
  }
}

// ─── Helper: footer ──────────────────────────────────────────────
function footer(slide, text = "Guedel's Stages of Anaesthesia  |  MD Anaesthesia") {
  slide.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: "0A2035" } });
  slide.addText(text, {
    x: 0.3, y: 5.35, w: 9.4, h: 0.275,
    fontSize: 9, color: C.gray, fontFace: "Calibri", valign: "middle", margin: 0
  });
}

// ─── Helper: bullet list ─────────────────────────────────────────
function bulletList(slide, items, x, y, w, h, opts = {}) {
  const fs = opts.fontSize || 13;
  const col = opts.color || C.offWhite;
  const entries = items.map((item, i) => ({
    text: item,
    options: { bullet: { code: "2022" }, color: col, fontSize: fs,
               bold: opts.boldFirst && i === 0, breakLine: i < items.length - 1 }
  }));
  slide.addText(entries, { x, y, w, h, fontFace: "Calibri", valign: "top" });
}

// ─── Helper: coloured card ───────────────────────────────────────
function card(slide, x, y, w, h, bgColor, title, lines, titleSize = 13, lineSize = 11) {
  slide.addShape(pres.ShapeType.roundRect, {
    x, y, w, h,
    fill: { color: bgColor }, line: { color: C.navy, width: 0.5 },
    rectRadius: 0.08
  });
  const allText = [
    { text: title, options: { bold: true, color: C.white, fontSize: titleSize, breakLine: true } },
    ...lines.map((l, i) => ({
      text: l,
      options: { color: C.offWhite, fontSize: lineSize, breakLine: i < lines.length - 1 }
    }))
  ];
  slide.addText(allText, { x: x + 0.1, y: y + 0.08, w: w - 0.2, h: h - 0.15, fontFace: "Calibri", valign: "top" });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);

  // Large accent top bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.08, fill: { color: C.gold } });

  // Central box
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.8, y: 0.9, w: 8.4, h: 3.4,
    fill: { color: "0D2137" }, line: { color: C.teal, width: 2 }, rectRadius: 0.18
  });

  s.addText("GUEDEL'S STAGES OF ANAESTHESIA", {
    x: 1, y: 1.05, w: 8, h: 0.85,
    fontSize: 30, bold: true, color: C.gold, fontFace: "Calibri",
    align: "center", charSpacing: 2
  });

  s.addShape(pres.ShapeType.rect, { x: 2.5, y: 1.9, w: 5, h: 0.05, fill: { color: C.tealLt } });

  s.addText("A Comprehensive Review for MD Anaesthesia", {
    x: 1, y: 2.05, w: 8, h: 0.5,
    fontSize: 16, color: C.tealLt, fontFace: "Calibri", align: "center", italic: true
  });

  s.addText([
    { text: "Based on:  ", options: { bold: false, color: C.gray, fontSize: 11 } },
    { text: "Katzung's Basic & Clinical Pharmacology  •  Morgan & Mikhail's Clinical Anaesthesiology  •  Miller's Anaesthesia", options: { bold: false, color: C.offWhite, fontSize: 11 } }
  ], { x: 1, y: 2.68, w: 8, h: 0.45, fontFace: "Calibri", align: "center" });

  s.addText("Arthur Ernest Guedel (1883–1956)  |  Classification published 1937", {
    x: 1, y: 3.15, w: 8, h: 0.35,
    fontSize: 11, color: C.gray, fontFace: "Calibri", align: "center", italic: true
  });

  // Bottom strip
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.35, w: 10, h: 0.275, fill: { color: "0A2035" } });
  s.addText("MD Anaesthesia  |  Prepared for academic use", {
    x: 0.3, y: 5.35, w: 9.4, h: 0.275,
    fontSize: 9, color: C.gray, fontFace: "Calibri", valign: "middle", align: "center"
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 2 — HISTORICAL BACKGROUND & BASIS
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Historical Background", "Origins of the classification");
  footer(s);

  // Left column
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.3, y: 1.2, w: 4.5, h: 3.85,
    fill: { color: "0D2137" }, line: { color: C.teal, width: 1 }, rectRadius: 0.12
  });

  s.addText("Arthur E. Guedel (1883–1956)", {
    x: 0.4, y: 1.25, w: 4.3, h: 0.45,
    fontSize: 13, bold: true, color: C.gold, fontFace: "Calibri"
  });

  bulletList(s, [
    "Published 1937 — one of first safety systems in anaesthesiology",
    "Developed for DIETHYL ETHER as the sole inhalational agent",
    "Patients premedicated with morphine + atropine",
    "IV anaesthetics not yet in common use",
    "Neuromuscular blocking drugs not yet available",
    "Observations based on: respiration, eye signs, muscle tone & reflexes",
  ], 0.4, 1.73, 4.3, 3.2, { fontSize: 11.5, color: C.offWhite });

  // Right column
  s.addShape(pres.ShapeType.roundRect, {
    x: 5.1, y: 1.2, w: 4.6, h: 3.85,
    fill: { color: "0D2137" }, line: { color: C.tealLt, width: 1 }, rectRadius: 0.12
  });

  s.addText("Clinical Relevance Today", {
    x: 5.2, y: 1.25, w: 4.4, h: 0.45,
    fontSize: 13, bold: true, color: C.tealLt, fontFace: "Calibri"
  });

  bulletList(s, [
    "Ether phased out (USA by 1980s); replaced by fluorinated hydrocarbons",
    "'Balanced anaesthesia' uses multiple agents — classical signs may be masked",
    "NMBDs abolish respiratory muscle signs rendering traditional monitoring unreliable",
    "Still taught because: conceptual framework for depth of anaesthesia",
    "BIS / EEG-based monitors now supplement/replace clinical signs",
    "Useful in resource-limited settings & inhalational induction (paediatrics)",
  ], 5.2, 1.73, 4.3, 3.2, { fontSize: 11.5, color: C.offWhite });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 3 — OVERVIEW: 4 STAGES
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Overview: The Four Stages", "Progressive CNS depression from analgesia to medullary paralysis");
  footer(s);

  const stages = [
    {
      num: "I", name: "Analgesia", col: C.green, col2: "1A5C40",
      span: "Induction → Loss of Consciousness",
      points: [
        "Analgesia without amnesia (early)",
        "Analgesia + amnesia (late)",
        "Patient conscious, responds to commands",
        "Protective reflexes intact",
        "Suitable: minor procedures (e.g. N₂O)"
      ]
    },
    {
      num: "II", name: "Excitement / Delirium", col: "E67E22", col2: "6B3800",
      span: "LOC → Onset of Automatic Breathing",
      points: [
        "Delirium, vocalization, amnesia",
        "Respiration: rapid, irregular, breath-holding",
        "↑ HR, ↑ BP — sympathetic surge",
        "Risk: vomiting, laryngospasm",
        "Eyelash reflex disappears, others intact",
        "Shorten by rapid ↑ in agent concentration"
      ]
    },
    {
      num: "III", name: "Surgical Anaesthesia", col: C.teal, col2: "07484B",
      span: "Automatic Respiration → Respiratory Paralysis",
      points: [
        "4 planes based on ocular & respiratory signs",
        "Progressive muscle relaxation",
        "Plane I–IV (see next slides)",
        "Target: Planes II–III for most surgery",
        "Plane III was target before NMBDs"
      ]
    },
    {
      num: "IV", name: "Medullary Depression", col: C.red, col2: "5C1010",
      span: "Respiratory Arrest → Death",
      points: [
        "Medullary paralysis — overdose",
        "Respiratory arrest (apnea)",
        "Vasomotor collapse → cardiac arrest",
        "Maximally dilated, fixed pupils",
        "Complete muscle relaxation",
        "AVOID — immediately reduce agent"
      ]
    }
  ];

  const xs = [0.18, 2.65, 5.12, 7.59];
  const w = 2.2;

  stages.forEach((st, i) => {
    const x = xs[i];
    // Header badge
    s.addShape(pres.ShapeType.roundRect, {
      x, y: 1.15, w, h: 0.5,
      fill: { color: st.col }, line: { color: C.navy, width: 0 }, rectRadius: 0.1
    });
    s.addText(`STAGE  ${st.num}`, {
      x, y: 1.15, w, h: 0.5,
      fontSize: 15, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
    });

    // Card body
    s.addShape(pres.ShapeType.roundRect, {
      x, y: 1.65, w, h: 3.5,
      fill: { color: st.col2 }, line: { color: st.col, width: 1 }, rectRadius: 0.1
    });

    s.addText(st.name, {
      x: x + 0.05, y: 1.68, w: w - 0.1, h: 0.38,
      fontSize: 11.5, bold: true, color: C.gold, fontFace: "Calibri", align: "center"
    });

    s.addShape(pres.ShapeType.rect, { x, y: 2.04, w, h: 0.03, fill: { color: st.col } });

    s.addText(`From: ${st.span}`, {
      x: x + 0.05, y: 2.08, w: w - 0.1, h: 0.38,
      fontSize: 9, color: C.gray, fontFace: "Calibri", italic: true, align: "center"
    });

    const bullItems = st.points.map((p, pi) => ({
      text: p,
      options: { bullet: { code: "25B8" }, color: C.offWhite, fontSize: 10, breakLine: pi < st.points.length - 1 }
    }));
    s.addText(bullItems, {
      x: x + 0.05, y: 2.48, w: w - 0.1, h: 2.5,
      fontFace: "Calibri", valign: "top"
    });
  });

  // Arrow between stages
  [0, 1, 2].forEach(i => {
    s.addShape(pres.ShapeType.rightArrow, {
      x: xs[i] + w + 0.02, y: 2.1, w: 0.23, h: 0.28,
      fill: { color: C.gold }, line: { color: C.gold, width: 0 }
    });
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 4 — STAGE I & II DETAIL
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Stage I & Stage II — Detail", "Analgesia  →  Excitement");
  footer(s);

  // Stage I
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.15, w: 4.6, h: 4.0,
    fill: { color: "0A2D1A" }, line: { color: C.green, width: 1.5 }, rectRadius: 0.14
  });

  s.addShape(pres.ShapeType.rect, {
    x: 0.2, y: 1.15, w: 4.6, h: 0.5,
    fill: { color: C.green }
  });
  s.addText("STAGE I — ANALGESIA", {
    x: 0.2, y: 1.15, w: 4.6, h: 0.5,
    fontSize: 14, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
  });

  const s1Items = [
    ["Span", "Induction → Loss of consciousness"],
    ["Consciousness", "Present; responds to commands"],
    ["Analgesia", "Present (amnesia added late in stage)"],
    ["Respiration", "Normal, regular"],
    ["Pupils", "Normal size, reactive to light"],
    ["Reflexes", "All intact"],
    ["Eyelash reflex", "Present"],
    ["BP / HR", "Normal"],
    ["Clinical use", "N₂O sedation, minor procedures"],
  ];

  s1Items.forEach(([label, val], i) => {
    const yy = 1.73 + i * 0.36;
    s.addText(`${label}:`, { x: 0.3, y: yy, w: 1.6, h: 0.32, fontSize: 11, bold: true, color: C.tealLt, fontFace: "Calibri" });
    s.addText(val, { x: 1.95, y: yy, w: 2.7, h: 0.32, fontSize: 11, color: C.offWhite, fontFace: "Calibri" });
  });

  // Stage II
  s.addShape(pres.ShapeType.roundRect, {
    x: 5.2, y: 1.15, w: 4.6, h: 4.0,
    fill: { color: "3B1F00" }, line: { color: "E67E22", width: 1.5 }, rectRadius: 0.14
  });

  s.addShape(pres.ShapeType.rect, {
    x: 5.2, y: 1.15, w: 4.6, h: 0.5,
    fill: { color: "E67E22" }
  });
  s.addText("STAGE II — EXCITEMENT / DELIRIUM", {
    x: 5.2, y: 1.15, w: 4.6, h: 0.5,
    fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
  });

  const s2Items = [
    ["Span", "LOC → onset of automatic breathing"],
    ["Consciousness", "Lost; complete amnesia"],
    ["Behaviour", "Delirium, vocalization, struggling"],
    ["Respiration", "Rapid, irregular; breath-holding possible"],
    ["Pupils", "Dilated, reactive"],
    ["Eyelash reflex", "Disappears in this stage"],
    ["Other reflexes", "Intact — coughing, vomiting, swallowing"],
    ["BP / HR", "Increased (sympathetic surge)"],
    ["Hazard", "Vomiting, laryngospasm, aspiration"],
    ["Management", "Rapid ↑ in agent conc.; short duration"],
  ];

  s2Items.forEach(([label, val], i) => {
    const yy = 1.73 + i * 0.33;
    s.addText(`${label}:`, { x: 5.3, y: yy, w: 1.6, h: 0.3, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri" });
    s.addText(val, { x: 6.95, y: yy, w: 2.7, h: 0.3, fontSize: 11, color: C.offWhite, fontFace: "Calibri" });
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 5 — STAGE III OVERVIEW
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Stage III — Surgical Anaesthesia", "The most important stage, divided into four planes");
  footer(s);

  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.18, w: 9.6, h: 0.72,
    fill: { color: "07484B" }, line: { color: C.teal, width: 1 }, rectRadius: 0.1
  });
  s.addText([
    { text: "Definition: ", options: { bold: true, color: C.gold, fontSize: 13 } },
    { text: "Onset of automatic (regular) respiration  →  Complete cessation of spontaneous respiration (apnea)  |  Divided into FOUR PLANES.", options: { bold: false, color: C.offWhite, fontSize: 13 } }
  ], { x: 0.35, y: 1.22, w: 9.3, h: 0.62, fontFace: "Calibri", valign: "middle" });

  // Column headers
  const cols = ["Sign / Feature", "PLANE I", "PLANE II", "PLANE III", "PLANE IV"];
  const cw = [2.0, 1.9, 1.9, 1.9, 1.9];
  const cx = [0.2, 2.2, 4.1, 6.0, 7.9];
  const hdrColors = ["0D2137", C.plane1, C.plane2, C.plane3, C.plane4];

  cols.forEach((c, i) => {
    s.addShape(pres.ShapeType.rect, { x: cx[i], y: 1.98, w: cw[i], h: 0.42, fill: { color: hdrColors[i] } });
    s.addText(c, {
      x: cx[i], y: 1.98, w: cw[i], h: 0.42,
      fontSize: 11, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
    });
  });

  const rows = [
    ["Eyeball movement", "Present (oscillating)", "Ceases — fixed central", "Fixed", "Fixed"],
    ["Eyelid reflex", "LOST", "LOST", "LOST", "LOST"],
    ["Conjunctival reflex", "Lost at base of plane", "Lost", "Lost", "Lost"],
    ["Corneal reflex", "Present", "LOST", "Lost", "Lost"],
    ["Lacrimation", "Present", "↑ (sign of light plane)", "Absent", "Absent"],
    ["Pupil size", "Normal / mild dilat.", "Moderate dilatation", "Dilated widely", "Max. dilated"],
    ["Light reflex", "Present", "Diminishing", "ABOLISHED", "Absent"],
    ["Laryngeal reflex", "Present", "LOST", "Lost*", "Lost"],
    ["Respiration", "Regular, automatic", "Regular, automatic", "Diaphragmatic only", "Apnea"],
    ["Intercostal muscles", "Active", "Beginning paralysis", "Progressive → complete", "Complete paralysis"],
    ["Response to skin stimulation", "Present", "LOST", "Lost", "Lost"],
  ];

  const rowColors = ["0C1F30", "0D2540"];
  rows.forEach((row, ri) => {
    const yy = 2.42 + ri * 0.295;
    const bgC = rowColors[ri % 2];
    row.forEach((cell, ci) => {
      const isWarn = cell === "LOST" || cell === "ABOLISHED" || cell === "Apnea" || cell === "Max. dilated";
      s.addShape(pres.ShapeType.rect, { x: cx[ci], y: yy, w: cw[ci], h: 0.285, fill: { color: ci === 0 ? "0A1E30" : bgC } });
      s.addText(cell, {
        x: cx[ci] + 0.05, y: yy, w: cw[ci] - 0.1, h: 0.285,
        fontSize: 9.5,
        color: ci === 0 ? C.gray : isWarn ? C.red : C.offWhite,
        bold: ci === 0 || isWarn,
        fontFace: "Calibri", valign: "middle", align: ci === 0 ? "left" : "center"
      });
    });
  });

  s.addText("* Laryngeal reflex in Plane III can still be provoked by painful stimuli (anal / cervical dilatation)  |  Key entry sign: eyeball oscillation = Plane I onset", {
    x: 0.2, y: 5.25, w: 9.6, h: 0.2,
    fontSize: 8.5, color: C.gray, fontFace: "Calibri", italic: true
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 6 — STAGE III: PLANES I & II
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Stage III — Plane I & Plane II", "From automatic breathing to intercostal paralysis onset");
  footer(s);

  // Plane I card
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.15, w: 4.6, h: 4.1,
    fill: { color: "082C25" }, line: { color: C.plane1, width: 2 }, rectRadius: 0.14
  });
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.15, w: 4.6, h: 0.5, fill: { color: C.plane1 } });
  s.addText("PLANE I", {
    x: 0.2, y: 1.15, w: 4.6, h: 0.5,
    fontSize: 18, bold: true, color: C.navy, fontFace: "Calibri", align: "center", valign: "middle"
  });

  s.addText("Onset of automatic respiration → Cessation of eyeball movements", {
    x: 0.3, y: 1.7, w: 4.4, h: 0.5,
    fontSize: 10.5, color: C.tealLt, fontFace: "Calibri", italic: true, align: "center"
  });

  bulletList(s, [
    "ENTRY SIGN: Onset of regular, automatic breathing",
    "Eyeballs: oscillating / roving movements present",
    "Eyelid reflex: LOST",
    "Swallowing reflex: disappears",
    "Conjunctival reflex: lost at bottom of this plane",
    "Corneal reflex: still present",
    "Pupils: normal size, light reflex present",
    "Lacrimation: present",
    "Respiration: automatic, regular, tidal vol. adequate",
    "Intercostal muscles: active, full breathing",
    "Response to skin stimulation: present",
    "Eyeball oscillation = SAFE zone; patient can be operated on",
  ], 0.3, 2.23, 4.4, 3.0, { fontSize: 11 });

  // Plane II card
  s.addShape(pres.ShapeType.roundRect, {
    x: 5.2, y: 1.15, w: 4.6, h: 4.1,
    fill: { color: "08233C" }, line: { color: C.plane2, width: 2 }, rectRadius: 0.14
  });
  s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.15, w: 4.6, h: 0.5, fill: { color: C.plane2 } });
  s.addText("PLANE II", {
    x: 5.2, y: 1.15, w: 4.6, h: 0.5,
    fontSize: 18, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
  });

  s.addText("Cessation of eyeball movements → Beginning of intercostal paralysis", {
    x: 5.3, y: 1.7, w: 4.4, h: 0.5,
    fontSize: 10.5, color: C.tealLt, fontFace: "Calibri", italic: true, align: "center"
  });

  bulletList(s, [
    "Eyeballs: FIXED, central (no movement)",
    "Corneal reflex: LOST",
    "Laryngeal reflex: LOST (caution: upper airway infection ↑ irritability)",
    "Lacrimation: INCREASES — useful sign of light anaesthesia",
    "Pupils: moderate dilatation, light reflex diminishing",
    "Respiration: automatic, regular, good tidal volume",
    "Intercostal muscles: beginning of paralysis",
    "Movement response to skin stimulation: GONE",
    "Deep breathing response to stimulation: GONE",
    "Swallowing reflex: absent",
    "Most routine/minor-to-moderate surgery performed at this plane",
    "WARNING: Adequate depth — do not deepen without reason",
  ], 5.3, 2.23, 4.4, 3.0, { fontSize: 11 });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 7 — STAGE III: PLANES III & IV
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Stage III — Plane III & Plane IV", "Deep anaesthesia — approach with caution");
  footer(s);

  // Plane III card
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.15, w: 4.6, h: 4.1,
    fill: { color: "3B2000" }, line: { color: C.plane3, width: 2 }, rectRadius: 0.14
  });
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.15, w: 4.6, h: 0.5, fill: { color: C.plane3 } });
  s.addText("PLANE III", {
    x: 0.2, y: 1.15, w: 4.6, h: 0.5,
    fontSize: 18, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
  });

  s.addText("Beginning → Completion of intercostal muscle paralysis", {
    x: 0.3, y: 1.7, w: 4.4, h: 0.5,
    fontSize: 10.5, color: C.gold, fontFace: "Calibri", italic: true, align: "center"
  });

  bulletList(s, [
    "Respiration: DIAPHRAGMATIC ONLY (intercostal paralysis progressing)",
    "Thoracic cage: moves inward on inspiration (paradoxical breathing)",
    "Tidal volume progressively falls",
    "Pupils: WIDELY dilated",
    "Light reflex: ABOLISHED",
    "Laryngeal reflex: lost, BUT can be provoked by:",
    "   → Painful cervical dilatation",
    "   → Painful anal dilatation",
    "Eyeballs: fixed, central",
    "Intercostal muscles: progressive → complete paralysis",
    "Historical significance: preferred plane for major abdominal surgery",
    "   (adequate muscle relaxation without NMBDs)",
    "WARNING: Approaching dangerous depth",
  ], 0.3, 2.22, 4.4, 3.05, { fontSize: 10.5 });

  // Plane IV card
  s.addShape(pres.ShapeType.roundRect, {
    x: 5.2, y: 1.15, w: 4.6, h: 4.1,
    fill: { color: "2E0000" }, line: { color: C.plane4, width: 2 }, rectRadius: 0.14
  });
  s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.15, w: 4.6, h: 0.5, fill: { color: C.plane4 } });
  s.addText("PLANE IV  ⚠", {
    x: 5.2, y: 1.15, w: 4.6, h: 0.5,
    fontSize: 18, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
  });

  s.addText("Complete intercostal paralysis → Diaphragmatic paralysis (APNEA)", {
    x: 5.3, y: 1.7, w: 4.4, h: 0.5,
    fontSize: 10.5, color: C.red, fontFace: "Calibri", italic: true, align: "center"
  });

  bulletList(s, [
    "Diaphragm: progressively paralysed → APNEA",
    "Respiration: ceases completely",
    "Pupils: MAXIMALLY DILATED, fixed (no light reflex)",
    "Eyes: widely open, fixed, glazed appearance",
    "All reflexes: completely absent",
    "Muscle tone: complete flaccidity",
    "HR: falls, BP collapses",
    "Merges imperceptibly into Stage IV (medullary depression)",
    "IMMEDIATELY REDUCE ANAESTHETIC AGENT",
    "Initiate IPPV if apnea occurs",
    "This plane should NEVER be intentionally reached",
    "Monitor: SpO₂, BP, ETCO₂, BIS continuously",
  ], 5.3, 2.22, 4.4, 3.05, { fontSize: 10.5, color: C.offWhite });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 8 — STAGE IV & KEY CLINICAL SIGNS SUMMARY
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Stage IV & Clinical Signs Summary", "Medullary depression  •  Key monitoring parameters");
  footer(s);

  // Stage IV
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.18, w: 3.8, h: 4.0,
    fill: { color: "1A0000" }, line: { color: C.red, width: 2 }, rectRadius: 0.14
  });
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.18, w: 3.8, h: 0.48, fill: { color: C.red } });
  s.addText("STAGE IV — OVERDOSE", {
    x: 0.2, y: 1.18, w: 3.8, h: 0.48,
    fontSize: 13, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
  });

  bulletList(s, [
    "Span: Respiratory arrest → Death",
    "Medullary paralysis",
    "Respiratory arrest (apnea)",
    "Vasomotor collapse",
    "Cardiac arrest",
    "Maximally dilated, fixed pupils",
    "Complete muscle relaxation",
    "No reflexes whatsoever",
    "⚠ AVOID AT ALL COSTS",
    "Immediately: stop agent, ventilate, vasopressors",
  ], 0.3, 1.7, 3.6, 3.4, { fontSize: 11, color: C.offWhite });

  // Key signs box
  s.addShape(pres.ShapeType.roundRect, {
    x: 4.2, y: 1.18, w: 5.6, h: 4.0,
    fill: { color: "07253A" }, line: { color: C.gold, width: 1.5 }, rectRadius: 0.14
  });
  s.addShape(pres.ShapeType.rect, { x: 4.2, y: 1.18, w: 5.6, h: 0.48, fill: { color: "07484B" } });
  s.addText("MOST IMPORTANT CLINICAL SIGNS", {
    x: 4.2, y: 1.18, w: 5.6, h: 0.48,
    fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle"
  });

  const keyRows = [
    ["Sign", "Significance", "Color"],
    ["Eyeball oscillation", "Entry into Stage III Plane I — SAFE zone", C.plane1],
    ["Eyeball fixation", "Deeper anaesthesia — Plane II or beyond", C.plane2],
    ["↑ Lacrimation", "Light anaesthesia (Plane II) — may need deeper", C.tealLt],
    ["Corneal reflex loss", "Reached Plane II", C.plane2],
    ["Pupil dilatation + absent light reflex", "Plane III — dangerously deep", C.plane3],
    ["Intercostal paralysis (diaphragm only)", "Plane III — major hazard", C.plane3],
    ["Maximal pupil dilatation + apnea", "Plane IV / Stage IV — emergency", C.plane4],
    ["Increased BP/HR during surgery", "Light anaesthesia — deepen or give analgesic", C.gold],
    ["Decreasing BP + bradycardia", "Too deep — reduce agent", C.red],
  ];

  keyRows.forEach((row, ri) => {
    if (ri === 0) return; // skip header
    const yy = 1.72 + (ri - 1) * 0.35;
    s.addShape(pres.ShapeType.rect, { x: 4.2, y: yy, w: 0.08, h: 0.3, fill: { color: row[2] } });
    s.addText(row[0] + ":", {
      x: 4.32, y: yy, w: 2.2, h: 0.3,
      fontSize: 10.5, bold: true, color: row[2], fontFace: "Calibri", valign: "middle"
    });
    s.addText(row[1], {
      x: 6.55, y: yy, w: 3.1, h: 0.3,
      fontSize: 10.5, color: C.offWhite, fontFace: "Calibri", valign: "middle"
    });
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 9 — EYE SIGNS IN DETAIL
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Eye Signs — The Cornerstone of Guedel's Classification", "Guedel's key contribution: systematic eye sign monitoring");
  footer(s);

  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.15, w: 9.6, h: 0.6,
    fill: { color: "07484B" }, line: { color: C.teal, width: 1 }, rectRadius: 0.1
  });
  s.addText("Guedel's original contribution was to add systematic EYE SIGNS to the existing four-stage framework, allowing safe staging of surgical anaesthesia.", {
    x: 0.35, y: 1.18, w: 9.3, h: 0.52,
    fontSize: 12, color: C.offWhite, fontFace: "Calibri", valign: "middle", italic: true
  });

  const eyeSigns = [
    { title: "Eyeball Oscillation", stage: "Stage III — Plane I", color: C.plane1,
      points: ["Roving, rolling, pendular movements of eyeballs", "FIRST sign of entry into Stage III", "Indicates: adequate but not excessive depth", "Safe for surgical stimulation to begin", "As oscillation STOPS → entering Plane II"] },
    { title: "Eyeball Fixation", stage: "Stage III — Plane II+", color: C.plane2,
      points: ["Eyeballs become fixed in central position", "Marks transition from Plane I to Plane II", "More controlled surgical anaesthesia", "No voluntary or reflex eye movements", "Corneal reflex already absent at this point"] },
    { title: "Corneal Reflex", stage: "Stage III — Plane I→II", color: C.tealLt,
      points: ["Test: gentle touch of cornea with cotton wisp", "Present: Plane I of Stage III", "LOST: marks entry into Plane II", "Reliable indicator of anaesthetic depth", "Do not confuse with conjunctival reflex (lost earlier)"] },
    { title: "Pupil Size & Light Reflex", stage: "Stage III — Planes III–IV", color: C.plane3,
      points: ["Normal/small: Planes I–II", "Moderate dilatation: Plane II", "WIDE dilatation + abolished light reflex: Plane III", "MAXIMAL dilatation: Plane IV / Stage IV", "Parasympathetic depression → unopposed sympathetic"] },
    { title: "Lacrimation", stage: "Stage III — Plane II (clinically useful)", color: C.gold,
      points: ["Increases in Plane II — sign of light anaesthesia", "Useful practical sign: tears forming in anesthetised patient", "Should prompt: check depth, add analgesic if needed", "Absent in Plane III and beyond", "Historical: easily observed, no equipment needed"] },
  ];

  const cardW = 1.88;
  const cardX = [0.2, 2.1, 4.0, 5.9, 7.8];

  eyeSigns.forEach((item, i) => {
    const x = cardX[i];
    s.addShape(pres.ShapeType.roundRect, {
      x, y: 1.85, w: cardW, h: 3.3,
      fill: { color: "0A1E30" }, line: { color: item.color, width: 1.5 }, rectRadius: 0.1
    });
    s.addShape(pres.ShapeType.rect, { x, y: 1.85, w: cardW, h: 0.45, fill: { color: item.color } });
    s.addText(item.title, {
      x: x + 0.05, y: 1.85, w: cardW - 0.1, h: 0.45,
      fontSize: 10.5, bold: true, color: C.navy, fontFace: "Calibri", align: "center", valign: "middle"
    });
    s.addText(item.stage, {
      x: x + 0.05, y: 2.33, w: cardW - 0.1, h: 0.32,
      fontSize: 9, color: item.color, fontFace: "Calibri", italic: true, align: "center"
    });
    const bullItems = item.points.map((p, pi) => ({
      text: p,
      options: { bullet: { code: "25B8" }, color: C.offWhite, fontSize: 9.5, breakLine: pi < item.points.length - 1 }
    }));
    s.addText(bullItems, {
      x: x + 0.06, y: 2.67, w: cardW - 0.12, h: 2.4,
      fontFace: "Calibri", valign: "top"
    });
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 10 — RESPIRATORY SIGNS IN DETAIL
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Respiratory Signs Across Stages", "Breathing patterns as depth indicators");
  footer(s);

  const respData = [
    {
      stage: "Stage I", col: C.green,
      pattern: "Normal",
      rate: "Normal 12-20/min",
      depth: "Normal tidal volume",
      quality: "Regular",
      muscles: "All respiratory muscles active",
      note: "No change from baseline"
    },
    {
      stage: "Stage II", col: "E67E22",
      pattern: "Irregular",
      rate: "Rapid / irregular",
      depth: "Variable — may hold breath",
      quality: "Irregular, jerky",
      muscles: "May have breath-holding or rapid shallow breathing",
      note: "Unpredictable; risky stage"
    },
    {
      stage: "Stage III Pl. I", col: C.plane1,
      pattern: "Automatic",
      rate: "Regular 12-16/min",
      depth: "Good tidal volume",
      quality: "Smooth, regular",
      muscles: "Full thoraco-abdominal movement",
      note: "Safe — automated breathing resumes"
    },
    {
      stage: "Stage III Pl. II", col: C.plane2,
      pattern: "Automatic",
      rate: "Regular, slightly slower",
      depth: "Adequate tidal volume",
      quality: "Smooth",
      muscles: "Intercostals beginning to weaken",
      note: "Still adequate spontaneous ventilation"
    },
    {
      stage: "Stage III Pl. III", col: C.plane3,
      pattern: "Diaphragmatic",
      rate: "Slower, shallow",
      depth: "Reduced — intercostal loss",
      quality: "Abdominal / paradoxical",
      muscles: "Intercostals paralysed; diaphragm only",
      note: "Chest may move inward on inspiration"
    },
    {
      stage: "Stage III Pl. IV", col: C.plane4,
      pattern: "Agonal / Apnea",
      rate: "Very slow → 0",
      depth: "Minimal → none",
      quality: "Gasping or absent",
      muscles: "Diaphragm also failing",
      note: "Immediate IPPV required"
    },
    {
      stage: "Stage IV", col: C.red,
      pattern: "APNEA",
      rate: "0 — no breathing",
      depth: "None",
      quality: "None",
      muscles: "All paralysed",
      note: "Emergency — medullary depression"
    },
  ];

  const headers = ["Stage", "Pattern", "Rate", "Depth", "Quality", "Muscles / Note"];
  const colW = [1.5, 1.2, 1.5, 1.3, 1.2, 2.8];
  const colX = [0.1];
  for (let i = 0; i < colW.length - 1; i++) colX.push(colX[i] + colW[i] + 0.02);

  // Header row
  headers.forEach((h, i) => {
    s.addShape(pres.ShapeType.rect, { x: colX[i], y: 1.18, w: colW[i], h: 0.36, fill: { color: C.teal } });
    s.addText(h, {
      x: colX[i], y: 1.18, w: colW[i], h: 0.36,
      fontSize: 10.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
    });
  });

  respData.forEach((row, ri) => {
    const yy = 1.58 + ri * 0.54;
    const cells = [row.stage, row.pattern, row.rate, row.depth, row.quality, `${row.muscles}  ${row.note}`];
    cells.forEach((cell, ci) => {
      s.addShape(pres.ShapeType.rect, {
        x: colX[ci], y: yy, w: colW[ci], h: 0.5,
        fill: { color: ci === 0 ? row.col : ri % 2 === 0 ? "0C1F30" : "0D2640" }
      });
      s.addText(cell, {
        x: colX[ci] + 0.04, y: yy, w: colW[ci] - 0.08, h: 0.5,
        fontSize: ci === 5 ? 9.5 : 10,
        color: ci === 0 ? C.navy : C.offWhite,
        bold: ci === 0,
        fontFace: "Calibri", valign: "middle", align: ci === 0 ? "center" : "left"
      });
    });
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 11 — REFLEXES CHART
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Reflex Changes Across Stages", "Progressive loss of protective reflexes with increasing depth");
  footer(s);

  const reflexes = [
    "Eyelash reflex",
    "Swallowing reflex",
    "Eyelid reflex",
    "Conjunctival reflex",
    "Corneal reflex",
    "Lacrimation (↑ = light)",
    "Laryngeal reflex",
    "Light reflex (pupillary)",
    "Cough reflex",
    "Gag reflex",
    "Skin (somatic) response",
  ];

  // Status: P = Present, L = Lost, A = Abolished, ↑ = Increased, D = Diminished
  const statusGrid = [
    // StI, StII, SIII-PI, SIII-PII, SIII-PIII, SIII-PIV, StIV
    ["P", "L",  "L",  "L",  "L",  "L",  "L"],  // Eyelash
    ["P", "P",  "L",  "L",  "L",  "L",  "L"],  // Swallowing
    ["P", "P",  "L",  "L",  "L",  "L",  "L"],  // Eyelid
    ["P", "P",  "L*", "L",  "L",  "L",  "L"],  // Conjunctival
    ["P", "P",  "P",  "L",  "L",  "L",  "L"],  // Corneal
    ["N", "N",  "N",  "↑",  "A",  "A",  "A"],  // Lacrimation
    ["P", "P",  "P",  "L",  "L†","L",  "L"],  // Laryngeal
    ["P", "P",  "P",  "D",  "A",  "A",  "A"],  // Light reflex
    ["P", "P",  "P",  "L",  "L",  "L",  "L"],  // Cough
    ["P", "P",  "P",  "L",  "L",  "L",  "L"],  // Gag
    ["P", "P",  "P",  "L",  "L",  "L",  "L"],  // Skin resp
  ];

  const stageLabels = ["Stage I", "Stage II", "Plane I", "Plane II", "Plane III", "Plane IV", "Stage IV"];
  const stageCols =   [C.green,  "E67E22",  C.plane1, C.plane2, C.plane3, C.plane4, C.red];
  const colW = 1.22;
  const firstColW = 1.95;

  // Headers
  s.addShape(pres.ShapeType.rect, { x: 0.1, y: 1.18, w: firstColW, h: 0.42, fill: { color: "0D2137" } });
  s.addText("REFLEX", { x: 0.1, y: 1.18, w: firstColW, h: 0.42, fontSize: 11, bold: true, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle" });

  stageLabels.forEach((label, i) => {
    const cx = 0.1 + firstColW + i * colW + i * 0.02;
    s.addShape(pres.ShapeType.rect, { x: cx, y: 1.18, w: colW, h: 0.42, fill: { color: stageCols[i] } });
    s.addText(label, { x: cx, y: 1.18, w: colW, h: 0.42, fontSize: 10, bold: true, color: C.navy, fontFace: "Calibri", align: "center", valign: "middle" });
  });

  const colorMap = { "P": C.green, "L": C.red, "L*": C.red, "L†": C.red, "A": C.red, "↑": C.gold, "D": "E67E22", "N": C.gray };

  reflexes.forEach((ref, ri) => {
    const yy = 1.63 + ri * 0.36;
    const bgC = ri % 2 === 0 ? "0C1F30" : "0A1828";
    s.addShape(pres.ShapeType.rect, { x: 0.1, y: yy, w: firstColW, h: 0.33, fill: { color: "0A1E30" } });
    s.addText(ref, { x: 0.14, y: yy, w: firstColW - 0.08, h: 0.33, fontSize: 10.5, color: C.gray, bold: false, fontFace: "Calibri", valign: "middle" });

    statusGrid[ri].forEach((val, si) => {
      const cx = 0.1 + firstColW + si * colW + si * 0.02;
      s.addShape(pres.ShapeType.rect, { x: cx, y: yy, w: colW, h: 0.33, fill: { color: bgC } });
      s.addText(val, {
        x: cx, y: yy, w: colW, h: 0.33,
        fontSize: 11, bold: true, color: colorMap[val] || C.offWhite,
        fontFace: "Calibri", align: "center", valign: "middle"
      });
    });
  });

  s.addText("P = Present  |  L = Lost  |  A = Abolished  |  D = Diminishing  |  ↑ = Increased  |  N = Normal  |  * Lost at base of Plane I  |  † Can be provoked by cervical/anal stimulation", {
    x: 0.1, y: 5.25, w: 9.8, h: 0.2,
    fontSize: 8, color: C.gray, fontFace: "Calibri", italic: true
  });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 12 — MODERN ANAESTHESIA vs GUEDEL
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "Guedel's Classification in Modern Context", "Limitations, current relevance, and modern depth monitoring");
  footer(s);

  // Left: Limitations
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.18, w: 4.55, h: 4.1,
    fill: { color: "220A0A" }, line: { color: C.red, width: 1.5 }, rectRadius: 0.14
  });
  s.addShape(pres.ShapeType.rect, { x: 0.2, y: 1.18, w: 4.55, h: 0.45, fill: { color: C.red } });
  s.addText("Limitations of Guedel's Classification", {
    x: 0.2, y: 1.18, w: 4.55, h: 0.45,
    fontSize: 12.5, bold: true, color: C.white, fontFace: "Calibri", align: "center", valign: "middle"
  });
  bulletList(s, [
    "Designed for ETHER — not applicable as described with modern agents",
    "NMBDs eliminate respiratory muscle signs (most important signs masked)",
    "IV agents (propofol, ketamine) cause rapid stage progression — stages blur",
    "'Balanced anaesthesia': IV induction + inhalational maintenance + NMBDs + analgesics",
    "Premedication with morphine + atropine no longer standard",
    "Rapid-sequence induction bypasses Stages I & II entirely",
    "Modern agents (sevoflurane, desflurane) have minimal excitatory Stage II",
    "Concurrent monitoring (BIS, SpO₂, ETCO₂, IBP) supersedes clinical signs",
  ], 0.3, 1.7, 4.35, 3.5, { fontSize: 11 });

  // Right: Relevance + Modern monitoring
  s.addShape(pres.ShapeType.roundRect, {
    x: 5.0, y: 1.18, w: 4.8, h: 1.95,
    fill: { color: "082815" }, line: { color: C.green, width: 1.5 }, rectRadius: 0.14
  });
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.18, w: 4.8, h: 0.45, fill: { color: C.green } });
  s.addText("Remaining Relevance", {
    x: 5.0, y: 1.18, w: 4.8, h: 0.45,
    fontSize: 12.5, bold: true, color: C.navy, fontFace: "Calibri", align: "center", valign: "middle"
  });
  bulletList(s, [
    "Conceptual framework — taught in all anaesthesia training",
    "Inhalational inductions in children (sevoflurane)",
    "Resource-limited settings where monitoring is basic",
    "Gas induction in uncooperative/special needs patients",
    "Understanding depth: still relevant conceptually",
  ], 5.1, 1.68, 4.6, 1.4, { fontSize: 11 });

  s.addShape(pres.ShapeType.roundRect, {
    x: 5.0, y: 3.2, w: 4.8, h: 2.08,
    fill: { color: "061830" }, line: { color: C.gold, width: 1.5 }, rectRadius: 0.14
  });
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 3.2, w: 4.8, h: 0.45, fill: { color: "07484B" } });
  s.addText("Modern Depth of Anaesthesia Monitoring", {
    x: 5.0, y: 3.2, w: 4.8, h: 0.45,
    fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri", align: "center", valign: "middle"
  });
  bulletList(s, [
    "BIS (Bispectral Index): 40-60 = adequate surgical anaesthesia",
    "Entropy (State & Response Entropy)",
    "Narcotrend Index",
    "Auditory evoked potentials (AEP)",
    "End-tidal agent concentration (ETAC): ~0.7-1.3 MAC",
    "PRST score (Pressure, Rate, Sweating, Tears)",
  ], 5.1, 3.72, 4.6, 1.5, { fontSize: 11 });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 13 — EXAM HIGH-YIELD MNEMONICS & SUMMARY
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "High-Yield Points for MD Exam", "Key facts, mnemonics and exam favourites");
  footer(s);

  // Top band
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.18, w: 9.6, h: 0.65,
    fill: { color: "07484B" }, line: { color: C.teal, width: 1 }, rectRadius: 0.1
  });
  s.addText("Stage III is the most important stage — subdivided into 4 planes based on EYE SIGNS + RESPIRATORY MUSCLE SIGNS", {
    x: 0.3, y: 1.22, w: 9.4, h: 0.55,
    fontSize: 12.5, bold: true, color: C.gold, fontFace: "Calibri", valign: "middle", align: "center"
  });

  // 3 columns
  // Col 1: Entry/Exit signs
  s.addShape(pres.ShapeType.roundRect, {
    x: 0.2, y: 1.9, w: 3.1, h: 3.5,
    fill: { color: "0A1E30" }, line: { color: C.tealLt, width: 1 }, rectRadius: 0.12
  });
  s.addText("Entry / Exit Landmarks", {
    x: 0.25, y: 1.93, w: 3.0, h: 0.38,
    fontSize: 12, bold: true, color: C.tealLt, fontFace: "Calibri"
  });
  bulletList(s, [
    "Stage III entry: onset of automatic breathing + eyeball oscillation",
    "Pl I → Pl II: cessation of eyeball movement",
    "Pl II → Pl III: beginning of intercostal paralysis",
    "Pl III → Pl IV: completion of intercostal paralysis",
    "Stage III → IV: apnea (diaphragmatic paralysis)",
    "↑ Lacrimation = LIGHT anaesthesia (Plane II)",
    "Abolished light reflex = Plane III or deeper",
  ], 0.25, 2.34, 3.0, 3.0, { fontSize: 10.5 });

  // Col 2: Common exam questions
  s.addShape(pres.ShapeType.roundRect, {
    x: 3.45, y: 1.9, w: 3.1, h: 3.5,
    fill: { color: "0A1E30" }, line: { color: C.gold, width: 1 }, rectRadius: 0.12
  });
  s.addText("Exam Favourites", {
    x: 3.5, y: 1.93, w: 3.0, h: 0.38,
    fontSize: 12, bold: true, color: C.gold, fontFace: "Calibri"
  });
  bulletList(s, [
    "Plane best for abdominal surgery without NMBDs = PLANE III",
    "Sign of light anaesthesia = increased lacrimation",
    "First eye sign of Stage III = eyeball oscillation",
    "Last reflex to disappear in Stage III = light reflex (Plane III)",
    "Classification based on = DIETHYL ETHER",
    "Eyelash reflex disappears in = Stage II",
    "Stage II is dangerous because = vomiting, laryngospasm",
    "Corneal reflex lost in = Plane II of Stage III",
  ], 3.5, 2.34, 3.0, 3.0, { fontSize: 10.5 });

  // Col 3: Mnemonics
  s.addShape(pres.ShapeType.roundRect, {
    x: 6.7, y: 1.9, w: 3.1, h: 3.5,
    fill: { color: "0A1E30" }, line: { color: C.plane1, width: 1 }, rectRadius: 0.12
  });
  s.addText("Quick Recall", {
    x: 6.75, y: 1.93, w: 3.0, h: 0.38,
    fontSize: 12, bold: true, color: C.plane1, fontFace: "Calibri"
  });
  s.addText([
    { text: "Stage III Planes Span:\n", options: { bold: true, color: C.gold, fontSize: 11, breakLine: true } },
    { text: "Pl I: ", options: { bold: true, color: C.plane1, fontSize: 10.5 } },
    { text: "Breathing → Eyeball stops\n", options: { color: C.offWhite, fontSize: 10.5, breakLine: true } },
    { text: "Pl II: ", options: { bold: true, color: C.plane2, fontSize: 10.5 } },
    { text: "Fixed eye → Intercostal begins\n", options: { color: C.offWhite, fontSize: 10.5, breakLine: true } },
    { text: "Pl III: ", options: { bold: true, color: C.plane3, fontSize: 10.5 } },
    { text: "Intercostal start → complete\n", options: { color: C.offWhite, fontSize: 10.5, breakLine: true } },
    { text: "Pl IV: ", options: { bold: true, color: C.plane4, fontSize: 10.5 } },
    { text: "No intercostal → Apnea\n\n", options: { color: C.offWhite, fontSize: 10.5, breakLine: true } },
    { text: "Pupil dilatation order:\n", options: { bold: true, color: C.gold, fontSize: 11, breakLine: true } },
    { text: "Stage II > enlarges in Pl III > Max in IV\n\n", options: { color: C.offWhite, fontSize: 10.5, breakLine: true } },
    { text: "SAFE sign = ", options: { bold: true, color: C.green, fontSize: 11 } },
    { text: "Eyeball oscillation\n", options: { color: C.offWhite, fontSize: 10.5, breakLine: true } },
    { text: "DANGER sign = ", options: { bold: true, color: C.red, fontSize: 11 } },
    { text: "Max dilatation + apnea", options: { color: C.offWhite, fontSize: 10.5 } },
  ], { x: 6.75, y: 2.34, w: 3.0, h: 3.0, fontFace: "Calibri", valign: "top" });
}

// ══════════════════════════════════════════════════════════════════
// SLIDE 14 — REFERENCES
// ══════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  navyBg(s);
  headerBar(s, "References", "Authoritative sources for this presentation");
  footer(s);

  s.addShape(pres.ShapeType.roundRect, {
    x: 0.5, y: 1.18, w: 9, h: 4.1,
    fill: { color: "0A1E30" }, line: { color: C.teal, width: 1 }, rectRadius: 0.16
  });

  const refs = [
    "1.  Katzung BG et al. Basic and Clinical Pharmacology, 16th Edition. McGraw-Hill; 2021. Chapter: Inhalational Anaesthetics — Guedel's Signs, p.701.",
    "2.  Morgan GE, Mikhail MS. Morgan & Mikhail's Clinical Anesthesiology, 7th Edition. McGraw-Hill; 2022.",
    "3.  Miller RD et al. Miller's Anesthesia, 10th Edition. Elsevier; 2023. Chapter: Monitoring Depth of Anaesthesia.",
    "4.  Barash PG, Cullen BF, Stoelting RK et al. Barash, Cullen, and Stoelting's Clinical Anesthesia, 9th Edition. Wolters Kluwer; 2022.",
    "5.  Guedel AE. Inhalation Anesthesia: A Fundamental Guide. New York: Macmillan; 1937.",
    "6.  Butterworth JF, Mackey DC, Wasnick JD. Morgan & Mikhail's Clinical Anesthesiology. 6th Ed.",
    "7.  StatPearls: Anesthesia Stages. NCBI Bookshelf, NBK557596. National Library of Medicine, 2023.",
    "8.  Wikipedia. Guedel's Classification. Accessed May 2026.",
  ];

  refs.forEach((ref, i) => {
    s.addText(ref, {
      x: 0.7, y: 1.35 + i * 0.46,
      w: 8.6, h: 0.42,
      fontSize: 11, color: C.offWhite, fontFace: "Calibri", valign: "middle"
    });
    if (i < refs.length - 1) {
      s.addShape(pres.ShapeType.rect, { x: 0.7, y: 1.77 + i * 0.46, w: 8.6, h: 0.01, fill: { color: "0D3050" } });
    }
  });
}

// ──────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/guedel-anaesthesia/Guedels_Stages_of_Anaesthesia_MD.pptx" })
  .then(() => console.log("✅ Presentation saved."))
  .catch(e => { console.error("❌ Error:", e); process.exit(1); });
Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.