Give me 20 slides ppt in clean white slides on chapter 14 dysarthria and apraxia of speech from Bradley 8th edition

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

ls /home/daytona/workspace/ 2>/dev/null && mkdir -p /home/daytona/workspace/dysarthria-ppt

Writing File

~/dysarthria-ppt/build.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Dysarthria and Apraxia of Speech";
pres.author = "Bradley and Daroff's Neurology in Clinical Practice, 8th Edition";

// ─── Design tokens ────────────────────────────────────────────────────────────
const WHITE   = "FFFFFF";
const NAVY    = "1A3A5C";   // dominant accent (headers, bars)
const TEAL    = "1D7A8A";   // secondary accent
const LIGHT   = "EFF6FA";   // very light blue-grey background tint for content slides
const GREY    = "5A6A7A";   // body text
const YELLOW  = "F0A500";   // highlight accent
const LTGREY  = "D8E4EF";   // divider lines

// Helper: slide header bar
function addHeader(slide, title, subtitle) {
  // Top navy bar
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 0, w: 10, h: 1.05,
    fill: { color: NAVY }, line: { color: NAVY }
  });
  // Accent teal strip
  slide.addShape(pres.ShapeType.rect, {
    x: 0, y: 1.05, w: 10, h: 0.07,
    fill: { color: TEAL }, line: { color: TEAL }
  });
  slide.addText(title, {
    x: 0.35, y: 0.08, w: 9.3, h: 0.62,
    fontSize: 22, bold: true, color: WHITE,
    fontFace: "Calibri", align: "left", valign: "middle", margin: 0
  });
  if (subtitle) {
    slide.addText(subtitle, {
      x: 0.35, y: 0.66, w: 9.3, h: 0.36,
      fontSize: 12, color: "C8DDE8", italic: true,
      fontFace: "Calibri", align: "left", valign: "middle", margin: 0
    });
  }
  // Footer
  slide.addText("Bradley & Daroff's Neurology in Clinical Practice, 8e  |  Chapter 14", {
    x: 0.2, y: 5.35, w: 9.6, h: 0.2,
    fontSize: 8, color: "AAAAAA", fontFace: "Calibri", align: "right"
  });
}

// Helper: bullet list
function bullets(slide, items, opts) {
  const base = { bullet: { type: "bullet", code: "2022" }, fontSize: 13.5, color: GREY,
                  fontFace: "Calibri", paraSpaceAfter: 5, paraSpaceBefore: 0 };
  const textArr = items.map((item, i) => ({
    text: item,
    options: { ...base, breakLine: i < items.length - 1 }
  }));
  slide.addText(textArr, { ...opts });
}

