Live and dead spermatozoa in cattle with principle and some abnormalities of spermatozoa

Reading File
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
Searching the Web

live dead spermatozoa staining cattle bull eosin nigrosin principle sperm viability

Reading Web Page

https://www.ethosbiosciences.com/blog-and-news/the-science-b…

Searching the Web

bull spermatozoa morphological abnormalities primary secondary classification cattle fertility

I now have comprehensive information. Let me compile the full answer.

Live and Dead Spermatozoa in Cattle: Principle and Sperm Abnormalities


1. Why Assess Sperm Viability?

Evaluating live vs. dead spermatozoa is a core component of the Breeding Soundness Examination (BSE) in bulls. A minimum of 70% morphologically normal, viable sperm is required to classify a bull as a satisfactory potential breeder. Viability assessment is particularly important when motility is low - it distinguishes between asthenozoospermia (sperm are alive but immotile) and necrozoospermia (sperm are dead).

2. The Eosin-Nigrosin Staining Technique

History

The eosin-nigrosin (EN) technique was first developed by Blom (1950) specifically for evaluating bull semen. It remains the gold-standard viability stain in both veterinary and human reproductive labs worldwide.

Principle (Dye Exclusion Method)

The test is based on selective membrane permeability:
  • A living sperm cell has an intact plasma membrane that is selectively semi-permeable. It actively excludes eosin - the sperm head remains unstained (white/colorless).
  • A dead sperm cell has a compromised (damaged) plasma membrane that develops tiny pores, losing its semi-permeability. Eosin enters the cell and stains the head pink or dark red/pink.
Cell StatusMembrane IntegrityEosin PenetrationAppearance
LiveIntactExcludedWhite / unstained head
DeadDamaged / porousEnters cellPink to dark red head
Nigrosin is a black background stain - it does not stain the sperm itself but creates a dark contrast that makes visualization of both stained and unstained sperm much easier under bright-field microscopy.

Reagents

  • Eosin Y (5%): the vital dye - marks dead cells
  • Nigrosin (10%): the background/contrast dye
  • Can be prepared as a one-step (combined) or two-step (sequential) staining solution

Procedure (One-Step Method)

  1. Mix a small drop of fresh semen with an equal volume of the eosin-nigrosin stain on a warm slide
  2. Incubate for approximately 30 seconds at 37°C
  3. Make a thin smear and allow to air-dry
  4. Examine under a bright-field microscope (x400-1000)
  5. Count a minimum of 200 spermatozoa per slide
  6. Record the percentage of unstained (live) vs. pink-stained (dead) cells

Interpretation Notes

  • A leaky neck membrane - where stain is confined only to the neck region while the head remains unstained - is not classified as cell death; these are counted as live
  • Results should be cross-validated: % dead (EN) + % motile (wet mount) must sum to less than 100% - if they exceed 100%, a methodological error is present
  • Normal bulls typically have >70% live spermatozoa

3. Alternative Viability Test: Hypoosmotic Swelling (HOS) Test

Based on the principle that a live sperm with intact membrane will swell in a hypoosmotic solution (low osmolality ~150 mOsm) due to water influx via osmosis - the tail coils or curls. Dead sperm with damaged membranes do not swell. This test is used when staining is not available but is less precise for cattle compared to EN staining.

4. Morphological Abnormalities of Bull Spermatozoa

Sperm abnormalities are classified by site of origin, location, and effect on fertility.

Classification Systems

SystemCategories
Primary / Secondary (Blom, 1950)Origin in testis vs. post-testicular
Major / Minor (Blom, 1971)Significance on fertility
Compensable / Uncompensable (Saacke, 1990)Whether increasing sperm numbers can overcome the defect
Head / Midpiece / TailAnatomical location

A. Primary Abnormalities

Arise during spermatogenesis in the testis. Generally considered more serious (major defects).
AbnormalityDescription
Underdeveloped / small headsImmature nucleus, poor chromatin condensation
Double formsTwo heads, two tails, or duplicated midpieces
Acrosome defectsKnobbed acrosome, missing acrosome - impairs zona penetration
Narrow headsTapered or pyriform (pear-shaped) heads
Crater / Diadem defectNuclear vacuoles appearing as craters in the head
Abnormal head contourIrregular shape, macro- or microcephaly
Abnormal midpieceCoiled, bent, or thickened midpiece
Proximal cytoplasmic dropletCytoplasmic remnant retained near the neck; indicates immaturity
Strongly folded or coiled tailTightly coiled tail (different from distal coil)
Accessory tailsExtra axonemal structures; may be genetic in origin

B. Secondary Abnormalities

Arise during epididymal transit or post-ejaculation (handling, processing, aging). Generally considered minor defects.
AbnormalityDescription
Small normal headsSlightly reduced but normally shaped
Giant / short broad headsAbnormal nuclear size
Detached / loose acrosomal membranesAcrosome partially lifted (not fully disrupted)
Abaxial implantationTail inserts off-center of the head base; not always detrimental
Distal cytoplasmic dropletDroplet migrated down to the principal piece; minor significance
Detached headsHead separated from tail during processing
Simple bent tailSingle bend in the tail, often from cold shock
Distal coiled tailCoiling at the terminal piece; often from hypoosmotic stress

C. Compensable vs. Uncompensable Defects

  • Compensable defects: These sperm fail to fertilize but do not block competing normal sperm. Increasing the number of inseminated sperm can overcome the reduced fertility. Example: detached heads, distal droplets.
  • Uncompensable defects: These sperm actively interfere with normal sperm function or occupy binding sites without fertilizing. Higher numbers do not improve fertility. Example: knobbed acrosome, some head defects. These are particularly dangerous in natural mating.

D. Fertility Threshold

ClassificationMorphologically Normal SpermInterpretation
Satisfactory potential breeder≥ 70%Passes BSE
Unsatisfactory potential breeder< 70%Fails BSE
This 70% threshold for normal sperm morphology has been validated through natural mating trials in cattle and is widely accepted across species.

5. Common Specific Defects in Cattle with Clinical Notes

  • Dag defect (coiled midpiece): A genetic defect seen in certain breeds; severely impairs motility
  • Decapitated sperm defect: Heads detach from tails in the epididymis; a breed-associated condition (e.g., Guernsey bulls)
  • Knobbed acrosome: One of the most fertility-impairing defects; sperm cannot penetrate the zona pellucida
  • Nuclear vacuoles (diadem/crater defect): Linked to chromatin instability and early embryonic death
  • Proximal droplet: High levels indicate testicular immaturity or thermoregulatory failure (especially relevant after fever or scrotal insulation)

Key Reference: Barth, A.D. and Oko, R.J. (1989). Abnormal Morphology of Bovine Spermatozoa. Iowa State University Press - the standard veterinary reference for bovine sperm classification.

Create a ppt of this topic

Reading File
Reading File
Reading File
Running Command

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace does not exist ye…

Running Command

mkdir -p /home/daytona/workspace/sperm-cattle-ppt

Writing File

~/sperm-cattle-ppt/build.js

const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Live and Dead Spermatozoa in Cattle";
pres.author = "Veterinary Reproductive Biology";

// ── COLOUR PALETTE ──────────────────────────────────────────────────────────
// Deep teal dominant (#0D4F5C), warm cream accent (#F5EDD6),
// coral red highlight (#C94040), light teal mid (#2A8C9E), off-white (#F7F9F9)
const C = {
  dark:    "0D4F5C",   // deep teal – title / section slides
  mid:     "2A8C9E",   // medium teal – headers / bars
  light:   "E8F5F8",   // very light teal – content bg tint
  cream:   "F5EDD6",   // warm cream – accents
  red:     "C94040",   // coral red – dead cells / danger
  green:   "2E7D52",   // forest green – live cells
  white:   "FFFFFF",
  offwhite:"F7F9F9",
  text:    "1A2E35",   // near-black text
  subtext: "3D6B77",   // secondary text
  gray:    "B0C4CC",
};

// ── HELPER: section-coloured accent bar on left edge ────────────────────────
function leftBar(slide, color = C.mid) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 0.18, h: 5.625,
    fill: { color },
    line: { color, width: 0 },
  });
}

// ── HELPER: slide header band ────────────────────────────────────────────────
function headerBand(slide, title, barColor = C.dark, textColor = C.white) {
  slide.addShape(pres.shapes.RECTANGLE, {
    x: 0.18, y: 0, w: 9.82, h: 0.72,
    fill: { color: barColor },
    line: { color: barColor, width: 0 },
  });
  slide.addText(title, {
    x: 0.4, y: 0.06, w: 9.4, h: 0.6,
    fontSize: 20, bold: true,
    color: textColor, fontFace: "Calibri",
    margin: 0, valign: "middle",
  });
}

