Hey orris ! Elaborate in detail about deformity of spine : kyphosis and scoliosis. Take all the reference of reputed books and also make me a detail ppt on it.

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

scoliosis posteroanterior radiograph Cobb angle measurement

This diagnostic image is a posteroanterior (PA) standing radiograph of the full spine, demonstrating Adolescent Idiopathic Scoliosis (AIS). The visual focus is on a significant lateral curvature of the thoracic spine with a right-sided convexity. The Cobb angle, a gold-standard radiological measurement for quantifying the degree of scoliosis, is illustrated using yellow annotation lines. These lines are drawn parallel to the superior endplate of the T5 vertebral body (the upper end vertebra) and the inferior endplate of the T11 vertebral body (the lower end vertebra). The apex of the curve is identified at the T7 level. The measured Cobb angle is indicated as 60.2°, classifying this as a severe scoliotic deformity. The radiograph also captures the cervical spine, lumbar spine, and pelvis, providing a comprehensive view of spinal alignment. This image serves as an educational tool for identifying anatomical landmarks in scoliosis assessment and demonstrating the clinical application of Cobb angle measurement in orthopedic diagnostics.

This diagnostic image is a posteroanterior (PA) standing radiograph of the full spine, demonstrating Adolescent Idiopathic Scoliosis (AIS). The visual focus is on a significant lateral curvature of the thoracic spine with a right-sided convexity. The Cobb angle, a gold-standard radiological measurement for quantifying the degree of scoliosis, is illustrated using yellow annotation lines. These lines are drawn parallel to the superior endplate of the T5 vertebral body (the upper end vertebra) and the inferior endplate of the T11 vertebral body (the lower end vertebra). The apex of the curve is identified at the T7 level. The measured Cobb angle is indicated as 60.2°, classifying this as a severe scoliotic deformity. The radiograph also captures the cervical spine, lumbar spine, and pelvis, providing a comprehensive view of spinal alignment. This image serves as an educational tool for identifying anatomical landmarks in scoliosis assessment and demonstrating the clinical application of Cobb angle measurement in orthopedic diagnostics.

This composite diagnostic image features three posteroanterior (PA) whole-spine radiographs (labeled a, b, and c) of a pediatric patient, demonstrating the progression and management of scoliosis during brace treatment. Radiograph (a) shows a right-convex (leftward) scoliotic curve in the mid-thoracic region at 3 months of treatment, notable for a curve reversal from the initial presentation. Radiograph (b) illustrates a progression of this right-convex curvature at 7 months, with increased vertebral deviation and apical translation. Radiograph (c) displays the spine at 15 months following brace adjustment, showing improved coronal alignment and a reduction in the Cobb angle. Throughout the series, the images provide a comparison of vertebral alignment, rib cage symmetry, and pelvic levelness. This series is an educational example of monitoring idiopathic scoliosis, assessing bracing efficacy, and managing curve overcorrection or reversal in a growing child. It highlights key radiological concepts including Cobb angle measurement, spinal convexity, and longitudinal follow-up in orthopedic pediatrics.

This composite diagnostic image features three posteroanterior (PA) whole-spine radiographs (labeled a, b, and c) of a pediatric patient, demonstrating the progression and management of scoliosis during brace treatment. Radiograph (a) shows a right-convex (leftward) scoliotic curve in the mid-thoracic region at 3 months of treatment, notable for a curve reversal from the initial presentation. Radiograph (b) illustrates a progression of this right-convex curvature at 7 months, with increased vertebral deviation and apical translation. Radiograph (c) displays the spine at 15 months following brace adjustment, showing improved coronal alignment and a reduction in the Cobb angle. Throughout the series, the images provide a comparison of vertebral alignment, rib cage symmetry, and pelvic levelness. This series is an educational example of monitoring idiopathic scoliosis, assessing bracing efficacy, and managing curve overcorrection or reversal in a growing child. It highlights key radiological concepts including Cobb angle measurement, spinal convexity, and longitudinal follow-up in orthopedic pediatrics.

This diagnostic image is a posteroanterior (PA) plain film radiograph of the torso, specifically formatted for scoliosis monitoring. The X-ray demonstrates the thoracolumbar spine and ribcage with digital overlays used for measurement. The visual features show a mild S-shaped lateral curvature of the vertebral column, characteristic of adolescent idiopathic scoliosis. Digital annotations indicate two primary curvatures: a sinistro-convex (left-leaning) thoracic curve with a measured Cobb angle of 14.3 degrees and a dextro-convex (right-leaning) lumbar curve with a measured Cobb angle of 12.2 degrees. The ribcage shows preserved costal integrity without acute displaced fractures in this view. The image is overlayed with a grid pattern to assist in assessing spinal alignment and vertical deviation. This radiographic study is essential for monitoring the progression of spinal deformities in orthopedic and physical medicine contexts, allowing clinicians to track changes in curvature severity over time.

This diagnostic image is a posteroanterior (PA) plain film radiograph of the torso, specifically formatted for scoliosis monitoring. The X-ray demonstrates the thoracolumbar spine and ribcage with digital overlays used for measurement. The visual features show a mild S-shaped lateral curvature of the vertebral column, characteristic of adolescent idiopathic scoliosis. Digital annotations indicate two primary curvatures: a sinistro-convex (left-leaning) thoracic curve with a measured Cobb angle of 14.3 degrees and a dextro-convex (right-leaning) lumbar curve with a measured Cobb angle of 12.2 degrees. The ribcage shows preserved costal integrity without acute displaced fractures in this view. The image is overlayed with a grid pattern to assist in assessing spinal alignment and vertical deviation. This radiographic study is essential for monitoring the progression of spinal deformities in orthopedic and physical medicine contexts, allowing clinicians to track changes in curvature severity over time.

This diagnostic image is a standing posteroanterior (PA) 36-inch full-spine radiograph demonstrating significant adolescent idiopathic scoliosis. The visual field extends from the cervical spine down to the pelvis and proximal femurs, allowing for a comprehensive assessment of coronal and spinopelvic alignment. The primary deformity consists of an S-shaped double curve: a right-convex thoracic curve with a measured Cobb angle of 57.0° and a left-convex lumbar curve with a measured Cobb angle of 41.3°. Measurement lines are visible along the superior and inferior end vertebrae for each curve. Anatomical landmarks include the rib cage, heart silhouette, and pelvic structures (iliac wings, sacrum, and femoral heads). Radiographic markers include a 'STANDING' orientation label and a vertical scale bar calibrated to 240 mm. This imaging modality is essential for preoperative planning in scoliosis surgery to evaluate the severity of the spinal curvature and the patient's global balance.

This diagnostic image is a standing posteroanterior (PA) 36-inch full-spine radiograph demonstrating significant adolescent idiopathic scoliosis. The visual field extends from the cervical spine down to the pelvis and proximal femurs, allowing for a comprehensive assessment of coronal and spinopelvic alignment. The primary deformity consists of an S-shaped double curve: a right-convex thoracic curve with a measured Cobb angle of 57.0° and a left-convex lumbar curve with a measured Cobb angle of 41.3°. Measurement lines are visible along the superior and inferior end vertebrae for each curve. Anatomical landmarks include the rib cage, heart silhouette, and pelvic structures (iliac wings, sacrum, and femoral heads). Radiographic markers include a 'STANDING' orientation label and a vertical scale bar calibrated to 240 mm. This imaging modality is essential for preoperative planning in scoliosis surgery to evaluate the severity of the spinal curvature and the patient's global balance.

Searching Images

kyphosis Scheuermann disease lateral spine radiograph

This diagnostic image consists of two side-by-side lateral X-ray radiographs of the thoracic spine in a pediatric patient, demonstrating the impact of posture on spinal sagittal alignment. The left radiograph displays the spine in an 'active sitting' posture, with a measured thoracic kyphosis angle (T1–T12) of 49 degrees. The right radiograph displays a 'relaxed sitting' posture, showing a marked increase in the kyphotic curve to 69 degrees. This exaggerated curvature, sometimes clinically referred to as 'Sitzbuckel' or 'gameboy back,' illustrates the postural flexibility and the potential for anterior compressive forces on the vertebral bodies and intervertebral discs. The images highlight the clinical importance of sagittal balance and the mechanical influences on spinal development, particularly in the context of adolescent postural kyphosis or early Scheuermann's disease. Key educational features include the measurement of Cobb angles to quantify kyphosis and the visual demonstration of how functional positioning alters the alignment of the thoracic vertebrae and associated soft tissue structures.

