can myringostapediopexy that is done with short columella graft be called type 3 tympanoplasty

Reading File
Finding Sources
Finding Sources
Searching the Web

myringostapediopexy short columella type 3 tympanoplasty classification Wullstein

Reading File
Reading File
Loading Image
Loading Image
Now I have a very complete picture - including a subtle but important finding from the Shambaugh history chapter. Here is the full answer:

Yes - with an important nuance about how Wullstein himself labeled it

Short answer: In the standard modern (Wullstein) classification that most textbooks teach, myringostapediopexy using a short columella graft is classified as Type III tympanoplasty. However, the original Wullstein diagram actually labeled this configuration as "Type I+II" - which reveals an interesting historical wrinkle.

What is Myringostapediopexy?

It is the direct apposition of the tympanic membrane (or a graft) onto the stapes head (capitulum), using the intact stapes suprastructure as a "short columella." The malleus and incus are absent; sound is conducted directly from the new eardrum to the stapes.

Wullstein's Classification - Type III

In the modern teaching of the Wullstein classification:
TypeOssicular StatusGraft PlacementAlternate Names
IAll ossicles intactOver TM / malleus handleMyringoplasty
IIMalleus erodedOver incus or remnant malleus-
IIIMalleus + incus absentDirectly onto stapes headMyringostapediopexy, Columella tympanoplasty, Stapes columella tympanoplasty
IVOnly stapes footplate presentBetween oval and round windowCavum minor
VFixed stapes footplateNew window in semicircular canalFenestration tympanoplasty
Shambaugh Surgery of the Ear states explicitly:
"A classical type III or stapes columella tympanoplasty involves placement of a tympanic membrane graft such as temporalis fascia directly onto the stapes head - i.e., the ossicular chain is replaced by the single columella of the stapes."
Type III tympanoplasty - TM graft placed directly onto the stapes head
Type III tympanoplasty (stapes columella): TM graft placed directly onto the stapes head. - Shambaugh Surgery of the Ear

The Historical Nuance - Wullstein's Own Original Labeling

This is the subtle but important point. In the original Wullstein classification diagram (reproduced in Shambaugh's history chapter), this exact operation - myringostapediopexy with short columella - was labeled "Type I+II", described as:
"Myringostapediopexy producing a shallow middle ear and a columella effect."
Wullstein's original 5-type diagram from Shambaugh - note panel C labeled "Type I+II" shows myringostapediopexy
Wullstein's original classification (A=Type I, B=Type II, C=Type I+II, D=Type IV, E=Type V). Panel C is what we now call Type III. - Shambaugh Surgery of the Ear
In Wullstein's original five-type scheme, what we now call "Type III" was an intermediate category he called "I+II." Over time, the classification was revised and simplified by the otologic community so that this procedure became formally designated Type III.

Summary

  • By modern standard teaching (Wullstein classification as it is universally taught today): Yes, myringostapediopexy with a short columella graft = Type III tympanoplasty. The terms are synonymous.
  • In Wullstein's original historical paper: This configuration was labeled "Type I+II" - an intermediate hybrid type, not a distinct Type III.
  • The "short columella" in this context refers to the intact stapes suprastructure itself acting as the columella (as opposed to a "long columella"/TORP which goes from the footplate to the TM when the stapes arch is also absent).
So for exam and clinical purposes: yes, it is correctly called Type III tympanoplasty.
  • Shambaugh: Surgery of the Ear, Chapter on Tympanoplasty, Type III stapes columella section and Figure 28-1

take shambaugh surgery of the ear book as reference and explain in detail the gloms jugular and tympanum chapters especially the surgical management

Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Loading Image
Loading Image
Loading Image
Now I have all the material needed for a comprehensive response. Here is the full detailed explanation:

Glomus Jugulare and Glomus Tympanicum - Shambaugh Surgery of the Ear


1. Pathology and Origin

Glomus tumors (GTs) are paragangliomas - benign, highly vascular neoplasms arising from the paraganglion cells of the diffuse neuroendocrine system (DNES). Their cells of origin are the jugulotympanic paraganglions: ovoid, lobulated structures measuring 0.1 to 1.5 mm in diameter, found in association with Jacobson's nerve (tympanic branch of CN IX) and Arnold's nerve (auricular branch of CN X). More than 50% are located in the region of the jugular fossa.
Histologically, chief cells are arranged in clusters called Zellballen, supported by sustentacular cells and small blood vessels. The chief cells contain cytoplasmic granules that store catecholamines. Two ultrastructural subtypes of chief cells - light and dark - are identified.
Biochemistry: Paraganglions lack the enzyme phenylethanolamine-N-methyltransferase, so they predominantly secrete norepinephrine (not epinephrine). Functioning ("secretor") tumors occur in 1-3% of cases. Norepinephrine levels must be elevated 3-5x normal to produce clinical symptoms (headaches, sweating, palpitations, pallor, nausea).

2. Epidemiology and Genetics

  • GTs arise more often in Caucasians
  • Females are 4-6 times more commonly affected than males
  • Peak incidence in the 5th and 6th decades, though any age is possible
  • Heredofamilial tendency exists with autosomal dominant transmission
  • In familial tumors, associated lesions occur in 25-50% of cases
  • 10% of non-familial cases have multiple synchronous tumors
  • GTs are characteristically slow-growing and rarely metastasize
  • Association exists with pheochromocytoma, thyroid neoplasms, parathyroid adenoma, and MEN syndromes

3. Spread and Invasion

GTs spread along tracts of least resistance: the air cell tracts of the temporal bone, vascular lumina, neurovascular foramina, the Eustachian tube, and direct extension. They invade bone. Cochleovestibular destruction is caused by ischemic necrosis. Spread is multidirectional and simultaneous.
Intracranial extension (ICE) into the posterior cranial fossa occurs directly through dura or along cranial nerve routes - the internal auditory canal is a frequent highway.
Cranial nerve paralysis occurs in:
  • 35% of jugulotympanic lesions
  • 57% of intravagal paragangliomas
  • CN VII through XII and the sympathetic trunk are most commonly involved
Glomus tumor extension routes - arrows show multidirectional spread from jugular bulb upward through temporal bone air cells, laterally toward EAC, and along vascular channels
Glomus tumor extension routes - Shambaugh Surgery of the Ear, Fig. 41-8

4. Classification: Glasscock-Jackson Staging System

This is the classification system used throughout the Shambaugh text (Table 41-1):

Glomus Tympanicum (GTy)

StageDescription
Type ISmall mass limited to the promontory
Type IITumor completely filling the middle ear space
Type IIITumor filling middle ear and extending into mastoid process
Type IVTumor filling middle ear, extending into mastoid or through tympanic membrane to fill EAC; may extend anterior to the ICA

Glomus Jugulare (GJ)

StageDescription
Type ISmall tumor involving jugular bulb, middle ear, and mastoid
Type IITumor extending under internal auditory canal; may have intracranial extension
Type IIITumor extending into petrous apex; may have intracranial extension
Type IVTumor extending beyond petrous apex into clivus or infratemporal fossa; may have intracranial extension

5. Clinical Features

The classic presenting symptoms (from Table 41-2):
SymptomGlomus Jugulare (n=106)Glomus Vagale (n=27)
Pulsatile tinnitus84%8%
Hearing loss62%4%
Aural fullness32%3%
Otalgia13%3%
Hoarseness12%4%
Dysphagia8%-
  • Tumor growth into mesotympanum causes conductive hearing loss; labyrinthine invasion produces a sensorineural component
  • TM erosion and bleeding are late symptoms
  • Cranial neuropathy indicates extensive disease
  • "Idiopathic" cranial neuropathy is an unacceptable diagnosis - it mandates aggressive imaging to exclude a lateral skull base lesion
  • Facial paralysis is usually a late sign and an ominous omen for facial nerve outcome
Important warning: Myringotomy or tympanotomy for biopsy is condemned - it causes brisk bleeding that must be packed, risking damage to ear structures. Biopsy of an aberrant ICA can be catastrophic.

6. Diagnosis and Preoperative Workup

The diagnostic process serves as a treatment planning tool. Goals:
  1. Determine tumor size, type, and extent
  2. Evaluate histochemical or multicentric lesions
  3. Identify and assess intracranial extension
  4. Assess major vasculature involvement
  5. Assess intracranial collateral circulation

Imaging

CT of temporal bone (with bone windows, axial and coronal):
  • Differentiates GTy from GJ: presence of air or bone between the tumor mass and jugular bulb = GTy tumor
  • Examine the caroticojugular plate (spine) separating jugular bulb from ICA - eroded early in GJ tumors; a mottled plate is characteristic for GJ tumors
  • GTy: well-defined enhancing soft tissue mass over the promontory, hypotympanic floor and jugular fossa usually intact
Axial CT: Right glomus tympanicum tumor with uninvolved jugular bulb (the key finding distinguishing GTy from GJ)
CT showing glomus tympanicum with intact jugular bulb - Shambaugh Fig. 41-1
MRI:
  • Characterizes GTs by multiple vascular flow voids ("salt and pepper" appearance) on T2
  • Differentiates from schwannomas (homogeneous enhancement, possible cystic areas)
  • Best for evaluating ICE and neural/vascular structure involvement
  • MRI of head and neck assesses multicentricity
CT angiography / CT venography: Defines vascular supply, ICA involvement, jugular vein patency.
Bilateral carotid angiography: Performed preoperatively at the time of tumor embolization to evaluate ICA involvement and map tumor blood supply (especially important for ICE, which can draw supply from pial vessels, vertebral artery, ICA, AICA, and PICA in addition to ECA sources).
Octreotide scanning: ¹²³I-labeled Tyr3-octreotide. Sensitive and specific for paragangliomas down to 1 cm resolution. Also detects recurrences and other endocrine tumors in MEN syndrome and metastatic disease.

Biochemical Screening

  • Every GT patient (except small GTy) gets serum catecholamines and urinary metabolites
  • Elevated epinephrine mandates adrenal CT or selective renal vein sampling to exclude pheochromocytoma
  • For GTy without family history or multiplicity, biochemical screening can be omitted

7. Treatment Planning

Treatment is palliative or definitive (curative). Key factors:
  • Patient age and physiological status
  • Tumor type and natural history
  • Probability the tumor causes morbidity in the patient's remaining lifespan
Palliation is recommended for patients >65-70 years physiologically, the medically infirm, or select multicentric lesions. Small GTs in elderly patients are unlikely to cause concern in remaining years due to their slow growth. Asymptomatic patients elected for palliation are followed with serial imaging; if growth or symptoms develop, radiation is offered.
Bilateral GJ tumors: The more life-threatening lesion is operated first. Contralateral surgery planned at 6 months if the patient emerges neurologically intact. Extensive bilateral cranial nerve loss can lead to permanent tracheostomy, tracheal diversion, or artificial alimentary support - making further surgery inadvisable.

8. Radiation Therapy

Shambaugh takes a cautious stance on RT:
  • RT and stereotactic radiosurgery (SRS) are offered as a minimal, low-morbidity, low-cost conservation strategy
  • Virtually any lesion is technically resectable; the primary criticism of surgery is the risk of functional incapacity
  • The RT position: "relief of symptoms and failure of tumor to grow during the patient's lifetime is a practical measure of success" (Cummings)
  • Shambaugh counters: the assumption that irradiated tumor consists of inert cells is probably inaccurate - RT forces the patient to coexist with a biologically altered tumor
  • The distinction between disease "control" and "cure" is more than semantic
  • Current data cannot support "disease control" because of tumor rarity, protracted 15-20 year natural history, and evolving RT techniques

9. Surgical Management

Surgical Objectives

"Total tumor removal, with the preservation of structure and function to the greatest extent possible - conservation surgery."

Preoperative Embolization

Performed at the time of diagnostic angiography, 24-48 hours before surgery. Documents the utility of embolization in limiting operative blood loss with predictably low risks.

Anesthetic Goals in Lateral Skull Base Surgery

  • Maintenance of hemodynamic stability (especially during tumor manipulation and catecholamine release)
  • Prevention of increased intracranial pressure
  • Maintenance of cerebral perfusion and oxygenation
  • Facilitation of electrophysiologic monitoring
  • Replacement of blood loss (autologous blood whenever possible)
  • Preoperative identification and treatment of "secretors" for controlled anesthesia induction
  • Postoperative airway management
  • Invasive monitoring for hemodynamic data

10. Glomus Tympanicum: Surgical Management

Class I GTy - Transcanal Tympanotomy

For a Class I GTy (mesotympanic mass with margins visible 360 degrees + confirmatory imaging):
  • Performed via transcanal tympanotomy
  • The mass is avulsed from the promontory
  • Bleeding controlled by microbipolar coagulation or light packing
  • Outpatient procedure with excellent results

Class II-IV GTy - Transmastoid Approach

For Class II-IV GTy (tumor margins not visible on otoscopy, radiologically differentiated from GJ):
  • Transmastoid resection is elected
  • If intraoperatively the tumor is found to be a GJ tumor (imaging unreliable), the procedure is aborted and definitive lateral skull base surgery is planned for another day
  • Procedure: complete mastoidectomy with extended facial recess exposure
  • Hypotympanic exposure permits visual assessment of the GTy relative to the jugular bulb, ICA, and temporal bone structures
  • Inferior EAC and inferior tympanic ring are drilled substantially for adequate hypotympanic exposure; this bone is reconstructed with bone dust (pâté) collected from the cortical mastoid at the start
  • Once tumor is removed, necessary tympanoplastic reconstruction is done
Laser technology: The laser can be defocused to bloodlessly shrink the tumor and identify feeding vessels. Small vessels can be shrunken and cauterized; larger vessels require microbipolar coagulation, light packing, or bone wax packing.

GTy Outcomes (Jackson Series)

  • Average follow-up 55 months; average age 53 years; 91% women
  • Stage I: 34%, Stage II: 52%, Stage III: 3%, Stage IV: 11%
  • Extended facial recess approach used in 73%; transcanal in 16%; canal-wall-down in 11%
  • Total tumor removal in 95%
  • Long-term tumor control in 92.5%
  • Only 2 recurrences (one at 14 years - emphasizing need for long-term follow-up: annually x5 years, then every 5 years thereafter)
  • GTy associated with other paragangliomas in only 1 patient (familial history)

11. Glomus Jugulare: Surgical Management

GJ tumor removal requires lateral skull base surgery and is a multidisciplinary team effort.

Facial Nerve Management

Facial nerve neural integrity monitoring (FNNIM) is mandatory. Options in GT surgery:
OptionIndicationOutcome
Simple exposureSmall tumors; working between C1 and FNMinimal morbidity
"Short" mobilizationClass I-II; from external genu laterallyNearly normal postop function; HB Grade 1-2 long-term
"Long" mobilizationClass III-IV; from geniculate ganglion distallyGood HB outcomes with stylomastoid fascia cuff technique
Selective division + reanastomosisRarely necessary today-
Segmental resection + graftingFN inextricable from tumor (rare)Required when FN cannot be dissected free
The stylomastoid foramen segment can be pressed anteriorly while maintaining the stylomastoid fascia cuff, preserving vascular supply to the vertical segment.
FN paralysis preoperatively is an ominous sign - dissection should still be attempted, but resection with end-to-end anastomosis or interpositional grafting may be required.

Internal Carotid Artery Principles

  • The ICA is fundamental to every lateral skull base case - the GT always relates to it
  • The rate-limiting step in all lateral skull base surgery is dissection of tumor from the ICA
  • Proximal and distal control (circumferential access to normal vessel) must be achieved - tympanic, petrous, and intracranial ICA segments all require access complementing easy neck access
  • When tumor inextricably involves the ICA, continuity is restored by interpositional vein graft
  • ICA sacrifice prediction testing (balloon occlusion) is not commonly done with modern vein grafting capability

GJ Class I and II (Small to Medium)

Tumors confined to the infralabyrinthine chamber with ICA involvement limited to the tympanic segment. A hearing conservation approach that preserves the EAC is used.
Surgical steps:
  1. Patient supine; anteriorly-based neck/temporal flap incision
  2. Vital neurovascular neck anatomy isolated and controlled
  3. Facial nerve extratemporal dissection minimized (preserve vascular supply)
  4. Internal jugular vein ligated
  5. Complete mastoidectomy + mastoid tip removal + inferior tympanic bone removal + skeletonization of inferior-anterior EAC
  6. Access to mesotympanum and complete dissection of tympanic ICA to the Eustachian tube for control
  7. FN undergoes "short" mobilization
  8. Proximal control of lateral venous sinus (LVS): achieved by intraluminal or extraluminal packing, or both. A shelf of bone is left overlying the proximal sinus for extraluminal packing between the shelf and the lateral sinus wall
    • Caution: Excessive proximal packing into the transverse sinus risks retrograde propagating thrombus with venous congestion, altered consciousness, or aphasia. Occlusion of the vein of Labbé can be fatal
  9. Tumor dissected from ICA, then mobilized from the infralabyrinthine chamber
  10. Within the jugular bulb, brisk bleeding from inferior petrosal sinus openings is packed gently with minimal force

GJ Class III and IV (Medium to Large)

When the GT extends into the infratemporal fossa (IFTF) or when control of the petrous ICA is required. A modified IFTF approach (or extension thereof) is used. A complete conductive hearing loss is conceded.
These approaches also provide access to the clivus, nasopharynx, cavernous sinus, and posterior, middle, and anterior cranial fossae.
Surgical steps (in addition to Class I-II steps):
  1. Same incision as Class I-II but EAC is transected and oversewn
  2. EAC, TM, and middle ear contents lateral to stapes are resected
  3. Access to petrous ICA and IFTF requires anterior and inferior dislocation of the mandible by dividing anteromedial ligamentous attachments
  4. FN undergoes "long" mobilization (from geniculate ganglion distally)
  5. More recent modification: stylomastoid foramen contents and digastric remain attached to CN VII during translocation (reduces ICA supply risk)
  6. When anterosuperior extension or distal ICA dissection is extreme: resection of zygoma and TMJ unit with inferior reflection of temporalis muscle
  7. ET is resected; foramen spinosum contents managed; ICA dissected through pterygoid region to precavernous margin
  8. Access extended to middle cranial fossa, nasopharynx, foramen rotundum, clivus, posterior cranial fossa, and cavernous sinus

12. Intracranial Extension (ICE)

ICE = transdural spread of tumor into the subarachnoid space. Once considered a criterion for unresectability - now the modern approach correctly treats the tumor and its ICE as a single unit in an unstaged procedure.
ICE management sequence:
  1. Tumor dissection from ICA/IFTF
  2. Tumor debulking from temporal bone down to dura
  3. Removal of ICE
  4. Defect reconstruction
ICE usually occurs through the posterior fossa dura or along cranial nerve roots. Translabyrinthine and transcochlear adjunctive dissection expands posterior cranial fossa exposure.
Unique obstacles in single-stage ICE resection:
  • Wider bony and soft tissue defects
  • Local tissue usually rendered unavailable for reconstruction
  • CSF pressure enhanced by venous occlusion
  • Regional devitalization by RT, ICA exposure, and EAC ligation ischemia

13. Defect Reconstruction

Size of defect determines complexity of repair. General principles:
  • Dural defect closed with vascularized tissue
  • Tissue bulk (often vascularized) to reinforce and resist CSF pressure
  • Lumbar drain for 5-7 days postoperatively for CSF decompression
  • Preservation and mobilization of local tissue
Reconstruction options:
FlapUseNotes
Temporoparietal fascia (superficial temporal fascia)Small-medium dural defectsVascularized by EAC; rotated into defect; requires careful zygomatic dissection
+ free abdominal fat graftSmall defectsCombined with fascia flap
SCM fascial flapStandard closureCreated by cutting along temporal line; mobilized posteriorly and inferiorly; reattached to deep temporal/parotid fascia
Rectus abdominis free flapLarge/irradiated defectsHarvested by separate team concurrently; expect 40% atrophy - intentionally oversize
Lower trapezius flapLarge defectsAlso used for complex defects
Serratus muscleMicrovascular free-flap; also for facial reanimation when FN/muscle resected3+ slips for nasolabial region; proximal FN anastomosed to motor nerve of serratus
Gracilis / radial forearmCombined defect reconstruction and facial reanimation-

14. Rehabilitation of Cranial Nerve Loss

Lateral skull base surgery exposes the patient to potential loss of CN IV through XII and the sympathetic trunk.
  • For small lesions: CN preservation >90%
  • Single-nerve loss rarely causes clinical problems (most patients compensate)
  • Acute aggregate cranial nerve loss is poorly tolerated but generally surgically rehabilitable
  • In the elderly, combined CN loss may make swallowing rehabilitation impossible
Key rehabilitation advance: Primary Silastic medialization of the vocal cord has:
  • Obviated the need for tracheostomy
  • Shortened hospital stay
  • Reduced time to oral intake resumption
  • "Revolutionized lateral skull base surgery"

15. GJ Skull Base Surgery Outcomes

From a review of 279 skull base procedures in 176 patients (152 GJ, 27 glomus vagale, 3 carotid body tumors):
  • Average patient age: 41 years; 2.59:1 female predominance
  • Surgical control = complete tumor removal with no recurrence
  • For small lesions: CN preservation >90%
  • For large tumors: CN loss is a fact of life, but compensation and operative rehabilitation are effective

Summary Table

FeatureGlomus TympanicumGlomus Jugulare
OriginPromontory (Jacobson's nerve)Jugular bulb/fossa
Key CT findingMass on promontory; intact jugular fossa floorJugular fossa enlargement; cortical erosion; mottled caroticojugular plate
Distinguishing signAir/bone between mass and jugular bulbLoss of caroticojugular plate integrity
Class I surgeryTranscanal tympanotomyInfralabyrinthine dissection, hearing-sparing lateral skull base
Class II-IV surgeryTransmastoid + extended facial recessModified IFTF approach; EAC transected; long FN mobilization
Hearing outcomePreserved in mostConductive loss conceded for Class III-IV
Tumor control92.5% (Jackson series)Depends on stage; surgery preferred over RT for cure
BiopsyCondemnedCondemned
All content sourced from: Shambaugh Surgery of the Ear, Chapter 41, p. 756-769

make ppt with full text you have given above

Reading File
Reading File
Running Command

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

Running Command

mkdir -p /home/daytona/workspace/glomus-ppt

Writing File

~/glomus-ppt/create_ppt.js

const pptxgen = require("pptxgenjs");

const pres = new pptxgen();
pres.layout = 'LAYOUT_16x9';
pres.title = 'Glomus Jugulare and Glomus Tympanicum';
pres.author = 'Shambaugh Surgery of the Ear';

// ─── COLOR PALETTE ───────────────────────────────────────────────────────────
const C = {
  darkBg:    "0D1B2A",   // deep navy – title/section slides
  midBg:     "1A2D45",   // slightly lighter navy
  lightBg:   "F0F4F8",   // off-white body slides
  accent1:   "E63946",   // bold red  (arterial)
  accent2:   "2196A4",   // teal-blue (venous / headings)
  accent3:   "F4A261",   // amber (warnings / highlights)
  white:     "FFFFFF",
  lightGrey: "CBD5E1",
  bodyText:  "1E293B",
  mutedText: "64748B",
  tableHead: "1A3A5C",
  tableRow1: "FFFFFF",
  tableRow2: "E8F0FA",
};

// ─── HELPER FUNCTIONS ────────────────────────────────────────────────────────
function titleSlide(titleText, subtitleText) {
  const s = pres.addSlide();
  // Full dark background
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkBg } });
  // Left accent bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 5.625, fill: { color: C.accent1 } });
  // Bottom strip
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.1, w: 10, h: 0.525, fill: { color: C.midBg } });

  s.addText(titleText, {
    x: 0.4, y: 1.4, w: 9.2, h: 1.6,
    fontSize: 36, bold: true, color: C.white,
    fontFace: "Calibri", align: "center", valign: "middle",
  });
  if (subtitleText) {
    s.addText(subtitleText, {
      x: 0.4, y: 3.2, w: 9.2, h: 0.7,
      fontSize: 18, color: C.lightGrey,
      fontFace: "Calibri", align: "center", italic: true,
    });
  }
  s.addText("Shambaugh Surgery of the Ear  •  Chapter 41", {
    x: 0.4, y: 5.15, w: 9.2, h: 0.4,
    fontSize: 11, color: C.mutedText, align: "center", fontFace: "Calibri",
  });
  return s;
}

