CREATE A PPT ON SOT,CEOT,AOT FROM SHAFERS

Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Finding Sources
Good - found the relevant sections. Now let me read all the content in parallel from both textbooks.
Reading File
Reading File
Finding Sources
Now let me also get the Cummings section on SOT and CEOT, and search for Shafer's-specific content:
Reading File
Finding Sources
Searching Images

adenomatoid odontogenic tumor AOT histology microscopy radiology

A composite image illustrating the intraoperative, macroscopic, and microscopic characteristics of an adenomatoid odontogenic tumor (AOT). Frame A is an intraoperative clinical photograph of the mandible showing a reddish, well-circumscribed mass exposed after a vestibular flap. Frame B shows the gross surgical specimen consisting of a brownish cystic capsule surrounding an impacted canine tooth and a separate thick-walled cystic fragment. Frames C-F are light microscopy images stained with Hematoxylin and Eosin (H&E). Micrographs C and D (20x magnification) demonstrate a biphasic odontogenic epithelial proliferation characterized by spindle-shaped cells arranged in solid nodules, whorled patterns, and characteristic duct-like structures with eosinophilic luminal material. Micrographs E and F show a different component of the lesion consisting of dense fibroblastic connective tissue proliferation containing irregular, mineralized bone-like or cementum-like trabeculae. The image illustrates the classic histopathological features of a hybrid odontogenic lesion, combining features of AOT with calcifying epithelial structures.

A composite image illustrating the intraoperative, macroscopic, and microscopic characteristics of an adenomatoid odontogenic tumor (AOT). Frame A is an intraoperative clinical photograph of the mandible showing a reddish, well-circumscribed mass exposed after a vestibular flap. Frame B shows the gross surgical specimen consisting of a brownish cystic capsule surrounding an impacted canine tooth and a separate thick-walled cystic fragment. Frames C-F are light microscopy images stained with Hematoxylin and Eosin (H&E). Micrographs C and D (20x magnification) demonstrate a biphasic odontogenic epithelial proliferation characterized by spindle-shaped cells arranged in solid nodules, whorled patterns, and characteristic duct-like structures with eosinophilic luminal material. Micrographs E and F show a different component of the lesion consisting of dense fibroblastic connective tissue proliferation containing irregular, mineralized bone-like or cementum-like trabeculae. The image illustrates the classic histopathological features of a hybrid odontogenic lesion, combining features of AOT with calcifying epithelial structures.

This clinical photograph shows a gross surgical specimen of an adenomatoid odontogenic tumor (AOT). The specimen is a thick-walled, spherical, and irregular cystic mass, approximately 5.5 cm in its longest dimension as indicated by the adjacent metric ruler. The tumor surface is smooth, slightly glistening, and exhibits a reddish-brown coloration suggestive of blood or fluid content. Pathognomonic for this type of odontogenic lesion, two unerupted teeth—specifically the left maxillary canine and the left upper lateral incisor—are seen firmly attached to the specimen. One tooth is embedded in the inferomedial portion, while the other is visible on the superior surface of the mass. The specimen's appearance reflects its origin from the maxillary sinus region, highlighting the follicular relationship between the tumor and impacted dental structures. This visual provides high-yield educational value for oral and maxillofacial pathology, illustrating the classic presentation of an intraosseous odontogenic neoplasm following enucleation.

This clinical photograph shows a gross surgical specimen of an adenomatoid odontogenic tumor (AOT). The specimen is a thick-walled, spherical, and irregular cystic mass, approximately 5.5 cm in its longest dimension as indicated by the adjacent metric ruler. The tumor surface is smooth, slightly glistening, and exhibits a reddish-brown coloration suggestive of blood or fluid content. Pathognomonic for this type of odontogenic lesion, two unerupted teeth—specifically the left maxillary canine and the left upper lateral incisor—are seen firmly attached to the specimen. One tooth is embedded in the inferomedial portion, while the other is visible on the superior surface of the mass. The specimen's appearance reflects its origin from the maxillary sinus region, highlighting the follicular relationship between the tumor and impacted dental structures. This visual provides high-yield educational value for oral and maxillofacial pathology, illustrating the classic presentation of an intraosseous odontogenic neoplasm following enucleation.