This diagnostic image consists of two side-by-side lateral X-ray radiographs of the thoracic spine in a pediatric patient, demonstrating the impact of posture on spinal sagittal alignment. The left radiograph displays the spine in an 'active sitting' posture, with a measured thoracic kyphosis angle (T1–T12) of 49 degrees. The right radiograph displays a 'relaxed sitting' posture, showing a marked increase in the kyphotic curve to 69 degrees. This exaggerated curvature, sometimes clinically referred to as 'Sitzbuckel' or 'gameboy back,' illustrates the postural flexibility and the potential for anterior compressive forces on the vertebral bodies and intervertebral discs. The images highlight the clinical importance of sagittal balance and the mechanical influences on spinal development, particularly in the context of adolescent postural kyphosis or early Scheuermann's disease. Key educational features include the measurement of Cobb angles to quantify kyphosis and the visual demonstration of how functional positioning alters the alignment of the thoracic vertebrae and associated soft tissue structures.

A lateral spinal radiograph demonstrating severe thoracic hyperkyphosis, characteristic of conditions such as Scheuermann's disease. The image shows the full sagittal profile of the spine from the cervical region through the lumbar vertebrae. Anatomical landmarks are labeled in red, including C7, T4, and T12. The thoracic kyphosis (TK) angle is measured using the Stagnara method between the T4 and T12 vertebral bodies, indicated by green lines that quantify the curvature at 69.8 degrees. Further sagittal balance parameters are identified in the lower spine, including the First Lordotic Vertebral body (FLV) and the Sagittal Stable Vertebral body (SSV). A blue vertical reference line marks the Posterior Sagittal Vertical Line (PSVL). This diagnostic imaging is essential for orthopedic assessment, determining surgical instrumentation levels (Upper Instrumented Vertebra and Lowest Instrumented Vertebra), and evaluating the risk of distal junctional kyphosis in pediatric and adolescent spinal deformities.

A lateral spinal radiograph demonstrating severe thoracic hyperkyphosis, characteristic of conditions such as Scheuermann's disease. The image shows the full sagittal profile of the spine from the cervical region through the lumbar vertebrae. Anatomical landmarks are labeled in red, including C7, T4, and T12. The thoracic kyphosis (TK) angle is measured using the Stagnara method between the T4 and T12 vertebral bodies, indicated by green lines that quantify the curvature at 69.8 degrees. Further sagittal balance parameters are identified in the lower spine, including the First Lordotic Vertebral body (FLV) and the Sagittal Stable Vertebral body (SSV). A blue vertical reference line marks the Posterior Sagittal Vertical Line (PSVL). This diagnostic imaging is essential for orthopedic assessment, determining surgical instrumentation levels (Upper Instrumented Vertebra and Lowest Instrumented Vertebra), and evaluating the risk of distal junctional kyphosis in pediatric and adolescent spinal deformities.

This diagnostic image displays a dual-view radiograph of the human spine, featuring a posterior-anterior (PA) view (a) and a lateral view (b) from a standing patient. The imaging demonstrates classic findings of Scheuermann's disease localized to the thoracic spine. In the lateral view, there is prominent hyperkyphosis characterized by multi-segmental anterior wedging of the thoracic vertebral bodies and irregular vertebral endplates. The PA view reveals a concomitant mild thoracic scoliosis, evidenced by a subtle lateral deviation of the spine from the vertical midline. Key anatomical landmarks include the cervical-thoracic junction, the rib cage, and the lumbar vertebrae. This clinical presentation is typical of adolescent spinal deformities, illustrating the structural changes—specifically anterior vertebral body wedging and endplate irregularity—that differentiate structural kyphosis from postural rounding. The image is a primary resource for medical education regarding the diagnostic imaging of pediatric orthopedic spinal conditions.

This diagnostic image displays a dual-view radiograph of the human spine, featuring a posterior-anterior (PA) view (a) and a lateral view (b) from a standing patient. The imaging demonstrates classic findings of Scheuermann's disease localized to the thoracic spine. In the lateral view, there is prominent hyperkyphosis characterized by multi-segmental anterior wedging of the thoracic vertebral bodies and irregular vertebral endplates. The PA view reveals a concomitant mild thoracic scoliosis, evidenced by a subtle lateral deviation of the spine from the vertical midline. Key anatomical landmarks include the cervical-thoracic junction, the rib cage, and the lumbar vertebrae. This clinical presentation is typical of adolescent spinal deformities, illustrating the structural changes—specifically anterior vertebral body wedging and endplate irregularity—that differentiate structural kyphosis from postural rounding. The image is a primary resource for medical education regarding the diagnostic imaging of pediatric orthopedic spinal conditions.

Searching Images

Adams forward bend test rib hump scoliosis clinical photo

Searching PubMed

adolescent idiopathic scoliosis bracing

Searching the Web

kyphosis scoliosis classification management guidelines 2024 2025

Now let me read the pptx skill to build the presentation.
Reading File
Reading File
Reading File
Running Command

mkdir -p /tmp/workspace/spine-deformity-ppt/assets && ls -la /tmp/workspace/

Reading File
Now let me download the four selected images and build the presentation script.
Running Command

cd /tmp/workspace/spine-deformity-ppt && python /tmp/skills/shared/scripts/fetch_images.py \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_38b08dece18f694a37ba994d3827c7be5f611b0a22ef57e0bdddd04c650b2621.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_4aee1c1d4a847fb5ef5351b4d9634ccd72159ef7ae48b3ff6cf7690d786add6b.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_234dae6e349bfc8685f0b78729be51f934361571fb488064ba1db03d2846a9c7.jpg" \ "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_5d07b463b448f6a0ae9f80c0dc4cb40f0f2cc9a0e63a3513307c6aea75c85905.jpg" \ > assets/images_b64.json python3 -c " import json, base64 data = json.load(open('assets/images_b64.json')) names = ['cobb_angle_scoliosis.jpg','scheuermann_lateral.jpg','scheuermann_pa_lateral.jpg','bracing_progression.jpg'] for d, name in zip(data, names): if d['base64']: content = d['base64'].split(',',1)[1] with open(f'assets/{name}','wb') as f: f.write(base64.b64decode(content)) print('saved', name) else: print('FAILED', d['url'], d['error']) " ls -la assets/

All four reference images downloaded. Now let's build the full presentation script.
Writing File

~/spine-deformity-ppt/build_ppt.py

#!/usr/bin/env python3
"""Build a detailed PPT on Spinal Deformities: Kyphosis and Scoliosis."""
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.enum.shapes import MSO_SHAPE
import os

ASSETS = "/tmp/workspace/spine-deformity-ppt/assets"

# ---------- Color Palette ----------
NAVY = RGBColor(0x0B, 0x2E, 0x4E)
TEAL = RGBColor(0x11, 0x7A, 0x8B)
LIGHT_BG = RGBColor(0xF4, 0xF8, 0xFA)
WHITE = RGBColor(0xFF, 0xFF, 0xFF)
DARK_TEXT = RGBColor(0x22, 0x2A, 0x33)
ACCENT_ORANGE = RGBColor(0xE0, 0x7A, 0x2C)
GREY = RGBColor(0x6B, 0x74, 0x7C)

prs = Presentation()
prs.slide_width = Inches(13.333)
prs.slide_height = Inches(7.5)
BLANK = prs.slide_layouts[6]
SW, SH = prs.slide_width, prs.slide_height


def add_slide():
    return prs.slides.add_slide(BLANK)


def set_bg(slide, color=WHITE):
    bg = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, 0, SW, SH)
    bg.fill.solid()
    bg.fill.fore_color.rgb = color
    bg.line.fill.background()
    bg.shadow.inherit = False
    bg.shapes = None
    # send to back
    spTree = slide.shapes._spTree
    spTree.remove(bg._element)
    spTree.insert(2, bg._element)
    return bg