function sectionDivider(label) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.midBg } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 2.4, w: 10, h: 0.08, fill: { color: C.accent1 } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 2.5, w: 10, h: 0.04, fill: { color: C.accent2 } });
  s.addText(label, {
    x: 0.5, y: 1.5, w: 9, h: 1.5,
    fontSize: 40, bold: true, color: C.white,
    fontFace: "Calibri", align: "center", valign: "middle",
  });
  return s;
}

function bodySlide(titleText, contentFn) {
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.lightBg } });
  // Title bar
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 0.82, fill: { color: C.tableHead } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0.82, w: 10, h: 0.06, fill: { color: C.accent1 } });
  s.addText(titleText, {
    x: 0.3, y: 0, w: 9.4, h: 0.82,
    fontSize: 22, bold: true, color: C.white,
    fontFace: "Calibri", valign: "middle",
  });
  if (contentFn) contentFn(s);
  // Footer
  s.addShape(pres.ShapeType.rect, { x: 0, y: 5.4, w: 10, h: 0.225, fill: { color: C.tableHead } });
  s.addText("Shambaugh Surgery of the Ear  |  Glomus Tumors", {
    x: 0.3, y: 5.4, w: 9.4, h: 0.225,
    fontSize: 9, color: C.lightGrey, fontFace: "Calibri", valign: "middle",
  });
  return s;
}

function bullets(s, items, opts = {}) {
  const {
    x = 0.35, y = 1.0, w = 9.3, h = 4.2,
    fontSize = 15, color = C.bodyText, indent = 0, bold = false,
  } = opts;
  const arr = items.map((item, i) => {
    const isLast = i === items.length - 1;
    if (typeof item === "object" && item.sub) {
      return { text: item.text, options: { bullet: { indent: 20 }, breakLine: !isLast, fontSize: 13, color: C.mutedText } };
    }
    if (typeof item === "object" && item.bold) {
      return { text: item.text, options: { bullet: true, breakLine: !isLast, fontSize, bold: true, color: C.accent2 } };
    }
    return { text: item, options: { bullet: true, breakLine: !isLast, fontSize, color, bold } };
  });
  s.addText(arr, { x, y, w, h, fontFace: "Calibri", valign: "top" });
}

