Create a visual poster comparing epithelial types

Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Finding Sources
Loading Image
Reading File
Finding Sources
Reading File
Finding Sources
Reading File
Finding Sources
Generating Image

A detailed educational medical poster titled "Epithelial Tissue Types" comparing all major epithelial types. The poster should have a clean, professional layout with a white or light background and organized into a grid or table-like structure. Include these 8 types with schematic cross-section diagrams for each: 1. Simple Squamous - single flat thin layer, nucleus bulges, location: endothelium (blood vessels), mesothelium (body cavities), Bowman's capsule, lung alveoli. Function: diffusion, filtration, lubrication. 2. Simple Cuboidal - single layer of cube-shaped cells, round central nucleus, location: kidney tubules, thyroid follicles, small gland ducts, ovary surface. Function: absorption, secretion. 3. Simple Columnar - single layer of tall cells, nucleus near base, may have goblet cells and microvilli, location: small intestine, colon, stomach, gallbladder. Function: absorption, secretion. 4. Pseudostratified Columnar - appears multi-layered but all cells touch basement membrane, nuclei at different heights, cilia on surface, location: trachea, bronchi, ductus deferens. Function: secretion, movement of mucus. 5. Stratified Squamous - multiple layers, surface cells are flat/squamous, basal cells are round. Two subtypes: Keratinized (epidermis/skin) and Non-keratinized (oral cavity, esophagus, vagina). Function: protection, barrier. 6. Stratified Cuboidal - 2 or more layers with cuboidal surface cells, location: sweat gland ducts, large exocrine gland ducts. Function: conduit, barrier. 7. Stratified Columnar - multiple layers with columnar surface cells, location: largest exocrine gland ducts, anorectal junction. Function: conduit, barrier. 8. Transitional (Urothelium) - dome-shaped surface cells when relaxed, flattened when stretched, location: renal calyces, ureters, urinary bladder. Function: distensibility, barrier. Each type should show: a small labeled schematic diagram, a color-coded cell shape key, location, and function. Use a color scheme: blues for simple epithelia, greens for stratified, purple for pseudostratified, orange for transitional. Include a legend and title. The poster should be suitable for a medical histology class.

Here's your epithelial types comparison poster:
Epithelial Tissue Types Poster

The poster covers all 8 major epithelial classifications drawn from Histology: A Text and Atlas (Ross & Pawlina) and the accompanying classification table. Here's a quick reference summary:

Epithelial Types at a Glance

TypeLayersCell ShapeKey LocationsFunction
Simple Squamous1Flat, scale-likeEndothelium, mesothelium, alveoli, Bowman's capsuleDiffusion, filtration, lubrication
Simple Cuboidal1Cube (equal H & W)Kidney tubules, thyroid follicles, small ducts, ovary surfaceAbsorption, secretion
Simple Columnar1Tall (H > W)Small intestine, colon, stomach, gallbladderAbsorption, secretion
Pseudostratified1 (appears multi)Columnar + ciliaTrachea, bronchi, ductus deferensMucus secretion, ciliary transport
Stratified Squamous2+Surface cells flatEpidermis (keratinized), esophagus, oral cavity, vagina (non-keratinized)Protection, barrier
Stratified Cuboidal2+Surface cells cuboidalSweat gland ducts, large exocrine ductsConduit, barrier
Stratified Columnar2+Surface cells columnarLargest exocrine ducts, anorectal junctionConduit, barrier
Transitional (Urothelium)2+ (variable)Dome-shaped → flatRenal calyces, ureters, bladderDistensibility, urine barrier

Key rules for classification:
  • Layers: single = simple; multiple = stratified; appears multiple but isn't = pseudostratified
  • Cell shape is assessed at the free (apical) surface
  • Stratified squamous can be keratinized (dead surface cells, e.g. skin) or non-keratinized (living cells, e.g. mouth)
  • Transitional epithelium is unique: its surface cell morphology changes with organ distension
Source: Histology: A Text and Atlas, Ross & Pawlina (Table 5.1); Junqueira's Basic Histology, 17e

Generate a study guide document on epithelial tissue classification and functions

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

ls -la /home/daytona/workspace/ 2>/dev/null || echo "workspace not found"

Running Command

mkdir -p /home/daytona/workspace/epithelial-study-guide

Writing File

~/epithelial-study-guide/build.js

const {
  Document, Packer, Paragraph, TextRun, Table, TableRow, TableCell,
  HeadingLevel, AlignmentType, BorderStyle, WidthType, ShadingType,
  VerticalAlign, PageNumber, Footer, Header, TabStopType, TabStopPosition,
  UnderlineType, PageBreak
} = require('docx');
const fs = require('fs');

// ── Colour palette ──────────────────────────────────────────────────────────
const BLUE_DARK   = '1F3864';  // document title / cover
const BLUE_MID    = '2E75B6';  // h1 headings
const BLUE_LIGHT  = 'BDD7EE';  // h2 shading
const TEAL        = '00B0F0';  // accent text
const ORANGE      = 'ED7D31';  // callout shading
const ORANGE_TEXT = 'C55A11';
const GREY_LIGHT  = 'F2F2F2';  // table row shading
const GREEN_DARK  = '375623';
const GREEN_LIGHT = 'E2EFDA';
const WHITE       = 'FFFFFF';