This intraoperative clinical photograph displays an enucleated specimen of an adenomatoid odontogenic tumor (AOT) associated with the maxillary left lateral incisor (tooth #22). The specimen consists of a large, well-encapsulated, bulbous soft tissue mass attached to the mid-root section of the tooth. The mass is approximately 2 cm in size, exhibiting a predominantly deep red to maroon color with a glistening, smooth, and highly vascularized surface. At its inferior aspect, a conical, creamy-white tooth root is visible, extending from the body of the tumor. The interface between the soft tissue and the tooth demonstrates a transition from a smooth capsule to a more irregular, lobulated texture near the point of attachment. This image illustrates the follicular type of AOT, which typically presents as a pericoronal radiolucency mimicking a dentigerous cyst, but is pathologically distinguished by its firm attachment to the tooth root and the characteristic histopathology of spindle-shaped epithelial cells forming whorled masses and duct-like structures.

This intraoperative clinical photograph displays an enucleated specimen of an adenomatoid odontogenic tumor (AOT) associated with the maxillary left lateral incisor (tooth #22). The specimen consists of a large, well-encapsulated, bulbous soft tissue mass attached to the mid-root section of the tooth. The mass is approximately 2 cm in size, exhibiting a predominantly deep red to maroon color with a glistening, smooth, and highly vascularized surface. At its inferior aspect, a conical, creamy-white tooth root is visible, extending from the body of the tumor. The interface between the soft tissue and the tooth demonstrates a transition from a smooth capsule to a more irregular, lobulated texture near the point of attachment. This image illustrates the follicular type of AOT, which typically presents as a pericoronal radiolucency mimicking a dentigerous cyst, but is pathologically distinguished by its firm attachment to the tooth root and the characteristic histopathology of spindle-shaped epithelial cells forming whorled masses and duct-like structures.

Searching Images

calcifying epithelial odontogenic tumor Pindborg CEOT histology

Calcifying epithelial odontogenic tumor (CEOT), also known as Pindborg tumor, is an odontogenic epithelial neoplasm typically arising in the jaw, most often the posterior mandible. This histopathology image depicts a micrograph of CEOT stained with hematoxylin and eosin. The tumor shows sheets, nests, and strands of polygonal epithelial cells embedded in a variably dense fibrous stroma. The cells possess abundant eosinophilic cytoplasm, distinct cell borders, and prominent intercellular bridges. Nuclear pleomorphism may be present in some fields, including giant nuclei, but mitotic activity remains low and is not indicative of malignancy. A hallmark feature is the extensive eosinophilic amyloid-like extracellular material that often fills the stromal spaces and may juxtapose calcified deposits. Calcifications develop in association with this amyloid, frequently forming concentric Liesegang rings. In some cases, epithelial component predominates with little amyloid or calcification; in others, sparse nests are separated by large amyloid-rich areas. Rarely, a clear cell variant with cystic growth has been described. The combination of epithelial cells, amyloid-like material, and characteristic calcifications is diagnostically distinctive and helps differentiate CEOT from ameloblastoma, calcifying odontogenic cyst, and other odontogenic tumors. Clinically, CEOT is generally benign but locally aggressive, requiring complete surgical excision, with potential for recurrence if incomplete.

Calcifying epithelial odontogenic tumor (CEOT), also known as Pindborg tumor, is an odontogenic epithelial neoplasm typically arising in the jaw, most often the posterior mandible. This histopathology image depicts a micrograph of CEOT stained with hematoxylin and eosin. The tumor shows sheets, nests, and strands of polygonal epithelial cells embedded in a variably dense fibrous stroma. The cells possess abundant eosinophilic cytoplasm, distinct cell borders, and prominent intercellular bridges. Nuclear pleomorphism may be present in some fields, including giant nuclei, but mitotic activity remains low and is not indicative of malignancy. A hallmark feature is the extensive eosinophilic amyloid-like extracellular material that often fills the stromal spaces and may juxtapose calcified deposits. Calcifications develop in association with this amyloid, frequently forming concentric Liesegang rings. In some cases, epithelial component predominates with little amyloid or calcification; in others, sparse nests are separated by large amyloid-rich areas. Rarely, a clear cell variant with cystic growth has been described. The combination of epithelial cells, amyloid-like material, and characteristic calcifications is diagnostically distinctive and helps differentiate CEOT from ameloblastoma, calcifying odontogenic cyst, and other odontogenic tumors. Clinically, CEOT is generally benign but locally aggressive, requiring complete surgical excision, with potential for recurrence if incomplete.

This 400x hematoxylin and eosin-stained histology image depicts a calcifying epithelial odontogenic tumor (CEOT), also known as Pindborg tumor, derived from odontogenic epithelium in the jaw. The tissue demonstrates cohesive sheets and nests of polygonal epithelial cells with abundant eosinophilic cytoplasm, distinct cell borders, and prominent intercellular bridges, most evident in the central portions. Nuclei are generally round to oval with mild pleomorphism and low mitotic activity. The tumor matrix is variably dense with scattered, round to oval extracellular deposits that resemble amyloid and are characteristic of CEOT. These amyloid-like deposits frequently calcify, forming irregular concentric rings or Liesegang-type calcifications that appear as basophilic or eosinophilic speckles disrupting the stroma and sometimes outlining cell clusters. The surrounding stroma is somewhat vascular and may contain dystrophic calcifications. Overall, the image shows a benign yet locally infiltrative neoplasm composed of epithelial cells in close association with mineralized material, with intact basal membrane in many areas. Diagnostic significance rests on the combination of epithelial sheets, amyloid-like material, and calcifications, a pattern that differentiates CEOT from other odontogenic tumors such as ameloblastoma. Clinically relevant features include potential jaw swelling and radiographic radiolucent lesions with calcifications, guiding surgical planning and prognosis. These features aid diagnosis and management.

This 400x hematoxylin and eosin-stained histology image depicts a calcifying epithelial odontogenic tumor (CEOT), also known as Pindborg tumor, derived from odontogenic epithelium in the jaw. The tissue demonstrates cohesive sheets and nests of polygonal epithelial cells with abundant eosinophilic cytoplasm, distinct cell borders, and prominent intercellular bridges, most evident in the central portions. Nuclei are generally round to oval with mild pleomorphism and low mitotic activity. The tumor matrix is variably dense with scattered, round to oval extracellular deposits that resemble amyloid and are characteristic of CEOT. These amyloid-like deposits frequently calcify, forming irregular concentric rings or Liesegang-type calcifications that appear as basophilic or eosinophilic speckles disrupting the stroma and sometimes outlining cell clusters. The surrounding stroma is somewhat vascular and may contain dystrophic calcifications. Overall, the image shows a benign yet locally infiltrative neoplasm composed of epithelial cells in close association with mineralized material, with intact basal membrane in many areas. Diagnostic significance rests on the combination of epithelial sheets, amyloid-like material, and calcifications, a pattern that differentiates CEOT from other odontogenic tumors such as ameloblastoma. Clinically relevant features include potential jaw swelling and radiographic radiolucent lesions with calcifications, guiding surgical planning and prognosis. These features aid diagnosis and management.

Imaging modality: Brightfield light microscopy of a hematoxylin and eosin stained histology section of jaw odontogenic tumor tissue. The specimen demonstrates classic calcifying epithelial odontogenic tumor (CEOT), also known as Pindborg tumor, arising in a tooth-bearing region of the mandible. Sheets, nests, and occasional strands of polygonal epithelial cells exhibit abundant eosinophilic cytoplasm with distinct cell borders and prominent intercellular bridges. The tumor nests are embedded in a fibrous stroma that ranges from moderately to densely collagenous. A characteristic feature is the presence of large extracellular amyloid-like material, sometimes forming concentric calcifications known as Liesegang rings. Calcifications are variably birefringent under polarized light and appear as rounded, ring-like deposits within the amyloid. The nuclei are generally small to moderately pleomorphic with mild mitotic activity, consistent with a benign yet locally invasive odontogenic neoplasm. Collectively, the combination of epithelial polygons, amyloid-like deposition, Liesegang rings, and calcifications strongly supports CEOT and helps distinguish it from ameloblastoma and other odontogenic lesions. Clinically, CEOT tends to present as a slow-growing jaw mass in adults; management is surgical excision with careful follow-up for recurrence. This image is valuable for educational purposes, differential diagnosis, and pathology reference. Correlation with radiographs and clinical behavior improves diagnostic confidence.

Imaging modality: Brightfield light microscopy of a hematoxylin and eosin stained histology section of jaw odontogenic tumor tissue. The specimen demonstrates classic calcifying epithelial odontogenic tumor (CEOT), also known as Pindborg tumor, arising in a tooth-bearing region of the mandible. Sheets, nests, and occasional strands of polygonal epithelial cells exhibit abundant eosinophilic cytoplasm with distinct cell borders and prominent intercellular bridges. The tumor nests are embedded in a fibrous stroma that ranges from moderately to densely collagenous. A characteristic feature is the presence of large extracellular amyloid-like material, sometimes forming concentric calcifications known as Liesegang rings. Calcifications are variably birefringent under polarized light and appear as rounded, ring-like deposits within the amyloid. The nuclei are generally small to moderately pleomorphic with mild mitotic activity, consistent with a benign yet locally invasive odontogenic neoplasm. Collectively, the combination of epithelial polygons, amyloid-like deposition, Liesegang rings, and calcifications strongly supports CEOT and helps distinguish it from ameloblastoma and other odontogenic lesions. Clinically, CEOT tends to present as a slow-growing jaw mass in adults; management is surgical excision with careful follow-up for recurrence. This image is valuable for educational purposes, differential diagnosis, and pathology reference. Correlation with radiographs and clinical behavior improves diagnostic confidence.

Searching Images

squamous odontogenic tumor SOT histology jaw

Imaging modality and technique: Light microscopy of hematoxylin and eosin (H&E) stained paraffin-embedded jaw lesion tissue, sectioned for routine histology. Anatomical localization: odontogenic tumor of the mandible, with epithelial islands embedded in a dense fibrous stroma consistent with ameloblastoma. The image demonstrates the acanthomatous variant, in which extensive squamous metaplasia occurs within the central portion of the epithelial islands, accompanied by keratin formation in the stellate reticulum. Peripheral ameloblast‑like cells show palisaded, polarized basilar nuclei; the central cells resemble the loosely arranged, eosinophilic stellate reticulum. The surrounding stroma is dense and vascular, with inflammatory cells in some fields. Notable architectural diversity is evident: nests and cords display follicular and plexiform arrangements, with focal desmoplastic areas and possible granular cell change in other regions. Such histology reflects intricate tumor biology while retaining characteristic features of ameloblastoma. Diagnostic relevance centers on distinguishing this entity from squamous odontogenic tumor and squamous cell carcinoma, as management and prognosis differ markedly. Key differentiators include peripheral palisading and reverse polarity, central stellate reticulum with metaplasia, and lack of overt malignant cytology. Clinically, recognizing acanthomatous ameloblastoma guides surgical planning and follow-up in jaw pathology and head‑neck oncology. This image serves as a reference for education and research.

Imaging modality and technique: Light microscopy of hematoxylin and eosin (H&E) stained paraffin-embedded jaw lesion tissue, sectioned for routine histology. Anatomical localization: odontogenic tumor of the mandible, with epithelial islands embedded in a dense fibrous stroma consistent with ameloblastoma. The image demonstrates the acanthomatous variant, in which extensive squamous metaplasia occurs within the central portion of the epithelial islands, accompanied by keratin formation in the stellate reticulum. Peripheral ameloblast‑like cells show palisaded, polarized basilar nuclei; the central cells resemble the loosely arranged, eosinophilic stellate reticulum. The surrounding stroma is dense and vascular, with inflammatory cells in some fields. Notable architectural diversity is evident: nests and cords display follicular and plexiform arrangements, with focal desmoplastic areas and possible granular cell change in other regions. Such histology reflects intricate tumor biology while retaining characteristic features of ameloblastoma. Diagnostic relevance centers on distinguishing this entity from squamous odontogenic tumor and squamous cell carcinoma, as management and prognosis differ markedly. Key differentiators include peripheral palisading and reverse polarity, central stellate reticulum with metaplasia, and lack of overt malignant cytology. Clinically, recognizing acanthomatous ameloblastoma guides surgical planning and follow-up in jaw pathology and head‑neck oncology. This image serves as a reference for education and research.

Imaging modality: light microscopy of Hematoxylin and Eosin stained, formalin-fixed, paraffin-embedded jaw tissue. The specimen shows ameloblastoma with prominent squamous metaplasia within tumor islands. Odontogenic epithelial nests exhibit peripheral ameloblast-like, tall-columnar cells with reverse polarity and a basaloid, dark-staining center resembling stellate reticulum. In many islands, there is extensive squamous differentiation with polygonal keratinizing cells and foci of keratinization, yet the cells retain minimal cytologic atypia and mitotic activity is low. The surrounding stroma is fibrous and vascular, with infiltrative margins indicating local aggressiveness characteristic of ameloblastoma. Absence of significant pleomorphism, hyperchromasia, or abnormal mitoses helps distinguish this process from squamous cell carcinoma, though extensive squamous metaplasia can mimic malignancy. The lesion is typical of an odontogenic tumor occurring in the jaw (mandible or maxilla). Clinically relevant differential diagnoses include squamous cell carcinoma arising in odontogenic keratocyst or de-differentiated ameloblastoma; correlation with radiology and clinical course is essential. The diagnostic significance lies in recognizing metaplastic squamous change to prevent misinterpretation as invasive carcinoma; complete surgical excision with careful follow-up is recommended due to potential recurrence. Clinicians should correlate with radiographic margins, molecular markers as available, and immunohistochemical profile showing p63 and cytokeratin expression patterns supporting odontogenic origin rather than carcinoma.

Imaging modality: light microscopy of Hematoxylin and Eosin stained, formalin-fixed, paraffin-embedded jaw tissue. The specimen shows ameloblastoma with prominent squamous metaplasia within tumor islands. Odontogenic epithelial nests exhibit peripheral ameloblast-like, tall-columnar cells with reverse polarity and a basaloid, dark-staining center resembling stellate reticulum. In many islands, there is extensive squamous differentiation with polygonal keratinizing cells and foci of keratinization, yet the cells retain minimal cytologic atypia and mitotic activity is low. The surrounding stroma is fibrous and vascular, with infiltrative margins indicating local aggressiveness characteristic of ameloblastoma. Absence of significant pleomorphism, hyperchromasia, or abnormal mitoses helps distinguish this process from squamous cell carcinoma, though extensive squamous metaplasia can mimic malignancy. The lesion is typical of an odontogenic tumor occurring in the jaw (mandible or maxilla). Clinically relevant differential diagnoses include squamous cell carcinoma arising in odontogenic keratocyst or de-differentiated ameloblastoma; correlation with radiology and clinical course is essential. The diagnostic significance lies in recognizing metaplastic squamous change to prevent misinterpretation as invasive carcinoma; complete surgical excision with careful follow-up is recommended due to potential recurrence. Clinicians should correlate with radiographic margins, molecular markers as available, and immunohistochemical profile showing p63 and cytokeratin expression patterns supporting odontogenic origin rather than carcinoma.

Finding Sources
I now have all the content needed. Let me create the comprehensive PPTX presentation.
Running Command

mkdir -p /tmp/workspace/odontogenic-tumors && ls /tmp/workspace/odontogenic-tumors/

Writing File

~/odontogenic-tumors/create_ppt.py

import json, subprocess, base64, os
from io import BytesIO
from pptx import Presentation
from pptx.util import Inches, Pt, Emu
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.util import Inches, Pt
from pptx.oxml.ns import qn
from lxml import etree

# ── Color palette ────────────────────────────────────────────────
DEEP_BLUE   = RGBColor(0x0D, 0x47, 0xA1)   # #0D47A1
LIGHT_BLUE  = RGBColor(0x42, 0xA5, 0xF5)   # #42A5F5
GOLD        = RGBColor(0xFF, 0xD6, 0x00)   # #FFD600
WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
DARK_TEXT   = RGBColor(0x1A, 0x23, 0x7E)   # deep navy
LIGHT_BG    = RGBColor(0xE3, 0xF2, 0xFD)   # very light blue
ACCENT_RED  = RGBColor(0xD3, 0x2F, 0x2F)   # #D32F2F
ACCENT_GREEN= RGBColor(0x2E, 0x7D, 0x32)   # #2E7D32
SECTION_CEOT= RGBColor(0x4A, 0x14, 0x8C)   # purple for CEOT
SECTION_AOT = RGBColor(0x00, 0x69, 0x5C)   # teal for AOT
SECTION_SOT = RGBColor(0x1A, 0x23, 0x7E)   # deep blue for SOT
SLIDE_BG    = RGBColor(0xF5, 0xF5, 0xF5)

prs = Presentation()
prs.slide_width  = Inches(13.333)
prs.slide_height = Inches(7.5)
blank_layout = prs.slide_layouts[6]

# ── Helper: set solid fill on shape ──────────────────────────────
def fill_solid(shape, color):
    sp = shape._element
    spPr = sp.find(qn('p:spPr'))
    if spPr is None:
        spPr = etree.SubElement(sp, qn('p:spPr'))
    solidFill_parent = spPr
    # remove existing fill
    for tag in ['a:noFill','a:solidFill','a:gradFill','a:pattFill','a:blipFill','a:grpSpPr']:
        el = spPr.find(qn(tag) if ':' in tag else tag)
        if el is not None:
            spPr.remove(el)
    solidFill = etree.SubElement(spPr, qn('a:solidFill'))
    srgbClr   = etree.SubElement(solidFill, qn('a:srgbClr'))
    srgbClr.set('val', '{:02X}{:02X}{:02X}'.format(color.r, color.g, color.b))

def set_bg_color(slide, color):
    bg = slide.background
    fill = bg.fill
    fill.solid()
    fill.fore_color.rgb = color

def add_rect(slide, l, t, w, h, color):
    shape = slide.shapes.add_shape(1, Inches(l), Inches(t), Inches(w), Inches(h))
    fill_solid(shape, color)
    shape.line.fill.background()
    return shape

def add_tb(slide, text, l, t, w, h, size, bold=False, color=WHITE, align=PP_ALIGN.LEFT, italic=False, wrap=True):
    tb = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = wrap
    tf.margin_left = Pt(4)
    tf.margin_right = Pt(4)
    tf.margin_top = Pt(2)
    tf.margin_bottom = Pt(2)
    p = tf.paragraphs[0]
    p.alignment = align
    run = p.add_run()
    run.text = text
    run.font.size = Pt(size)
    run.font.bold = bold
    run.font.italic = italic
    run.font.color.rgb = color
    run.font.name = "Calibri"
    return tb

def add_bullet_slide(slide, title_text, bullets, accent_color, subtitle=None, image_url=None):
    """Generic bullet slide with a left accent bar and title"""
    set_bg_color(slide, SLIDE_BG)
    # Top header bar
    add_rect(slide, 0, 0, 13.333, 1.1, accent_color)
    add_tb(slide, title_text, 0.2, 0.05, 12.8, 1.0, 28, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
    if subtitle:
        add_tb(slide, subtitle, 0.2, 0.65, 12.8, 0.5, 14, bold=False, color=GOLD, align=PP_ALIGN.LEFT)

    # Left accent strip
    add_rect(slide, 0, 1.1, 0.08, 6.4, GOLD)

    # Bullet text box
    tb = slide.shapes.add_textbox(Inches(0.3), Inches(1.2), Inches(12.8), Inches(6.0))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(6)
    tf.margin_right = Pt(6)
    tf.margin_top = Pt(4)
    tf.margin_bottom = Pt(4)

    first = True
    for item in bullets:
        if first:
            p = tf.paragraphs[0]
            first = False
        else:
            p = tf.add_paragraph()
        p.space_before = Pt(4)
        p.space_after  = Pt(2)

        if isinstance(item, dict):
            # heading bullet
            run = p.add_run()
            run.text = item['heading']
            run.font.bold = True
            run.font.size = Pt(item.get('size', 17))
            run.font.color.rgb = accent_color
            run.font.name = "Calibri"
            p.level = 0
        else:
            indent = 0
            text = item
            if item.startswith('   '):
                indent = 1
                text = item.lstrip()
            run = p.add_run()
            # bullet char
            if indent == 0:
                run.text = u'\u25CF  ' + text
                run.font.size = Pt(15)
                run.font.bold = False
                run.font.color.rgb = DARK_TEXT
            else:
                run.text = u'      \u25E6  ' + text
                run.font.size = Pt(13.5)
                run.font.bold = False
                run.font.color.rgb = RGBColor(0x37, 0x47, 0x4F)
            run.font.name = "Calibri"
            p.level = indent

# ─────────────────────────────────────────────────────────────────
# SLIDE 1 — Title Slide
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
set_bg_color(slide, DEEP_BLUE)

# Diagonal accent shape (simulated via stacked rects)
add_rect(slide, 0, 0, 13.333, 7.5, DEEP_BLUE)
add_rect(slide, 0, 5.5, 13.333, 2.0, RGBColor(0x0A, 0x33, 0x7A))

# Gold banner
add_rect(slide, 0, 3.0, 13.333, 0.08, GOLD)
add_rect(slide, 0, 6.5, 13.333, 0.08, GOLD)

# Main title
add_tb(slide, "ODONTOGENIC TUMORS", 0.5, 0.5, 12.3, 1.2, 42, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_tb(slide, "SOT  |  CEOT  |  AOT", 0.5, 1.6, 12.3, 1.0, 32, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_tb(slide, "Squamous Odontogenic Tumor  •  Calcifying Epithelial Odontogenic Tumor  •  Adenomatoid Odontogenic Tumor",
       0.5, 2.5, 12.3, 0.6, 13, bold=False, color=LIGHT_BLUE, align=PP_ALIGN.CENTER)

add_tb(slide, "Based on Shafer's Textbook of Oral Pathology", 0.5, 3.6, 12.3, 0.6, 14, bold=False,
       color=RGBColor(0xB3, 0xD9, 0xFF), align=PP_ALIGN.CENTER)
add_tb(slide, "Oral & Maxillofacial Pathology", 0.5, 6.6, 12.3, 0.6, 13, bold=False,
       color=RGBColor(0xB3, 0xD9, 0xFF), align=PP_ALIGN.CENTER)

# ─────────────────────────────────────────────────────────────────
# SLIDE 2 — Overview / Classification
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
set_bg_color(slide, SLIDE_BG)
add_rect(slide, 0, 0, 13.333, 1.1, DEEP_BLUE)
add_tb(slide, "Classification of Odontogenic Tumors", 0.2, 0.05, 12.8, 1.0, 26, bold=True, color=WHITE)
add_rect(slide, 0, 1.1, 0.08, 6.4, GOLD)

# Three columns
cols = [
    ("SOT", "Squamous Odontogenic Tumor", SECTION_SOT,
     ["Epithelial origin", "Extremely rare", "Benign, locally aggressive", "Resembles squamous cell carcinoma microscopically", "Arises from rests of Malassez"]),
    ("CEOT", "Calcifying Epithelial\nOdontogenic Tumor (Pindborg)", SECTION_CEOT,
     ["Also: Pindborg Tumor", "Epithelial origin", "Locally invasive benign neoplasm", "Liesegang ring calcifications", "Amyloid-like material"]),
    ("AOT", "Adenomatoid Odontogenic Tumor", SECTION_AOT,
     ["Also called '2/3 tumor'", "Epithelial origin", "Benign, non-invasive", "Associated with impacted canine", "Excellent prognosis"]),
]
x_starts = [0.3, 4.6, 8.9]
for (abbr, full, color, pts), x in zip(cols, x_starts):
    add_rect(slide, x, 1.2, 4.1, 0.7, color)
    add_tb(slide, abbr, x+0.05, 1.2, 4.0, 0.45, 22, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_tb(slide, full, x+0.05, 1.65, 4.0, 0.5, 10, bold=False, color=WHITE, align=PP_ALIGN.CENTER)
    add_rect(slide, x, 1.95, 4.1, 5.3, RGBColor(0xFF, 0xFF, 0xFF))
    # Add a subtle left border
    add_rect(slide, x, 1.95, 0.05, 5.3, color)
    tb2 = slide.shapes.add_textbox(Inches(x+0.1), Inches(2.05), Inches(3.95), Inches(5.1))
    tf2 = tb2.text_frame
    tf2.word_wrap = True
    first2 = True
    for pt in pts:
        if first2:
            p2 = tf2.paragraphs[0]
            first2 = False
        else:
            p2 = tf2.add_paragraph()
        p2.space_before = Pt(5)
        r2 = p2.add_run()
        r2.text = u'\u2714  ' + pt
        r2.font.size = Pt(13)
        r2.font.color.rgb = DARK_TEXT
        r2.font.name = "Calibri"

# WHO Classification note
add_tb(slide, "WHO Classification (2022): Benign Epithelial Odontogenic Tumors",
       0.3, 7.1, 12.8, 0.35, 11, bold=False, color=RGBColor(0x55, 0x55, 0x55), align=PP_ALIGN.CENTER)

# ─────────────────────────────────────────────────────────────────
# SLIDE 3 — SOT: Section Title
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
set_bg_color(slide, SECTION_SOT)
add_rect(slide, 0, 0, 13.333, 7.5, SECTION_SOT)
add_rect(slide, 0, 3.5, 13.333, 0.08, GOLD)
add_tb(slide, "SECTION 1", 0.5, 1.0, 12.3, 0.8, 22, bold=False, color=LIGHT_BLUE, align=PP_ALIGN.CENTER)
add_tb(slide, "Squamous Odontogenic Tumor", 0.5, 1.7, 12.3, 1.2, 38, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_tb(slide, "(SOT)", 0.5, 2.8, 12.3, 0.8, 28, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_tb(slide, "First described by Pullon et al. (1975)", 0.5, 3.7, 12.3, 0.6, 15, bold=False,
       color=RGBColor(0xB3, 0xD9, 0xFF), align=PP_ALIGN.CENTER)
add_tb(slide, "Extremely rare benign odontogenic tumor • < 100 cases in literature",
       0.5, 4.4, 12.3, 0.6, 14, bold=False, color=RGBColor(0xCC, 0xCC, 0xFF), align=PP_ALIGN.CENTER)

# ─────────────────────────────────────────────────────────────────
# SLIDE 4 — SOT: Clinical Features
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "SOT — Clinical Features", [
    {"heading": "Incidence & Demographics", "size": 17},
    "Extremely rare — fewer than 100 cases reported in world literature",
    "No definite age predilection (variable age of occurrence)",
    "No significant sex predilection",
    "Familial and multifocal cases have been reported",
    {"heading": "Clinical Presentation", "size": 17},
    "Usually presents as 'inverted' triangular periodontal bone loss on radiograph",
    "   Base of triangle is toward tooth apex (opposite of periodontal disease)",
    "Gingival/peripheral tumors have also been described",
    "Generally small, slow-growing swelling",
    "May cause mild pain or tooth mobility",
    {"heading": "Location", "size": 17},
    "Any portion of the tooth-bearing area may be involved",
    "Both maxilla and mandible affected; no strong predilection",
], SECTION_SOT, subtitle="Demographics • Presentation • Location")

# ─────────────────────────────────────────────────────────────────
# SLIDE 5 — SOT: Radiographic & Histopathological Features
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "SOT — Radiographic & Histopathological Features", [
    {"heading": "Radiographic Features", "size": 17},
    "Radiolucent lesion (single)",
    "Poorly defined margins (unlike AOT and CEOT which are well-demarcated)",
    "'Inverted' triangular radiolucency adjacent to tooth root — CLASSIC sign",
    "May mimic periodontal disease radiographically",
    {"heading": "Histopathological Features (KEY)", "size": 17},
    "Islands of well-differentiated squamous epithelium in a mature fibrous stroma",
    "   Epithelial islands are completely benign cytologically",
    "No peripheral palisading of cells (unlike ameloblastoma)",
    "May be misinterpreted as invasion — can mimic squamous cell carcinoma",
    "   Also may be confused with acanthomatous ameloblastoma",
    "Calcifications may occasionally be present within epithelial nests",
    {"heading": "Histogenesis", "size": 17},
    "Arises from rests of Malassez in the periodontal ligament",
    "Also possibly from dental lamina rests or reduced enamel epithelium",
], SECTION_SOT, subtitle="Radiology • Microscopy • Histogenesis")

# ─────────────────────────────────────────────────────────────────
# SLIDE 6 — SOT: Treatment & Differentials
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "SOT — Treatment, Prognosis & Differentials", [
    {"heading": "Treatment", "size": 17},
    "Conservative local excision or curettage",
    "Enucleation and simple conservative curettage is sufficient",
    "No need for radical resection",
    "Multifocal cases may require more careful follow-up",
    {"heading": "Prognosis", "size": 17},
    "Excellent prognosis",
    "Recurrence is rare with adequate conservative treatment",
    {"heading": "Differential Diagnosis", "size": 17},
    "Squamous cell carcinoma (most important — cytologic features help)",
    "   SOT: completely benign squamous islands, no atypia or mitoses",
    "Acanthomatous ameloblastoma",
    "   Ameloblastoma: peripheral palisading, reverse nuclear polarity",
    "Periodontal disease (radiographically)",
    "Inflammatory jaw cysts with squamous metaplasia",
    {"heading": "Key Distinguishing Point", "size": 17},
    "Cytologically benign squamous islands in SOT — no malignant features",
], SECTION_SOT, subtitle="Management • Prognosis • Differential Diagnosis")

# ─────────────────────────────────────────────────────────────────
# SLIDE 7 — CEOT: Section Title
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
set_bg_color(slide, SECTION_CEOT)
add_rect(slide, 0, 0, 13.333, 7.5, SECTION_CEOT)
add_rect(slide, 0, 3.5, 13.333, 0.08, GOLD)
add_tb(slide, "SECTION 2", 0.5, 1.0, 12.3, 0.8, 22, bold=False, color=LIGHT_BLUE, align=PP_ALIGN.CENTER)
add_tb(slide, "Calcifying Epithelial Odontogenic Tumor", 0.5, 1.7, 12.3, 1.2, 32, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_tb(slide, "(CEOT  —  Pindborg Tumor)", 0.5, 2.8, 12.3, 0.8, 26, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_tb(slide, "First described by Jens Pindborg (1955–1958)", 0.5, 3.7, 12.3, 0.6, 15, bold=False,
       color=RGBColor(0xD1, 0xB3, 0xFF), align=PP_ALIGN.CENTER)
add_tb(slide, "Locally invasive benign neoplasm • ~1% of all odontogenic tumors",
       0.5, 4.4, 12.3, 0.6, 14, bold=False, color=RGBColor(0xCC, 0xCC, 0xFF), align=PP_ALIGN.CENTER)

# ─────────────────────────────────────────────────────────────────
# SLIDE 8 — CEOT: Clinical Features
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "CEOT — Clinical Features", [
    {"heading": "Age & Sex", "size": 17},
    "Peak age: 30–50 years (most between 20–60 years)",
    "No significant sex predilection",
    {"heading": "Site", "size": 17},
    "Mandible > Maxilla (Mandibular:Maxillary ratio = 2:1)",
    "Posterior tooth-bearing areas most commonly affected",
    "Commonly associated with an unerupted/impacted tooth",
    "Peripheral (extraosseous) variant: ~6% of cases — presents in gingiva",
    {"heading": "Symptoms & Signs", "size": 17},
    "Painless, slowly progressive swelling — most common presentation",
    "Jaw expansion may be noted",
    "May cause displacement of adjacent teeth",
    "Rarely: paresthesia of inferior alveolar nerve (mandibular cases)",
    {"heading": "Clinical Significance", "size": 17},
    "Locally invasive — can cause significant bone destruction",
    "Recurrence rate ~14–20% after conservative treatment",
    "Malignant transformation rare but reported",
], SECTION_CEOT, subtitle="Demographics • Site • Symptoms")

# ─────────────────────────────────────────────────────────────────
# SLIDE 9 — CEOT: Radiographic Features
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "CEOT — Radiographic Features", [
    {"heading": "General Radiographic Pattern", "size": 17},
    "Radiolucent lesion — single, well-demarcated",
    "MULTILOCULAR (honeycomb or soap bubble pattern in larger lesions)",
    "   Unilocular pattern also seen in early lesions",
    "Mixed radiolucent-radiopaque lesion as calcifications increase",
    {"heading": "Classic Radiographic Appearance", "size": 17},
    "Radiolucency with 'driven snow' or 'snowstorm' calcification pattern",
    "   Small flocculent calcifications scattered throughout radiolucency",
    "Associated with crown of an impacted tooth (pericoronal location)",
    "Well-corticated border when unilocular",
    {"heading": "Advanced Lesion Features", "size": 17},
    "Root resorption of adjacent teeth",
    "Expansion and perforation of cortical plates",
    "Displacement of adjacent teeth",
    {"heading": "DDx on Radiograph", "size": 17},
    "Ameloblastoma (no calcifications)",
    "Calcifying odontogenic cyst (Gorlin cyst)",
    "Complex odontoma",
    "Ossifying fibroma",
], SECTION_CEOT, subtitle="Radiolucency • Calcification Pattern • 'Driven Snow' Appearance")

# ─────────────────────────────────────────────────────────────────
# SLIDE 10 — CEOT: Histopathological Features
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "CEOT — Histopathological Features (KEY)", [
    {"heading": "Epithelial Component", "size": 17},
    "Sheets, nests, and strands of polygonal epithelial cells",
    "Abundant eosinophilic cytoplasm with distinct cell borders",
    "Prominent intercellular bridges (desmosomal junctions)",
    "Nuclear pleomorphism may be present — but NOT indicative of malignancy",
    "   Mitotic activity is LOW despite nuclear atypia",
    {"heading": "Amyloid-Like Material (HALLMARK)", "size": 17},
    "Large areas of eosinophilic homogeneous amyloid-like extracellular material",
    "Stains positive with Congo red stain — shows apple-green birefringence",
    "Represents modified basement membrane/enamel proteins",
    {"heading": "Liesegang Ring Calcifications (HALLMARK)", "size": 17},
    "Calcifications form within the amyloid material",
    "Appear as concentric ring (lamellar) calcifications — 'Liesegang rings'",
    "   Pathognomonic feature of CEOT",
    "   Also called 'liesgang ring calcifications' or concentric rings",
    {"heading": "Clear Cell Variant", "size": 17},
    "Rare variant with cells showing clear cytoplasm due to glycogen",
    "More aggressive behavior reported",
], SECTION_CEOT, subtitle="Epithelial Cells • Amyloid • Liesegang Rings")

# ─────────────────────────────────────────────────────────────────
# SLIDE 11 — CEOT: Treatment & Special Notes
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "CEOT — Treatment, Prognosis & Differentials", [
    {"heading": "Treatment", "size": 17},
    "Resection with small margin of normal bone (preferred)",
    "   More aggressive than conservative enucleation due to local invasion",
    "Conservative enucleation + curettage for small, well-defined lesions",
    "Long-term follow-up mandatory (recurrence possible)",
    {"heading": "Prognosis", "size": 17},
    "Good prognosis overall",
    "Recurrence rate: ~14–20% with conservative surgery",
    "Malignant CEOT (malignant Pindborg tumor) — extremely rare",
    {"heading": "Differential Diagnosis", "size": 17},
    "Ameloblastoma (no amyloid, no Liesegang rings)",
    "Calcifying odontogenic cyst — Gorlin cyst",
    "Adenomatoid odontogenic tumor (AOT) — also has calcifications",
    "Odontoma",
    {"heading": "Mnemonic — CEOT Key Features", "size": 17},
    "C = Calcifications (Liesegang rings) + Congo red positive",
    "E = Eosinophilic amyloid-like material",
    "O = Odontogenic epithelium (polygonal cells)",
    "T = Tumor — Pindborg (30–50 yrs, mandible > maxilla)",
], SECTION_CEOT, subtitle="Management • Recurrence • Differentials")

# ─────────────────────────────────────────────────────────────────
# SLIDE 12 — AOT: Section Title
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
set_bg_color(slide, SECTION_AOT)
add_rect(slide, 0, 0, 13.333, 7.5, SECTION_AOT)
add_rect(slide, 0, 3.5, 13.333, 0.08, GOLD)
add_tb(slide, "SECTION 3", 0.5, 1.0, 12.3, 0.8, 22, bold=False, color=LIGHT_BLUE, align=PP_ALIGN.CENTER)
add_tb(slide, "Adenomatoid Odontogenic Tumor", 0.5, 1.7, 12.3, 1.2, 36, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_tb(slide, "(AOT)", 0.5, 2.8, 12.3, 0.8, 28, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
add_tb(slide, "The 'Two-Thirds' Tumor  •  Most Innocuous Odontogenic Tumor", 0.5, 3.7, 12.3, 0.6, 15, bold=False,
       color=RGBColor(0xA7, 0xD9, 0xD0), align=PP_ALIGN.CENTER)
add_tb(slide, "Previously called: Adenoameloblastoma • Ameloblastic Adenomatoid Tumor (OBSOLETE)",
       0.5, 4.4, 12.3, 0.6, 13, bold=False, color=RGBColor(0xCC, 0xEE, 0xE8), align=PP_ALIGN.CENTER)

# ─────────────────────────────────────────────────────────────────
# SLIDE 13 — AOT: The "Two-Thirds" Rule
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
set_bg_color(slide, SLIDE_BG)
add_rect(slide, 0, 0, 13.333, 1.1, SECTION_AOT)
add_tb(slide, "AOT — The 'Two-Thirds' Tumor (Classic Exam Fact)", 0.2, 0.05, 12.8, 1.0, 22, bold=True, color=WHITE)
add_rect(slide, 0, 1.1, 0.08, 6.4, GOLD)

# 4 boxes
boxes = [
    ("2/3 Female", "Female predominance\n(sex ratio 2:1)", SECTION_AOT),
    ("2/3 Maxilla", "Most in anterior maxilla\n(maxilla:mandible = 2:1)", RGBColor(0x00, 0x89, 0x7B)),
    ("2/3 Impacted Tooth", "Associated with unerupted teeth\nespecially the canine", RGBColor(0x00, 0x6B, 0x5C)),
    ("2/3 Teenagers", "Most common under 20\n(< 30 years in most cases)", RGBColor(0x00, 0x50, 0x48)),
]
bx = [0.3, 3.5, 6.7, 9.9]
for (title, desc, col), x in zip(boxes, bx):
    add_rect(slide, x, 1.3, 3.0, 1.5, col)
    add_tb(slide, title, x+0.1, 1.32, 2.8, 0.9, 17, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    add_tb(slide, desc, x+0.1, 2.05, 2.8, 0.8, 12, bold=False, color=RGBColor(0xDD,0xFF,0xFA), align=PP_ALIGN.CENTER)

add_tb(slide, "Additional Clinical Features:", 0.3, 3.2, 12.8, 0.5, 15, bold=True, color=DARK_TEXT)

tb = slide.shapes.add_textbox(Inches(0.3), Inches(3.6), Inches(12.8), Inches(3.6))
tf = tb.text_frame
tf.word_wrap = True
bullet_data = [
    "Usually discovered while investigating delayed eruption of a canine tooth",
    "Slow growing, relatively asymptomatic in most cases",
    "Occasionally arises peripherally within the gingiva (peripheral AOT)",
    "Unusual in patients over 30 years of age",
    "   Vague histologic similarity to ameloblastoma → previously misnamed 'adenoameloblastoma'",
    "   Unlike ameloblastoma: non-aggressive, does NOT recur, excellent prognosis",
]
first3 = True
for b in bullet_data:
    if first3:
        p3 = tf.paragraphs[0]
        first3 = False
    else:
        p3 = tf.add_paragraph()
    indent = 1 if b.startswith('   ') else 0
    r3 = p3.add_run()
    if indent == 0:
        r3.text = u'\u25CF  ' + b.strip()
        r3.font.size = Pt(13.5)
        r3.font.color.rgb = DARK_TEXT
    else:
        r3.text = u'      \u25E6  ' + b.strip()
        r3.font.size = Pt(12.5)
        r3.font.color.rgb = RGBColor(0x37, 0x47, 0x4F)
    r3.font.name = "Calibri"
    p3.space_before = Pt(4)

# ─────────────────────────────────────────────────────────────────
# SLIDE 14 — AOT: Radiographic Features
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "AOT — Radiographic Features", [
    {"heading": "General Pattern", "size": 17},
    "Unilocular radiolucency — CLASSIC",
    "Sharp, circumscribed border — well-corticated to sclerotic margins",
    "Single lesion",
    {"heading": "Relationship to Tooth", "size": 17},
    "Pericoronal location — associated with crown of unerupted tooth",
    "   CLASSIC: associated with impacted maxillary canine",
    "Radiolucency extends APICAL to the CEJ (cervico-enamel junction)",
    "   Dentigerous cyst: extends only to CEJ (coronal to CEJ)",
    "This extension DIFFERENTIATES AOT from dentigerous cyst",
    {"heading": "Calcifications (Distinguishing Feature)", "size": 17},
    "Small, flocculent calcifications within the radiolucency",
    "   Appear as 'snowflake' or 'driven snow' calcifications",
    "   These calcifications help distinguish AOT from dentigerous cyst",
    "May appear as mixed radiolucent-radiopaque lesion",
    {"heading": "Differential Diagnosis on X-ray", "size": 17},
    "Dentigerous (follicular) cyst — most common DDx",
    "CEOT with associated impacted tooth",
    "Lateral periodontal cyst",
], SECTION_AOT, subtitle="Unilocular • Pericoronal • Calcifications within Radiolucency")

# ─────────────────────────────────────────────────────────────────
# SLIDE 15 — AOT: Histopathological Features
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "AOT — Histopathological Features (KEY)", [
    {"heading": "Architecture", "size": 17},
    "Well-encapsulated tumor — thick fibrous capsule",
    "Cystic spaces are common within the tumor",
    {"heading": "Epithelial Component", "size": 17},
    "Spindle-shaped epithelial cells — forming whorled masses (rosettes)",
    "   Classic 'whorled' or 'rosetted' arrangement",
    "Duct-like structures (adenomatoid structures) — HALLMARK",
    "   Duct-like spaces lined by cuboidal or columnar epithelial cells",
    "   Eosinophilic material within the duct-like lumens",
    {"heading": "Mineralized Structures", "size": 17},
    "Foci of amyloid-like material (if present — in rosette/adenomatoid areas)",
    "Poorly organized calcifications — may resemble dentin, cementum",
    "   Aborted attempts at enamel production",
    "NOT well-organized Liesegang rings (unlike CEOT)",
    {"heading": "Stroma", "size": 17},
    "Scant fibrous stroma between epithelial whorls",
    "Variable cystic spaces — some true luminal surfaces adjacent to tooth crown",
    {"heading": "Histogenesis", "size": 17},
    "Derives from enamel organ epithelium or dental lamina rests",
], SECTION_AOT, subtitle="Well-Encapsulated • Whorled Epithelium • Duct-like Structures")

# ─────────────────────────────────────────────────────────────────
# SLIDE 16 — AOT: Treatment & Variants
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
add_bullet_slide(slide, "AOT — Types, Treatment & Prognosis", [
    {"heading": "Types of AOT (3 Variants)", "size": 17},
    "1. Follicular type (most common ~70%) — pericoronal, enclosing impacted tooth",
    "2. Extrafollicular type (~25%) — not associated with impacted tooth (interradicular/periapical)",
    "3. Peripheral type (~5%) — extraosseous, within gingival soft tissue",
    {"heading": "Treatment", "size": 17},
    "Enucleation — sufficient due to well-encapsulated nature",
    "   Lesion separates easily from bone due to thick capsule",
    "Associated impacted tooth may be left in place for eruption",
    "   Or orthodontic therapy can be initiated after enucleation",
    "NO need for wide resection",
    {"heading": "Prognosis", "size": 17},
    "Excellent — NEVER recurs (practically)",
    "   'If never can be used in health science — odontomas and AOT never recur'",
    "No malignant transformation reported",
    "Most innocuous odontogenic tumor",
    {"heading": "Key Points vs. Ameloblastoma", "size": 17},
    "Superficial histologic similarity to ameloblastoma — only similarity",
    "AOT: well-encapsulated, no recurrence, benign behavior",
    "Ameloblastoma: aggressive, recurs, NOT well-encapsulated",
], SECTION_AOT, subtitle="Follicular • Extrafollicular • Peripheral Types")

# ─────────────────────────────────────────────────────────────────
# SLIDE 17 — Comparison Table
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
set_bg_color(slide, SLIDE_BG)
add_rect(slide, 0, 0, 13.333, 1.0, DEEP_BLUE)
add_tb(slide, "Comparative Overview: SOT vs CEOT vs AOT", 0.2, 0.05, 12.8, 0.9, 24, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 0.08, 6.5, GOLD)

# Table as text boxes
headers = ["Feature", "SOT", "CEOT (Pindborg)", "AOT (2/3 Tumor)"]
col_colors = [DEEP_BLUE, SECTION_SOT, SECTION_CEOT, SECTION_AOT]
col_w = [2.4, 3.1, 4.0, 3.6]
col_x = [0.1]
for w in col_w[:-1]:
    col_x.append(col_x[-1] + w + 0.05)

# Header row
for hdr, col, w, x in zip(headers, col_colors, col_w, col_x):
    add_rect(slide, x, 1.05, w, 0.5, col)
    add_tb(slide, hdr, x+0.05, 1.07, w-0.1, 0.45, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

rows = [
    ["Age",            "Variable",        "30-50 years",        "< 20 years (teens)"],
    ["Sex",            "No predilection", "No predilection",    "Female 2:1"],
    ["Site",           "Any jaw; no\npredilection", "Mandible > Maxilla\n(2:1)", "Anterior Maxilla\n(2/3 cases)"],
    ["Radiology",      "Radiolucent,\npoorly defined", "Radiolucent,\nmultilocular,\n'driven snow'", "Unilocular,\nwell-defined,\npericoronal"],
    ["Histology",      "Sq. epithelial\nislands in\nfibrous stroma", "Amyloid material +\nLiesegang rings +\npolygonal cells", "Whorled spindle\ncells + duct-like\nstructures"],
    ["Key Stain",      "H&E (benign\nsquamous cells)", "Congo red (+)\namyloid", "H&E (rosettes,\nduct-like spaces)"],
    ["Treatment",      "Conservative\nexcision/curettage", "Resection with\nsmall margin", "Enucleation"],
    ["Prognosis",      "Excellent",       "Good\n(14-20% recur)", "Excellent\n(never recurs)"],
]
row_bg = [RGBColor(0xEE,0xF5,0xFF), RGBColor(0xFF,0xFF,0xFF)]
for ri, row in enumerate(rows):
    y = 1.6 + ri * 0.69
    for ci, (cell, w, x) in enumerate(zip(row, col_w, col_x)):
        bg = RGBColor(0xE3,0xF2,0xFD) if ci == 0 else row_bg[ri % 2]
        add_rect(slide, x, y, w, 0.68, bg)
        fcol = DEEP_BLUE if ci == 0 else DARK_TEXT
        add_tb(slide, cell, x+0.05, y+0.02, w-0.1, 0.64, 11, bold=(ci==0), color=fcol, align=PP_ALIGN.CENTER)

# ─────────────────────────────────────────────────────────────────
# SLIDE 18 — Key Mnemonics & Memory Aids
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
set_bg_color(slide, SLIDE_BG)
add_rect(slide, 0, 0, 13.333, 1.0, RGBColor(0x1A, 0x23, 0x7E))
add_tb(slide, "Mnemonics & High-Yield Memory Aids", 0.2, 0.05, 12.8, 0.9, 24, bold=True, color=WHITE)
add_rect(slide, 0, 1.0, 0.08, 6.5, GOLD)

mnem_boxes = [
    ("AOT = '2/3 TUMOR'", SECTION_AOT, [
        "2/3 Female",
        "2/3 Maxilla (anterior)",
        "2/3 Impacted tooth (canine)",
        "2/3 Teenagers (< 20 yrs)",
        "NEVER recurs after enucleation",
        "Most innocuous odontogenic tumor",
    ]),
    ("CEOT = 'PINDBORG'", SECTION_CEOT, [
        "Polygonal epithelial cells",
        "Intercellular bridges prominent",
        "Nuclear pleomorphism (benign!)",
        "D = Driven snow calcifications",
        "B = Birefringent (Congo red +)",
        "O = Odontogenic, posterior jaw",
        "R = Resection needed (invasive)",
        "G = Good prognosis",
    ]),
    ("SOT = RARE MIMIC", SECTION_SOT, [
        "Rare — < 100 cases worldwide",
        "Mimics SCC microscopically",
        "Inverted triangular bone loss",
        "Cytologically BENIGN islands",
        "Conservative excision = cure",
        "Rests of Malassez = origin",
    ]),
]

bx2 = [0.2, 4.6, 9.0]
for (title, col, pts), x2 in zip(mnem_boxes, bx2):
    w2 = 4.2
    add_rect(slide, x2, 1.1, w2, 0.55, col)
    add_tb(slide, title, x2+0.1, 1.12, w2-0.2, 0.5, 14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    tb3 = slide.shapes.add_textbox(Inches(x2+0.05), Inches(1.7), Inches(w2-0.1), Inches(5.4))
    tf3 = tb3.text_frame
    tf3.word_wrap = True
    add_rect(slide, x2, 1.68, w2, 5.55, RGBColor(0xFF,0xFF,0xFF))
    add_rect(slide, x2, 1.68, 0.04, 5.55, col)
    tf3.margin_left = Pt(8)
    first4 = True
    for pt2 in pts:
        if first4:
            p4 = tf3.paragraphs[0]
            first4 = False
        else:
            p4 = tf3.add_paragraph()
        r4 = p4.add_run()
        r4.text = u'\u2022  ' + pt2
        r4.font.size = Pt(13)
        r4.font.color.rgb = DARK_TEXT
        r4.font.name = "Calibri"
        p4.space_before = Pt(5)

# ─────────────────────────────────────────────────────────────────
# SLIDE 19 — References & Thank You
# ─────────────────────────────────────────────────────────────────
slide = prs.slides.add_slide(blank_layout)
set_bg_color(slide, DEEP_BLUE)
add_rect(slide, 0, 0, 13.333, 7.5, DEEP_BLUE)
add_rect(slide, 0, 4.5, 13.333, 0.06, GOLD)
add_rect(slide, 0, 6.7, 13.333, 0.06, GOLD)

add_tb(slide, "References", 0.5, 0.3, 12.3, 0.8, 26, bold=True, color=GOLD, align=PP_ALIGN.LEFT)
refs = [
    "1. Shafer WG, Hine MK, Levy BM. Shafer's Textbook of Oral Pathology. 7th ed. Elsevier; 2012.",
    "2. K J Lee's Essential Otolaryngology. 11th ed. McGraw-Hill Education.",
    "3. Cummings Otolaryngology — Head & Neck Surgery. 7th ed. Elsevier.",
    "4. WHO Classification of Head and Neck Tumours. 4th ed. IARC Press, 2017/2022.",
    "5. Philipsen HP, Reichart PA. Calcifying epithelial odontogenic tumour. Oral Oncol 2000;36:17-26.",
    "6. Pullon PA, et al. Squamous odontogenic tumor. Oral Surg 1975;40:616-30.",
]
tb_ref = slide.shapes.add_textbox(Inches(0.5), Inches(1.1), Inches(12.3), Inches(3.2))
tf_ref = tb_ref.text_frame
tf_ref.word_wrap = True
for i, ref in enumerate(refs):
    p_r = tf_ref.paragraphs[0] if i == 0 else tf_ref.add_paragraph()
    r_r = p_r.add_run()
    r_r.text = ref
    r_r.font.size = Pt(11.5)
    r_r.font.color.rgb = RGBColor(0xCC, 0xDD, 0xFF)
    r_r.font.name = "Calibri"
    p_r.space_before = Pt(5)

add_tb(slide, "Thank You", 0.5, 4.7, 12.3, 1.0, 36, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
add_tb(slide, "SOT  •  CEOT  •  AOT — Epithelial Odontogenic Tumors", 0.5, 5.6, 12.3, 0.6, 15, bold=False,
       color=GOLD, align=PP_ALIGN.CENTER)
add_tb(slide, "Shafer's Textbook of Oral Pathology", 0.5, 6.1, 12.3, 0.5, 12, bold=False,
       color=LIGHT_BLUE, align=PP_ALIGN.CENTER)

# ─────────────────────────────────────────────────────────────────
# SAVE
# ─────────────────────────────────────────────────────────────────
out_path = "/tmp/workspace/odontogenic-tumors/SOT_CEOT_AOT_Shafers.pptx"
buf = BytesIO()
prs.save(buf)
with open(out_path, "wb") as f:
    f.write(buf.getvalue())
print(f"Saved: {out_path}")
print(f"Slides: {len(prs.slides)}")
Running Command

python /tmp/workspace/odontogenic-tumors/create_ppt.py 2>&1

Editing File

~/odontogenic-tumors/create_ppt.py

Successfully replaced 1 instance(s) of the string in '/tmp/workspace/odontogenic-tumors/create_ppt.py'
Running Command

python /tmp/workspace/odontogenic-tumors/create_ppt.py 2>&1

Your presentation is ready! Download it here:

SOT CEOT AOT Shafers

Presentation · PPTX


What's inside — 19 slides, fully content-rich:

SlideContent
1Title Slide — Deep blue design with gold accents
2Overview / Classification — 3-column comparison of SOT, CEOT, AOT
3SOT Section Title
4SOT — Clinical Features — Age, sex, presentation, location, "inverted" bone loss
5SOT — Radiographic & Histopathological Features — Poorly defined margins, benign squamous islands, rests of Malassez
6SOT — Treatment, Prognosis & DDx — Conservative curettage, vs SCC, vs ameloblastoma
7CEOT Section Title — Pindborg Tumor
8CEOT — Clinical Features — 30-50 yrs, mandible > maxilla, painless swelling
9CEOT — Radiographic Features — "Driven snow" calcifications, multilocular
10CEOT — Histopathological Features — Amyloid material, Liesegang rings, Congo red staining
11CEOT — Treatment & DDx — Resection with margins, 14-20% recurrence
12AOT Section Title — "Two-Thirds Tumor"
13AOT — The 2/3 Rule — Visual 4-box layout (female, maxilla, impacted tooth, teenager)
14AOT — Radiographic Features — Unilocular, pericoronal, extends beyond CEJ (DDx from dentigerous cyst)
15AOT — Histopathological Features — Whorled spindle cells, duct-like structures (HALLMARK)
16AOT — Types, Treatment & Prognosis — Follicular/Extrafollicular/Peripheral variants, enucleation, never recurs
17Comparison Table — All three tumors side by side (age, sex, site, radiology, histology, treatment, prognosis)
18Mnemonics & Memory Aids — High-yield exam tips for all three
19References & Thank You
Color coding: Blue = SOT | Purple = CEOT (Pindborg) | Teal = AOT | Gold accents throughout

make ppt of this article to be presented as journal club

Reading File
Running Command

python3 -c " import pdfplumber path = '/tmp/workspace/attachments/54c9894e-3038-44cc-865a-ada7e37d88f0/jc 1.pdf' with pdfplumber.open(path) as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages[:4]): print(f'\n===== PAGE {i+1} =====') print(page.extract_text()) "

Running Command

python3 -c " import pdfplumber path = '/tmp/workspace/attachments/54c9894e-3038-44cc-865a-ada7e37d88f0/jc 1.pdf' with pdfplumber.open(path) as pdf: for i, page in enumerate(pdf.pages[4:14]): print(f'\n===== PAGE {i+5} =====') t = page.extract_text() if t: print(t[:2000]) "

Running Command

python3 -c " import pdfplumber path = '/tmp/workspace/attachments/54c9894e-3038-44cc-865a-ada7e37d88f0/jc 1.pdf' with pdfplumber.open(path) as pdf: for i, page in enumerate(pdf.pages[14:23]): print(f'\n===== PAGE {i+15} =====') t = page.extract_text() if t: print(t[:2500]) # Also check for tables tables = page.extract_tables() if tables: print(f' [TABLE found, rows: {len(tables[0])}]') for row in tables[0][:5]: print(row) "

I have all the content. Pages 16-23 are figures (images only, no extractable text). Now I'll build the full journal club PPT.
Writing File

~/odontogenic-tumors/jc_ppt.py

from io import BytesIO
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR

# ── Palette ─────────────────────────────────────────────────────
NAVY        = RGBColor(0x0D, 0x2B, 0x5E)
TEAL        = RGBColor(0x00, 0x7A, 0x7A)
GOLD        = RGBColor(0xF5, 0xA6, 0x23)
WHITE       = RGBColor(0xFF, 0xFF, 0xFF)
LIGHT_GREY  = RGBColor(0xF4, 0xF6, 0xF9)
DARK_TEXT   = RGBColor(0x1C, 0x2B, 0x3A)
MUTED       = RGBColor(0x5A, 0x6A, 0x7A)
RED         = RGBColor(0xC0, 0x39, 0x2B)
GREEN       = RGBColor(0x1A, 0x7A, 0x3C)
PALE_TEAL   = RGBColor(0xE0, 0xF4, 0xF4)
PALE_NAVY   = RGBColor(0xE8, 0xEE, 0xF8)
SECTION_BG  = RGBColor(0x0D, 0x2B, 0x5E)

prs = Presentation()
prs.slide_width  = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]

# ── Primitives ──────────────────────────────────────────────────
def set_bg(slide, color):
    bg = slide.background
    fill = bg.fill
    fill.solid()
    fill.fore_color.rgb = color

def rect(slide, l, t, w, h, color, line_color=None):
    s = slide.shapes.add_shape(1, Inches(l), Inches(t), Inches(w), Inches(h))
    s.fill.solid()
    s.fill.fore_color.rgb = color
    if line_color:
        s.line.color.rgb = line_color
    else:
        s.line.fill.background()
    return s

def tb(slide, text, l, t, w, h, size, bold=False, italic=False,
       color=DARK_TEXT, align=PP_ALIGN.LEFT, wrap=True, font="Calibri"):
    box = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf = box.text_frame
    tf.word_wrap = wrap
    tf.margin_left = Pt(3); tf.margin_right = Pt(3)
    tf.margin_top = Pt(2);  tf.margin_bottom = Pt(2)
    p = tf.paragraphs[0]
    p.alignment = align
    r = p.add_run()
    r.text = text
    r.font.size = Pt(size)
    r.font.bold = bold
    r.font.italic = italic
    r.font.color.rgb = color
    r.font.name = font
    return box, tf

def header(slide, title, subtitle=None, accent=TEAL):
    set_bg(slide, LIGHT_GREY)
    rect(slide, 0, 0, 13.333, 1.05, NAVY)
    rect(slide, 0, 1.05, 13.333, 0.055, accent)
    tb(slide, title, 0.25, 0.05, 12.8, 0.85, 24, bold=True, color=WHITE, align=PP_ALIGN.LEFT)
    if subtitle:
        tb(slide, subtitle, 0.25, 0.72, 12.8, 0.38, 12, bold=False, color=GOLD, align=PP_ALIGN.LEFT)
    rect(slide, 0, 1.1, 0.06, 6.4, accent)  # left accent bar

def bullets(slide, items, l, t, w, h, base_size=14):
    """items: list of str or dict{'h': heading_text, 'size': n}"""
    box = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf = box.text_frame
    tf.word_wrap = True
    tf.margin_left = Pt(4); tf.margin_right = Pt(4)
    tf.margin_top = Pt(3);  tf.margin_bottom = Pt(3)
    first = True
    for item in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False
        p.space_before = Pt(4)
        p.space_after  = Pt(1)
        if isinstance(item, dict):
            r = p.add_run()
            r.text = item['h']
            r.font.bold = True
            r.font.size = Pt(item.get('size', base_size+2))
            r.font.color.rgb = item.get('color', TEAL)
            r.font.name = "Calibri"
        else:
            indent = item.startswith('  ')
            clean = item.lstrip()
            r = p.add_run()
            r.text = ('\u25E6  ' if indent else '\u25CF  ') + clean
            r.font.size = Pt(base_size - (1 if indent else 0))
            r.font.color.rgb = MUTED if indent else DARK_TEXT
            r.font.bold = False
            r.font.name = "Calibri"
    return tf

# ═══════════════════════════════════════════════════════════════
# SLIDE 1 — Title / Cover
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, NAVY)
rect(sl, 0, 0, 13.333, 7.5, NAVY)
rect(sl, 0, 5.2, 13.333, 0.07, GOLD)
rect(sl, 0, 6.85, 13.333, 0.07, GOLD)
rect(sl, 0, 0, 0.12, 7.5, TEAL)

tb(sl, "JOURNAL CLUB PRESENTATION", 0.3, 0.5, 12.8, 0.7, 16, bold=False,
   color=GOLD, align=PP_ALIGN.CENTER)
tb(sl, "Anesthetic Efficiency of Articaine\nvs Lidocaine in Extraction of\nLower Third Molar",
   0.3, 1.1, 12.8, 2.8, 34, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(sl, "A Meta-Analysis and Systematic Review",
   0.3, 3.7, 12.8, 0.65, 18, bold=False, color=RGBColor(0xA8,0xC8,0xFF), align=PP_ALIGN.CENTER)
tb(sl, "Zhang A, Tang H, Liu S, Ma C, Ma S, Zhao H",
   0.3, 4.3, 12.8, 0.5, 13, bold=False, color=GOLD, align=PP_ALIGN.CENTER)
tb(sl, "Journal of Oral and Maxillofacial Surgery  |  2018  |  DOI: 10.1016/j.joms.2018.08.020",
   0.3, 4.75, 12.8, 0.45, 11.5, bold=False, color=RGBColor(0x88,0xAA,0xCC), align=PP_ALIGN.CENTER)
tb(sl, "Shandong University, China  &  Johns Hopkins Hospital, USA",
   0.3, 5.4, 12.8, 0.45, 12, bold=False, color=RGBColor(0xAA,0xBB,0xCC), align=PP_ALIGN.CENTER)
tb(sl, "Presented by: _______________          Date: _______________",
   0.3, 6.5, 12.8, 0.45, 12, bold=False, color=RGBColor(0x88,0xAA,0xCC), align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 2 — Outline
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Presentation Outline", accent=TEAL)
items_outline = [
    "01  Background & Rationale",
    "02  Objectives of the Study",
    "03  Study Design & Methodology (PRISMA)",
    "04  Inclusion / Exclusion Criteria",
    "05  Data Extraction & Quality Assessment",
    "06  Results — Success Rate of Anesthesia (SRA)",
    "07  Results — Onset Time (SOA & OOA)",
    "08  Results — Duration of Anesthesia (DTA)",
    "09  Results — Intra-operative Pain (IPA)",
    "10  Discussion & Clinical Implications",
    "11  Limitations",
    "12  Conclusion",
    "13  Critical Appraisal",
]
# Two columns
col1 = items_outline[:7]
col2 = items_outline[7:]
box1 = sl.shapes.add_textbox(Inches(0.4), Inches(1.25), Inches(6.0), Inches(5.9))
tf1 = box1.text_frame; tf1.word_wrap = True
box2 = sl.shapes.add_textbox(Inches(6.8), Inches(1.25), Inches(6.3), Inches(5.9))
tf2 = box2.text_frame; tf2.word_wrap = True

for i, (bx, col) in enumerate([(box1, col1),(box2, col2)]):
    tf = bx.text_frame
    tf.margin_left = Pt(4)
    first = True
    for item in col:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False
        num, rest = item.split('  ', 1)
        r1 = p.add_run()
        r1.text = num + '  '
        r1.font.bold = True
        r1.font.size = Pt(15)
        r1.font.color.rgb = TEAL
        r1.font.name = "Calibri"
        r2 = p.add_run()
        r2.text = rest
        r2.font.size = Pt(15)
        r2.font.color.rgb = DARK_TEXT
        r2.font.name = "Calibri"
        p.space_before = Pt(7)

rect(sl, 6.6, 1.2, 0.04, 6.0, GOLD)  # divider

# ═══════════════════════════════════════════════════════════════
# SLIDE 3 — Background & Rationale
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Background & Rationale", subtitle="Why compare articaine vs lidocaine for LTME?", accent=TEAL)
bullets(sl, [
    {'h': 'Lower Third Molar — Clinical Burden', 'size': 16},
    "Prevalence of third molar impaction: 16.7%–68.6%",
    "  Most frequently impacted teeth in humans",
    "  Complications: pericoronitis, caries, resorption, periodontal problems, jaw fractures",
    "  LTME (Lower Third Molar Extraction) is one of the most common dental surgical procedures",
    {'h': 'Current Anesthetic Landscape', 'size': 16},
    "Lidocaine (2%) — 'Gold standard' for IANB since 1948; most widely used globally",
    "Articaine (4%) — Introduced 1976; unique thiophene ring → higher lipid-solubility → better diffusion",
    "  Articaine infiltration NOT ideal for LTME due to dense mandibular bone",
    "  Question: Is articaine effective as IANB for lower third molar extraction?",
    {'h': 'Gap in Evidence', 'size': 16},
    "Prior meta-analyses compared articaine vs lidocaine at pulp levels only",
    "Few studies specifically evaluated anesthetic efficiency during LTME",
    "  No pooled evidence on SRA, onset time, duration, and pain for this specific procedure",
], 0.3, 1.2, 12.8, 6.0, 13.5)

# ═══════════════════════════════════════════════════════════════
# SLIDE 4 — Objectives
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Objectives of the Study", accent=TEAL)

set_bg(sl, LIGHT_GREY)
rect(sl, 0, 0, 13.333, 1.05, NAVY)
rect(sl, 0, 1.05, 13.333, 0.055, TEAL)
tb(sl, "Objectives of the Study", 0.25, 0.05, 12.8, 0.85, 24, bold=True, color=WHITE)
rect(sl, 0, 1.1, 0.06, 6.4, TEAL)

tb(sl, "Primary Objective:", 0.3, 1.3, 12.8, 0.5, 16, bold=True, color=NAVY)
tb(sl, "To evaluate whether the anesthetic efficiency of 4% articaine (with 1:100,000 epinephrine)\nis superior to lidocaine during extraction of lower third molars (LTME) via IANB.",
   0.3, 1.75, 12.8, 0.85, 14, bold=False, color=DARK_TEXT)

tb(sl, "Five Specific Evaluation Indexes:", 0.3, 2.75, 12.8, 0.5, 16, bold=True, color=NAVY)

outcomes = [
    ("SRA", "Success Rate of Anesthesia", "% of cases requiring no re-injection", TEAL),
    ("SOA", "Subjective Onset Time", "Patient-perceived onset (minutes)", RGBColor(0x1A, 0x7A, 0x3C)),
    ("OOA", "Objective Onset Time", "Clinician-measured onset (minutes)", RGBColor(0x7B, 0x1F, 0xA2)),
    ("DTA", "Duration of Anesthesia", "Total anesthetic duration (hours)", RGBColor(0xE6, 0x51, 0x00)),
    ("IPA", "Intra-operative Pain Assessment", "VAS score during surgery (mm)", RED),
]
xs = [0.2, 2.85, 5.5, 8.15, 10.8]
for (abbr, full, desc, col), x in zip(outcomes, xs):
    rect(sl, x, 3.25, 2.45, 0.55, col)
    tb(sl, abbr, x+0.05, 3.26, 2.35, 0.52, 18, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    rect(sl, x, 3.82, 2.45, 3.3, WHITE)
    rect(sl, x, 3.82, 2.45, 0.04, col)
    tb(sl, full, x+0.05, 3.88, 2.35, 0.7, 12, bold=True, color=NAVY, align=PP_ALIGN.CENTER)
    tb(sl, desc, x+0.05, 4.55, 2.35, 1.1, 11, bold=False, color=MUTED, align=PP_ALIGN.CENTER)

tb(sl, "Hypothesis: Articaine possesses superior anesthetic efficiency compared to lidocaine during LTME",
   0.3, 7.0, 12.8, 0.45, 12, bold=True, color=TEAL, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 5 — Study Design & Search Strategy
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Study Design & Search Strategy", subtitle="Systematic Review + Meta-Analysis | PRISMA Guidelines", accent=TEAL)
bullets(sl, [
    {'h': 'Study Design', 'size': 16},
    "Type: Meta-analysis and systematic review of RCTs",
    "  Follows PRISMA (Preferred Reporting Items for Systematic Reviews and Meta-Analyses) guidelines",
    {'h': 'Database Search (up to April 1, 2018)', 'size': 16},
    "Medline (PubMed)  —  13 records identified",
    "Cochrane Library  —  13 records identified",
    "Web of Science    —  41 records identified",
    "  Total: 67 records  →  28 duplicates removed  →  39 unique records screened",
    "  No language restriction applied",
    "  Citations from retrieved articles also reviewed",
    {'h': 'Statistical Software', 'size': 16},
    "Review Manager 5.3 (RevMan) used for all meta-analyses",
    "Fixed-effects model: I² < 50% | Random-effects model: I² ≥ 50%",
    "  Heterogeneity assessed by I² test at α = 0.1",
    "Continuous data: WMD or SMD with 95% CI",
    "Dichotomous data: Risk Ratio (RR) with 95% CI",
    "Subgroup analysis based on formulation of lidocaine solution",
    "Sensitivity analysis performed to identify source of heterogeneity",
], 0.3, 1.2, 12.8, 6.1, 13.5)

# ═══════════════════════════════════════════════════════════════
# SLIDE 6 — PRISMA Flow & Inclusion/Exclusion Criteria
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "PRISMA Flow & Inclusion/Exclusion Criteria", subtitle="Study Selection Process", accent=TEAL)

# Left panel — PRISMA flow as boxes
prisma = [
    ("67 records identified\n(PubMed:13, Cochrane:13, WoS:41)", NAVY),
    ("39 records after\nduplicates removed (n=28)", TEAL),
    ("14 records after title/abstract\nscreening (25 excluded)", TEAL),
    ("9 studies included\nin meta-analysis", GREEN),
]
for i, (txt, col) in enumerate(prisma):
    y = 1.3 + i * 1.35
    rect(sl, 0.3, y, 5.2, 1.1, col)
    tb(sl, txt, 0.35, y+0.05, 5.1, 1.0, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    if i < len(prisma)-1:
        tb(sl, '\u2193', 2.7, y+1.12, 0.6, 0.25, 16, bold=True, color=TEAL, align=PP_ALIGN.CENTER)

rect(sl, 5.7, 1.2, 0.04, 6.0, GOLD)

# Right panel — Inclusion/Exclusion
tb(sl, "Inclusion Criteria", 5.9, 1.25, 7.2, 0.45, 15, bold=True, color=GREEN)
inc = [
    "Prospective RCTs comparing articaine vs lidocaine for LTME",
    "  ≥1/3 teeth required flap opening, bone removal or tooth sectioning",
    "  Outcomes: SRA, SOA, OOA, DTA, IPA",
    "  Single anesthetic type per group (no mixed injections)",
    "  Published 2005 onwards",
]
bullets(sl, inc, 5.9, 1.72, 7.2, 2.3, 12.5)

tb(sl, "Exclusion Criteria", 5.9, 4.1, 7.2, 0.45, 15, bold=True, color=RED)
exc = [
    "Case reports, reviews, cohort studies, non-RCTs",
    "Participants: pregnant, on interfering medication, allergy to LA",
    "  BP: systolic >140 or <90 mmHg; diastolic >90 or <60 mmHg",
    "  Unable to follow instructions/cooperate",
    "Duplicate publications (less well-described excluded)",
    "Completely inconsistent injection methods between groups",
]
bullets(sl, exc, 5.9, 4.55, 7.2, 2.65, 12.5)

# ═══════════════════════════════════════════════════════════════
# SLIDE 7 — Included Studies Summary
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Included Studies — Characteristics", subtitle="9 RCTs | 493 Patients | 770 Lower Third Molar Extractions", accent=TEAL)

set_bg(sl, LIGHT_GREY)
rect(sl, 0, 0, 13.333, 1.05, NAVY)
rect(sl, 0, 1.05, 13.333, 0.055, TEAL)
tb(sl, "Included Studies — Characteristics", 0.25, 0.05, 12.8, 0.85, 24, bold=True, color=WHITE)
tb(sl, "9 RCTs | 493 Patients | 770 Lower Third Molar Extractions", 0.25, 0.7, 12.8, 0.38, 12, bold=False, color=GOLD)
rect(sl, 0, 1.1, 0.06, 6.4, TEAL)

# Table headers
hdrs  = ["Study (Year)", "N (pts)", "Age", "Articaine", "Lidocaine", "Injection", "Outcomes Assessed"]
h_w   = [2.0, 0.9, 1.1, 1.35, 1.35, 1.35, 4.9]
h_x   = [0.15]
for w in h_w[:-1]:
    h_x.append(h_x[-1]+w+0.02)

for hd, w, x in zip(hdrs, h_w, h_x):
    rect(sl, x, 1.18, w, 0.45, NAVY)
    tb(sl, hd, x+0.03, 1.19, w-0.06, 0.42, 10, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

rows_data = [
    ["Boonsiriseth 2017", "80", "NR", "4A100", "4L100", "IANB+BB+BL", "SRA,SOA,OOA,DTA,IPA"],
    ["Jain 2016",         "50", "NR", "4A100", "2L80",  "IANB",        "SRA,SOA,IPA"],
    ["Kambalimath 2013",  "30", "25.8","4A100","2L100",  "IANB",        "SRA,SOA,OOA,DTA,IPA"],
    ["Martinez 2012",     "96", "18-45","4A100","2L100", "IANB+BB",     "SOA,DTA"],
    ["Shruthi 2013",      "50", "20-30","4A100","2L100", "IANB",        "SOA,DTA"],
    ["Sierra 2007",       "27", "23.7","4A100", "2L100", "IANB+IB",     "SRA,SOA,DTA,IPA"],
    ["Silva 2012",        "20", "23.3","4A100", "2L100", "IANB+B",      "SOA"],
    ["Zhang 2017",        "98", "24.7","4A100", "2L80",  "IANB+IB",     "SOA,IPA"],
    ["Tae-Yun 2010",      "80", "24",  "4A100", "2L100", "IANB+BB+BL",  "SRA,SOA,DTA,IPA"],
]
row_bgs = [PALE_TEAL, PALE_NAVY]
for ri, row in enumerate(rows_data):
    y = 1.67 + ri * 0.57
    bg = row_bgs[ri % 2]
    for cell, w, x in zip(row, h_w, h_x):
        rect(sl, x, y, w, 0.55, bg)
        tb(sl, cell, x+0.03, y+0.02, w-0.06, 0.5, 10, bold=False, color=DARK_TEXT, align=PP_ALIGN.CENTER)

tb(sl, "4A100 = 4% articaine + 1:100,000 epi  |  2L100 = 2% lidocaine + 1:100,000 epi  |  2L80 = 2% lidocaine + 1:80,000 epi  |  4L100 = 4% lidocaine + 1:100,000 epi",
   0.15, 7.22, 13.0, 0.28, 9, bold=False, color=MUTED, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 8 — Quality Assessment
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Quality Assessment — Cochrane Risk of Bias Tool", subtitle="7 Criteria Evaluated per Study", accent=TEAL)

bullets(sl, [
    {'h': 'Cochrane Collaboration Risk of Bias Tool (7 Criteria)', 'size': 15},
    "1. Random sequence generation",
    "2. Allocation concealment",
    "3. Blinding of participants and personnel",
    "4. Blinding of outcome assessment",
    "5. Incomplete outcome data (attrition bias)",
    "6. Selective reporting (reporting bias)",
    "7. Other sources of bias",
    {'h': 'Overall Quality Assessment', 'size': 15},
    "Two reviewers independently assessed all included studies",
    "  Most studies had LOW risk of bias for sequence generation",
    "  Allocation concealment: LOW–UNCLEAR across studies",
    "  Blinding: Variable (double-blind in most, NR in some)",
    "  Incomplete outcome data: LOW in majority",
    "Quality assessment illustrated via Cochrane risk of bias summary (Figure 2 in paper)",
], 0.3, 1.2, 8.0, 6.0, 13.5)

# Risk of bias legend box
rect(sl, 8.5, 1.4, 4.6, 3.8, WHITE)
rect(sl, 8.5, 1.4, 4.6, 0.04, TEAL)
tb(sl, "Risk of Bias Legend", 8.6, 1.45, 4.4, 0.45, 13, bold=True, color=NAVY)
legend = [
    (GREEN, "Low risk of bias"),
    (GOLD,  "Unclear risk of bias"),
    (RED,   "High risk of bias"),
]
for i, (col, lbl) in enumerate(legend):
    y = 1.98 + i * 0.7
    rect(sl, 8.65, y, 0.45, 0.42, col)
    tb(sl, lbl, 9.2, y+0.05, 3.8, 0.4, 12.5, bold=False, color=DARK_TEXT)

tb(sl, "Note: Study quality was generally acceptable;\nhigh heterogeneity was present for several outcomes.",
   8.5, 3.6, 4.6, 1.3, 12, bold=False, color=MUTED)

# ═══════════════════════════════════════════════════════════════
# SLIDE 9 — Results: SRA
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Results — Success Rate of Anesthesia (SRA)", subtitle="Did articaine achieve higher success rates than lidocaine?", accent=GREEN)
rect(sl, 0, 1.1, 0.06, 6.4, GREEN)

bullets(sl, [
    {'h': 'Studies Included in SRA Analysis', 'size': 15, 'color': NAVY},
    "5 studies (Boonsiriseth, Jain, Kambalimath, Sierra, Tae-Yun)",
    "  Articaine group: n = 197  |  Lidocaine group: n = 191",
    "  Definition: No need for re-anesthesia or additional injection for the entire LTME procedure",
    {'h': 'Pooled Statistical Result', 'size': 15, 'color': NAVY},
    "Risk Ratio (RR): 1.10",
    "  95% CI: 1.01 to 1.21",
    "  P = 0.03  →  STATISTICALLY SIGNIFICANT",
    "  Heterogeneity: I² = 0%, P = 0.88  →  LOW heterogeneity (fixed-effects model used)",
    {'h': 'Interpretation', 'size': 15, 'color': NAVY},
    "Articaine had a 10% higher success rate than lidocaine for LTME",
    "  Every 10 patients: ~1 extra successful case with articaine vs lidocaine",
    "  This is a statistically and clinically meaningful difference in surgical anesthesia",
], 0.3, 1.2, 7.8, 6.0, 13.5)

# Stat box
rect(sl, 8.3, 1.3, 4.8, 3.5, NAVY)
tb(sl, "KEY STATISTIC", 8.4, 1.35, 4.6, 0.5, 14, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
tb(sl, "SRA", 8.4, 1.8, 4.6, 0.7, 28, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(sl, "RR = 1.10", 8.4, 2.4, 4.6, 0.65, 22, bold=True, color=GOLD, align=PP_ALIGN.CENTER)
tb(sl, "(95% CI: 1.01–1.21)", 8.4, 2.95, 4.6, 0.5, 14, bold=False, color=RGBColor(0xCC,0xDD,0xFF), align=PP_ALIGN.CENTER)
tb(sl, "P = 0.03  ✓ Significant", 8.4, 3.42, 4.6, 0.5, 14, bold=True, color=GREEN, align=PP_ALIGN.CENTER)
rect(sl, 8.3, 4.85, 4.8, 1.8, PALE_TEAL)
tb(sl, "Conclusion:\nArticaine shows significantly\nhigher anesthesia success\nrate than lidocaine for LTME",
   8.4, 4.9, 4.6, 1.65, 12.5, bold=False, color=NAVY, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 10 — Results: SOA & OOA
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Results — Onset Time of Anesthesia (SOA & OOA)", subtitle="Subjective & Objective Onset Time", accent=TEAL)

# Left half — SOA
rect(sl, 0.15, 1.2, 6.3, 6.1, WHITE)
rect(sl, 0.15, 1.2, 6.3, 0.04, TEAL)
tb(sl, "SOA — Subjective Onset Time", 0.25, 1.25, 6.1, 0.5, 15, bold=True, color=NAVY)
bullets(sl, [
    "9 studies included in SOA analysis",
    "  Articaine group: n = 410  |  Lidocaine group: n = 404",
    {'h': 'Result (Subgroup Analysis):', 'size': 13, 'color': TEAL},
    "SMD = 1.20 (standardized mean difference)",
    "  95% CI: 0.50 to 1.89",
    "  P = 0.0007  →  SIGNIFICANT",
    "  Articaine had SHORTER subjective onset",
    {'h': 'Heterogeneity:', 'size': 13, 'color': RED},
    "I² = 94%, P < 0.00001  →  HIGH heterogeneity",
    "  Sensitivity analysis: no obvious outlier",
    "  Likely due to different dosages used across studies",
    "  Subgroups: 4L100, 2L80, 2L100",
], 0.25, 1.78, 6.0, 5.3, 12.5)

# Right half — OOA
rect(sl, 6.85, 1.2, 6.3, 6.1, WHITE)
rect(sl, 6.85, 1.2, 6.3, 0.04, RGBColor(0x7B,0x1F,0xA2))
tb(sl, "OOA — Objective Onset Time", 6.95, 1.25, 6.1, 0.5, 15, bold=True, color=NAVY)
bullets(sl, [
    "Only 2 studies reported OOA (Boonsiriseth, Kambalimath)",
    "  Different definitions → SMD used as statistical method",
    "  Boonsiriseth: based on lower lip",
    "  Kambalimath: pinprick test on molar lingual vestibule",
    {'h': 'Result:', 'size': 13, 'color': RGBColor(0x7B,0x1F,0xA2)},
    "SMD = 0.44",
    "  95% CI: -0.39 to 1.26",
    "  P = 0.30  →  NOT SIGNIFICANT",
    "  Articaine slightly shorter — but not statistically different",
    {'h': 'Heterogeneity:', 'size': 13, 'color': RED},
    "I² = 76%, P = 0.04  →  HIGH heterogeneity",
    "  Insufficient studies to draw firm conclusions on OOA",
], 6.95, 1.78, 6.0, 5.3, 12.5)

rect(sl, 6.6, 1.2, 0.04, 6.1, GOLD)

# ═══════════════════════════════════════════════════════════════
# SLIDE 11 — Results: DTA
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Results — Duration of Anesthesia (DTA)", subtitle="How long did anesthesia last with articaine vs lidocaine?", accent=RGBColor(0xE6,0x51,0x00))
rect(sl, 0, 1.1, 0.06, 6.4, RGBColor(0xE6,0x51,0x00))

bullets(sl, [
    {'h': 'Studies Included in DTA Analysis', 'size': 15, 'color': NAVY},
    "7 studies (Boonsiriseth, Jain, Kambalimath, Martinez, Shruthi, Sierra, Tae-Yun)",
    "  Articaine group: n = 318  |  Lidocaine group: n = 312",
    "  Consistent definition: time from initial anesthesia perception to fade — MD used",
    {'h': 'Pooled Statistical Result', 'size': 15, 'color': NAVY},
    "Mean Difference (MD): +0.83 hours longer with articaine",
    "  95% CI: 0.59 to 1.07 hours",
    "  P < 0.00001  →  STATISTICALLY SIGNIFICANT",
    "  Heterogeneity: I² = 90%, P < 0.00001  →  HIGH",
    "  After excluding Sierra et al.: I² decreased substantially (fixed-effects model applicable)",
    {'h': 'Interpretation', 'size': 15, 'color': NAVY},
    "Articaine provides ~50 minutes longer anesthesia duration vs lidocaine",
    "  Clinically meaningful for longer/complex LTME surgeries",
    "  Greater lipid-solubility + tighter sodium channel binding → slower release",
    "  Higher concentration (4%) also contributes to longer duration",
], 0.3, 1.2, 7.8, 6.0, 13.5)

rect(sl, 8.3, 1.3, 4.8, 5.8, RGBColor(0xFF, 0xF3, 0xE0))
rect(sl, 8.3, 1.3, 4.8, 0.04, RGBColor(0xE6,0x51,0x00))
tb(sl, "DTA KEY FINDING", 8.4, 1.35, 4.6, 0.5, 14, bold=True, color=RGBColor(0xE6,0x51,0x00), align=PP_ALIGN.CENTER)
tb(sl, "MD = +0.83 hrs", 8.4, 1.82, 4.6, 0.7, 24, bold=True, color=NAVY, align=PP_ALIGN.CENTER)
tb(sl, "(~50 minutes longer)", 8.4, 2.45, 4.6, 0.45, 14, bold=False, color=MUTED, align=PP_ALIGN.CENTER)
tb(sl, "95% CI: 0.59–1.07 h", 8.4, 2.88, 4.6, 0.45, 13, bold=False, color=DARK_TEXT, align=PP_ALIGN.CENTER)
tb(sl, "P < 0.00001  ✓", 8.4, 3.3, 4.6, 0.45, 14, bold=True, color=GREEN, align=PP_ALIGN.CENTER)
tb(sl, "Why longer duration?\n\u2022 Thiophene ring → lipid solubility\n\u2022 Tighter Na⁺ channel binding\n\u2022 Slower anesthetic release\n\u2022 Higher concentration (4% vs 2%)",
   8.4, 3.85, 4.6, 2.9, 12, bold=False, color=DARK_TEXT)

# ═══════════════════════════════════════════════════════════════
# SLIDE 12 — Results: IPA
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Results — Intra-operative Pain Assessment (IPA)", subtitle="VAS Score During Surgery (mm) — Articaine vs Lidocaine", accent=RED)
rect(sl, 0, 1.1, 0.06, 6.4, RED)

bullets(sl, [
    {'h': 'Studies Included in IPA Analysis', 'size': 15, 'color': NAVY},
    "6 studies (Boonsiriseth, Jain, Kambalimath, Sierra, Zhang, Tae-Yun)",
    "  Articaine group: n = 294  |  Lidocaine group: n = 289",
    "  Boonsiriseth: averaged VAS scores from incision to suture as representative value",
    {'h': 'Pooled Statistical Result', 'size': 15, 'color': NAVY},
    "Mean Difference (MD): 3.12 mm lower IPA with articaine",
    "  95% CI: -0.13 to 6.37 mm",
    "  P = 0.06  →  NOT STATISTICALLY SIGNIFICANT (borderline)",
    "  Heterogeneity: I² = 87%, P < 0.00001  →  HIGH",
    {'h': 'Sensitivity Analysis', 'size': 15, 'color': NAVY},
    "Excluded Sierra et al. (missing data for 1 patient in articaine group)",
    "  2L100 subgroup heterogeneity dropped (I² = 4%, P = 0.35)",
    "  BUT overall pooled result unchanged: MD = -4.24mm, P = 0.06",
    "  Total heterogeneity remained high (I² = 85%)",
    "  Subgroup differences appear to be the main source of heterogeneity",
    {'h': 'Interpretation', 'size': 15, 'color': NAVY},
    "Numerically lower pain scores with articaine — but no significant difference",
    "  Different formulations and dosages limit interpretation",
], 0.3, 1.2, 8.2, 6.0, 13)

rect(sl, 8.7, 1.3, 4.4, 3.8, RGBColor(0xFF, 0xEB, 0xEE))
rect(sl, 8.7, 1.3, 4.4, 0.04, RED)
tb(sl, "IPA RESULT", 8.8, 1.35, 4.2, 0.5, 14, bold=True, color=RED, align=PP_ALIGN.CENTER)
tb(sl, "MD = 3.12 mm\n(in favour of articaine)", 8.8, 1.82, 4.2, 0.9, 18, bold=True, color=NAVY, align=PP_ALIGN.CENTER)
tb(sl, "95% CI: -0.13 to 6.37", 8.8, 2.65, 4.2, 0.45, 13, bold=False, color=DARK_TEXT, align=PP_ALIGN.CENTER)
tb(sl, "P = 0.06  ✗ Not significant", 8.8, 3.08, 4.2, 0.45, 13, bold=True, color=RED, align=PP_ALIGN.CENTER)
tb(sl, "VAS scale: 0–100 mm\n0 = no pain\n100 = worst pain",
   8.8, 3.65, 4.2, 1.2, 12, bold=False, color=MUTED, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 13 — Summary of Results
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Summary of Results", subtitle="All 5 Outcomes at a Glance", accent=NAVY)

set_bg(sl, LIGHT_GREY)
rect(sl, 0, 0, 13.333, 1.05, NAVY)
rect(sl, 0, 1.05, 13.333, 0.055, TEAL)
tb(sl, "Summary of Results — All 5 Outcomes", 0.25, 0.05, 12.8, 0.85, 24, bold=True, color=WHITE)
tb(sl, "All 5 Outcomes at a Glance", 0.25, 0.7, 12.8, 0.38, 12, bold=False, color=GOLD)
rect(sl, 0, 1.1, 0.06, 6.4, TEAL)

tbl_hdrs = ["Outcome", "Studies (n)", "Sample", "Effect Size", "95% CI", "P-value", "Significance", "Favors"]
col_ws   = [1.5, 1.1, 1.1, 1.6, 1.75, 0.9, 1.3, 1.35]
col_xs   = [0.15]
for w in col_ws[:-1]:
    col_xs.append(col_xs[-1]+w+0.02)

for h, w, x in zip(tbl_hdrs, col_ws, col_xs):
    rect(sl, x, 1.18, w, 0.5, NAVY)
    tb(sl, h, x+0.03, 1.19, w-0.06, 0.47, 10, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

results = [
    ["SRA",  "5",  "n=388/382", "RR = 1.10",     "1.01–1.21",    "0.03",      "✓ Significant",    "Articaine"],
    ["SOA",  "9",  "n=410/404", "SMD = 1.20",     "0.50–1.89",    "0.0007",    "✓ Significant",    "Articaine"],
    ["OOA",  "2",  "n=80/77",   "SMD = 0.44",     "-0.39–1.26",   "0.30",      "✗ Not sig.",        "—"],
    ["DTA",  "7",  "n=318/312", "MD = +0.83 h",   "0.59–1.07 h",  "<0.00001",  "✓ Significant",    "Articaine"],
    ["IPA",  "6",  "n=294/289", "MD = 3.12 mm",   "-0.13–6.37",   "0.06",      "✗ Not sig.",        "—"],
]
row_bgs2 = [PALE_TEAL, PALE_NAVY]
sig_colors = {True: GREEN, False: RED}
for ri, row in enumerate(results):
    y = 1.72 + ri * 0.88
    bg = row_bgs2[ri%2]
    is_sig = "✓" in row[6]
    for ci, (cell, w, x) in enumerate(zip(row, col_ws, col_xs)):
        bg2 = bg
        fcol = DARK_TEXT
        if ci == 6:
            bg2 = RGBColor(0xE8,0xF5,0xE9) if is_sig else RGBColor(0xFF,0xEB,0xEE)
            fcol = GREEN if is_sig else RED
        elif ci == 7:
            fcol = GREEN if cell == "Articaine" else MUTED
        rect(sl, x, y, w, 0.84, bg2)
        tb(sl, cell, x+0.03, y+0.1, w-0.06, 0.7, 11 if ci > 3 else 12,
           bold=(ci==0 or ci==6), color=fcol, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 14 — Discussion
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Discussion", subtitle="Mechanism, Clinical Implications & Safety", accent=TEAL)
bullets(sl, [
    {'h': 'Pharmacological Basis for Articaine Superiority', 'size': 15},
    "Thiophene ring (vs benzene in lidocaine) → greater lipid-solubility → better nerve sheath diffusion",
    "  Faster potency onset + higher success rate of anesthesia",
    "Tighter binding to Na⁺ channel receptor sites → slower release → longer duration",
    "4% concentration (higher than 2% lidocaine) also contributes to efficacy",
    {'h': 'Why Higher Heterogeneity?', 'size': 15},
    "Different formulations of lidocaine used: 4L100, 2L100, 2L80",
    "  Different dosages of both drugs across studies",
    "  Higher volume → higher concentration in pterygomandibular space → more efficacy",
    "Various confounders: age, gender, smoking, baseline anxiety not uniformly reported",
    {'h': 'Safety Considerations', 'size': 15},
    "Malamed 2001: 4% articaine + 1:100,000 epi is SAFE in dental practice (no sig. diff from lidocaine)",
    "  BUT: Hillerup 2011 — neurosensory disturbances overrepresented with 4% articaine for IANB",
    "Hemodynamic effects (BP, HR) similar between both — mainly determined by epinephrine concentration",
    "Cost: Articaine is MORE expensive than lidocaine",
    {'h': 'Why Not Replace Lidocaine?', 'size': 15},
    "Articaine superior in SRA, SOA, DTA — but neurotoxicity concern for IANB",
    "  Lidocaine remains standard for IANB — articaine superiority does not override safety/cost",
], 0.3, 1.2, 12.8, 6.0, 13)

# ═══════════════════════════════════════════════════════════════
# SLIDE 15 — Limitations
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Limitations of the Study", accent=RED)
rect(sl, 0, 1.1, 0.06, 6.4, RED)

bullets(sl, [
    {'h': 'Methodological Limitations', 'size': 15, 'color': RED},
    "High heterogeneity (I²>50%) for SOA, OOA, DTA, IPA — limits reliability of pooled estimates",
    "  Different formulations of lidocaine (4L100, 2L100, 2L80) across studies",
    "  Variation in dosage volume (affects pterygomandibular space concentration)",
    "  Differences in surgical difficulty and anesthesia baseline not standardised",
    {'h': 'Sample & Study Limitations', 'size': 15, 'color': RED},
    "Small sample sizes in several included studies (n=20 to n=98)",
    "Only 9 studies met inclusion criteria; some outcomes had only 2 studies",
    "  OOA: only 2 studies — insufficient to draw conclusions",
    "Language bias: 1 Chinese, 1 Korean study included (translation issues possible)",
    {'h': 'Scope Limitations', 'size': 15, 'color': RED},
    "Limited to IANB only — could not explore effect of injection method (IANB vs infiltration)",
    "  Huang et al.: articaine infiltration > lidocaine block — but too few studies to include",
    "Safety, cost, and non-anesthetic factors not assessed in this review",
    "  'We cannot recommend articaine to supplant lidocaine for IANB'",
    "Confounders (age, gender, smoking) not analysed — not uniformly reported in included studies",
    {'h': 'Publication Bias', 'size': 15, 'color': RED},
    "Funnel plot analysis not reported — potential publication bias cannot be excluded",
], 0.3, 1.2, 12.8, 6.0, 13)

# ═══════════════════════════════════════════════════════════════
# SLIDE 16 — Conclusion
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, NAVY)
rect(sl, 0, 0, 13.333, 7.5, NAVY)
rect(sl, 0, 1.0, 13.333, 0.07, GOLD)
rect(sl, 0, 6.7, 13.333, 0.07, GOLD)
rect(sl, 0, 0, 0.12, 7.5, TEAL)

tb(sl, "Conclusion", 0.3, 0.15, 12.8, 0.75, 26, bold=True, color=GOLD, align=PP_ALIGN.CENTER)

concs = [
    ("SRA ✓", "Articaine → significantly HIGHER success rate (RR=1.10, P=0.03)", GREEN),
    ("SOA ✓", "Articaine → significantly SHORTER subjective onset (SMD=1.20, P=0.0007)", GREEN),
    ("DTA ✓", "Articaine → significantly LONGER duration (+0.83h, P<0.00001)", GREEN),
    ("OOA ✗", "No significant difference in objective onset (P=0.30)", RED),
    ("IPA ✗",  "No significant difference in intra-operative pain (P=0.06)", RED),
]
for i, (abbr, text, col) in enumerate(concs):
    y = 1.22 + i * 0.97
    rect(sl, 0.3, y, 1.3, 0.75, col)
    tb(sl, abbr, 0.35, y+0.06, 1.2, 0.65, 15, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    rect(sl, 1.65, y, 11.4, 0.75, RGBColor(0x14, 0x38, 0x7A))
    tb(sl, text, 1.75, y+0.08, 11.2, 0.65, 14, bold=False, color=WHITE, align=PP_ALIGN.LEFT)

tb(sl, "Overall Conclusion:",
   0.3, 6.07, 12.8, 0.45, 14, bold=True, color=GOLD, align=PP_ALIGN.LEFT)
tb(sl, "4% Articaine has superior anesthetic efficiency for LTME, but CANNOT replace lidocaine as standard for IANB due to neurotoxicity concerns.",
   0.3, 6.42, 12.8, 0.45, 13, bold=False, color=WHITE, align=PP_ALIGN.LEFT)

# ═══════════════════════════════════════════════════════════════
# SLIDE 17 — Critical Appraisal
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header(sl, "Critical Appraisal", subtitle="Strengths, Weaknesses & Clinical Relevance", accent=TEAL)

# Strengths
rect(sl, 0.15, 1.2, 6.15, 5.8, WHITE)
rect(sl, 0.15, 1.2, 6.15, 0.06, GREEN)
tb(sl, "Strengths", 0.25, 1.27, 5.95, 0.5, 15, bold=True, color=GREEN)
bullets(sl, [
    "Rigorous PRISMA-compliant systematic search (3 databases)",
    "Dual independent reviewer design for search and data extraction",
    "Cochrane risk of bias tool applied",
    "Subgroup + sensitivity analyses performed",
    "Multiple clinically relevant outcomes assessed (5 indexes)",
    "No language restriction — included Chinese and Korean studies",
    "First meta-analysis specifically for LTME context",
], 0.25, 1.77, 5.95, 4.95, 12.5)

rect(sl, 6.8, 1.2, 6.3, 5.8, WHITE)
rect(sl, 6.8, 1.2, 6.3, 0.06, RED)
tb(sl, "Weaknesses", 6.9, 1.27, 6.1, 0.5, 15, bold=True, color=RED)
bullets(sl, [
    "High heterogeneity for most outcomes (I²=76–94%)",
    "Small number of studies for OOA (n=2)",
    "No assessment of publication bias (no funnel plot)",
    "Cannot address safety, neurotoxicity, cost",
    "Only IANB evaluated — not infiltration technique",
    "Confounders (dosage, age, sex) not meta-analysed",
    "Some trials had small sample sizes",
], 6.9, 1.77, 6.1, 4.95, 12.5)

rect(sl, 6.6, 1.2, 0.04, 5.8, GOLD)

tb(sl, "Clinical Take-Away: Articaine is effective and may be preferred for complex/prolonged LTME where longer duration and higher success rate are desired — but lidocaine remains the safer standard for routine IANB.",
   0.15, 7.08, 13.0, 0.4, 11.5, bold=False, color=MUTED, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 18 — Thank You / Discussion Prompt
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, NAVY)
rect(sl, 0, 0, 13.333, 7.5, NAVY)
rect(sl, 0, 0, 0.12, 7.5, GOLD)
rect(sl, 0, 4.3, 13.333, 0.07, TEAL)

tb(sl, "Thank You", 0.3, 0.5, 12.8, 1.1, 44, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(sl, "Open for Discussion", 0.3, 1.55, 12.8, 0.7, 22, bold=False, color=GOLD, align=PP_ALIGN.CENTER)

tb(sl, "Discussion Questions for the Group:", 0.4, 2.5, 12.5, 0.5, 15, bold=True, color=TEAL)
qs = [
    "1. Given the neurotoxicity risk of 4% articaine for IANB, in which clinical scenarios would you still choose articaine over lidocaine for lower third molar extraction?",
    "2. How does the high heterogeneity in this meta-analysis affect your confidence in applying these findings to your clinical practice?",
    "3. What future research design would you propose to resolve the remaining controversies (OOA, IPA, safety)?",
]
for i, q in enumerate(qs):
    y = 3.05 + i * 0.88
    rect(sl, 0.4, y, 12.5, 0.78, RGBColor(0x14,0x38,0x7A))
    tb(sl, q, 0.5, y+0.06, 12.3, 0.68, 12.5, bold=False, color=WHITE, align=PP_ALIGN.LEFT)

tb(sl, "Zhang A et al. J Oral Maxillofac Surg (2018) | doi: 10.1016/j.joms.2018.08.020",
   0.3, 7.1, 12.8, 0.35, 10, bold=False, color=MUTED, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SAVE
# ═══════════════════════════════════════════════════════════════
out = "/tmp/workspace/odontogenic-tumors/JournalClub_Articaine_vs_Lidocaine.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
    f.write(buf.getvalue())
print(f"Saved: {out}")
print(f"Total slides: {len(prs.slides)}")
Running Command

python /tmp/workspace/odontogenic-tumors/jc_ppt.py 2>&1

Your journal club presentation is ready!

JournalClub Articaine vs Lidocaine

Presentation · PPTX


What's inside — 18 slides, journal club format:

SlideContent
1Cover Slide — Title, authors, journal, DOI, presenter placeholder
2Presentation Outline — 13-point agenda in two columns
3Background & Rationale — LTME burden, lidocaine vs articaine, evidence gap
4Objectives — Primary aim + all 5 evaluation indexes (SRA, SOA, OOA, DTA, IPA) in visual boxes
5Study Design & Search Strategy — 3 databases, PRISMA, RevMan 5.3, statistical methods
6PRISMA Flow + Inclusion/Exclusion Criteria — Visual flow diagram + criteria
7Included Studies Table — All 9 RCTs with n, age, formulations, outcomes
8Quality Assessment — Cochrane risk of bias tool, 7 criteria
9Results: SRA — RR=1.10, 95%CI: 1.01–1.21, P=0.03 ✓
10Results: SOA & OOA — Split panel, SOA significant (P=0.0007), OOA not
11Results: DTA — MD=+0.83h (~50 min longer), P<0.00001 ✓
12Results: IPA — MD=3.12mm, P=0.06 ✗ (not significant)
13Summary Results Table — All 5 outcomes at a glance with color-coded significance
14Discussion — Mechanism, heterogeneity, safety (Hillerup neurotoxicity), cost
15Limitations — 6 key limitations clearly laid out
16Conclusion — Color-coded outcome-by-outcome summary (green = significant, red = not)
17Critical Appraisal — Strengths vs Weaknesses + clinical take-away
18Thank You / Discussion Prompts — 3 clinical discussion questions for the group
Design: Navy/teal/gold color scheme, professional journal club layout with data-driven stat boxes and color-coded significance indicators throughout.

make ppt on tumors arising from odontogenic epithelium with odontogenic ectomesenchyme and tumors arising from odontogenic ectomesenchyme with or without included odontogenic epithelium and malignant odontogenic tumors from shafers

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Reading File
Searching Images

ameloblastic fibroma histology odontogenic epithelium ectomesenchyme

High-power microscopic view of an odontogenic tumor. This hematoxylin and eosin stained section reveals discrete nests, strands, and buds of ameloblastic epithelium embedded in a cellular connective tissue stroma. Epithelial components show peripheral palisading of columnar to cuboidal cells with reverse polarity and loose central cells resembling stellate reticulum. The surrounding mesenchyme is densely cellular, with plump, spindle-shaped to ovoid cells and abundant ground substance, creating a fibrocellular background typical of dental papilla. There is no evident formation of mature enamel or dentin matrix in this field, supporting a diagnosis of ameloblastic fibroma rather than ameloblastoma or odontogenic fibroma. The architectural arrangement displays cohesive epithelial islands and anastomosing cords that insinuate between stromal trabeculae without frank invasion at this magnification. Clinically, these tumors arise in the jaw of younger patients and are generally benign, with treatment guided by their conservative management potential and recurrence risk. The image illustrates the hallmark histopathology: ameloblastic epithelium in a myxoid-to-fibrous stroma, minimal mitotic activity, and preserved stromal cohesion. This description aids educational understanding, differential diagnosis, and correlation with radiographic and clinical findings in odontogenic pathology. These features collectively aid pathologists and clinicians in confirmatory diagnosis, prognosis estimation, and decisions regarding excisional approach, curettage, or longer follow-up.

High-power microscopic view of an odontogenic tumor. This hematoxylin and eosin stained section reveals discrete nests, strands, and buds of ameloblastic epithelium embedded in a cellular connective tissue stroma. Epithelial components show peripheral palisading of columnar to cuboidal cells with reverse polarity and loose central cells resembling stellate reticulum. The surrounding mesenchyme is densely cellular, with plump, spindle-shaped to ovoid cells and abundant ground substance, creating a fibrocellular background typical of dental papilla. There is no evident formation of mature enamel or dentin matrix in this field, supporting a diagnosis of ameloblastic fibroma rather than ameloblastoma or odontogenic fibroma. The architectural arrangement displays cohesive epithelial islands and anastomosing cords that insinuate between stromal trabeculae without frank invasion at this magnification. Clinically, these tumors arise in the jaw of younger patients and are generally benign, with treatment guided by their conservative management potential and recurrence risk. The image illustrates the hallmark histopathology: ameloblastic epithelium in a myxoid-to-fibrous stroma, minimal mitotic activity, and preserved stromal cohesion. This description aids educational understanding, differential diagnosis, and correlation with radiographic and clinical findings in odontogenic pathology. These features collectively aid pathologists and clinicians in confirmatory diagnosis, prognosis estimation, and decisions regarding excisional approach, curettage, or longer follow-up.

This case depicts a pediatric mandible odontogenic tumor analyzed by light microscopy on an H&E-stained slide. The specimen originates from a well-circumscribed, radiolucent expansile mass in the right mandible of a 12-year-old male, grossly described as pink-tan with a gelatinous, whorled surface. At low-power magnification, multiple islands and cords of odontogenic epithelium arise within a densely cellular fibroblastic stroma. Epithelial nests exhibit features characteristic of ameloblastic differentiation: peripheral tall columnar cells with reverse polarity, nuclei oriented away from the basement membrane, and loose, stellate reticulum-like central areas within some nests. The stromal component is richly vascularized and fibrous, lacking glandular or keratinizing differentiation. There is no evidence of dental hard tissue formation (no dentin or enamel matrix within islands). Mitotic activity is minimal and cytologic atypia is absent, consistent with a benign neoplasm. Clinically, the lesion tends to present in children or adolescents with jaw swelling or asymptomatic radiolucency and shows a propensity for jaw expansion in the posterior mandible. The diagnostic significance lies in distinguishing ameloblastic fibroma from more aggressive odontogenic tumors such as ameloblastoma; management typically involves curettage or conservative resection with careful follow-up due to recurrence risk. This image supports a pathologic correlation for odontogenic tumor biology, with educational relevance for dental pathology and oral surgery.

This case depicts a pediatric mandible odontogenic tumor analyzed by light microscopy on an H&E-stained slide. The specimen originates from a well-circumscribed, radiolucent expansile mass in the right mandible of a 12-year-old male, grossly described as pink-tan with a gelatinous, whorled surface. At low-power magnification, multiple islands and cords of odontogenic epithelium arise within a densely cellular fibroblastic stroma. Epithelial nests exhibit features characteristic of ameloblastic differentiation: peripheral tall columnar cells with reverse polarity, nuclei oriented away from the basement membrane, and loose, stellate reticulum-like central areas within some nests. The stromal component is richly vascularized and fibrous, lacking glandular or keratinizing differentiation. There is no evidence of dental hard tissue formation (no dentin or enamel matrix within islands). Mitotic activity is minimal and cytologic atypia is absent, consistent with a benign neoplasm. Clinically, the lesion tends to present in children or adolescents with jaw swelling or asymptomatic radiolucency and shows a propensity for jaw expansion in the posterior mandible. The diagnostic significance lies in distinguishing ameloblastic fibroma from more aggressive odontogenic tumors such as ameloblastoma; management typically involves curettage or conservative resection with careful follow-up due to recurrence risk. This image supports a pathologic correlation for odontogenic tumor biology, with educational relevance for dental pathology and oral surgery.

Reading File
Searching Images

odontogenic myxoma jaw radiology histology

Light microscopic histopathology of a desmoplastic ameloblastoma. Imaging modality: Brightfield hematoxylin-eosin stained tissue section, scanned at low-to-intermediate magnification to reveal structural context within the jaw bone. The tumor shows islands, cords, and narrow strands of odontogenic epithelium embedded in a densely collagenized, fibrous stroma (desmoplasia). Epithelial nests consist of cuboidal to columnar cells with scant cytoplasm and hyperchromatic nuclei; peripheral basaloid cells may exhibit loose alignment rather than classic palisading. Central regions lack a prominent stellate reticulum, consistent with desmoplastic morphology. Surrounding stroma is markedly hyalinized and densely fibrous, often with wedge-shaped or kite-like stromal condensations that compress adjacent osseous trabeculae. Occasional chondro-osseous metaplasia or calcifications can be seen, though not obligatory. The lesion is typically benign, slow growing, and locally invasive, with no malignant cytology evident in this field. Immunoprofile is supportive but not decisive; transforming growth factor beta driven desmoplasia contributes to the sclerotic background. Clinically, desmoplastic ameloblastoma may present as a mixed radiolucent-radiopaque jaw lesion, frequently in anterior mandible. Recurrent behavior is possible without wide local excision. This histology helps distinguish the desmoplastic variant from follicular or plexiform patterns and guides surgical planning and prognosis. Correlative radiology and clinicopathologic data enhance diagnostic confidence and treatment planning for jaw lesions.

Light microscopic histopathology of a desmoplastic ameloblastoma. Imaging modality: Brightfield hematoxylin-eosin stained tissue section, scanned at low-to-intermediate magnification to reveal structural context within the jaw bone. The tumor shows islands, cords, and narrow strands of odontogenic epithelium embedded in a densely collagenized, fibrous stroma (desmoplasia). Epithelial nests consist of cuboidal to columnar cells with scant cytoplasm and hyperchromatic nuclei; peripheral basaloid cells may exhibit loose alignment rather than classic palisading. Central regions lack a prominent stellate reticulum, consistent with desmoplastic morphology. Surrounding stroma is markedly hyalinized and densely fibrous, often with wedge-shaped or kite-like stromal condensations that compress adjacent osseous trabeculae. Occasional chondro-osseous metaplasia or calcifications can be seen, though not obligatory. The lesion is typically benign, slow growing, and locally invasive, with no malignant cytology evident in this field. Immunoprofile is supportive but not decisive; transforming growth factor beta driven desmoplasia contributes to the sclerotic background. Clinically, desmoplastic ameloblastoma may present as a mixed radiolucent-radiopaque jaw lesion, frequently in anterior mandible. Recurrent behavior is possible without wide local excision. This histology helps distinguish the desmoplastic variant from follicular or plexiform patterns and guides surgical planning and prognosis. Correlative radiology and clinicopathologic data enhance diagnostic confidence and treatment planning for jaw lesions.

Two-panel clinical photograph demonstrating a pediatric patient with an odontogenic myxoma, comparing preoperative and postoperative states. The top panel (preoperative view) shows a massive, expansile mass originating from the jaw, causing severe midfacial and mandibular asymmetry. The swelling distorts the oral cavity, displacing the lips and exhibiting an intraoral component that has splayed and displaced the teeth. The tumor surface appears smooth but exerts significant mass effect on the nose and cheek. The bottom panel (postoperative view) illustrates the results following radical jaw resection. There is a marked reduction in facial volume and restoration of a more functional facial contour, although some residual asymmetry and surgical scarring are visible. This comparison highlights the aggressive growth of central myxomas and the efficacy of surgical intervention in managing large orofacial tumors in pediatric patients. The images are essential for teaching clinical manifestations of odontogenic tumors and the outcomes of reconstructive maxillofacial surgery.

Two-panel clinical photograph demonstrating a pediatric patient with an odontogenic myxoma, comparing preoperative and postoperative states. The top panel (preoperative view) shows a massive, expansile mass originating from the jaw, causing severe midfacial and mandibular asymmetry. The swelling distorts the oral cavity, displacing the lips and exhibiting an intraoral component that has splayed and displaced the teeth. The tumor surface appears smooth but exerts significant mass effect on the nose and cheek. The bottom panel (postoperative view) illustrates the results following radical jaw resection. There is a marked reduction in facial volume and restoration of a more functional facial contour, although some residual asymmetry and surgical scarring are visible. This comparison highlights the aggressive growth of central myxomas and the efficacy of surgical intervention in managing large orofacial tumors in pediatric patients. The images are essential for teaching clinical manifestations of odontogenic tumors and the outcomes of reconstructive maxillofacial surgery.

Searching Images

ameloblastic carcinoma malignant odontogenic tumor histology

This set of diagnostic images includes FDG-PET/CT scans demonstrating the metabolic activity of an ameloblastic carcinoma in the right maxilla. Panel A (coronal view) and Panel B (axial view) show a primary tumor in the right maxillary region exhibiting moderate 18F-fluorodeoxyglucose (FDG) uptake (SUVmax 5.6), indicating increased glucose metabolism compared to surrounding tissues. The images also reveal slight FDG uptake in the bilateral superior internal jugular nodes, suggestive of reactive changes or potential regional lymphadenopathy. Panel C displays a whole-body maximum intensity projection (MIP) or reconstructed coronal PET image, which shows normal physiological FDG distribution in the brain, heart, liver, kidneys, and bladder. No evidence of distant metastatic disease is visualized in the lungs, bone, or abdominal viscera. These images are used clinically to stage malignant odontogenic tumors by assessing both the local extent of the primary lesion and the presence of systemic spread.

This set of diagnostic images includes FDG-PET/CT scans demonstrating the metabolic activity of an ameloblastic carcinoma in the right maxilla. Panel A (coronal view) and Panel B (axial view) show a primary tumor in the right maxillary region exhibiting moderate 18F-fluorodeoxyglucose (FDG) uptake (SUVmax 5.6), indicating increased glucose metabolism compared to surrounding tissues. The images also reveal slight FDG uptake in the bilateral superior internal jugular nodes, suggestive of reactive changes or potential regional lymphadenopathy. Panel C displays a whole-body maximum intensity projection (MIP) or reconstructed coronal PET image, which shows normal physiological FDG distribution in the brain, heart, liver, kidneys, and bladder. No evidence of distant metastatic disease is visualized in the lungs, bone, or abdominal viscera. These images are used clinically to stage malignant odontogenic tumors by assessing both the local extent of the primary lesion and the presence of systemic spread.

This composite figure illustrates the radiological and histopathological progression of secondary ameloblastic carcinoma in the mandible. Radiographic images (A, D) are orthopantomograms (OPG) showing a large, multilocular radiolucent mass in the right mandibular body and ramus, characterized by 'soap bubble' bone destruction and root truncation of adjacent teeth. An axial Cone Beam Computed Tomography (CBCT) slice (E) demonstrates significant buccolingual cortical expansion and thinning. Histopathological slides with Hematoxylin and Eosin (H&E) staining at 200x (B) and 400x (C) magnifications reveal features of follicular ameloblastoma, including islands of odontogenic epithelium with peripheral columnar cells showing palisading nuclei and reverse polarity. High-magnification microscopy (F) indicates malignant transformation into ameloblastic carcinoma, evidenced by increased cellular atypia and pleomorphism. The final radiograph (G) displays the post-surgical result following radical mandibular resection and reconstruction using an iliac bone graft, showing successful integration of the transplant 4 years postoperatively. The collection highlights the transition from benign follicular ameloblastoma to malignant ameloblastic carcinoma and the surgical management of such odontogenic tumors.

This composite figure illustrates the radiological and histopathological progression of secondary ameloblastic carcinoma in the mandible. Radiographic images (A, D) are orthopantomograms (OPG) showing a large, multilocular radiolucent mass in the right mandibular body and ramus, characterized by 'soap bubble' bone destruction and root truncation of adjacent teeth. An axial Cone Beam Computed Tomography (CBCT) slice (E) demonstrates significant buccolingual cortical expansion and thinning. Histopathological slides with Hematoxylin and Eosin (H&E) staining at 200x (B) and 400x (C) magnifications reveal features of follicular ameloblastoma, including islands of odontogenic epithelium with peripheral columnar cells showing palisading nuclei and reverse polarity. High-magnification microscopy (F) indicates malignant transformation into ameloblastic carcinoma, evidenced by increased cellular atypia and pleomorphism. The final radiograph (G) displays the post-surgical result following radical mandibular resection and reconstruction using an iliac bone graft, showing successful integration of the transplant 4 years postoperatively. The collection highlights the transition from benign follicular ameloblastoma to malignant ameloblastic carcinoma and the surgical management of such odontogenic tumors.

I have all the content needed. Now let me build the comprehensive PPT.
Writing File

~/odontogenic-tumors/mixed_malignant_ppt.py

from io import BytesIO
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RGBColor
from pptx.enum.text import PP_ALIGN

# ── Palette ────────────────────────────────────────────────────
DEEP_MAROON  = RGBColor(0x6A, 0x00, 0x2E)
RUST         = RGBColor(0xB5, 0x45, 0x1B)
AMBER        = RGBColor(0xF5, 0xA6, 0x23)
WHITE        = RGBColor(0xFF, 0xFF, 0xFF)
DARK_TEXT    = RGBColor(0x1C, 0x2B, 0x3A)
MUTED        = RGBColor(0x5A, 0x6A, 0x7A)
LIGHT_BG     = RGBColor(0xFD, 0xF6, 0xF0)
PALE_RUST    = RGBColor(0xFD, 0xEC, 0xE1)
GREEN        = RGBColor(0x1A, 0x7A, 0x3C)
PALE_GREEN   = RGBColor(0xE8, 0xF5, 0xE9)
TEAL         = RGBColor(0x00, 0x69, 0x5C)
PALE_TEAL    = RGBColor(0xE0, 0xF4, 0xF1)
RED          = RGBColor(0xC0, 0x39, 0x2B)
PALE_RED     = RGBColor(0xFF, 0xEB, 0xEE)

# Section colors
SEC1_COL  = RGBColor(0x00, 0x57, 0x8A)   # Deep blue - Group I
SEC2_COL  = RGBColor(0x00, 0x69, 0x5C)   # Teal      - Group II
SEC3_COL  = RGBColor(0x8B, 0x00, 0x00)   # Dark red  - Group III (Malignant)
NAVY      = RGBColor(0x0D, 0x2B, 0x5E)

prs = Presentation()
prs.slide_width  = Inches(13.333)
prs.slide_height = Inches(7.5)
blank = prs.slide_layouts[6]

# ── Helpers ────────────────────────────────────────────────────
def set_bg(slide, color):
    bg = slide.background; fill = bg.fill
    fill.solid(); fill.fore_color.rgb = color

def rect(slide, l, t, w, h, color, line=False):
    s = slide.shapes.add_shape(1, Inches(l), Inches(t), Inches(w), Inches(h))
    s.fill.solid(); s.fill.fore_color.rgb = color
    if not line: s.line.fill.background()
    return s

def tb(slide, text, l, t, w, h, size, bold=False, italic=False,
       color=DARK_TEXT, align=PP_ALIGN.LEFT, wrap=True, font="Calibri"):
    box = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf = box.text_frame; tf.word_wrap = wrap
    tf.margin_left = Pt(3); tf.margin_right = Pt(3)
    tf.margin_top = Pt(2);  tf.margin_bottom = Pt(2)
    p = tf.paragraphs[0]; p.alignment = align
    r = p.add_run(); r.text = text
    r.font.size = Pt(size); r.font.bold = bold; r.font.italic = italic
    r.font.color.rgb = color; r.font.name = font
    return box

def header_slide(slide, title, subtitle=None, hcol=NAVY, accent=AMBER):
    set_bg(slide, LIGHT_BG)
    rect(slide, 0, 0, 13.333, 1.05, hcol)
    rect(slide, 0, 1.05, 13.333, 0.055, accent)
    rect(slide, 0, 1.1, 0.07, 6.4, accent)
    tb(slide, title, 0.25, 0.05, 12.8, 0.78, 24, bold=True, color=WHITE)
    if subtitle:
        tb(slide, subtitle, 0.25, 0.72, 12.8, 0.36, 12, bold=False, color=AMBER)

def bul(slide, items, l, t, w, h, base=13.5):
    box = slide.shapes.add_textbox(Inches(l), Inches(t), Inches(w), Inches(h))
    tf = box.text_frame; tf.word_wrap = True
    tf.margin_left = Pt(4); tf.margin_right = Pt(4)
    tf.margin_top = Pt(3);  tf.margin_bottom = Pt(3)
    first = True
    for item in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False; p.space_before = Pt(4); p.space_after = Pt(1)
        if isinstance(item, dict):
            r = p.add_run(); r.text = item['h']
            r.font.bold = True; r.font.size = Pt(item.get('sz', base+2))
            r.font.color.rgb = item.get('c', NAVY); r.font.name = "Calibri"
        else:
            indent = item.startswith('   ')
            r = p.add_run()
            r.text = ('\u25E6  ' if indent else '\u25CF  ') + item.lstrip()
            r.font.size = Pt(base - (1 if indent else 0))
            r.font.color.rgb = MUTED if indent else DARK_TEXT
            r.font.name = "Calibri"
    return tf

# feature box helper
def feat_box(slide, x, y, w, h, label, content_lines, hcol, bcol=None):
    if bcol is None: bcol = LIGHT_BG
    rect(slide, x, y, w, 0.48, hcol)
    tb(slide, label, x+0.08, y+0.04, w-0.16, 0.42, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    rect(slide, x, y+0.48, w, h-0.48, bcol)
    box = slide.shapes.add_textbox(Inches(x+0.08), Inches(y+0.52), Inches(w-0.16), Inches(h-0.6))
    tf = box.text_frame; tf.word_wrap = True
    tf.margin_left = Pt(3); tf.margin_right = Pt(3)
    tf.margin_top = Pt(2);  tf.margin_bottom = Pt(2)
    first = True
    for line in content_lines:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False; p.space_before = Pt(3)
        r = p.add_run(); r.text = u'\u2022 ' + line
        r.font.size = Pt(12); r.font.color.rgb = DARK_TEXT; r.font.name = "Calibri"

# ═══════════════════════════════════════════════════════════════
# SLIDE 1 — Title
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, NAVY)
rect(sl, 0, 0, 13.333, 7.5, NAVY)
rect(sl, 0, 0, 0.14, 7.5, SEC1_COL)
rect(sl, 13.19, 0, 0.14, 7.5, SEC3_COL)
rect(sl, 0, 4.5, 13.333, 0.07, AMBER)
rect(sl, 0, 6.8, 13.333, 0.07, AMBER)

tb(sl, "ODONTOGENIC TUMORS", 0.3, 0.5, 12.7, 0.75, 18, bold=False,
   color=AMBER, align=PP_ALIGN.CENTER)
tb(sl, "Mixed, Ectomesenchymal\n& Malignant Types",
   0.3, 1.15, 12.7, 2.2, 38, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(sl, "GROUP II: Tumors of Odontogenic Epithelium with Odontogenic Ectomesenchyme",
   0.3, 3.25, 12.7, 0.5, 13.5, bold=False, color=RGBColor(0xA0,0xC8,0xFF), align=PP_ALIGN.CENTER)
tb(sl, "GROUP III: Tumors of Odontogenic Ectomesenchyme ± Odontogenic Epithelium",
   0.3, 3.72, 12.7, 0.5, 13.5, bold=False, color=RGBColor(0xA0,0xDD,0xCC), align=PP_ALIGN.CENTER)
tb(sl, "GROUP IV: Malignant Odontogenic Tumors",
   0.3, 4.18, 12.7, 0.5, 13.5, bold=False, color=RGBColor(0xFF,0xB3,0xB3), align=PP_ALIGN.CENTER)
tb(sl, "Based on Shafer's Textbook of Oral Pathology",
   0.3, 4.72, 12.7, 0.5, 14, bold=False, color=AMBER, align=PP_ALIGN.CENTER)
tb(sl, "Oral & Maxillofacial Pathology  |  Odontogenic Neoplasms",
   0.3, 6.88, 12.7, 0.48, 12, bold=False, color=RGBColor(0x88,0xAA,0xCC), align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 2 — Classification Overview
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, LIGHT_BG)
rect(sl, 0, 0, 13.333, 1.05, NAVY)
rect(sl, 0, 1.05, 13.333, 0.055, AMBER)
rect(sl, 0, 1.1, 0.07, 6.4, AMBER)
tb(sl, "WHO Classification of Odontogenic Tumors", 0.25, 0.05, 12.8, 0.78, 24, bold=True, color=WHITE)
tb(sl, "Scope of this presentation — Groups II, III & IV", 0.25, 0.72, 12.8, 0.36, 12, bold=False, color=AMBER)

groups = [
    ("GROUP I\n(Not covered here)", "Tumors of Odontogenic\nEpithelium Only",
     ["Ameloblastoma", "Squamous OT (SOT)", "Calcifying EOT (CEOT)", "Adenomatoid OT (AOT)"],
     RGBColor(0x78,0x90,0xA8), LIGHT_BG, False),
    ("GROUP II\n(Covered)", "Epithelium +\nEctomesenchyme",
     ["Ameloblastic Fibroma (AF)", "Ameloblastic Fibro-Dentinoma (AFD)", "Ameloblastic Fibro-Odontoma (AFO)", "Odontoma (Compound + Complex)"],
     SEC1_COL, RGBColor(0xE8, 0xF0, 0xFD), True),
    ("GROUP III\n(Covered)", "Ectomesenchyme\n± Epithelium",
     ["Odontogenic Fibroma", "Odontogenic Myxoma/Fibromyxoma", "Cementoblastoma"],
     SEC2_COL, PALE_TEAL, True),
    ("GROUP IV\n(Covered)", "Malignant\nOdontogenic Tumors",
     ["Malignant Ameloblastoma", "Ameloblastic Carcinoma", "Primary Intraosseous SCC", "Clear Cell OC", "Ghost Cell OC", "Ameloblastic Fibrosarcoma"],
     SEC3_COL, PALE_RED, True),
]

xs = [0.2, 3.5, 6.8, 10.1]
for (grp, title, items, hcol, bcol, covered), x in zip(groups, xs):
    rect(sl, x, 1.25, 3.05, 0.65, hcol)
    tb(sl, grp, x+0.05, 1.27, 2.95, 0.6, 12.5, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    rect(sl, x, 1.92, 3.05, 0.6, RGBColor(0xFF,0xFF,0xFF) if not covered else hcol)
    tb(sl, title, x+0.06, 1.94, 2.93, 0.56, 12, bold=True,
       color=WHITE if covered else hcol, align=PP_ALIGN.CENTER)
    rect(sl, x, 2.54, 3.05, 4.6, bcol)
    box = sl.shapes.add_textbox(Inches(x+0.1), Inches(2.62), Inches(2.85), Inches(4.4))
    tf = box.text_frame; tf.word_wrap = True
    first = True
    for it in items:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False; p.space_before = Pt(5)
        r = p.add_run(); r.text = u'\u25B6  ' + it
        r.font.size = Pt(12.5); r.font.name = "Calibri"
        r.font.color.rgb = DARK_TEXT if not covered else (hcol if hcol != SEC3_COL else RED)
    if covered:
        tb(sl, "★ COVERED", x+0.1, 7.06, 2.85, 0.35, 10, bold=True,
           color=AMBER, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 3 — GROUP II Section Title
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, SEC1_COL)
rect(sl, 0, 0, 13.333, 7.5, SEC1_COL)
rect(sl, 0, 3.8, 13.333, 0.08, AMBER)
rect(sl, 0, 0, 0.14, 7.5, AMBER)

tb(sl, "SECTION  I", 0.3, 0.8, 12.8, 0.7, 20, bold=False,
   color=RGBColor(0xA0,0xC8,0xFF), align=PP_ALIGN.CENTER)
tb(sl, "Tumors of Odontogenic\nEpithelium with\nOdontogenic Ectomesenchyme",
   0.3, 1.4, 12.8, 2.5, 36, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(sl, "(With or without hard tissue formation)",
   0.3, 3.85, 12.8, 0.6, 18, bold=False, color=AMBER, align=PP_ALIGN.CENTER)

items_gr2 = ["Ameloblastic Fibroma (AF)",
             "Ameloblastic Fibro-Dentinoma (AFD)",
             "Ameloblastic Fibro-Odontoma (AFO)",
             "Odontoma — Compound & Complex Types"]
for i, it in enumerate(items_gr2):
    tb(sl, u'\u25CF  ' + it, 1.5, 4.55 + i*0.58, 10.3, 0.56, 16, bold=False,
       color=RGBColor(0xCC,0xE5,0xFF), align=PP_ALIGN.LEFT)

# ═══════════════════════════════════════════════════════════════
# SLIDE 4 — Ameloblastic Fibroma: Clinical & Radiology
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "Ameloblastic Fibroma (AF)", subtitle="Benign mixed odontogenic neoplasm | Both epithelial & mesenchymal elements", hcol=SEC1_COL)

# Left column
feat_box(sl, 0.2, 1.25, 6.1, 2.45, "CLINICAL FEATURES", [
    "Age < 30 years (peak: 15 years); bimodal distribution",
    "No sex predilection (slight male predominance in some series)",
    "Posterior mandible — most common site (premolar-molar region)",
    "Slow growing, asymptomatic unless secondarily inflamed",
    "Firm bony expansion of cortical plate",
    "Often associated with unerupted teeth",
    "Small lesions: unilocular; large/destructive: multilocular",
], SEC1_COL)

feat_box(sl, 0.2, 3.8, 6.1, 2.55, "RADIOGRAPHIC FEATURES", [
    "Well-defined radiolucency with corticated border",
    "Small lesions: UNILOCULAR; larger lesions: MULTILOCULAR",
    "Sclerotic rim often present",
    "Associated with crown of unerupted tooth",
    "Resembles ameloblastoma radiographically",
], SEC1_COL)

# Right column
feat_box(sl, 6.6, 1.25, 6.5, 3.0, "HISTOPATHOLOGICAL FEATURES (KEY)", [
    "Proliferation of BOTH epithelial AND mesenchymal elements",
    "Mesenchyme: cellular, basophilic, fibromyxoid (resembles dental papilla)",
    "Epithelium: islands/strands with peripheral palisading + stellate reticulum",
    "Each epithelial knot resembles a developing tooth germ",
    "NO enamel, dentin or cementum formation (unlike AFO)",
    "Stroma: immature, cell-rich, myxoid (DDx from ameloblastoma: mature fibrous stroma)",
], SEC1_COL)

feat_box(sl, 6.6, 4.35, 6.5, 2.0, "TREATMENT & PROGNOSIS", [
    "Initial: Enucleation and curettage",
    "Recurrence: En bloc resection required",
    "Recurrence rate: up to 18%",
    "Rare: malignant transformation to Ameloblastic Fibrosarcoma",
    "Close surveillance required",
], GREEN)

tb(sl, "DDx: Ameloblastoma | Enlarged dental follicle | AFD | AFO | Odontoma",
   0.2, 7.07, 13.0, 0.38, 11, bold=False, color=MUTED, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 5 — AF vs AFD vs AFO — Spectrum
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "AF Spectrum: Fibroma → Fibro-Dentinoma → Fibro-Odontoma",
             subtitle="Progressive differentiation of odontogenic hard tissue", hcol=SEC1_COL)

# Spectrum boxes
specs = [
    ("Ameloblastic\nFibroma (AF)", SEC1_COL, [
        "No hard tissue",
        "Epithelium + mesenchyme only",
        "Most common of the three",
        "Peak age: 15 years",
        "Posterior mandible",
        "Treatment: enucleation",
        "Recurrence: ~18%",
    ]),
    ("Ameloblastic Fibro-\nDentinoma (AFD)", RGBColor(0x00,0x5A,0x8A), [
        "AF + DENTINE formation",
        "Immature dentin present",
        "Rarer than AF",
        "Similar age/site to AF",
        "Dysplastic dentinoid material",
        "Treatment: conservative excision",
        "Good prognosis",
    ]),
    ("Ameloblastic Fibro-\nOdontoma (AFO)", RGBColor(0x00,0x3D,0x6E), [
        "AF + DENTIN + ENAMEL",
        "All dental hard tissues",
        "More mature than AF/AFD",
        "Younger patients (<10 yrs)",
        "May contain calcifications",
        "Treatment: conservative removal",
        "Excellent prognosis",
    ]),
    ("Odontoma\n(Compound/Complex)", TEAL, [
        "Fully mature hard tissues",
        "Not a neoplasm — HAMARTOMA",
        "Compound: tooth-like structures",
        "Complex: disorganized mass",
        "Anterior maxilla (compound)",
        "Treatment: enucleation",
        "Never recurs",
    ]),
]
xs = [0.2, 3.5, 6.8, 10.1]
for (name, col, pts), x in zip(specs, xs):
    rect(sl, x, 1.25, 3.05, 0.75, col)
    tb(sl, name, x+0.05, 1.27, 2.95, 0.7, 14, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    rect(sl, x, 2.02, 3.05, 5.28, WHITE)
    rect(sl, x, 2.02, 3.05, 0.05, col)
    box = sl.shapes.add_textbox(Inches(x+0.1), Inches(2.1), Inches(2.85), Inches(5.1))
    tf = box.text_frame; tf.word_wrap = True
    first = True
    for pt in pts:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False; p.space_before = Pt(5)
        r = p.add_run(); r.text = u'\u2022  ' + pt
        r.font.size = Pt(12.5); r.font.name = "Calibri"
        r.font.color.rgb = DARK_TEXT

# Arrow progression
for i, x in enumerate(xs[:3]):
    tb(sl, u'\u2192', x+3.1, 3.4, 0.3, 0.5, 20, bold=True, color=AMBER, align=PP_ALIGN.CENTER)

tb(sl, "Increasing hard tissue maturation  \u2192  Classification depends on degree of odontogenic differentiation",
   0.2, 7.1, 13.0, 0.36, 11, bold=False, color=MUTED, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 6 — Odontoma
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "Odontoma — Compound & Complex", subtitle="Odontogenic hamartoma | Most common odontogenic 'tumor'", hcol=TEAL)
rect(sl, 0, 1.1, 0.07, 6.4, TEAL)

# Left — Compound
feat_box(sl, 0.2, 1.25, 6.1, 2.7, "COMPOUND ODONTOMA", [
    "Multiple miniature tooth-like structures (denticles/odontoids)",
    "Normal dental tissue arrangement maintained",
    "Anterior maxilla — most common site",
    "Children/adolescents; no sex predilection",
    "Most common odontogenic hamartoma",
    "Growth ceases at maturity (1–2 cm)",
    "Multiple forms: may be part of Gardner's syndrome",
], TEAL)

feat_box(sl, 0.2, 4.05, 6.1, 2.4, "COMPOUND — RADIOLOGY & HISTOLOGY", [
    "Radiopaque lesion — multiple tooth-like (denticle) structures",
    "Surrounded by radiolucent fibrous sac",
    "Histology: recognizable miniature teeth with normal arrangement",
    "Enamel, dentin, cementum, pulp all organized normally",
    "Treatment: enucleation | Prognosis: EXCELLENT (never recurs)",
], TEAL)

# Right — Complex
feat_box(sl, 6.6, 1.25, 6.5, 2.7, "COMPLEX ODONTOMA", [
    "Haphazard mass of all dental tissues — no tooth-like organization",
    "Enamel, dentin, cementum, pulp in disorganized arrangement",
    "Posterior mandible — most common site",
    "Slightly older age group than compound",
    "Asymptomatic, found on routine X-ray",
    "May impede eruption of adjacent tooth",
    "Associated with reduced enamel epithelium (DDx: dentigerous cyst)",
], TEAL)

feat_box(sl, 6.6, 4.05, 6.5, 2.4, "COMPLEX — RADIOLOGY & HISTOLOGY", [
    "Radiopaque irregular mass — no resemblance to teeth",
    "Dense radiopacity with surrounding radiolucent zone",
    "Histology: irregular aggregates of enamel matrix, dentin, cementum",
    "May contain ghost cells (similar to calcifying odontogenic cyst)",
    "Treatment: enucleation | Prognosis: EXCELLENT (never recurs)",
], TEAL)

tb(sl, "KEY POINT: Odontomas are HAMARTOMAS not true neoplasms — they represent aborted attempts at tooth formation",
   0.2, 7.07, 13.0, 0.38, 11.5, bold=True, color=TEAL, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 7 — GROUP III Section Title
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, SEC2_COL)
rect(sl, 0, 0, 13.333, 7.5, SEC2_COL)
rect(sl, 0, 4.0, 13.333, 0.08, AMBER)
rect(sl, 0, 0, 0.14, 7.5, AMBER)

tb(sl, "SECTION  II", 0.3, 0.8, 12.8, 0.7, 20, bold=False,
   color=RGBColor(0xA0,0xDD,0xCC), align=PP_ALIGN.CENTER)
tb(sl, "Tumors of Odontogenic\nEctomesenchyme",
   0.3, 1.4, 12.8, 2.0, 38, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(sl, "(With or without included odontogenic epithelium)",
   0.3, 3.35, 12.8, 0.6, 18, bold=False, color=AMBER, align=PP_ALIGN.CENTER)
tb(sl, "Arise from mesenchymal component of the developing tooth",
   0.3, 3.98, 12.8, 0.5, 15, bold=False, color=RGBColor(0xCC,0xEE,0xE8), align=PP_ALIGN.CENTER)

items_gr3 = ["Odontogenic Fibroma (Central/Intraosseous)",
             "Odontogenic Fibroma (Peripheral/Extraosseous)",
             "Odontogenic Myxoma / Fibromyxoma (OM/OFM)",
             "Benign Cementoblastoma"]
for i, it in enumerate(items_gr3):
    tb(sl, u'\u25CF  ' + it, 1.5, 4.65 + i*0.6, 10.3, 0.56, 16, bold=False,
       color=RGBColor(0xCC,0xEE,0xE8), align=PP_ALIGN.LEFT)

# ═══════════════════════════════════════════════════════════════
# SLIDE 8 — Odontogenic Fibroma
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "Odontogenic Fibroma (OF)", subtitle="Central (Intraosseous) & Peripheral (Extraosseous) Types", hcol=SEC2_COL)
rect(sl, 0, 1.1, 0.07, 6.4, SEC2_COL)

# Central type
rect(sl, 0.2, 1.25, 6.1, 0.45, SEC2_COL)
tb(sl, "CENTRAL (INTRAOSSEOUS) TYPE", 0.3, 1.27, 5.9, 0.42, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

bul(sl, [
    {'h': 'Clinical Features', 'sz': 14, 'c': SEC2_COL},
    "More common after 40 years of age | M:F = 1:3",
    "Posterior mandible and anterior maxilla most common sites",
    "Slow-growing, painless jaw swelling with cortical expansion",
    "May cause bony expansion or loose teeth",
    {'h': 'Radiographic Features', 'sz': 14, 'c': SEC2_COL},
    "Radiolucent, single, well-demarcated — unilocular (small) or multilocular (large)",
    "Sclerotic border; larger lesions may have scalloped margin",
    "Spotted radiopacities may be present (calcified foci)",
    {'h': 'Histopathology', 'sz': 14, 'c': SEC2_COL},
    "TWO TYPES: Epithelium-poor (simple) | Epithelium-rich (WHO type)",
    "Epithelium-rich: cellular fibroblastic CT + islands of odontogenic epithelium",
    "   Foci of calcified material (metaplastic cementum/osteoid/dentin)",
    {'h': 'Treatment & Prognosis', 'sz': 14, 'c': SEC2_COL},
    "Enucleation and curettage | Prognosis: GOOD | DDx: hyperplastic dental follicle",
], 0.2, 1.73, 6.1, 5.6, 12.5)

# Peripheral type
rect(sl, 6.6, 1.25, 6.5, 0.45, SEC2_COL)
tb(sl, "PERIPHERAL (EXTRAOSSEOUS) TYPE", 6.7, 1.27, 6.3, 0.42, 13, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

bul(sl, [
    {'h': 'Clinical Features', 'sz': 14, 'c': SEC2_COL},
    "Variable age; can occur at any age",
    "Slow-growing gingival mass — most common presentation",
    "Normal overlying mucosa",
    "Extraosseous — no bone involvement",
    {'h': 'Radiographic Features', 'sz': 14, 'c': SEC2_COL},
    "None (extraosseous) — occasional superficial bone erosion",
    {'h': 'Histopathology', 'sz': 14, 'c': SEC2_COL},
    "Same as central type — fibroblasts in collagen matrix",
    "Variable content of odontogenic epithelium",
    {'h': 'Treatment & Prognosis', 'sz': 14, 'c': SEC2_COL},
    "Surgical excision | Prognosis: EXCELLENT",
    "Simple enucleation is curative",
    {'h': 'Histogenesis', 'sz': 14, 'c': SEC2_COL},
    "Epithelium-poor: from dental follicle",
    "Epithelium-rich: from periodontal ligament",
], 6.6, 1.73, 6.5, 5.6, 12.5)

rect(sl, 6.4, 1.2, 0.05, 6.2, AMBER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 9 — Odontogenic Myxoma
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "Odontogenic Myxoma / Fibromyxoma", subtitle="Locally aggressive benign mesenchymal odontogenic neoplasm | 3% of all odontogenic tumors", hcol=SEC2_COL)

feat_box(sl, 0.2, 1.25, 6.1, 2.7, "CLINICAL FEATURES", [
    "Mandible > Maxilla; 2/3 in posterior mandible",
    "Age: 15–35 years (2nd–3rd decade); Female predominance",
    "Slow-growing, painless swelling/asymmetry",
    "Large lesions: tooth mobility, root resorption",
    "Maxillary lesions: nasal obstruction, exophthalmos",
    "Rapid growth sometimes seen",
    "3% of all odontogenic neoplasms",
], SEC2_COL)

feat_box(sl, 0.2, 4.05, 6.1, 2.6, "RADIOGRAPHIC FEATURES (KEY)", [
    "Multilocular 'soap bubble' or 'honeycomb' radiolucency",
    "Tennis racquet / tennis strings pattern — CLASSIC",
    "'Wispy' bony septa at right angles to cortex",
    "Unilocular pattern in small lesions",
    "May penetrate cortex → periosteal reaction",
    "DDx: Ameloblastoma, KCOT, Haemangioma",
], SEC2_COL)

feat_box(sl, 6.6, 1.25, 6.5, 2.7, "HISTOPATHOLOGICAL FEATURES (KEY)", [
    "Relatively ACELLULAR myxoid tissue",
    "Stellate (star-shaped) and spindle cells in loose myxoid stroma",
    "Cells evenly spaced — bland, no atypia",
    "Abundant mucinous matrix (finely fibrillar)",
    "Occasional scattered islands of odontogenic epithelium",
    "Gross appearance: GELATINOUS, white, mucoid, sticky",
    "More collagenous = Fibromyxoma variant",
], SEC2_COL)

feat_box(sl, 6.6, 4.05, 6.5, 2.6, "TREATMENT & PROGNOSIS", [
    "Locally invasive — infiltrates medullary bone",
    "Small lesions: curettage + frozen section margin assessment",
    "Large/diffuse lesions: radical resection required",
    "Remove 0.5–1.0 cm of medullary bone beyond radiographic border",
    "Recurrence rate: 10–33% (higher after conservative surgery)",
    "NO metastases reported",
    "Prognosis: GOOD with adequate surgery",
], GREEN)

# ═══════════════════════════════════════════════════════════════
# SLIDE 10 — Cementoblastoma
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "Benign Cementoblastoma", subtitle="True benign neoplasm arising from cementoblasts | Fused to tooth root", hcol=SEC2_COL)

feat_box(sl, 0.2, 1.25, 6.1, 2.65, "CLINICAL FEATURES", [
    "Age: most under 30 years (peak: ~20 years)",
    "No sex predilection",
    "Mandibular FIRST MOLAR most frequently affected",
    "Premolar-molar region of mandible",
    "Painful swelling of buccal and lingual alveolar ridge",
    "Tooth is always VITAL — key diagnostic feature",
    "Fused to root of an erupted, vital tooth",
], SEC2_COL)

feat_box(sl, 0.2, 4.0, 6.1, 2.7, "HISTOPATHOLOGICAL FEATURES", [
    "Dense masses of ACELLULAR CEMENTUM (Pagetoid-like pattern)",
    "Supported by fibrovascular stroma",
    "Multinucleated cells (osteoclast-like) present",
    "Peripheral zone of unmineralized CEMENTOID",
    "Tumor is fused to tooth root (unlike other jaw tumors)",
    "DDx from osteoblastoma: dental origin is key",
    "DDx from osteosarcoma: benign histology",
], SEC2_COL)

feat_box(sl, 6.6, 1.25, 6.5, 2.65, "RADIOGRAPHIC FEATURES (KEY)", [
    "RADIOPAQUE (calcified mass) — CLASSIC",
    "Well-defined rounded mass replacing apical 1/3 of root",
    "Surrounded by a narrow RADIOLUCENT ZONE (periodontal ligament space)",
    "Fused to root — cannot separate from tooth radiographically",
    "Sunburst pattern may be seen at periphery",
    "Single, well-demarcated lesion",
], SEC2_COL)

feat_box(sl, 6.6, 4.0, 6.5, 2.7, "TREATMENT, PROGNOSIS & DDx", [
    "Extraction of associated tooth + complete enucleation",
    "Tooth cannot be saved — must be extracted with tumor",
    "Recurrence common after incomplete removal",
    "Prognosis: EXCELLENT with complete excision",
    "DDx: Osteoblastoma (no dental fusion), Osteosarcoma (malignant histology)",
    "DDx: Hypercementosis (diffuse, not a tumor mass)",
    "KEY: Tooth is vital — rules out inflammatory origin",
], GREEN)

# ═══════════════════════════════════════════════════════════════
# SLIDE 11 — GROUP III Comparison Table
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, LIGHT_BG)
rect(sl, 0, 0, 13.333, 1.05, SEC2_COL)
rect(sl, 0, 1.05, 13.333, 0.055, AMBER)
rect(sl, 0, 1.1, 0.07, 6.4, AMBER)
tb(sl, "Group III — Comparison at a Glance", 0.25, 0.05, 12.8, 0.78, 24, bold=True, color=WHITE)
tb(sl, "Ectomesenchymal Odontogenic Tumors", 0.25, 0.72, 12.8, 0.36, 12, bold=False, color=AMBER)

hdrs = ["Feature", "OF (Central)", "OF (Peripheral)", "Odontogenic Myxoma", "Cementoblastoma"]
hw = [2.0, 2.5, 2.5, 3.0, 3.05]
hx = [0.15]
for w in hw[:-1]: hx.append(hx[-1]+w+0.02)

for h, w, x in zip(hdrs, hw, hx):
    rect(sl, x, 1.18, w, 0.48, SEC2_COL)
    tb(sl, h, x+0.04, 1.19, w-0.08, 0.45, 11, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

rows = [
    ["Age", "> 40 years", "Variable", "15–35 years", "< 30 years"],
    ["Sex", "M:F = 1:3", "Variable", "Female>Male", "No predilection"],
    ["Site", "Post. mandible\nAnt. maxilla", "Gingiva\n(extraosseous)", "Post. mandible\n(2/3 cases)", "Mand. 1st molar\n(premolar-molar)"],
    ["Radiology", "Radiolucent\nunilocular/multi", "None\n(soft tissue)", "Multilocular\n'soap bubble'", "RADIOPAQUE\n+ radiolucent rim"],
    ["Histology", "Fibroblasts in\ncollagen matrix", "Same as\ncentral type", "Stellate cells\nmyxoid stroma", "Acellular\ncementum"],
    ["Treatment", "Enucleation\n+ curettage", "Surgical\nexcision", "Resection\n(locally aggressive)", "Extraction +\nenucleation"],
    ["Prognosis", "Good", "Excellent", "Good\n(10–33% recur)", "Excellent"],
]
rb = [PALE_TEAL, WHITE]
for ri, row in enumerate(rows):
    y = 1.7 + ri * 0.77
    for ci, (cell, w, x) in enumerate(zip(row, hw, hx)):
        bg = RGBColor(0xE0,0xF4,0xF1) if ci == 0 else rb[ri%2]
        rect(sl, x, y, w, 0.75, bg)
        fc = SEC2_COL if ci == 0 else DARK_TEXT
        tb(sl, cell, x+0.04, y+0.05, w-0.08, 0.68, 10.5, bold=(ci==0), color=fc, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 12 — MALIGNANT SECTION Title
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, SEC3_COL)
rect(sl, 0, 0, 13.333, 7.5, SEC3_COL)
rect(sl, 0, 4.2, 13.333, 0.08, AMBER)
rect(sl, 0, 0, 0.14, 7.5, AMBER)

tb(sl, "SECTION  III", 0.3, 0.8, 12.8, 0.7, 20, bold=False,
   color=RGBColor(0xFF,0xB3,0xB3), align=PP_ALIGN.CENTER)
tb(sl, "Malignant\nOdontogenic Tumors",
   0.3, 1.4, 12.8, 2.0, 42, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(sl, "Rare malignant neoplasms arising from odontogenic epithelium or mesenchyme",
   0.3, 3.38, 12.8, 0.56, 16, bold=False, color=RGBColor(0xFF,0xCC,0xCC), align=PP_ALIGN.CENTER)
tb(sl, "Odontogenic Carcinomas (elderly) | Odontogenic Sarcomas (younger age groups)",
   0.3, 4.3, 12.8, 0.56, 15, bold=False, color=AMBER, align=PP_ALIGN.CENTER)

mal_items = [
    "CARCINOMAS: Malignant Ameloblastoma | Ameloblastic Carcinoma (Primary & Secondary)",
    "CARCINOMAS: Primary Intraosseous SCC | Clear Cell Odontogenic Carcinoma",
    "CARCINOMAS: Ghost Cell Odontogenic Carcinoma",
    "SARCOMAS: Ameloblastic Fibrosarcoma | Fibro-Dentinosarcoma | Fibro-Odontosarcoma",
]
for i, it in enumerate(mal_items):
    tb(sl, u'\u25CF  ' + it, 1.0, 4.95 + i*0.55, 11.3, 0.52, 14.5, bold=False,
       color=RGBColor(0xFF,0xCC,0xCC), align=PP_ALIGN.LEFT)

# ═══════════════════════════════════════════════════════════════
# SLIDE 13 — Malignant Ameloblastoma & Ameloblastic Carcinoma
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "Malignant Ameloblastoma & Ameloblastic Carcinoma", subtitle="Malignant odontogenic carcinomas | Rare entities", hcol=SEC3_COL, accent=AMBER)
rect(sl, 0, 1.1, 0.07, 6.4, SEC3_COL)

# Left — Malignant Ameloblastoma
rect(sl, 0.2, 1.25, 6.1, 0.45, RGBColor(0x7A, 0x00, 0x00))
tb(sl, "MALIGNANT AMELOBLASTOMA (METASTASIZING)", 0.3, 1.27, 5.9, 0.42, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

bul(sl, [
    {'h': 'Definition', 'sz': 14, 'c': SEC3_COL},
    "Histologically TYPICAL ameloblastoma that METASTASIZES",
    "   Diagnosis made retrospectively after metastasis is found",
    {'h': 'Features', 'sz': 14, 'c': SEC3_COL},
    "Lung: most common metastatic site",
    "Cervical lymph node involvement also seen",
    "Metastases often long delayed (years after primary)",
    "No cytological atypia in primary or metastatic tumor",
    "Long history of multiple recurrences precedes metastasis",
    {'h': 'Treatment', 'sz': 14, 'c': SEC3_COL},
    "Excision preferred when feasible",
    "Radiotherapy may be only option for inaccessible metastases",
    "Prognosis: variable — determined by metastatic burden",
], 0.2, 1.73, 6.1, 5.6, 12.5)

# Right — Ameloblastic Carcinoma
rect(sl, 6.6, 1.25, 6.5, 0.45, SEC3_COL)
tb(sl, "AMELOBLASTIC CARCINOMA (PRIMARY & SECONDARY)", 6.7, 1.27, 6.3, 0.42, 12, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

bul(sl, [
    {'h': 'Primary Type', 'sz': 14, 'c': SEC3_COL},
    "Ameloblastoma WITH cytopathologic features of malignancy",
    "   ↑ Mitoses, nuclear pleomorphism, hyperchromatism, ↑N:C ratio",
    "Posterior mandible most common; no obvious sex predilection",
    "DDx: Ameloblastoma with occasional mitoses (no other atypia)",
    "~1/3 maxillary cases have pulmonary metastases at diagnosis",
    "SOX2 marker: touted for transformation to ameloblastic carcinoma",
    {'h': 'Secondary Type (De-differentiated)', 'sz': 14, 'c': SEC3_COL},
    "Arises within pre-existing, often long-standing benign ameloblastoma",
    "   Recurrent ameloblastoma undergoing malignant transformation",
    "Cellular atypia + nerve invasion = characteristic",
    "Prognosis: determined by size and proximity to skull base",
    {'h': 'Both Types', 'sz': 14, 'c': SEC3_COL},
    "Very rare lesions | Wide surgical resection required",
    "Radiotherapy adjuvant in selected cases",
], 6.6, 1.73, 6.5, 5.6, 12.5)

rect(sl, 6.4, 1.2, 0.05, 6.2, AMBER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 14 — Primary Intraosseous SCC
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "Primary Intraosseous Squamous Cell Carcinoma (PIOSCC)",
             subtitle="Central jaw SCC derived from odontogenic epithelial residues", hcol=SEC3_COL, accent=AMBER)
rect(sl, 0, 1.1, 0.07, 6.4, SEC3_COL)

feat_box(sl, 0.2, 1.25, 6.1, 2.2, "PIOSCC — SOLID TYPE (De Novo)", [
    "Unknown aetiology; derived from epithelial residues",
    "Rests of Malassez (periodontal ligament)",
    "Reduced enamel epithelium of unerupted teeth",
    "Rare: dedifferentiation from benign ameloblastoma",
    "Later adult life; M:F = 2:1",
    "Posterior mandible (body and ramus) most common",
    "Incidental irregular, non-corticated radiolucency",
], SEC3_COL)

feat_box(sl, 0.2, 3.55, 6.1, 3.1, "PIOSCC — DERIVED FROM KCOT/CYSTS", [
    "SCC arising in association with KCOT or odontogenic cyst",
    "Older adults; M:F = 2:1",
    "Mandible > Maxilla",
    "May present as typical cyst or with pain, swelling, loose teeth",
    "Non-healing socket, paraesthesia, lymphadenopathy",
    "Histology: well-differentiated SCC merging with KCOT lining",
    "Cyst lining may show dysplasia or verrucous hyperplasia",
    "Prognosis slightly better than solid type",
], SEC3_COL)

feat_box(sl, 6.6, 1.25, 6.5, 2.2, "CLINICAL & RADIOGRAPHIC FEATURES", [
    "Facial swelling and paraesthesia (large lesions)",
    "Radiograph: irregular non-corticated radiolucency",
    "Ill-defined borders — gross cortical destruction in advanced cases",
    "Soft tissue extension in large tumors",
    "Histology: moderately differentiated SCC — no specific features",
], SEC3_COL)

feat_box(sl, 6.6, 3.55, 6.5, 3.1, "TREATMENT, DDx & PROGNOSIS", [
    "Surgical resection — wide margins",
    "Frequent local recurrence after surgery",
    "Regional and distant metastases possible",
    "Prognosis: POOR overall",
    "DDx: Keratoameloblastoma, SOT, Mucoepidermoid carcinoma (central)",
    "   Metastatic SCC (must exclude clinically + radiologically)",
    "Always exclude: SCC of mucosal or antral origin (once cortex destroyed)",
], RED)

# ═══════════════════════════════════════════════════════════════
# SLIDE 15 — Clear Cell OC & Ghost Cell OC
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "Clear Cell & Ghost Cell Odontogenic Carcinoma",
             subtitle="Rare malignant odontogenic carcinomas with distinct histopathology", hcol=SEC3_COL, accent=AMBER)
rect(sl, 0, 1.1, 0.07, 6.4, SEC3_COL)

rect(sl, 0.2, 1.25, 6.1, 0.45, RGBColor(0x70, 0x00, 0x00))
tb(sl, "CLEAR CELL ODONTOGENIC CARCINOMA (CCOC)", 0.3, 1.27, 5.9, 0.42, 12.5, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

bul(sl, [
    {'h': 'Demographics & Site', 'sz': 14, 'c': SEC3_COL},
    "Predominantly mandible of OLDER FEMALES",
    "Rare tumor — few cases reported",
    {'h': 'Clinical Features', 'sz': 14, 'c': SEC3_COL},
    "Jaw swelling with loosening of teeth",
    "Ill-defined radiolucency with root resorption on X-ray",
    {'h': 'Histopathology (KEY)', 'sz': 14, 'c': SEC3_COL},
    "BIPHASIC pattern: sheets of CLEAR CELLS + cords of BASALOID CELLS",
    "Fibrous septae support cell clusters",
    "Clear cells: diastase-degradable, PAS-positive granules (glycogen)",
    "DDx: Salivary gland neoplasms, Clear cell CEOT, Metastatic renal cell CA, Melanoma",
    {'h': 'Treatment & Prognosis', 'sz': 14, 'c': SEC3_COL},
    "Surgical resection",
    "Local recurrence, regional and distant (lung, bone) metastases",
    "Post-op radiotherapy if cortical erosion/perforation",
    "Prognosis: POOR for large lesions",
], 0.2, 1.73, 6.1, 5.6, 12.5)

rect(sl, 6.6, 1.25, 6.5, 0.45, SEC3_COL)
tb(sl, "GHOST CELL ODONTOGENIC CARCINOMA (GCOC)", 6.7, 1.27, 6.3, 0.42, 12.5, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

bul(sl, [
    {'h': 'Demographics & Site', 'sz': 14, 'c': SEC3_COL},
    "Rare neoplasm — mainly affects MAXILLA in ADULT MALES",
    "Related to Calcifying Odontogenic Cyst (CCOT/Gorlin Cyst)",
    {'h': 'Clinical Features', 'sz': 14, 'c': SEC3_COL},
    "Swelling and paraesthesia",
    "Poorly demarcated radiolucency with patchy radiopacity",
    "Root displacement or resorption",
    {'h': 'Histopathology (KEY)', 'sz': 14, 'c': SEC3_COL},
    "Malignant component: rounded, mitotically active epithelial islands",
    "Fibrous stroma",
    "Adjacent to or admixed with typical BENIGN GCOT/CCOT features",
    "GHOST CELLS present — pathognomonic association",
    {'h': 'Treatment & Prognosis', 'sz': 14, 'c': SEC3_COL},
    "Surgical resection",
    "Prognosis: UNPREDICTABLE",
    "Some recur locally, some metastasize",
    "Careful long-term follow-up mandatory",
], 6.6, 1.73, 6.5, 5.6, 12.5)

rect(sl, 6.4, 1.2, 0.05, 6.2, AMBER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 16 — Ameloblastic Fibrosarcoma & Related Sarcomas
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "Ameloblastic Fibrosarcoma & Related Odontogenic Sarcomas",
             subtitle="Malignant counterpart of ameloblastic fibroma | Rare | Younger age group", hcol=SEC3_COL, accent=AMBER)
rect(sl, 0, 1.1, 0.07, 6.4, SEC3_COL)

feat_box(sl, 0.2, 1.25, 6.1, 2.2, "CLINICAL FEATURES", [
    "Age: mean ~28 years (vs. 15 years for AF)",
    "Male:Female = 1.6:1",
    "Posterior mandible most common site",
    "~2/3: arise de novo (primary AFS)",
    "~1/3: arise within pre-existing Ameloblastic Fibroma (secondary AFS)",
    "Painful swelling, rapid growth",
], SEC3_COL)

feat_box(sl, 0.2, 3.55, 6.1, 3.1, "AFS SPECTRUM", [
    "AF: Benign — epithelium + benign mesenchyme",
    "AFS: Benign epithelium + MALIGNANT mesenchyme",
    "AFDS: AFS + areas of DENTINE (fibro-dentinosarcoma)",
    "AFOS: AFS + DENTIN + ENAMEL (fibro-odontosarcoma)",
    "Malignant component: ECTOMESENCHYME only",
    "Benign epithelial islands persists throughout — KEY feature",
], SEC3_COL)

feat_box(sl, 6.6, 1.25, 6.5, 3.0, "HISTOPATHOLOGICAL FEATURES (KEY)", [
    "Benign epithelial nests and cords — RETAINED",
    "Highly cellular, cytologically MALIGNANT ectomesenchyme",
    "   Increased mitoses, nuclear atypia, pleomorphism",
    "AFDS: scattered areas of dentine also present",
    "AFOS: dentine and enamel/enamel-like material present",
    "KEY: benign epithelium in malignant stroma (opposite of carcinoma)",
], SEC3_COL)

feat_box(sl, 6.6, 4.35, 6.5, 2.3, "TREATMENT & PROGNOSIS", [
    "Surgical resection — treatment of choice",
    "Wide resection with adequate margins",
    "Generally radiosensitive to some degree",
    "Prognosis: favorable if completely excised",
    "Local recurrence: most common problem",
    "Distant metastases: rare but reported",
    "Closely monitor after resection",
], GREEN)

# ═══════════════════════════════════════════════════════════════
# SLIDE 17 — Malignant Tumors Summary Table
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, LIGHT_BG)
rect(sl, 0, 0, 13.333, 1.05, SEC3_COL)
rect(sl, 0, 1.05, 13.333, 0.055, AMBER)
rect(sl, 0, 1.1, 0.07, 6.4, AMBER)
tb(sl, "Malignant Odontogenic Tumors — Summary Table", 0.25, 0.05, 12.8, 0.78, 22, bold=True, color=WHITE)
tb(sl, "Group IV: Odontogenic Carcinomas & Sarcomas", 0.25, 0.72, 12.8, 0.36, 12, bold=False, color=AMBER)

hdrs = ["Tumor", "Origin", "Age/Sex", "Site", "Key Histology", "Prognosis"]
hw = [2.3, 1.8, 1.8, 1.8, 3.3, 1.9]
hx = [0.15]
for w in hw[:-1]: hx.append(hx[-1]+w+0.02)
for h, w, x in zip(hdrs, hw, hx):
    rect(sl, x, 1.18, w, 0.45, SEC3_COL)
    tb(sl, h, x+0.04, 1.2, w-0.08, 0.42, 11, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

mal_rows = [
    ["Malignant Ameloblastoma", "Odontogenic epith.", "Adults", "Mandible", "Typical ameloblastoma histology + metastasis", "Variable"],
    ["Ameloblastic Carcinoma (Primary)", "Odontogenic epith.", "Adults\nNo sex pred.", "Post. mandible", "Ameloblastoma + cytologic malignancy (↑mitoses, atypia)", "Poor"],
    ["Ameloblastic Carcinoma (Secondary)", "Recurrent benign ameloblastoma", "Adults", "Mandible", "Pre-existing ameloblastoma + atypia + nerve invasion", "Poor (size-dependent)"],
    ["PIOSCC (Solid)", "Rests of Malassez\nReduced enamel epith.", "Older adults\nM:F=2:1", "Post. mandible", "Moderately diff. SCC; no specific features", "POOR"],
    ["Clear Cell OC", "Odontogenic epith.", "Older females", "Mandible", "Biphasic: clear cells + basaloid cells; PAS+glycogen", "Poor (large)"],
    ["Ghost Cell OC", "CCOT/GCOT origin", "Adult males", "Maxilla", "Malignant epithelial islands + ghost cells", "Unpredictable"],
    ["Ameloblastic Fibrosarcoma", "Ectomesenchyme", "~28 yrs\nM>F", "Post. mandible", "Benign epithelium + malignant cellular mesenchyme", "Favorable (if excised)"],
]
rb = [PALE_RED, WHITE]
for ri, row in enumerate(mal_rows):
    y = 1.67 + ri * 0.8
    for ci, (cell, w, x) in enumerate(zip(row, hw, hx)):
        bg = RGBColor(0xFF,0xF0,0xF0) if ci == 0 else rb[ri%2]
        rect(sl, x, y, w, 0.78, bg)
        fc = SEC3_COL if ci == 0 else DARK_TEXT
        tb(sl, cell, x+0.04, y+0.05, w-0.08, 0.68, 10, bold=(ci==0), color=fc, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 18 — Master Comparison: All Groups
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, LIGHT_BG)
rect(sl, 0, 0, 13.333, 1.05, NAVY)
rect(sl, 0, 1.05, 13.333, 0.055, AMBER)
rect(sl, 0, 1.1, 0.07, 6.4, AMBER)
tb(sl, "Master Comparison — Group II & III Benign Tumors", 0.25, 0.05, 12.8, 0.78, 22, bold=True, color=WHITE)
tb(sl, "At a glance comparison of all benign mixed and ectomesenchymal tumors", 0.25, 0.72, 12.8, 0.36, 12, bold=False, color=AMBER)

hdrs2 = ["Tumor", "Group", "Age", "Site", "Radiology", "KEY Histology", "Treatment", "Prognosis"]
hw2 = [2.1, 0.75, 1.1, 1.55, 1.55, 2.7, 1.85, 1.4]
hx2 = [0.12]
for w in hw2[:-1]: hx2.append(hx2[-1]+w+0.02)
for h, w, x in zip(hdrs2, hw2, hx2):
    rect(sl, x, 1.18, w, 0.45, NAVY)
    tb(sl, h, x+0.03, 1.2, w-0.06, 0.42, 10, bold=True, color=WHITE, align=PP_ALIGN.CENTER)

all_rows = [
    ["Ameloblastic Fibroma", "II", "< 30 yrs", "Post. mandible", "Radiolucent\nunilocular/multi", "Epith islands + myxoid cell-rich stroma; NO hard tissue", "Enucleation\n(en bloc if recur)", "Good\n(~18% recur)", SEC1_COL],
    ["Ameloblastic Fibro-Odontoma", "II", "< 10 yrs", "Post. mandible", "Mixed\nradiolucent+opaque", "AF features + dentin + enamel present", "Conservative\nremoval", "Excellent", SEC1_COL],
    ["Odontoma (Compound)", "II", "10–30 yrs", "Ant. maxilla", "Multiple\ntooth-like opacities", "Miniature teeth in organized arrangement", "Enucleation", "Excellent\n(never recurs)", TEAL],
    ["Odontoma (Complex)", "II", "10–30 yrs", "Post. mandible", "Dense irregular\nradiopaque mass", "Haphazard enamel/dentin/cementum", "Enucleation", "Excellent\n(never recurs)", TEAL],
    ["Odontogenic Fibroma", "III", "> 40 yrs", "Post. mand/\nAnt. max.", "Radiolucent\nunilocular/multi", "Fibroblasts in collagen matrix ± odontogenic epithelium", "Enucleation\n+ curettage", "Good", SEC2_COL],
    ["Odontogenic Myxoma", "III", "15–35 yrs", "Post. mandible", "Multilocular\n'soap bubble'", "Stellate cells in myxoid stroma; acellular", "Resection\n(locally aggressive)", "Good\n(10–33% recur)", SEC2_COL],
    ["Cementoblastoma", "III", "< 30 yrs", "Mand.\n1st molar", "RADIOPAQUE +\nlucent rim on root", "Dense acellular cementum fused to root", "Extraction +\nenucleation", "Excellent", SEC2_COL],
]
rb2 = [RGBColor(0xF2,0xF6,0xFF), WHITE]
for ri, row in enumerate(all_rows):
    y = 1.67 + ri * 0.8
    col = row[-1]
    for ci, (cell, w, x) in enumerate(zip(row[:-1], hw2, hx2)):
        if ci == 0:
            bg = col
        elif ci == 1:
            bg = RGBColor(0xEE,0xF4,0xFF)
        else:
            bg = rb2[ri%2]
        rect(sl, x, y, w, 0.78, bg)
        fc = WHITE if ci == 0 else (col if ci == 1 else DARK_TEXT)
        tb(sl, cell, x+0.03, y+0.04, w-0.06, 0.7, 9.5, bold=(ci==0), color=fc, align=PP_ALIGN.CENTER)

# ═══════════════════════════════════════════════════════════════
# SLIDE 19 — Mnemonics & Key Points
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
header_slide(sl, "High-Yield Points, Mnemonics & Exam Tips", subtitle="Key differentiators for exams and clinical practice", hcol=NAVY)

# Three columns
col_data = [
    ("GROUP II — Mixed", SEC1_COL, [
        "AF = 'DEVELOPING TOOTH GERM LOOK'",
        "  Epithelium + myxoid mesenchyme (dental papilla-like)",
        "  NO hard tissue (unlike AFD, AFO, Odontoma)",
        "AFO = AF + enamel + dentin",
        "Odontoma = HAMARTOMA not neoplasm",
        "  Compound = multiple denticles (anterior maxilla)",
        "  Complex = haphazard mass (posterior mandible)",
        "AF → AFD → AFO → Odontoma = maturation spectrum",
        "AF can transform to Ameloblastic Fibrosarcoma (rare)",
    ]),
    ("GROUP III — Ectomesenchyme", SEC2_COL, [
        "Myxoma = 'TENNIS RACQUET' X-ray pattern",
        "  Most locally aggressive benign odontogenic tumor",
        "  25% recurrence after conservative surgery",
        "Cementoblastoma = ONLY odontogenic tumor",
        "  Fused to root | Tooth is VITAL | Radiopaque",
        "  Mandibular 1st molar, < 30 years",
        "  Treatment: MUST extract tooth with tumor",
        "OF = Fibroblasts in collagen ± epithelial islands",
        "  Central (>40 yrs) vs Peripheral (gingival, any age)",
    ]),
    ("GROUP IV — Malignant", SEC3_COL, [
        "Malignant Ameloblastoma: TYPICAL histo + METASTASIS",
        "  Ameloblastic Carcinoma: ATYPIA in primary site",
        "PIOSCC: from Rests of Malassez; poor prognosis",
        "Clear Cell OC: older females, mandible, biphasic",
        "Ghost Cell OC: maxilla, adult males, near CCOT",
        "AFS: benign epithelium + MALIGNANT mesenchyme",
        "  Carcinomas: elderly | Sarcomas: younger patients",
        "All malignant OTs: RARE — wide resection needed",
    ]),
]
bx_x = [0.2, 4.6, 9.0]
for (title, col, pts), x in zip(col_data, bx_x):
    rect(sl, x, 1.25, 4.1, 0.52, col)
    tb(sl, title, x+0.08, 1.27, 3.94, 0.48, 13.5, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
    rect(sl, x, 1.79, 4.1, 5.56, WHITE)
    rect(sl, x, 1.79, 4.1, 0.05, col)
    box = sl.shapes.add_textbox(Inches(x+0.12), Inches(1.87), Inches(3.86), Inches(5.35))
    tf = box.text_frame; tf.word_wrap = True; tf.margin_left = Pt(4)
    first = True
    for pt in pts:
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False; p.space_before = Pt(5)
        indent = pt.startswith('  ')
        r = p.add_run()
        r.text = (u'  \u25E6 ' if indent else u'\u25CF ') + pt.lstrip()
        r.font.size = Pt(12 if indent else 13)
        r.font.color.rgb = MUTED if indent else DARK_TEXT
        r.font.name = "Calibri"

# ═══════════════════════════════════════════════════════════════
# SLIDE 20 — References & Thank You
# ═══════════════════════════════════════════════════════════════
sl = prs.slides.add_slide(blank)
set_bg(sl, NAVY)
rect(sl, 0, 0, 13.333, 7.5, NAVY)
rect(sl, 0, 0, 0.14, 7.5, AMBER)
rect(sl, 13.19, 0, 0.14, 7.5, SEC3_COL)
rect(sl, 0, 4.6, 13.333, 0.07, AMBER)
rect(sl, 0, 6.82, 13.333, 0.07, AMBER)

tb(sl, "References", 0.3, 0.3, 12.8, 0.65, 22, bold=True, color=AMBER)
refs = [
    "1. Shafer WG, Hine MK, Levy BM. Shafer's Textbook of Oral Pathology. 7th ed. Elsevier, 2012.",
    "2. K J Lee's Essential Otolaryngology. 11th ed. McGraw-Hill Education.",
    "3. Cummings Otolaryngology — Head & Neck Surgery. 7th ed. Elsevier.",
    "4. Scott-Brown's Otorhinolaryngology Head & Neck Surgery. 8th ed. CRC Press/Taylor & Francis.",
    "5. WHO Classification of Head and Neck Tumours. 4th ed. IARC Press, 2017.",
    "6. Robbins, Cotran & Kumar. Pathologic Basis of Disease. 10th ed. Elsevier, 2021.",
]
box = sl.shapes.add_textbox(Inches(0.3), Inches(0.98), Inches(12.8), Inches(3.4))
tf = box.text_frame; tf.word_wrap = True
first = True
for ref in refs:
    p = tf.paragraphs[0] if first else tf.add_paragraph()
    first = False; p.space_before = Pt(6)
    r = p.add_run(); r.text = ref
    r.font.size = Pt(12); r.font.color.rgb = RGBColor(0xCC,0xDD,0xFF); r.font.name = "Calibri"

tb(sl, "Thank You", 0.3, 4.75, 12.8, 1.1, 42, bold=True, color=WHITE, align=PP_ALIGN.CENTER)
tb(sl, "Mixed & Malignant Odontogenic Tumors — Groups II, III & IV",
   0.3, 5.7, 12.8, 0.6, 16, bold=False, color=AMBER, align=PP_ALIGN.CENTER)
tb(sl, "Shafer's Textbook of Oral Pathology  |  Oral & Maxillofacial Pathology",
   0.3, 6.3, 12.8, 0.5, 12, bold=False, color=RGBColor(0xA0,0xC8,0xFF), align=PP_ALIGN.CENTER)

# ── SAVE ──────────────────────────────────────────────────────
out = "/tmp/workspace/odontogenic-tumors/Mixed_Malignant_Odontogenic_Tumors_Shafers.pptx"
buf = BytesIO()
prs.save(buf)
with open(out, "wb") as f:
    f.write(buf.getvalue())
print(f"Saved: {out}")
print(f"Total slides: {len(prs.slides)}")
Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.