function twoCol(s, leftItems, rightItems, opts = {}) {
  const {
    y = 1.0, h = 4.2, fontSize = 14,
  } = opts;
  const makeArr = (items) => items.map((item, i) => {
    const isLast = i === items.length - 1;
    if (typeof item === "object" && item.bold) {
      return { text: item.text, options: { bullet: true, breakLine: !isLast, fontSize, bold: true, color: C.accent2 } };
    }
    if (typeof item === "object" && item.sub) {
      return { text: item.text, options: { bullet: { indent: 20 }, breakLine: !isLast, fontSize: 12, color: C.mutedText } };
    }
    return { text: item, options: { bullet: true, breakLine: !isLast, fontSize, color: C.bodyText } };
  });
  s.addText(makeArr(leftItems),  { x: 0.3,  y, w: 4.6, h, fontFace: "Calibri", valign: "top" });
  s.addText(makeArr(rightItems), { x: 5.1,  y, w: 4.6, h, fontFace: "Calibri", valign: "top" });
  // Divider
  s.addShape(pres.ShapeType.rect, { x: 4.95, y: y + 0.1, w: 0.04, h: h - 0.2, fill: { color: C.lightGrey } });
}

// ─── SLIDES ──────────────────────────────────────────────────────────────────

// SLIDE 1 – TITLE
titleSlide(
  "Glomus Jugulare &\nGlomus Tympanicum",
  "Pathology · Classification · Diagnosis · Surgical Management"
);

// SLIDE 2 – TABLE OF CONTENTS
bodySlide("Table of Contents", s => {
  const items = [
    "1. Pathology & Origin",
    "2. Epidemiology & Genetics",
    "3. Spread & Invasion",
    "4. Classification (Glasscock-Jackson)",
    "5. Clinical Features",
    "6. Diagnosis & Preoperative Workup",
    "7. Treatment Planning",
    "8. Radiation Therapy vs Surgery",
    "9. Surgical Management – Glomus Tympanicum",
    "10. Surgical Management – Glomus Jugulare (Class I-II)",
    "11. Surgical Management – Glomus Jugulare (Class III-IV)",
    "12. Intracranial Extension",
    "13. Defect Reconstruction",
    "14. Cranial Nerve Rehabilitation & Outcomes",
  ];
  bullets(s, items, { fontSize: 14 });
});

// SECTION 1
sectionDivider("1. Pathology & Origin");

// SLIDE 3
bodySlide("Pathology & Histological Origin", s => {
  twoCol(s,
    [
      { bold: true, text: "What are Glomus Tumors?" },
      "Benign, highly vascular neoplasms",
      "Arise from paraganglion cells of the DNES (Diffuse Neuroendocrine System)",
      "Also called: Paragangliomas",
      { bold: true, text: "Cell of Origin" },
      "Jugulotympanic paraganglions",
      "Ovoid, lobulated – 0.1 to 1.5 mm diameter",
      "Found with Jacobson's nerve (CN IX) and Arnold's nerve (CN X)",
      ">50% located in the region of the jugular fossa",
    ],
    [
      { bold: true, text: "Histology" },
      "Chief cells arranged in Zellballen clusters",
      "Supported by sustentacular cells and small blood vessels",
      "Two chief cell subtypes: Light and Dark",
      "Cytoplasmic granules store catecholamines",
      { bold: true, text: "Biochemistry" },
      "Lack phenylethanolamine-N-methyltransferase",
      "Predominantly secrete NOREPINEPHRINE (not epinephrine)",
      "Functional ('secretor') tumors: 1-3% of cases",
    ]
  );
});

// SECTION 2
sectionDivider("2. Epidemiology & Genetics");

// SLIDE 4
bodySlide("Epidemiology & Genetics", s => {
  twoCol(s,
    [
      { bold: true, text: "Demographics" },
      "More common in Caucasians",
      "Females : Males = 4-6 : 1",
      "Peak incidence: 5th and 6th decades",
      "Can occur in any age (infants to elderly)",
      { bold: true, text: "Behavior" },
      "Characteristically slow-growing",
      "Rarely metastasize",
      "Prolonged survival possible even with metastatic disease",
    ],
    [
      { bold: true, text: "Genetics" },
      "Heredofamilial tendency: Autosomal dominant",
      "Familial tumors: associated lesions in 25-50%",
      "10% of non-familial cases: multiple synchronous tumors",
      { bold: true, text: "Associated Conditions" },
      "Pheochromocytoma",
      "Thyroid neoplasms",
      "Parathyroid adenoma",
      "Multiple Endocrine Neoplasia (MEN) syndromes",
    ]
  );
});

// SECTION 3
sectionDivider("3. Spread & Invasion");

// SLIDE 5
bodySlide("Routes of Spread", s => {
  twoCol(s,
    [
      { bold: true, text: "Spread is Multidirectional & Simultaneous" },
      "Along air cell tracts of the temporal bone",
      "Via vascular lumina",
      "Along neurovascular foramina",
      "Through the Eustachian tube",
      "By direct extension beyond the temporal bone",
      { bold: true, text: "Bone Invasion" },
      "GTs invade bone directly",
      "Cochleovestibular destruction by ischemic necrosis",
    ],
    [
      { bold: true, text: "Intracranial Extension (ICE)" },
      "Occurs directly through posterior fossa dura",
      "Spreads along cranial nerve routes",
      "Internal auditory canal is a frequent highway",
      { bold: true, text: "Cranial Nerve Involvement" },
      "Paralysis in 35% of jugulotympanic lesions",
      "57% of intravagal paragangliomas",
      "CN VII through XII and sympathetic trunk most common",
      "Compensation masks early CN loss – growth is slow",
    ]
  );
});

// SECTION 4
sectionDivider("4. Classification\n(Glasscock-Jackson)");

// SLIDE 6 – CLASSIFICATION TABLE GTy
bodySlide("Glasscock-Jackson Classification – Glomus Tympanicum", s => {
  const rows = [
    [{ text: "Stage", options: { bold: true, color: C.white } }, { text: "Description", options: { bold: true, color: C.white } }],
    ["Type I", "Small mass limited to the promontory"],
    ["Type II", "Tumor completely filling the middle ear space"],
    ["Type III", "Tumor filling middle ear and extending into mastoid process"],
    ["Type IV", "Tumor filling middle ear, extending into mastoid or through TM to fill EAC; may extend anterior to ICA"],
  ];
  s.addTable(rows, {
    x: 0.35, y: 1.0, w: 9.3, h: 3.5,
    fontSize: 14, fontFace: "Calibri",
    colW: [1.5, 7.8],
    border: { type: "solid", pt: 1, color: C.lightGrey },
    fill: C.tableRow1,
    rowH: 0.62,
    color: C.bodyText,
  });
  // manually color header row
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.0, w: 9.3, h: 0.62, fill: { color: C.tableHead } });
  s.addText([
    { text: "Stage", options: { bold: true } },
  ], { x: 0.45, y: 1.05, w: 1.3, h: 0.52, fontSize: 14, color: C.white, fontFace: "Calibri" });
  s.addText([
    { text: "Description", options: { bold: true } },
  ], { x: 1.95, y: 1.05, w: 7.6, h: 0.52, fontSize: 14, color: C.white, fontFace: "Calibri" });

  const rowData = [
    ["Type I",   "Small mass limited to the promontory"],
    ["Type II",  "Tumor completely filling the middle ear space"],
    ["Type III", "Tumor filling middle ear and extending into mastoid process"],
    ["Type IV",  "Tumor filling middle ear, extending into mastoid or through TM to fill EAC; may extend anterior to ICA"],
  ];
  rowData.forEach((row, i) => {
    const yPos = 1.62 + i * 0.64;
    const bg = i % 2 === 0 ? C.tableRow1 : C.tableRow2;
    s.addShape(pres.ShapeType.rect, { x: 0.35, y: yPos, w: 9.3, h: 0.62, fill: { color: bg } });
    s.addText(row[0], { x: 0.45, y: yPos + 0.08, w: 1.3, h: 0.5, fontSize: 14, bold: true, color: C.accent2, fontFace: "Calibri" });
    s.addText(row[1], { x: 1.95, y: yPos + 0.08, w: 7.5, h: 0.5, fontSize: 13, color: C.bodyText, fontFace: "Calibri" });
  });

  s.addText("GTy = Glomus Tympanicum  |  TM = Tympanic Membrane  |  EAC = External Auditory Canal  |  ICA = Internal Carotid Artery", {
    x: 0.35, y: 4.9, w: 9.3, h: 0.3, fontSize: 10, color: C.mutedText, fontFace: "Calibri",
  });
});

// SLIDE 7 – CLASSIFICATION TABLE GJ
bodySlide("Glasscock-Jackson Classification – Glomus Jugulare", s => {
  const rowData = [
    ["Type I",   "Small tumor involving jugular bulb, middle ear, and mastoid process"],
    ["Type II",  "Tumor extending under internal auditory canal; may have intracranial extension"],
    ["Type III", "Tumor extending into petrous apex; may have intracranial extension"],
    ["Type IV",  "Tumor extending beyond petrous apex into clivus or infratemporal fossa; may have intracranial extension"],
  ];

  // Header
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.0, w: 9.3, h: 0.62, fill: { color: C.tableHead } });
  s.addText("Stage", { x: 0.45, y: 1.05, w: 1.3, h: 0.52, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri" });
  s.addText("Description", { x: 1.95, y: 1.05, w: 7.6, h: 0.52, fontSize: 14, bold: true, color: C.white, fontFace: "Calibri" });

  rowData.forEach((row, i) => {
    const yPos = 1.62 + i * 0.7;
    const bg = i % 2 === 0 ? C.tableRow1 : C.tableRow2;
    s.addShape(pres.ShapeType.rect, { x: 0.35, y: yPos, w: 9.3, h: 0.68, fill: { color: bg } });
    s.addText(row[0], { x: 0.45, y: yPos + 0.08, w: 1.3, h: 0.55, fontSize: 14, bold: true, color: C.accent1, fontFace: "Calibri" });
    s.addText(row[1], { x: 1.95, y: yPos + 0.08, w: 7.5, h: 0.55, fontSize: 13, color: C.bodyText, fontFace: "Calibri" });
  });

  s.addText("IAC = Internal Auditory Canal  |  ICE = Intracranial Extension", {
    x: 0.35, y: 4.9, w: 9.3, h: 0.3, fontSize: 10, color: C.mutedText, fontFace: "Calibri",
  });
});

// SECTION 5
sectionDivider("5. Clinical Features");