def header_bar(slide, title, kicker=None, dark=True):
    """Top navy header bar with title text."""
    bar = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, 0, SW, Inches(1.15))
    bar.fill.solid()
    bar.fill.fore_color.rgb = NAVY
    bar.line.fill.background()
    bar.shadow.inherit = False

    accent = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, Inches(1.15), SW, Pt(4))
    accent.fill.solid()
    accent.fill.fore_color.rgb = ACCENT_ORANGE
    accent.line.fill.background()
    accent.shadow.inherit = False

    tb = slide.shapes.add_textbox(Inches(0.55), Inches(0.18), Inches(11.5), Inches(0.85))
    tf = tb.text_frame
    tf.word_wrap = True
    tf.vertical_anchor = MSO_ANCHOR.MIDDLE
    if kicker:
        p = tf.paragraphs[0]
        p.text = kicker
        r = p.runs[0]
        r.font.size = Pt(13)
        r.font.color.rgb = RGBColor(0x9F, 0xC6, 0xD2)
        r.font.bold = True
        p2 = tf.add_paragraph()
        p2.text = title
        r2 = p2.runs[0]
        r2.font.size = Pt(28)
        r2.font.bold = True
        r2.font.color.rgb = WHITE
    else:
        tf.text = title
        r = tf.paragraphs[0].runs[0]
        r.font.size = Pt(28)
        r.font.bold = True
        r.font.color.rgb = WHITE
    return tb


def footer(slide, text, num):
    tb = slide.shapes.add_textbox(Inches(0.55), Inches(7.14), Inches(9), Inches(0.3))
    tf = tb.text_frame
    tf.text = text
    r = tf.paragraphs[0].runs[0]
    r.font.size = Pt(10)
    r.font.color.rgb = GREY

    tb2 = slide.shapes.add_textbox(Inches(12.4), Inches(7.14), Inches(0.5), Inches(0.3))
    tf2 = tb2.text_frame
    tf2.text = str(num)
    tf2.paragraphs[0].alignment = PP_ALIGN.RIGHT
    r2 = tf2.paragraphs[0].runs[0]
    r2.font.size = Pt(10)
    r2.font.color.rgb = GREY


def bullets(slide, items, x=0.55, y=1.5, w=6.2, h=5.4, size=16, gap_pt=8, color=DARK_TEXT,
            bullet_color=TEAL, title_size=None):
    """items: list of (text, level) or (text, level, bold)"""
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h))
    tf = tb.text_frame
    tf.word_wrap = True
    first = True
    for item in items:
        text = item[0]
        level = item[1] if len(item) > 1 else 0
        bold = item[2] if len(item) > 2 else False
        p = tf.paragraphs[0] if first else tf.add_paragraph()
        first = False
        p.space_after = Pt(gap_pt)
        indent = "•  " if level == 0 else ("‣  " if level == 1 else "-  ")
        p.text = indent + text
        r = p.runs[0]
        r.font.size = Pt(size - level * 1.5)
        r.font.bold = bold
        r.font.color.rgb = color if level == 0 else GREY
        p.level = 0
    return tb


def section_title(slide, text, x=0.55, y=1.3, size=20, color=NAVY, w=11.5):
    tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(0.5))
    tf = tb.text_frame
    tf.text = text
    r = tf.paragraphs[0].runs[0]
    r.font.size = Pt(size)
    r.font.bold = True
    r.font.color.rgb = color
    return tb


def add_pic_framed(slide, path, x, y, w, h, caption=None):
    pic = slide.shapes.add_picture(path, Inches(x), Inches(y), height=Inches(h))
    # constrain width if too wide
    if pic.width > Inches(w):
        ratio = Inches(w) / pic.width
        pic.width = Inches(w)
        pic.height = int(pic.height * ratio)
    frame = slide.shapes.add_shape(MSO_SHAPE.RECTANGLE, pic.left - Pt(2), pic.top - Pt(2),
                                    pic.width + Pt(4), pic.height + Pt(4))
    frame.fill.background()
    frame.line.color.rgb = TEAL
    frame.line.width = Pt(1.5)
    frame.shadow.inherit = False
    if caption:
        cb = slide.shapes.add_textbox(pic.left, pic.top + pic.height + Pt(4), pic.width, Inches(0.5))
        cf = cb.text_frame
        cf.word_wrap = True
        cf.text = caption
        r = cf.paragraphs[0].runs[0]
        r.font.size = Pt(10.5)
        r.font.italic = True
        r.font.color.rgb = GREY
        cf.paragraphs[0].alignment = PP_ALIGN.CENTER
    return pic


def stat_box(slide, x, y, w, h, number, label, color=TEAL):
    box = slide.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(x), Inches(y), Inches(w), Inches(h))
    box.fill.solid()
    box.fill.fore_color.rgb = color
    box.line.fill.background()
    box.shadow.inherit = False
    tf = box.text_frame
    tf.word_wrap = True
    tf.vertical_anchor = MSO_ANCHOR.MIDDLE
    tf.margin_left = Pt(6); tf.margin_right = Pt(6)
    p = tf.paragraphs[0]
    p.alignment = PP_ALIGN.CENTER
    p.text = number
    r = p.runs[0]
    r.font.size = Pt(22)
    r.font.bold = True
    r.font.color.rgb = WHITE
    p2 = tf.add_paragraph()
    p2.alignment = PP_ALIGN.CENTER
    p2.text = label
    r2 = p2.runs[0]
    r2.font.size = Pt(11)
    r2.font.color.rgb = WHITE


REFS = "Refs: Bailey & Love's Short Practice of Surgery 28e | Campbell's Operative Orthopaedics 15e | Gray's Anatomy for Students | Miller's Review of Orthopaedics 9e"

# =========================================================
# SLIDE 1 — TITLE
# =========================================================
s = add_slide()
set_bg(s, NAVY)
band = s.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, Inches(4.7), SW, Inches(2.8))
band.fill.solid(); band.fill.fore_color.rgb = TEAL; band.line.fill.background(); band.shadow.inherit = False
accent = s.shapes.add_shape(MSO_SHAPE.RECTANGLE, 0, Inches(4.6), SW, Pt(5))
accent.fill.solid(); accent.fill.fore_color.rgb = ACCENT_ORANGE; accent.line.fill.background(); accent.shadow.inherit = False

tb = s.shapes.add_textbox(Inches(0.8), Inches(1.6), Inches(11.7), Inches(1.2))
tf = tb.text_frame; tf.word_wrap = True
tf.text = "DEFORMITIES OF THE SPINE"
r = tf.paragraphs[0].runs[0]; r.font.size = Pt(46); r.font.bold = True; r.font.color.rgb = WHITE

tb2 = s.shapes.add_textbox(Inches(0.8), Inches(2.55), Inches(11.7), Inches(1.0))
tf2 = tb2.text_frame; tf2.text = "Kyphosis and Scoliosis"
r2 = tf2.paragraphs[0].runs[0]; r2.font.size = Pt(30); r2.font.bold = False; r2.font.color.rgb = ACCENT_ORANGE

tb3 = s.shapes.add_textbox(Inches(0.8), Inches(5.05), Inches(11.7), Inches(2.0))
tf3 = tb3.text_frame; tf3.word_wrap = True
tf3.text = "A comprehensive clinical review — anatomy, classification, aetiology, clinical evaluation, imaging, and evidence-based management"
r3 = tf3.paragraphs[0].runs[0]; r3.font.size = Pt(16); r3.font.color.rgb = WHITE
p = tf3.add_paragraph(); p.text = "\nCompiled from Bailey & Love's Short Practice of Surgery, Campbell's Operative Orthopaedics, Gray's Anatomy for Students, and Miller's Review of Orthopaedics, with current PubMed evidence."
r = p.runs[0]; r.font.size = Pt(12.5); r.font.italic = True; r.font.color.rgb = RGBColor(0xDC, 0xEE, 0xF0)