// ── Helper: horizontal rule ──────────────────────────────────────────────────
function hr() {
  return new Paragraph({
    border: { bottom: { color: BLUE_MID, size: 6, style: BorderStyle.SINGLE } },
    spacing: { before: 120, after: 120 },
    children: []
  });
}

// ── Helper: section heading (H1) ────────────────────────────────────────────
function h1(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_1,
    spacing: { before: 360, after: 120 },
    children: [
      new TextRun({
        text,
        bold: true,
        size: 32,
        color: WHITE,
        font: 'Calibri',
      })
    ],
    shading: { type: ShadingType.SOLID, color: BLUE_MID, fill: BLUE_MID },
    indent: { left: 120, right: 120 },
  });
}

// ── Helper: sub-heading (H2) ─────────────────────────────────────────────────
function h2(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_2,
    spacing: { before: 240, after: 80 },
    children: [
      new TextRun({
        text,
        bold: true,
        size: 26,
        color: BLUE_MID,
        font: 'Calibri',
      })
    ],
  });
}

// ── Helper: sub-sub-heading (H3) ────────────────────────────────────────────
function h3(text) {
  return new Paragraph({
    heading: HeadingLevel.HEADING_3,
    spacing: { before: 180, after: 60 },
    children: [
      new TextRun({ text, bold: true, size: 24, color: BLUE_DARK, font: 'Calibri' })
    ],
  });
}

// ── Helper: body paragraph ───────────────────────────────────────────────────
function body(text, opts = {}) {
  return new Paragraph({
    spacing: { before: 80, after: 80 },
    children: [
      new TextRun({
        text,
        size: 22,
        font: 'Calibri',
        bold: opts.bold || false,
        italics: opts.italic || false,
        color: opts.color || '000000',
      })
    ],
    indent: opts.indent ? { left: 360 } : {},
  });
}

// ── Helper: bullet ───────────────────────────────────────────────────────────
function bullet(text, level = 0) {
  return new Paragraph({
    bullet: { level },
    spacing: { before: 60, after: 60 },
    indent: { left: 360 + level * 360, hanging: 360 },
    children: [new TextRun({ text, size: 22, font: 'Calibri' })]
  });
}

// ── Helper: key-value bullet ─────────────────────────────────────────────────
function kvBullet(key, value) {
  return new Paragraph({
    bullet: { level: 0 },
    spacing: { before: 60, after: 60 },
    indent: { left: 360, hanging: 360 },
    children: [
      new TextRun({ text: `${key}: `, size: 22, font: 'Calibri', bold: true }),
      new TextRun({ text: value, size: 22, font: 'Calibri' })
    ]
  });
}

// ── Helper: callout box (shaded paragraph) ───────────────────────────────────
function callout(label, text, shade = ORANGE, textColor = ORANGE_TEXT) {
  return new Paragraph({
    spacing: { before: 120, after: 120 },
    indent: { left: 200, right: 200 },
    shading: { type: ShadingType.SOLID, color: shade, fill: shade },
    children: [
      new TextRun({ text: `${label}  `, size: 22, font: 'Calibri', bold: true, color: textColor }),
      new TextRun({ text, size: 22, font: 'Calibri', color: textColor })
    ]
  });
}

// ── Helper: table cell ───────────────────────────────────────────────────────
function cell(text, opts = {}) {
  return new TableCell({
    shading: opts.shade ? { type: ShadingType.SOLID, color: opts.shade, fill: opts.shade } : undefined,
    verticalAlign: VerticalAlign.CENTER,
    margins: { top: 80, bottom: 80, left: 120, right: 120 },
    width: opts.width ? { size: opts.width, type: WidthType.PERCENTAGE } : undefined,
    children: [
      new Paragraph({
        children: [
          new TextRun({
            text,
            size: opts.small ? 18 : 20,
            font: 'Calibri',
            bold: opts.bold || false,
            color: opts.color || '000000',
          })
        ],
        alignment: opts.center ? AlignmentType.CENTER : AlignmentType.LEFT,
      })
    ]
  });
}

// ── Helper: table header row ─────────────────────────────────────────────────
function headerRow(cols) {
  return new TableRow({
    tableHeader: true,
    children: cols.map(c =>
      new TableCell({
        shading: { type: ShadingType.SOLID, color: BLUE_MID, fill: BLUE_MID },
        verticalAlign: VerticalAlign.CENTER,
        margins: { top: 80, bottom: 80, left: 120, right: 120 },
        children: [
          new Paragraph({
            alignment: AlignmentType.CENTER,
            children: [new TextRun({ text: c, size: 20, font: 'Calibri', bold: true, color: WHITE })]
          })
        ]
      })
    )
  });
}

