make a ppt on this with title Hand Functions

Reading File
Reading File
Reading File
Running Command

cd /home/daytona/workspace/attachments/6a03ed4f-a717-4dd4-bcc5-ce7419ac8b1a && python -m markitdown "Hand functions.pdf" 2>&1 | head -300

Running Command

cd /home/daytona/workspace/attachments/6a03ed4f-a717-4dd4-bcc5-ce7419ac8b1a && python3 -c " import pdfplumber with pdfplumber.open('Hand functions.pdf') as pdf: for i, page in enumerate(pdf.pages): print(f'=== PAGE {i+1} ===') print(page.extract_text()) print() " 2>&1

Running Command

mkdir -p /home/daytona/workspace/hand-functions-ppt && ls /home/daytona/workspace/hand-functions-ppt/

Writing File

~/hand-functions-ppt/create_hand_functions.js

const pptxgen = require("pptxgenjs");

let pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Hand Functions";

// Color palette: Deep navy + warm white + gold accent + teal
const DARK_BG = "0D1B2A";
const MID_BG = "1B2E45";
const ACCENT_GOLD = "E8B84B";
const ACCENT_TEAL = "2EC4B6";
const WHITE = "FFFFFF";
const LIGHT_GRAY = "D6E4F0";
const BODY_TEXT = "C8D8E8";
const CARD_BG = "162438";

// ─── SLIDE 1: TITLE SLIDE ───
{
  let sl = pres.addSlide();
  // Dark gradient background
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  // Gold accent bar on the left
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.12, h: 5.625, fill: { color: ACCENT_GOLD } });
  // Decorative horizontal line
  sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 2.7, w: 5.5, h: 0.04, fill: { color: ACCENT_GOLD } });
  // Subtle background accent shape
  sl.addShape(pres.ShapeType.rect, { x: 7.0, y: 0, w: 3.0, h: 5.625, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 6.9, y: 0, w: 0.06, h: 5.625, fill: { color: ACCENT_TEAL } });

  // Title
  sl.addText("HAND FUNCTIONS", {
    x: 0.4, y: 1.3, w: 6.3, h: 1.1,
    fontSize: 42, bold: true, color: WHITE,
    fontFace: "Calibri", charSpacing: 4, margin: 0
  });
  // Subtitle
  sl.addText("Anatomy, Biomechanics & Prehension Patterns", {
    x: 0.4, y: 2.8, w: 6.3, h: 0.55,
    fontSize: 18, color: ACCENT_GOLD,
    fontFace: "Calibri", italic: true, margin: 0
  });
  // Description
  sl.addText("A comprehensive overview of hand anatomy, joint mechanics,\nnerve supply, and functional grasp patterns for Occupational Therapy", {
    x: 0.4, y: 3.5, w: 6.3, h: 0.9,
    fontSize: 13, color: BODY_TEXT,
    fontFace: "Calibri", margin: 0
  });
  // Right panel label
  sl.addText("OCCUPATIONAL\nTHERAPY", {
    x: 7.1, y: 2.1, w: 2.6, h: 1.2,
    fontSize: 20, bold: true, color: ACCENT_TEAL,
    fontFace: "Calibri", align: "center", charSpacing: 2, margin: 0
  });
  sl.addText("Hand & Upper Extremity\nRehabilitation", {
    x: 7.1, y: 3.4, w: 2.6, h: 0.7,
    fontSize: 11, color: LIGHT_GRAY,
    fontFace: "Calibri", align: "center", margin: 0
  });
}