# =========================================================
# SLIDE 2 — AGENDA
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Agenda", kicker="OVERVIEW")
topics = [
    "1. Normal spinal curvatures & terminology",
    "2. Kyphosis — definition, classification, causes",
    "3. Scheuermann's disease & congenital kyphosis",
    "4. Clinical features & investigations of kyphosis",
    "5. Management of kyphosis",
    "6. Scoliosis — definition, Cobb angle, classification",
    "7. Idiopathic scoliosis by age of onset",
    "8. Clinical examination — Adams forward-bend test",
    "9. Investigations — Cobb angle, Risser sign, MRI",
    "10. Management of scoliosis (observation/brace/surgery)",
    "11. Complications & prognosis",
    "12. Current evidence & key references",
]
left = [(t, 0) for t in topics[:6]]
right = [(t, 0) for t in topics[6:]]
bullets(s, left, x=0.6, y=1.5, w=5.9, h=5.3, size=16, gap_pt=14)
bullets(s, right, x=6.8, y=1.5, w=5.9, h=5.3, size=16, gap_pt=14)
footer(s, REFS, 2)

# =========================================================
# SLIDE 3 — NORMAL SPINAL CURVATURES
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Normal Spinal Curvatures", kicker="ANATOMY BASICS")
bullets(s, [
    ("The vertebral column has natural curves in the sagittal plane that provide shock absorption and balance.", 0),
    ("Cervical lordosis — concave posteriorly (secondary curve)", 0),
    ("Thoracic kyphosis — convex posteriorly, normal range 20°-50° (Cobb, T3-T12) (primary curve)", 0),
    ("Lumbar lordosis — concave posteriorly, normal range ~35°-55° (secondary curve)", 0),
    ("Sacral kyphosis — fixed primary curve", 0),
    ("In the coronal plane, the normal spine is straight — any lateral curvature is abnormal (scoliosis).", 0),
    ("Deformities are described by the plane involved:", 0, True),
    ("Sagittal plane → kyphosis (excess) or lordosis (excess)", 1),
    ("Coronal plane → scoliosis", 1),
    ("Axial plane → vertebral rotation (present in true scoliosis)", 1),
], x=0.55, y=1.45, w=7.6, h=5.4, size=15.5, gap_pt=10)
add_pic_framed(s, f"{ASSETS}/cobb_angle_scoliosis.jpg", 8.5, 1.6, 4.3, 4.9,
               caption="PA standing radiograph — Cobb angle measurement technique")
footer(s, "Gray's Anatomy for Students, p.90-92", 3)

# =========================================================
# SLIDE 4 — KYPHOSIS: DEFINITION
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Kyphosis — Definition", kicker="SAGITTAL PLANE DEFORMITY")
bullets(s, [
    ("Kyphosis = an exaggerated posterior convex curvature of the spine in the sagittal plane, most often affecting the thoracic spine — producing a \"hunchback\" or round-back appearance.", 0, True),
    ("Normal thoracic kyphosis measures 20°-50° (Cobb method, T3-T12); values beyond this range are pathological.", 0),
    ("May be:", 0, True),
    ("Postural (flexible) — corrects fully on hyperextension / lying prone; no structural vertebral change", 1),
    ("Structural (fixed) — vertebral wedging/wedge-shaped vertebrae; does NOT correct with posture change", 1),
    ("A sharply angulated, localized kyphosis is called a gibbus deformity — classically due to vertebral body collapse from spinal tuberculosis (Pott's disease)", 0),
], x=0.55, y=1.45, w=7.6, h=5.3, size=16, gap_pt=12)
add_pic_framed(s, f"{ASSETS}/scheuermann_lateral.jpg", 8.5, 1.6, 4.3, 4.8,
               caption="Lateral radiograph: severe thoracic hyperkyphosis with sagittal parameters marked")
footer(s, "Gray's Anatomy for Students, p.92 | Bailey & Love 28e, p.650", 4)

# =========================================================
# SLIDE 5 — KYPHOSIS: CLASSIFICATION
# =========================================================
s = add_slide(); set_bg(s, LIGHT_BG)
header_bar(s, "Kyphosis — Aetiological Classification", kicker="CAUSES")
rows = [
    ("Postural", "Poor posture in adolescents; fully flexible, corrects on extension; no radiographic wedging"),
    ("Scheuermann's disease", "Idiopathic structural adolescent kyphosis; anterior vertebral wedging ≥5° at ≥3 adjacent levels"),
    ("Congenital", "Failure of vertebral formation/segmentation; high risk of progressive neurological deficit"),
    ("Post-traumatic", "Vertebral fracture/collapse causing angular kyphosis"),
    ("Infective / Tuberculous", "Pott's disease — vertebral body destruction producing angular gibbus deformity"),
    ("Post-laminectomy / Post-irradiation", "Iatrogenic loss of posterior support or growth arrest after surgery/radiotherapy"),
    ("Degenerative / Senile", "Disc space narrowing and osteoporotic wedge fractures in the elderly"),
    ("Neuromuscular / Metabolic", "e.g., ankylosing spondylitis (fixed \"chin-on-chest\" cervicothoracic kyphosis), osteogenesis imperfecta, neurofibromatosis"),
]
top = 1.5
row_h = 0.66
for i, (name, desc) in enumerate(rows):
    y = top + i * row_h
    chip = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(0.55), Inches(y), Inches(2.7), Inches(row_h - 0.08))
    chip.fill.solid(); chip.fill.fore_color.rgb = NAVY if i % 2 == 0 else TEAL
    chip.line.fill.background(); chip.shadow.inherit = False
    tf = chip.text_frame; tf.word_wrap = True; tf.vertical_anchor = MSO_ANCHOR.MIDDLE
    tf.margin_left = Pt(6); tf.margin_right = Pt(6)
    tf.text = name
    r = tf.paragraphs[0].runs[0]; r.font.size = Pt(12.5); r.font.bold = True; r.font.color.rgb = WHITE
    dtb = s.shapes.add_textbox(Inches(3.4), Inches(y), Inches(9.3), Inches(row_h - 0.05))
    dtf = dtb.text_frame; dtf.word_wrap = True; dtf.vertical_anchor = MSO_ANCHOR.MIDDLE
    dtf.text = desc
    dr = dtf.paragraphs[0].runs[0]; dr.font.size = Pt(12.5); dr.font.color.rgb = DARK_TEXT
footer(s, "Campbell's Operative Orthopaedics 15e | Miller's Review of Orthopaedics 9e | Bailey & Love 28e", 5)

# =========================================================
# SLIDE 6 — SCHEUERMANN'S DISEASE
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Scheuermann's Disease", kicker="STRUCTURAL ADOLESCENT KYPHOSIS")
bullets(s, [
    ("Definition: increased thoracic kyphosis (>45°) with anterior wedging ≥5° at three or more sequential vertebrae. Aetiology unknown.", 0, True),
    ("Radiographic findings:", 0, True),
    ("Disc-space narrowing and vertebral end-plate irregularities", 1),
    ("Schmorl's nodes (disc herniation into the vertebral body)", 1),
    ("Spondylolysis in 30-50% of cases; coexisting scoliosis in ~33%", 1),
    ("Clinical characteristics:", 0, True),
    ("More common in boys; patients often overweight", 1),
    ("Kyphosis is structural — does NOT fully correct with hyperextension (differentiates from postural round-back)", 1),
    ("Neurological deficit is rare; obtain MRI if present", 1),
    ("Treatment:", 0, True),
    ("Bracing (modified Milwaukee brace) — for progressive curves of 50°-75° with ≥1 year growth remaining (Risser 0-2); often poorly tolerated", 1),
    ("Surgery — posterior spinal fusion with multilevel osteotomies for curves >75°, progressive deformity, or pain refractory to therapy", 1),
], x=0.55, y=1.45, w=7.7, h=5.5, size=14.5, gap_pt=8)
add_pic_framed(s, f"{ASSETS}/scheuermann_pa_lateral.jpg", 8.55, 1.7, 4.2, 4.6,
               caption="PA & lateral views: thoracic hyperkyphosis with vertebral wedging and mild scoliosis")