// Helper: sub-bullet list with heading
function section(slide, heading, items, x, y, w, h) {
  const parts = [];
  parts.push({ text: heading + "\n", options: { bold: true, fontSize: 14, color: NAVY, fontFace: "Calibri", paraSpaceAfter: 3 } });
  items.forEach((item, i) => {
    parts.push({
      text: item,
      options: { bullet: { type: "bullet", code: "2022" }, fontSize: 12.5, color: GREY,
                 fontFace: "Calibri", paraSpaceBefore: 2, paraSpaceAfter: 2,
                 breakLine: i < items.length - 1 }
    });
  });
  slide.addText(parts, { x, y, w, h, valign: "top" });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 1 – TITLE
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  // Full navy background
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: NAVY }, line: { color: NAVY } });
  // Teal accent band
  s.addShape(pres.ShapeType.rect, { x: 0, y: 3.55, w: 10, h: 0.18, fill: { color: TEAL }, line: { color: TEAL } });
  // Yellow left stripe
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: YELLOW }, line: { color: YELLOW } });
  s.addText("Chapter 14", {
    x: 0.5, y: 1.0, w: 9, h: 0.5,
    fontSize: 18, color: "A8C8D8", bold: false, fontFace: "Calibri", align: "left"
  });
  s.addText("Dysarthria and\nApraxia of Speech", {
    x: 0.5, y: 1.55, w: 9, h: 1.8,
    fontSize: 40, bold: true, color: WHITE, fontFace: "Calibri", align: "left"
  });
  s.addText("Bradley & Daroff's Neurology in Clinical Practice, 8th Edition", {
    x: 0.5, y: 3.75, w: 9, h: 0.35,
    fontSize: 13, color: "7BAEC8", fontFace: "Calibri", align: "left", italic: true
  });
  s.addText("Motor Speech Disorders • Classification • Diagnosis • Management", {
    x: 0.5, y: 4.2, w: 9, h: 0.4,
    fontSize: 12, color: "90B8CC", fontFace: "Calibri", align: "left"
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 2 – CHAPTER OVERVIEW / LEARNING OBJECTIVES
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Chapter Overview", "Motor speech disorders — scope and significance");
  s.addText("Learning Objectives", {
    x: 0.4, y: 1.25, w: 9.2, h: 0.4,
    fontSize: 15, bold: true, color: NAVY, fontFace: "Calibri"
  });
  const items = [
    "Define motor speech disorders and distinguish them from aphasia",
    "Classify the six types of dysarthria by lesion site and speech characteristics",
    "Describe apraxia of speech — mechanism, features, and localization",
    "Identify rare motor speech syndromes (aphemia, foreign accent, opercular syndrome)",
    "Apply bedside examination techniques for dysarthria and apraxia",
    "Outline treatment approaches for each disorder"
  ];
  bullets(s, items, { x: 0.4, y: 1.7, w: 9.2, h: 3.5 });
  // Side info box
  s.addShape(pres.ShapeType.rect, {
    x: 7.5, y: 1.2, w: 2.3, h: 1.6,
    fill: { color: LIGHT }, line: { color: LTGREY, width: 1 }
  });
  s.addText("Mayo Clinic Data\n(Duffy, 1995)", {
    x: 7.55, y: 1.22, w: 2.2, h: 0.45,
    fontSize: 10, bold: true, color: NAVY, fontFace: "Calibri", align: "center"
  });
  s.addText("46.3%  Dysarthria\n27.1%  Aphasia\n  9.0%  Other speech\n  4.6%  Apraxia", {
    x: 7.55, y: 1.65, w: 2.2, h: 1.1,
    fontSize: 9.5, color: GREY, fontFace: "Calibri", align: "left"
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 3 – DEFINITION OF MOTOR SPEECH DISORDERS
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Motor Speech Disorders — Definition", "Abnormal articulation without language disorder");

  // Key definition box
  s.addShape(pres.ShapeType.rect, {
    x: 0.3, y: 1.25, w: 9.4, h: 0.85,
    fill: { color: LIGHT }, line: { color: TEAL, width: 1.5 }
  });
  s.addText("Motor speech disorders are syndromes of abnormal articulation without abnormalities of language. If the speech were transcribed into text, the text would read as normal language.", {
    x: 0.45, y: 1.3, w: 9.1, h: 0.75,
    fontSize: 12.5, color: NAVY, fontFace: "Calibri", italic: true, valign: "middle"
  });

  s.addText("Included Disorders", {
    x: 0.35, y: 2.25, w: 9.2, h: 0.35,
    fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri"
  });
  bullets(s, [
    "Dysarthrias — disorders of neuromuscular control of speech muscles",
    "Apraxia of speech — motor programming disorder for speech sequences",
    "Aphemia — isolated loss of spoken language with preserved writing",
    "Foreign accent syndrome — altered prosody mimicking foreign accent",
    "Acquired stuttering — dysfluency from brain lesion",
    "Opercular syndrome — bilateral face/mouth weakness with preserved reflex movement"
  ], { x: 0.35, y: 2.65, w: 9.2, h: 2.7 });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 4 – DYSARTHRIA: DEFINITION & OVERVIEW
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Dysarthria — Definition & Overview", "Neurogenic disorder of speech muscle control");

  s.addShape(pres.ShapeType.rect, {
    x: 0.3, y: 1.25, w: 9.4, h: 0.75,
    fill: { color: LIGHT }, line: { color: TEAL, width: 1.5 }
  });
  s.addText("Dysarthria: abnormal neuromuscular activation of speech muscles affecting speed, strength, timing, range, or accuracy of movements. Most consistent finding = distortion of consonant sounds.", {
    x: 0.45, y: 1.3, w: 9.1, h: 0.65,
    fontSize: 12.5, color: NAVY, fontFace: "Calibri", italic: true, valign: "middle"
  });

  s.addText("Key Features", {
    x: 0.35, y: 2.1, w: 4.4, h: 0.35,
    fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri"
  });
  bullets(s, [
    "Neurogenic — CNS, nerves, NMJ, or muscle",
    "Affects articulation, phonation, breathing, prosody",
    "Structural (tongue/palate/larynx) problems excluded",
    "Total loss = anarthria",
    "Lesion-specific patterns aid neurological localization"
  ], { x: 0.35, y: 2.5, w: 4.5, h: 2.8 });

  s.addText("Bedside Examination", {
    x: 5.2, y: 2.1, w: 4.5, h: 0.35,
    fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri"
  });
  bullets(s, [
    "Repeat single consonants: /p/, /p/, /p/",
    "Shift consonants: /p/, /t/, /k/",
    "Repeat syllable trains & sentences",
    "Identify which consonants cause consistent trouble",
    "Assess voice quality, rate, and prosody"
  ], { x: 5.2, y: 2.5, w: 4.5, h: 2.8 });

  // Divider
  s.addShape(pres.ShapeType.line, { x: 5.1, y: 2.1, w: 0, h: 3.1, line: { color: LTGREY, width: 1 } });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 5 – MAYO CLINIC CLASSIFICATION OF DYSARTHRIA
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Mayo Clinic Classification of Dysarthria", "Duffy (1995) — Six major types");

  // Table header
  const colX = [0.3, 2.2, 4.4, 7.1];
  const colW = [1.85, 2.15, 2.65, 2.65];
  const headers = ["Type", "Lesion Site", "Causes", "Speech Quality"];
  headers.forEach((h, i) => {
    s.addShape(pres.ShapeType.rect, { x: colX[i], y: 1.2, w: colW[i], h: 0.38, fill: { color: NAVY }, line: { color: NAVY } });
    s.addText(h, { x: colX[i]+0.05, y: 1.21, w: colW[i]-0.1, h: 0.36, fontSize: 11.5, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle" });
  });

  const rows = [
    ["Flaccid",      "LMN / NMJ / muscle",    "MG, polymyositis, bulbar polio",       "Breathy, nasal, weak consonants"],
    ["Spastic",      "Bilateral corticobulbar","Bilateral strokes, pseudobulbar palsy","Harsh, strain-strangle, slow, low pitch"],
    ["Ataxic",       "Cerebellum",             "Cerebellar ataxia, MS",                "Scanning, irregular, dysrhythmic"],
    ["Hypokinetic",  "Basal ganglia (SNc)",    "Parkinson's disease",                  "Monotone, rapid rate, reduced loudness"],
    ["Hyperkinetic", "Basal ganglia / BG path","Huntington's, dystonia",               "Irregular, excess movement, variable rate"],
    ["Mixed",        "Multiple sites",         "ALS, Wilson disease, MS",              "Combined features of above types"],
  ];

  const rowColors = [WHITE, LIGHT, WHITE, LIGHT, WHITE, LIGHT];
  rows.forEach((row, ri) => {
    const y = 1.58 + ri * 0.58;
    row.forEach((cell, ci) => {
      s.addShape(pres.ShapeType.rect, { x: colX[ci], y, w: colW[ci], h: 0.56, fill: { color: rowColors[ri] }, line: { color: LTGREY, width: 0.5 } });
      s.addText(cell, { x: colX[ci]+0.05, y: y+0.03, w: colW[ci]-0.1, h: 0.5, fontSize: 10.5, color: GREY, fontFace: "Calibri", valign: "middle" });
    });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 6 – FLACCID & SPASTIC DYSARTHRIA
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Flaccid & Spastic Dysarthria", "Lower and upper motor neuron patterns");

  // Left panel
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.2, w: 4.5, h: 4.1, fill: { color: LIGHT }, line: { color: LTGREY, width: 1 } });
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.2, w: 4.5, h: 0.42, fill: { color: TEAL }, line: { color: TEAL } });
  s.addText("FLACCID DYSARTHRIA", { x: 0.35, y: 1.22, w: 4.4, h: 0.38, fontSize: 12.5, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle" });
  const flaccid = [
    "Lesion: LMN, NMJ, or muscle",
    "Causes: myasthenia gravis, polymyositis, bulbar polio, GBS",
    "Speech: breathy, nasal, weak consonants",
    "MG hallmark: speech begins normal, deteriorates progressively during a paragraph",
    "Bilateral 7th nerve palsies → poor lip articulation",
    "Nasal quality → soft palate weakness (X, IX CN)"
  ];
  bullets(s, flaccid, { x: 0.4, y: 1.7, w: 4.3, h: 3.4 });

  // Right panel
  s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.2, w: 4.5, h: 4.1, fill: { color: LIGHT }, line: { color: LTGREY, width: 1 } });
  s.addShape(pres.ShapeType.rect, { x: 5.2, y: 1.2, w: 4.5, h: 0.42, fill: { color: NAVY }, line: { color: NAVY } });
  s.addText("SPASTIC DYSARTHRIA", { x: 5.25, y: 1.22, w: 4.4, h: 0.38, fontSize: 12.5, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle" });
  const spastic = [
    "Lesion: bilateral corticobulbar tracts",
    "Causes: bilateral strokes, TBI, MS, ALS",
    "Speech: harsh/strain-strangle quality, slow, low pitch, consonant errors",
    "Associated: pseudobulbar palsy — dysphagia, pathological crying/laughing",
    "Exaggerated jaw jerk and gag reflexes",
    "Also: Unilateral UMN dysarthria — mild, transient; mainly consonant imprecision"
  ];
  bullets(s, spastic, { x: 5.3, y: 1.7, w: 4.3, h: 3.4 });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 7 – ATAXIC DYSARTHRIA
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Ataxic Dysarthria", "Cerebellar pattern — scanning, irregular, dysrhythmic speech");

  s.addText("Pathophysiology", {
    x: 0.35, y: 1.2, w: 9.2, h: 0.38,
    fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri"
  });
  s.addShape(pres.ShapeType.line, { x: 0.35, y: 1.6, w: 9.2, h: 0, line: { color: LTGREY, width: 1 } });

  bullets(s, [
    "Lesion: cerebellum or its connections (dentate nucleus, spinocerebellar tracts)",
    "Cerebellar dysfunction impairs timing and coordination of speech muscle groups",
    "Results in irregular breakdowns of articulation and uneven prosody"
  ], { x: 0.35, y: 1.65, w: 9.2, h: 1.1 });

  s.addText("Speech Characteristics", {
    x: 0.35, y: 2.8, w: 9.2, h: 0.38,
    fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri"
  });
  s.addShape(pres.ShapeType.line, { x: 0.35, y: 3.2, w: 9.2, h: 0, line: { color: LTGREY, width: 1 } });

  // Three boxes
  const boxes = [
    { title: "Scanning Speech", body: "Equal, excessive stress on all syllables; robotic, monotone pattern" },
    { title: "Irregular Articulatory Errors", body: "Inconsistent breakdowns; explosive consonants; slurred sounds" },
    { title: "Dysrhythmia & Prosody", body: "Irregular rhythm; excess and equal stress; variable rate" }
  ];
  boxes.forEach((b, i) => {
    const x = 0.3 + i * 3.23;
    s.addShape(pres.ShapeType.rect, { x, y: 3.3, w: 3.1, h: 1.9, fill: { color: LIGHT }, line: { color: TEAL, width: 1 } });
    s.addText(b.title, { x: x+0.1, y: 3.35, w: 2.9, h: 0.4, fontSize: 12, bold: true, color: TEAL, fontFace: "Calibri" });
    s.addText(b.body, { x: x+0.1, y: 3.75, w: 2.9, h: 1.35, fontSize: 11.5, color: GREY, fontFace: "Calibri", valign: "top" });
  });

  s.addText("Common Causes: cerebellar ataxia, multiple sclerosis, alcohol intoxication, paraneoplastic degeneration, stroke affecting cerebellum", {
    x: 0.35, y: 5.3, w: 9.3, h: 0.25,
    fontSize: 9.5, color: GREY, italic: true, fontFace: "Calibri"
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 8 – HYPOKINETIC DYSARTHRIA (PARKINSON'S)
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Hypokinetic Dysarthria", "Parkinsonian speech pattern");

  s.addText("Associated with Parkinson's Disease & Basal Ganglia Hypofunction", {
    x: 0.35, y: 1.2, w: 9.2, h: 0.35,
    fontSize: 13, color: NAVY, bold: false, italic: true, fontFace: "Calibri"
  });

  // Left column
  s.addText("Speech Features", { x: 0.35, y: 1.65, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Monotone — reduced pitch variation (monopitch)",
    "Reduced loudness (hypophonia)",
    "Rapid rate — festinating speech (rate increases as volume decreases)",
    "Short rushes of speech separated by pauses",
    "Imprecise consonants",
    "Reduced facial expression (hypomimia) accompanies",
    "Voice may become tremulous in advanced PD"
  ], { x: 0.35, y: 2.1, w: 4.5, h: 3.2 });

  // Right column
  s.addText("Pathophysiology & Treatment", { x: 5.2, y: 1.65, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Dopamine depletion → reduced amplitude of movement",
    "Bilateral basal ganglia dysfunction (substantia nigra)",
    "Also seen in: MSA, PSP, DLB, drug-induced parkinsonism",
    "Treatment: LSVT (Lee Silverman Voice Treatment) — intensive voice loudness training",
    "Levodopa may partially improve speech",
    "Pallidotomy / DBS have variable effects on speech"
  ], { x: 5.2, y: 2.1, w: 4.5, h: 3.2 });

  s.addShape(pres.ShapeType.line, { x: 5.1, y: 1.65, w: 0, h: 3.6, line: { color: LTGREY, width: 1 } });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 9 – HYPERKINETIC DYSARTHRIA
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Hyperkinetic Dysarthria", "Basal ganglia hyperfunction — excess involuntary movements");

  // Info box
  s.addShape(pres.ShapeType.rect, {
    x: 0.3, y: 1.2, w: 9.4, h: 0.72,
    fill: { color: LIGHT }, line: { color: TEAL, width: 1.5 }
  });
  s.addText("Caused by excess, involuntary movements that interrupt or disrupt voluntary speech movements. Lesions typically in the basal ganglia or their efferent/afferent pathways.", {
    x: 0.45, y: 1.25, w: 9.1, h: 0.62,
    fontSize: 12, color: NAVY, fontFace: "Calibri", italic: true, valign: "middle"
  });

  section(s, "Chorea (e.g., Huntington's Disease)",
    ["Irregular, unpredictable bursts of speech", "Sudden voice stoppages", "Distorted vowels and consonants", "Rate fluctuates unpredictably"],
    0.3, 2.05, 3.1, 3.2);

  section(s, "Dystonia",
    ["Sustained involuntary postures of speech muscles", "Spasmodic dysphonia — focal laryngeal dystonia", "Jaw dystonia (Meige syndrome)", "Prolonged distortions; strained quality"],
    3.5, 2.05, 3.0, 3.2);

  section(s, "Other Causes",
    ["Tics / Tourette syndrome — coprolalia, echolalia", "Tremor (essential, cerebellar) — voice tremor", "Palatal myoclonus — rhythmic palatal click", "Drug-induced dyskinesia (tardive)"],
    6.6, 2.05, 3.1, 3.2);
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 10 – MIXED DYSARTHRIA & ALS
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Mixed Dysarthria", "Multi-site lesions — combined speech features");

  s.addText("Mixed dysarthria occurs when multiple neurological systems affecting speech are simultaneously damaged, producing a combination of dysarthric features.", {
    x: 0.35, y: 1.2, w: 9.3, h: 0.58,
    fontSize: 12.5, color: GREY, fontFace: "Calibri", italic: true
  });

  const mixedData = [
    {
      disease: "ALS\n(Amyotrophic Lateral Sclerosis)",
      types: "Flaccid + Spastic",
      features: "Combined UMN (spastic) + LMN (flaccid) features; progressive anarthria common"
    },
    {
      disease: "Multiple Sclerosis",
      types: "Ataxic + Spastic",
      features: "Scanning, strain-strangle quality; varies with relapse"
    },
    {
      disease: "Wilson Disease",
      types: "Ataxic + Hypokinetic\n+ Dyskinetic",
      features: "Dysarthria often an early symptom; combined basal ganglia + cerebellar"
    },
    {
      disease: "TBI",
      types: "Any combination",
      features: "Depends on lesion distribution; often spastic + ataxic"
    }
  ];

  const colXm = [0.3, 3.0, 5.3, 0]; // last col spans rest
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.88, w: 9.4, h: 0.4, fill: { color: NAVY }, line: { color: NAVY } });
  ["Disease", "Mixed Types", "Clinical Features"].forEach((h, i) => {
    const xs = [0.35, 3.05, 5.35];
    const ws = [2.6, 2.2, 4.2];
    s.addText(h, { x: xs[i], y: 1.9, w: ws[i], h: 0.36, fontSize: 11.5, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle" });
  });

  mixedData.forEach((row, ri) => {
    const y = 2.32 + ri * 0.7;
    const bg = ri % 2 === 0 ? WHITE : LIGHT;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.4, h: 0.68, fill: { color: bg }, line: { color: LTGREY, width: 0.5 } });
    s.addText(row.disease, { x: 0.35, y: y+0.04, w: 2.6, h: 0.6, fontSize: 10.5, bold: true, color: NAVY, fontFace: "Calibri", valign: "middle" });
    s.addText(row.types, { x: 3.05, y: y+0.04, w: 2.2, h: 0.6, fontSize: 10.5, color: TEAL, fontFace: "Calibri", valign: "middle" });
    s.addText(row.features, { x: 5.35, y: y+0.04, w: 4.2, h: 0.6, fontSize: 10.5, color: GREY, fontFace: "Calibri", valign: "middle" });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 11 – APRAXIA OF SPEECH: DEFINITION & MECHANISM
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Apraxia of Speech", "Motor programming disorder — not a primary motor deficit");

  s.addShape(pres.ShapeType.rect, {
    x: 0.3, y: 1.2, w: 9.4, h: 0.82,
    fill: { color: LIGHT }, line: { color: YELLOW, width: 2 }
  });
  s.addText("Apraxia of speech is a disorder of the programming of articulation of sequences of phonemes, especially consonants. The motor speech system makes errors in selection of the motor programs needed for articulation, not in the muscles themselves. (Ziegler et al., 2012)", {
    x: 0.45, y: 1.24, w: 9.1, h: 0.74,
    fontSize: 12, color: NAVY, fontFace: "Calibri", italic: true, valign: "middle"
  });

  // Two column
  s.addText("Key Characteristics", { x: 0.35, y: 2.15, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Inconsistent articulatory errors (unlike consistent distortions of dysarthria)",
    "Errors worse on initial phonemes of a word",
    "Errors worse with polysyllabic words",
    "Substitutions and distortions of consonants",
    "Patient aware of errors — attempts at self-correction",
    "Prosodic abnormalities — slow, halting speech"
  ], { x: 0.35, y: 2.58, w: 4.5, h: 2.8 });

  s.addText("Localization", { x: 5.2, y: 2.15, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Broca's area (inferior frontal gyrus, left hemisphere)",
    "Insula — controversy: Dronkers (1996) proposed left insula as key site",
    "Premotor cortex involvement",
    "Pure apraxia of speech with small posterior Broca lesion",
    "Often co-occurs with Broca's aphasia",
    "Left anterior lesions → aphemia (pure apraxia variant)"
  ], { x: 5.2, y: 2.58, w: 4.5, h: 2.8 });
  s.addShape(pres.ShapeType.line, { x: 5.1, y: 2.15, w: 0, h: 3.1, line: { color: LTGREY, width: 1 } });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 12 – DYSARTHRIA vs. APRAXIA — COMPARISON
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Dysarthria vs. Apraxia of Speech", "Differential diagnosis — key distinguishing features");

  const compareRows = [
    ["Feature", "Dysarthria", "Apraxia of Speech"],
    ["Mechanism", "Neuromuscular control deficit", "Motor programming deficit"],
    ["Primary motor deficit", "Present — muscle weakness/spasticity/rigidity", "Absent — muscles are normal at rest"],
    ["Error pattern", "Consistent distortions of specific phonemes", "Inconsistent errors — vary attempt to attempt"],
    ["Error type", "Distortions, omissions", "Substitutions, distortions, additions"],
    ["Consonant position", "Any position affected consistently", "Initial consonants worse"],
    ["Word length effect", "Proportional to length", "Disproportionately worse with polysyllables"],
    ["Prosody", "Varies by type", "Slow, halting; excessive equal stress"],
    ["Self-correction", "Rarely aware of all errors", "Often aware; multiple attempts to correct"],
    ["Lesion site", "UMN/LMN/BG/CB/muscle", "Left Broca's area, insula, premotor cortex"],
  ];

  compareRows.forEach((row, ri) => {
    const y = 1.2 + ri * 0.42;
    const isHeader = ri === 0;
    const bg = isHeader ? NAVY : (ri % 2 === 0 ? WHITE : LIGHT);
    const textColor = isHeader ? WHITE : GREY;
    const colW2 = [2.0, 3.7, 3.7];
    const colX2 = [0.3, 2.3, 6.0];
    row.forEach((cell, ci) => {
      s.addShape(pres.ShapeType.rect, { x: colX2[ci], y, w: colW2[ci], h: 0.4, fill: { color: bg }, line: { color: LTGREY, width: 0.5 } });
      s.addText(cell, {
        x: colX2[ci]+0.06, y: y+0.03, w: colW2[ci]-0.12, h: 0.34,
        fontSize: isHeader ? 11 : 10.5, bold: isHeader || ci === 0,
        color: ci === 0 && !isHeader ? NAVY : textColor,
        fontFace: "Calibri", valign: "middle"
      });
    });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 13 – TESTING FOR DYSARTHRIA AND APRAXIA
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Clinical Testing for Motor Speech Disorders", "Bedside examination protocol");

  s.addText("Testing for Dysarthria", { x: 0.35, y: 1.2, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Repeat single consonants: /p/, /p/, /p/ (bilabial)",
    "Shift consonants: /p/-/t/-/k/ (alternating motor rate)",
    "Repeat sentences: 'The quick brown fox...'",
    "Assess: voice quality, rate, loudness, nasality",
    "Count to 20 — note deterioration (myasthenia test)",
    "Assess jaw, tongue, soft palate reflexes",
    "Check jaw jerk, gag reflex, tongue strength/bulk"
  ], { x: 0.35, y: 1.65, w: 4.5, h: 3.0 });

  s.addText("Testing for Apraxia of Speech", { x: 5.2, y: 1.2, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Repeat: /pa/-/ta/-/ka/ sequences",
    "Repeat polysyllabic words: 'artillery', 'catastrophe'",
    "Repeat tongue twisters for consonant sequences",
    "Look for inconsistent errors across trials",
    "Observe groping, self-correction attempts",
    "Compare spontaneous to imitative speech (worse on imitation = apraxia)",
    "Assess writing — preserved if pure motor speech disorder"
  ], { x: 5.2, y: 1.65, w: 4.5, h: 3.0 });

  s.addShape(pres.ShapeType.line, { x: 5.1, y: 1.2, w: 0, h: 3.5, line: { color: LTGREY, width: 1 } });

  // Clinical note box
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 4.85, w: 9.4, h: 0.45, fill: { color: LIGHT }, line: { color: YELLOW, width: 1 } });
  s.addText("Key Principle: In pure motor speech disorders, written language and comprehension are preserved. If transcribed, the speech would read as normal language.", {
    x: 0.45, y: 4.88, w: 9.1, h: 0.4,
    fontSize: 10.5, color: NAVY, fontFace: "Calibri", italic: true, valign: "middle"
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 14 – APHEMIA
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Aphemia", "Rare pure motor speech syndrome — isolated loss of spoken language");

  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.2, w: 9.4, h: 0.82, fill: { color: LIGHT }, line: { color: TEAL, width: 1.5 } });
  s.addText("Aphemia (\"pure word mutism\") is an isolated loss of spoken language with complete preservation of writing and language comprehension. Broca originally used the term 'aphémie' to describe it before it became known as Broca's aphasia — the two are now distinguished.", {
    x: 0.45, y: 1.24, w: 9.1, h: 0.74,
    fontSize: 12, color: NAVY, fontFace: "Calibri", italic: true, valign: "middle"
  });

  s.addText("Clinical Features", { x: 0.35, y: 2.15, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Patient becomes mute or severely dysarthric/apraxic",
    "Writing is normal",
    "Language comprehension is intact",
    "No agrammatism or word-finding errors in writing",
    "May produce whispered speech with effort",
    "Often recovers significantly over weeks"
  ], { x: 0.35, y: 2.58, w: 4.5, h: 2.7 });

  s.addText("Lesion & Differentiation", { x: 5.2, y: 2.15, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Small lesion in posterior portion of Broca's area (BA44/45)",
    "Also: subcortical lesions near motor speech cortex",
    "Differs from Broca's aphasia: no agrammatism in writing",
    "Differs from dysarthria: no neuromuscular deficit",
    "Differs from apraxia: typically more severe initial mutism",
    "Some consider aphemia a severe form of apraxia of speech"
  ], { x: 5.2, y: 2.58, w: 4.5, h: 2.7 });
  s.addShape(pres.ShapeType.line, { x: 5.1, y: 2.15, w: 0, h: 3.1, line: { color: LTGREY, width: 1 } });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 15 – FOREIGN ACCENT SYNDROME & ACQUIRED STUTTERING
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Foreign Accent Syndrome & Acquired Stuttering", "Rare motor speech presentations");

  // Foreign accent panel
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.2, w: 9.4, h: 0.44, fill: { color: NAVY }, line: { color: NAVY } });
  s.addText("FOREIGN ACCENT SYNDROME", { x: 0.35, y: 1.22, w: 9.3, h: 0.4, fontSize: 12.5, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle" });

  bullets(s, [
    "Patient's speech sounds like a foreign accent to listeners, even though the patient has not been exposed to that accent",
    "Caused by subtle prosodic and phonemic alterations — altered vowel length, pitch contour, consonant substitutions",
    "Lesions: typically left hemisphere — frontal, parietal, or subcortical",
    "Not a true accent — listeners subjectively perceive phonetic changes as foreign",
    "Reported after stroke, MS, TBI, and rarely migraine"
  ], { x: 0.35, y: 1.7, w: 9.2, h: 1.65 });

  // Acquired stuttering panel
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 3.45, w: 9.4, h: 0.44, fill: { color: TEAL }, line: { color: TEAL } });
  s.addText("ACQUIRED (NEUROGENIC) STUTTERING", { x: 0.35, y: 3.47, w: 9.3, h: 0.4, fontSize: 12.5, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle" });

  bullets(s, [
    "Sudden onset dysfluency after brain injury — repetitions and prolongations of sounds/syllables",
    "Differs from developmental stuttering: no secondary behaviors, no adaptation effect, errors throughout word not just initially",
    "Lesions: frontal lobes, basal ganglia, thalamus, cerebellum — bilateral lesions more common",
    "Also caused by: stroke, TBI, drug toxicity (e.g., theophylline, benzodiazepines), psychogenic",
    "Treatment: speech therapy; some cases resolve spontaneously"
  ], { x: 0.35, y: 3.95, w: 9.2, h: 1.55 });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 16 – OPERCULAR SYNDROME
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Opercular Syndrome (Foix-Chavany-Marie)", "Bilateral opercular lesions — voluntary vs. reflex dissociation");

  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.2, w: 9.4, h: 0.8, fill: { color: LIGHT }, line: { color: TEAL, width: 1.5 } });
  s.addText("The opercular syndrome results from bilateral lesions of the fronto-parietal opercula. The defining feature is the dissociation between voluntary and reflex movements of the face, tongue, and jaw — a pattern called cortical-subcortical dissociation.", {
    x: 0.45, y: 1.24, w: 9.1, h: 0.72,
    fontSize: 12, color: NAVY, fontFace: "Calibri", italic: true, valign: "middle"
  });

  s.addText("Clinical Features", { x: 0.35, y: 2.1, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Anarthria — complete inability to speak voluntarily",
    "Bilateral facial, lingual, and jaw paralysis",
    "Preserved reflex movements (chewing, swallowing of involuntary nature)",
    "Patient may laugh or cry reflexively despite voluntary paralysis",
    "Preserved written language and comprehension",
    "No limb weakness in pure form"
  ], { x: 0.35, y: 2.55, w: 4.5, h: 2.8 });

  s.addText("Lesions & Etiology", { x: 5.2, y: 2.1, w: 4.5, h: 0.38, fontSize: 14, bold: true, color: NAVY, fontFace: "Calibri" });
  bullets(s, [
    "Bilateral involvement of frontal-parietal opercula required",
    "Usually sequential strokes — second often in opposite hemisphere",
    "Also: bilateral perisylvian polymicrogyria (congenital form)",
    "MRI shows bilateral infarcts or developmental cortical anomalies",
    "Prognosis for speech recovery: poor in severe form",
    "AAC (augmentative communication) often needed"
  ], { x: 5.2, y: 2.55, w: 4.5, h: 2.8 });
  s.addShape(pres.ShapeType.line, { x: 5.1, y: 2.1, w: 0, h: 3.2, line: { color: LTGREY, width: 1 } });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 17 – PRIMARY PROGRESSIVE APRAXIA OF SPEECH
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Primary Progressive Apraxia of Speech", "Neurodegenerative isolated motor speech syndrome");

  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.2, w: 9.4, h: 0.72, fill: { color: LIGHT }, line: { color: YELLOW, width: 2 } });
  s.addText("Primary Progressive Apraxia of Speech (PPAOS) is a neurodegenerative syndrome characterized by isolated, progressive deterioration of speech motor programming, without significant language or cognitive impairment early in the course.", {
    x: 0.45, y: 1.24, w: 9.1, h: 0.64,
    fontSize: 12, color: NAVY, fontFace: "Calibri", italic: true, valign: "middle"
  });

  bullets(s, [
    "Presents with slowly progressive articulatory errors, prosodic disturbances, and halting speech",
    "Motor speech features: inconsistent phoneme errors, groping, abnormal prosody — classic apraxia features",
    "Language (naming, comprehension, grammar) preserved early; may be affected later",
    "Pathology: often tauopathy (PSP or CBD tau) involving SMA and premotor cortex",
    "Neuroimaging: hypometabolism and atrophy of left premotor/SMA regions",
    "Distinguished from nonfluent/agrammatic PPA which involves aphasia",
    "Distinguished from progressive dysarthria syndromes (PSP, MSA) by preservation of language",
    "No effective disease-modifying treatment; speech-language therapy for management"
  ], { x: 0.35, y: 2.0, w: 9.3, h: 3.3 });

  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 5.2, w: 9.4, h: 0.25, fill: { color: LIGHT }, line: { color: LTGREY, width: 0.5 } });
  s.addText("Reference: Josephs et al. (2014) — clinical characterization of PPAOS as a distinct syndrome", {
    x: 0.45, y: 5.22, w: 9.1, h: 0.22, fontSize: 9, color: GREY, fontFace: "Calibri", italic: true
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 18 – NEUROANATOMY OF SPEECH PRODUCTION
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Neuroanatomy of Speech Production", "Key pathways and lesion correlates");

  const pathways = [
    { structure: "Primary Motor Cortex\n(M1, Area 4)", role: "Direct motor execution of face/tongue/larynx via corticobulbar tract", lesion: "UMN dysarthria (unilateral: mild; bilateral: spastic)" },
    { structure: "Broca's Area\n(BA 44/45, L IFG)", role: "Motor programming of phoneme sequences; syntactic processing", lesion: "Apraxia of speech; Broca's aphasia; aphemia" },
    { structure: "Insula\n(Left Anterior)", role: "Proposed role in motor speech programming (Dronkers, 1996)", lesion: "Apraxia of speech (controversial localization)" },
    { structure: "Cerebellum", role: "Timing, coordination, and smoothing of speech movements", lesion: "Ataxic dysarthria — scanning, irregular speech" },
    { structure: "Basal Ganglia\n(Striatum/GPi/SNr)", role: "Modulation of cortical motor programs; amplitude control", lesion: "Hypokinetic (PD) or hyperkinetic (HD) dysarthria" },
    { structure: "Bulbar/LMN\n(CN V, VII, IX, X, XII)", role: "Direct innervation of jaw, face, palate, larynx, tongue", lesion: "Flaccid dysarthria" },
  ];

  pathways.forEach((row, ri) => {
    const y = 1.25 + ri * 0.68;
    const bg = ri % 2 === 0 ? WHITE : LIGHT;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 2.3, h: 0.66, fill: { color: ri === 0 ? NAVY : (ri === 1 ? TEAL : bg) }, line: { color: LTGREY, width: 0.5 } });
    s.addText(row.structure, { x: 0.35, y: y+0.03, w: 2.2, h: 0.6, fontSize: 10.5, bold: true, color: ri < 2 ? WHITE : NAVY, fontFace: "Calibri", valign: "middle" });
    s.addShape(pres.ShapeType.rect, { x: 2.6, y, w: 4.3, h: 0.66, fill: { color: bg }, line: { color: LTGREY, width: 0.5 } });
    s.addText(row.role, { x: 2.65, y: y+0.04, w: 4.2, h: 0.58, fontSize: 10.5, color: GREY, fontFace: "Calibri", valign: "middle" });
    s.addShape(pres.ShapeType.rect, { x: 6.9, y, w: 2.8, h: 0.66, fill: { color: bg }, line: { color: LTGREY, width: 0.5 } });
    s.addText(row.lesion, { x: 6.95, y: y+0.04, w: 2.7, h: 0.58, fontSize: 10.5, color: TEAL, fontFace: "Calibri", valign: "middle" });
  });

  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.25, w: 9.4, h: 0.0 }); // placeholder
  // Column headers
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.18, w: 9.4, h: 0.0 });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 19 – MANAGEMENT & TREATMENT
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: WHITE };
  addHeader(s, "Management of Motor Speech Disorders", "Disorder-specific therapeutic approaches");

  const treatments = [
    {
      type: "Flaccid Dysarthria",
      color: TEAL,
      items: ["Treat underlying cause (immunotherapy for MG/CIDP)", "Palatal lift prosthesis for velopharyngeal insufficiency", "Speech therapy: respiratory/phonatory exercises"]
    },
    {
      type: "Spastic Dysarthria",
      color: NAVY,
      items: ["Address bilateral UMN cause (stroke rehab)", "Rate control techniques", "Prosthetic and AAC devices if severe"]
    },
    {
      type: "Ataxic Dysarthria",
      color: "2E8B57",
      items: ["Treat underlying cause (MS, alcohol)", "Rate reduction and rhythm techniques", "Delayed auditory feedback (DAF) devices"]
    },
    {
      type: "Hypokinetic (PD)",
      color: "7B3FA0",
      items: ["LSVT LOUD — intensive loudness training", "Levodopa optimization", "DBS (subthalamic nucleus) — variable speech effects"]
    },
    {
      type: "Apraxia of Speech",
      color: "C45000",
      items: ["Articulatory-kinematic treatment", "Rate/rhythm strategies (metronome, DAF)", "Integral stimulation: watch me, listen, repeat (8-step continuum)"]
    },
    {
      type: "Severe / Progressive",
      color: GREY,
      items: ["AAC devices (speech-generating devices)", "Low-tech: alphabet/word boards", "Eye-tracking AAC for ALS, opercular syndrome"]
    }
  ];

  treatments.forEach((t, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.3 + col * 3.23;
    const y = 1.2 + row * 2.1;
    s.addShape(pres.ShapeType.rect, { x, y, w: 3.1, h: 2.0, fill: { color: LIGHT }, line: { color: LTGREY, width: 1 } });
    s.addShape(pres.ShapeType.rect, { x, y, w: 3.1, h: 0.38, fill: { color: t.color }, line: { color: t.color } });
    s.addText(t.type, { x: x+0.08, y: y+0.02, w: 2.94, h: 0.34, fontSize: 11, bold: true, color: WHITE, fontFace: "Calibri", valign: "middle" });
    const txtItems = t.items.map((item, ii) => ({
      text: item,
      options: { bullet: { type: "bullet", code: "2022" }, fontSize: 10.5, color: GREY, fontFace: "Calibri",
                 paraSpaceBefore: 3, paraSpaceAfter: 2, breakLine: ii < t.items.length - 1 }
    }));
    s.addText(txtItems, { x: x+0.1, y: y+0.42, w: 2.9, h: 1.5, valign: "top" });
  });
}

// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
// SLIDE 20 – SUMMARY & KEY TAKEAWAYS
// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
{
  const s = pres.addSlide();
  s.background = { color: NAVY };
  // Bottom teal strip
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.3, w: 10, h: 0.325, fill: { color: TEAL }, line: { color: TEAL } });
  // Yellow left stripe
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.18, h: 5.625, fill: { color: YELLOW }, line: { color: YELLOW } });

  s.addText("Key Takeaways", {
    x: 0.4, y: 0.25, w: 9.2, h: 0.5,
    fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri"
  });

  const points = [
    ["Motor speech disorders", "Abnormal articulation with preserved language — dysarthria, apraxia, aphemia, foreign accent, stuttering, opercular syndrome"],
    ["6 types of dysarthria", "Flaccid (LMN), Spastic (bilateral UMN), Ataxic (CB), Hypokinetic (BG↓), Hyperkinetic (BG↑), Mixed — each localizes a distinct lesion"],
    ["Apraxia of speech", "Inconsistent consonant errors worse at word onset and with polysyllables; programming disorder; left Broca's area/insula"],
    ["Key clinical test", "If transcribed, motor speech disorder text reads normally — language is intact; writing preserved in pure cases"],
    ["Differential diagnosis", "Dysarthria = consistent distortions; Apraxia = inconsistent substitutions; Aphemia = isolated mutism + preserved writing"],
    ["Treatment", "Treat underlying cause + speech therapy; LSVT for PD; AAC for severe/progressive cases"]
  ];

  points.forEach((p, i) => {
    const y = 0.85 + i * 0.73;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 0.28, h: 0.42, fill: { color: YELLOW }, line: { color: YELLOW } });
    s.addText(p[0], { x: 0.65, y: y+0.02, w: 2.6, h: 0.38, fontSize: 11.5, bold: true, color: YELLOW, fontFace: "Calibri", valign: "middle" });
    s.addText(p[1], { x: 3.3, y: y+0.02, w: 6.4, h: 0.38, fontSize: 11, color: "D0E8F0", fontFace: "Calibri", valign: "middle" });
  });

  s.addText("Bradley & Daroff's Neurology in Clinical Practice, 8th Edition  |  Chapter 14: Dysarthria and Apraxia of Speech", {
    x: 0.3, y: 5.33, w: 9.4, h: 0.22,
    fontSize: 9, color: WHITE, fontFace: "Calibri", align: "center"
  });
}