// ─── SLIDE 2: OVERVIEW / CONTENTS ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.75, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.75, w: 10, h: 0.05, fill: { color: ACCENT_GOLD } });

  sl.addText("OVERVIEW", {
    x: 0.4, y: 0.1, w: 9, h: 0.55,
    fontSize: 26, bold: true, color: WHITE,
    fontFace: "Calibri", charSpacing: 3, margin: 0
  });

  const topics = [
    ["01", "Anatomical Structures", "Wrist, Metacarpals, Thumb, IP Joints, Forearm"],
    ["02", "Ligaments & Muscles", "Wrist ligaments, Extrinsic & Intrinsic muscle groups"],
    ["03", "Nerve & Blood Supply", "Radial, Median, Ulnar nerves; Arterial arches"],
    ["04", "Skin & Surface Anatomy", "Dorsal/palmar skin, Key landmarks"],
    ["05", "Prehension Patterns", "Lateral, Palmar, Tip, Cylindrical, Spherical, Hook, Intrinsic+"],
    ["06", "Biomechanics of Splinting", "Force mechanics, Tenodesis, Splint design principles"],
  ];

  const colW = 4.5;
  const startX = [0.3, 5.2];
  topics.forEach((t, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = startX[col];
    const y = 1.0 + row * 1.45;

    sl.addShape(pres.ShapeType.rect, { x, y, w: colW, h: 1.2, fill: { color: CARD_BG }, line: { color: ACCENT_TEAL, width: 0.5 } });
    sl.addShape(pres.ShapeType.rect, { x, y, w: 0.55, h: 1.2, fill: { color: ACCENT_TEAL } });

    sl.addText(t[0], { x: x + 0.02, y: y + 0.3, w: 0.51, h: 0.55, fontSize: 22, bold: true, color: DARK_BG, fontFace: "Calibri", align: "center", margin: 0 });
    sl.addText(t[1], { x: x + 0.65, y: y + 0.1, w: colW - 0.75, h: 0.45, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
    sl.addText(t[2], { x: x + 0.65, y: y + 0.55, w: colW - 0.75, h: 0.5, fontSize: 10.5, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
  });
}

// ─── SLIDE 3: WRIST ANATOMY ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 3.5, h: 5.625, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 3.5, y: 0, w: 0.05, h: 5.625, fill: { color: ACCENT_GOLD } });

  // Left panel - section label
  sl.addText("01", { x: 0.2, y: 0.3, w: 3.1, h: 0.8, fontSize: 52, bold: true, color: ACCENT_GOLD, fontFace: "Calibri", margin: 0 });
  sl.addText("WRIST\nANATOMY", { x: 0.2, y: 1.1, w: 3.1, h: 1.2, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 2, margin: 0 });
  sl.addShape(pres.ShapeType.rect, { x: 0.2, y: 2.35, w: 2.8, h: 0.04, fill: { color: ACCENT_GOLD } });

  const keyFacts = [
    "27 bones in hand & wrist",
    "8 carpal bones in 2 rows",
    "Proximal row: Scaphoid,\nLunate, Triquetrum",
    "Distal row: Trapezium,\nTrapezoid, Capitate, Hamate",
  ];
  keyFacts.forEach((f, i) => {
    sl.addShape(pres.ShapeType.ellipse, { x: 0.25, y: 2.6 + i * 0.72, w: 0.15, h: 0.15, fill: { color: ACCENT_GOLD } });
    sl.addText(f, { x: 0.5, y: 2.53 + i * 0.72, w: 2.8, h: 0.55, fontSize: 10.5, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
  });

  // Right content
  sl.addText("WRIST COMPLEX", { x: 3.7, y: 0.15, w: 6, h: 0.5, fontSize: 22, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
  sl.addShape(pres.ShapeType.rect, { x: 3.7, y: 0.65, w: 6, h: 0.03, fill: { color: ACCENT_TEAL } });

  const sections = [
    {
      title: "Structure & Mobility",
      body: "The wrist allows the greatest arc of motion of any joint complex except the ankle. All motion is component motion occurring in more than one anatomical plane — no pure or isolated motions exist."
    },
    {
      title: "Key Motions",
      body: "Wrist extension → accompanies radial deviation & supination\nWrist flexion → accompanies ulnar deviation & pronation\nThe distal carpal row articulates firmly with metacarpals."
    },
    {
      title: "Clinical Relevance",
      body: "Any disease altering the wrist complex (e.g., rheumatoid arthritis) results in dysfunction. Even a simple wrist splint alters the functional abilities of the hand."
    },
  ];
  sections.forEach((s, i) => {
    const y = 0.85 + i * 1.55;
    sl.addShape(pres.ShapeType.rect, { x: 3.7, y, w: 6, h: 1.35, fill: { color: CARD_BG }, line: { color: ACCENT_TEAL, width: 0.5 } });
    sl.addShape(pres.ShapeType.rect, { x: 3.7, y, w: 6, h: 0.35, fill: { color: ACCENT_TEAL } });
    sl.addText(s.title, { x: 3.8, y: y + 0.04, w: 5.8, h: 0.3, fontSize: 12, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });
    sl.addText(s.body, { x: 3.8, y: y + 0.4, w: 5.8, h: 0.88, fontSize: 10.5, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
  });
}

// ─── SLIDE 4: METACARPAL & THUMB JOINTS ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.7, w: 10, h: 0.05, fill: { color: ACCENT_GOLD } });

  sl.addText("METACARPAL & THUMB JOINTS", { x: 0.4, y: 0.1, w: 9, h: 0.55, fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 2, margin: 0 });

  // Two columns
  // Left: Metacarpal Joints
  sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.9, w: 4.4, h: 4.4, fill: { color: CARD_BG }, line: { color: ACCENT_GOLD, width: 1 } });
  sl.addShape(pres.ShapeType.rect, { x: 0.3, y: 0.9, w: 4.4, h: 0.45, fill: { color: ACCENT_GOLD } });
  sl.addText("METACARPAL JOINTS", { x: 0.4, y: 0.93, w: 4.2, h: 0.38, fontSize: 13, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });

  const metacarpalItems = [
    "2nd & 3rd metacarpals form the IMMOBILE central segment of the hand",
    "4th & 5th metacarpals — greater mobility, form FLEXIBLE arches",
    "Distal transverse arch lies OBLIQUELY across metacarpal heads",
    "Hand forms a CONE (not cylinder) when closing a fist",
    "Ulnar digits contact palm first, radial digits follow — 'cascade of fingers'",
    "MP joint allows flexion/extension AND abduction/adduction",
    "Small rotation at MP joints helps conform to different object shapes",
  ];
  metacarpalItems.forEach((item, i) => {
    sl.addShape(pres.ShapeType.rect, { x: 0.4, y: 1.48 + i * 0.44, w: 0.08, h: 0.28, fill: { color: ACCENT_GOLD } });
    sl.addText(item, { x: 0.58, y: 1.44 + i * 0.44, w: 3.95, h: 0.38, fontSize: 10, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
  });

  // Right: Thumb
  sl.addShape(pres.ShapeType.rect, { x: 5.2, y: 0.9, w: 4.4, h: 4.4, fill: { color: CARD_BG }, line: { color: ACCENT_TEAL, width: 1 } });
  sl.addShape(pres.ShapeType.rect, { x: 5.2, y: 0.9, w: 4.4, h: 0.45, fill: { color: ACCENT_TEAL } });
  sl.addText("THUMB (1ST METACARPAL)", { x: 5.3, y: 0.93, w: 4.2, h: 0.38, fontSize: 13, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });

  const thumbItems = [
    "Articulates with TRAPEZIUM via a SADDLE joint — highly mobile",
    "Concave in anteroposterior plane, convex in lateral plane",
    "Wide arc of motion: pad-to-pad opposition, full extension & abduction",
    "BOTH motions critical to function — opposition enables grasp, extension enables release",
    "Thumb posted in permanent opposition → grasp possible, but release impossible",
    "Carpometacarpal & MP rotation crucial to all prehension patterns",
    "Used hundreds of times daily in ADLs, IADLs, work & leisure",
  ];
  thumbItems.forEach((item, i) => {
    sl.addShape(pres.ShapeType.rect, { x: 5.3, y: 1.48 + i * 0.44, w: 0.08, h: 0.28, fill: { color: ACCENT_TEAL } });
    sl.addText(item, { x: 5.48, y: 1.44 + i * 0.44, w: 3.95, h: 0.38, fontSize: 10, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
  });
}

// ─── SLIDE 5: IP JOINTS & FOREARM ROTATION ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.7, w: 10, h: 0.05, fill: { color: ACCENT_GOLD } });

  sl.addText("INTERPHALANGEAL JOINTS & FOREARM ROTATION", { x: 0.4, y: 0.1, w: 9.2, h: 0.55, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 1, margin: 0 });

  // Three cards row
  const cards = [
    {
      color: ACCENT_GOLD, title: "PIP JOINT",
      points: [
        "Proximal Interphalangeal joint",
        "TRUE hinge joint — motion in one plane only",
        "Collateral ligaments: dorsal-to-palmar direction",
        "Lax in flexion, TAUT in extension",
        "Extensor mechanism passes through capsule dorsally",
        "Common splints: correct BOUTONNIÈRE deformity (PIP flexion + DIP hyperextension)",
        "Swan-neck deformity: PIP hyperextension + DIP flexion",
      ]
    },
    {
      color: ACCENT_TEAL, title: "DIP JOINT",
      points: [
        "Distal Interphalangeal joint",
        "TRUE hinge joint — similar to PIP",
        "Smaller structures = less integrity & strength",
        "Terminal extensor tendon inserts here",
        "Mallet (baseball) finger: disruption of terminal extensor tendon → DIP flexion + loss of active extension",
        "Splinting: protective extension for mallet finger",
      ]
    },
    {
      color: "#9B5DE5", title: "FOREARM ROTATION",
      points: [
        "Supination & Pronation — critical to hand function",
        "Axis: radial head/capitulum → distal ulnar styloid",
        "Pronation: ulnar styloid moves laterally, radial styloid medially",
        "Supination: opposite occurs",
        "Splint fit changes between supination & pronation — always position in pronation for functional splints",
        "Coin-pickup test: demonstrates need for forearm positioning",
      ]
    }
  ];

  const xPos = [0.25, 3.55, 6.85];
  cards.forEach((c, i) => {
    const x = xPos[i];
    sl.addShape(pres.ShapeType.rect, { x, y: 0.9, w: 3.1, h: 4.4, fill: { color: CARD_BG }, line: { color: c.color, width: 1 } });
    sl.addShape(pres.ShapeType.rect, { x, y: 0.9, w: 3.1, h: 0.45, fill: { color: c.color } });
    sl.addText(c.title, { x: x + 0.1, y: 0.93, w: 2.9, h: 0.38, fontSize: 13, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });
    c.points.forEach((pt, j) => {
      sl.addShape(pres.ShapeType.ellipse, { x: x + 0.12, y: 1.52 + j * 0.56, w: 0.1, h: 0.1, fill: { color: c.color } });
      sl.addText(pt, { x: x + 0.28, y: 1.47 + j * 0.56, w: 2.75, h: 0.5, fontSize: 9.5, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
    });
  });
}

// ─── SLIDE 6: LIGAMENTS OF WRIST & HAND ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 5.625, fill: { color: ACCENT_GOLD } });
  sl.addShape(pres.ShapeType.rect, { x: 0.15, y: 0, w: 9.85, h: 0.75, fill: { color: MID_BG } });

  sl.addText("LIGAMENTS OF WRIST & HAND", { x: 0.4, y: 0.1, w: 9, h: 0.55, fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 2, margin: 0 });

  const ligGroups = [
    {
      title: "PALMAR LIGAMENTS", color: ACCENT_GOLD,
      items: [
        "Radioscaphocapitate ligament → supports scaphoid",
        "Radiolunate ligament → supports lunate",
        "Radioscapholunate ligament → connects scapholunate articulation with distal radius",
        "Disruption → instability, pain, thumb & radial carpus dysfunction",
        "Splinting = primary treatment for stability and pain relief",
      ]
    },
    {
      title: "RADIAL & ULNAR COLLATERAL LIGAMENTS", color: ACCENT_TEAL,
      items: [
        "Provide DORSAL stability",
        "Radiocarpal & dorsal carpal ligaments → permit ROM",
        "Disruption → pain, loss of strength, functional impairment",
      ]
    },
    {
      title: "TRIANGULAR FIBROCARTILAGE COMPLEX (TFCC)", color: "#FF6B6B",
      items: [
        "Suspends distal radius from distal ulna and proximal carpus",
        "Tears/strains → pain & weakness with resistive tasks",
        "Now more commonly diagnosed via advanced imaging techniques",
        "Splinting ordered for support and pain relief",
      ]
    },
    {
      title: "MP JOINT LIGAMENTS", color: "#9B5DE5",
      items: [
        "Collateral ligaments: lax in extension, TIGHTEN with MP flexion",
        "Volar plate: attached to base of proximal phalanx, acts as checkrein",
        "MP immobilized in extension → secondary shortening of collateral ligaments → limited flexion",
        "Resting position splint: wrist 25-35° ext, MP 60-70° flex, PIP/DIP 10-35° flex",
      ]
    },
  ];

  const positions = [
    { x: 0.25, y: 0.9, w: 4.5, h: 2.2 },
    { x: 5.1, y: 0.9, w: 4.7, h: 1.5 },
    { x: 5.1, y: 2.5, w: 4.7, h: 1.7 },
    { x: 0.25, y: 3.2, w: 9.5, h: 2.1 },
  ];

  ligGroups.forEach((g, i) => {
    const p = positions[i];
    sl.addShape(pres.ShapeType.rect, { x: p.x, y: p.y, w: p.w, h: p.h, fill: { color: CARD_BG }, line: { color: g.color, width: 1 } });
    sl.addShape(pres.ShapeType.rect, { x: p.x, y: p.y, w: p.w, h: 0.38, fill: { color: g.color } });
    sl.addText(g.title, { x: p.x + 0.1, y: p.y + 0.04, w: p.w - 0.2, h: 0.3, fontSize: 11, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });
    g.items.forEach((item, j) => {
      sl.addShape(pres.ShapeType.rect, { x: p.x + 0.12, y: p.y + 0.48 + j * 0.33, w: 0.07, h: 0.18, fill: { color: g.color } });
      sl.addText(item, { x: p.x + 0.25, y: p.y + 0.44 + j * 0.33, w: p.w - 0.35, h: 0.28, fontSize: 9.5, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
    });
  });
}

// ─── SLIDE 7: MUSCLES & TENDONS ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.7, w: 10, h: 0.05, fill: { color: ACCENT_TEAL } });

  sl.addText("MUSCLES & TENDONS OF HAND", { x: 0.4, y: 0.1, w: 9, h: 0.55, fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 2, margin: 0 });

  // Left: Extrinsic Muscles
  sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.85, w: 4.5, h: 4.5, fill: { color: CARD_BG }, line: { color: ACCENT_GOLD, width: 1 } });
  sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.85, w: 4.5, h: 0.5, fill: { color: ACCENT_GOLD } });
  sl.addText("EXTRINSIC MUSCLES", { x: 0.35, y: 0.88, w: 4.3, h: 0.42, fontSize: 15, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });

  const extItems = [
    { h: "Origin:", b: "Elbow and proximal half of midforearm" },
    { h: "Groups:", b: "Flexor group & Extensor group acting on wrist & digits" },
    { h: "Tenodesis:", b: "Wrist extension → passive finger flexion; Wrist flexion → passive finger extension" },
    { h: "Mechanism:", b: "Fixed resting length of tendon units — crossing multiple joints without length change" },
    { h: "Clinical use:", b: "Harnessed in nerve-injured hand — tenodesis splint (wrist-driven flexor hinge) for C6/C7 SCI" },
    { h: "Balance:", b: "Smooth coordinated hand motion depends on integrated extrinsic-intrinsic balance" },
  ];
  extItems.forEach((item, i) => {
    const y = 1.5 + i * 0.6;
    sl.addText(item.h, { x: 0.4, y, w: 1.0, h: 0.3, fontSize: 10, bold: true, color: ACCENT_GOLD, fontFace: "Calibri", margin: 0 });
    sl.addText(item.b, { x: 1.4, y, w: 3.2, h: 0.45, fontSize: 10, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
  });

  // Right: Intrinsic Muscles
  sl.addShape(pres.ShapeType.rect, { x: 5.25, y: 0.85, w: 4.5, h: 4.5, fill: { color: CARD_BG }, line: { color: ACCENT_TEAL, width: 1 } });
  sl.addShape(pres.ShapeType.rect, { x: 5.25, y: 0.85, w: 4.5, h: 0.5, fill: { color: ACCENT_TEAL } });
  sl.addText("INTRINSIC MUSCLES", { x: 5.35, y: 0.88, w: 4.3, h: 0.42, fontSize: 15, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });

  const intItems = [
    { h: "Origin:", b: "Origins AND insertions entirely within the hand" },
    { h: "Groups:", b: "Lumbricals, Dorsal interossei, Palmar interossei, Thenar group, Hypothenar group" },
    { h: "Lumbricals:", b: "4 muscles; flex MPs while extending IPs — essential for dexterous grip" },
    { h: "Interossei:", b: "Dorsal = abduct fingers; Palmar = adduct fingers; both flex MPs" },
    { h: "Thenar:", b: "Abductor pollicis brevis, Opponens pollicis, Flexor pollicis brevis — thumb opposition & movement" },
    { h: "Hypothenar:", b: "Abductor, flexor & opponens digiti minimi — little finger mobility" },
    { h: "Clinical:", b: "Neurological dysfunction → imbalance → contractures addressed by splinting" },
  ];
  intItems.forEach((item, i) => {
    const y = 1.5 + i * 0.55;
    sl.addText(item.h, { x: 5.4, y, w: 1.1, h: 0.3, fontSize: 10, bold: true, color: ACCENT_TEAL, fontFace: "Calibri", margin: 0 });
    sl.addText(item.b, { x: 6.5, y, w: 3.1, h: 0.45, fontSize: 10, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
  });
}

// ─── SLIDE 8: NERVE SUPPLY ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.7, w: 10, h: 0.05, fill: { color: ACCENT_GOLD } });

  sl.addText("NERVE SUPPLY TO THE HAND", { x: 0.4, y: 0.1, w: 9, h: 0.55, fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 2, margin: 0 });

  const nerves = [
    {
      name: "RADIAL NERVE", color: ACCENT_GOLD,
      motor: "Primary motor to extensors & supinators",
      sensory: "Dorsum & radial border of hand",
      risk: "Elbow and thenar snuffbox (anatomical snuffbox)",
      notes: "Injury → wrist drop; avoid splint pressure at radial elbow and snuffbox"
    },
    {
      name: "MEDIAN NERVE", color: ACCENT_TEAL,
      motor: "Flexor-pronator group: most long flexors + thenar muscles (abductor pollicis brevis, opponens, superficial head FPB)",
      sensory: "Palmar surface of thumb, index, long finger, radial half of ring finger — MOST FUNCTIONALLY IMPORTANT",
      risk: "Carpal tunnel (wrist) — avoid tight volar splints",
      notes: "Injury → loss of thumb opposition; used in opponens splint design"
    },
    {
      name: "ULNAR NERVE", color: "#FF6B6B",
      motor: "Most intrinsics, hypothenar muscles, ulnar profundi, adductor pollicis",
      sensory: "Palmar surface of little finger, ulnar half of ring finger, ulnar half of palm",
      risk: "Elbow (cubital tunnel) and Guyon's canal at ulnar wrist",
      notes: "Injury → claw hand (intrinsic minus); MP flexion splints used for correction"
    },
  ];

  nerves.forEach((n, i) => {
    const y = 0.9 + i * 1.55;
    sl.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 9.5, h: 1.38, fill: { color: CARD_BG }, line: { color: n.color, width: 1 } });
    sl.addShape(pres.ShapeType.rect, { x: 0.25, y, w: 1.8, h: 1.38, fill: { color: n.color } });
    sl.addText(n.name, { x: 0.3, y: y + 0.45, w: 1.7, h: 0.55, fontSize: 13, bold: true, color: DARK_BG, fontFace: "Calibri", align: "center", margin: 0 });

    const cols = [
      { label: "Motor:", val: n.motor },
      { label: "Sensory:", val: n.sensory },
      { label: "Compression risk:", val: n.risk },
      { label: "Splinting note:", val: n.notes },
    ];
    cols.forEach((c, j) => {
      sl.addText(c.label, { x: 2.2 + j * 1.87, y: y + 0.05, w: 1.85, h: 0.25, fontSize: 9.5, bold: true, color: n.color, fontFace: "Calibri", margin: 0 });
      sl.addText(c.val, { x: 2.2 + j * 1.87, y: y + 0.3, w: 1.85, h: 1.0, fontSize: 9, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
    });
  });
}

// ─── SLIDE 9: BLOOD SUPPLY & SKIN ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.7, w: 10, h: 0.05, fill: { color: "#FF6B6B } });

  sl.addText("BLOOD SUPPLY & SKIN", { x: 0.4, y: 0.1, w: 9, h: 0.55, fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 2, margin: 0 });

  // Blood supply (left)
  sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.85, w: 4.6, h: 4.5, fill: { color: CARD_BG }, line: { color: "#FF6B6B", width: 1 } });
  sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.85, w: 4.6, h: 0.45, fill: { color: "#FF6B6B" } });
  sl.addText("BLOOD SUPPLY", { x: 0.35, y: 0.88, w: 4.4, h: 0.38, fontSize: 14, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });

  const bloodItems = [
    ["Radial Artery", "Divides at proximal wrist crease: small superficial branch + larger deep radial branch"],
    ["Ulnar Artery", "Divides into: large branch (superficial arterial arch) + small branch (deep palmar arch)"],
    ["Guyon's Canal", "Ulnar artery vulnerable to trauma between pisiform and hamate"],
    ["Superficial Arch", "Divides into common digital branches → proper digital branches"],
    ["Venous Drainage", "Superficial veins on dorsum of hand — disruption causes dorsal edema"],
    ["Splinting Caution", "Avoid strapping too tightly over dorsum — traps fluid drainage"],
    ["Edema", "Dorsal hand edema is a common complication requiring OT intervention"],
  ];
  bloodItems.forEach((item, i) => {
    sl.addText(item[0] + ":", { x: 0.4, y: 1.42 + i * 0.52, w: 1.4, h: 0.3, fontSize: 10, bold: true, color: "#FF6B6B", fontFace: "Calibri", margin: 0 });
    sl.addText(item[1], { x: 1.82, y: 1.42 + i * 0.52, w: 2.9, h: 0.45, fontSize: 9.5, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
  });

  // Skin (right)
  sl.addShape(pres.ShapeType.rect, { x: 5.15, y: 0.85, w: 4.6, h: 4.5, fill: { color: CARD_BG }, line: { color: ACCENT_GOLD, width: 1 } });
  sl.addShape(pres.ShapeType.rect, { x: 5.15, y: 0.85, w: 4.6, h: 0.45, fill: { color: ACCENT_GOLD } });
  sl.addText("SKIN & SURFACE ANATOMY", { x: 5.25, y: 0.88, w: 4.4, h: 0.38, fontSize: 13, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });

  const skinItems = [
    ["Dorsal skin", "Loosely anchored, elastic, moves easily for digit flexion/extension — can be pulled distally more than proximally"],
    ["Palmar skin", "Thick, inelastic, firmly attached to palmar aponeurosis — stable for prehension"],
    ["Palmar fascia", "Thicker fascia protects nerve endings; supplies moisture and oils"],
    ["Pressure points", "Ulnar styloid, distal radial styloid, thumb CMC joint — common pressure sites in splinting"],
    ["Padding rule", "Padding ADDS pressure — only works if molded as part of splint; post-fabrication padding worsens fit"],
    ["Sensory-impaired skin", "Lacks natural oils → dry → abrades easily; monitor closely in splinting"],
  ];
  skinItems.forEach((item, i) => {
    sl.addText(item[0] + ":", { x: 5.3, y: 1.42 + i * 0.58, w: 1.35, h: 0.28, fontSize: 10, bold: true, color: ACCENT_GOLD, fontFace: "Calibri", margin: 0 });
    sl.addText(item[1], { x: 6.65, y: 1.42 + i * 0.58, w: 3.0, h: 0.5, fontSize: 9.5, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
  });
}

// ─── SLIDE 10: PREHENSION PATTERNS ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.7, w: 10, h: 0.05, fill: { color: ACCENT_TEAL } });

  sl.addText("PREHENSION PATTERNS", { x: 0.4, y: 0.1, w: 9, h: 0.55, fontSize: 26, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 3, margin: 0 });

  const patterns = [
    { name: "LATERAL\nPREHENSION", aka: "Key Pinch", color: ACCENT_GOLD, desc: "Thumb pad contacts radial side of index phalanx", use: "Holding pen, key turning, eating utensil", splint: "Short/long opponens splint" },
    { name: "PALMAR\nPREHENSION", aka: "3-Jaw Chuck", color: ACCENT_TEAL, desc: "Thumb in opposition to index & long fingers (pad-to-pad)", use: "Lifting objects, holding small items, tying shoelaces", splint: "Short/long opponens splint" },
    { name: "TIP\nPREHENSION", aka: "Tip Pinch", color: "#FF6B6B", desc: "IP of thumb + DIP/PIP of finger all flexed for tip-to-tip contact", use: "Picking up a pin or coin", splint: "Thumb IP hyperextension block" },
    { name: "CYLINDRICAL\nGRASP", aka: "Power Grip", color: "#9B5DE5", desc: "Object stabilized against palm & fingers; thumb opposes", use: "Hammer, glass, pot handle, walker", splint: "Wrist stabilizer + dynamic outrigger for ROM" },
    { name: "SPHERICAL\nGRASP", aka: "Ball Grasp", color: "#F72585", desc: "Like cylindrical but 4th & 5th digits more extended (open cone)", use: "Holding a ball or apple", splint: "Wrist stabilizer with distal trimline accommodating oblique metacarpal angle" },
    { name: "HOOK\nGRASP", aka: "Hook Grip", color: "#4CC9F0", desc: "MPs in extension, DIPs & PIPs in flexion — NO thumb opposition", use: "Carrying briefcase, shopping bag, pail handle", splint: "MP flexion splint to correct in nerve injury" },
    { name: "INTRINSIC\nPLUS GRASP", aka: "Flat Hand Grasp", color: "#80B918", desc: "MPs flexed, IPs in full extension, thumb opposes 3rd & 4th fingers", use: "Grasping large flat objects: books, plates", splint: "Figure-8 or dynamic MP flexion splint" },
  ];

  // 4 top + 3 bottom
  const topY = 0.9, botY = 3.1;
  const topW = 2.25, botW = 3.0;

  patterns.slice(0, 4).forEach((p, i) => {
    const x = 0.25 + i * 2.4;
    sl.addShape(pres.ShapeType.rect, { x, y: topY, w: topW, h: 2.0, fill: { color: CARD_BG }, line: { color: p.color, width: 1 } });
    sl.addShape(pres.ShapeType.rect, { x, y: topY, w: topW, h: 0.5, fill: { color: p.color } });
    sl.addText(p.name, { x: x + 0.08, y: topY + 0.03, w: topW - 0.16, h: 0.44, fontSize: 10, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });
    sl.addText('"' + p.aka + '"', { x: x + 0.08, y: topY + 0.54, w: topW - 0.16, h: 0.28, fontSize: 9, italic: true, color: p.color, fontFace: "Calibri", margin: 0 });
    sl.addText(p.desc, { x: x + 0.08, y: topY + 0.82, w: topW - 0.16, h: 0.5, fontSize: 8.5, color: WHITE, fontFace: "Calibri", margin: 0 });
    sl.addText("Use: " + p.use, { x: x + 0.08, y: topY + 1.3, w: topW - 0.16, h: 0.35, fontSize: 8, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
    sl.addText("Splint: " + p.splint, { x: x + 0.08, y: topY + 1.63, w: topW - 0.16, h: 0.32, fontSize: 8, color: ACCENT_GOLD, fontFace: "Calibri", margin: 0 });
  });

  patterns.slice(4).forEach((p, i) => {
    const x = 0.35 + i * 3.2;
    sl.addShape(pres.ShapeType.rect, { x, y: botY, w: botW, h: 2.3, fill: { color: CARD_BG }, line: { color: p.color, width: 1 } });
    sl.addShape(pres.ShapeType.rect, { x, y: botY, w: botW, h: 0.5, fill: { color: p.color } });
    sl.addText(p.name, { x: x + 0.08, y: botY + 0.04, w: botW - 0.16, h: 0.44, fontSize: 11, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });
    sl.addText('"' + p.aka + '"', { x: x + 0.08, y: botY + 0.56, w: botW - 0.16, h: 0.28, fontSize: 9.5, italic: true, color: p.color, fontFace: "Calibri", margin: 0 });
    sl.addText(p.desc, { x: x + 0.08, y: botY + 0.85, w: botW - 0.16, h: 0.55, fontSize: 9, color: WHITE, fontFace: "Calibri", margin: 0 });
    sl.addText("Use: " + p.use, { x: x + 0.08, y: botY + 1.42, w: botW - 0.16, h: 0.38, fontSize: 8.5, color: LIGHT_GRAY, fontFace: "Calibri", margin: 0 });
    sl.addText("Splint: " + p.splint, { x: x + 0.08, y: botY + 1.82, w: botW - 0.16, h: 0.35, fontSize: 8.5, color: ACCENT_GOLD, fontFace: "Calibri", margin: 0 });
  });
}

// ─── SLIDE 11: BIOMECHANICS OF SPLINTING ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.7, w: 10, h: 0.05, fill: { color: ACCENT_GOLD } });

  sl.addText("BIOMECHANICS OF SPLINTING", { x: 0.4, y: 0.1, w: 9, h: 0.55, fontSize: 24, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 2, margin: 0 });

  // Three motor functions box
  sl.addShape(pres.ShapeType.rect, { x: 0.25, y: 0.85, w: 9.5, h: 0.85, fill: { color: CARD_BG }, line: { color: ACCENT_GOLD, width: 1 } });
  sl.addText("Three Basic Motor Functions of the Upper Limb (McCollough & Sarrafian):", { x: 0.4, y: 0.88, w: 5.5, h: 0.3, fontSize: 11, bold: true, color: ACCENT_GOLD, fontFace: "Calibri", margin: 0 });
  const motorFuncs = ["Prehension & Release", "Transfer of Objects in Space", "Manipulation of Objects Within the Grasp"];
  motorFuncs.forEach((f, i) => {
    sl.addShape(pres.ShapeType.ellipse, { x: 0.4 + i * 3.1, y: 1.22, w: 0.15, h: 0.15, fill: { color: ACCENT_GOLD } });
    sl.addText(f, { x: 0.62 + i * 3.1, y: 1.19, w: 2.9, h: 0.35, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
  });

  // Biomechanics principles cards
  const bioCards = [
    { title: "FORCE & PRESSURE", color: ACCENT_TEAL, items: ["Force supplied by muscles, transmitted via tendons", "Splint applies external force across joints", "Three-point force system — two forces in one direction, one in opposite direction", "Pressure = Force ÷ Area (wider splint → lower pressure)", "Shearing forces not tolerated by hand skin at all"] },
    { title: "SPLINT DESIGN PRINCIPLES", color: ACCENT_GOLD, items: ["Resting position: wrist 25-35° ext, MPs 60-70° flex, PIPs 10-35° flex", "Distal trim lines proximal to MP creases (allow full MP flexion)", "Accommodate oblique metacarpal angle at 4th & 5th", "Forearm: position in pronation before setting", "Never pad a too-tight splint — create a relief in the material"] },
    { title: "SPLINT GOALS & LIMITS", color: "#FF6B6B", items: ["CAN: stabilize, position thumb, assist/substitute motion, provide dynamic stretch", "CAN gradually revise tissue along lines of pull (dynamic splinting)", "CANNOT restore sensation", "LIMITATIONS: reduces sensory feedback, limits uninvolved joints, adds bulk, transfers stress to adjacent joints", "Sensory-impaired skin: monitor for pressure ulcers & abrasions"] },
  ];

  bioCards.forEach((card, i) => {
    const x = 0.25 + i * 3.25;
    sl.addShape(pres.ShapeType.rect, { x, y: 1.85, w: 3.1, h: 3.5, fill: { color: CARD_BG }, line: { color: card.color, width: 1 } });
    sl.addShape(pres.ShapeType.rect, { x, y: 1.85, w: 3.1, h: 0.42, fill: { color: card.color } });
    sl.addText(card.title, { x: x + 0.08, y: 1.88, w: 2.94, h: 0.36, fontSize: 11, bold: true, color: DARK_BG, fontFace: "Calibri", margin: 0 });
    card.items.forEach((item, j) => {
      sl.addShape(pres.ShapeType.ellipse, { x: x + 0.1, y: 2.38 + j * 0.58, w: 0.1, h: 0.1, fill: { color: card.color } });
      sl.addText(item, { x: x + 0.26, y: 2.33 + j * 0.58, w: 2.75, h: 0.5, fontSize: 9.5, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
    });
  });
}

// ─── SLIDE 12: KEY CLINICAL DEFORMITIES ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.7, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0.7, w: 10, h: 0.05, fill: { color: "#FF6B6B" } });

  sl.addText("KEY CLINICAL DEFORMITIES & SPLINT APPLICATIONS", { x: 0.4, y: 0.1, w: 9.2, h: 0.55, fontSize: 20, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 1, margin: 0 });

  const deformities = [
    { name: "BOUTONNIÈRE DEFORMITY", color: "#FF6B6B", pos: "PIP FLEXION + DIP HYPEREXTENSION", cause: "Disruption of central slip of extensor tendon", splint: "PIP extension splint (three-point design)" },
    { name: "SWAN-NECK DEFORMITY", color: ACCENT_GOLD, pos: "PIP HYPEREXTENSION + DIP FLEXION", cause: "Volar plate laxity or FDS rupture; seen in rheumatoid arthritis", splint: "Figure-8 ring splint or PIP flexion-blocking splint" },
    { name: "MALLET / BASEBALL FINGER", color: ACCENT_TEAL, pos: "DIP FLEXION + LOSS OF ACTIVE EXTENSION", cause: "Disruption of terminal extensor tendon at DIP joint insertion", splint: "DIP extension splint worn continuously (6-8 weeks)" },
    { name: "CLAW HAND (INTRINSIC MINUS)", color: "#9B5DE5", pos: "MP HYPEREXTENSION + IP FLEXION (ring & little fingers mainly)", cause: "Ulnar nerve injury → loss of intrinsic muscle function", splint: "Anti-claw splint / MP flexion stop splint" },
    { name: "WRIST DROP", color: "#F72585", pos: "WRIST FLEXION + INABILITY TO EXTEND WRIST", cause: "Radial nerve injury → loss of wrist extensor function", splint: "Cock-up wrist splint / dynamic wrist extension splint" },
    { name: "TENODESIS DEFORMITY", color: "#80B918", pos: "WRIST EXT → FINGER FLEX; WRIST FLEX → FINGER EXT", cause: "Used therapeutically in SCI (C6/C7 level) where wrist extension is spared", splint: "Wrist-driven flexor hinge tenodesis splint" },
  ];

  deformities.forEach((d, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.25 : 5.15;
    const y = 0.9 + row * 1.6;
    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.7, h: 1.45, fill: { color: CARD_BG }, line: { color: d.color, width: 1 } });
    sl.addShape(pres.ShapeType.rect, { x, y, w: 0.08, h: 1.45, fill: { color: d.color } });

    sl.addText(d.name, { x: x + 0.18, y: y + 0.05, w: 4.4, h: 0.32, fontSize: 12, bold: true, color: d.color, fontFace: "Calibri", margin: 0 });
    sl.addText("Position: " + d.pos, { x: x + 0.18, y: y + 0.38, w: 4.4, h: 0.28, fontSize: 10, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
    sl.addText("Cause: " + d.cause, { x: x + 0.18, y: y + 0.65, w: 4.4, h: 0.32, fontSize: 9.5, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
    sl.addText("Splint: " + d.splint, { x: x + 0.18, y: y + 0.97, w: 4.4, h: 0.38, fontSize: 9.5, color: ACCENT_GOLD, fontFace: "Calibri", margin: 0 });
  });
}

// ─── SLIDE 13: SUMMARY / CLOSING SLIDE ───
{
  let sl = pres.addSlide();
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: DARK_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: MID_BG } });
  sl.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 5.625, fill: { color: ACCENT_GOLD } });
  sl.addShape(pres.ShapeType.rect, { x: 9.85, y: 0, w: 0.15, h: 5.625, fill: { color: ACCENT_TEAL } });
  sl.addShape(pres.ShapeType.rect, { x: 0.15, y: 2.6, w: 9.7, h: 0.04, fill: { color: ACCENT_GOLD } });

  sl.addText("KEY TAKEAWAYS", { x: 0.5, y: 0.3, w: 9, h: 0.6, fontSize: 30, bold: true, color: WHITE, fontFace: "Calibri", charSpacing: 4, align: "center", margin: 0 });

  const takeaways = [
    ["Anatomical Foundation", "The hand's 27 bones, complex ligaments, and two-muscle-group system provide both stability and remarkable dexterity"],
    ["Three Peripheral Nerves", "Radial (extension/dorsal sensation), Median (flexion/palmar sensation), Ulnar (intrinsics/little finger) — each critical to function"],
    ["Seven Prehension Patterns", "Lateral, Palmar, Tip, Cylindrical, Spherical, Hook, Intrinsic Plus — each requires specific joint positions for functional activities"],
    ["Tenodesis Principle", "Fixed tendon length creates reciprocal finger motion with wrist movement — exploited therapeutically in SCI splinting"],
    ["Splinting Must Balance", "Every splint must balance stabilization against unintended restriction — resting position prevents contracture"],
    ["Pressure & Skin", "Padding adds pressure; shearing forces are not tolerated; sensory-impaired skin needs extra monitoring"],
  ];

  takeaways.forEach((t, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = col === 0 ? 0.4 : 5.2;
    const y = 1.1 + row * 1.45;
    sl.addShape(pres.ShapeType.rect, { x, y, w: 4.5, h: 1.2, fill: { color: CARD_BG }, line: { color: i % 2 === 0 ? ACCENT_GOLD : ACCENT_TEAL, width: 0.5 } });
    sl.addShape(pres.ShapeType.ellipse, { x: x + 0.12, y: y + 0.12, w: 0.35, h: 0.35, fill: { color: i % 2 === 0 ? ACCENT_GOLD : ACCENT_TEAL } });
    sl.addText(String(i + 1), { x: x + 0.12, y: y + 0.09, w: 0.35, h: 0.35, fontSize: 13, bold: true, color: DARK_BG, fontFace: "Calibri", align: "center", margin: 0 });
    sl.addText(t[0], { x: x + 0.58, y: y + 0.08, w: 3.8, h: 0.32, fontSize: 12, bold: true, color: WHITE, fontFace: "Calibri", margin: 0 });
    sl.addText(t[1], { x: x + 0.58, y: y + 0.42, w: 3.8, h: 0.65, fontSize: 9.5, color: BODY_TEXT, fontFace: "Calibri", margin: 0 });
  });
}

// Save
pres.writeFile({ fileName: "/home/daytona/workspace/hand-functions-ppt/Hand_Functions.pptx" })
  .then(() => console.log("✅ Hand_Functions.pptx created successfully!"))
  .catch(err => console.error("Error:", err));
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.