footer(s, "Miller's Review of Orthopaedics 9e, p.296", 6)

# =========================================================
# SLIDE 7 — CONGENITAL KYPHOSIS
# =========================================================
s = add_slide(); set_bg(s, LIGHT_BG)
header_bar(s, "Congenital Kyphosis (Winter Classification)", kicker="HIGH RISK OF NEUROLOGICAL DEFICIT")
bullets(s, [
    ("Uncommon, but carries a high frequency of associated neurological deficit.", 0),
    ("Results from abnormal vertebral development: failure of formation or failure of segmentation.", 0),
    ("Degree of progression is proportional to the number of vertebrae involved, type of defect, and remaining growth potential.", 0),
    ("Winter classification (3 types):", 0, True),
    ("Type I — Failure of (anterior) formation → most likely to progress and cause neurological compromise", 1),
    ("Type II — Failure of (anterior) segmentation → generally less progressive", 1),
    ("Type III — Mixed formation + segmentation defects", 1),
    ("Subtypes include posterolateral quadrant vertebra, butterfly (sagittal cleft) vertebra, anterior/anterolateral wedged vertebra.", 0),
    ("Bracing is ineffective for congenital vertebral deformities — early surgical fusion is often required to halt progression.", 0, True),
], x=0.55, y=1.5, w=7.6, h=5.3, size=15, gap_pt=11)
tb = s.shapes.add_textbox(Inches(8.5), Inches(1.6), Inches(4.2), Inches(5.0))
box = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(8.5), Inches(1.6), Inches(4.2), Inches(3.2))
box.fill.solid(); box.fill.fore_color.rgb = NAVY; box.line.fill.background(); box.shadow.inherit = False
tf = box.text_frame; tf.word_wrap = True; tf.margin_left = Pt(14); tf.margin_top = Pt(14); tf.margin_right = Pt(10)
tf.text = "Clinical Pearl"
r = tf.paragraphs[0].runs[0]; r.font.bold = True; r.font.size = Pt(16); r.font.color.rgb = ACCENT_ORANGE
p = tf.add_paragraph()
p.text = "When a kyphosis develops in a child with vertebral anomalies, progressive neurological deficit is common — early MRI and spine surgery referral are essential."
r = p.runs[0]; r.font.size = Pt(13.5); r.font.color.rgb = WHITE
footer(s, "Campbell's Operative Orthopaedics 15e, Ch. 41 (McMaster & Singh, JBJS 1999)", 7)

# =========================================================
# SLIDE 8 — CLINICAL FEATURES OF KYPHOSIS
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Kyphosis — Clinical Features & Investigations", kicker="EVALUATION")
bullets(s, [
    ("History:", 0, True),
    ("Onset, progression rate, pain (mechanical vs. night pain suggesting infection/tumour), constitutional symptoms (TB)", 1),
    ("Inspection:", 0, True),
    ("Round-back deformity; in TB, a sharp angular gibbus at the affected level", 1),
    ("Compensatory increase in cervical/lumbar lordosis", 1),
    ("Palpation & special tests:", 0, True),
    ("Test flexibility — ask patient to hyperextend / lie prone: postural kyphosis corrects, structural kyphosis does not", 1),
    ("Full neurological examination — mandatory in congenital and severe kyphosis", 1),
    ("Imaging:", 0, True),
    ("Standing lateral spine radiograph — Cobb angle T3-T12", 1),
    ("MRI — mandatory if neurological signs, rapid progression, angular gibbus, or suspected infection/tumour", 1),
    ("CT — for bony anatomy in congenital/complex deformity and surgical planning", 1),
], x=0.55, y=1.45, w=11.8, h=5.5, size=15.5, gap_pt=8)
footer(s, "Gray's Anatomy for Students, p.92 | Bailey & Love 28e", 8)

# =========================================================
# SLIDE 9 — MANAGEMENT OF KYPHOSIS
# =========================================================
s = add_slide(); set_bg(s, LIGHT_BG)
header_bar(s, "Management of Kyphosis", kicker="TREATMENT LADDER")
steps = [
    ("OBSERVE", "Mild postural kyphosis / curve <50°\nPhysiotherapy, postural correction, extension exercises"),
    ("BRACE", "Progressive structural curve 50°-75° with growth remaining (Risser 0-2)\nModified Milwaukee / TLSO bracing"),
    ("SURGERY", "Curve >75°, rapid progression, neurological deficit, refractory pain, or unstable congenital kyphosis\nPosterior spinal fusion ± multilevel osteotomy"),
]
x = 0.6
w = 3.9
for i, (head, body) in enumerate(steps):
    box = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(x), Inches(1.7), Inches(w), Inches(4.7))
    box.fill.solid()
    box.fill.fore_color.rgb = [NAVY, TEAL, ACCENT_ORANGE][i]
    box.line.fill.background(); box.shadow.inherit = False
    tf = box.text_frame; tf.word_wrap = True; tf.margin_left = Pt(14); tf.margin_right = Pt(12); tf.margin_top = Pt(16)
    tf.text = f"{i+1}.  {head}"
    r = tf.paragraphs[0].runs[0]; r.font.bold = True; r.font.size = Pt(20); r.font.color.rgb = WHITE
    for line in body.split("\n"):
        p = tf.add_paragraph(); p.text = line; p.space_before = Pt(10)
        r = p.runs[0]; r.font.size = Pt(14); r.font.color.rgb = WHITE
    if i < 2:
        arrow = s.shapes.add_shape(MSO_SHAPE.CHEVRON, Inches(x + w + 0.02), Inches(3.7), Inches(0.35), Inches(0.7))
        arrow.fill.solid(); arrow.fill.fore_color.rgb = GREY; arrow.line.fill.background(); arrow.shadow.inherit = False
    x += w + 0.4
note = s.shapes.add_textbox(Inches(0.6), Inches(6.55), Inches(11.8), Inches(0.5))
tf = note.text_frame; tf.word_wrap = True
tf.text = "Ankylosing spondylitis cervicothoracic (\"chin-on-chest\") kyphosis: closing-wedge osteotomy at the cervicothoracic junction."
r = tf.paragraphs[0].runs[0]; r.font.italic = True; r.font.size = Pt(12.5); r.font.color.rgb = GREY
footer(s, "Bailey & Love 28e, p.646 | Miller's Review of Orthopaedics 9e", 9)

# =========================================================
# SLIDE 10 — SCOLIOSIS DEFINITION
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Scoliosis — Definition", kicker="CORONAL / MULTIPLANAR DEFORMITY")
bullets(s, [
    ("Scoliosis = an abnormal, three-dimensional deformity of the spine: lateral curvature in the coronal plane combined with axial (rotational) deformity of the vertebrae.", 0, True),
    ("Lateral curvature is the most visible feature; the rotational component becomes apparent as a rib hump on forward flexion (asymmetric rib cage rotation).", 0),
    ("True (structural) scoliosis: fixed curvature + vertebral rotation; does not correct with position change.", 0),
    ("Postural (non-structural) scoliosis: e.g., due to leg-length discrepancy — corrects when the discrepancy is corrected; no fixed rotation.", 0),
    ("Diagnostic criterion: Cobb angle ≥ 10° on an erect PA spine radiograph, with rotation.", 0, True),
    ("Cobb angle measurement: draw lines along the superior end-plate of the uppermost tilted vertebra and inferior end-plate of the lowest tilted vertebra of the curve; the angle between perpendiculars to these lines = Cobb angle.", 0),
], x=0.55, y=1.45, w=7.6, h=5.4, size=15.5, gap_pt=10)
add_pic_framed(s, f"{ASSETS}/bracing_progression.jpg", 8.5, 1.7, 4.3, 4.6,
               caption="Serial PA radiographs during brace treatment, showing curve/Cobb-angle change over time")
footer(s, "Gray's Anatomy for Students, p.90 | Bailey & Love 28e, p.649", 10)