// ── Master epithelial data ────────────────────────────────────────────────────
const epithelialTypes = [
  {
    name: 'Simple Squamous',
    layers: 'Single layer',
    cellShape: 'Flat; width > height; disc-like with central bulging nucleus',
    locations: 'Endothelium (blood/lymphatic vessels), mesothelium (pleural, pericardial, peritoneal cavities), Bowman capsule (kidney), alveoli (lung)',
    functions: 'Passive diffusion, filtration, lubrication, selective transport (pinocytosis)',
    special: 'Endothelium regulates vascular tone, immune responses, and hormone synthesis. High endothelial venules (HEV) are a cuboidal exception.',
    shade: 'DEEAF1'
  },
  {
    name: 'Simple Cuboidal',
    layers: 'Single layer',
    cellShape: 'Height ≈ width; round central nucleus; cube-shaped in cross-section',
    locations: 'Kidney tubules (proximal/distal convoluted), thyroid follicles, small exocrine gland ducts, ovarian surface (germinal epithelium)',
    functions: 'Absorption, secretion, conduit',
    special: 'Thyroid follicular cells secrete thyroid hormone; kidney tubule cells are highly active in solute reabsorption.',
    shade: 'DEEAF1'
  },
  {
    name: 'Simple Columnar',
    layers: 'Single layer',
    cellShape: 'Height > width; elongated; basally located oval nucleus; may have goblet cells and apical microvilli (brush border)',
    locations: 'Small intestine, colon (with goblet cells), stomach lining and gastric glands, gallbladder',
    functions: 'Absorption (small intestine), secretion (stomach, goblet cells), conduit',
    special: 'Goblet cells are interspersed unicellular mucous glands. Ciliated variant lines the uterine tube (fallopian tube) and some bronchioles.',
    shade: 'DEEAF1'
  },
  {
    name: 'Pseudostratified Columnar',
    layers: 'Single layer (appears multi-layered)',
    cellShape: 'All cells contact basement membrane; nuclei at different heights; apical cells may be ciliated; goblet cells common',
    locations: 'Trachea and bronchial tree (ciliated), ductus deferens, efferent ductules of epididymis',
    functions: 'Secretion and conduit; ciliary movement of mucus (mucociliary escalator in airways)',
    special: 'Basal cells act as stem cells. Ciliated pseudostratified epithelium is also called "respiratory epithelium." Identification depends on knowing location due to visual ambiguity.',
    shade: 'E2EFDA'
  },
  {
    name: 'Stratified Squamous',
    layers: '2 or more layers; surface cells are squamous',
    cellShape: 'Basal layer: small columnar/cuboidal stem cells. Surface: flat squames. Two subtypes: keratinized (dead cells, no nuclei) and non-keratinized (living cells, retain nuclei)',
    locations: 'Keratinized: epidermis (skin). Non-keratinized: oral cavity, esophagus, vagina, cornea',
    functions: 'Protection, mechanical barrier, prevention of water loss (keratinized), resistance to abrasion',
    special: 'Keratin intermediate filaments fill terminally differentiated cells in keratinized type. Basal layer cells undergo continual mitosis to replenish the epithelium.',
    shade: 'FFF2CC'
  },
  {
    name: 'Stratified Cuboidal',
    layers: '2 or more layers; surface cells are cuboidal',
    cellShape: 'Cuboidal surface cells; deeper cells may be flatter',
    locations: 'Sweat gland ducts, large ducts of exocrine glands (e.g., parotid), anorectal junction',
    functions: 'Conduit, barrier, minor modification of secretion',
    special: 'Less common type. The anorectal junction is a site of transition between several epithelial types (stratified squamous, stratified cuboidal, stratified columnar, simple columnar).',
    shade: 'FFF2CC'
  },
  {
    name: 'Stratified Columnar',
    layers: '2 or more layers; surface cells are columnar',
    cellShape: 'Columnar surface cells over shorter basal cells',
    locations: 'Largest ducts of exocrine glands (e.g., parotid, submandibular), anorectal junction, male urethra (portions)',
    functions: 'Conduit, barrier',
    special: 'Rare type. Often found at transition zones. Its distribution is limited and identification relies on anatomical context.',
    shade: 'FFF2CC'
  },
  {
    name: 'Transitional (Urothelium)',
    layers: 'Stratified; thickness varies with distension',
    cellShape: 'Relaxed: dome-shaped (umbrella) surface cells, 5-7 cell layers. Distended: flattened surface cells, 2-3 layers. Cells have unique plaques of uroplakin proteins.',
    locations: 'Renal calyces, renal pelvis, ureters, urinary bladder, proximal urethra',
    functions: 'Barrier (impermeable to urine), distensibility to accommodate volume changes',
    special: 'Uroplakin proteins form asymmetric unit membranes (AUM) on the luminal surface. Squamous metaplasia of urothelium can be associated with chronic schistosomiasis infection.',
    shade: 'FCE4D6'
  },
];