// SLIDE 8
bodySlide("Clinical Features & Presenting Symptoms", s => {
  // Left: symptoms
  s.addText("Presenting Symptoms", {
    x: 0.35, y: 1.0, w: 4.5, h: 0.35, fontSize: 15, bold: true, color: C.accent2, fontFace: "Calibri",
  });
  const symptomData = [
    ["Symptom",             "GJ (%)", "GV (%)"],
    ["Pulsatile tinnitus",  "84",     "8"],
    ["Hearing loss",        "62",     "4"],
    ["Aural fullness",      "32",     "3"],
    ["Otalgia",             "13",     "3"],
    ["Hoarseness",          "12",     "4"],
    ["Dysphagia",           "8",      "-"],
  ];

  // Mini table
  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 1.4, w: 4.5, h: 0.45, fill: { color: C.tableHead } });
  s.addText("Symptom",    { x: 0.4,  y: 1.45, w: 2.4, h: 0.38, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri" });
  s.addText("GJ (%)",     { x: 2.9,  y: 1.45, w: 0.9, h: 0.38, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center" });
  s.addText("GV (%)",     { x: 3.85, y: 1.45, w: 0.9, h: 0.38, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri", align: "center" });

  symptomData.slice(1).forEach((row, i) => {
    const yPos = 1.85 + i * 0.42;
    const bg = i % 2 === 0 ? C.tableRow1 : C.tableRow2;
    s.addShape(pres.ShapeType.rect, { x: 0.35, y: yPos, w: 4.5, h: 0.4, fill: { color: bg } });
    s.addText(row[0], { x: 0.4,  y: yPos + 0.05, w: 2.4, h: 0.32, fontSize: 12, color: C.bodyText, fontFace: "Calibri" });
    s.addText(row[1], { x: 2.9,  y: yPos + 0.05, w: 0.9, h: 0.32, fontSize: 12, color: C.bodyText, fontFace: "Calibri", align: "center" });
    s.addText(row[2], { x: 3.85, y: yPos + 0.05, w: 0.9, h: 0.32, fontSize: 12, color: C.bodyText, fontFace: "Calibri", align: "center" });
  });
  s.addText("GJ = Glomus Jugulare (n=106)  |  GV = Glomus Vagale (n=27)", {
    x: 0.35, y: 4.55, w: 4.5, h: 0.3, fontSize: 9, color: C.mutedText, fontFace: "Calibri",
  });

  // Divider
  s.addShape(pres.ShapeType.rect, { x: 5.0, y: 1.0, w: 0.04, h: 3.9, fill: { color: C.lightGrey } });

  // Right: key clinical points
  s.addText("Key Clinical Points", {
    x: 5.15, y: 1.0, w: 4.5, h: 0.35, fontSize: 15, bold: true, color: C.accent2, fontFace: "Calibri",
  });
  const clinPts = [
    "Conductive hearing loss: tumor in mesotympanum",
    "Sensorineural component: labyrinthine invasion",
    "TM erosion and bleeding: late symptoms",
    "Cranial neuropathy: suggests extensive disease",
    { bold: true, text: "WARNING: 'Idiopathic' CN palsy is unacceptable – always image!" },
    "Facial paralysis: late sign, ominous for FN outcome",
    { bold: true, text: "BIOPSY CONDEMNED – risk of catastrophic bleeding / ICA injury" },
    "Mesotympanic vascular mass visible behind TM: classic sign",
  ];
  const bArr = clinPts.map((item, i) => {
    const isLast = i === clinPts.length - 1;
    if (typeof item === "object" && item.bold) {
      return { text: item.text, options: { bullet: true, breakLine: !isLast, fontSize: 13, bold: true, color: C.accent1 } };
    }
    return { text: item, options: { bullet: true, breakLine: !isLast, fontSize: 13, color: C.bodyText } };
  });
  s.addText(bArr, { x: 5.15, y: 1.45, w: 4.5, h: 3.8, fontFace: "Calibri", valign: "top" });
});

// SECTION 6
sectionDivider("6. Diagnosis &\nPreoperative Workup");

// SLIDE 9
bodySlide("Diagnostic Objectives & Imaging", s => {
  s.addText("Diagnostic Goals", {
    x: 0.35, y: 1.0, w: 9.3, h: 0.35, fontSize: 15, bold: true, color: C.accent2, fontFace: "Calibri",
  });
  const goals = [
    "Determine tumor size, type, and extent",
    "Evaluate histochemical or multicentric associated lesions",
    "Identify and assess intracranial extension (ICE)",
    "Assess major vasculature (ICA, LVS) involvement",
    "Assess intracranial collateral circulation",
  ];
  const gArr = goals.map((g, i) => ({
    text: `${i+1}. ${g}`, options: { breakLine: i < goals.length - 1, fontSize: 14, color: C.bodyText }
  }));
  s.addText(gArr, { x: 0.5, y: 1.4, w: 9.0, h: 0.85, fontFace: "Calibri" });

  // Imaging boxes
  const boxes = [
    { title: "CT Temporal Bone\n(Bone Windows)", pts: ["Axial + coronal planes mandatory", "Key: Is air/bone present between mass and jugular bulb? → GTy", "Mottled caroticojugular plate → GJ", "Defines bony destruction extent"], x: 0.3 },
    { title: "MRI (Gadolinium)", pts: ["'Salt and pepper' flow voids → GJ (T2)", "Homogeneous enhancement → schwannoma", "Best for ICE and CN/vessel involvement", "Whole head and neck: assess multicentricity"], x: 3.55 },
    { title: "Angiography +\nEmbolization", pts: ["Bilateral carotid angiography preop", "Maps tumor blood supply", "Embolization 24-48 h before surgery", "CTA/CTV for ICA involvement & JV patency"], x: 6.8 },
  ];

  boxes.forEach(box => {
    s.addShape(pres.ShapeType.rect, { x: box.x, y: 2.35, w: 3.1, h: 2.9, fill: { color: C.tableRow2 }, line: { color: C.accent2, pt: 1.5 } });
    s.addText(box.title, { x: box.x + 0.1, y: 2.4, w: 2.9, h: 0.55, fontSize: 13, bold: true, color: C.tableHead, fontFace: "Calibri", align: "center" });
    const bArr = box.pts.map((p, i) => ({ text: p, options: { bullet: true, breakLine: i < box.pts.length - 1, fontSize: 12, color: C.bodyText } }));
    s.addText(bArr, { x: box.x + 0.1, y: 3.0, w: 2.9, h: 2.1, fontFace: "Calibri", valign: "top" });
  });
});

// SLIDE 10
bodySlide("Scintigraphy & Biochemical Workup", s => {
  twoCol(s,
    [
      { bold: true, text: "Octreotide (Somatostatin) Scanning" },
      "¹²³I-labeled Tyr3-octreotide",
      "Sensitive and specific for paragangliomas",
      "Resolution down to 1 cm",
      "Detects recurrences (unaffected by postop changes)",
      "Identifies other endocrine tumors in MEN",
      "Other agents: 99mTc-MIBI, In-111 octreotide, I-131/132 MIBG",
    ],
    [
      { bold: true, text: "Catecholamine Screening" },
      "Every GT patient (except small GTy): serum catecholamines + urinary metabolites",
      "Functioning GTs: 1-3% of cases",
      "NE levels 3-5x normal needed for symptoms",
      "Symptoms: headaches, sweating, palpitations, pallor, nausea",
      "Elevated epinephrine → CT adrenals or renal vein sampling to exclude phaeochromocytoma",
      { bold: true, text: "GTy Exception" },
      "No family history + no multiplicity → biochemical screening can be omitted",
    ]
  );
});

// SECTION 7
sectionDivider("7. Treatment Planning");

// SLIDE 11
bodySlide("Treatment Planning Principles", s => {
  twoCol(s,
    [
      { bold: true, text: "Definitive (Curative) – Recommended for:" },
      "Typical patient: 30-year-old woman",
      "Any patient in whom the tumor is likely to cause significant morbidity in their remaining life",
      "No lesion is technically unresectable",
      { bold: true, text: "Palliation – Recommended for:" },
      "Elderly (physiologically ≥65-70 years)",
      "Medically infirm patients",
      "Select multicentric lesions with contra-indications",
      "Followed with serial imaging; irradiate if growth or symptoms develop",
    ],
    [
      { bold: true, text: "Synchronous / Bilateral Lesions" },
      "Operate on the most life-threatening lesion first",
      "Neurological outcome determines subsequent plan",
      "Bilateral GJ: contralateral surgery at 6 months if intact",
      "Extensive bilateral CN loss: no further surgery – risk of bilateral laryngeal denervation → permanent tracheostomy / artificial alimentation",
      { bold: true, text: "Preoperative Embolization" },
      "Performed at time of diagnostic angiography",
      "24-48 hours before surgery",
      "Limits operative blood loss",
      "Risks are predictably low today",
    ]
  );
});

// SECTION 8
sectionDivider("8. Radiation Therapy");

// SLIDE 12
bodySlide("Radiation Therapy vs Surgery", s => {
  twoCol(s,
    [
      { bold: true, text: "RT / Stereotactic Radiosurgery (SRS)" },
      "Minimal, low-morbidity, low-cost alternative",
      "Achieves 'symptom relief and failure of tumor to grow'",
      "Received much attention under managed care",
      { bold: true, text: "Arguments AGAINST RT as primary therapy" },
      "Irradiated tumor is NOT inert – biologically altered",
      "Patient must 'coexist with a biologically altered tumor'",
      "Distinction between 'control' and 'cure' is crucial",
      "Long 15-20 yr natural history confounds RT data",
      "Tumor rarity makes statistical analysis unreliable",
    ],
    [
      { bold: true, text: "Surgery (Shambaugh Position)" },
      "Virtually any lesion is technically resectable",
      "Conservation surgery achieves high-grade functional outcomes",
      "Real risks are well-defined, concurrent, and documented",
      "Operative rehabilitation of phonopharyngeal deficits is effective",
      { bold: true, text: "Bottom Line" },
      "Sharp controversy between surgeons and radiation therapists exists",
      "Decisive data to resolve this controversy are not available",
      "RT reasonable for elderly/infirm; surgery preferred for curative intent",
      "Risks of RT (hearing loss, malignant transformation) must be acknowledged",
    ]
  );
});

// SECTION 9
sectionDivider("9. Surgical Management\nGlomus Tympanicum");

// SLIDE 13
bodySlide("GTy Class I – Transcanal Tympanotomy", s => {
  bullets(s, [
    { bold: true, text: "Indication" },
    "Class I GTy: mesotympanic mass with margins visible 360° + confirmatory imaging",
    { bold: true, text: "Procedure" },
    "Transcanal tympanotomy approach",
    "Mass avulsed directly from the promontory",
    "Bleeding controlled by microbipolar coagulation or light packing",
    "Outpatient procedure",
    { bold: true, text: "Laser Technology" },
    "Defocused laser used to bloodlessly shrink tumor and identify feeding vessels",
    "Small vessels: shrunken and cauterized by defocused laser",
    "Larger vessels: microbipolar coagulation, light packing, or bone wax packing",
  ], { fontSize: 15 });
});

// SLIDE 14
bodySlide("GTy Class II–IV – Transmastoid Approach", s => {
  twoCol(s,
    [
      { bold: true, text: "Indications" },
      "Tumor margins NOT visible on otoscopy",
      "Radiologically differentiated from GJ tumor",
      "Class II: fills middle ear",
      "Class III: extends into mastoid",
      "Class IV: through TM / anterior to ICA",
      { bold: true, text: "Key Decision Point" },
      "If tumor found intraoperatively to be GJ:",
      { sub: true, text: "→ ABORT procedure" },
      { sub: true, text: "→ Plan definitive lateral skull base surgery" },
    ],
    [
      { bold: true, text: "Steps" },
      "Complete mastoidectomy",
      "Extended facial recess exposure",
      "Hypotympanic exposure (drill inferior EAC + inferior tympanic ring)",
      "Visual assessment of GTy vs jugular bulb, ICA, and temporal bone",
      "Tumor removal",
      "Tympanoplastic reconstruction",
      { bold: true, text: "Reconstruction of drilled EAC" },
      "Bone dust (pâté) from cortical mastoid – collected at start of case",
    ]
  );
});

// SLIDE 15
bodySlide("GTy Surgical Outcomes (Jackson Series)", s => {
  const items = [
    "Average follow-up: 55 months  |  Average age: 53 years",
    "91% of patients were women",
    "Stage I: 34%  |  Stage II: 52%  |  Stage III: 3%  |  Stage IV: 11%",
    "Extended facial recess approach: 73%  |  Transcanal: 16%  |  Canal-wall-down: 11%",
    "Total tumor removal: 95% of cases",
    "Long-term tumor control: 92.5%",
    "Only 2 recurrences (one at 14 years after surgery)",
    "GTy associated with other paragangliomas: only 1 patient (familial history)",
    "No patient had catecholamine symptoms",
    { bold: true, text: "Follow-up Protocol" },
    "Annual follow-up × 5 years, then every 5 years thereafter",
    "Late recurrences mandate long-term surveillance",
  ];
  bullets(s, items, { fontSize: 14 });
});

// SECTION 10
sectionDivider("10. Surgical Management\nGlomus Jugulare – Class I & II");

// SLIDE 16
bodySlide("GJ Surgery: Anesthetic Goals & Facial Nerve Options", s => {
  twoCol(s,
    [
      { bold: true, text: "Anesthetic Goals" },
      "Maintain hemodynamic stability during tumor manipulation",
      "Prevent increased intracranial pressure",
      "Maintain cerebral perfusion and oxygenation",
      "Facilitate electrophysiologic monitoring",
      "Autologous blood replacement",
      "Preop identification of 'secretors' – pharmacologic blockade",
      "Postoperative airway management",
      "Invasive hemodynamic monitoring mandatory",
    ],
    [
      { bold: true, text: "Facial Nerve Options" },
      "Simple exposure: small tumors, working between C1 and FN",
      "'Short' mobilization: from external genu laterally",
      { sub: true, text: "→ Class I-II; nearly normal postop function; HB Grade 1-2" },
      "'Long' mobilization: from geniculate ganglion distally",
      { sub: true, text: "→ Class III-IV; stylomastoid fascia cuff technique" },
      "Selective division + reanastomosis: rarely needed today",
      "Segmental resection + graft: FN inextricable from tumor (rare)",
      "FNNIM (facial nerve neural integrity monitoring) mandatory",
      "Preop FN paralysis: poor prognosis; dissection attempted but graft may be needed",
    ]
  );
});

// SLIDE 17
bodySlide("GJ Class I & II – Step-by-Step Surgical Technique", s => {
  const steps = [
    { bold: true, text: "1. Positioning & Incision" },
    "Patient supine; anteriorly-based neck/temporal flap incision",
    "Incision allows neck access and creates anteriorly-based scalp flap",
    { bold: true, text: "2. Neck Control" },
    "Vital neurovascular neck anatomy isolated and controlled",
    "Internal jugular vein ligated",
    "FN extratemporal dissection minimized (preserve vascular supply)",
    { bold: true, text: "3. Mastoid & Temporal Bone Work" },
    "Complete mastoidectomy + mastoid tip removal",
    "Inferior tympanic bone removal",
    "Skeletonization of inferior-anterior EAC",
    "Access to mesotympanum + complete dissection of tympanic ICA to Eustachian tube",
    { bold: true, text: "4. FN 'Short' Mobilization" },
    "From external genu laterally",
    { bold: true, text: "5. Lateral Venous Sinus (LVS) Control" },
    "Intraluminal or extraluminal packing, or both",
    "Shelf of bone left over proximal sinus for extraluminal packing",
    "Caution: Excessive proximal packing risks retrograde thrombus → venous congestion, aphasia",
    "FATAL: Occlusion of vein of Labbé",
    { bold: true, text: "6. Tumor Removal" },
    "Dissect tumor from ICA; mobilize from infralabyrinthine chamber",
    "Brisk bleeding from inferior petrosal sinus openings: pack gently with minimal force",
  ];
  bullets(s, steps, { fontSize: 12.5, h: 4.45, y: 0.93 });
});

// SLIDE 18
bodySlide("Internal Carotid Artery Principles", s => {
  bullets(s, [
    { bold: true, text: "Central Importance of the ICA" },
    "ICA is fundamental to every lateral skull base case – the GT always relates to it",
    "The rate-limiting step of ALL lateral skull base surgery is dissection of tumor from the ICA",
    { bold: true, text: "Surgical Principle: Proximal and Distal Control" },
    "'Control' = circumferential access to normal vessel",
    "Access required: tympanic + petrous + intracranial ICA segments (complements easy neck access)",
    { bold: true, text: "When ICA is Involved by Tumor" },
    "ICA continuity restored by interpositional vein graft",
    "ICA sacrifice prediction testing (balloon occlusion) not routinely done with modern vein grafting",
    { bold: true, text: "ICA Sacrifice – A Last Resort" },
    "Guidelines for ICA sacrifice remain insecure",
    "Prediction of outcome is even less secure",
    "Tumor behavior relative to ICA determines approach",
  ], { fontSize: 15 });
});

// SECTION 11
sectionDivider("11. Surgical Management\nGlomus Jugulare – Class III & IV");

// SLIDE 19
bodySlide("GJ Class III & IV – Modified Infratemporal Fossa Approach (IFTF)", s => {
  twoCol(s,
    [
      { bold: true, text: "Indications" },
      "GT extends into infratemporal fossa (IFTF)",
      "Control of petrous ICA required",
      "Complete conductive hearing loss CONCEDED",
      { bold: true, text: "Approach Provides Access to:" },
      "Deep recesses of temporal bone",
      "Infratemporal fossa",
      "Clivus and nasopharynx",
      "Cavernous sinus",
      "Posterior, middle, and anterior cranial fossae",
      "Used for removal of intracranial extension",
    ],
    [
      { bold: true, text: "Steps in Addition to Class I-II" },
      "Same incision as Class I-II",
      "EAC transected and oversewn",
      "EAC, TM, and ME contents lateral to stapes resected",
      "Mandible anteriorly and inferiorly dislocated (divide anteromedial ligaments)",
      "FN 'long mobilization' (from geniculate ganglion distally)",
      "Stylomastoid foramen contents + digastric kept attached to CN VII (modern technique)",
      { bold: true, text: "If Extreme Anterosuperior Extension:" },
      "Zygoma and TMJ unit resected",
      "Temporalis muscle inferiorly reflected",
      "ET resected; foramen spinosum contents managed",
      "ICA dissected through pterygoid region to precavernous margin",
    ]
  );
});

// SECTION 12
sectionDivider("12. Intracranial Extension (ICE)");

// SLIDE 20
bodySlide("Management of Intracranial Extension", s => {
  twoCol(s,
    [
      { bold: true, text: "Definition" },
      "Transdural spread of tumor into the subarachnoid space",
      "Previously considered a criterion for UNRESECTABILITY",
      "Modern approach: tumor + ICE treated as a SINGLE UNIT in an unstaged procedure",
      { bold: true, text: "ICE Management Sequence" },
      "1. Tumor dissection from ICA / IFTF",
      "2. Tumor debulking from temporal bone down to dura",
      "3. Removal of intracranial extension",
      "4. Defect reconstruction",
      { bold: true, text: "Extension Route" },
      "Usually through posterior fossa dura",
      "Or along cranial nerve roots to posterior cranial fossa",
      "Reliably detailed by MRI",
    ],
    [
      { bold: true, text: "Unique Obstacles in Single-Stage ICE Resection" },
      "Wider bony and soft tissue defects",
      "Local tissue often unavailable for reconstruction",
      "CSF pressure enhanced by venous occlusion",
      "Regional devitalization by RT, ICA exposure, and EAC ligation ischemia",
      { bold: true, text: "Exposure Adjuncts" },
      "Translabyrinthine dissection: expands posterior cranial fossa exposure",
      "Transcochlear dissection: further expands posterior cranial fossa",
      { bold: true, text: "Pars Nervosa ICE" },
      "Small dural defect – easier to manage",
      "Standard primary repair sufficient",
    ]
  );
});

// SECTION 13
sectionDivider("13. Defect Reconstruction");

// SLIDE 21
bodySlide("Defect Reconstruction Principles & Flap Options", s => {
  // Principles
  s.addText("General Principles", {
    x: 0.35, y: 1.0, w: 9.3, h: 0.35, fontSize: 15, bold: true, color: C.accent2, fontFace: "Calibri",
  });
  const prin = ["Dural defect: closed with vascularized tissue", "Tissue bulk (vascularized) to reinforce and resist CSF pressure head", "Lumbar drain for 5–7 days postoperatively", "Preserve and mobilize local tissue to facilitate wound closure", "ICA exposure and dura must always be addressed"];
  const pArr = prin.map((p, i) => ({ text: p, options: { bullet: true, breakLine: i < prin.length - 1, fontSize: 13, color: C.bodyText } }));
  s.addText(pArr, { x: 0.35, y: 1.4, w: 9.3, h: 0.85, fontFace: "Calibri", valign: "top" });

  // Flap table
  const flapData = [
    ["Flap",                           "Indication",                  "Note"],
    ["Temporoparietal (superficial temporal) fascia", "Small-medium dural defects", "Vascularized by EAC; rotated into defect"],
    ["+ Abdominal fat graft",          "Small defects",               "Combined with fascia flap"],
    ["SCM fascial flap",               "Standard closure",            "Along temporal line; reattached to deep temporal + parotid fascia"],
    ["Rectus abdominis (free flap)",   "Large / irradiated defects",  "40% atrophy expected – intentionally oversize"],
    ["Lower trapezius flap",           "Large defects",               "Alternative free flap option"],
    ["Serratus muscle",                "Facial reanimation",          "Anastomosed to motor nerve of serratus for voluntary mid-facial movement"],
    ["Gracilis / radial forearm",      "Combined defect + reanimation", "Microvascular free flap"],
  ];

  s.addShape(pres.ShapeType.rect, { x: 0.35, y: 2.32, w: 9.3, h: 0.38, fill: { color: C.tableHead } });
  const hW = [3.1, 2.8, 3.4];
  const hX = [0.45, 3.6, 6.45];
  ["Flap", "Indication", "Note"].forEach((h, i) => {
    s.addText(h, { x: hX[i], y: 2.37, w: hW[i], h: 0.3, fontSize: 12, bold: true, color: C.white, fontFace: "Calibri" });
  });

  flapData.slice(1).forEach((row, i) => {
    const yPos = 2.72 + i * 0.38;
    const bg = i % 2 === 0 ? C.tableRow1 : C.tableRow2;
    s.addShape(pres.ShapeType.rect, { x: 0.35, y: yPos, w: 9.3, h: 0.37, fill: { color: bg } });
    [0, 1, 2].forEach((ci) => {
      s.addText(row[ci], { x: hX[ci], y: yPos + 0.04, w: hW[ci], h: 0.3, fontSize: 11, color: ci === 0 ? C.accent2 : C.bodyText, fontFace: "Calibri", bold: ci === 0 });
    });
  });
});

// SECTION 14
sectionDivider("14. Cranial Nerve Rehabilitation\n& Outcomes");

// SLIDE 22
bodySlide("Cranial Nerve Rehabilitation", s => {
  twoCol(s,
    [
      { bold: true, text: "Risk Profile" },
      "Surgery exposes patient to loss of CN IV–XII and sympathetic trunk",
      "Single-nerve loss: rarely causes clinical problem (compensation)",
      "Aggregate acute CN loss: poorly tolerated",
      "Generally surgically rehabilitable",
      "Elderly: combined CN loss may make swallowing rehabilitation impossible",
      { bold: true, text: "For Small Lesions" },
      "CN preservation >90%",
      { bold: true, text: "For Large Tumors" },
      "CN loss is a fact of life",
      "But compensation and rehabilitation are effective",
    ],
    [
      { bold: true, text: "Lower Cranial Nerves – Phonopharyngeal Unit" },
      "CN IX, X, XI, XII function as a coordinated unit",
      "Dysphagia, airway protection loss, voice/tongue weakness with aggregate loss",
      { bold: true, text: "Key Rehabilitation Strategy" },
      "Primary Silastic medialization of the vocal cord",
      { sub: true, text: "→ Obviated need for tracheostomy" },
      { sub: true, text: "→ Shortened hospital stay" },
      { sub: true, text: "→ Earlier resumption of oral intake" },
      { sub: true, text: "→ 'Revolutionized lateral skull base surgery'" },
      "Serratus muscle for mid-facial reanimation when FN resected",
      "Gracilis / radial forearm for combined defect + facial reanimation",
    ]
  );
});

// SLIDE 23
bodySlide("Overall GJ Skull Base Surgery Outcomes", s => {
  bullets(s, [
    { bold: true, text: "Series Overview (Jackson et al.)" },
    "279 skull base procedures  |  176 patients",
    "152 patients GJ  |  27 glomus vagale  |  3 carotid body tumors",
    "Average patient age: 41 years  |  Female predominance: 2.59:1",
    { bold: true, text: "Tumor Control Definition" },
    "Complete tumor removal with no evidence of recurrence = 'surgical control'",
    "Coexistence with tumor NOT considered control",
    { bold: true, text: "Outcomes by Tumor Size" },
    "Small lesions: CN preservation >90%",
    "Large tumors: CN loss is expected but functional outcomes improved by rehabilitation",
    { bold: true, text: "Surgery vs RT" },
    "Surgery: offers cure (complete tumor removal); risks are concurrent and well-defined",
    "RT: forces coexistence with biologically altered tumor; 'control' ≠ 'cure'",
    "No comparative data exist to definitively resolve this controversy",
  ], { fontSize: 14 });
});

// SLIDE 24 – COMPARISON SUMMARY TABLE
bodySlide("Comparison Summary: GTy vs GJ", s => {
  const rowData = [
    ["Feature",                "Glomus Tympanicum",                     "Glomus Jugulare"],
    ["Origin",                 "Promontory (Jacobson's nerve / CN IX)",  "Jugular bulb / jugular fossa"],
    ["Key CT finding",         "Mass on promontory; intact jugular fossa floor", "Jugular fossa enlargement; cortical erosion; mottled caroticojugular plate"],
    ["Distinguishing sign",    "Air/bone between mass and jugular bulb", "Loss of caroticojugular plate integrity"],
    ["Class I surgery",        "Transcanal tympanotomy",                "Infralabyrinthine dissection – hearing-sparing lateral skull base"],
    ["Class II-IV surgery",    "Transmastoid + extended facial recess", "Modified IFTF; EAC transected; long FN mobilization"],
    ["Hearing outcome",        "Preserved in most cases",               "Conductive loss conceded for Class III-IV"],
    ["Tumor control",          "92.5% (Jackson series)",                "Depends on stage; surgery preferred for cure"],
    ["Biopsy",                 "CONDEMNED",                             "CONDEMNED"],
  ];

  const colW = [2.2, 3.5, 3.5];
  const colX = [0.3, 2.55, 6.1];

  // Header
  s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.0, w: 9.3, h: 0.45, fill: { color: C.tableHead } });
  rowData[0].forEach((h, ci) => {
    s.addText(h, { x: colX[ci], y: 1.05, w: colW[ci], h: 0.35, fontSize: 12, bold: true, color: ci === 0 ? C.lightGrey : C.accent3, fontFace: "Calibri" });
  });

  rowData.slice(1).forEach((row, i) => {
    const yPos = 1.47 + i * 0.48;
    const bg = i % 2 === 0 ? C.tableRow1 : C.tableRow2;
    s.addShape(pres.ShapeType.rect, { x: 0.3, y: yPos, w: 9.3, h: 0.46, fill: { color: bg } });
    row.forEach((cell, ci) => {
      const isBad = cell === "CONDEMNED";
      s.addText(cell, {
        x: colX[ci], y: yPos + 0.04, w: colW[ci] - 0.1, h: 0.38,
        fontSize: 11, color: isBad ? C.accent1 : (ci === 0 ? C.tableHead : C.bodyText),
        bold: ci === 0 || isBad, fontFace: "Calibri",
      });
    });
  });
});

// FINAL SLIDE
{
  const s = pres.addSlide();
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 10, h: 5.625, fill: { color: C.darkBg } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 2.35, w: 10, h: 0.08, fill: { color: C.accent1 } });
  s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.15, h: 5.625, fill: { color: C.accent2 } });

  s.addText("Key Takeaways", {
    x: 0.4, y: 0.3, w: 9.2, h: 0.6, fontSize: 28, bold: true, color: C.white,
    fontFace: "Calibri", align: "center",
  });

  const takeaways = [
    "Glomus tumors are paragangliomas – benign, highly vascular, slow-growing, rarely metastasize",
    "Glasscock-Jackson classification guides surgical approach (Type I–IV for both GTy and GJ)",
    "CT temporal bone differentiates GTy from GJ (caroticojugular plate integrity is key)",
    "MRI defines intracranial extension; angiography + embolization performed preoperatively",
    "GTy Class I: transcanal avulsion. Class II-IV: transmastoid. Total control: 92.5%",
    "GJ Class I-II: hearing-conserving lateral skull base with short FN mobilization",
    "GJ Class III-IV: modified IFTF approach; EAC sacrificed; long FN mobilization",
    "ICE no longer a contraindication – single-stage resection is standard",
    "Vocal cord medialization (Silastic) has revolutionized postop rehabilitation",
    "Surgery is curative; RT offers 'control' but not cure – controversy remains unresolved",
  ];

  const tArr = takeaways.map((t, i) => ({
    text: t, options: { bullet: true, breakLine: i < takeaways.length - 1, fontSize: 13, color: C.lightGrey }
  }));
  s.addText(tArr, { x: 0.4, y: 0.95, w: 9.2, h: 4.25, fontFace: "Calibri", valign: "top" });

  s.addText("Reference: Shambaugh Surgery of the Ear, Chapter 41, pp. 756–769", {
    x: 0.4, y: 5.3, w: 9.2, h: 0.25, fontSize: 10, color: C.mutedText,
    fontFace: "Calibri", align: "center", italic: true,
  });
}

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