# =========================================================
# SLIDE 11 — SCOLIOSIS CLASSIFICATION
# =========================================================
s = add_slide(); set_bg(s, LIGHT_BG)
header_bar(s, "Scoliosis — Aetiological Classification", kicker="TABLE 37.13 / TABLE 44.12")
rows = [
    ("Idiopathic", "~70-85% of cases; no identifiable cause; subclassified by age of onset (see next slide)"),
    ("Congenital", "Underlying vertebral malformation (hemivertebra, unilateral bar); often with cardiac, renal, chest-wall anomalies"),
    ("Neuromuscular", "Cerebral palsy, myelomeningocele, muscular dystrophy, spinal muscular atrophy — abnormal muscle tone/imbalance"),
    ("Syndromic", "Associated with genetic syndromes e.g. Marfan, neurofibromatosis, Down syndrome"),
    ("Postural / Compensatory", "Secondary to leg-length discrepancy, pelvic obliquity, muscle spasm — no fixed rotation, resolves with cause"),
    ("Secondary", "Bone tumours, spinal cord tumours, disc protrusion, infection"),
]
top = 1.55
row_h = 0.86
for i, (name, desc) in enumerate(rows):
    y = top + i * row_h
    chip = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(0.55), Inches(y), Inches(2.5), Inches(row_h - 0.1))
    chip.fill.solid(); chip.fill.fore_color.rgb = NAVY if i % 2 == 0 else TEAL
    chip.line.fill.background(); chip.shadow.inherit = False
    tf = chip.text_frame; tf.word_wrap = True; tf.vertical_anchor = MSO_ANCHOR.MIDDLE
    tf.margin_left = Pt(6); tf.margin_right = Pt(6)
    tf.text = name
    r = tf.paragraphs[0].runs[0]; r.font.size = Pt(13); r.font.bold = True; r.font.color.rgb = WHITE
    dtb = s.shapes.add_textbox(Inches(3.2), Inches(y), Inches(9.5), Inches(row_h - 0.05))
    dtf = dtb.text_frame; dtf.word_wrap = True; dtf.vertical_anchor = MSO_ANCHOR.MIDDLE
    dtf.text = desc
    dr = dtf.paragraphs[0].runs[0]; dr.font.size = Pt(13); dr.font.color.rgb = DARK_TEXT
footer(s, "Bailey & Love 28e, Table 37.13 | Bailey & Love 28e, Table 44.12", 11)

# =========================================================
# SLIDE 12 — IDIOPATHIC SCOLIOSIS BY AGE
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Idiopathic Scoliosis — Classified by Age of Onset", kicker="70% OF ALL SCOLIOSIS")
cats = [
    ("Infantile", "0-3 yrs (early onset <10 yrs)", "Rare; may resolve spontaneously; risk of severe cardiopulmonary compromise (cor pulmonale) if progressive, since alveolar development is not complete until age 8"),
    ("Juvenile", "3-10 yrs (early onset)", "Higher risk of progression than adolescent form; needs growth-preserving treatment (casting, growing rods) to protect lung development"),
    ("Adolescent (AIS)", "10-18 yrs / >8 yrs (late onset)", "Most common type; girls affected more than boys; generally painless; near-normal life expectancy; risk of progression relates to female sex, remaining growth, curve size/location"),
    ("Adult", "Onset at skeletal maturity", "De novo degenerative or progression of untreated adolescent curve; often associated with degenerative disc/facet disease and pain"),
]
x = 0.55
w = 2.95
for i, (name, age, desc) in enumerate(cats):
    box = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(x), Inches(1.55), Inches(w), Inches(5.3))
    box.fill.solid(); box.fill.fore_color.rgb = [NAVY, TEAL, ACCENT_ORANGE, GREY][i]
    box.line.fill.background(); box.shadow.inherit = False
    tf = box.text_frame; tf.word_wrap = True; tf.margin_left = Pt(10); tf.margin_right = Pt(10); tf.margin_top = Pt(14)
    tf.text = name
    r = tf.paragraphs[0].runs[0]; r.font.bold = True; r.font.size = Pt(17); r.font.color.rgb = WHITE
    p = tf.add_paragraph(); p.text = age; p.space_before = Pt(4)
    r = p.runs[0]; r.font.size = Pt(12); r.font.italic = True; r.font.color.rgb = RGBColor(0xEA, 0xEA, 0xEA)
    p2 = tf.add_paragraph(); p2.text = desc; p2.space_before = Pt(12)
    r2 = p2.runs[0]; r2.font.size = Pt(11.5); r2.font.color.rgb = WHITE
    x += w + 0.22
footer(s, "Bailey & Love 28e, p.649-650 (Table 44.12)", 12)

# =========================================================
# SLIDE 13 — CLINICAL EXAMINATION
# =========================================================
s = add_slide(); set_bg(s, LIGHT_BG)
header_bar(s, "Clinical Examination of Scoliosis", kicker="ADAMS FORWARD-BEND TEST")
bullets(s, [
    ("Inspection (standing, from behind):", 0, True),
    ("Shoulder / scapular asymmetry, waistline asymmetry, pelvic tilt, trunk shift", 1),
    ("Adams Forward Bend Test:", 0, True),
    ("Patient bends forward at the waist with knees straight and arms hanging free", 1),
    ("Examiner views the back tangentially — reveals a rib hump on the convex side (thoracic curve) or a prominence of lumbar paravertebral muscles (lumbar curve) caused by vertebral rotation", 1),
    ("A scoliometer can quantify the trunk rotation angle at the apex of the hump", 1),
    ("Leg-length assessment: excludes postural (compensatory) scoliosis due to true or apparent leg shortening", 0, True),
    ("Neurological examination: mandatory — abnormal findings (asymmetric abdominal reflexes, weakness) suggest an underlying neuraxial cause and warrant MRI", 0, True),
    ("Assess skin (café-au-lait spots — neurofibromatosis), Marfanoid habitus, cardiac/renal anomalies if congenital scoliosis suspected", 0),
], x=0.55, y=1.5, w=11.9, h=5.5, size=16, gap_pt=10)
footer(s, "Bailey & Love 28e, Fig. 44.35", 13)

# =========================================================
# SLIDE 14 — INVESTIGATIONS
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Investigations in Scoliosis", kicker="IMAGING & STAGING")
bullets(s, [
    ("Standing full-length PA and lateral spine radiograph — first-line; measures the Cobb angle (diagnostic if ≥10°)", 0, True),
    ("Supine lateral bending (side-bending) radiographs — assess curve flexibility before surgical planning", 0),
    ("Risser sign — grades ossification of the iliac apophysis (0-5) to estimate remaining skeletal growth and hence risk of curve progression; low Risser = high progression risk", 0, True),
    ("MRI whole spine — indicated for: atypical curve pattern (left thoracic curve), young age at onset, rapid progression, pain, neurological signs, or before surgery — to exclude syrinx, tethered cord, tumour, Chiari malformation", 0, True),
    ("CT — for detailed bony anatomy in congenital scoliosis and pre-operative instrumentation planning", 0),
    ("Pulmonary function tests — in severe thoracic curves (restrictive lung disease risk)", 0),
    ("Echocardiogram / renal ultrasound — screen for associated cardiac and renal anomalies in congenital scoliosis", 0),
], x=0.55, y=1.45, w=11.9, h=5.5, size=16, gap_pt=11)
footer(s, "Bailey & Love 28e, p.649-651 | Gray's Anatomy for Students", 14)