// ── HELPER: small icon circle ────────────────────────────────────────────────
function iconCircle(slide, x, y, r, color, label, labelColor = C.white) {
  slide.addShape(pres.shapes.ELLIPSE, {
    x, y, w: r, h: r,
    fill: { color },
    line: { color, width: 0 },
  });
  slide.addText(label, {
    x, y: y + r * 0.2, w: r, h: r * 0.6,
    fontSize: 11, bold: true, color: labelColor,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });
}

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

  // Full dark background
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.dark },
    line: { color: C.dark, width: 0 },
  });

  // Decorative teal diagonal band (right side)
  s.addShape(pres.shapes.RECTANGLE, {
    x: 6.5, y: 0, w: 3.5, h: 5.625,
    fill: { color: C.mid },
    line: { color: C.mid, width: 0 },
  });

  // Cream accent strip
  s.addShape(pres.shapes.RECTANGLE, {
    x: 6.3, y: 0, w: 0.12, h: 5.625,
    fill: { color: C.cream },
    line: { color: C.cream, width: 0 },
  });

  // "LIVE" circle (green)
  s.addShape(pres.shapes.ELLIPSE, {
    x: 6.8, y: 0.5, w: 1.4, h: 1.4,
    fill: { color: C.green },
    line: { color: "FFFFFF", width: 2 },
  });
  s.addText("LIVE", {
    x: 6.8, y: 0.85, w: 1.4, h: 0.7,
    fontSize: 16, bold: true, color: C.white,
    align: "center", fontFace: "Calibri", margin: 0,
  });

  // "DEAD" circle (red)
  s.addShape(pres.shapes.ELLIPSE, {
    x: 8.4, y: 0.5, w: 1.4, h: 1.4,
    fill: { color: C.red },
    line: { color: "FFFFFF", width: 2 },
  });
  s.addText("DEAD", {
    x: 8.4, y: 0.85, w: 1.4, h: 0.7,
    fontSize: 16, bold: true, color: C.white,
    align: "center", fontFace: "Calibri", margin: 0,
  });

  // Sperm silhouette circles (decorative)
  for (let i = 0; i < 5; i++) {
    s.addShape(pres.shapes.ELLIPSE, {
      x: 6.7 + i * 0.5, y: 3.8, w: 0.3, h: 0.2,
      fill: { color: "FFFFFF", transparency: 70 },
      line: { color: "FFFFFF", width: 0, transparency: 70 },
    });
  }

  // Title text
  s.addText("Live and Dead Spermatozoa", {
    x: 0.35, y: 1.1, w: 5.8, h: 0.9,
    fontSize: 30, bold: true, color: C.white,
    fontFace: "Calibri", margin: 0,
  });
  s.addText("in Cattle", {
    x: 0.35, y: 1.95, w: 5.8, h: 0.75,
    fontSize: 30, bold: true, color: C.cream,
    fontFace: "Calibri", margin: 0,
  });

  s.addText("Eosin-Nigrosin Staining Principle & Sperm Morphological Abnormalities", {
    x: 0.35, y: 2.8, w: 5.8, h: 0.55,
    fontSize: 13, italic: true, color: C.gray,
    fontFace: "Calibri", margin: 0,
  });

  s.addText("Veterinary Reproductive Biology", {
    x: 0.35, y: 4.9, w: 5.8, h: 0.4,
    fontSize: 11, color: C.gray,
    fontFace: "Calibri", margin: 0,
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — OVERVIEW / AGENDA
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.mid);
  headerBand(s, "Agenda", C.dark);

  const topics = [
    { num: "01", title: "Why Assess Sperm Viability?", sub: "Breeding Soundness Examination & fertility threshold" },
    { num: "02", title: "Eosin-Nigrosin Staining", sub: "History, principle, reagents & procedure" },
    { num: "03", title: "Interpretation of Results", sub: "Live / dead identification & pitfalls" },
    { num: "04", title: "Hypoosmotic Swelling Test", sub: "Alternative viability method" },
    { num: "05", title: "Sperm Abnormalities in Cattle", sub: "Classification systems & individual defects" },
    { num: "06", title: "Compensable vs. Uncompensable", sub: "Fertility implications" },
  ];

  topics.forEach((t, i) => {
    const col = i < 3 ? 0 : 1;
    const row = i % 3;
    const x = 0.4 + col * 4.9;
    const y = 0.9 + row * 1.5;

    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 4.5, h: 1.25,
      fill: { color: C.white },
      line: { color: C.gray, width: 1 },
      shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.1 },
    });
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 0.55, h: 1.25,
      fill: { color: C.mid },
      line: { color: C.mid, width: 0 },
    });
    s.addText(t.num, {
      x, y: y + 0.35, w: 0.55, h: 0.55,
      fontSize: 14, bold: true, color: C.white,
      align: "center", fontFace: "Calibri", margin: 0,
    });
    s.addText(t.title, {
      x: x + 0.65, y: y + 0.08, w: 3.75, h: 0.55,
      fontSize: 12, bold: true, color: C.text,
      fontFace: "Calibri", margin: 0,
    });
    s.addText(t.sub, {
      x: x + 0.65, y: y + 0.62, w: 3.75, h: 0.5,
      fontSize: 9.5, color: C.subtext, italic: true,
      fontFace: "Calibri", margin: 0,
    });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — WHY ASSESS SPERM VIABILITY?
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.green);
  headerBand(s, "Why Assess Sperm Viability?", C.dark);

  // Central stat box
  s.addShape(pres.shapes.RECTANGLE, {
    x: 3.5, y: 0.85, w: 3, h: 1.2,
    fill: { color: C.dark },
    line: { color: C.dark, width: 0 },
    shadow: { type: "outer", color: "000000", blur: 6, offset: 3, angle: 135, opacity: 0.2 },
  });
  s.addText("≥ 70%", {
    x: 3.5, y: 0.88, w: 3, h: 0.68,
    fontSize: 32, bold: true, color: C.cream,
    align: "center", fontFace: "Calibri", margin: 0,
  });
  s.addText("Normal viable sperm required for\nSatisfactory Potential Breeder", {
    x: 3.5, y: 1.5, w: 3, h: 0.52,
    fontSize: 9, color: C.gray,
    align: "center", fontFace: "Calibri", margin: 0,
  });

  // Three reason boxes
  const boxes = [
    { x: 0.35, color: C.green,  icon: "BSE", title: "Breeding Soundness Exam", body: "Core component of bull evaluation before the breeding season" },
    { x: 3.65, color: C.mid,    icon: "AI",  title: "Artificial Insemination", body: "Viability must be confirmed in chilled/frozen-thawed semen before AI use" },
    { x: 6.95, color: C.red,    icon: "DX",  title: "Differential Diagnosis",  body: "Distinguishes asthenozoospermia (alive, immotile) from necrozoospermia (dead sperm)" },
  ];
  boxes.forEach(b => {
    s.addShape(pres.shapes.RECTANGLE, {
      x: b.x, y: 2.25, w: 3.1, h: 3.0,
      fill: { color: C.white },
      line: { color: C.gray, width: 1 },
      shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.1 },
    });
    s.addShape(pres.shapes.RECTANGLE, {
      x: b.x, y: 2.25, w: 3.1, h: 0.5,
      fill: { color: b.color },
      line: { color: b.color, width: 0 },
    });
    s.addText(b.icon, {
      x: b.x, y: 2.25, w: 3.1, h: 0.5,
      fontSize: 13, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    s.addText(b.title, {
      x: b.x + 0.12, y: 2.85, w: 2.86, h: 0.5,
      fontSize: 11, bold: true, color: C.text,
      fontFace: "Calibri", margin: 0,
    });
    s.addText(b.body, {
      x: b.x + 0.12, y: 3.4, w: 2.86, h: 1.7,
      fontSize: 9.5, color: C.subtext,
      fontFace: "Calibri", margin: 0, wrap: true,
    });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — EOSIN-NIGROSIN: HISTORY & PRINCIPLE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.mid);
  headerBand(s, "Eosin-Nigrosin Staining — History & Principle");

  // History card
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 0.85, w: 4.3, h: 2.0,
    fill: { color: C.white },
    line: { color: C.gray, width: 1 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 0.85, w: 4.3, h: 0.42,
    fill: { color: C.mid },
    line: { color: C.mid, width: 0 },
  });
  s.addText("HISTORY", {
    x: 0.35, y: 0.85, w: 4.3, h: 0.42,
    fontSize: 11, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "• Developed by ", options: { fontSize: 10, color: C.text } },
    { text: "Blom (1950)", options: { fontSize: 10, bold: true, color: C.dark } },
    { text: " for evaluating bull semen\n", options: { fontSize: 10, color: C.text } },
    { text: "• Originally a two-step process; now streamlined to a one-step method\n", options: { fontSize: 10, color: C.text } },
    { text: "• Gold standard ", options: { fontSize: 10, bold: true, color: C.dark } },
    { text: "in veterinary & human reproductive labs worldwide\n", options: { fontSize: 10, color: C.text } },
    { text: "• Validated against WHO standards (Bjorndahl et al., 2003)", options: { fontSize: 10, color: C.text } },
  ], {
    x: 0.5, y: 1.35, w: 4.05, h: 1.4,
    fontFace: "Calibri", margin: 0,
  });

  // Principle card
  s.addShape(pres.shapes.RECTANGLE, {
    x: 5.1, y: 0.85, w: 4.5, h: 2.0,
    fill: { color: C.white },
    line: { color: C.gray, width: 1 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 5.1, y: 0.85, w: 4.5, h: 0.42,
    fill: { color: C.dark },
    line: { color: C.dark, width: 0 },
  });
  s.addText("PRINCIPLE — DYE EXCLUSION METHOD", {
    x: 5.1, y: 0.85, w: 4.5, h: 0.42,
    fontSize: 11, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });
  s.addText([
    { text: "Intact plasma membrane (live cell)\n", options: { fontSize: 10, bold: true, color: C.green } },
    { text: "   → Semi-permeable → Excludes eosin → Head stays WHITE\n\n", options: { fontSize: 10, color: C.text } },
    { text: "Damaged plasma membrane (dead cell)\n", options: { fontSize: 10, bold: true, color: C.red } },
    { text: "   → Porous → Eosin enters → Head stains PINK/RED\n\n", options: { fontSize: 10, color: C.text } },
    { text: "Nigrosin ", options: { fontSize: 10, bold: true, color: C.dark } },
    { text: "= black background dye → improves contrast, NOT a vital stain", options: { fontSize: 10, color: C.text } },
  ], {
    x: 5.25, y: 1.35, w: 4.25, h: 1.4,
    fontFace: "Calibri", margin: 0,
  });

  // Visual: live vs dead sperm diagram
  // Live sperm (green, white head)
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 3.1, w: 4.3, h: 2.25,
    fill: { color: C.white },
    line: { color: C.gray, width: 1 },
  });
  s.addText("VISUAL REPRESENTATION", {
    x: 0.35, y: 3.1, w: 4.3, h: 0.38,
    fontSize: 10, bold: true, color: C.subtext,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });

  // Live sperm diagram
  s.addShape(pres.shapes.ELLIPSE, {
    x: 0.7, y: 3.62, w: 0.55, h: 0.35,
    fill: { color: C.white },
    line: { color: C.green, width: 2 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 1.23, y: 3.74, w: 0.8, h: 0.06,
    fill: { color: C.green },
    line: { color: C.green, width: 0 },
  });
  s.addText("LIVE — White/unstained head", {
    x: 0.55, y: 4.08, w: 2.3, h: 0.4,
    fontSize: 9.5, bold: true, color: C.green,
    align: "center", fontFace: "Calibri", margin: 0,
  });

  // Dead sperm diagram
  s.addShape(pres.shapes.ELLIPSE, {
    x: 2.9, y: 3.62, w: 0.55, h: 0.35,
    fill: { color: C.red },
    line: { color: C.red, width: 2 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 3.43, y: 3.74, w: 0.8, h: 0.06,
    fill: { color: C.red },
    line: { color: C.red, width: 0 },
  });
  s.addText("DEAD — Pink/red stained head", {
    x: 2.6, y: 4.08, w: 2.2, h: 0.4,
    fontSize: 9.5, bold: true, color: C.red,
    align: "center", fontFace: "Calibri", margin: 0,
  });

  // Membrane diagram on right side
  s.addShape(pres.shapes.RECTANGLE, {
    x: 4.85, y: 3.1, w: 4.75, h: 2.25,
    fill: { color: C.light },
    line: { color: C.mid, width: 1 },
  });
  s.addText("MEMBRANE PERMEABILITY", {
    x: 4.85, y: 3.1, w: 4.75, h: 0.38,
    fontSize: 10, bold: true, color: C.dark,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });

  // Intact membrane
  s.addShape(pres.shapes.ELLIPSE, {
    x: 5.05, y: 3.6, w: 1.5, h: 1.5,
    fill: { color: C.white, transparency: 20 },
    line: { color: C.green, width: 3 },
  });
  s.addText("INTACT\nMembrane\n✓ Eosin\nexcluded", {
    x: 5.05, y: 3.6, w: 1.5, h: 1.5,
    fontSize: 8, color: C.green, bold: true,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });

  // Damaged membrane
  s.addShape(pres.shapes.ELLIPSE, {
    x: 7.2, y: 3.6, w: 1.5, h: 1.5,
    fill: { color: "FFE0E0", transparency: 10 },
    line: { color: C.red, width: 3 },
  });
  s.addText("DAMAGED\nMembrane\n✗ Eosin\nenters", {
    x: 7.2, y: 3.6, w: 1.5, h: 1.5,
    fontSize: 8, color: C.red, bold: true,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — REAGENTS & PROCEDURE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.mid);
  headerBand(s, "Reagents & Procedure (One-Step Method)");

  // Reagents column
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 0.85, w: 3.6, h: 4.55,
    fill: { color: C.white },
    line: { color: C.gray, width: 1 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 0.85, w: 3.6, h: 0.45,
    fill: { color: C.mid },
    line: { color: C.mid, width: 0 },
  });
  s.addText("REAGENTS", {
    x: 0.35, y: 0.85, w: 3.6, h: 0.45,
    fontSize: 12, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });

  const reagents = [
    { name: "Eosin Y  (5%)", role: "Vital dye — marks dead cells pink/red", color: C.red },
    { name: "Nigrosin  (10%)", role: "Background stain — creates dark contrast", color: C.dark },
    { name: "Distilled Water", role: "Solvent for stain preparation", color: C.subtext },
    { name: "Warm Slide (37°C)", role: "Prevents cold shock artefact", color: C.subtext },
  ];
  reagents.forEach((r, i) => {
    const y = 1.42 + i * 1.0;
    s.addShape(pres.shapes.RECTANGLE, {
      x: 0.5, y, w: 0.12, h: 0.7,
      fill: { color: r.color },
      line: { color: r.color, width: 0 },
    });
    s.addText(r.name, {
      x: 0.72, y: y + 0.02, w: 3.1, h: 0.32,
      fontSize: 11, bold: true, color: C.text,
      fontFace: "Calibri", margin: 0,
    });
    s.addText(r.role, {
      x: 0.72, y: y + 0.35, w: 3.1, h: 0.3,
      fontSize: 9, color: C.subtext, italic: true,
      fontFace: "Calibri", margin: 0,
    });
  });

  // Steps column
  s.addShape(pres.shapes.RECTANGLE, {
    x: 4.15, y: 0.85, w: 5.5, h: 4.55,
    fill: { color: C.white },
    line: { color: C.gray, width: 1 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 4.15, y: 0.85, w: 5.5, h: 0.45,
    fill: { color: C.dark },
    line: { color: C.dark, width: 0 },
  });
  s.addText("PROCEDURE — Step by Step", {
    x: 4.15, y: 0.85, w: 5.5, h: 0.45,
    fontSize: 12, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });

  const steps = [
    { n: "1", text: "Place a drop of fresh semen on a warm slide (37 °C)" },
    { n: "2", text: "Add equal volume of eosin-nigrosin stain solution" },
    { n: "3", text: "Mix gently and incubate ~30 seconds at 37 °C" },
    { n: "4", text: "Make a thin smear and allow to air-dry completely" },
    { n: "5", text: "Examine under bright-field microscope at ×400–1000" },
    { n: "6", text: "Count minimum 200 spermatozoa per slide" },
    { n: "7", text: "Record % unstained (live) and % pink-stained (dead)" },
  ];
  steps.forEach((step, i) => {
    const y = 1.42 + i * 0.56;
    s.addShape(pres.shapes.ELLIPSE, {
      x: 4.3, y: y + 0.02, w: 0.38, h: 0.38,
      fill: { color: C.mid },
      line: { color: C.mid, width: 0 },
    });
    s.addText(step.n, {
      x: 4.3, y: y + 0.02, w: 0.38, h: 0.38,
      fontSize: 11, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    s.addText(step.text, {
      x: 4.78, y: y + 0.04, w: 4.7, h: 0.4,
      fontSize: 10, color: C.text,
      fontFace: "Calibri", margin: 0, valign: "middle",
    });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — INTERPRETATION & PITFALLS
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.green);
  headerBand(s, "Interpretation of Results & Pitfalls", C.dark);

  // Summary table header
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 0.85, w: 9.3, h: 0.42,
    fill: { color: C.mid },
    line: { color: C.mid, width: 0 },
  });
  ["Cell Status", "Membrane", "Eosin Penetration", "Microscopic Appearance"].forEach((h, i) => {
    const xArr = [0.4, 2.4, 4.55, 7.0];
    s.addText(h, {
      x: xArr[i], y: 0.88, w: 2.1, h: 0.35,
      fontSize: 10, bold: true, color: C.white,
      fontFace: "Calibri", margin: 0, valign: "middle",
    });
  });

  // Row: Live
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 1.27, w: 9.3, h: 0.62,
    fill: { color: "E8F8F0" },
    line: { color: C.gray, width: 0.5 },
  });
  const liveRow = ["LIVE", "Intact (semi-permeable)", "EXCLUDED", "White / unstained head"];
  const liveColors = [C.green, C.text, C.green, C.green];
  liveRow.forEach((cell, i) => {
    const xArr = [0.4, 2.4, 4.55, 7.0];
    s.addText(cell, {
      x: xArr[i], y: 1.3, w: 2.1, h: 0.55,
      fontSize: 10, bold: i === 0 || i === 2, color: liveColors[i],
      fontFace: "Calibri", margin: 0, valign: "middle",
    });
  });

  // Row: Dead
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 1.89, w: 9.3, h: 0.62,
    fill: { color: "FFF0F0" },
    line: { color: C.gray, width: 0.5 },
  });
  const deadRow = ["DEAD", "Damaged / porous", "ENTERS CELL", "Pink to dark red head"];
  const deadColors = [C.red, C.text, C.red, C.red];
  deadRow.forEach((cell, i) => {
    const xArr = [0.4, 2.4, 4.55, 7.0];
    s.addText(cell, {
      x: xArr[i], y: 1.92, w: 2.1, h: 0.55,
      fontSize: 10, bold: i === 0 || i === 2, color: deadColors[i],
      fontFace: "Calibri", margin: 0, valign: "middle",
    });
  });

  // Pitfalls & Special Notes
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 2.65, w: 9.3, h: 2.75,
    fill: { color: C.white },
    line: { color: C.gray, width: 1 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 2.65, w: 9.3, h: 0.42,
    fill: { color: C.dark },
    line: { color: C.dark, width: 0 },
  });
  s.addText("SPECIAL NOTES & PITFALLS", {
    x: 0.35, y: 2.65, w: 9.3, h: 0.42,
    fontSize: 11, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });

  const notes = [
    { icon: "⚠", color: C.cream, text: "Leaky neck membrane (stain confined to neck only, head unstained) → Count as LIVE — not true membrane disintegration" },
    { icon: "✓", color: "E8F8F0", text: "Validation check: % Dead (EN) + % Motile (wet mount) must total < 100%. If >100%, a methodological error has occurred" },
    { icon: "❄", color: C.light, text: "Use warm slides (37 °C) — cold shock can cause false membrane damage, artificially inflating dead cell counts" },
    { icon: "⏱", color: C.cream, text: "~30 sec incubation is optimal — over-incubation increases false positives; under-incubation reduces contrast" },
  ];
  notes.forEach((n, i) => {
    const y = 3.15 + i * 0.54;
    s.addShape(pres.shapes.RECTANGLE, {
      x: 0.45, y, w: 0.4, h: 0.42,
      fill: { color: n.color },
      line: { color: C.gray, width: 0 },
    });
    s.addText(n.icon, {
      x: 0.45, y, w: 0.4, h: 0.42,
      fontSize: 14, align: "center", valign: "middle",
      fontFace: "Calibri", margin: 0,
    });
    s.addText(n.text, {
      x: 0.95, y: y + 0.04, w: 8.5, h: 0.38,
      fontSize: 9.5, color: C.text,
      fontFace: "Calibri", margin: 0, valign: "middle",
    });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — HYPOOSMOTIC SWELLING TEST
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.mid);
  headerBand(s, "Alternative: Hypoosmotic Swelling (HOS) Test");

  // Principle box
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 0.85, w: 9.3, h: 1.6,
    fill: { color: C.white },
    line: { color: C.gray, width: 1 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 0.85, w: 9.3, h: 0.42,
    fill: { color: C.mid },
    line: { color: C.mid, width: 0 },
  });
  s.addText("PRINCIPLE", {
    x: 0.35, y: 0.85, w: 9.3, h: 0.42,
    fontSize: 12, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });
  s.addText(
    "A live sperm with an intact functional membrane placed in a hypoosmotic solution (~150 mOsm) will " +
    "absorb water by osmosis → the tail coils or curls (positive HOS).\n" +
    "A dead sperm with a non-functional membrane does NOT swell → tail remains straight (negative HOS).",
    {
      x: 0.5, y: 1.35, w: 9.0, h: 1.0,
      fontSize: 10, color: C.text,
      fontFace: "Calibri", margin: 0, wrap: true,
    }
  );

  // Two outcomes
  const outcomes = [
    { label: "POSITIVE HOS", sub: "(Live cell)", desc: "Intact membrane → Water influx → Tail coils/curls", color: C.green },
    { label: "NEGATIVE HOS", sub: "(Dead cell)", desc: "Damaged membrane → No swelling → Tail remains straight", color: C.red },
  ];
  outcomes.forEach((o, i) => {
    const x = 0.35 + i * 4.85;
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: 2.6, w: 4.55, h: 2.8,
      fill: { color: C.white },
      line: { color: o.color, width: 2 },
      shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.1 },
    });
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: 2.6, w: 4.55, h: 0.52,
      fill: { color: o.color },
      line: { color: o.color, width: 0 },
    });
    s.addText(`${o.label}  ${o.sub}`, {
      x, y: 2.62, w: 4.55, h: 0.48,
      fontSize: 11, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    s.addText(o.desc, {
      x: x + 0.15, y: 3.2, w: 4.25, h: 0.6,
      fontSize: 10, color: C.text,
      fontFace: "Calibri", margin: 0,
    });

    // Tail drawing (simplified)
    const baseX = x + 1.5;
    s.addShape(pres.shapes.ELLIPSE, {
      x: baseX, y: 3.9, w: 0.5, h: 0.3,
      fill: { color: o.color },
      line: { color: o.color, width: 0 },
    });
    if (i === 0) {
      // Coiled tail
      s.addShape(pres.shapes.RECTANGLE, {
        x: baseX + 0.5, y: 4.0, w: 0.9, h: 0.06,
        fill: { color: o.color },
        line: { color: o.color, width: 0 },
      });
      s.addShape(pres.shapes.ELLIPSE, {
        x: baseX + 1.2, y: 3.75, w: 0.5, h: 0.5,
        fill: { color: "FFFFFF", transparency: 100 },
        line: { color: o.color, width: 2 },
      });
      s.addText("(coiled)", {
        x: baseX, y: 4.45, w: 1.5, h: 0.3,
        fontSize: 9, color: C.green, italic: true,
        align: "center", fontFace: "Calibri", margin: 0,
      });
    } else {
      // Straight tail
      s.addShape(pres.shapes.RECTANGLE, {
        x: baseX + 0.5, y: 4.0, w: 1.4, h: 0.06,
        fill: { color: o.color },
        line: { color: o.color, width: 0 },
      });
      s.addText("(straight)", {
        x: baseX, y: 4.45, w: 1.5, h: 0.3,
        fontSize: 9, color: C.red, italic: true,
        align: "center", fontFace: "Calibri", margin: 0,
      });
    }
  });

  // Note box
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.35, y: 5.25, w: 9.3, h: 0.25,
    fill: { color: C.cream },
    line: { color: C.gray, width: 0.5 },
  });
  s.addText("Note: HOS test is less precise for cattle compared to eosin-nigrosin staining — EN remains the gold standard.", {
    x: 0.5, y: 5.26, w: 9.0, h: 0.22,
    fontSize: 8.5, color: C.subtext, italic: true,
    fontFace: "Calibri", margin: 0, valign: "middle",
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — CLASSIFICATION OF SPERM ABNORMALITIES
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.red);
  headerBand(s, "Classification of Bovine Sperm Abnormalities");

  const systems = [
    { title: "Primary / Secondary", author: "Blom, 1950", desc: "Based on SITE OF ORIGIN\nPrimary = Spermatogenesis (testis)\nSecondary = Post-testicular (epididymis, ejaculation)", color: C.dark },
    { title: "Major / Minor", author: "Blom, 1971", desc: "Based on SIGNIFICANCE to fertility\nMajor defects = seriously impair fertility\nMinor defects = minor or no effect", color: C.mid },
    { title: "Compensable / Uncompensable", author: "Saacke, 1990", desc: "Based on MODE OF ACTION\nCompensable = more sperm overcomes defect\nUncompensable = increasing sperm numbers CANNOT compensate", color: C.red },
    { title: "Anatomical Location", author: "Descriptive", desc: "Based on STRUCTURAL SITE\nHead defects | Midpiece defects\nTail defects | Cytoplasmic droplets", color: C.green },
  ];
  systems.forEach((sys, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.3 + col * 4.85;
    const y = 0.85 + row * 2.4;

    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 4.6, h: 2.2,
      fill: { color: C.white },
      line: { color: C.gray, width: 1 },
      shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.1 },
    });
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 4.6, h: 0.5,
      fill: { color: sys.color },
      line: { color: sys.color, width: 0 },
    });
    s.addText(`${sys.title}`, {
      x: x + 0.1, y: y + 0.02, w: 3.8, h: 0.46,
      fontSize: 11, bold: true, color: C.white,
      fontFace: "Calibri", margin: 0, valign: "middle",
    });
    s.addText(sys.author, {
      x: x + 3.7, y: y + 0.08, w: 0.8, h: 0.32,
      fontSize: 8, color: "FFFFFFBB", italic: true,
      align: "right", fontFace: "Calibri", margin: 0, valign: "middle",
    });
    s.addText(sys.desc, {
      x: x + 0.15, y: y + 0.58, w: 4.3, h: 1.55,
      fontSize: 9.5, color: C.text,
      fontFace: "Calibri", margin: 0, wrap: true,
    });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — PRIMARY ABNORMALITIES
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.dark);
  headerBand(s, "Primary Abnormalities — Origin: Spermatogenesis (Testis)");

  s.addText("These are considered MAJOR defects with significant effect on fertility", {
    x: 0.35, y: 0.82, w: 9.3, h: 0.35,
    fontSize: 10, italic: true, color: C.subtext,
    fontFace: "Calibri", margin: 0,
  });

  const primaries = [
    { name: "Underdeveloped / Small Heads", detail: "Immature nucleus; poor chromatin condensation; indicates spermatogenic failure" },
    { name: "Double Forms", detail: "Bicephalic (2 heads) or biflagellate (2 tails) — result of failed cytokinesis" },
    { name: "Knobbed / Missing Acrosome", detail: "Cannot penetrate zona pellucida — one of the most fertility-damaging defects (uncompensable)" },
    { name: "Narrow / Pyriform Heads", detail: "Tapered or pear-shaped heads — associated with poor DNA integrity" },
    { name: "Crater / Diadem Defect", detail: "Nuclear vacuoles appearing as craters — linked to chromatin instability and early embryonic death" },
    { name: "Proximal Cytoplasmic Droplet", detail: "Retained cytoplasmic remnant near neck — indicates testicular immaturity or thermoregulatory failure" },
    { name: "Abnormal Midpiece", detail: "Coiled, bent, or thickened midpiece — impairs motility and energy production" },
    { name: "Accessory Tails", detail: "Extra axonemal structures; likely genetic; may impair fertility" },
    { name: "Strongly Coiled Tails", detail: "Tight coiling from deep testicular/epididymal origin — distinguished from distal coil" },
  ];

  primaries.forEach((p, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.3 + col * 3.2;
    const y = 1.22 + row * 1.45;

    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 3.05, h: 1.32,
      fill: { color: C.white },
      line: { color: C.gray, width: 0.5 },
    });
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 0.18, h: 1.32,
      fill: { color: C.dark },
      line: { color: C.dark, width: 0 },
    });
    s.addText(p.name, {
      x: x + 0.26, y: y + 0.06, w: 2.72, h: 0.4,
      fontSize: 9.5, bold: true, color: C.dark,
      fontFace: "Calibri", margin: 0,
    });
    s.addText(p.detail, {
      x: x + 0.26, y: y + 0.46, w: 2.72, h: 0.82,
      fontSize: 8.5, color: C.subtext,
      fontFace: "Calibri", margin: 0, wrap: true,
    });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — SECONDARY ABNORMALITIES
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.mid);
  headerBand(s, "Secondary Abnormalities — Origin: Epididymis / Post-Ejaculation");

  s.addText("Generally considered MINOR defects — arise during epididymal transit, handling, or processing", {
    x: 0.35, y: 0.82, w: 9.3, h: 0.35,
    fontSize: 10, italic: true, color: C.subtext,
    fontFace: "Calibri", margin: 0,
  });

  const secondaries = [
    { name: "Small Normal Heads", detail: "Slightly reduced but normally shaped — minor significance" },
    { name: "Giant / Short Broad Heads", detail: "Abnormal nuclear size from epididymal malfunction" },
    { name: "Detached / Loose Acrosomal Membranes", detail: "Acrosome partially lifted — not fully disrupted; less severe than primary acrosome defects" },
    { name: "Abaxial Implantation", detail: "Tail inserts off-center at head base; mostly normal variation; extreme cases swim in circles" },
    { name: "Distal Cytoplasmic Droplet", detail: "Droplet migrated to principal piece — minor significance; most bulls have some proportion" },
    { name: "Detached Heads", detail: "Head separates from tail during processing/cold shock — artefactual in many cases" },
    { name: "Simple Bent Tail", detail: "Single bend; often from cold shock during semen handling — artefactual" },
    { name: "Distal Coiled Tail", detail: "Coiling at terminal piece — hypoosmotic stress; less serious than proximal coil" },
  ];

  secondaries.forEach((p, i) => {
    const col = i % 4;
    const row = Math.floor(i / 4);
    const x = 0.25 + col * 2.4;
    const y = 1.22 + row * 2.1;

    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 2.25, h: 1.9,
      fill: { color: C.white },
      line: { color: C.gray, width: 0.5 },
    });
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 2.25, h: 0.38,
      fill: { color: C.mid },
      line: { color: C.mid, width: 0 },
    });
    s.addText(p.name, {
      x: x + 0.08, y: y + 0.04, w: 2.1, h: 0.32,
      fontSize: 8.5, bold: true, color: C.white,
      fontFace: "Calibri", margin: 0, valign: "middle",
    });
    s.addText(p.detail, {
      x: x + 0.08, y: y + 0.44, w: 2.1, h: 1.38,
      fontSize: 8, color: C.subtext,
      fontFace: "Calibri", margin: 0, wrap: true,
    });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — COMPENSABLE vs UNCOMPENSABLE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.red);
  headerBand(s, "Compensable vs. Uncompensable Sperm Defects");

  // Compensable column
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.3, y: 0.85, w: 4.4, h: 4.55,
    fill: { color: C.white },
    line: { color: C.green, width: 2 },
    shadow: { type: "outer", color: "000000", blur: 5, offset: 3, angle: 135, opacity: 0.1 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.3, y: 0.85, w: 4.4, h: 0.5,
    fill: { color: C.green },
    line: { color: C.green, width: 0 },
  });
  s.addText("COMPENSABLE DEFECTS", {
    x: 0.3, y: 0.87, w: 4.4, h: 0.46,
    fontSize: 12, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });
  s.addText(
    "Definition:\nDefective sperm FAIL to fertilize but do NOT block competing normal sperm. " +
    "Increasing the number of inseminated sperm can overcome reduced fertility.\n\n" +
    "Examples:\n• Detached heads\n• Distal cytoplasmic droplets\n• Distal coiled tails\n• Abaxial implantation\n• Simple bent tails\n\n" +
    "Clinical relevance:\nMore significant in AI (fixed sperm dose) than in natural service where bull can inseminate repeatedly.",
    {
      x: 0.45, y: 1.45, w: 4.1, h: 3.85,
      fontSize: 10, color: C.text,
      fontFace: "Calibri", margin: 0, wrap: true,
    }
  );

  // Uncompensable column
  s.addShape(pres.shapes.RECTANGLE, {
    x: 5.3, y: 0.85, w: 4.4, h: 4.55,
    fill: { color: C.white },
    line: { color: C.red, width: 2 },
    shadow: { type: "outer", color: "000000", blur: 5, offset: 3, angle: 135, opacity: 0.1 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 5.3, y: 0.85, w: 4.4, h: 0.5,
    fill: { color: C.red },
    line: { color: C.red, width: 0 },
  });
  s.addText("UNCOMPENSABLE DEFECTS", {
    x: 5.3, y: 0.87, w: 4.4, h: 0.46,
    fontSize: 12, bold: true, color: C.white,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });
  s.addText(
    "Definition:\nDefective sperm ACTIVELY INTERFERE with normal sperm function — occupying binding sites without fertilizing. " +
    "Increasing sperm numbers CANNOT improve fertility.\n\n" +
    "Examples:\n• Knobbed / missing acrosome\n• Nuclear vacuoles (diadem defect)\n• Certain abnormal head shapes\n• Decapitated sperm defect\n• Dag defect (coiled midpiece)\n\n" +
    "Clinical relevance:\nParticularly dangerous in natural mating. These bulls should be classified UNSATISFACTORY regardless of sperm numbers.",
    {
      x: 5.45, y: 1.45, w: 4.1, h: 3.85,
      fontSize: 10, color: C.text,
      fontFace: "Calibri", margin: 0, wrap: true,
    }
  );

  // Arrow in between
  s.addText("vs.", {
    x: 4.7, y: 2.8, w: 0.6, h: 0.6,
    fontSize: 18, bold: true, color: C.gray,
    align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — SPECIFIC NOTABLE DEFECTS IN CATTLE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.dark);
  headerBand(s, "Clinically Notable Sperm Defects in Cattle");

  const defects = [
    {
      name: "Dag Defect",
      sub: "Coiled midpiece",
      body: "Genetic defect seen in certain breeds (e.g., Guernsey). Severely impairs motility. Bull should be culled.",
      color: C.dark,
    },
    {
      name: "Decapitated Sperm",
      sub: "Head detaches in epididymis",
      body: "Breed-associated (Guernsey bulls). Heads and tails separate spontaneously. Causes severe subfertility.",
      color: C.red,
    },
    {
      name: "Knobbed Acrosome",
      sub: "Acrosome abnormality",
      body: "Most fertility-impairing primary defect. Sperm cannot penetrate zona pellucida. Uncompensable — no cure.",
      color: C.red,
    },
    {
      name: "Nuclear Vacuoles",
      sub: "Diadem / Crater defect",
      body: "Linked to chromatin instability and sperm DNA fragmentation. Associated with early embryonic death post-fertilization.",
      color: C.dark,
    },
    {
      name: "Proximal Droplet",
      sub: "Cytoplasmic retention",
      body: "Indicates testicular immaturity or recent fever/scrotal insulation. Resolves if underlying cause is treated — monitor for 60 days.",
      color: C.mid,
    },
    {
      name: "Abaxial Tail",
      sub: "Off-center implantation",
      body: "Generally normal variation. In extreme angles, affected sperm swim in tight circles — then classified as abnormal.",
      color: C.green,
    },
  ];

  defects.forEach((d, i) => {
    const col = i % 3;
    const row = Math.floor(i / 3);
    const x = 0.3 + col * 3.2;
    const y = 0.85 + row * 2.4;

    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 3.0, h: 2.22,
      fill: { color: C.white },
      line: { color: d.color, width: 1.5 },
      shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.1 },
    });
    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 3.0, h: 0.55,
      fill: { color: d.color },
      line: { color: d.color, width: 0 },
    });
    s.addText(d.name, {
      x: x + 0.1, y: y + 0.04, w: 2.8, h: 0.3,
      fontSize: 11, bold: true, color: C.white,
      fontFace: "Calibri", margin: 0,
    });
    s.addText(d.sub, {
      x: x + 0.1, y: y + 0.32, w: 2.8, h: 0.2,
      fontSize: 8.5, color: "FFFFFFBB", italic: true,
      fontFace: "Calibri", margin: 0,
    });
    s.addText(d.body, {
      x: x + 0.12, y: y + 0.64, w: 2.76, h: 1.5,
      fontSize: 9.5, color: C.text,
      fontFace: "Calibri", margin: 0, wrap: true,
    });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — BSE CLASSIFICATION TABLE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.offwhite },
    line: { color: C.offwhite, width: 0 },
  });
  leftBar(s, C.mid);
  headerBand(s, "Breeding Soundness Examination (BSE) — Classification Summary");

  // Table
  const headers = ["Parameter", "Minimum Requirement", "Classification Impact"];
  const rows = [
    ["Gross Motility", "≥ Fair  OR  ≥ 30% progressive motility", "Must pass for Satisfactory classification"],
    ["Morphologically Normal Sperm", "≥ 70% normal morphology", "Core criterion — failure = Unsatisfactory"],
    ["Live Spermatozoa (EN stain)", "≥ 70% viable (live, unstained)", "Confirms viability alongside morphology"],
    ["Scrotal Circumference", "Age-dependent minimum (e.g., ≥ 30 cm at 15 mo)", "Correlates with daily sperm output"],
  ];

  // Header row
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0.3, y: 0.85, w: 9.4, h: 0.5,
    fill: { color: C.dark },
    line: { color: C.dark, width: 0 },
  });
  headers.forEach((h, i) => {
    const xArr = [0.35, 3.2, 6.4];
    const wArr = [2.8, 3.1, 3.25];
    s.addText(h, {
      x: xArr[i], y: 0.88, w: wArr[i], h: 0.42,
      fontSize: 10, bold: true, color: C.white,
      fontFace: "Calibri", margin: 0, valign: "middle",
    });
  });

  rows.forEach((row, ri) => {
    const y = 1.35 + ri * 0.75;
    const bg = ri % 2 === 0 ? C.white : C.light;
    s.addShape(pres.shapes.RECTANGLE, {
      x: 0.3, y, w: 9.4, h: 0.72,
      fill: { color: bg },
      line: { color: C.gray, width: 0.5 },
    });
    const xArr = [0.35, 3.2, 6.4];
    const wArr = [2.8, 3.1, 3.25];
    row.forEach((cell, ci) => {
      s.addText(cell, {
        x: xArr[ci], y: y + 0.05, w: wArr[ci], h: 0.62,
        fontSize: 9.5, bold: ci === 0, color: ci === 0 ? C.dark : C.text,
        fontFace: "Calibri", margin: 0, valign: "middle", wrap: true,
      });
    });
  });

  // Three outcome boxes
  const outcomes = [
    { label: "SATISFACTORY\nPOTENTIAL BREEDER", color: C.green, crit: "All minimum criteria met" },
    { label: "DEFERRED\n(Re-examine)", color: C.mid, crit: "Marginal results — re-examine in 60 days" },
    { label: "UNSATISFACTORY\nPOTENTIAL BREEDER", color: C.red, crit: "One or more criteria failed" },
  ];
  outcomes.forEach((o, i) => {
    const x = 0.3 + i * 3.15;
    s.addShape(pres.shapes.RECTANGLE, {
      x, y: 4.45, w: 3.0, h: 1.0,
      fill: { color: o.color },
      line: { color: o.color, width: 0 },
      shadow: { type: "outer", color: "000000", blur: 4, offset: 2, angle: 135, opacity: 0.15 },
    });
    s.addText(o.label, {
      x: x + 0.05, y: 4.48, w: 2.9, h: 0.52,
      fontSize: 10, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    s.addText(o.crit, {
      x: x + 0.05, y: 5.0, w: 2.9, h: 0.38,
      fontSize: 8, color: C.white, italic: true,
      align: "center", fontFace: "Calibri", margin: 0,
    });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — SUMMARY / CONCLUSION
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();

  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 0, w: 10, h: 5.625,
    fill: { color: C.dark },
    line: { color: C.dark, width: 0 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 4.8, w: 10, h: 0.825,
    fill: { color: C.mid },
    line: { color: C.mid, width: 0 },
  });
  s.addShape(pres.shapes.RECTANGLE, {
    x: 0, y: 4.78, w: 10, h: 0.06,
    fill: { color: C.cream },
    line: { color: C.cream, width: 0 },
  });

  s.addText("Key Takeaways", {
    x: 0.5, y: 0.15, w: 9, h: 0.65,
    fontSize: 26, bold: true, color: C.white,
    fontFace: "Calibri", margin: 0,
  });
  s.addText("Live & Dead Spermatozoa in Cattle", {
    x: 0.5, y: 0.72, w: 9, h: 0.45,
    fontSize: 14, color: C.cream, italic: true,
    fontFace: "Calibri", margin: 0,
  });

  const points = [
    { icon: "01", text: "Eosin-nigrosin (Blom, 1950) is the gold-standard viability stain — principle = dye exclusion based on membrane integrity" },
    { icon: "02", text: "Live sperm exclude eosin (white head); dead sperm absorb eosin (pink/red head); nigrosin provides dark contrast background" },
    { icon: "03", text: "≥ 70% live, morphologically normal sperm is required for a Satisfactory Potential Breeder classification in BSE" },
    { icon: "04", text: "Primary abnormalities arise in the testis (spermatogenesis) and are generally major; secondary arise post-testiculary and are generally minor" },
    { icon: "05", text: "Uncompensable defects (e.g., knobbed acrosome, diadem defect) cannot be overcome by increasing sperm numbers — most clinically dangerous" },
    { icon: "06", text: "Specific cattle defects — Dag, decapitated sperm, knobbed acrosome, proximal droplet — have distinct etiologies and varying prognoses" },
  ];

  points.forEach((p, i) => {
    const col = i % 2;
    const row = Math.floor(i / 2);
    const x = 0.35 + col * 4.9;
    const y = 1.28 + row * 1.12;

    s.addShape(pres.shapes.RECTANGLE, {
      x, y, w: 4.65, h: 1.0,
      fill: { color: "FFFFFF", transparency: 88 },
      line: { color: C.mid, width: 1 },
    });
    s.addShape(pres.shapes.ELLIPSE, {
      x: x + 0.08, y: y + 0.28, w: 0.44, h: 0.44,
      fill: { color: C.mid },
      line: { color: C.mid, width: 0 },
    });
    s.addText(p.icon, {
      x: x + 0.08, y: y + 0.28, w: 0.44, h: 0.44,
      fontSize: 9, bold: true, color: C.white,
      align: "center", valign: "middle", fontFace: "Calibri", margin: 0,
    });
    s.addText(p.text, {
      x: x + 0.62, y: y + 0.08, w: 3.95, h: 0.84,
      fontSize: 9, color: C.white,
      fontFace: "Calibri", margin: 0, wrap: true, valign: "middle",
    });
  });

  s.addText("Reference: Barth & Oko (1989). Abnormal Morphology of Bovine Spermatozoa. Iowa State University Press.", {
    x: 0.3, y: 4.85, w: 9.4, h: 0.35,
    fontSize: 8, color: "FFFFFFAA", italic: true,
    align: "center", fontFace: "Calibri", margin: 0, valign: "middle",
  });
}

// ── WRITE FILE ───────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/sperm-cattle-ppt/Live_Dead_Spermatozoa_Cattle.pptx" })
  .then(() => console.log("SUCCESS: file written"))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
Running Command

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

Running Command

node -e "const p = require('pptxgenjs'); const pr = new p(); console.log(Object.…

Running Command

sed -i 's/pres\.shapes\.ELLIPSE/pres.shapes.OVAL/g' /home/daytona/workspace/sper…

Running Command

python3 -c " content = open('/home/daytona/workspace/sperm-cattle-ppt/build.js')…

Running Command

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

Running Command

ls -lh /home/daytona/workspace/sperm-cattle-ppt/Live_Dead_Spermatozoa_Cattle.ppt…

Your presentation is ready. Here is the download link:

Live Dead Spermatozoa Cattle

Presentation · PPTX


The presentation contains 14 slides with a deep teal, coral red, and forest green color palette designed specifically for this topic:
SlideContent
1Title slide — with live (green) / dead (red) visual
2Agenda — 6 numbered topic cards
3Why assess sperm viability? — BSE, AI, and differential diagnosis
4Eosin-nigrosin: history & principle — membrane permeability diagrams
5Reagents & step-by-step procedure (one-step method)
6Interpretation: live vs dead table + pitfalls (leaky neck, warm slides, incubation time)
7Hypoosmotic swelling (HOS) test — positive vs negative outcome diagrams
8Classification systems — all 4 systems (Primary/Secondary, Major/Minor, Compensable/Uncompensable, Anatomical)
9Primary abnormalities — 9 defect cards with detail
10Secondary abnormalities — 8 defect cards with detail
11Compensable vs. Uncompensable — side-by-side comparison with examples
12Clinically notable defects — Dag, decapitated, knobbed acrosome, diadem, proximal droplet, abaxial
13BSE classification table — Satisfactory / Deferred / Unsatisfactory criteria
14Summary / Key Takeaways — 6 points on dark background

Retry

Running Command

ls /home/daytona/workspace/sperm-cattle-ppt/ && echo "---" && node -e "const p =…

Writing File

~/sperm-cattle-ppt/build2.js

const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Live and Dead Spermatozoa in Cattle";

// ── PALETTE (all 6-digit hex, no alpha) ─────────────────────────────────────
const C = {
  dark:    "0D4F5C",   // deep teal
  mid:     "2A8C9E",   // medium teal
  light:   "E8F5F8",   // pale teal
  cream:   "F5EDD6",   // warm cream
  red:     "C94040",   // coral red  = dead
  green:   "2E7D52",   // forest green = live
  white:   "FFFFFF",
  offwhite:"F7F9F9",
  text:    "1A2E35",
  sub:     "3D6B77",
  gray:    "B0C4CC",
  lgray:   "E2EAEC",
};

// ── HELPERS ──────────────────────────────────────────────────────────────────
function bg(s, color) {
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:10, h:5.625,
    fill:{color}, line:{color, width:0} });
}
function leftBar(s, color) {
  s.addShape(pres.shapes.RECTANGLE, { x:0, y:0, w:0.18, h:5.625,
    fill:{color}, line:{color, width:0} });
}
function hdr(s, title, bg_col, fg_col) {
  bg_col = bg_col || C.dark; fg_col = fg_col || C.white;
  s.addShape(pres.shapes.RECTANGLE, { x:0.18, y:0, w:9.82, h:0.72,
    fill:{color:bg_col}, line:{color:bg_col, width:0} });
  s.addText(title, { x:0.38, y:0.06, w:9.42, h:0.60,
    fontSize:19, bold:true, color:fg_col, fontFace:"Calibri",
    margin:0, valign:"middle" });
}
function rect(s, x, y, w, h, fill, lineColor, lineW) {
  lineColor = lineColor || fill; lineW = lineW || 0;
  s.addShape(pres.shapes.RECTANGLE, { x,y,w,h,
    fill:{color:fill}, line:{color:lineColor, width:lineW} });
}
function oval(s, x, y, w, h, fill, lineColor, lineW) {
  lineColor = lineColor || fill; lineW = lineW || 0;
  s.addShape(pres.shapes.OVAL, { x,y,w,h,
    fill:{color:fill}, line:{color:lineColor, width:lineW} });
}
function txt(s, text, x, y, w, h, opts) {
  opts = opts || {};
  s.addText(text, Object.assign({
    x,y,w,h, fontFace:"Calibri", margin:0
  }, opts));
}
function card(s, x, y, w, h, headerColor, headerText, headerFontSize) {
  s.addShape(pres.shapes.RECTANGLE, { x,y,w,h,
    fill:{color:C.white}, line:{color:C.lgray, width:1},
    shadow:{type:"outer",color:"000000",blur:4,offset:2,angle:135,opacity:0.1} });
  s.addShape(pres.shapes.RECTANGLE, { x, y, w, h:0.46,
    fill:{color:headerColor}, line:{color:headerColor, width:0} });
  txt(s, headerText, x, y, w, 0.46,
    { fontSize:headerFontSize||11, bold:true, color:C.white,
      align:"center", valign:"middle" });
}
function numberedBullet(s, n, text, x, y, w, bulletColor) {
  oval(s, x, y+0.03, 0.36, 0.36, bulletColor || C.mid);
  txt(s, String(n), x, y+0.03, 0.36, 0.36,
    { fontSize:10, bold:true, color:C.white, align:"center", valign:"middle" });
  txt(s, text, x+0.44, y, w-0.44, 0.42,
    { fontSize:9.5, color:C.text, valign:"middle", wrap:true });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.dark);

  // right panel
  rect(s, 6.4, 0, 3.6, 5.625, C.mid);
  rect(s, 6.25, 0, 0.1, 5.625, C.cream);

  // decorative circles on right panel
  oval(s, 6.75, 0.3, 1.35, 1.35, C.green, C.white, 2);
  txt(s,"LIVE", 6.75, 0.72, 1.35, 0.5,
    { fontSize:15, bold:true, color:C.white, align:"center" });
  oval(s, 8.3, 0.3, 1.35, 1.35, C.red, C.white, 2);
  txt(s,"DEAD", 8.3, 0.72, 1.35, 0.5,
    { fontSize:15, bold:true, color:C.white, align:"center" });

  // sperm decorative ovals
  for (let i=0; i<5; i++) {
    oval(s, 6.65+i*0.52, 4.4, 0.28, 0.18, "3BA8BB");
  }

  // main text
  txt(s,"Live and Dead", 0.4, 0.9, 5.7, 0.85,
    { fontSize:30, bold:true, color:C.white });
  txt(s,"Spermatozoa in Cattle", 0.4, 1.72, 5.7, 0.85,
    { fontSize:30, bold:true, color:C.cream });
  txt(s,"Eosin-Nigrosin Staining · Viability Principles · Morphological Abnormalities",
    0.4, 2.7, 5.7, 0.55,
    { fontSize:11.5, italic:true, color:C.gray });
  txt(s,"Veterinary Reproductive Biology", 0.4, 5.1, 5.7, 0.35,
    { fontSize:10, color:C.gray });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — AGENDA
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.mid);
  hdr(s, "Agenda");

  const items = [
    ["01","Why Assess Sperm Viability?","BSE & the 70% fertility threshold"],
    ["02","Eosin-Nigrosin Staining","History, principle & dye-exclusion mechanism"],
    ["03","Reagents & Procedure","One-step method, step-by-step"],
    ["04","Interpretation & Pitfalls","Live vs. dead; special cases"],
    ["05","Sperm Abnormality Classification","4 classification systems"],
    ["06","Primary Abnormalities","Testicular origin; major defects"],
    ["07","Secondary Abnormalities","Post-testicular; minor defects"],
    ["08","Compensable vs. Uncompensable","Fertility implications & BSE outcomes"],
  ];
  items.forEach((item, i) => {
    const col = i < 4 ? 0 : 1;
    const row = i % 4;
    const x = 0.32 + col * 4.88;
    const y = 0.88 + row * 1.17;
    rect(s, x, y, 4.6, 1.08, C.white, C.lgray, 1);
    rect(s, x, y, 0.52, 1.08, C.mid);
    txt(s, item[0], x, y+0.3, 0.52, 0.46,
      { fontSize:13, bold:true, color:C.white, align:"center" });
    txt(s, item[1], x+0.62, y+0.06, 3.9, 0.45,
      { fontSize:11, bold:true, color:C.text });
    txt(s, item[2], x+0.62, y+0.55, 3.9, 0.44,
      { fontSize:9, italic:true, color:C.sub });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — WHY ASSESS SPERM VIABILITY
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.green);
  hdr(s, "Why Assess Sperm Viability?");

  // big stat
  rect(s, 3.6, 0.9, 2.8, 1.3, C.dark);
  txt(s,"≥ 70%", 3.6, 0.93, 2.8, 0.7,
    { fontSize:34, bold:true, color:C.cream, align:"center" });
  txt(s,"Normal viable sperm\nfor Satisfactory Potential Breeder",
    3.6, 1.6, 2.8, 0.54,
    { fontSize:8.5, color:C.gray, align:"center" });

  // three reason cards
  const cards = [
    { x:0.32, color:C.green, icon:"BSE",
      title:"Breeding Soundness Exam",
      body:"Core evaluation of bull fertility before the breeding season. Includes motility, morphology, and viability assessment." },
    { x:3.66, color:C.mid, icon:"AI",
      title:"Artificial Insemination",
      body:"Viability must be confirmed in chilled and frozen-thawed semen. Dead sperm in AI doses reduce conception rates." },
    { x:6.99, color:C.red, icon:"DX",
      title:"Differential Diagnosis",
      body:"Differentiates asthenozoospermia (alive but immotile) from necrozoospermia (high proportion of dead sperm)." },
  ];
  cards.forEach(c => {
    rect(s, c.x, 2.35, 3.1, 3.05, C.white, C.lgray, 1);
    rect(s, c.x, 2.35, 3.1, 0.5, c.color);
    txt(s, c.icon, c.x, 2.37, 3.1, 0.46,
      { fontSize:13, bold:true, color:C.white, align:"center", valign:"middle" });
    txt(s, c.title, c.x+0.12, 2.94, 2.86, 0.46,
      { fontSize:11, bold:true, color:C.text });
    txt(s, c.body, c.x+0.12, 3.44, 2.86, 1.86,
      { fontSize:9.5, color:C.sub, wrap:true });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — EOSIN-NIGROSIN PRINCIPLE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.mid);
  hdr(s, "Eosin-Nigrosin Staining — History & Principle");

  // History box
  card(s, 0.3, 0.86, 4.4, 1.95, C.mid, "HISTORY");
  txt(s, [
    {text:"Developed by ", options:{fontSize:9.5, color:C.text}},
    {text:"Blom (1950)", options:{fontSize:9.5, bold:true, color:C.dark}},
    {text:" for bull semen evaluation\n", options:{fontSize:9.5, color:C.text}},
    {text:"• Originally two-step; now one-step method\n", options:{fontSize:9.5, color:C.text}},
    {text:"• Gold standard ", options:{fontSize:9.5, bold:true, color:C.dark}},
    {text:"in veterinary & human reproductive labs\n", options:{fontSize:9.5, color:C.text}},
    {text:"• Validated against WHO semen standards (Bjorndahl et al., 2003)", options:{fontSize:9.5, color:C.text}},
  ], { x:0.45, y:1.4, w:4.1, h:1.3, fontFace:"Calibri", margin:0 });

  // Principle box
  card(s, 5.0, 0.86, 4.65, 1.95, C.dark, "PRINCIPLE — DYE EXCLUSION METHOD", 10);
  txt(s, [
    {text:"INTACT membrane (live):\n", options:{fontSize:9.5, bold:true, color:C.green}},
    {text:"  Semi-permeable → Eosin excluded → Head stays WHITE\n\n", options:{fontSize:9.5, color:C.text}},
    {text:"DAMAGED membrane (dead):\n", options:{fontSize:9.5, bold:true, color:C.red}},
    {text:"  Porous → Eosin penetrates → Head stains PINK/RED\n\n", options:{fontSize:9.5, color:C.text}},
    {text:"Nigrosin: ", options:{fontSize:9.5, bold:true, color:C.dark}},
    {text:"black background dye → improves contrast only", options:{fontSize:9.5, color:C.text}},
  ], { x:5.15, y:1.4, w:4.4, h:1.3, fontFace:"Calibri", margin:0 });

  // Live / Dead visual
  rect(s, 0.3, 3.0, 9.35, 2.45, C.white, C.lgray, 1);
  txt(s,"VISUAL DIAGRAM", 0.3, 3.0, 9.35, 0.38,
    { fontSize:10, bold:true, color:C.sub, align:"center", valign:"middle" });

  // --- LIVE SPERM ---
  txt(s,"LIVE SPERMATOZOON", 0.55, 3.46, 3.5, 0.32,
    { fontSize:10, bold:true, color:C.green, align:"center" });
  // head (white, green border)
  oval(s, 0.75, 3.84, 0.7, 0.42, C.white, C.green, 2.5);
  // midpiece
  rect(s, 1.44, 4.02, 0.55, 0.07, C.green);
  // tail
  rect(s, 1.98, 3.98, 1.1, 0.06, C.green);
  // label
  txt(s,"Unstained head (white)", 0.55, 4.35, 3.0, 0.32,
    { fontSize:8.5, italic:true, color:C.green, align:"center" });

  // --- MEMBRANE COMPARISON ---
  txt(s,"MEMBRANE INTEGRITY", 3.75, 3.42, 2.5, 0.32,
    { fontSize:9, bold:true, color:C.sub, align:"center" });
  oval(s, 3.85, 3.8, 1.1, 1.1, C.light, C.green, 2.5);
  txt(s,"Intact\n✓", 3.85, 4.05, 1.1, 0.6,
    { fontSize:9, bold:true, color:C.green, align:"center" });
  oval(s, 5.1, 3.8, 1.1, 1.1, "FDEAEA", C.red, 2.5);
  txt(s,"Porous\n✗", 5.1, 4.05, 1.1, 0.6,
    { fontSize:9, bold:true, color:C.red, align:"center" });

  // --- DEAD SPERM ---
  txt(s,"DEAD SPERMATOZOON", 6.2, 3.46, 3.2, 0.32,
    { fontSize:10, bold:true, color:C.red, align:"center" });
  oval(s, 6.3, 3.84, 0.7, 0.42, "FBBCBC", C.red, 2.5);
  rect(s, 6.99, 4.02, 0.55, 0.07, C.red);
  rect(s, 7.53, 3.98, 1.1, 0.06, C.red);
  txt(s,"Pink/red stained head", 6.2, 4.35, 3.0, 0.32,
    { fontSize:8.5, italic:true, color:C.red, align:"center" });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — REAGENTS & PROCEDURE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.mid);
  hdr(s, "Reagents & Step-by-Step Procedure (One-Step Method)");

  // Reagents
  card(s, 0.3, 0.85, 3.55, 4.55, C.mid, "REAGENTS", 12);
  const reagents = [
    {name:"Eosin Y  (5%)", role:"Vital dye — stains dead cells pink/red", dot:C.red},
    {name:"Nigrosin  (10%)", role:"Background dye — dark contrast only", dot:C.dark},
    {name:"Distilled Water", role:"Solvent for stain preparation", dot:C.sub},
    {name:"Warm Slide (37 °C)", role:"Prevents cold-shock artefact", dot:C.mid},
  ];
  reagents.forEach((r,i) => {
    const y = 1.44 + i*1.0;
    rect(s, 0.46, y+0.14, 0.12, 0.62, r.dot);
    txt(s, r.name, 0.66, y+0.04, 3.05, 0.38,
      { fontSize:11, bold:true, color:C.text });
    txt(s, r.role, 0.66, y+0.44, 3.05, 0.34,
      { fontSize:9, italic:true, color:C.sub });
  });

  // Steps
  card(s, 4.1, 0.85, 5.55, 4.55, C.dark, "PROCEDURE", 12);
  const steps = [
    "Place a small drop of fresh semen on a warm slide (37 °C)",
    "Add an equal volume of eosin-nigrosin stain solution",
    "Mix gently and incubate approximately 30 seconds at 37 °C",
    "Make a thin smear and allow to air-dry completely",
    "Examine under bright-field microscope at ×400–1000",
    "Count a minimum of 200 spermatozoa per slide",
    "Record % unstained heads (live) and % pink heads (dead)",
  ];
  steps.forEach((step, i) => {
    const y = 1.42 + i * 0.56;
    oval(s, 4.26, y+0.04, 0.36, 0.36, C.mid);
    txt(s, String(i+1), 4.26, y+0.04, 0.36, 0.36,
      { fontSize:10, bold:true, color:C.white, align:"center", valign:"middle" });
    txt(s, step, 4.72, y+0.04, 4.75, 0.38,
      { fontSize:9.5, color:C.text, valign:"middle", wrap:true });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — INTERPRETATION & PITFALLS
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.green);
  hdr(s, "Interpretation of Results & Pitfalls");

  // Result table header
  rect(s, 0.3, 0.84, 9.35, 0.44, C.mid);
  [["Cell Status",0.35,1.8],["Membrane Integrity",2.2,2.4],["Eosin Entry",4.65,1.6],["Microscopic Appearance",6.3,3.3]]
    .forEach(([h,x,w]) => txt(s, h, x, 0.87, w, 0.38,
      { fontSize:10, bold:true, color:C.white, valign:"middle" }));

  // Live row
  rect(s, 0.3, 1.28, 9.35, 0.6, "E8F8F0", C.lgray, 0.5);
  [["LIVE",C.green],["Intact (semi-permeable)",C.text],["EXCLUDED",C.green],["White / unstained head",C.green]]
    .forEach(([cell,color],i) => {
      const xs=[0.38,2.22,4.67,6.32]; const ws=[1.78,2.36,1.56,3.28];
      txt(s, cell, xs[i], 1.31, ws[i], 0.54,
        { fontSize:10, bold:i===0||i===2, color, valign:"middle" });
    });

  // Dead row
  rect(s, 0.3, 1.88, 9.35, 0.6, "FFF0F0", C.lgray, 0.5);
  [["DEAD",C.red],["Damaged / porous",C.text],["ENTERS CELL",C.red],["Pink to dark-red head",C.red]]
    .forEach(([cell,color],i) => {
      const xs=[0.38,2.22,4.67,6.32]; const ws=[1.78,2.36,1.56,3.28];
      txt(s, cell, xs[i], 1.91, ws[i], 0.54,
        { fontSize:10, bold:i===0||i===2, color, valign:"middle" });
    });

  // Pitfalls
  card(s, 0.3, 2.62, 9.35, 2.78, C.dark, "SPECIAL NOTES & PITFALLS", 11);
  const notes = [
    {icon:"⚠", col:C.cream, t:"Leaky neck membrane: stain confined only to neck, head unstained → Count as LIVE (not true cell death)"},
    {icon:"✓", col:C.light, t:"Validation: % Dead (EN) + % Motile (wet mount) must total < 100%. If it exceeds 100%, a method error has occurred"},
    {icon:"❄", col:C.light, t:"Use warm slides (37 °C) — cold shock damages membranes artificially, inflating the dead-cell percentage"},
    {icon:"⏱", col:C.cream, t:"Optimal incubation ~30 seconds. Over-incubation → false positives; under-incubation → poor contrast"},
  ];
  notes.forEach((n,i) => {
    const y = 3.18 + i*0.54;
    rect(s, 0.42, y, 0.38, 0.42, n.col, C.lgray, 0);
    txt(s, n.icon, 0.42, y, 0.38, 0.42,
      { fontSize:13, align:"center", valign:"middle" });
    txt(s, n.t, 0.9, y+0.04, 8.6, 0.38,
      { fontSize:9.5, color:C.text, valign:"middle", wrap:true });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — HYPOOSMOTIC SWELLING TEST
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.mid);
  hdr(s, "Alternative Viability Method: Hypoosmotic Swelling (HOS) Test");

  card(s, 0.3, 0.84, 9.35, 1.62, C.mid, "PRINCIPLE", 12);
  txt(s,
    "A live sperm with an intact functional membrane placed in hypoosmotic solution (~150 mOsm) absorbs water by osmosis → " +
    "tail coils or curls (positive HOS).\nA dead sperm with a non-functional membrane does NOT swell → tail remains straight (negative HOS).",
    { x:0.45, y:1.38, w:9.1, h:1.0, fontSize:10, color:C.text, fontFace:"Calibri", margin:0, wrap:true });

  // Positive
  rect(s, 0.3, 2.62, 4.55, 2.78, C.white, C.green, 2);
  rect(s, 0.3, 2.62, 4.55, 0.5, C.green);
  txt(s,"POSITIVE HOS — Live Cell", 0.3, 2.64, 4.55, 0.46,
    { fontSize:11, bold:true, color:C.white, align:"center", valign:"middle" });
  txt(s,"Intact membrane → Water influx → Tail coils / curls\n\nResult: SPERM IS ALIVE",
    0.45, 3.2, 4.25, 1.0,
    { fontSize:10, color:C.text, wrap:true });
  // coiled tail drawing
  oval(s, 0.55, 4.35, 0.52, 0.32, C.green, C.green, 0);
  rect(s, 1.06, 4.47, 0.6, 0.06, C.green);
  oval(s, 1.6, 4.2, 0.48, 0.48, C.white, C.green, 2);
  txt(s,"(tail coiled = LIVE)", 0.5, 4.78, 3.5, 0.28,
    { fontSize:8.5, italic:true, color:C.green, align:"center" });

  // Negative
  rect(s, 5.1, 2.62, 4.55, 2.78, C.white, C.red, 2);
  rect(s, 5.1, 2.62, 4.55, 0.5, C.red);
  txt(s,"NEGATIVE HOS — Dead Cell", 5.1, 2.64, 4.55, 0.46,
    { fontSize:11, bold:true, color:C.white, align:"center", valign:"middle" });
  txt(s,"Damaged membrane → No swelling → Tail stays straight\n\nResult: SPERM IS DEAD",
    5.25, 3.2, 4.25, 1.0,
    { fontSize:10, color:C.text, wrap:true });
  // straight tail
  oval(s, 5.3, 4.35, 0.52, 0.32, C.red);
  rect(s, 5.81, 4.47, 1.35, 0.06, C.red);
  txt(s,"(tail straight = DEAD)", 5.25, 4.78, 3.5, 0.28,
    { fontSize:8.5, italic:true, color:C.red, align:"center" });

  // Note
  rect(s, 0.3, 5.38, 9.35, 0.22, C.cream, C.lgray, 1);
  txt(s,"Note: EN staining remains the gold standard for cattle — HOS is an alternative when staining is unavailable.",
    0.45, 5.39, 9.1, 0.2,
    { fontSize:8, italic:true, color:C.sub, valign:"middle" });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — CLASSIFICATION SYSTEMS
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.red);
  hdr(s, "Classification Systems for Bovine Sperm Abnormalities");

  const sys = [
    { title:"Primary / Secondary", auth:"Blom, 1950", col:C.dark,
      body:"Based on SITE OF ORIGIN\n• Primary = Spermatogenesis in testis\n• Secondary = Post-testicular (epididymis, ejaculation, handling)" },
    { title:"Major / Minor", auth:"Blom, 1971", col:C.mid,
      body:"Based on SIGNIFICANCE to fertility\n• Major defects — seriously impair or eliminate fertility\n• Minor defects — little or no effect on fertility" },
    { title:"Compensable vs Uncompensable", auth:"Saacke, 1990", col:C.red,
      body:"Based on MODE OF ACTION\n• Compensable — more sperm overcomes effect\n• Uncompensable — increasing numbers CANNOT compensate" },
    { title:"Anatomical Location", auth:"Descriptive", col:C.green,
      body:"Based on STRUCTURAL SITE\n• Head defects (shape, acrosome, nucleus)\n• Midpiece defects | Tail defects\n• Cytoplasmic droplets (proximal / distal)" },
  ];
  sys.forEach((sy,i) => {
    const col = i%2; const row = Math.floor(i/2);
    const x = 0.28 + col*4.88;
    const y = 0.86 + row*2.38;
    rect(s, x, y, 4.62, 2.2, C.white, C.lgray, 1);
    rect(s, x, y, 4.62, 0.5, sy.col);
    txt(s, sy.title, x+0.1, y+0.03, 3.7, 0.44,
      { fontSize:11, bold:true, color:C.white, valign:"middle" });
    txt(s, sy.auth, x+3.8, y+0.1, 0.75, 0.3,
      { fontSize:8, italic:true, color:C.lgray, align:"right" });
    txt(s, sy.body, x+0.15, y+0.58, 4.32, 1.55,
      { fontSize:9.5, color:C.text, wrap:true });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — PRIMARY ABNORMALITIES
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.dark);
  hdr(s, "Primary Abnormalities — Origin: Spermatogenesis (Testis) — MAJOR Defects");

  const prims = [
    ["Underdeveloped / Small Heads","Immature nucleus; poor chromatin condensation; spermatogenic failure"],
    ["Double Forms","Bicephalic or biflagellate — failed cytokinesis during spermiogenesis"],
    ["Knobbed / Missing Acrosome","Cannot penetrate zona pellucida — most fertility-damaging; uncompensable"],
    ["Narrow / Pyriform Heads","Tapered or pear-shaped heads; poor DNA integrity; associated with infertility"],
    ["Crater / Diadem Defect","Nuclear vacuoles — chromatin instability → early embryonic death post-fertilization"],
    ["Proximal Cytoplasmic Droplet","Retained cytoplasm near neck — indicates testicular immaturity or heat stress"],
    ["Abnormal Midpiece","Coiled, bent, or thickened midpiece — impairs motility and ATP production"],
    ["Accessory Tails","Extra axonemal structures; usually genetic in origin; may impair fertility"],
    ["Strongly Coiled Tail","Tight proximal coiling — testicular origin; different from distal cold-shock coil"],
  ];
  prims.forEach((p,i) => {
    const col=i%3; const row=Math.floor(i/3);
    const x=0.28+col*3.22; const y=0.85+row*1.6;
    rect(s, x, y, 3.08, 1.52, C.white, C.lgray, 0.5);
    rect(s, x, y, 0.16, 1.52, C.dark);
    txt(s, p[0], x+0.24, y+0.06, 2.78, 0.42,
      { fontSize:9.5, bold:true, color:C.dark });
    txt(s, p[1], x+0.24, y+0.5, 2.78, 0.96,
      { fontSize:8.5, color:C.sub, wrap:true });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — SECONDARY ABNORMALITIES
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.mid);
  hdr(s, "Secondary Abnormalities — Origin: Epididymis / Post-Ejaculation — MINOR Defects");

  const secs = [
    ["Small Normal Heads","Slightly reduced size, normal shape — minor significance"],
    ["Giant / Short Broad Heads","Abnormal nuclear size from epididymal malfunction"],
    ["Detached / Loose Acrosome","Partially lifted acrosomal membrane — less severe than primary acrosome defects"],
    ["Abaxial Implantation","Off-center tail attachment — mostly normal variation; extreme cases swim in circles"],
    ["Distal Cytoplasmic Droplet","Droplet migrated to principal piece — minor; common in young bulls"],
    ["Detached Heads","Separation of head from tail — often processing or cold-shock artefact"],
    ["Simple Bent Tail","Single tail bend — cold shock during handling; largely artefactual"],
    ["Distal Coiled Tail","Terminal piece coiling — hypoosmotic stress; less serious than proximal coil"],
  ];
  secs.forEach((p,i) => {
    const col=i%4; const row=Math.floor(i/4);
    const x=0.24+col*2.42; const y=0.85+row*2.38;
    rect(s, x, y, 2.28, 2.2, C.white, C.lgray, 0.5);
    rect(s, x, y, 2.28, 0.4, C.mid);
    txt(s, p[0], x+0.08, y+0.04, 2.12, 0.34,
      { fontSize:8.5, bold:true, color:C.white, valign:"middle", wrap:true });
    txt(s, p[1], x+0.1, y+0.48, 2.08, 1.65,
      { fontSize:8.5, color:C.sub, wrap:true });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — COMPENSABLE vs UNCOMPENSABLE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.red);
  hdr(s, "Compensable vs. Uncompensable Sperm Defects");

  // Compensable
  rect(s, 0.28, 0.84, 4.42, 4.6, C.white, C.green, 2);
  rect(s, 0.28, 0.84, 4.42, 0.5, C.green);
  txt(s,"COMPENSABLE", 0.28, 0.86, 4.42, 0.46,
    { fontSize:13, bold:true, color:C.white, align:"center", valign:"middle" });
  txt(s,[
    {text:"Definition:\n", options:{bold:true, fontSize:10, color:C.dark}},
    {text:"Defective sperm fail to fertilize but do NOT block competing normal sperm. ",options:{fontSize:10,color:C.text}},
    {text:"Increasing inseminated sperm numbers can overcome the fertility loss.\n\n",options:{fontSize:10,color:C.text}},
    {text:"Examples:\n", options:{bold:true, fontSize:10, color:C.green}},
    {text:"• Detached heads\n• Distal cytoplasmic droplets\n• Distal coiled tails\n• Abaxial implantation\n• Simple bent tails\n\n",options:{fontSize:10,color:C.text}},
    {text:"Clinical note:\n", options:{bold:true, fontSize:10, color:C.dark}},
    {text:"More critical in AI (fixed sperm dose) than in natural service.",options:{fontSize:10,color:C.sub}},
  ], { x:0.42, y:1.44, w:4.1, h:3.9, fontFace:"Calibri", margin:0, wrap:true });

  // Uncompensable
  rect(s, 5.3, 0.84, 4.42, 4.6, C.white, C.red, 2);
  rect(s, 5.3, 0.84, 4.42, 0.5, C.red);
  txt(s,"UNCOMPENSABLE", 5.3, 0.86, 4.42, 0.46,
    { fontSize:13, bold:true, color:C.white, align:"center", valign:"middle" });
  txt(s,[
    {text:"Definition:\n", options:{bold:true, fontSize:10, color:C.dark}},
    {text:"Defective sperm actively interfere with normal sperm function — occupying binding sites without fertilizing. ",options:{fontSize:10,color:C.text}},
    {text:"More sperm CANNOT compensate.\n\n",options:{fontSize:10,color:C.text}},
    {text:"Examples:\n", options:{bold:true, fontSize:10, color:C.red}},
    {text:"• Knobbed / missing acrosome\n• Nuclear vacuoles (diadem defect)\n• Certain abnormal head shapes\n• Decapitated sperm defect\n• Dag defect (coiled midpiece)\n\n",options:{fontSize:10,color:C.text}},
    {text:"Clinical note:\n", options:{bold:true, fontSize:10, color:C.dark}},
    {text:"Dangerous in natural mating — bull should be classified UNSATISFACTORY.",options:{fontSize:10,color:C.sub}},
  ], { x:5.44, y:1.44, w:4.1, h:3.9, fontFace:"Calibri", margin:0, wrap:true });

  txt(s,"vs.", 4.7, 2.85, 0.6, 0.55,
    { fontSize:20, bold:true, color:C.gray, align:"center", valign:"middle" });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — NOTABLE SPECIFIC DEFECTS
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.dark);
  hdr(s, "Clinically Notable Sperm Defects in Cattle");

  const defects = [
    {name:"Dag Defect",sub:"Coiled midpiece",body:"Genetic; seen in Guernsey & other breeds. Severely impairs motility. Affected bull should be culled.",col:C.dark},
    {name:"Decapitated Sperm",sub:"Head detaches in epididymis",body:"Breed-associated (Guernsey bulls). Heads and tails separate spontaneously during epididymal transit → severe subfertility.",col:C.red},
    {name:"Knobbed Acrosome",sub:"Primary acrosome defect",body:"Most fertility-impairing defect. Sperm cannot penetrate zona pellucida. Uncompensable — bull should fail BSE.",col:C.red},
    {name:"Nuclear Vacuoles",sub:"Diadem / Crater defect",body:"Chromatin instability and DNA fragmentation. Associated with fertilization failure and early embryonic death.",col:C.dark},
    {name:"Proximal Droplet",sub:"Cytoplasmic retention at neck",body:"Indicates immaturity or fever / scrotal insulation. Re-examine after 60 days (one full spermatogenic cycle) if cause identified.",col:C.mid},
    {name:"Abaxial Tail",sub:"Off-center insertion",body:"Usually a normal variation. Extreme cases cause circular swimming. Only abnormal when holding sperm at acute angle.",col:C.green},
  ];
  defects.forEach((d,i) => {
    const col=i%3; const row=Math.floor(i/3);
    const x=0.28+col*3.22; const y=0.84+row*2.4;
    rect(s, x, y, 3.06, 2.24, C.white, d.col, 1.5);
    rect(s, x, y, 3.06, 0.54, d.col);
    txt(s, d.name, x+0.1, y+0.04, 2.86, 0.3,
      { fontSize:11, bold:true, color:C.white });
    txt(s, d.sub, x+0.1, y+0.32, 2.86, 0.2,
      { fontSize:8.5, italic:true, color:C.lgray });
    txt(s, d.body, x+0.12, y+0.62, 2.82, 1.55,
      { fontSize:9, color:C.text, wrap:true });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — BSE CLASSIFICATION TABLE
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.offwhite);
  leftBar(s, C.mid);
  hdr(s, "Bull Breeding Soundness Examination (BSE) — Classification Criteria");

  // Table header
  rect(s, 0.28, 0.84, 9.44, 0.46, C.dark);
  [["Parameter",0.34,2.6],["Minimum Requirement",2.96,3.3],["Classification Significance",6.3,3.38]]
    .forEach(([h,x,w]) => txt(s,h, x, 0.87, w, 0.4,
      { fontSize:10, bold:true, color:C.white, valign:"middle" }));

  const rows = [
    ["Gross Motility","≥ Fair  OR  ≥ 30% progressive motility","Must pass — below minimum = Unsatisfactory"],
    ["Morphologically Normal Sperm","≥ 70% normal morphology","Core criterion — most commonly failed"],
    ["Live Spermatozoa (EN stain)","≥ 70% viable (unstained by eosin)","Confirms vitality alongside morphology"],
    ["Scrotal Circumference","Age-dependent minimum (e.g. ≥ 30 cm at 15 mo)","Correlates with daily sperm output & capacity"],
  ];
  rows.forEach((row,ri) => {
    const y = 1.3 + ri*0.78;
    const bgc = ri%2===0 ? C.white : C.light;
    rect(s, 0.28, y, 9.44, 0.75, bgc, C.lgray, 0.5);
    [row[0],row[1],row[2]].forEach((cell,ci) => {
      const xs=[0.34,2.96,6.3]; const ws=[2.56,3.24,3.34];
      txt(s, cell, xs[ci], y+0.06, ws[ci], 0.62,
        { fontSize:9.5, bold:ci===0, color:ci===0?C.dark:C.text,
          valign:"middle", wrap:true });
    });
  });

  // Outcome boxes
  const outcomes = [
    {label:"SATISFACTORY\nPOTENTIAL BREEDER",col:C.green,note:"All minimum criteria met"},
    {label:"DEFERRED\n(Re-examine in 60 days)",col:C.mid,note:"Marginal results — one cycle recovery"},
    {label:"UNSATISFACTORY\nPOTENTIAL BREEDER",col:C.red,note:"One or more criteria failed"},
  ];
  outcomes.forEach((o,i) => {
    const x=0.28+i*3.18;
    rect(s, x, 4.5, 3.06, 0.94, o.col);
    txt(s, o.label, x+0.05, 4.53, 2.96, 0.52,
      { fontSize:10, bold:true, color:C.white, align:"center", valign:"middle" });
    txt(s, o.note, x+0.05, 5.04, 2.96, 0.35,
      { fontSize:8, italic:true, color:C.lgray, align:"center" });
  });
}

// ════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — SUMMARY
// ════════════════════════════════════════════════════════════════════════════
{
  const s = pres.addSlide();
  bg(s, C.dark);
  rect(s, 0, 4.85, 10, 0.775, C.mid);
  rect(s, 0, 4.82, 10, 0.06, C.cream);

  txt(s,"Key Takeaways", 0.45, 0.12, 9, 0.66,
    { fontSize:27, bold:true, color:C.white });
  txt(s,"Live & Dead Spermatozoa in Cattle", 0.45, 0.72, 9, 0.42,
    { fontSize:13, italic:true, color:C.cream });

  const pts = [
    "Eosin-nigrosin (Blom, 1950) is the gold-standard viability stain based on membrane dye-exclusion",
    "Live sperm exclude eosin (white head); dead sperm absorb it (pink/red head); nigrosin provides dark background contrast",
    "≥ 70% live, morphologically normal sperm is required for a Satisfactory Potential Breeder in BSE",
    "Primary abnormalities arise in the testis (major defects); secondary arise post-testicularly (generally minor)",
    "Uncompensable defects (knobbed acrosome, diadem) cannot be overcome by more sperm — most clinically dangerous",
    "Notable cattle defects: Dag, decapitated sperm, knobbed acrosome, proximal droplet — each with distinct etiology",
  ];
  pts.forEach((p,i) => {
    const col=i%2; const row=Math.floor(i/2);
    const x=0.32+col*4.88; const y=1.25+row*1.18;
    rect(s, x, y, 4.68, 1.08, "1E6678", "3BA8BB", 1);
    oval(s, x+0.1, y+0.32, 0.44, 0.44, C.mid);
    txt(s, String(i+1).padStart(2,"0"), x+0.1, y+0.32, 0.44, 0.44,
      { fontSize:9, bold:true, color:C.white, align:"center", valign:"middle" });
    txt(s, p, x+0.64, y+0.1, 3.96, 0.88,
      { fontSize:9, color:C.white, valign:"middle", wrap:true });
  });

  txt(s,"Reference: Barth & Oko (1989). Abnormal Morphology of Bovine Spermatozoa. Iowa State University Press.",
    0.3, 4.9, 9.4, 0.32,
    { fontSize:7.5, italic:true, color:C.lgray, align:"center", valign:"middle" });
}

// ── WRITE ───────────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/sperm-cattle-ppt/Live_Dead_Spermatozoa_Cattle_v2.pptx" })
  .then(() => console.log("SUCCESS"))
  .catch(err => { console.error("ERROR:", err); process.exit(1); });
Running Command

cd /home/daytona/workspace/sperm-cattle-ppt && node build2.js 2>&1

Running Command

ls -lh /home/daytona/workspace/sperm-cattle-ppt/Live_Dead_Spermatozoa_Cattle_v2.…

Live Dead Spermatozoa Cattle v2

Presentation · PPTX


Clean rebuild - zero errors or warnings. Here's what's inside the 14-slide deck:
#Slide
1Title slide - live (green) & dead (red) sperm circles, decorative layout
2Agenda - 8 numbered topic cards
3Why assess viability? - 70% stat box + BSE / AI / DX cards
4EN principle - history card, dye-exclusion diagram, live vs dead visual with sperm drawings
5Reagents & 7-step procedure
6Interpretation table (live/dead rows) + 4 pitfall notes
7HOS test - positive (coiled tail) vs negative (straight tail) diagrams
84 classification systems - Primary/Secondary, Major/Minor, Compensable/Uncompensable, Anatomical
99 Primary abnormality cards (testicular origin)
108 Secondary abnormality cards (epididymal/handling origin)
11Compensable vs Uncompensable - side-by-side comparison
126 clinically notable defects (Dag, Decapitated, Knobbed acrosome, Diadem, Proximal droplet, Abaxial)
13BSE classification table + Satisfactory / Deferred / Unsatisfactory outcome boxes
14Dark summary slide - 6 key takeaways + reference

Ppt not downloading

Running Command

ls -lh /home/daytona/workspace/sperm-cattle-ppt/ && echo "---" && file /home/day…

Running Command

cp /home/daytona/workspace/sperm-cattle-ppt/Live_Dead_Spermatozoa_Cattle_v2.pptx…

Try this direct link with the shorter path:

Spermatozoa Cattle

Presentation · PPTX

If that still doesn't work, try these steps:
  1. Right-click the link → "Save link as..." or "Download linked file"
  2. Try a different browser - Chrome/Edge work best for sandbox file downloads
  3. Clear browser cache then try again
The file itself is confirmed valid - it's a proper 384 KB ZIP/PPTX archive. The issue is purely on the browser download side, not the file. If none of the above works, let me know your browser and I can try a different delivery method.

Where is link

Here is the download link:

Spermatozoa Cattle

Presentation · PPTX

If you cannot click it, the full file path is:
/home/daytona/workspace/Spermatozoa_Cattle.pptx

It's not downloading

Running Command

cd /home/daytona/workspace && python3 -c " import base64 with open('Spermatozoa_…

Try opening this HTML page first, then click the download button inside it:

download

HTML File · HTML


If that also doesn't work, the issue is likely that your platform/browser is blocking sandbox file downloads entirely. In that case, I have an alternative - I can convert the presentation content into a PDF instead, which may download more reliably. Would you like me to try that?

Ok co vert to pdf

Running Command

cd /home/daytona/workspace && libreoffice --headless --convert-to pdf Spermatozo…

Running Command

cp /home/daytona/workspace/Spermatozoa_Cattle.pptx /tmp/Spermatozoa_Cattle.pptx …

Converted successfully! Here is your PDF (200 KB, 14 slides):

Spermatozoa Cattle

PDF Document · PDF

Pdf

Spermatozoa Cattle

PDF Document · PDF

Not downloading

It seems the sandbox file download is not supported in your current environment. Let me create the full presentation content as a properly formatted PDF using Python's reportlab directly, which may render differently.
But first - the most likely fix: the download feature may simply not be enabled on the platform/app you're using to access this chat.
Here are your options:
Option 1 - Try a different device/browser Open this same conversation on a desktop browser (Chrome or Edge) and click the link there.
Option 2 - I recreate the content as inline text I can write out all 14 slides as formatted text right here in the chat, which you can copy and paste into PowerPoint or Google Slides yourself.
Option 3 - Google Slides / Canva I can give you a step-by-step guide to recreate this in Google Slides (free, no download needed).
Option 4 - Email/share link Some platforms allow sharing sandbox files via a public URL - if your platform supports it, check for a "Share" button.

Which option would you prefer? Option 2 (copy the full slide content here) is the most universally accessible if downloads are blocked on your end.

4

Unfortunately, I don't have the ability to generate a public share URL for sandbox files — that depends on the platform hosting this chat, and it doesn't expose a public file server.
Here's what I recommend instead:

Easiest workaround right now:

  1. Open this chat on a desktop computer (Windows/Mac) using Google Chrome or Microsoft Edge
  2. Scroll up to the download link and right-click → Save link as
  3. The file should save to your Downloads folder

If you're on mobile:

  • Try opening the chat in Chrome on Android or Safari on iPhone
  • Long-press the link → "Download link" or "Save to Files"

Alternative - use the content directly:

I can paste the complete slide-by-slide text content right here (all 14 slides), and you can paste it into:
  • Google Slides (free, works on any device)
  • Canva (free presentation maker, mobile-friendly)
  • PowerPoint Online (free via Microsoft account)
Would you like me to do that? Just say "paste slides" and I'll write out every slide's full content so you can copy it into any tool you have available.

Paste all 14 slides as text I can copy into Google Slides

Here are all 14 slides. Each block is one slide — copy the title and bullet points into Google Slides one by one.

SLIDE 1 — TITLE

Live and Dead Spermatozoa in Cattle Eosin-Nigrosin Staining · Viability Principles · Morphological Abnormalities
Veterinary Reproductive Biology

SLIDE 2 — AGENDA

Agenda
  1. Why Assess Sperm Viability? — BSE & the 70% fertility threshold
  2. Eosin-Nigrosin Staining — History, principle & dye-exclusion mechanism
  3. Reagents & Procedure — One-step method, step-by-step
  4. Interpretation & Pitfalls — Live vs. dead; special cases
  5. Sperm Abnormality Classification — 4 classification systems
  6. Primary Abnormalities — Testicular origin; major defects
  7. Secondary Abnormalities — Post-testicular; minor defects
  8. Compensable vs. Uncompensable — Fertility implications & BSE outcomes

SLIDE 3 — WHY ASSESS SPERM VIABILITY?

Why Assess Sperm Viability?
≥ 70% normal viable sperm required for Satisfactory Potential Breeder
BSE — Breeding Soundness Exam
  • Core evaluation of bull fertility before the breeding season
  • Includes motility, morphology, and viability assessment
AI — Artificial Insemination
  • Viability must be confirmed in chilled and frozen-thawed semen
  • Dead sperm in AI doses directly reduce conception rates
DX — Differential Diagnosis
  • Differentiates asthenozoospermia (alive but immotile) from necrozoospermia (high proportion of dead sperm)

SLIDE 4 — EOSIN-NIGROSIN: HISTORY & PRINCIPLE

Eosin-Nigrosin Staining — History & Principle
History
  • Developed by Blom (1950) specifically for bull semen evaluation
  • Originally a two-step process; now a streamlined one-step method
  • Gold standard in veterinary and human reproductive labs worldwide
  • Validated against WHO semen standards (Bjorndahl et al., 2003)
Principle — Dye Exclusion Method
  • INTACT membrane (live cell): Semi-permeable → Eosin excluded → Head stays WHITE
  • DAMAGED membrane (dead cell): Porous → Eosin penetrates → Head stains PINK/RED
  • Nigrosin: black background dye → improves contrast only, is NOT a vital stain
Visual Summary
  • LIVE spermatozoon = white/unstained head
  • DEAD spermatozoon = pink to dark-red stained head

SLIDE 5 — REAGENTS & PROCEDURE

Reagents & Step-by-Step Procedure (One-Step Method)
Reagents
  • Eosin Y (5%) — Vital dye; stains dead cells pink/red
  • Nigrosin (10%) — Background dye; creates dark contrast only
  • Distilled Water — Solvent for stain preparation
  • Warm Slide (37 °C) — Prevents cold-shock artefact
Procedure
  1. Place a small drop of fresh semen on a warm slide (37 °C)
  2. Add an equal volume of eosin-nigrosin stain solution
  3. Mix gently and incubate approximately 30 seconds at 37 °C
  4. Make a thin smear and allow to air-dry completely
  5. Examine under bright-field microscope at ×400–1000
  6. Count a minimum of 200 spermatozoa per slide
  7. Record % unstained heads (live) and % pink heads (dead)

SLIDE 6 — INTERPRETATION & PITFALLS

Interpretation of Results & Pitfalls
Cell StatusMembraneEosin EntryAppearance
LIVEIntact (semi-permeable)EXCLUDEDWhite / unstained head
DEADDamaged / porousENTERS CELLPink to dark-red head
Special Notes & Pitfalls
  • ⚠ Leaky neck membrane: stain confined only to neck, head unstained → Count as LIVE (not true cell death)
  • ✓ Validation: % Dead (EN) + % Motile (wet mount) must total less than 100%. If it exceeds 100%, a method error has occurred
  • ❄ Use warm slides (37 °C) — cold shock damages membranes artificially, inflating the dead-cell percentage
  • ⏱ Optimal incubation ~30 seconds. Over-incubation → false positives; under-incubation → poor contrast

SLIDE 7 — HYPOOSMOTIC SWELLING (HOS) TEST

Alternative Viability Method: Hypoosmotic Swelling (HOS) Test
Principle A live sperm with an intact functional membrane placed in hypoosmotic solution (~150 mOsm) absorbs water by osmosis → tail coils or curls (positive HOS). A dead sperm with a non-functional membrane does NOT swell → tail remains straight (negative HOS).
POSITIVE HOS — Live Cell
  • Intact membrane → Water influx → Tail coils/curls
  • Result: SPERM IS ALIVE ✓
NEGATIVE HOS — Dead Cell
  • Damaged membrane → No swelling → Tail stays straight
  • Result: SPERM IS DEAD ✗
Note: EN staining remains the gold standard for cattle — HOS is an alternative when staining is unavailable.

SLIDE 8 — CLASSIFICATION SYSTEMS

Classification Systems for Bovine Sperm Abnormalities
1. Primary / Secondary (Blom, 1950) Based on SITE OF ORIGIN
  • Primary = Spermatogenesis in testis
  • Secondary = Post-testicular (epididymis, ejaculation, handling)
2. Major / Minor (Blom, 1971) Based on SIGNIFICANCE to fertility
  • Major defects — seriously impair or eliminate fertility
  • Minor defects — little or no effect on fertility
3. Compensable vs. Uncompensable (Saacke, 1990) Based on MODE OF ACTION
  • Compensable — more sperm overcomes the effect
  • Uncompensable — increasing numbers CANNOT compensate
4. Anatomical Location (Descriptive) Based on STRUCTURAL SITE
  • Head defects | Midpiece defects | Tail defects
  • Cytoplasmic droplets (proximal / distal)

SLIDE 9 — PRIMARY ABNORMALITIES

Primary Abnormalities — Origin: Spermatogenesis (Testis) — MAJOR Defects
  1. Underdeveloped / Small Heads — Immature nucleus; poor chromatin condensation; indicates spermatogenic failure
  2. Double Forms — Bicephalic (2 heads) or biflagellate (2 tails); result of failed cytokinesis during spermiogenesis
  3. Knobbed / Missing Acrosome — Cannot penetrate zona pellucida; most fertility-damaging defect; uncompensable
  4. Narrow / Pyriform Heads — Tapered or pear-shaped heads; poor DNA integrity; associated with infertility
  5. Crater / Diadem Defect — Nuclear vacuoles appearing as craters; chromatin instability → early embryonic death
  6. Proximal Cytoplasmic Droplet — Retained cytoplasm near neck; indicates testicular immaturity or heat stress
  7. Abnormal Midpiece — Coiled, bent, or thickened midpiece; impairs motility and ATP production
  8. Accessory Tails — Extra axonemal structures; usually genetic in origin; may impair fertility
  9. Strongly Coiled Tail — Tight proximal coiling; testicular origin; different from distal cold-shock coil

SLIDE 10 — SECONDARY ABNORMALITIES

Secondary Abnormalities — Origin: Epididymis / Post-Ejaculation — MINOR Defects
  1. Small Normal Heads — Slightly reduced size, normal shape; minor significance
  2. Giant / Short Broad Heads — Abnormal nuclear size from epididymal malfunction
  3. Detached / Loose Acrosome — Partially lifted acrosomal membrane; less severe than primary acrosome defects
  4. Abaxial Implantation — Off-center tail attachment; mostly normal variation; extreme cases swim in circles
  5. Distal Cytoplasmic Droplet — Droplet migrated to principal piece; minor; common in young bulls
  6. Detached Heads — Separation of head from tail; often processing or cold-shock artefact
  7. Simple Bent Tail — Single tail bend; cold shock during handling; largely artefactual
  8. Distal Coiled Tail — Terminal piece coiling; hypoosmotic stress; less serious than proximal coil

SLIDE 11 — COMPENSABLE vs. UNCOMPENSABLE

Compensable vs. Uncompensable Sperm Defects
COMPENSABLE
  • Definition: Defective sperm fail to fertilize but do NOT block competing normal sperm. Increasing inseminated sperm numbers can overcome the fertility loss.
  • Examples: Detached heads · Distal cytoplasmic droplets · Distal coiled tails · Abaxial implantation · Simple bent tails
  • Clinical note: More critical in AI (fixed sperm dose) than in natural service
UNCOMPENSABLE
  • Definition: Defective sperm actively interfere with normal sperm — occupying binding sites without fertilizing. More sperm CANNOT compensate.
  • Examples: Knobbed/missing acrosome · Nuclear vacuoles (diadem defect) · Certain abnormal head shapes · Decapitated sperm defect · Dag defect (coiled midpiece)
  • Clinical note: Dangerous in natural mating — bull should be classified UNSATISFACTORY regardless of sperm numbers

SLIDE 12 — NOTABLE SPECIFIC DEFECTS

Clinically Notable Sperm Defects in Cattle
Dag Defect (Coiled midpiece) Genetic; seen in Guernsey & other breeds. Severely impairs motility. Affected bull should be culled.
Decapitated Sperm (Head detaches in epididymis) Breed-associated (Guernsey bulls). Heads and tails separate spontaneously during epididymal transit → severe subfertility.
Knobbed Acrosome (Primary acrosome defect) Most fertility-impairing defect. Sperm cannot penetrate zona pellucida. Uncompensable — bull should fail BSE.
Nuclear Vacuoles (Diadem / Crater defect) Chromatin instability and DNA fragmentation. Associated with fertilization failure and early embryonic death.
Proximal Droplet (Cytoplasmic retention at neck) Indicates immaturity or fever/scrotal insulation. Re-examine after 60 days (one full spermatogenic cycle) if cause is identified.
Abaxial Tail (Off-center insertion) Usually a normal variation. Extreme cases cause circular swimming — only abnormal when holding sperm at acute angle.

SLIDE 13 — BSE CLASSIFICATION TABLE

Bull Breeding Soundness Examination (BSE) — Classification Criteria
ParameterMinimum RequirementSignificance
Gross Motility≥ Fair OR ≥ 30% progressive motilityMust pass — failure = Unsatisfactory
Morphologically Normal Sperm≥ 70% normal morphologyCore criterion — most commonly failed
Live Spermatozoa (EN stain)≥ 70% viable (unstained by eosin)Confirms vitality alongside morphology
Scrotal CircumferenceAge-dependent minimum (e.g. ≥ 30 cm at 15 mo)Correlates with daily sperm output
BSE Outcomes
  • ✅ SATISFACTORY POTENTIAL BREEDER — All minimum criteria met
  • ⏳ DEFERRED (Re-examine in 60 days) — Marginal results; one spermatogenic cycle recovery
  • ❌ UNSATISFACTORY POTENTIAL BREEDER — One or more criteria failed

SLIDE 14 — KEY TAKEAWAYS

Key Takeaways — Live & Dead Spermatozoa in Cattle
  1. Eosin-nigrosin (Blom, 1950) is the gold-standard viability stain based on membrane dye-exclusion
  2. Live sperm exclude eosin (white head); dead sperm absorb it (pink/red head); nigrosin provides dark background contrast
  3. ≥ 70% live, morphologically normal sperm is required for a Satisfactory Potential Breeder in BSE
  4. Primary abnormalities arise in the testis (major defects); secondary arise post-testicularly (generally minor)
  5. Uncompensable defects (knobbed acrosome, diadem) cannot be overcome by more sperm — most clinically dangerous
  6. Notable cattle defects — Dag, decapitated sperm, knobbed acrosome, proximal droplet — each with distinct etiology and prognosis
Reference: Barth & Oko (1989). Abnormal Morphology of Bovine Spermatozoa. Iowa State University Press.

How to use in Google Slides:
  1. Open slides.google.com → New blank presentation
  2. For each slide: click the title box, paste the heading; click the body box, paste the bullet points
  3. Use Format → Theme to pick a color theme that matches (try "Streamline" or "Slate" for a professional look)
  4. Tables on slides 6 and 13 can be inserted via Insert → Table
This is a shared conversation. Sign in to Orris to start your own chat.