cd /home/daytona/workspace/glomus-ppt && node create_ppt.js 2>&1

Running Command

ls -lh /home/daytona/workspace/glomus-ppt/Glomus_Tumors_Shambaugh.pptx

The presentation is ready. Here's your download link:

Glomus Tumors Shambaugh

Presentation · PPTX


What's included - 25 slides total:
Slide(s)Content
1Title slide (dark navy theme with red accent)
2Table of Contents
3Pathology & Histological Origin
4Epidemiology & Genetics
5Routes of Spread & Invasion
6-7Glasscock-Jackson Classification (GTy & GJ - separate tables)
8Clinical Features + Presenting Symptoms Table
9-10Diagnosis, Imaging, Scintigraphy & Biochemical Workup
11Treatment Planning Principles
12Radiation Therapy vs Surgery
13-15GTy Surgical Management (Class I, Class II-IV, Outcomes)
16-18GJ Class I-II Surgery (Anesthetic goals, Step-by-step, ICA principles)
19GJ Class III-IV Modified IFTF Approach
20Intracranial Extension Management
21Defect Reconstruction Principles & Flap Options Table
22-23Cranial Nerve Rehabilitation & Overall Outcomes
24Comparison Summary Table: GTy vs GJ
25Key Takeaways (dark closing slide)
Design: Deep navy + red/teal accent color scheme with alternating table rows, section dividers, two-column layouts for dense content, and consistent footers referencing Shambaugh Chapter 41.