# =========================================================
# SLIDE 15 — MANAGEMENT OF SCOLIOSIS
# =========================================================
s = add_slide(); set_bg(s, LIGHT_BG)
header_bar(s, "Management of Scoliosis — By Cobb Angle", kicker="TREATMENT LADDER (ADOLESCENT IDIOPATHIC SCOLIOSIS)")
data = [
    ("< 20°", "OBSERVE", "Serial clinical & radiographic review every 4-6 months until skeletal maturity", NAVY),
    ("25° - 40°", "BRACE", "Thoracolumbosacral orthosis (TLSO) / Boston brace in a skeletally immature, progressive curve; worn until growth completion", TEAL),
    ("> 40°-45°", "SURGERY", "Posterior (± anterior) spinal instrumentation and fusion; growing rods / casting for early-onset disease to preserve growth", ACCENT_ORANGE),
]
x = 0.6; w = 3.95
for i, (deg, head, body, col) in enumerate(data):
    box = s.shapes.add_shape(MSO_SHAPE.ROUNDED_RECTANGLE, Inches(x), Inches(1.65), Inches(w), Inches(4.6))
    box.fill.solid(); box.fill.fore_color.rgb = col; box.line.fill.background(); box.shadow.inherit = False
    tf = box.text_frame; tf.word_wrap = True; tf.margin_left = Pt(14); tf.margin_right = Pt(12); tf.margin_top = Pt(18)
    tf.text = deg
    r = tf.paragraphs[0].runs[0]; r.font.bold = True; r.font.size = Pt(26); r.font.color.rgb = WHITE
    p = tf.add_paragraph(); p.text = head; p.space_before = Pt(4)
    r = p.runs[0]; r.font.bold = True; r.font.size = Pt(17); r.font.color.rgb = RGBColor(0xFF,0xE9,0xD2) if col!=ACCENT_ORANGE else NAVY
    p2 = tf.add_paragraph(); p2.text = body; p2.space_before = Pt(12)
    r2 = p2.runs[0]; r2.font.size = Pt(13); r2.font.color.rgb = WHITE
    if i < 2:
        arrow = s.shapes.add_shape(MSO_SHAPE.CHEVRON, Inches(x + w + 0.02), Inches(3.6), Inches(0.35), Inches(0.7))
        arrow.fill.solid(); arrow.fill.fore_color.rgb = GREY; arrow.line.fill.background(); arrow.shadow.inherit = False
    x += w + 0.35
note = s.shapes.add_textbox(Inches(0.6), Inches(6.45), Inches(12.1), Inches(0.6))
tf = note.text_frame; tf.word_wrap = True
tf.text = "Early-onset scoliosis (<8-10 yrs): management must preserve remaining lung growth — serial casting or 'growing rods' rather than early definitive fusion."
r = tf.paragraphs[0].runs[0]; r.font.italic = True; r.font.size = Pt(13); r.font.color.rgb = GREY
footer(s, "Bailey & Love 28e, p.650 | Campbell's Operative Orthopaedics 15e", 15)

# =========================================================
# SLIDE 16 — COMPLICATIONS
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Complications & Prognosis", kicker="KYPHOSIS AND SCOLIOSIS")
col1 = [
    ("Kyphosis complications", 0, True),
    ("Chronic back pain, cosmetic deformity, psychosocial impact", 1),
    ("Restrictive lung disease in severe thoracic curves", 1),
    ("Progressive neurological deficit — especially congenital kyphosis and angular gibbus (TB)", 1),
    ("Sagittal imbalance — compensatory increase in lumbar lordosis, difficulty maintaining forward gaze (ankylosing spondylitis)", 1),
]
col2 = [
    ("Scoliosis complications", 0, True),
    ("Cosmetic deformity, rib hump, trunk asymmetry — psychosocial effects, especially adolescents", 1),
    ("Early-onset severe curves → alveolar under-development, restrictive lung disease, cor pulmonale, right ventricular failure, premature death", 1),
    ("Adolescent idiopathic scoliosis — generally normal/near-normal life expectancy if treated", 1),
    ("Back pain in scoliosis is NOT typical of idiopathic disease — always exclude infection or tumour if pain is prominent", 1),
]
bullets(s, col1, x=0.55, y=1.5, w=5.9, h=5.3, size=15, gap_pt=10)
bullets(s, col2, x=6.8, y=1.5, w=6.0, h=5.3, size=15, gap_pt=10)
footer(s, "Bailey & Love 28e, p.649-651", 16)

# =========================================================
# SLIDE 17 — CURRENT EVIDENCE
# =========================================================
s = add_slide(); set_bg(s, LIGHT_BG)
header_bar(s, "Current Evidence (PubMed, 2024-2025)", kicker="SUPPLEMENTING TEXTBOOK GUIDANCE")
bullets(s, [
    ("Bracing remains a first-line non-operative treatment for adolescent idiopathic scoliosis; recent systematic reviews continue to support its role while highlighting variable evidence quality and the importance of compliance.", 0),
    ("Tang S, Cheung JPY, Cheung PWH. \"Effectiveness of bracing to achieve curve regression in adolescent idiopathic scoliosis.\" Bone Joint J. 2024. (PMID: 38423123) — Systematic review.", 0, True),
    ("Aktan-Ilgaz D, et al. \"Effectiveness of bracing combined with exercise-based treatment of AIS: assessing the synergistic benefits.\" Prosthet Orthot Int. 2025. (PMID: 39298633) — Systematic review; supports combining bracing with scoliosis-specific exercise.", 0, True),
    ("Khodaei M, Parent EC, Wong J. \"Identifying predictors of brace treatment outcomes for adolescents or adults with idiopathic scoliosis.\" Eur Spine J. 2025. (PMID: 40009184) — Systematic review of predictors of brace success.", 0, True),
    ("Clinical takeaway: bracing efficacy is compliance- and predictor-dependent — individualized patient selection and adherence support improve outcomes; findings are consistent with, and refine, the classic textbook treatment thresholds.", 0, True),
], x=0.55, y=1.5, w=11.9, h=5.4, size=15, gap_pt=13)
footer(s, "PubMed search, systematic reviews/meta-analyses, last 3 years", 17)

# =========================================================
# SLIDE 18 — SUMMARY
# =========================================================
s = add_slide(); set_bg(s, WHITE)
header_bar(s, "Summary", kicker="KEY TAKEAWAYS")
bullets(s, [
    ("Kyphosis = excess sagittal (anteroposterior) curvature; Scoliosis = coronal curvature + vertebral rotation.", 0, True),
    ("Both are described by plane, magnitude (Cobb angle), flexibility (postural vs structural), and aetiology (idiopathic, congenital, neuromuscular, syndromic, traumatic, infective).", 0),
    ("Adams forward-bend test and Cobb angle are the cornerstones of clinical and radiological assessment respectively.", 0),
    ("Management follows a graded ladder: observation → bracing → surgery, guided by curve magnitude, growth remaining (Risser sign), and progression risk.", 0),
    ("Red flags demanding urgent MRI / specialist referral: pain, rapid progression, neurological deficit, atypical curve pattern, young age at onset.", 0, True),
    ("Congenital kyphosis and severe early-onset scoliosis carry the highest risk of neurological and cardiopulmonary complications — early recognition is critical.", 0),
], x=0.55, y=1.5, w=11.9, h=5.3, size=16.5, gap_pt=13)
footer(s, REFS, 18)

# =========================================================
# SLIDE 19 — REFERENCES
# =========================================================
s = add_slide(); set_bg(s, NAVY)
tb = s.shapes.add_textbox(Inches(0.7), Inches(0.6), Inches(11.5), Inches(0.8))
tf = tb.text_frame; tf.text = "References"
r = tf.paragraphs[0].runs[0]; r.font.size = Pt(32); r.font.bold = True; r.font.color.rgb = WHITE
refs = [
    "Bailey & Love's Short Practice of Surgery, 28th Edition — Chapters 37 & 44 (Spinal Deformity, Scoliosis, Kyphosis)",
    "Campbell's Operative Orthopaedics, 15th Edition (2026) — Chapters on Spine Deformity, Congenital Kyphosis, Scoliosis",
    "Gray's Anatomy for Students, 4th/5th Edition — Back region, clinical correlates on Scoliosis and Kyphosis",
    "Miller's Review of Orthopaedics, 9th Edition — Pediatric Spine: Scoliosis and Kyphosis",
    "Rockwood and Green's Fractures in Adults, 10th Edition (2025) — Spinal Deformity chapter",
    "Tang S, Cheung JPY, Cheung PWH. Bone Joint J. 2024. PMID: 38423123",
    "Aktan-Ilgaz D, Sahiner H, Eraslan L. Prosthet Orthot Int. 2025. PMID: 39298633",
    "Khodaei M, Parent EC, Wong J. Eur Spine J. 2025. PMID: 40009184",
]
tb2 = s.shapes.add_textbox(Inches(0.7), Inches(1.6), Inches(11.9), Inches(5.4))
tf2 = tb2.text_frame; tf2.word_wrap = True
first = True
for rf in refs:
    p = tf2.paragraphs[0] if first else tf2.add_paragraph()
    first = False
    p.text = "•  " + rf
    p.space_after = Pt(14)
    rr = p.runs[0]; rr.font.size = Pt(15); rr.font.color.rgb = WHITE