// ── Build the document ───────────────────────────────────────────────────────
const doc = new Document({
  title: 'Epithelial Tissue: Classification and Functions – Study Guide',
  creator: 'Orris Medical AI',
  description: 'Comprehensive histology study guide on epithelial tissue types',
  styles: {
    default: {
      document: {
        run: { font: 'Calibri', size: 22 }
      }
    }
  },
  sections: [
    {
      headers: {
        default: new Header({
          children: [
            new Paragraph({
              alignment: AlignmentType.RIGHT,
              spacing: { after: 0 },
              children: [
                new TextRun({ text: 'Epithelial Tissue Study Guide  |  Histology', size: 18, color: '666666', font: 'Calibri', italics: true }),
              ]
            })
          ]
        })
      },
      footers: {
        default: new Footer({
          children: [
            new Paragraph({
              alignment: AlignmentType.CENTER,
              children: [
                new TextRun({ text: 'Source: Ross & Pawlina, Histology: A Text and Atlas, 8e  |  Page ', size: 18, color: '888888', font: 'Calibri' }),
                new TextRun({ children: [PageNumber.CURRENT], size: 18, color: '888888', font: 'Calibri' }),
                new TextRun({ text: ' of ', size: 18, color: '888888', font: 'Calibri' }),
                new TextRun({ children: [PageNumber.TOTAL_PAGES], size: 18, color: '888888', font: 'Calibri' }),
              ]
            })
          ]
        })
      },
      children: [

        // ── COVER ────────────────────────────────────────────────────────────
        new Paragraph({
          alignment: AlignmentType.CENTER,
          spacing: { before: 1440, after: 240 },
          shading: { type: ShadingType.SOLID, color: BLUE_DARK, fill: BLUE_DARK },
          children: [
            new TextRun({ text: 'HISTOLOGY', size: 28, font: 'Calibri', bold: true, color: TEAL, allCaps: true }),
          ]
        }),
        new Paragraph({
          alignment: AlignmentType.CENTER,
          spacing: { before: 0, after: 120 },
          shading: { type: ShadingType.SOLID, color: BLUE_DARK, fill: BLUE_DARK },
          children: [
            new TextRun({ text: 'Epithelial Tissue', size: 64, font: 'Calibri', bold: true, color: WHITE }),
          ]
        }),
        new Paragraph({
          alignment: AlignmentType.CENTER,
          spacing: { before: 0, after: 0 },
          shading: { type: ShadingType.SOLID, color: BLUE_DARK, fill: BLUE_DARK },
          children: [
            new TextRun({ text: 'Classification, Functions & Clinical Correlations', size: 28, font: 'Calibri', color: BLUE_LIGHT }),
          ]
        }),
        new Paragraph({
          alignment: AlignmentType.CENTER,
          spacing: { before: 0, after: 2880 },
          shading: { type: ShadingType.SOLID, color: BLUE_DARK, fill: BLUE_DARK },
          children: [
            new TextRun({ text: 'STUDY GUIDE', size: 24, font: 'Calibri', bold: true, color: ORANGE, allCaps: true }),
          ]
        }),
        new Paragraph({
          alignment: AlignmentType.CENTER,
          spacing: { before: 480, after: 120 },
          children: [
            new TextRun({ text: 'Based on: Ross & Pawlina, Histology: A Text and Atlas, 8th Edition', size: 20, font: 'Calibri', italics: true, color: '666666' }),
          ]
        }),
        new Paragraph({ children: [new PageBreak()] }),

        // ── SECTION 1: OVERVIEW ──────────────────────────────────────────────
        h1('1.  Overview of Epithelial Tissue'),
        body('Epithelium is one of the four basic tissue types, characterised by:'),
        bullet('Close cell-to-cell apposition with minimal intercellular space'),
        bullet('Presence at a free surface (external body surface, luminal surfaces, body cavities)'),
        bullet('An avascular nature — nutrients reach cells by diffusion from underlying connective tissue'),
        bullet('Resting on a basement membrane (basal lamina + reticular lamina)'),
        bullet('Polarity: distinct apical, lateral, and basal domains'),
        body(''),
        body('Epithelial tissue performs the following general functions:'),
        kvBullet('Protection', 'mechanical barrier against physical, chemical, and microbial injury'),
        kvBullet('Absorption', 'uptake of substances from luminal surfaces (e.g., intestine, kidney tubules)'),
        kvBullet('Secretion', 'production of enzymes, hormones, mucus, and other products'),
        kvBullet('Excretion', 'elimination of metabolic waste'),
        kvBullet('Transport', 'movement of substances across the epithelium or along its surface'),
        kvBullet('Sensory reception', 'olfactory, taste, and visual receptor cells'),

        hr(),

        // ── SECTION 2: CLASSIFICATION ────────────────────────────────────────
        h1('2.  Classification System'),
        body('Classification is based on two primary criteria:'),
        body('1.  Number of cell layers', { bold: true }),
        bullet('Simple — one cell layer; all cells contact the basement membrane'),
        bullet('Stratified — two or more layers; only the basal layer contacts the basement membrane'),
        bullet('Pseudostratified — appears layered but is truly simple; all cells contact the basement membrane, not all reach the surface'),
        body(''),
        body('2.  Shape of surface cells', { bold: true }),
        bullet('Squamous — width > height (flat, scale-like)'),
        bullet('Cuboidal — height ≈ width (cube-shaped)'),
        bullet('Columnar — height > width (tall, pillar-like)'),
        body(''),
        callout('RULE', 'In stratified epithelia, the shape of the surface (apical) layer determines the name — not the deeper layers.', BLUE_LIGHT, BLUE_DARK),
        body(''),
        body('Optional modifiers added to the classification:'),
        bullet('Keratinized / non-keratinized (for stratified squamous)'),
        bullet('Ciliated (for simple columnar and pseudostratified columnar)'),

        hr(),

        // ── SECTION 3: MASTER TABLE ──────────────────────────────────────────
        h1('3.  Classification Quick-Reference Table'),
        body(''),
        new Table({
          width: { size: 100, type: WidthType.PERCENTAGE },
          rows: [
            headerRow(['Type', 'Layers', 'Typical Locations', 'Function']),
            ...epithelialTypes.map((t, i) =>
              new TableRow({
                children: [
                  cell(t.name, { shade: i % 2 === 0 ? GREY_LIGHT : WHITE, bold: true, width: 22 }),
                  cell(t.layers, { shade: i % 2 === 0 ? GREY_LIGHT : WHITE, small: true, width: 16 }),
                  cell(t.locations, { shade: i % 2 === 0 ? GREY_LIGHT : WHITE, small: true, width: 36 }),
                  cell(t.functions, { shade: i % 2 === 0 ? GREY_LIGHT : WHITE, small: true, width: 26 }),
                ]
              })
            )
          ]
        }),
        body(''),

        hr(),

        // ── SECTION 4: DETAILED PROFILES ────────────────────────────────────
        h1('4.  Detailed Profiles by Type'),

        ...epithelialTypes.flatMap(t => [
          h2(t.name),
          new Paragraph({
            spacing: { before: 60, after: 80 },
            shading: { type: ShadingType.SOLID, color: t.shade, fill: t.shade },
            indent: { left: 120, right: 120 },
            children: [new TextRun({ text: ' ', size: 4 })]
          }),
          kvBullet('Layers', t.layers),
          kvBullet('Cell morphology', t.cellShape),
          kvBullet('Locations', t.locations),
          kvBullet('Function(s)', t.functions),
          new Paragraph({
            bullet: { level: 0 },
            spacing: { before: 60, after: 60 },
            indent: { left: 360, hanging: 360 },
            children: [
              new TextRun({ text: 'Clinical / histological note: ', size: 22, font: 'Calibri', bold: true, color: BLUE_MID }),
              new TextRun({ text: t.special, size: 22, font: 'Calibri', italics: true })
            ]
          }),
          body(''),
        ]),

        hr(),

        // ── SECTION 5: CELL POLARITY ─────────────────────────────────────────
        h1('5.  Cell Polarity and Domains'),
        body('All epithelial cells are polarised — they have three distinct structural and functional membrane domains:'),
        body(''),

        h3('5.1  Apical Domain (Free Surface)'),
        body('The apical surface faces the lumen or external environment. Surface modifications include:'),
        kvBullet('Microvilli', 'Short finger-like projections; actin filament core; form "brush border" or "striated border" visible by LM; greatly increase surface area for absorption'),
        kvBullet('Stereocilia (Stereovilli)', 'Long, non-motile microvilli; actin core; found in epididymis (absorption) and inner ear (mechanosensory)'),
        kvBullet('Motile cilia', 'Longer, hair-like projections; axoneme with 9+2 microtubule arrangement; driven by dynein ATPase; move mucus and particles (mucociliary escalator in trachea, oocyte in uterine tube)'),
        kvBullet('Primary cilia (monocilia)', 'Non-motile; 9+0 arrangement; present on nearly all eukaryotic cells; function as chemosensors, osmosensors, and mechanosensors'),
        body(''),

        h3('5.2  Lateral Domain (Cell-to-Cell Junctions)'),
        body('The junctional complex, from apical to basal, consists of:'),
        body(''),
        new Table({
          width: { size: 100, type: WidthType.PERCENTAGE },
          rows: [
            headerRow(['Junction', 'Also Known As', 'Proteins', 'Function']),
            new TableRow({ children: [
              cell('Zonula occludens', { shade: GREY_LIGHT, bold: true }),
              cell('Tight junction', { shade: GREY_LIGHT }),
              cell('Claudins, occludins, ZO-1', { shade: GREY_LIGHT }),
              cell('Seals paracellular space; prevents free diffusion between cells; most apical', { shade: GREY_LIGHT }),
            ]}),
            new TableRow({ children: [
              cell('Zonula adherens', { bold: true }),
              cell('Adherens junction (belt)', {}),
              cell('E-cadherin–catenin + actin filaments', {}),
              cell('Encircles cell; provides cell-to-cell adhesion; links to actin cytoskeleton', {}),
            ]}),
            new TableRow({ children: [
              cell('Macula adherens', { shade: GREY_LIGHT, bold: true }),
              cell('Desmosome', { shade: GREY_LIGHT }),
              cell('Desmogleins, desmocollins + intermediate filaments', { shade: GREY_LIGHT }),
              cell('Spot-like anchoring junction; distributes mechanical stress; links to keratin IFs', { shade: GREY_LIGHT }),
            ]}),
            new TableRow({ children: [
              cell('Nexus', { bold: true }),
              cell('Gap junction', {}),
              cell('Connexins (connexons)', {}),
              cell('Ion/small molecule exchange between cells; electrical coupling; signalling', {}),
            ]}),
          ]
        }),
        body(''),

        h3('5.3  Basal Domain (Basement Membrane Attachments)'),
        kvBullet('Basement membrane', 'PAS-positive by LM; consists of basal lamina (laminin + type IV collagen) + reticular lamina (type III collagen); anchored by type VII collagen fibrils and fibrillin microfibrils'),
        kvBullet('Focal adhesions', 'Integrin-based dynamic junctions; link actin filaments to basement membrane; enable cell migration'),
        kvBullet('Hemidesmosomes', 'Integrin-based stable junctions; link intermediate filaments (keratin) to basement membrane; resist shear forces'),
        body(''),
        body('Functions of the basement membrane:'),
        bullet('Structural attachment of epithelium to connective tissue'),
        bullet('Compartmentalisation — separates epithelium from connective tissue'),
        bullet('Selective filtration of macromolecules'),
        bullet('Scaffold for tissue regeneration after injury'),
        bullet('Cell signalling platform'),

        hr(),

        // ── SECTION 6: GLANDS ────────────────────────────────────────────────
        h1('6.  Glandular Epithelium'),
        body('Glands are derived from epithelium and are classified by their mode of secretion release:'),
        body(''),
        h3('6.1  Exocrine Glands'),
        body('Secrete onto a free surface via a duct. Sub-classified by:'),
        body('Secretion type:', { bold: true }),
        bullet('Serous glands — protein-rich watery secretion (e.g., parotid gland)'),
        bullet('Mucous glands — viscous mucin secretion (e.g., sublingual gland)'),
        bullet('Mixed — both serous and mucous components'),
        body('Mechanism of secretion:', { bold: true }),
        bullet('Merocrine (eccrine) — product released by exocytosis; no cell damage; most common (e.g., pancreas, salivary glands)'),
        bullet('Apocrine — product released in membrane-bound vesicles with a thin rim of cytoplasm (e.g., mammary glands, apocrine sweat glands)'),
        bullet('Holocrine — entire cell disintegrates to release secretion (e.g., sebaceous glands)'),
        body(''),
        h3('6.2  Endocrine Glands'),
        body('Lack ducts; secrete hormones directly into the bloodstream to act on distant target cells. Examples: thyroid, adrenal cortex, anterior pituitary, islets of Langerhans.'),

        hr(),

        // ── SECTION 7: EPITHELIAL RENEWAL & EMT ─────────────────────────────
        h1('7.  Epithelial Renewal and Plasticity'),
        h3('7.1  Cell Renewal'),
        body('Epithelia belong to the category of continuously renewing cell populations. Stem cells reside in dedicated niches within each epithelial type:'),
        bullet('Skin: basal layer of epidermis and hair follicle bulge'),
        bullet('Intestine: crypts of Lieberkühn (Lgr5+ stem cells at crypt base)'),
        bullet('Airways: basal cells of pseudostratified respiratory epithelium'),
        body(''),
        h3('7.2  Epithelial-Mesenchymal Transition (EMT)'),
        body('Epithelial cells can acquire mesenchymal characteristics (loss of polarity, gain of migratory ability) in:'),
        bullet('Embryonic development (e.g., neural crest cell migration)'),
        bullet('Wound healing'),
        bullet('Fibrosis'),
        bullet('Cancer invasion and metastasis (reversed by mesenchymal-epithelial transition, MET)'),

        hr(),

        // ── SECTION 8: CLINICAL CORRELATIONS ────────────────────────────────
        h1('8.  Clinical Correlations'),
        h3('8.1  Epithelial Metaplasia'),
        callout('DEFINITION', 'Reversible conversion of one mature epithelial cell type to another; driven by reprogramming of stem cells in response to chronic stress or abnormal stimuli.', GREEN_LIGHT, GREEN_DARK),
        body(''),
        kvBullet('Squamous metaplasia of respiratory epithelium', 'Chronic cigarette smoke → pseudostratified columnar epithelium of trachea/bronchi replaced by stratified squamous epithelium; precursor to squamous cell carcinoma of the lung'),
        kvBullet('Cervical squamous metaplasia', 'HPV or chronic infection of cervical canal → simple columnar replaced by stratified squamous non-keratinized; monitored by cervical smear (Pap test)'),
        kvBullet('Barrett esophagus', 'Chronic GERD → stratified squamous non-keratinized epithelium of lower esophagus replaced by intestinal-type simple columnar epithelium with goblet cells; risk factor for adenocarcinoma'),
        kvBullet('Urothelial squamous metaplasia', 'Chronic schistosomiasis infection → transitional epithelium replaced by stratified squamous; associated with squamous cell carcinoma of bladder'),
        body(''),
        body('Treatment principle: remove causative stimulus; regular biopsy surveillance of persistent metaplastic sites.', { italic: true }),
        body(''),

        h3('8.2  Kartagener Syndrome (Primary Ciliary Dyskinesia)'),
        kvBullet('Defect', 'Mutation in dynein arm proteins (e.g., DNAI1, DNAH5) → immotile cilia (9+2 structure present but non-functional)'),
        kvBullet('Consequences', 'Recurrent sinopulmonary infections (impaired mucociliary clearance), male infertility (immotile sperm), situs inversus in ~50% of cases (cilia required for L-R determination in embryo)'),
        body(''),

        h3('8.3  Pemphigus Vulgaris'),
        kvBullet('Mechanism', 'Autoantibodies against desmoglein-3 (and desmoglein-1) disrupt desmosomes in stratified squamous epithelium'),
        kvBullet('Result', 'Acantholysis (loss of cell-to-cell adhesion) → intraepidermal blisters in skin and mucous membranes (Nikolsky sign positive)'),
        body(''),

        h3('8.4  Renal Tubular Disorders'),
        body('Simple cuboidal epithelium of proximal convoluted tubule (PCT) is metabolically active in reabsorption. Damage (e.g., ischaemia, toxins) causes acute tubular necrosis (ATN) — a leading cause of acute kidney injury.'),

        hr(),

        // ── SECTION 9: EXAM TIPS ─────────────────────────────────────────────
        h1('9.  High-Yield Exam Points'),
        callout('TIP', 'In stratified epithelia, always classify by the SURFACE layer shape, not the basal cells.', BLUE_LIGHT, BLUE_DARK),
        body(''),
        callout('TIP', 'Pseudostratified epithelium is SIMPLE — all cells contact the basement membrane.', BLUE_LIGHT, BLUE_DARK),
        body(''),
        callout('TIP', 'Transitional epithelium is unique to the urinary tract. Dome-shaped "umbrella cells" are pathognomonic.', BLUE_LIGHT, BLUE_DARK),
        body(''),
        callout('TIP', 'Simple squamous at a free luminal surface = endothelium (vessels) or mesothelium (body cavities). Name matters in the clinical context.', BLUE_LIGHT, BLUE_DARK),
        body(''),
        callout('TIP', 'Keratinized = dead surface cells, no nuclei, impermeable (skin). Non-keratinized = nucleated surface cells, moist (oral cavity, esophagus).', BLUE_LIGHT, BLUE_DARK),
        body(''),
        callout('TIP', 'Motile cilia = 9+2 + dynein (movement). Primary cilia = 9+0, immotile (sensory). Stereocilia = long microvilli, NOT true cilia (actin, no microtubules).', BLUE_LIGHT, BLUE_DARK),
        body(''),
        callout('TIP', 'Junctional complex order (apical to basal): Tight junction → Zonula adherens → Desmosome → Gap junction.', BLUE_LIGHT, BLUE_DARK),
        body(''),

        hr(),

        // ── SECTION 10: SELF-TEST ────────────────────────────────────────────
        h1('10.  Self-Test Questions'),
        body('Answer these questions to test your understanding:'),
        body(''),
        body('Q1.  A biopsy from the urinary bladder shows dome-shaped cells on the luminal surface that flatten when stretched. Name the epithelial type and explain why it is suited to this location.', { bold: true }),
        body(''),
        body('Q2.  Describe the junctional complex from apical to basal, naming each junction, its molecular components, and its function.', { bold: true }),
        body(''),
        body('Q3.  A 45-year-old smoker undergoes bronchoscopy. Biopsy of the bronchial mucosa shows stratified squamous epithelium instead of the normal lining. (a) Name this change. (b) What is the normal epithelium here? (c) What malignancy may arise if the stimulus is not removed?', { bold: true }),
        body(''),
        body('Q4.  Distinguish between motile cilia and stereocilia in terms of structure, location, and function.', { bold: true }),
        body(''),
        body('Q5.  A patient presents with recurrent chest infections since childhood, infertility, and dextrocardia. Which ciliary protein is most likely defective and what is the underlying mechanism?', { bold: true }),
        body(''),
        body('Q6.  List three locations of simple squamous epithelium and the specific functional reason for this cell type at each site.', { bold: true }),
        body(''),
        body('Q7.  Explain why stratification of epithelium generally correlates with an impermeability function, while simple epithelium correlates with secretion or absorption.', { bold: true }),
        body(''),
        body('Q8.  A patient with severe GERD undergoes endoscopy. Biopsy of the lower esophagus reveals columnar epithelium with goblet cells. Name this condition and identify the normal epithelial type that has been replaced.', { bold: true }),
        body(''),
        body(''),
        callout('ANSWERS', 'Detailed model answers are provided on the following page.', GREY_LIGHT, '444444'),
        new Paragraph({ children: [new PageBreak()] }),

        h2('Model Answers'),
        body(''),
        body('A1.', { bold: true }),
        bullet('Type: Transitional epithelium (urothelium)'),
        bullet('Suited because: uroplakin-containing "umbrella cells" are impermeable to urine; the ability to flatten allows the epithelium to thin and accommodate large increases in bladder volume without losing barrier integrity.'),
        body(''),
        body('A2.', { bold: true }),
        bullet('Zonula occludens (tight junction) — claudins/occludins — seals paracellular space, most apical'),
        bullet('Zonula adherens — E-cadherin–catenin complex + actin — belt-like adhesion encircling the cell'),
        bullet('Macula adherens (desmosome) — desmogleins/desmocollins + intermediate filaments — spot junctions resisting mechanical stress'),
        bullet('Gap junction (nexus) — connexins (connexons) — intercellular channels for ion/small molecule exchange'),
        body(''),
        body('A3.', { bold: true }),
        bullet('(a) Squamous metaplasia'),
        bullet('(b) Pseudostratified ciliated columnar epithelium (respiratory epithelium)'),
        bullet('(c) Squamous cell carcinoma of the lung'),
        body(''),
        body('A4.', { bold: true }),
        bullet('Motile cilia: 9+2 microtubule axoneme; dynein arms provide motility; found on respiratory epithelium (trachea, bronchi), uterine tube; function: propel mucus/particles or oocyte'),
        bullet('Stereocilia: long microvilli (actin core, NOT microtubules); non-motile; found in epididymis (absorption), inner ear hair cells (mechanosensory); a misnomer — they are not true cilia'),
        body(''),
        body('A5.', { bold: true }),
        bullet('Kartagener syndrome (Primary Ciliary Dyskinesia); most common mutations in DNAI1 or DNAH5 encoding dynein arm proteins'),
        bullet('Mechanism: defective dynein arms → cilia cannot generate the ATP-driven sliding of microtubule doublets → immotile cilia → failure of mucociliary clearance (infections), immotile sperm (infertility), failed L-R body axis determination in embryo (situs inversus / dextrocardia)'),
        body(''),
        body('A6.', { bold: true }),
        bullet('Alveoli — passive diffusion of O2/CO2 is maximised by the minimal diffusion distance of flat cells'),
        bullet('Endothelium of blood capillaries — efficient diffusion of nutrients/gases between blood and tissues'),
        bullet('Bowman capsule (parietal layer) — thin passive layer forming the outer wall; does not impede filtrate flow into the urinary space'),
        body(''),
        body('A7.', { bold: true }),
        bullet('Stratified epithelia present multiple cell layers as a physical barrier — substances must cross many membranes, making them relatively impermeable (protective function)'),
        bullet('Simple (single-layer) epithelia minimise the distance substances must travel, optimising rates of transcellular transport, secretion, and absorption; the thin layer allows quick bidirectional movement of molecules'),
        body(''),
        body('A8.', { bold: true }),
        bullet('Condition: Barrett esophagus'),
        bullet('Normal epithelium replaced: stratified squamous non-keratinized epithelium → replaced by intestinal-type simple columnar epithelium with goblet cells (intestinal metaplasia); risk factor for esophageal adenocarcinoma'),
        body(''),

        hr(),
        new Paragraph({
          alignment: AlignmentType.CENTER,
          spacing: { before: 240, after: 0 },
          children: [
            new TextRun({ text: 'End of Study Guide', size: 20, font: 'Calibri', italics: true, color: '888888' })
          ]
        }),
      ]
    }
  ]
});