I am unable to open ppt can you make a pdf of whole text please

Reading File
Writing File

~/glomus-ppt/make_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    HRFlowable, PageBreak, KeepTogether
)
from reportlab.platypus.flowables import HRFlowable

# ── Page setup ──────────────────────────────────────────────────────────────
OUTPUT = "/home/daytona/workspace/glomus-ppt/Glomus_Tumors_Shambaugh.pdf"

doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    rightMargin=2*cm, leftMargin=2*cm,
    topMargin=2.5*cm, bottomMargin=2.5*cm,
    title="Glomus Jugulare & Glomus Tympanicum",
    author="Shambaugh Surgery of the Ear",
)

W, H = A4
TEXT_WIDTH = W - 4*cm

# ── Colour palette ───────────────────────────────────────────────────────────
NAVY    = colors.HexColor("#0D1B2A")
MIDNAV  = colors.HexColor("#1A3A5C")
RED     = colors.HexColor("#E63946")
TEAL    = colors.HexColor("#2196A4")
AMBER   = colors.HexColor("#F4A261")
LTGREY  = colors.HexColor("#CBD5E1")
BGROW1  = colors.HexColor("#FFFFFF")
BGROW2  = colors.HexColor("#E8F0FA")
BODY    = colors.HexColor("#1E293B")
MUTED   = colors.HexColor("#64748B")

# ── Styles ───────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()

def S(name, **kw):
    return ParagraphStyle(name, **kw)

sTitle = S("DocTitle",
    fontSize=28, textColor=colors.white, backColor=NAVY,
    alignment=TA_CENTER, spaceAfter=4, spaceBefore=0,
    fontName="Helvetica-Bold", leading=36,
    leftPadding=12, rightPadding=12, topPadding=18, bottomPadding=18,
)
sSubtitle = S("DocSubtitle",
    fontSize=13, textColor=LTGREY, backColor=MIDNAV,
    alignment=TA_CENTER, spaceAfter=0,
    fontName="Helvetica-Oblique", leading=18,
    leftPadding=8, rightPadding=8, topPadding=6, bottomPadding=6,
)
sRef = S("Ref",
    fontSize=10, textColor=MUTED, backColor=NAVY,
    alignment=TA_CENTER, spaceAfter=16,
    fontName="Helvetica", leading=14,
    leftPadding=8, rightPadding=8, topPadding=4, bottomPadding=8,
)
sSection = S("Section",
    fontSize=16, textColor=colors.white, backColor=MIDNAV,
    fontName="Helvetica-Bold", leading=22,
    spaceBefore=18, spaceAfter=6,
    leftPadding=10, rightPadding=10, topPadding=8, bottomPadding=8,
)
sH2 = S("H2",
    fontSize=13, textColor=MIDNAV,
    fontName="Helvetica-Bold", leading=18,
    spaceBefore=12, spaceAfter=4,
)
sH3 = S("H3",
    fontSize=11.5, textColor=TEAL,
    fontName="Helvetica-Bold", leading=16,
    spaceBefore=8, spaceAfter=3,
)
sBody = S("Body",
    fontSize=10.5, textColor=BODY,
    fontName="Helvetica", leading=15,
    spaceBefore=2, spaceAfter=2,
    alignment=TA_JUSTIFY,
)
sBullet = S("Bullet",
    fontSize=10.5, textColor=BODY,
    fontName="Helvetica", leading=15,
    leftIndent=16, firstLineIndent=-10,
    spaceBefore=1, spaceAfter=1,
)
sSubBullet = S("SubBullet",
    fontSize=10, textColor=MUTED,
    fontName="Helvetica", leading=14,
    leftIndent=32, firstLineIndent=-10,
    spaceBefore=0, spaceAfter=0,
)
sWarn = S("Warn",
    fontSize=10.5, textColor=RED,
    fontName="Helvetica-Bold", leading=15,
    leftIndent=16, firstLineIndent=-10,
    spaceBefore=2, spaceAfter=2,
)
sCaption = S("Caption",
    fontSize=9, textColor=MUTED,
    fontName="Helvetica-Oblique", leading=13,
    spaceBefore=2, spaceAfter=6, alignment=TA_CENTER,
)

def b(text):
    return Paragraph(f"\u2022  {text}", sBullet)

def sub(text):
    return Paragraph(f"\u2013  {text}", sSubBullet)

def warn(text):
    return Paragraph(f"\u26a0  {text}", sWarn)

def h2(text):
    return Paragraph(text, sH2)

def h3(text):
    return Paragraph(text, sH3)

def body(text):
    return Paragraph(text, sBody)

def section(text):
    return Paragraph(text, sSection)

def hr():
    return HRFlowable(width="100%", thickness=1, color=LTGREY, spaceAfter=6, spaceBefore=6)

def spacer(h=0.3):
    return Spacer(1, h*cm)

# ── TABLE HELPER ─────────────────────────────────────────────────────────────
def make_table(headers, rows, col_widths=None, row_heights=None):
    data = [headers] + rows
    if col_widths is None:
        n = len(headers)
        col_widths = [TEXT_WIDTH / n] * n

    style = TableStyle([
        ("BACKGROUND",   (0,0), (-1,0),  MIDNAV),
        ("TEXTCOLOR",    (0,0), (-1,0),  colors.white),
        ("FONTNAME",     (0,0), (-1,0),  "Helvetica-Bold"),
        ("FONTSIZE",     (0,0), (-1,0),  10),
        ("ALIGN",        (0,0), (-1,0),  "CENTER"),
        ("VALIGN",       (0,0), (-1,-1), "MIDDLE"),
        ("FONTNAME",     (0,1), (-1,-1), "Helvetica"),
        ("FONTSIZE",     (0,1), (-1,-1), 10),
        ("TEXTCOLOR",    (0,1), (-1,-1), BODY),
        ("ROWBACKGROUNDS",(0,1),(-1,-1), [BGROW1, BGROW2]),
        ("GRID",         (0,0), (-1,-1), 0.5, LTGREY),
        ("TOPPADDING",   (0,0), (-1,-1), 5),
        ("BOTTOMPADDING",(0,0), (-1,-1), 5),
        ("LEFTPADDING",  (0,0), (-1,-1), 6),
        ("RIGHTPADDING", (0,0), (-1,-1), 6),
    ])
    t = Table(data, colWidths=col_widths, repeatRows=1)
    t.setStyle(style)
    return t


# ── CONTENT ──────────────────────────────────────────────────────────────────
story = []

# ─── TITLE ───────────────────────────────────────────────────────────────────
story += [
    Paragraph("Glomus Jugulare &amp; Glomus Tympanicum", sTitle),
    Paragraph("Pathology · Classification · Diagnosis · Surgical Management", sSubtitle),
    Paragraph("Shambaugh Surgery of the Ear  |  Chapter 41  |  pp. 756–769", sRef),
    spacer(0.4),
]

# ─── 1. PATHOLOGY ────────────────────────────────────────────────────────────
story += [
    section("1. Pathology & Origin"),
    h2("What are Glomus Tumors?"),
    body("Glomus tumors (GTs) are <b>paragangliomas</b> — benign, highly vascular neoplasms arising from the paraganglion cells of the <b>diffuse neuroendocrine system (DNES)</b>. Their cells of origin are the <b>jugulotympanic paraganglions</b>: ovoid, lobulated structures measuring 0.1 to 1.5 mm in diameter, found in association with <b>Jacobson's nerve</b> (tympanic branch of CN IX) and <b>Arnold's nerve</b> (auricular branch of CN X). More than 50% are located in the region of the jugular fossa."),
    spacer(0.2),
    h3("Histology"),
    b("Chief cells arranged in clusters called <b>Zellballen</b>, supported by sustentacular cells and small blood vessels"),
    b("Two chief cell subtypes: <b>Light</b> and <b>Dark</b>"),
    b("Cytoplasmic granules store catecholamines"),
    spacer(0.2),
    h3("Biochemistry"),
    b("Paraganglions lack the enzyme phenylethanolamine-N-methyltransferase"),
    b("Predominantly secrete <b>norepinephrine</b> (not epinephrine)"),
    b("Functioning ('secretor') tumors occur in <b>1–3% of cases</b>"),
    b("Norepinephrine must be 3–5× normal to produce clinical symptoms (headaches, sweating, palpitations, pallor, nausea)"),
    spacer(0.3),
]

# ─── 2. EPIDEMIOLOGY ─────────────────────────────────────────────────────────
story += [
    section("2. Epidemiology & Genetics"),
    h3("Demographics"),
    b("More common in Caucasians"),
    b("Females : Males = <b>4–6 : 1</b>"),
    b("Peak incidence: <b>5th and 6th decades</b> (any age possible)"),
    h3("Behavior"),
    b("Characteristically <b>slow-growing</b>"),
    b("<b>Rarely metastasize</b>; prolonged survival possible even with metastatic disease"),
    b("Spread along tracts of least resistance — air cell tracts of the temporal bone"),
    h3("Genetics"),
    b("Heredofamilial tendency: <b>autosomal dominant</b>"),
    b("Familial tumors: associated lesions in <b>25–50%</b> of cases"),
    b("<b>10% of non-familial cases</b> have multiple synchronous tumors"),
    h3("Associated Conditions"),
    b("Pheochromocytoma"),
    b("Thyroid neoplasms"),
    b("Parathyroid adenoma"),
    b("Multiple Endocrine Neoplasia (MEN) syndromes"),
    spacer(0.3),
]

# ─── 3. SPREAD ───────────────────────────────────────────────────────────────
story += [
    section("3. Spread & Invasion"),
    body("GTs spread from their sites of origin along <b>tracts of least resistance</b>. Spread is multidirectional and simultaneous. GTs invade bone. Cochleovestibular destruction is caused by <b>ischemic necrosis</b>."),
    spacer(0.15),
    h3("Routes of Spread"),
    b("Air cell tracts of the temporal bone"),
    b("Vascular lumina"),
    b("Neurovascular foramina"),
    b("Eustachian tube"),
    b("Direct extension beyond the temporal bone"),
    h3("Intracranial Extension (ICE)"),
    b("Occurs directly through <b>posterior fossa dura</b>"),
    b("Spreads along cranial nerve routes — the IAC is a frequent highway"),
    h3("Cranial Nerve Involvement"),
    b("Paralysis in <b>35% of jugulotympanic lesions</b>"),
    b("<b>57% of intravagal paragangliomas</b>"),
    b("CN VII through XII and the sympathetic trunk most commonly involved"),
    b("Compensation masks early CN loss — growth is slow and neural degeneration is gradual"),
    spacer(0.3),
]

# ─── 4. CLASSIFICATION ───────────────────────────────────────────────────────
story += [
    section("4. Glasscock-Jackson Classification"),
    h2("Glomus Tympanicum (GTy)"),
    make_table(
        ["Stage", "Description"],
        [
            ["Type I",   "Small mass limited to the promontory"],
            ["Type II",  "Tumor completely filling the middle ear space"],
            ["Type III", "Tumor filling middle ear and extending into mastoid process"],
            ["Type IV",  "Tumor filling middle ear, extending into mastoid or through TM to fill EAC; may extend anterior to ICA"],
        ],
        col_widths=[2*cm, TEXT_WIDTH - 2*cm],
    ),
    spacer(0.3),
    h2("Glomus Jugulare (GJ)"),
    make_table(
        ["Stage", "Description"],
        [
            ["Type I",   "Small tumor involving jugular bulb, middle ear, and mastoid process"],
            ["Type II",  "Tumor extending under internal auditory canal; may have intracranial extension"],
            ["Type III", "Tumor extending into petrous apex; may have intracranial extension"],
            ["Type IV",  "Tumor extending beyond petrous apex into clivus or infratemporal fossa; may have intracranial extension"],
        ],
        col_widths=[2*cm, TEXT_WIDTH - 2*cm],
    ),
    spacer(0.15),
    Paragraph("GTy = Glomus Tympanicum  |  TM = Tympanic Membrane  |  EAC = External Auditory Canal  |  ICA = Internal Carotid Artery  |  IAC = Internal Auditory Canal", sCaption),
    spacer(0.3),
]