prs.save("/tmp/workspace/spine-deformity-ppt/Spinal_Deformities_Kyphosis_Scoliosis.pptx")
print("Saved. Slides:", len(prs.slides.__iter__.__self__._sldIdLst))
Running Command

cd /tmp/workspace/spine-deformity-ppt && python3 build_ppt.py

Successfully built 19 slides. Let me verify the file integrity quickly.
Running Command

cd /tmp/workspace/spine-deformity-ppt && python3 -c " from pptx import Presentation prs = Presentation('Spinal_Deformities_Kyphosis_Scoliosis.pptx') print('Total slides:', len(prs.slides)) for i, slide in enumerate(prs.slides, 1): texts = [sh.text_frame.text.split(chr(10))[0] for sh in slide.shapes if sh.has_text_frame and sh.text_frame.text.strip()] print(i, '-', texts[0] if texts else '(no text)') " && ls -la /tmp/workspace/spine-deformity-ppt/*.pptx

File verified - 19 slides, all content present, 313 KB file. Let me finalize the todos and deliver the full written answer plus the PPT.## Deformities of the Spine: Kyphosis and Scoliosis

Normal spinal curvatures

The vertebral column normally has sagittal curves that provide balance and shock absorption: cervical lordosis, thoracic kyphosis (20°-50°, Cobb T3-T12), lumbar lordosis (35°-55°), and sacral kyphosis. In the coronal plane, the spine is normally straight - any lateral curve is abnormal. - Gray's Anatomy for Students, p. 90-92

KYPHOSIS

Definition: An exaggerated posterior convex curvature of the spine in the sagittal plane, typically thoracic, producing a "hunchback" appearance. Normal thoracic kyphosis is 20°-50°; anything beyond this is pathological. - Bailey and Love's Short Practice of Surgery, 28th ed., p. 650
It may be:
  • Postural (flexible) - fully corrects on hyperextension/prone lying, no vertebral change
  • Structural (fixed) - vertebral wedging, does not correct with posture
  • A sharply angulated, localized form is the gibbus deformity, classically from tuberculous vertebral collapse (Pott's disease) - Gray's Anatomy for Students, p. 92
Aetiological classification:
TypeKey features
PosturalAdolescents, fully flexible, no wedging
Scheuermann's diseaseIdiopathic structural kyphosis, anterior wedging ≥5° at ≥3 adjacent vertebrae
CongenitalFailure of vertebral formation/segmentation; high neurological risk
Post-traumaticVertebral fracture/collapse
TuberculousPott's disease, angular gibbus
Post-laminectomy/irradiationIatrogenic
Degenerative/senileDisc narrowing, osteoporotic wedge fractures
Ankylosing spondylitisFixed cervicothoracic "chin-on-chest" deformity
Scheuermann's disease (Miller's Review of Orthopaedics, 9th ed., p. 296): thoracic kyphosis >45° with ≥5° wedging at 3+ adjacent vertebrae; disc narrowing, end-plate irregularity, Schmorl's nodes, spondylolysis in 30-50%, coexisting scoliosis in ~33%. More common in boys, often overweight; kyphosis does not correct with hyperextension. Bracing (modified Milwaukee brace) for curves of 50°-75° with growth remaining (Risser 0-2); surgery (posterior fusion with osteotomies) for curves >75° or refractory pain.
Congenital kyphosis (Winter classification, Campbell's Operative Orthopaedics, 15th ed.): Type I = failure of formation (most progressive, highest neurological risk); Type II = failure of segmentation (less progressive); Type III = mixed. Bracing is ineffective; early surgical fusion is often needed.
Clinical evaluation: test flexibility (extension/prone lying), full neurological exam (mandatory in congenital/severe cases), standing lateral radiograph for Cobb angle, MRI if neurological signs, rapid progression, or suspected infection/tumour.
Management ladder: observe (mild/postural) → brace (progressive structural, 50°-75°, growth remaining) → surgery (>75°, neurological deficit, refractory pain, unstable congenital kyphosis).

SCOLIOSIS

Definition: A three-dimensional deformity - lateral (coronal) curvature combined with vertebral rotation (axial plane). The rotation manifests as a rib hump on forward flexion. Diagnostic criterion: Cobb angle ≥10° on an erect PA radiograph with rotation. - Bailey and Love's Short Practice of Surgery, 28th ed., p. 649; Gray's Anatomy for Students, p. 90
Aetiological classification (Table 37.13/44.12, Bailey & Love):
  • Idiopathic (~70-85%) - subclassified by age of onset
  • Congenital - vertebral malformation (hemivertebra, bar); associated cardiac/renal/chest-wall anomalies
  • Neuromuscular - cerebral palsy, myelomeningocele, muscular dystrophy
  • Syndromic - Marfan, neurofibromatosis
  • Postural/compensatory - leg-length discrepancy; no fixed rotation
  • Secondary - tumours, infection, disc protrusion
Idiopathic scoliosis by age: Infantile (0-3 yrs, may resolve, cor pulmonale risk if progressive), Juvenile (3-10 yrs, higher progression risk, needs growth-preserving casting/growing rods), Adolescent (most common, girls>boys, generally painless, near-normal life expectancy), Adult (degenerative, often painful).
Clinical examination - Adams forward-bend test: patient bends forward, knees straight, arms hanging; examiner views tangentially for a rib hump (convex side) or lumbar paravertebral prominence. A scoliometer quantifies trunk rotation. Neurological exam and leg-length assessment are mandatory - back pain in scoliosis is atypical for idiopathic disease and should prompt exclusion of infection or tumour.
Investigations: standing PA/lateral radiograph (Cobb angle), supine bending films (flexibility), Risser sign (iliac apophysis ossification - estimates remaining growth/progression risk), MRI (atypical curve, young onset, rapid progression, pain, neurological signs), pulmonary function tests in severe thoracic curves.
Management by Cobb angle (Bailey & Love, p. 650):
  • <20° → observe (serial review every 4-6 months)
  • 25°-40°, progressive, skeletally immature → brace (TLSO/Boston brace)
  • >40°-45°surgery (instrumented fusion); early-onset disease uses growing rods/casting to preserve lung growth
Complications: early-onset severe curves risk restrictive lung disease, cor pulmonale, right ventricular failure and premature death (alveolar development is incomplete before age 8); adolescent idiopathic scoliosis, if managed, carries near-normal life expectancy.

Recent evidence (PubMed, 2024-2025 systematic reviews)

Bracing remains first-line non-operative treatment for adolescent idiopathic scoliosis, though evidence quality is variable and compliance-dependent:
  • Tang et al., Bone Joint J 2024 (PMID: 38423123) - bracing effectiveness for curve regression
  • Aktan-Ilgaz et al., Prosthet Orthot Int 2025 (PMID: 39298633) - bracing + exercise synergy
  • Khodaei et al., Eur Spine J 2025 (PMID: 40009184) - predictors of brace success
These refine, but do not contradict, the classic textbook treatment thresholds above.

Your presentation

I built a 19-slide, fully designed deck covering anatomy, classification, Scheuermann's disease, congenital kyphosis (Winter classification), clinical examination, Cobb angle/Risser sign, treatment ladders for both conditions, complications, current evidence, and full references - with 4 embedded radiographic images (Cobb angle measurement, Scheuermann's kyphosis, bracing progression):

Spinal Deformities Kyphosis Scoliosis

Presentation · PPTX

References used: Bailey and Love's Short Practice of Surgery (28th ed.), Campbell's Operative Orthopaedics (15th ed., 2026), Gray's Anatomy for Students, Miller's Review of Orthopaedics (9th ed.), and PubMed systematic reviews (2024-2025).
This is a shared conversation. Sign in to Orris to start your own chat.