Packer.toBuffer(doc).then(buf => {
  fs.writeFileSync('/home/daytona/workspace/epithelial-study-guide/Epithelial_Tissue_Study_Guide.docx', buf);
  console.log('SUCCESS');
});
Running Command

cd /home/daytona/workspace/epithelial-study-guide && node build.js 2>&1

Running Command

python /home/daytona/skills/docx/scripts/office/validate.py /home/daytona/workspace/epithelial-study-guide/Epithelial_Tissue_Study_Guide.docx 2>&1

Running Command

python3 -c " import zipfile, sys path = '/home/daytona/workspace/epithelial-study-guide/Epithelial_Tissue_Study_Guide.docx' try: with zipfile.ZipFile(path) as z: names = z.namelist() print('Valid ZIP with', len(names), 'entries') for n in ['word/document.xml','[Content_Types].xml','word/_rels/document.xml.rels']: print(' ', n, '-- FOUND' if n in names else '-- MISSING') except Exception as e: print('ERROR:', e) "

Running Command

ls -lh /home/daytona/workspace/epithelial-study-guide/Epithelial_Tissue_Study_Guide.docx

Your credits are exhausted. Your daily credits reset tomorrow, or you can purchase a top-up for more.
This is a shared conversation. Sign in to Orris to start your own chat.