# ─── 5. CLINICAL FEATURES ────────────────────────────────────────────────────
story += [
    section("5. Clinical Features"),
    h2("Presenting Symptoms"),
    make_table(
        ["Symptom", "Glomus Jugulare (n=106)", "Glomus Vagale (n=27)"],
        [
            ["Pulsatile tinnitus", "84%", "8%"],
            ["Hearing loss",       "62%", "4%"],
            ["Aural fullness",     "32%", "3%"],
            ["Otalgia",            "13%", "3%"],
            ["Hoarseness",         "12%", "4%"],
            ["Dysphagia",          "8%",  "-"],
        ],
        col_widths=[TEXT_WIDTH*0.5, TEXT_WIDTH*0.25, TEXT_WIDTH*0.25],
    ),
    spacer(0.25),
    h3("Key Clinical Points"),
    b("Conductive hearing loss: tumor growth into the mesotympanum"),
    b("Sensorineural component: degree of labyrinthine invasion"),
    b("TM erosion and bleeding: late symptoms"),
    b("Cranial neuropathy suggests a more extensive process; growth is slow so compensation masks deficits"),
    warn("'Idiopathic' cranial neuropathy is an UNACCEPTABLE diagnosis — mandates aggressive imaging to exclude lateral skull base lesion"),
    b("Facial paralysis is usually a late sign and an ominous omen for facial nerve outcome"),
    b("Mesotympanic vascular mass visible 360° around its margins = GTy (vs GJ when margins unclear)"),
    warn("BIOPSY CONDEMNED — myringotomy/tympanotomy risks brisk bleeding, damage to ear structures, and catastrophic injury if aberrant ICA is biopsied"),
    spacer(0.3),
]

# ─── 6. DIAGNOSIS ────────────────────────────────────────────────────────────
story += [
    section("6. Diagnosis & Preoperative Workup"),
    h2("Diagnostic Goals (Treatment Planning Tool)"),
    b("Determine tumor size, type, and extent"),
    b("Evaluate histochemical or multicentric associated lesions"),
    b("Identify and assess intracranial extension (ICE)"),
    b("Assess major vasculature (ICA, lateral venous sinus) involvement"),
    b("Assess intracranial collateral circulation"),
    spacer(0.2),
    h3("CT Temporal Bone (Bone Windows — Axial + Coronal)"),
    b("Differentiates GTy from GJ: presence of <b>air or bone between mass and jugular bulb</b> = GTy"),
    b("Examine the <b>caroticojugular plate</b> (spine): <b>eroded early in GJ tumors</b>; mottled plate = characteristic of GJ"),
    b("GTy: well-defined enhancing soft tissue mass over the promontory; hypotympanic floor and jugular fossa <b>usually intact</b>"),
    b("As GTy enlarges: may fill entire middle ear, cause lateral TM bulge, smooth promontory indentation, extend into mastoid and hypotympanum"),
    b("GJ: jugular fossa enlarged with erosion of cortical outline; erosion of bony septum separating jugular fossa from carotid canal"),
    spacer(0.15),
    h3("MRI (Gadolinium)"),
    b("GTs: multiple vascular <b>flow voids — 'salt and pepper' pattern</b> on T2"),
    b("Schwannomas: homogeneous enhancement ± cystic areas (differential)"),
    b("Best modality for evaluating ICE and relationship to neural/vascular structures"),
    b("MRI of entire head and neck assesses for <b>multicentricity</b>"),
    spacer(0.15),
    h3("CT Angiography / CT Venography"),
    b("CTA: defines vascular supply, evaluates ICA involvement"),
    b("CTV: determines whether jugular vein is occluded or patent"),
    b("Guides decision between observation, SRS, or surgical excision"),
    spacer(0.15),
    h3("Bilateral Carotid Angiography"),
    b("Performed preoperatively at the time of tumor embolization"),
    b("Maps tumor blood supply — especially important for ICE (pial, vertebral, ICA, AICA, PICA in addition to ECA sources)"),
    b("Embolization limits operative blood loss; risks are predictably low today"),
    spacer(0.15),
    h3("Scintigraphy (Octreotide Scanning)"),
    b("¹²³I-labeled Tyr3-octreotide — somatostatin analogue"),
    b("Sensitive and specific for paragangliomas; resolution down to 1 cm"),
    b("Also detects recurrences (postoperative changes do not interfere with receptor expression)"),
    b("Other agents: ⁹⁹ᵐTc-MIBI, In-111 octreotide, I-131/132 MIBG"),
    spacer(0.15),
    h3("Biochemical Screening"),
    b("Every GT patient (except small GTy): serum catecholamines + urinary metabolites"),
    b("Elevated epinephrine → CT adrenals or selective renal vein sampling to exclude pheochromocytoma"),
    b("Perioperative pharmacologic blockade (alpha + beta blockade) for secretors"),
    b("GTy without family history and without multiplicity: biochemical screening can be omitted"),
    spacer(0.3),
]

# ─── 7. TREATMENT PLANNING ───────────────────────────────────────────────────
story += [
    section("7. Treatment Planning"),
    h3("Definitive (Curative) Surgery — Recommended for:"),
    b("Typical patient: ~30-year-old woman"),
    b("Any patient in whom the tumor is likely to cause significant morbidity in remaining life"),
    b("No lesion is technically unresectable"),
    h3("Palliation — Recommended for:"),
    b("Elderly (physiologically ≥65–70 years) with a small GT unlikely to cause concern in remaining years"),
    b("Medically infirm patients"),
    b("Select multicentric lesions with contraindications to definitive surgery"),
    b("Approach: serial imaging observation; irradiate if growth or symptoms develop"),
    h3("Synchronous / Bilateral Lesions"),
    b("Operate on the most life-threatening lesion first"),
    b("Contralateral GJ: surgery planned at 6 months if patient emerges neurologically intact"),
    warn("Extensive bilateral CN loss → no further surgery — risk of bilateral laryngeal denervation → permanent tracheostomy / tracheal diversion / artificial alimentation"),
    h3("Preoperative Embolization"),
    b("Performed at time of diagnostic angiography, 24–48 hours before surgery"),
    b("Limits operative blood loss; predictably low risk with modern technique"),
    spacer(0.3),
]

# ─── 8. RADIATION THERAPY ────────────────────────────────────────────────────
story += [
    section("8. Radiation Therapy vs Surgery"),
    h3("RT / Stereotactic Radiosurgery (SRS)"),
    b("Offered as minimal, low-morbidity, low-cost alternative"),
    b("RT position (Cummings): 'Relief of symptoms and failure of tumor to grow during the patient's lifetime is a practical measure of successful treatment'"),
    h3("Arguments Against RT as Primary Therapy (Shambaugh)"),
    b("Irradiated tumor is <b>not inert</b> — patient must 'coexist with a biologically altered tumor'"),
    b("Distinction between 'control' and 'cure' is more than semantic"),
    b("Current data cannot support 'disease control': tumor rarity confounds statistics, natural history spans 15–20 years, RT techniques keep evolving"),
    b("RT risks include hearing loss, malignant transformation, and radiation-induced injury"),
    h3("Surgery (Shambaugh Position)"),
    b("Virtually any lesion is technically resectable"),
    b("Conservation surgery achieves high-grade functional outcomes"),
    b("Risks are well-defined, concurrent, and qualitatively documented"),
    b("Operative rehabilitation of phonopharyngeal deficits is effective"),
    h3("Bottom Line"),
    body("A sharp controversy between surgeons and radiation therapists exists. The data to resolve this controversy are not available. RT is reasonable for elderly/infirm patients; surgery is preferred when curative intent is appropriate."),
    spacer(0.3),
]

# ─── 9. SURGICAL MANAGEMENT – GTy ───────────────────────────────────────────
story += [
    section("9. Surgical Management — Glomus Tympanicum"),
    h2("GTy Class I — Transcanal Tympanotomy"),
    h3("Indication"),
    b("Class I GTy: mesotympanic mass with margins visible 360° + confirmatory imaging"),
    h3("Procedure"),
    b("Transcanal tympanotomy approach"),
    b("Mass avulsed directly from the promontory"),
    b("Bleeding controlled by microbipolar coagulation or light packing"),
    b("Outpatient procedure"),
    h3("Laser Technology (New)"),
    b("Defocused laser used to bloodlessly shrink tumor and identify feeding vessels"),
    b("Small vessels: shrunken and cauterized by defocused laser"),
    b("Larger vessels: microbipolar coagulation, light packing, or bone wax packing"),
    spacer(0.2),
    h2("GTy Class II–IV — Transmastoid Approach"),
    h3("Indication"),
    b("Tumor margins NOT visible on otoscopy"),
    b("Radiologically differentiated from GJ tumor"),
    warn("If imaging is found to be unreliable intraoperatively and tumor is determined to be GJ → ABORT procedure and plan definitive lateral skull base surgery for another day"),
    h3("Steps"),
    b("Complete mastoidectomy with extended facial recess exposure"),
    b("Hypotympanic exposure: permits visual assessment of GTy relative to jugular bulb, ICA, and temporal bone structures"),
    b("Drill inferior EAC and inferior tympanic ring substantially for adequate hypotympanic exposure"),
    b("Reconstruct drilled bone with bone dust (pâté) collected from cortical mastoid at the start of the case"),
    b("Tumor removal, then tympanoplastic reconstruction as necessary"),
    spacer(0.2),
    h2("GTy Outcomes — Jackson Series"),
    make_table(
        ["Parameter", "Result"],
        [
            ["Average follow-up",          "55 months"],
            ["Average patient age",        "53 years"],
            ["Female predominance",        "91%"],
            ["Stage I / II / III / IV",    "34% / 52% / 3% / 11%"],
            ["Extended facial recess approach", "73%"],
            ["Transcanal approach",        "16%"],
            ["Canal-wall-down procedure",  "11%"],
            ["Total tumor removal",        "95%"],
            ["Long-term tumor control",    "92.5%"],
            ["Recurrences",               "2 (one at 14 years)"],
            ["GTy with other paragangliomas", "1 patient (familial)"],
            ["Catecholamine symptoms",     "None"],
        ],
        col_widths=[TEXT_WIDTH*0.55, TEXT_WIDTH*0.45],
    ),
    spacer(0.15),
    h3("Follow-up Protocol"),
    b("Annual follow-up for 5 years, then every 5 years thereafter"),
    b("Late recurrences (14 years) mandate long-term surveillance"),
    spacer(0.3),
]