// ─── Write file ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/dysarthria-ppt/Dysarthria_Apraxia_Ch14.pptx" })
  .then(() => console.log("✅ PPTX saved successfully"))
  .catch(err => { console.error("❌ Error:", err); process.exit(1); });
Running Command

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

Running Command

ls -lh /home/daytona/workspace/dysarthria-ppt/

Your presentation is ready! Here's the download link:

Dysarthria Apraxia Ch14

Presentation · PPTX


What's inside — all 20 slides sourced from Bradley & Daroff, 8th Edition, Chapter 14:
#Slide Title
1Title slide — Chapter 14: Dysarthria and Apraxia of Speech
2Chapter Overview & Learning Objectives (with Mayo Clinic prevalence data)
3Motor Speech Disorders — Definition & Scope
4Dysarthria — Definition, Key Features & Bedside Exam
5Mayo Clinic Classification Table (all 6 types)
6Flaccid & Spastic Dysarthria — side-by-side comparison
7Ataxic Dysarthria — three-panel feature breakdown
8Hypokinetic Dysarthria (Parkinson's)
9Hyperkinetic Dysarthria (chorea, dystonia, tics)
10Mixed Dysarthria — ALS, MS, Wilson disease table
11Apraxia of Speech — Definition, Mechanism, Localization
12Dysarthria vs. Apraxia — full comparison table
13Clinical Testing Protocol for both disorders
14Aphemia — pure word mutism
15Foreign Accent Syndrome & Acquired Stuttering
16Opercular Syndrome (Foix-Chavany-Marie)
17Primary Progressive Apraxia of Speech (PPAOS)
18Neuroanatomy of Speech Production — lesion correlates table
19Management & Treatment (6-panel grid by disorder type)
20Summary & Key Takeaways (dark navy closing slide)
Design: Clean white slides with a navy/teal/yellow accent palette, structured tables, colored info boxes, and consistent section headers.
This is a shared conversation. Sign in to Orris to start your own chat.