# ─── 10. GJ SURGERY CLASS I-II ───────────────────────────────────────────────
story += [
    section("10. Surgical Management — Glomus Jugulare (Class I & II)"),
    h2("Overview"),
    body("GJ tumor removal requires <b>lateral skull base surgery</b> and is a <b>multidisciplinary team effort</b>. Surgical objective: <i>total tumor removal with preservation of structure and function to the greatest extent possible</i> — conservation surgery."),
    spacer(0.15),
    h2("Anesthetic Goals"),
    b("Maintenance of hemodynamic stability (especially during tumor manipulation and catecholamine release)"),
    b("Prevention of increased intracranial pressure"),
    b("Maintenance of cerebral perfusion and oxygenation"),
    b("Maintenance of a still surgical field"),
    b("Facilitation of electrophysiologic monitoring"),
    b("Replacement of lost blood — autologous blood used whenever possible"),
    b("Preoperative identification and treatment of 'secretors' for controlled induction"),
    b("Postoperative airway management"),
    b("Invasive monitoring for hemodynamic data — essential during tumor manipulation"),
    spacer(0.2),
    h2("Facial Nerve Management"),
    body("Facial nerve neural integrity monitoring (FNNIM) is mandatory. The fundamental factors determining which FN option is selected are tumor size and how much distal ICA control is required."),
    spacer(0.1),
    make_table(
        ["FN Option", "Indication", "Expected Outcome"],
        [
            ["Simple exposure",            "Small tumors; work between C1 and FN",          "Minimal morbidity"],
            ["'Short' mobilization",       "Class I–II; from external genu laterally",      "Nearly normal postop function; HB Grade 1–2 long-term"],
            ["'Long' mobilization",        "Class III–IV; from geniculate ganglion distally", "Good HB outcomes with stylomastoid fascia cuff technique"],
            ["Selective division + reanastomosis", "Rarely necessary today",               "—"],
            ["Segmental resection + graft", "FN inextricable from tumor (rare)",            "End-to-end anastomosis or interpositional grafting for reanimation"],
        ],
        col_widths=[TEXT_WIDTH*0.3, TEXT_WIDTH*0.37, TEXT_WIDTH*0.33],
    ),
    spacer(0.15),
    warn("Preoperative FN paralysis: poor prognosis for FN salvation without resection — dissection attempted but graft often needed"),
    spacer(0.2),
    h2("Internal Carotid Artery Principles"),
    b("ICA is fundamental to every lateral skull base case — the GT always relates to it"),
    b("The <b>rate-limiting step</b> of ALL lateral skull base surgery is dissection of tumor from the ICA"),
    b("Principle: <b>proximal and distal control</b> — circumferential access to normal vessel required at tympanic, petrous, and intracranial ICA segments"),
    b("When tumor inextricably involves ICA: continuity restored by <b>interpositional vein graft</b>"),
    b("ICA sacrifice prediction testing (balloon occlusion) not routinely done with modern vein grafting capability"),
    spacer(0.2),
    h2("Step-by-Step Technique — Class I & II (Small to Medium)"),
    body("Tumors are confined to the infralabyrinthine chamber with ICA involvement limited to the tympanic segment. A <b>hearing conservation approach</b> that preserves the EAC is used."),
    spacer(0.1),
    h3("Step 1 – Positioning & Incision"),
    b("Patient supine"),
    b("Anteriorly-based neck/temporal flap incision — allows neck access and cephalic access for temporoparietal fascia"),
    h3("Step 2 – Neck Control"),
    b("Vital neurovascular neck anatomy isolated and controlled"),
    b("Facial nerve extratemporal dissection minimized to protect vascular supply and neural integrity"),
    b("<b>Internal jugular vein ligated</b>"),
    h3("Step 3 – Mastoid & Temporal Bone Work"),
    b("Complete mastoidectomy + removal of mastoid tip"),
    b("Inferior tympanic bone removal"),
    b("Skeletonization of the inferior-anterior EAC"),
    b("Access to mesotympanum + complete dissection of tympanic ICA to the Eustachian tube for control"),
    h3("Step 4 – FN 'Short' Mobilization"),
    b("From external genu laterally — causes minimal morbidity; nearly normal postoperative FN function is the rule"),
    h3("Step 5 – Lateral Venous Sinus (LVS) Control"),
    b("Achieved by intraluminal or extraluminal packing, or both"),
    b("Shelf of bone left overlying the proximal sinus for extraluminal packing between the shelf and lateral sinus wall"),
    warn("Excessive proximal packing into the transverse sinus risks retrograde propagating thrombus → venous congestion, altered consciousness, aphasia, or neurological deficit"),
    warn("Occlusion of the vein of Labbé can be FATAL"),
    h3("Step 6 – Tumor Removal"),
    b("Tumor dissected from the ICA, then mobilized from the infralabyrinthine chamber"),
    b("Within the jugular bulb: brisk bleeding from multiple inferior petrosal sinus openings — packed gently with minimal force"),
    spacer(0.3),
]

# ─── 11. GJ CLASS III-IV ─────────────────────────────────────────────────────
story += [
    section("11. Surgical Management — Glomus Jugulare (Class III & IV)"),
    h2("Modified Infratemporal Fossa Approach (IFTF)"),
    body("When the GT extends into the <b>infratemporal fossa (IFTF)</b> or when control of the petrous ICA is required, a modified IFTF approach (or its extension) is necessary. These approaches offer access to the deep recesses of the temporal bone and IFTF but also the clivus, nasopharynx, cavernous sinus, and the posterior, middle, and anterior cranial fossae for removal of ICE."),
    warn("A complete conductive hearing loss is CONCEDED for Class III–IV"),
    spacer(0.15),
    h3("Steps — In Addition to Class I-II Steps"),
    b("Same incision as Class I-II but <b>EAC is transected and oversewn</b>"),
    b("EAC, TM, and contents of the middle ear lateral to the stapes are resected"),
    b("Access to petrous ICA and IFTF requires <b>anterior and inferior dislocation of the mandible</b> by dividing anteromedial ligamentous attachments"),
    b("FN undergoes <b>'long' mobilization</b> (from geniculate ganglion distally)"),
    b("Modern modification: stylomastoid foramen contents and digastric kept attached to CN VII during translocation (reduces vascular compromise risk)"),
    spacer(0.15),
    h3("Extension for Extreme Anterosuperior Tumors"),
    b("Resect the zygoma and TMJ unit + inferiorly reflect the temporalis muscle"),
    b("Maximizes anterior-inferior mandibular dislocation for IFTF access"),
    b("Eustachian tube is resected"),
    b("Contents of foramen spinosum managed on the way to ICA dissection"),
    b("ICA dissected through the pterygoid region to its precavernous margin"),
    b("Access to: middle cranial fossa, nasopharynx, foramen rotundum, clivus, posterior cranial fossa, cavernous sinus"),
    spacer(0.3),
]

# ─── 12. INTRACRANIAL EXTENSION ──────────────────────────────────────────────
story += [
    section("12. Intracranial Extension (ICE)"),
    h3("Definition & Historical Perspective"),
    body("Intracranial extension = <b>transdural spread of tumor into the subarachnoid space</b>. Once regarded as a criterion for unresectability. The modern trend is to correctly consider the tumor and its ICE as a <b>single unit</b>, managed in an <b>unstaged single procedure</b>."),
    spacer(0.1),
    h3("Management Sequence"),
    b("1. Tumor dissection from the ICA / IFTF"),
    b("2. Tumor debulking from the temporal bone down to dura"),
    b("3. Removal of the intracranial extension"),
    b("4. Defect reconstruction"),
    spacer(0.1),
    h3("Route of ICE"),
    b("Usually through the posterior fossa dura"),
    b("Or along cranial nerve roots to the posterior cranial fossa"),
    b("Reliably detailed by MRI"),
    b("Translabyrinthine and transcochlear adjunctive dissection expands posterior cranial fossa exposure"),
    spacer(0.1),
    h3("Unique Obstacles in Single-Stage ICE Resection"),
    b("Wider bony and soft tissue defects"),
    b("Local tissue usually rendered unavailable for reconstruction"),
    b("CSF pressure enhanced by venous occlusion"),
    b("Regional devitalization by RT, ICA exposure, and ischemia from EAC ligation"),
    spacer(0.3),
]

# ─── 13. DEFECT RECONSTRUCTION ───────────────────────────────────────────────
story += [
    section("13. Defect Reconstruction"),
    h3("General Principles"),
    b("Dural defect: must be closed with <b>vascularized tissue</b>"),
    b("Tissue bulk (often vascularized) to reinforce reconstruction and resist CSF pressure head"),
    b("<b>Lumbar drain for 5–7 days</b> postoperatively for CSF decompression"),
    b("Preserve and mobilize local tissue to facilitate wound closure"),
    b("Prerequisite to successful resection of extensive tumors: reconstruction strategies must prevent CSF leakage and address ICA exposure"),
    spacer(0.2),
    h2("Flap Options"),
    make_table(
        ["Flap", "Indication", "Notes"],
        [
            ["Temporoparietal fascia\n(superficial temporal fascia)", "Small–medium dural defects", "Vascularized by EAC; detached and rotated into defect; careful zygomatic dissection needed"],
            ["+ Abdominal fat graft", "Small defects", "Combined with fascia flap for added bulk"],
            ["SCM fascial flap", "Standard closure for all cases", "Created along temporal line; reattached to deep temporal fascia + parotid fascia anteriorly"],
            ["Rectus abdominis (free flap)", "Large / irradiated defects", "Harvested concurrently; expect 40% atrophy — intentionally oversize; can be corrected later"],
            ["Lower trapezius flap", "Large defects", "Alternative free flap option"],
            ["Serratus muscle (free flap)", "Facial reanimation when FN/muscle resected", "3+ slips for nasolabial region; motor nerve anastomosis to serratus nerve → voluntary mid-facial movement"],
            ["Gracilis / radial forearm", "Combined defect + facial reanimation", "Microvascular free flap options"],
        ],
        col_widths=[TEXT_WIDTH*0.27, TEXT_WIDTH*0.27, TEXT_WIDTH*0.46],
    ),
    spacer(0.3),
]

# ─── 14. CN REHAB & OUTCOMES ─────────────────────────────────────────────────
story += [
    section("14. Cranial Nerve Rehabilitation & Outcomes"),
    h2("Risk Profile"),
    b("Lateral skull base surgery exposes the patient to potential loss of <b>CN IV through XII</b> and the sympathetic trunk"),
    b("Single-nerve loss: rarely causes a clinical problem — most patients compensate"),
    b("Aggregate acute CN loss: poorly tolerated but generally surgically rehabilitable"),
    b("Elderly: combined CN loss may make swallowing rehabilitation impossible"),
    b("For small lesions: CN preservation achievable in <b>over 90%</b> of cases"),
    b("For large tumors: CN loss is a fact of life; but compensation and operative rehabilitation are effective"),
    spacer(0.15),
    h2("Lower Cranial Nerves — Phonopharyngeal Unit"),
    body("CN IX, X, XI, XII function as a coordinated unit orchestrating phonopharyngeal function. Single-nerve loss rarely causes a problem as patients compensate. Aggregate loss results in dysphagia, loss of airway protection, and weakness of shoulder, tongue, and voice."),
    spacer(0.1),
    h2("Key Rehabilitation Strategies"),
    h3("Vocal Cord Medialization (Silastic)"),
    b("Primary Silastic medialization has <b>revolutionized lateral skull base surgery</b>"),
    sub("Obviated the need for tracheostomy"),
    sub("Shortened length of hospital stay"),
    sub("Reduced time to resumption of oral intake"),
    spacer(0.1),
    h3("Other Strategies"),
    b("Serratus muscle free flap for mid-facial reanimation when FN/muscle resected"),
    b("Proximal FN anastomosis to motor nerve of serratus → natural, voluntary mid-facial movement"),
    b("Gracilis and radial forearm flaps for combined defect reconstruction and facial reanimation"),
    spacer(0.2),
    h2("Overall GJ Skull Base Surgery Outcomes"),
    make_table(
        ["Parameter", "Result"],
        [
            ["Total procedures reviewed",     "279 skull base procedures on 176 patients"],
            ["GJ / Glomus vagale / Carotid body", "152 / 27 / 3"],
            ["Average patient age",           "41 years"],
            ["Female predominance",           "2.59 : 1"],
            ["CN preservation (small lesions)", ">90%"],
            ["Surgical control definition",   "Complete removal with no recurrence (not 'coexistence')"],
        ],
        col_widths=[TEXT_WIDTH*0.5, TEXT_WIDTH*0.5],
    ),
    spacer(0.3),
]

# ─── 15. COMPARISON SUMMARY ──────────────────────────────────────────────────
story += [
    section("15. Comparison Summary: GTy vs GJ"),
    make_table(
        ["Feature", "Glomus Tympanicum", "Glomus Jugulare"],
        [
            ["Origin",             "Promontory (Jacobson's nerve / CN IX)", "Jugular bulb / jugular fossa"],
            ["Key CT finding",     "Mass on promontory; intact jugular fossa floor", "Jugular fossa enlargement; cortical erosion; mottled caroticojugular plate"],
            ["Distinguishing sign","Air/bone between mass and jugular bulb", "Loss of caroticojugular plate integrity"],
            ["Class I surgery",    "Transcanal tympanotomy", "Infralabyrinthine dissection — hearing-sparing lateral skull base"],
            ["Class II–IV surgery","Transmastoid + extended facial recess", "Modified IFTF; EAC transected; long FN mobilization"],
            ["Hearing outcome",    "Preserved in most cases", "Conductive loss conceded for Class III–IV"],
            ["Tumor control",      "92.5% (Jackson series)", "Depends on stage; surgery preferred for cure"],
            ["Biopsy",             "CONDEMNED", "CONDEMNED"],
        ],
        col_widths=[TEXT_WIDTH*0.22, TEXT_WIDTH*0.39, TEXT_WIDTH*0.39],
    ),
    spacer(0.4),
    hr(),
    Paragraph("Reference: Shambaugh Surgery of the Ear, Chapter 41, pp. 756–769", sCaption),
    Paragraph("All content sourced exclusively from Shambaugh Surgery of the Ear (ISBN 9781607950264)", sCaption),
]

# ── Build PDF ─────────────────────────────────────────────────────────────────
doc.build(story)
print(f"PDF created: {OUTPUT}")
Running Command

cd /home/daytona/workspace/glomus-ppt && python3 make_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/glomus-ppt/Glomus_Tumors_Shambaugh.pdf

Your PDF is ready:

Glomus Tumors Shambaugh

PDF Document · PDF


What's inside the PDF (A4, fully formatted):
SectionContent
1Pathology & Origin (Zellballen, biochemistry)
2Epidemiology & Genetics (demographics, MEN, familial)
3Spread & Invasion (routes, ICE, CN involvement)
4Glasscock-Jackson Classification tables (GTy + GJ)
5Clinical Features + Presenting Symptoms table
6Diagnosis & Workup (CT, MRI, angiography, octreotide, biochemical screening)
7Treatment Planning (definitive vs palliative, bilateral lesions, embolization)
8Radiation Therapy vs Surgery
9GTy Surgical Management (Class I, II-IV, outcomes table)
10GJ Class I-II (anesthetic goals, FN options table, ICA principles, step-by-step)
11GJ Class III-IV (modified IFTF approach, extreme extensions)
12Intracranial Extension
13Defect Reconstruction (flap options table)
14CN Rehabilitation & Outcomes table
15Comparison Summary table (GTy vs GJ)
The PDF uses navy/teal/red colour-coded headings, proper tables, bullet hierarchies, and bold warning callouts throughout.
This is a shared conversation. Sign in to Orris to start your own chat.