🧠 1. Forensic Psychiatry & Mental Health β€’ What is transvestism? (repeat removed) β€’ What is hallucination? β€’ What are delusions? (multiple repeats merged) β€’ What is Magnan’s syndrome? (repeat merged) β€’ What is Munchausen syndrome by proxy? β€’ Write about intersex. β€’ What is narcoanalysis? β€’ What is solvent abuse? β€’ What is the difference between drug addiction and drug habituation? βΈ» βš–οΈ 2. Medical Jurisprudence & Legal Concepts β€’ What is the right-wrong test? β€’ What is vicarious liability? β€’ Describe privileged communication. β€’ What is testamentary capacity? (repeat merged) β€’ What is IPC Section 320? β€’ What constitutes grievous hurt? (repeat merged) β€’ What is IPC Section 375? β€’ What is the medico-legal importance of age? βΈ» 🧬 3. Identification & Forensic Anthropology β€’ Classify the patterns of fingerprints. β€’ What is dactylography? β€’ What is cheiloscopy? β€’ What is superimposition? β€’ What are the differences between male and female pelvis? β€’ What are the differences between male and female skulls? β€’ What is the difference between human hair and animal hair? βΈ» πŸ‘Ά 4. Reproductive Health, Sexual Offences & MTP β€’ What is the difference between natural and criminal abortion? (repeat merged) β€’ What is the MTP Act? (repeat merged) β€’ Write briefly about surrogacy and its medico-legal significance. β€’ What are abortifacient drugs? β€’ What are the causes of impotency and sterility in males? β€’ What are the signs of a liveborn child? β€’ What is bestiality? βΈ» ☠️ 5. Toxicology & Poisoning β€’ What are the contraindications of gastric lavage? β€’ What is gastric lavage? β€’ What is Burtonian line? β€’ What is plumbism? β€’ What is botulism? β€’ What is ergot poisoning? β€’ Describe the preparation of cannabis. β€’ What is body packer syndrome? β€’ What is the difference between strychnine poisoning and tetanus? βΈ» πŸ”₯ 6. Burns, Injuries & Trauma β€’ What are Joule burns? (repeat merged) β€’ What are the differences between burns (dry, moist, chemical)? β€’ What is the difference between ante-mortem and post-mortem burns? (repeat merged) β€’ What is the Rule of Nines (Wallace rule)? β€’ What are counter-coup lesions? β€’ What are the types of skull fractures? β€’ What are the signs of head injury? βΈ» πŸ§ͺ 7. Forensic Pathology & Autopsy β€’ What is virtual autopsy? β€’ What is negative autopsy? β€’ What is immersion syndrome? β€’ What is cafe coronary? β€’ What is Untersuchungsanboots (immersion foot syndrome)? β€’ What is Burking? β€’ What is battered baby syndrome? βΈ» πŸ”« 8. Ballistics & Firearms β€’ Describe the cartridge of a smooth bore firearm. β€’ Draw a labelled diagram of a shotgun cartridge. β€’ What is a tandem bullet? βΈ» ⚑ 9. Miscellaneous Medical & Forensic Concepts β€’ Describe coma cocktail therapy. β€’ Components of informed consent for surgery. β€’ Describe informed refusal. β€’ What is a lucid interval? β€’ Describe brain stem death. β€’ What is Gustafson’s method? β€’ What is hydrostatic test? β€’ What is Turner’s syndrome? β€’ What is parrot’s perch (position)? β€’ What is vitriolage? β€’ What is the difference between drunkenness and concussion? β€’ What is the difference between neurotoxic and vasculotoxic snake venom?1. What are the implications of ignoring a court summons? 22. What is the borrowed servant doctrine? 32. Describe exhumation. 37. What is IPC Section 84? 42. What is chief and cross-examination in a court of law? 43. What is documentary evidence? 59. What is infamous conduct? 64. What constitutes valid consent? 65. What are the benefits of in loco parentis? 75. What is the doctrine of res ipsa loquitur? 86. What is a subpoena? 100. What is the doctrine of res ipsa loquitur? (repeat) 102. What constitutes grievous hurt? 106. What is privileged communication? (repeat) 117. What is conduct money? 139. What is a subpoena or summons? (repeat) 151. What is an inquest? 10. A body is recovered from a river one week after a suspected drowning incident. Describe the changes of decomposition in such cases. 32. Describe exhumation. (repeat) 38. Enumerate 4 types of early post-mortem changes. 40. Which viscera need to be preserved commonly for chemical analysis during post-mortem examination in a case of poisoning? 81. Describe exhumation (including procedures and indications). (repeat) 85. Describe the preservation of viscera in poisoning cases. 140. What are the methods of removal of organs in post-mortem examination? 154. What are the protocols for sample collection during autopsy? 171. What are the characteristics of entry wounds due to shotgun at various ranges? 11. What causes sudden death? 12. What is Casper's Dictum? 13. What is Tache Noire? 30. Write about suspended animation. 34. What is the differential diagnosis of rigor mortis? 49. What is postmortem caloricity? 50. What is the difference between artificial bruise and true bruise? 77. What is cadaveric spasm? 84. What is suspended animation? (repeat) 89. What is suspended animation? (repeat) 93. What is the difference between rigor mortis and cadaveric spasm? 130. What are the late post-mortem changes? 155. What is post-mortem staining? 158. What is the difference between post-mortem staining and bruising? 5. A 15-year-old student presents with a deep stab wound to his forearm... Describe the detailed information about the stab wound... 9. A 30-year-old woman sustained burns while cooking. How will you assess the burn area and its depth? 14. What are filigree burns? 18. A 40-year-old man accidentally falls... exposed to a concentrated acid solution. Describe the management... 26. Define primary and secondary impact injuries. 29. Describe abrasion in detail. 45. What is primary impact injury? 67. What is the difference between antemortem and postmortem burns? 71. 73. WhWhat is the difference between homicidal and suicidal cut throat wounds?at is the difference between firearm entry and exit wounds? 82. What is contusion? 118. What is laceration? 134. What is the difference between ante-mortem and post-mortem wounds? 137. What are contusions (bruises)? 141. What is the medico-legal importance of abrasions? 4. Describe the postmortem signs of asphyxia. 7. What is the difference between hanging and strangulation? 83. Describe HCN (hydrogen cyanide) poisoning. 135. What is the difference between hanging and strangulation? (repeat) 17. What are the key clinical signs... after a venomous snake bite? 20. Describe the management of aluminium phosphide poisoning. 21. Describe the early symptoms... of acute arsenic poisoning. 35. Describe war gases. 36. Describe the treatment of methanol poisoning. 48. What are the signs and symptoms of Dhatura poisoning? 61. What is the management of OPC poisoning? 79. What is the treatment of methyl alcohol poisoning? 95. What is the difference between arsenic poisoning and cholera? 103. What are the medicolegal duties of a doctor in case of a suspected poisoning. 105. What is the treatment of methyl alcohol poisoning? (repeat) 143. What is the treatment of Datura poisoning. 161. What are the duties of a doctor in a suspected case of poisoning (repeat) 166. What is Dhatura poisoning? (repeat) 39. Enumerate 4 types of unnatural sexual offences. 56. What are the positive signs of pregnancy? 68. What are the confirmatory diagnostic signs of pregnancy? 74. What is the difference between a stillborn and deadborn fetus? 78. What are the types of hymen? 112. What is the difference between a true virgin and false virgin? 164. What are the positive signs of pregnancy? ( 15. What is impulse in the context of forensic psychiatry? 16. What are the key features of mental health assessments in medico-legal contexts? 54. What is transvestism? 69. What is hallucination? 90. What are delusions? 98. What is Magnan's syndrome? 99. What is transvestism? (repeat) 110. What is the right-wrong test? 126. What is Munchausen syndrome by proxy? 131. What are delusions? (repeat) 168. What are delusions? 24. Classify the patterns of fingerprints. 92. What are the differences between male and female pelvis? 107. What is vicarious liability? 108. What is cheiloscopy? 113. What is the difference between human hair and animal hair? 145. What is dactylography? 157. What are the differences between male and female skulls? ### Chapter 10: MTP Act & Reproductive Health (Questions 27, 52, 60, 104, 152) 27. What is the difference between natural and criminal abortion? 52. What is the difference between criminal abortion and natural abortion? (repeat) 60. What is the MTP Act? 104. What is the MTP Act? (repeat) 152. What is the MTP Act? 3. What are the signs of head injury? 6. Describe coma cocktail therapy. 8. Describe the various components... of taking informed consent for surgery. 19. Describe informed refusal. 23. What is a lucid interval? Give an example. 25. Write briefly about surrogacy and its medico-legal significance. 28. Describe privileged communication. 31. Write about intersex. 33. Describe brain stem death. 41. What is virtual autopsy? 44. What is Gustafson's method? 46. What is immersion syndrome? 47. What is testamentary capacity? 55. What is cafe coronary? 57. What is Untersuchungsanboots (immersion foot syndrome)? 58. What is Magnan's syndrome? (repeat) 62. What is negative autopsy? 63. What is superimposition? 70. Describe the cartridge of a smooth bore firearm. 76. What is IPC Section 320? 80. What are Joule burns? 87. What is the hydrostatic test? 88. What is Turner's syndrome? 91. What are Joule burns? (repeat) 94. What are the differences between burns from dry heat, moist heat, and chemicals? 96. What are the contraindications of gastric lavage? 97. What is Burtonian line? 101. What is testamentary capacity? (repeat) 109. What is a tandem bullet? 114. What is the difference between drunkenness and concussion? 115. What are abortifacient drugs? 116. Describe the preparation of cannabis. 119. Draw a labelled diagram of a shotgun cartridge. 120. What is parrot's perch (position)? 121. What is plumbism? 122. What is Burking? 123. What is narcoanalysis? 124. What is solvent abuse? 125. What are Joule burns? (repeat) 127. What is IPC Section 375? 128. What is body packer syndrome? 132. What is the difference between strychnine poisoning and tetanus? 133. What is the difference between drug addiction and drug habituation? 136. What is the medico-legal importance of age? 138. What is botulism? 142. What are counter-coup lesions? 144. What is the 'Rule of Nines' (Wallace rule)? 146. What is gastric lavage? 147. What is ergot poisoning? 148. What is battered baby syndrome? 149. What is bestiality? 150. What constitutes grievous hurt? (repeat) 156. What are the types of skull fractures? 159. What is the difference between ante-mortem and post-mortem burns? (repeat) 160. What is the difference between neurotoxic and vasculotoxic venom snakes? 162. What is vitriolage? 165. What are the causes of impotency and sterility in males? 169. What are the signs of a liveborn child?Forensic Medicine & Toxicology: Chapter-wise List of the 16 Long Questions βΈ» 1. MECHANICAL INJURIES Q1. Road Traffic Accidents (RTA) A 30-year-old male admitted to the casualty department with an alleged history of injuries in road traffic accidents. β€’ Describe the various types of injuries possible in this case. β€’ Mention the medicolegal duties of a doctor in such cases. βΈ» Q5. Firearm Injuries A 10-year-old boy was brought to the emergency with a gunshot injury suffered during celebratory firing in a wedding. On examination, a single entry wound about 1.2 cm in diameter was present on the right side of abdomen 2.5 cm above and lateral to umbilicus at 10 o’clock position. β€’ Classify firearms. β€’ Describe in detail the entry wound with reference to abrasion collar. β€’ Differentiate between the entry wound of a firearm versus entry wound in a stab injury. β€’ Discuss in detail the wound ballistics in a case of rifled firearm. βΈ» Q10. Abrasions Classify injuries. Describe abrasions with their types, age and medicolegal importance. βΈ» 2. ASPHYXIAL DEATHS Q3. Drowning A 23-year-old girl was missing since the last 2 days and was found dead, floating in the nearby pond of her hostel. There was suspicion of sexual assault on her. She had clenched vegetation in her hand and froth was present over mouth and nostrils. Body was shifted to mortuary. β€’ What is the most probable cause of death with reasons? β€’ Differentiate between ante-mortem and post-mortem features in such case. β€’ Which samples need to be preserved in such case? β€’ Define drowning and write various types of drowning. βΈ» Q15. Drowning and Asphyxia A 24-year-old male body was found submerged in a lake. When the body was pulled out of the water it was found that a fine, copious, tenacious, white lathery froth appeared spontaneously over mouth and nostrils, which disappeared on wiping off but reappeared again itself. There was mud and aquatic grass in his hands. β€’ Comment whether the drowning was post-mortem or ante-mortem and describe difference between ante-mortem and post-mortem drowning. β€’ Define asphyxia and describe pathophysiology of asphyxia. β€’ Describe various types of drowning. β€’ Post-mortem findings in a case of drowning. β€’ Write briefly about Diatom test and Gettler test. βΈ» 3. POST-MORTEM CHANGES Q7. Late Post-Mortem Changes The body of a 25-year-old person was brought to the mortuary for post-mortem examination. The body was blackish in colour, bloated, foul smelling and maggots were crawling on it. β€’ Discuss the late changes that occur in a body after death, giving the approximate time duration. β€’ What is adipocere formation? β€’ Why does the body become cold after death? Explain the pathophysiology. β€’ Discuss rigor mortis with its medicolegal importance. βΈ» Q11. Putrefaction and Post-Mortem Interval A body brought for autopsy, on external examination of body there is greenish discoloration on right iliac fossa, greenish brown staining of superficial veins over the limbs and sides of abdomen with foul smell. β€’ What is the probable diagnosis? β€’ Medicolegal aspect of above condition. β€’ Classify changes after death. β€’ Describe in detail about estimation of post-mortem interval. βΈ» 4. SEXUAL OFFENCES Q13. Medicolegal Examination in Sexual Assault After a late-night party an 18-year-old was found in an unfamiliar place, inappropriately dressed, in a drowsy state with inability to recollect events, and was brought by police for medicolegal examination suspecting sexual assault. β€’ What are the objectives of examination? β€’ What is the general procedure of examination? β€’ Give details of local/genital examination. β€’ Enumerate relevant specimens to be collected. βΈ» 5. GENERAL TOXICOLOGY Q2. Organophosphorus Poisoning A 35-year-old man is brought to the emergency department with altered mental status, excessive salivation, sweating, and vomiting. On examination, his pupils are constricted, and he has increased bronchial secretions. Vital signs show hypotension and bradycardia. β€’ Mention the most probable diagnosis. β€’ How will you confirm your diagnosis in this case? β€’ Describe the key steps in the management of this patient with suspected unknown poisoning. βΈ» Q16. Acute Poisoning (Arsenic Poisoning) A buried body was exhumed from the grounds. The body was sent for autopsy along with samples taken from the surrounding soil. β€’ Soil samples are taken to detect which poisoning? β€’ What is post-mortem imbibition? β€’ What are the clinical features of acute poisoning? β€’ Investigations done to detect acute poisoning. β€’ Treatment for acute poisoning. β€’ Differential diagnosis. βΈ» 6. GASEOUS POISONS Q4. Hydrogen Sulphide Poisoning A 58-year-old person went down into a manhole to clean the septic tank. He was found drowsy, had difficulty in breathing, was confused and he was brought to emergency and admitted into ICU ward but in spite of all efforts he died on the following day. β€’ What is the probable diagnosis in this case and its reasons? β€’ Describe differential diagnosis in such case. β€’ Write in detail the management of such case. β€’ What are the post-mortem findings in such case? βΈ» 7. SNAKE BITE Q6. Krait Bite A 32-year-old male while working in a garden near his home is bitten on his left leg by what he believes to be a common krait. He experiences immediate pain followed by swelling and some mild bruising at the bite site. β€’ Differentiate between poisonous and non-poisonous snake. β€’ Describe the clinical manifestations occurring due to krait bite. β€’ Describe the bedside tests done to diagnose such a case. β€’ Discuss in detail the management of snake bite. βΈ» Q8. Viper/Cobra Bite A semiconscious patient was brought to emergency. On examination there are two punctured wounds on right foot, with swelling and bleeding from wound. β€’ What is diagnosis with reasoning? β€’ Describe features of viper snake bite and cobra snake bite. β€’ How will you treat a case of snake bite? β€’ Differentiate between poisonous and non-poisonous snakes. βΈ» 8. INORGANIC POISONS Q9. Aluminium Phosphide Poisoning An 18-year-old male student was brought to emergency with history of ingestion of grain preservative tablet. On examination blood-stained froth around mouth and garlicky odour in breath were present. β€’ What is the most likely diagnosis? β€’ What are the main clinical features? β€’ If patient expires, describe the post-mortem findings and samples to be preserved. βΈ» 9. VEGETABLE POISONS Q12. Datura Poisoning A passenger of train, 40 years of age, was brought to emergency presenting with delirium, dilated pupils, drunken gait, positive Babinski’s sign with increased pulse rate, blood pressure and temperature of body. β€’ Probable diagnosis with reason. β€’ Active principles of this poison. β€’ Fatal dose and fatal period. β€’ Management of this case. β€’ Medicolegal aspects of such cases. βΈ» 10. NARCOTIC POISONS Q14. Opium Poisoning A comatose patient was brought to emergency. On physical examination pupils were contracted to pin-point size and did not react to light, all secretions were suspended except sweat. Skin was cold and covered with perspiration, respiration was slow and stertorous, blood pressure was low and pulse slow and full. Peculiar odour in breath was present. β€’ What is the most probable diagnosis with reasons? β€’ Describe differential diagnosis. β€’ Describe management of case. β€’ Medicolegal significance of such cases. Now give me chapter wise ....dotn make anything pdf , ppt just give me content I will only read here Give me crisp and concise answers of all questions I have given and I need it chapter wse βΈ»reference is narayan R mmeddy and gautam Biswas and other standard books but crisp and concise

Reading File
Finding Sources
All content is compiled above. Here is a quick orientation guide to navigate the full answer:

HOW THIS IS ORGANIZED

The entire syllabus is covered across these chapters:
ChapterTopics
Ch. 1 - Mechanical InjuriesRTA, abrasions, contusions, lacerations, stab wounds, firearm wounds, wound ballistics, burns (all types), skull fractures, head injury signs, counter-coup, ante/post-mortem wounds
Ch. 2 - Asphyxial DeathsHanging vs strangulation, drowning (all aspects), diatom test, Gettler test, asphyxia pathophysiology, cafΓ© coronary, immersion syndrome, HCN poisoning
Ch. 3 - Post-mortem ChangesCauses of sudden death, rigor mortis, cadaveric spasm, algor mortis, livor mortis, putrefaction, adipocere, Casper's dictum, Tache Noire, suspended animation, PMI estimation
Ch. 4 - Sexual Offences & Reproductive HealthIPC 375, sexual assault examination, types of hymen, signs of pregnancy, MTP Act, natural vs criminal abortion, abortifacients, surrogacy, liveborn signs, impotency/sterility, bestiality
Ch. 5 - Forensic PsychiatryTransvestism, hallucinations, delusions, Magnan's syndrome, Munchausen by proxy, intersex, Turner's syndrome, narcoanalysis, solvent abuse, drug addiction vs habituation, impulse, right-wrong test
Ch. 6 - Medical JurisprudenceIPC 84, 320, 375; vicarious liability, privileged communication, testamentary capacity, medico-legal importance of age, court summons, borrowed servant, subpoena, res ipsa loquitur, inquest, conduct money, valid consent, in loco parentis, informed consent/refusal
Ch. 7 - Forensic Anthropology & IdentificationFingerprint classification, dactylography, cheiloscopy, superimposition, male/female pelvis differences, male/female skull differences, human vs animal hair, Gustafson's method
Ch. 8 - ToxicologyGastric lavage + contraindications, Burton's line, plumbism, botulism, ergot, cannabis, body packer syndrome, strychnine vs tetanus, OPC poisoning, arsenic, H2S, datura, methanol, ALP, snake bite (krait, viper, cobra), war gases, viscera preservation, medicolegal duties in poisoning
Ch. 9 - Forensic Pathology & AutopsyVirtual autopsy, negative autopsy, Burking, battered baby syndrome, exhumation, organ removal methods, sample collection, shotgun wounds at various ranges, hydrostatic test, body in water changes
Ch. 10 - BallisticsShotgun cartridge components, tandem bullet
Ch. 11 - MiscellaneousComa cocktail, informed consent components, informed refusal, lucid interval, brainstem death, parrot's perch, vitriolage, drunkenness vs concussion, immersion foot
16 Long QuestionsAll 16 clinical scenarios answered with full management, PMI estimation, sexual assault examination, drowning, poisoning cases

Create a summary PDF with quick reference tables and flowcharts

Reading File
Running Command

mkdir -p /home/daytona/workspace/forensic-pdf && ls /home/daytona/workspace/fore…

Writing File

~/forensic-pdf/generate_pdf.py

from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
    SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle,
    PageBreak, HRFlowable, KeepTogether
)
from reportlab.platypus.flowables import Flowable
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.pdfgen import canvas
from reportlab.lib.colors import HexColor
import os

OUTPUT = "/home/daytona/workspace/forensic-pdf/Forensic_Medicine_Quick_Reference.pdf"

# ── Color palette ──────────────────────────────────────────────────────────────
C_DARK_BLUE   = HexColor("#1a237e")
C_BLUE        = HexColor("#283593")
C_MED_BLUE    = HexColor("#3949ab")
C_LIGHT_BLUE  = HexColor("#e8eaf6")
C_TEAL        = HexColor("#00695c")
C_TEAL_LIGHT  = HexColor("#e0f2f1")
C_RED         = HexColor("#b71c1c")
C_RED_LIGHT   = HexColor("#ffebee")
C_ORANGE      = HexColor("#e65100")
C_ORANGE_LIGHT= HexColor("#fff3e0")
C_GREEN       = HexColor("#2e7d32")
C_GREEN_LIGHT = HexColor("#e8f5e9")
C_PURPLE      = HexColor("#4a148c")
C_PURPLE_LIGHT= HexColor("#f3e5f5")
C_AMBER       = HexColor("#ff6f00")
C_AMBER_LIGHT = HexColor("#fff8e1")
C_GRAY        = HexColor("#424242")
C_LIGHT_GRAY  = HexColor("#f5f5f5")
C_WHITE       = colors.white
C_BLACK       = colors.black

W, H = A4

# ── Page numbering canvas ──────────────────────────────────────────────────────
class NumberedCanvas(canvas.Canvas):
    def __init__(self, *args, **kwargs):
        canvas.Canvas.__init__(self, *args, **kwargs)
        self._saved_page_states = []

    def showPage(self):
        self._saved_page_states.append(dict(self.__dict__))
        self._startPage()

    def save(self):
        num_pages = len(self._saved_page_states)
        for state in self._saved_page_states:
            self.__dict__.update(state)
            self.draw_page_number(num_pages)
            canvas.Canvas.showPage(self)
        canvas.Canvas.save(self)

    def draw_page_number(self, page_count):
        self.setFont("Helvetica", 8)
        self.setFillColor(C_GRAY)
        self.drawRightString(W - 1.5*cm, 1*cm,
            f"Page {self._pageNumber} of {page_count}")
        self.drawString(1.5*cm, 1*cm,
            "Forensic Medicine & Toxicology  |  Quick Reference Summary")
        self.setStrokeColor(C_LIGHT_GRAY)
        self.line(1.5*cm, 1.3*cm, W - 1.5*cm, 1.3*cm)

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

def make_style(name, parent='Normal', **kwargs):
    s = ParagraphStyle(name, parent=styles[parent], **kwargs)
    return s

TITLE_STYLE = make_style('DocTitle',
    fontSize=26, textColor=C_WHITE, alignment=TA_CENTER,
    spaceAfter=6, fontName='Helvetica-Bold', leading=32)

SUBTITLE_STYLE = make_style('DocSubtitle',
    fontSize=13, textColor=HexColor("#bbdefb"), alignment=TA_CENTER,
    spaceAfter=4, fontName='Helvetica', leading=18)

CH_TITLE = make_style('ChapterTitle',
    fontSize=15, textColor=C_WHITE, fontName='Helvetica-Bold',
    alignment=TA_LEFT, leading=20, spaceAfter=2, spaceBefore=2)

SEC_TITLE = make_style('SectionTitle',
    fontSize=11, textColor=C_DARK_BLUE, fontName='Helvetica-Bold',
    spaceBefore=8, spaceAfter=4, leading=14)

BODY = make_style('Body',
    fontSize=8.5, textColor=C_GRAY, fontName='Helvetica',
    leading=12, spaceBefore=1, spaceAfter=1)

BODY_BOLD = make_style('BodyBold',
    fontSize=8.5, textColor=C_BLACK, fontName='Helvetica-Bold',
    leading=12)

SMALL = make_style('Small',
    fontSize=7.5, textColor=C_GRAY, fontName='Helvetica', leading=10)

NOTE = make_style('Note',
    fontSize=8, textColor=C_ORANGE, fontName='Helvetica-Bold',
    leading=11, leftIndent=8)

TH = make_style('TH',
    fontSize=8.5, textColor=C_WHITE, fontName='Helvetica-Bold',
    alignment=TA_CENTER, leading=11)

TD = make_style('TD',
    fontSize=8, textColor=C_GRAY, fontName='Helvetica',
    alignment=TA_LEFT, leading=10)

TD_C = make_style('TDC',
    fontSize=8, textColor=C_GRAY, fontName='Helvetica',
    alignment=TA_CENTER, leading=10)

TD_B = make_style('TDB',
    fontSize=8, textColor=C_BLACK, fontName='Helvetica-Bold',
    alignment=TA_LEFT, leading=10)

FLOW_TITLE = make_style('FlowTitle',
    fontSize=9, textColor=C_WHITE, fontName='Helvetica-Bold',
    alignment=TA_CENTER, leading=12)

FLOW_BODY = make_style('FlowBody',
    fontSize=8, textColor=C_BLACK, fontName='Helvetica',
    alignment=TA_CENTER, leading=11)

# ── Helper builders ────────────────────────────────────────────────────────────
def chapter_header(title, color=C_DARK_BLUE):
    data = [[Paragraph(title, CH_TITLE)]]
    t = Table(data, colWidths=[17*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), color),
        ('ROWBACKGROUNDS', (0,0), (-1,-1), [color]),
        ('TOPPADDING', (0,0), (-1,-1), 6),
        ('BOTTOMPADDING', (0,0), (-1,-1), 6),
        ('LEFTPADDING', (0,0), (-1,-1), 10),
        ('RIGHTPADDING', (0,0), (-1,-1), 6),
        ('ROUNDEDCORNERS', [4,4,4,4]),
    ]))
    return t

def section_box(title, color_light, color_border):
    data = [[Paragraph(title, make_style('ST2',
        fontSize=10, textColor=color_border, fontName='Helvetica-Bold',
        leading=13))]]
    t = Table(data, colWidths=[17*cm])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), color_light),
        ('LINEBELOW', (0,0), (-1,-1), 2, color_border),
        ('TOPPADDING', (0,0), (-1,-1), 4),
        ('BOTTOMPADDING', (0,0), (-1,-1), 4),
        ('LEFTPADDING', (0,0), (-1,-1), 8),
    ]))
    return t

def make_table(headers, rows, col_widths, header_color=C_MED_BLUE,
               alt_color=C_LIGHT_GRAY, border_color=C_BLUE):
    header_row = [Paragraph(h, TH) for h in headers]
    data = [header_row]
    for i, row in enumerate(rows):
        bg = C_WHITE if i % 2 == 0 else alt_color
        data.append([Paragraph(str(c), TD) for c in row])
    t = Table(data, colWidths=col_widths, repeatRows=1)
    style = [
        ('BACKGROUND', (0,0), (-1,0), header_color),
        ('GRID', (0,0), (-1,-1), 0.4, border_color),
        ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, alt_color]),
        ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
        ('TOPPADDING', (0,0), (-1,-1), 3),
        ('BOTTOMPADDING', (0,0), (-1,-1), 3),
        ('LEFTPADDING', (0,0), (-1,-1), 4),
        ('RIGHTPADDING', (0,0), (-1,-1), 4),
    ]
    t.setStyle(TableStyle(style))
    return t

def two_col_table(headers, rows, col_widths, hdr_color=C_TEAL):
    return make_table(headers, rows, col_widths, header_color=hdr_color,
                      alt_color=C_TEAL_LIGHT, border_color=C_TEAL)

def comparison_table(headers, rows, col_widths):
    return make_table(headers, rows, col_widths, header_color=C_RED,
                      alt_color=C_RED_LIGHT, border_color=C_RED)

def flowchart_box(text, width, bg=C_MED_BLUE, text_color=C_WHITE, fontsize=8.5):
    data = [[Paragraph(text, make_style('fc'+str(id(text)),
        fontSize=fontsize, textColor=text_color, fontName='Helvetica-Bold',
        alignment=TA_CENTER, leading=12))]]
    t = Table(data, colWidths=[width])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg),
        ('BOX', (0,0), (-1,-1), 1, C_BLUE),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
        ('ALIGN', (0,0), (-1,-1), 'CENTER'),
    ]))
    return t

def arrow():
    return Paragraph('<para align="center"><b>β–Ό</b></para>',
        make_style('arr', fontSize=11, textColor=C_BLUE, leading=14,
                   alignment=TA_CENTER))

def diamond_box(text, width, bg=C_AMBER_LIGHT):
    data = [[Paragraph(f"β—†  {text}", make_style('db'+str(id(text)),
        fontSize=8, textColor=C_AMBER, fontName='Helvetica-Bold',
        alignment=TA_CENTER, leading=11))]]
    t = Table(data, colWidths=[width])
    t.setStyle(TableStyle([
        ('BACKGROUND', (0,0), (-1,-1), bg),
        ('BOX', (0,0), (-1,-1), 1.5, C_AMBER),
        ('TOPPADDING', (0,0), (-1,-1), 5),
        ('BOTTOMPADDING', (0,0), (-1,-1), 5),
    ]))
    return t

def small_note(text):
    return Paragraph(f"<b>Note:</b> {text}", NOTE)

def bullet_list(items, indent=10):
    elems = []
    for item in items:
        elems.append(Paragraph(f"β€’ {item}", make_style('bullet'+str(id(item)),
            fontSize=8.5, textColor=C_GRAY, fontName='Helvetica',
            leftIndent=indent, leading=12, spaceBefore=1)))
    return elems

def sp(h=4):
    return Spacer(1, h)

def hr(color=C_LIGHT_GRAY):
    return HRFlowable(width="100%", thickness=0.5, color=color, spaceAfter=4, spaceBefore=4)

# ══════════════════════════════════════════════════════════════════════════════
# DOCUMENT CONTENT
# ══════════════════════════════════════════════════════════════════════════════
story = []

# ── COVER PAGE ─────────────────────────────────────────────────────────────────
cover_data = [[
    Paragraph("FORENSIC MEDICINE &amp; TOXICOLOGY", TITLE_STYLE),
    Paragraph("Quick Reference Summary", SUBTITLE_STYLE),
    Paragraph("Tables β€’ Flowcharts β€’ Comparison Charts", make_style('sub2',
        fontSize=11, textColor=HexColor("#90caf9"), alignment=TA_CENTER,
        leading=16, spaceAfter=2)),
    Paragraph("Based on: Narayan Reddy (36th ed.) β€’ Gautam Biswas β€’ Parikh's",
        make_style('ref', fontSize=9, textColor=HexColor("#78909c"),
        alignment=TA_CENTER, leading=13)),
]]
cover = Table([[r] for r in cover_data[0]], colWidths=[17*cm])
cover.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), C_DARK_BLUE),
    ('TOPPADDING', (0,0), (-1,-1), 14),
    ('BOTTOMPADDING', (0,0), (-1,-1), 14),
    ('LEFTPADDING', (0,0), (-1,-1), 20),
    ('RIGHTPADDING', (0,0), (-1,-1), 20),
]))
story.append(Spacer(1, 3*cm))
story.append(cover)
story.append(Spacer(1, 1*cm))

# Chapter index
idx_data = [
    [Paragraph("CHAPTER INDEX", make_style('idx', fontSize=11,
        textColor=C_DARK_BLUE, fontName='Helvetica-Bold', alignment=TA_CENTER,
        leading=14))],
]
chapters = [
    ("1", "Mechanical Injuries", "Wounds, Burns, Skull Fractures, Firearms"),
    ("2", "Asphyxial Deaths", "Hanging, Drowning, Asphyxia Signs"),
    ("3", "Post-mortem Changes", "Rigor, Livor, Putrefaction, PMI"),
    ("4", "Sexual Offences & Reproductive Health", "MTP Act, Pregnancy, Abortion"),
    ("5", "Forensic Psychiatry", "Hallucinations, Delusions, Narcoanalysis"),
    ("6", "Medical Jurisprudence", "IPC Sections, Legal Doctrines"),
    ("7", "Forensic Anthropology", "Fingerprints, Pelvis, Skull, Hair"),
    ("8", "Toxicology", "Poisons, Antidotes, Management"),
    ("9", "Forensic Pathology & Autopsy", "Autopsy Types, Exhumation, Preservation"),
    ("10", "Ballistics", "Shotgun Cartridge, Firearm Wounds"),
    ("11", "Clinical Flowcharts", "OPC, Snakebite, Drowning, Datura"),
]
idx_rows = [[Paragraph(f"<b>Ch {c}</b>", TD_B),
             Paragraph(t, TD_B),
             Paragraph(s, TD)] for c,t,s in chapters]
idx_table = Table(
    [[Paragraph("Ch", TH), Paragraph("Title", TH), Paragraph("Key Topics", TH)]] + idx_rows,
    colWidths=[1.5*cm, 6*cm, 9.5*cm]
)
idx_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_DARK_BLUE),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_LIGHT_BLUE]),
    ('GRID', (0,0), (-1,-1), 0.4, C_MED_BLUE),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(idx_table)
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 1 β€” MECHANICAL INJURIES
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 1  |  MECHANICAL INJURIES", C_RED))
story.append(sp(6))

story.append(section_box("Wound Classification", C_RED_LIGHT, C_RED))
story.append(sp(4))
wound_class = make_table(
    ["Wound Type", "Cause", "Margins", "Tissue Bridges", "Key Feature"],
    [
        ["Abrasion", "Tangential blunt force", "Irregular", "Absent", "Skin tags show direction"],
        ["Contusion", "Blunt force (vessels rupture)", "Skin intact", "N/A", "Color changes with age"],
        ["Laceration", "Tearing blunt force", "Irregular, bruised", "Present", "Slower healing"],
        ["Incised", "Sharp edge", "Clean, everted", "Absent", "Length > depth"],
        ["Stab", "Pointed/sharp", "Clean", "Absent", "Depth > length"],
        ["Chop wound", "Heavy sharp weapon", "Clean but deep", "Absent", "Bone may be cleaved"],
        ["Firearm entry", "Bullet", "Inverted + abrasion collar", "Absent", "Grease ring, tattooing"],
    ],
    [3*cm, 3.5*cm, 3*cm, 2.5*cm, 5*cm],
    header_color=C_RED, alt_color=C_RED_LIGHT, border_color=C_RED
)
story.append(wound_class)
story.append(sp(8))

story.append(section_box("Ageing of Bruise (Contusion)", C_ORANGE_LIGHT, C_ORANGE))
story.append(sp(4))
bruise_age = make_table(
    ["Time", "Color", "Process"],
    [
        ["0-2 days", "Red β†’ Blue-Purple", "Oxyhemoglobin β†’ Deoxyhemoglobin"],
        ["2-4 days", "Blue-Black", "Further deoxygenation"],
        ["4-6 days", "Green", "Hemoglobin β†’ Biliverdin"],
        ["6-10 days", "Yellow", "Biliverdin β†’ Bilirubin"],
        ["10-14 days", "Brown β†’ Fades", "Bilirubin absorbed"],
    ],
    [3*cm, 4*cm, 10*cm],
    header_color=C_ORANGE, alt_color=C_ORANGE_LIGHT, border_color=C_ORANGE
)
story.append(bruise_age)
story.append(sp(8))

story.append(section_box("Ageing of Abrasion", C_GREEN_LIGHT, C_GREEN))
story.append(sp(4))
ab_age = make_table(
    ["Time", "Appearance"],
    [
        ["Fresh", "Red, moist, slightly depressed"],
        ["12-24 hrs", "Drying begins, crust forming"],
        ["2-3 days", "Brown/yellowish scab"],
        ["4-5 days", "Scab lifts at edges"],
        ["7-14 days", "Healed with hyperpigmentation"],
    ],
    [4*cm, 13*cm],
    header_color=C_GREEN, alt_color=C_GREEN_LIGHT, border_color=C_GREEN
)
story.append(ab_age)
story.append(sp(8))

story.append(section_box("Firearm: Entry vs Exit Wound", C_PURPLE_LIGHT, C_PURPLE))
story.append(sp(4))
fw = comparison_table(
    ["Feature", "Entry Wound", "Exit Wound"],
    [
        ["Size", "Smaller", "Larger (usually)"],
        ["Margins", "Inverted + abrasion collar", "Everted, no collar"],
        ["Shape", "Circular/punched out", "Irregular, slit-like"],
        ["Soiling", "Grease ring + powder tattoo", "None"],
        ["Bone bevel", "Inward", "Outward"],
        ["Burning/Singeing", "Present (close range)", "Absent"],
    ],
    [4*cm, 6.5*cm, 6.5*cm]
)
story.append(fw)
story.append(sp(8))

story.append(section_box("Burns: Dry vs Moist vs Chemical", C_ORANGE_LIGHT, C_ORANGE))
story.append(sp(4))
burns = comparison_table(
    ["Feature", "Dry Heat (Flame)", "Moist Heat (Scald)", "Chemical"],
    [
        ["Blister", "Present, small", "Large, thin-walled", "Absent (coagulation)"],
        ["Depth", "Variable", "Superficial-partial", "Deep"],
        ["Margin", "Irregular", "Irregular", "Well-defined"],
        ["Soot/Singeing", "Present", "Absent", "Absent"],
        ["Odour", "Burnt hair", "None", "Chemical"],
        ["Eschar", "Leathery", "Soft", "Hard, firm"],
    ],
    [3*cm, 4.5*cm, 4.5*cm, 5*cm]
)
story.append(burns)
story.append(sp(8))

story.append(section_box("Antemortem vs Postmortem Burns", C_RED_LIGHT, C_RED))
story.append(sp(4))
ampm_burns = comparison_table(
    ["Feature", "Antemortem", "Postmortem"],
    [
        ["Vital reaction", "Present (hyperemia, inflammation)", "Absent"],
        ["Blister fluid", "Serous with proteins + WBCs", "Watery, no cells"],
        ["CO-Hb in blood", "Elevated (>10%)", "Low/absent"],
        ["Soot in airways", "Present (inhaled)", "Surface only"],
        ["Erythema at margins", "Present", "Absent"],
    ],
    [4.5*cm, 6.25*cm, 6.25*cm]
)
story.append(ampm_burns)
story.append(sp(8))

story.append(section_box("Rule of Nines (Wallace Rule)", C_LIGHT_BLUE, C_MED_BLUE))
story.append(sp(4))
nines = two_col_table(
    ["Body Part", "Adult %", "Notes"],
    [
        ["Head & Neck", "9%", "18% in infants (Lund-Browder)"],
        ["Each Upper Limb", "9% (x2 = 18%)", ""],
        ["Anterior Trunk", "18%", ""],
        ["Posterior Trunk", "18%", ""],
        ["Each Lower Limb", "18% (x2 = 36%)", "Each thigh 13% in child (Lund-Browder)"],
        ["Perineum", "1%", ""],
        ["TOTAL", "100%", ""],
    ],
    [5*cm, 4*cm, 8*cm], hdr_color=C_MED_BLUE
)
story.append(nines)
story.append(sp(8))

story.append(section_box("Types of Skull Fractures", C_LIGHT_BLUE, C_DARK_BLUE))
story.append(sp(4))
skull = two_col_table(
    ["Type", "Mechanism", "Key Sign"],
    [
        ["Linear (fissured)", "Most common; blunt force", "Simple crack, no displacement"],
        ["Depressed", "Concentrated force", "Bone pushed inward; brain injury risk"],
        ["Comminuted", "Severe force", "Multiple fragments"],
        ["Pond/Ping-pong", "Infants only", "Indentation without fragmentation"],
        ["Ring fracture", "Vertical force on spine", "Around foramen magnum"],
        ["Contre-coup", "Distant from impact", "Fracture at contralateral site"],
    ],
    [4*cm, 5*cm, 8*cm]
)
story.append(skull)
story.append(sp(6))
story += bullet_list([
    "<b>Battle's sign</b> - bruising over mastoid = petrous temporal fracture",
    "<b>Raccoon eyes</b> - periorbital ecchymosis = anterior fossa fracture",
    "<b>CSF rhinorrhoea/otorrhoea</b> - base of skull fracture"
])
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 2 β€” ASPHYXIAL DEATHS
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 2  |  ASPHYXIAL DEATHS", C_TEAL))
story.append(sp(6))

story.append(section_box("Hanging vs Strangulation", C_TEAL_LIGHT, C_TEAL))
story.append(sp(4))
hang_vs = comparison_table(
    ["Feature", "Hanging", "Strangulation"],
    [
        ["Ligature position", "Above thyroid cartilage; oblique", "Below thyroid cartilage; horizontal"],
        ["Ligature mark", "Oblique, incomplete (open at knot)", "Horizontal, complete/continuous"],
        ["Manner", "Mostly suicidal", "Mostly homicidal"],
        ["Face", "Pale (typical) / congested (atypical)", "Congested + cyanosed"],
        ["Petechiae", "Less prominent", "Prominent (conjunctiva, face)"],
        ["Hyoid fracture", "Rare (< 20%)", "Common (> 50%)"],
        ["Fracture-dislocation", "C2-C3 (judicial); none (typical)", "Absent"],
    ],
    [4*cm, 6.5*cm, 6.5*cm]
)
story.append(hang_vs)
story.append(sp(8))

story.append(section_box("Antemortem vs Postmortem Drowning", C_LIGHT_BLUE, C_MED_BLUE))
story.append(sp(4))
drown = comparison_table(
    ["Feature", "Antemortem", "Postmortem"],
    [
        ["Froth at mouth/nostrils", "Persistent, lathery, white", "Absent or watery"],
        ["Lungs", "Emphysema aquosum (waterlogged)", "Normal or putrefied"],
        ["Diatoms (bone marrow)", "Present", "Only superficial contamination"],
        ["Gettler test", "Positive", "Negative"],
        ["Cadaveric spasm", "May be present (vegetation in hand)", "Absent"],
        ["Vital reaction in lungs", "Present", "Absent"],
        ["Cutis anserina", "Present", "May be absent"],
    ],
    [4.5*cm, 6.25*cm, 6.25*cm]
)
story.append(drown)
story.append(sp(8))

story.append(section_box("Types of Drowning", C_TEAL_LIGHT, C_TEAL))
story.append(sp(4))
drown_types = two_col_table(
    ["Type", "Mechanism", "Key Feature"],
    [
        ["Wet (Typical)", "Water aspiration into lungs", "Most common (~85%)"],
        ["Dry", "Laryngospasm; no water enters", "~10-15%; dry lungs at autopsy"],
        ["Secondary", "Delayed pulmonary edema after rescue", "Death hours after rescue"],
        ["Immersion Syndrome", "Vagal inhibition by cold water", "Sudden death; no drowning evidence"],
        ["Saltwater", "Hypertonic; draws fluid into alveoli", "Hemoconcentration"],
        ["Freshwater", "Hypotonic; absorbed; hemolysis", "Hemodilution; hyponatremia"],
    ],
    [3*cm, 6*cm, 8*cm]
)
story.append(drown_types)
story.append(sp(8))

story.append(section_box("Post-mortem Signs of Asphyxia", C_PURPLE_LIGHT, C_PURPLE))
story.append(sp(4))
asx = two_col_table(
    ["Location", "Finding"],
    [
        ["Face/neck", "Congestion, cyanosis, petechiae (Tardieu spots)"],
        ["Eyes", "Conjunctival petechiae"],
        ["Right heart", "Dilated, engorged with dark blood"],
        ["Lungs", "Congested, edematous, subpleural Tardieu spots"],
        ["Brain", "Congested, edematous"],
        ["Blood", "Dark, liquid, unclotted"],
    ],
    [4*cm, 13*cm]
)
story.append(asx)
story.append(sp(6))
story.append(small_note("Tardieu spots = subpleural/subepicardial petechiae. NOT pathognomonic of asphyxia alone."))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 3 β€” POST-MORTEM CHANGES
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 3  |  POST-MORTEM CHANGES", C_PURPLE))
story.append(sp(6))

story.append(section_box("Early Post-mortem Changes Timeline", C_PURPLE_LIGHT, C_PURPLE))
story.append(sp(4))
pm_timeline = two_col_table(
    ["Change", "Onset", "Peak / Fixed", "Key Details"],
    [
        ["Pallor", "Immediate", "Minutes", "Capillary emptying"],
        ["Algor mortis (cooling)", "Immediate", "~0.5-1.5Β°F/hr loss", "Henssge nomogram used"],
        ["Livor mortis", "30 min - 2 hrs", "Fixed at 8-12 hrs", "Dependent parts; blue-purple"],
        ["Rigor mortis", "1-2 hrs", "Complete 6-12 hrs", "Disappears 24-36 hrs; Nysten's rule"],
        ["Putrefaction begins", "24-48 hrs (summer)", "Variable", "Green staining RIF first"],
    ],
    [4*cm, 3.5*cm, 4*cm, 5.5*cm], hdr_color=C_PURPLE
)
story.append(pm_timeline)
story.append(sp(8))

story.append(section_box("Rigor Mortis vs Cadaveric Spasm", C_TEAL_LIGHT, C_TEAL))
story.append(sp(4))
rm_cs = comparison_table(
    ["Feature", "Rigor Mortis", "Cadaveric Spasm"],
    [
        ["Onset", "1-2 hrs after death", "Instantaneous at moment of death"],
        ["Primary relaxation", "Present (flaccid phase first)", "Absent (no flaccid phase)"],
        ["Muscles affected", "All muscles (generalized)", "Only muscles active at death"],
        ["Medicolegal importance", "Helps estimate time of death", "Confirms ante-mortem event; identifies weapon/item gripped"],
        ["Chemical basis", "ATP depletion β†’ actin-myosin lock", "Sudden maximal ATP depletion"],
    ],
    [4.5*cm, 6.25*cm, 6.25*cm]
)
story.append(rm_cs)
story.append(sp(8))

story.append(section_box("Livor Mortis vs Bruise", C_RED_LIGHT, C_RED))
story.append(sp(4))
lm_br = comparison_table(
    ["Feature", "Livor Mortis", "Bruise"],
    [
        ["Skin surface", "Intact", "May show trauma"],
        ["Location", "Dependent areas (gravitational)", "Site of trauma (any)"],
        ["On incision", "Blood in vessels; wipes away", "Blood infiltrates tissues; cannot wipe"],
        ["Pattern", "Diffuse, staining large areas", "Localized"],
        ["Histology", "Vessels intact", "Ruptured vessels; extravasation"],
        ["Color changes", "No ageing changes", "Shows progressive color change"],
    ],
    [4.5*cm, 6.25*cm, 6.25*cm]
)
story.append(lm_br)
story.append(sp(8))

story.append(section_box("Late Post-mortem Changes", C_ORANGE_LIGHT, C_ORANGE))
story.append(sp(4))
late_pm = two_col_table(
    ["Change", "Conditions Required", "Timeline", "Medico-legal Importance"],
    [
        ["Putrefaction", "Warm, moist, aerobic", "24 hrs (summer) - weeks (winter)", "PMI estimation; identifies smell of certain poisons"],
        ["Adipocere", "Warm, moist, anaerobic", "3-4 weeks onset; months complete", "Preserves shape + injury evidence"],
        ["Mummification", "Hot, dry, well-ventilated", "~3 months", "Preserves form; leathery, parchment-like"],
        ["Skeletonization", "Variable", "Months-years", "Anthropological ID; Gustafson's method"],
    ],
    [3*cm, 4.5*cm, 3.5*cm, 6*cm]
)
story.append(late_pm)
story.append(sp(6))
story.append(small_note("Casper's Dictum: 1 week in air = 2 weeks in water = 8 weeks in earth (relative rate of decomposition)"))
story.append(sp(8))

story.append(section_box("PMI Estimation Methods", C_LIGHT_BLUE, C_DARK_BLUE))
story.append(sp(4))
pmi = two_col_table(
    ["Method", "Basis", "Reliability"],
    [
        ["Algor mortis", "Body temperature drop (~1Β°F/hr)", "Best in first 24 hrs; Henssge nomogram"],
        ["Rigor mortis", "Stage (onset/complete/resolved)", "Rough estimate; affected by temperature"],
        ["Livor mortis", "Stage (unfixed β†’ fixed at 8-12 hrs)", "Early PMI estimation"],
        ["Putrefaction stage", "Decomposition progression", "Later PMI; variable"],
        ["Vitreous K+ level", "K+ rises predictably post-death", "Reliable; 14 mmol/L/day rise"],
        ["Stomach contents", "Digestion state", "Time of last meal"],
        ["Entomology (insects)", "Blow fly stages (egg β†’ pupa β†’ adult)", "Useful after 72 hrs"],
    ],
    [4*cm, 7*cm, 6*cm]
)
story.append(pmi)
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 4 β€” REPRODUCTIVE HEALTH & SEXUAL OFFENCES
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 4  |  REPRODUCTIVE HEALTH & SEXUAL OFFENCES", C_TEAL))
story.append(sp(6))

story.append(section_box("MTP Act 1971 (Amended 2021) - Quick Reference", C_TEAL_LIGHT, C_TEAL))
story.append(sp(4))
mtp = two_col_table(
    ["Gestation", "Who Can Approve", "Grounds"],
    [
        ["Up to 20 weeks", "1 Registered Medical Practitioner", "Any ground (risk to life, rape, contraceptive failure, fetal abnormality)"],
        ["20-24 weeks", "2 Registered Medical Practitioners", "Special categories: rape/incest survivors, minors, disabled women, unmarried women (2021 amendment)"],
        ["Beyond 24 weeks", "State-level Medical Board", "Substantial fetal abnormality only"],
    ],
    [3.5*cm, 5.5*cm, 8*cm]
)
story.append(mtp)
story.append(sp(6))
story += bullet_list([
    "Commercial surrogacy is <b>ILLEGAL</b> in India (Surrogacy Regulation Act 2021); only altruistic permitted",
    "IPC 312-316: causing miscarriage; punishment for criminal abortion",
    "Statutory rape: sexual intercourse with a person under 18 years = rape regardless of consent (IPC 375)"
])
story.append(sp(8))

story.append(section_box("Natural vs Criminal Abortion", C_RED_LIGHT, C_RED))
story.append(sp(4))
abort = comparison_table(
    ["Feature", "Natural (Spontaneous)", "Criminal (Induced Illegally)"],
    [
        ["Cause", "Chromosomal, anatomical, infection", "Instruments, drugs, violence"],
        ["Cervical injuries", "Absent", "Present (lacerations)"],
        ["Uterine injuries", "Absent", "Perforation possible"],
        ["Peritonitis", "Absent", "May be present"],
        ["Sepsis", "Uncommon", "Common (septic abortion)"],
        ["IPC", "Not punishable", "IPC 312-316"],
    ],
    [4.5*cm, 6.25*cm, 6.25*cm]
)
story.append(abort)
story.append(sp(8))

story.append(section_box("Signs of Liveborn Child (Hydrostatic Test)", C_GREEN_LIGHT, C_GREEN))
story.append(sp(4))
live = two_col_table(
    ["Test", "Positive Finding = Liveborn", "Limitation"],
    [
        ["Hydrostatic (Breslau) test", "Lungs float in water", "False +ve: putrefaction; artificial respiration"],
        ["Lung weight", "1/35 of body weight (stillborn = 1/70)", "Variable"],
        ["Docimasia hepatica", "Glycogen present in liver", "Less reliable"],
        ["Wreden's test (ear)", "Middle ear fluid absorbed", "Moderately reliable"],
        ["Stomach/Duodenum test", "Air/milk present", "Useful if > 1 hr after birth"],
    ],
    [4*cm, 6*cm, 7*cm]
)
story.append(live)
story.append(sp(8))

story.append(section_box("Positive (Definitive) Signs of Pregnancy", C_PURPLE_LIGHT, C_PURPLE))
story.append(sp(4))
preg = two_col_table(
    ["Sign", "Method", "When Detectable"],
    [
        ["Fetal heart sounds", "Auscultation / Doppler", "20 wks auscultation; 10-12 wks Doppler"],
        ["Fetal movements felt by examiner", "Palpation / Ballottement", "From 20-22 weeks"],
        ["Ultrasound: fetal heartbeat + parts", "USG", "From 6-7 weeks (TVS)"],
        ["X-ray fetal skeleton", "Plain X-ray", "After 16 weeks (not routine)"],
    ],
    [4*cm, 5*cm, 8*cm]
)
story.append(preg)
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 5 β€” FORENSIC PSYCHIATRY
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 5  |  FORENSIC PSYCHIATRY", C_PURPLE))
story.append(sp(6))

story.append(section_box("Types of Delusions", C_PURPLE_LIGHT, C_PURPLE))
story.append(sp(4))
delusions = two_col_table(
    ["Type", "Description", "Associated Condition"],
    [
        ["Persecutory", "Believes being harmed/plotted against (most common)", "Schizophrenia, paranoid disorder"],
        ["Grandiose", "Believes has special powers/identity", "Mania, schizophrenia"],
        ["Jealousy (Othello)", "Believes partner is unfaithful", "Alcohol abuse, schizophrenia"],
        ["Erotomanic (de Clerambault)", "Believes famous person is in love with them", "Erotomania, schizophrenia"],
        ["Nihilistic (Cotard)", "Believes they/world does not exist", "Severe depression"],
        ["Reference", "Believes events have special meaning for them", "Schizophrenia"],
        ["Capgras", "Familiar person replaced by imposter", "Organic brain disorders"],
    ],
    [4*cm, 6*cm, 7*cm]
)
story.append(delusions)
story.append(sp(8))

story.append(section_box("Drug Addiction vs Drug Habituation", C_ORANGE_LIGHT, C_ORANGE))
story.append(sp(4))
add_hab = comparison_table(
    ["Feature", "Addiction", "Habituation"],
    [
        ["Dependence", "Physical + Psychological", "Psychological only"],
        ["Tolerance", "Marked", "Mild or absent"],
        ["Withdrawal symptoms", "Severe physical symptoms", "Mild; mainly psychological craving"],
        ["Compulsion", "Compulsive use (cannot stop)", "Desire (can stop if motivated)"],
        ["Harm", "Individual + society", "Primarily individual"],
        ["Examples", "Morphine, heroin, alcohol", "Caffeine, mild sedatives, cannabis (debated)"],
    ],
    [4.5*cm, 6.25*cm, 6.25*cm]
)
story.append(add_hab)
story.append(sp(8))

story.append(section_box("M'Naghten Rules (Right-Wrong Test) β€” IPC Section 84", C_LIGHT_BLUE, C_DARK_BLUE))
story.append(sp(4))
mnag = two_col_table(
    ["Criterion", "Details"],
    [
        ["Rule 1", "Accused must be suffering from disease of mind / unsoundness at time of act"],
        ["Rule 2", "Did NOT know the nature and quality of the act, OR"],
        ["Rule 3", "Did NOT know that what he was doing was wrong (right vs wrong distinction)"],
        ["IPC Section 84", "Codification of M'Naghten in Indian law"],
        ["Limitation", "Does not account for irresistible impulse; ignores emotional component"],
    ],
    [4*cm, 13*cm]
)
story.append(mnag)
story.append(sp(6))
story.append(small_note("Narcoanalysis: Supreme Court (Selvi vs Karnataka, 2010) ruled it violates Article 20(3) β€” cannot be done without consent."))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 6 β€” MEDICAL JURISPRUDENCE
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 6  |  MEDICAL JURISPRUDENCE & LEGAL CONCEPTS", C_DARK_BLUE))
story.append(sp(6))

story.append(section_box("IPC Sections β€” Quick Reference", C_LIGHT_BLUE, C_DARK_BLUE))
story.append(sp(4))
ipc = two_col_table(
    ["Section", "Subject", "Key Provision"],
    [
        ["Sec 84", "Act of person of unsound mind", "No offence if unaware of nature/wrongness due to mental disease"],
        ["Sec 299/300", "Culpable homicide / Murder", "Intention + knowledge distinctions"],
        ["Sec 312", "Causing miscarriage", "Criminal abortion; 3 years imprisonment"],
        ["Sec 320", "Grievous hurt", "8 categories (see below)"],
        ["Sec 375", "Rape", "Penetration without consent; age < 18 = statutory rape"],
        ["Sec 376", "Punishment for rape", "7 years to life imprisonment"],
        ["Sec 377", "Unnatural offences", "Sodomy, bestiality"],
        ["Sec 326A", "Acid attack (vitriolage)", "10 years to life; introduced 2013"],
    ],
    [2.5*cm, 5*cm, 9.5*cm]
)
story.append(ipc)
story.append(sp(8))

story.append(section_box("IPC Section 320 β€” Eight Kinds of Grievous Hurt", C_RED_LIGHT, C_RED))
story.append(sp(4))
grev = two_col_table(
    ["No.", "Type of Grievous Hurt"],
    [
        ["1", "Emasculation"],
        ["2", "Permanent privation of sight of either eye"],
        ["3", "Permanent privation of hearing of either ear"],
        ["4", "Privation of any member or joint"],
        ["5", "Destruction or permanent impairing of powers of any member or joint"],
        ["6", "Permanent disfiguration of head or face"],
        ["7", "Fracture or dislocation of a bone or tooth"],
        ["8", "Any hurt that endangers life, or causes 20+ days of severe pain / inability to follow ordinary pursuits"],
    ],
    [1.5*cm, 15.5*cm], hdr_color=C_RED
)
story.append(grev)
story.append(sp(8))

story.append(section_box("Legal Doctrines β€” Quick Reference", C_LIGHT_BLUE, C_DARK_BLUE))
story.append(sp(4))
legal = two_col_table(
    ["Doctrine / Concept", "Meaning", "Medical Example"],
    [
        ["Res Ipsa Loquitur", "The thing speaks for itself; negligence self-evident", "Swab/instrument left inside patient post-op"],
        ["Vicarious Liability", "Employer responsible for employee's acts in course of employment", "Hospital liable for nurse's negligence"],
        ["Borrowed Servant", "Borrowing employer responsible for borrowed staff", "Hospital borrows surgeon; its liability"],
        ["In Loco Parentis", "In place of a parent; assumes parental rights/duties", "Teacher/warden can consent to minor's treatment"],
        ["Respondeat Superior", "Let the master answer (basis of vicarious liability)", "Senior doctor liable for junior's error"],
    ],
    [4*cm, 5.5*cm, 7.5*cm]
)
story.append(legal)
story.append(sp(8))

story.append(section_box("Testamentary Capacity β€” Requirements", C_GREEN_LIGHT, C_GREEN))
story.append(sp(4))
tc = two_col_table(
    ["Requirement", "Details"],
    [
        ["Sound mind", "Understands the nature and effect of making a will"],
        ["Knows extent of property", "Understands what they are disposing of"],
        ["Knows natural heirs", "Aware of relatives who would normally inherit"],
        ["Free from undue influence", "Decision made voluntarily"],
        ["Minimum age", "18 years (21 if under guardianship)"],
    ],
    [5*cm, 12*cm]
)
story.append(tc)
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 7 β€” FORENSIC ANTHROPOLOGY & IDENTIFICATION
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 7  |  FORENSIC ANTHROPOLOGY & IDENTIFICATION", C_GREEN))
story.append(sp(6))

story.append(section_box("Fingerprint Classification (Henry's System)", C_GREEN_LIGHT, C_GREEN))
story.append(sp(4))
fp = two_col_table(
    ["Pattern", "Frequency", "Deltas", "Key Feature"],
    [
        ["Loop (Ulnar / Radial)", "~65%", "1", "Ridges enter and exit same side; most common"],
        ["Whorl", "~30%", "2", "Concentric circles/spirals"],
        ["Arch (Plain / Tented)", "~5%", "0", "Ridges pass from one side to other; no delta"],
        ["Composite", "Rare", "Variable", "Twin loop, central pocket whorl"],
    ],
    [4*cm, 3*cm, 2.5*cm, 7.5*cm]
)
story.append(fp)
story.append(sp(6))
story += bullet_list([
    "<b>Galton's three principles:</b> Uniqueness, Permanence, Classifiability",
    "<b>Dactylography</b> = scientific study of fingerprints | <b>Cheiloscopy</b> = study of lip prints",
    "<b>Superimposition</b> = skull + photograph overlay for identification of skeletal remains"
])
story.append(sp(8))

story.append(section_box("Male vs Female Pelvis", C_LIGHT_BLUE, C_MED_BLUE))
story.append(sp(4))
pelvis = comparison_table(
    ["Feature", "Male", "Female"],
    [
        ["Shape", "Android (heart-shaped inlet)", "Gynecoid (oval/round inlet)"],
        ["Subpubic angle", "< 90Β° (narrow)", "> 90Β° (wide)"],
        ["Greater sciatic notch", "Narrow (< 60Β°)", "Wide (> 60Β°)"],
        ["Sacrum", "Narrow, deeply curved", "Broad, less curved"],
        ["Acetabulum", "Large", "Small"],
        ["Obturator foramen", "Round", "Oval/triangular"],
        ["Overall", "Heavier, smaller cavity", "Lighter, wider cavity for childbirth"],
    ],
    [5*cm, 6*cm, 6*cm]
)
story.append(pelvis)
story.append(sp(8))

story.append(section_box("Male vs Female Skull", C_PURPLE_LIGHT, C_PURPLE))
story.append(sp(4))
skull_sex = comparison_table(
    ["Feature", "Male", "Female"],
    [
        ["Size / Weight", "Larger, heavier", "Smaller, lighter"],
        ["Supraorbital ridges", "Prominent, marked", "Slight"],
        ["Forehead", "Sloping", "Vertical"],
        ["Mastoid process", "Large", "Small"],
        ["Ext. occipital protuberance", "Marked", "Slight"],
        ["Orbit shape", "Square", "Rounded"],
        ["Chin", "Square, prominent", "Rounded, pointed"],
        ["Cranial capacity", "~1450 mL", "~1300 mL"],
    ],
    [4.5*cm, 6.25*cm, 6.25*cm]
)
story.append(skull_sex)
story.append(sp(8))

story.append(section_box("Human Hair vs Animal Hair", C_ORANGE_LIGHT, C_ORANGE))
story.append(sp(4))
hair = comparison_table(
    ["Feature", "Human Hair", "Animal Hair"],
    [
        ["Medullary index", "< 0.33 (narrow medulla)", "> 0.5 (wide medulla)"],
        ["Medulla pattern", "Fragmented / absent", "Continuous, latticed"],
        ["Cuticle scales", "Imbricate (narrow, overlapping)", "Large, coronal or petal-like"],
        ["Pigment distribution", "Peripherally in cortex", "Central or diffuse"],
        ["Cross-section", "Oval to round", "Highly variable by species"],
    ],
    [4*cm, 6.5*cm, 6.5*cm]
)
story.append(hair)
story.append(sp(6))
story.append(small_note("Gustafson's method for age from teeth: 6 criteria (attrition, periodontosis, secondary dentin, cementum apposition, root resorption, root transparency). Score 0-3 each. Error Β±10 years."))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 8 β€” TOXICOLOGY
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 8  |  TOXICOLOGY & POISONING", C_ORANGE))
story.append(sp(6))

story.append(section_box("Antidotes β€” Quick Reference Table", C_ORANGE_LIGHT, C_ORANGE))
story.append(sp(4))
antidotes = two_col_table(
    ["Poison", "Mechanism", "Specific Antidote"],
    [
        ["Organophosphorus (OPC)", "Inhibits cholinesterase (SLUDGE)", "Atropine + Pralidoxime (PAM)"],
        ["Cyanide (HCN)", "Inhibits cytochrome oxidase", "Amyl nitrite β†’ NaNO2 β†’ Na-thiosulfate; Hydroxocobalamin"],
        ["Carbon monoxide", "Binds Hb (CO-Hb)", "100% O2; HBO therapy"],
        ["Lead (Plumbism)", "Heavy metal toxicity", "CaNa2-EDTA; DMSA; BAL (encephalopathy)"],
        ["Arsenic", "Enzyme inhibition", "BAL (dimercaprol); DMSA"],
        ["Methanol", "Formic acid β†’ acidosis + optic toxicity", "Fomepizole / Ethanol; bicarbonate; hemodialysis"],
        ["Opioids", "Mu-receptor agonist β†’ CNS/resp. depression", "Naloxone"],
        ["Benzodiazepines", "GABA-A potentiation", "Flumazenil (caution in epilepsy)"],
        ["Datura (atropine)", "Anticholinergic", "Physostigmine; neostigmine"],
        ["Warfarin", "Inhibits Vit K-dependent factors", "Vitamin K; FFP"],
        ["Paracetamol", "NAPQI hepatotoxicity", "N-acetylcysteine (NAC)"],
        ["Iron", "Free radical toxicity", "Deferoxamine"],
    ],
    [4*cm, 5.5*cm, 7.5*cm]
)
story.append(antidotes)
story.append(sp(8))

story.append(section_box("Strychnine vs Tetanus", C_RED_LIGHT, C_RED))
story.append(sp(4))
strych = comparison_table(
    ["Feature", "Strychnine Poisoning", "Tetanus"],
    [
        ["Cause", "Nux vomica alkaloid", "Clostridium tetani toxin"],
        ["Mechanism", "Blocks glycine (inhibitory NT) in spinal cord", "Blocks glycine + GABA release"],
        ["Trismus (lockjaw)", "Absent initially", "Present early (KEY DIFFERENTIATOR)"],
        ["Spasms", "Intermittent, violent opisthotonus", "Prolonged; trismus first"],
        ["Fever", "Absent", "Present"],
        ["Wound history", "Absent", "Present + incubation period"],
        ["Recovery (if survives)", "Full recovery possible if survives 4-5 hrs", "Prolonged illness"],
        ["Treatment", "Diazepam, chlorpromazine, gastric lavage", "Antitoxin, penicillin, metronidazole, diazepam"],
    ],
    [4.5*cm, 6.25*cm, 6.25*cm]
)
story.append(strych)
story.append(sp(8))

story.append(section_box("Viscera Preservation for Chemical Analysis", C_TEAL_LIGHT, C_TEAL))
story.append(sp(4))
visc = two_col_table(
    ["Sample", "Quantity", "Preservative", "Special Notes"],
    [
        ["Stomach + contents", "Entire", "Saturated NaCl", "No formalin β€” destroys chemical evidence"],
        ["Small intestine (30 cm)", "30 cm section", "Saturated NaCl", ""],
        ["Liver", "500 g", "Saturated NaCl", ""],
        ["Kidney", "One whole", "Saturated NaCl", ""],
        ["Blood", "30 mL", "Fluoride-oxalate (alcohol); plain (others)", "Airtight for CO"],
        ["Urine", "All available", "None", ""],
        ["Vitreous humor", "Both eyes", "None", "Least contaminated; K+ for PMI"],
        ["Brain", "Half", "Saturated NaCl", ""],
        ["Spleen", "200 g", "Saturated NaCl", ""],
        ["Hair + nails", "All", "None (dry, sealed)", "Arsenic, thallium; Mees' lines"],
    ],
    [4*cm, 2.5*cm, 4*cm, 6.5*cm]
)
story.append(visc)
story.append(sp(8))

story.append(section_box("Neurotoxic vs Vasculotoxic Snake Venom", C_PURPLE_LIGHT, C_PURPLE))
story.append(sp(4))
snake = comparison_table(
    ["Feature", "Neurotoxic (Krait, Cobra)", "Vasculotoxic (Russell's Viper, Saw-Scaled)"],
    [
        ["Local effects", "Minimal pain/swelling", "Severe swelling, necrosis, hemorrhagic blisters"],
        ["Systemic effects", "Descending paralysis, resp. failure", "Coagulopathy (DIC), hemorrhage, renal failure"],
        ["Specific signs", "Ptosis, dysphagia, diplopia", "WBCT20 positive; hemoglobinuria"],
        ["Antidote response", "Neostigmine + atropine may help (cobra)", "ASV; FFP; dialysis"],
        ["Indian examples", "Common krait, cobra", "Russell's viper, saw-scaled viper"],
    ],
    [4.5*cm, 6.25*cm, 6.25*cm]
)
story.append(snake)
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 9 β€” FORENSIC PATHOLOGY & AUTOPSY
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 9  |  FORENSIC PATHOLOGY & AUTOPSY", C_GRAY))
story.append(sp(6))

story.append(section_box("Types of Autopsy", C_LIGHT_GRAY, C_GRAY))
story.append(sp(4))
autopsy = two_col_table(
    ["Type", "Definition", "Key Feature"],
    [
        ["Medicolegal autopsy", "PM examination when cause of death is unnatural/suspicious", "Mandatory police/magistrate order; full external + internal examination"],
        ["Clinical / Hospital autopsy", "Consent-based examination for academic/clinical purposes", "No police involvement; consent of relatives"],
        ["Virtual autopsy (Virtopsy)", "CT/MRI based PM without dissection", "Non-invasive; 3D reconstruction; no religious objection"],
        ["Negative autopsy", "No cause of death found despite thorough examination", "Toxicology + histology essential; may indicate functional death"],
    ],
    [3*cm, 6*cm, 8*cm]
)
story.append(autopsy)
story.append(sp(8))

story.append(section_box("Shotgun Entry Wound at Various Ranges", C_ORANGE_LIGHT, C_ORANGE))
story.append(sp(4))
shotgun = two_col_table(
    ["Range", "Wound Features"],
    [
        ["Contact (muzzle to skin)", "Single circular wound; stellate/cruciate laceration from gas; soot + burning of margins; 'cookie cutter' appearance"],
        ["Close range (< 15 cm)", "Single wound; soot deposit; gas ring; individual pellets not yet separated"],
        ["Short range (15-60 cm)", "Circular wound with powder tattooing (stippling)"],
        ["Medium range (60 cm - 3 m)", "Single wound with scalloped edges; peripheral pellets beginning to appear around central hole"],
        ["Long range (> 3 m)", "Multiple separate pellet wounds scattered; central hole + surrounding satellite holes"],
        ["Very long range (> 6 m)", "Only scattered individual pellet wounds; no central hole; wounds appear as multiple small entry wounds"],
    ],
    [4*cm, 13*cm]
)
story.append(shotgun)
story.append(sp(8))

story.append(section_box("Key Forensic Tests β€” Quick Reference", C_LIGHT_BLUE, C_DARK_BLUE))
story.append(sp(4))
tests = two_col_table(
    ["Test / Sign", "Indicates", "How Positive"],
    [
        ["Hydrostatic (Breslau) test", "Liveborn child / breathed air", "Lungs float in water"],
        ["Gettler test", "Antemortem drowning", "Chloride difference between L and R heart blood"],
        ["Diatom test", "Antemortem drowning", "Diatoms in bone marrow / brain / liver"],
        ["Reinsch test", "Arsenic / mercury / antimony", "Metal deposits on copper strip in acid"],
        ["WBCT20", "Viper bite coagulopathy", "Blood does not clot in 20 min"],
        ["Wreden's test", "Child breathed after birth", "Fluid absorbed from middle ear"],
        ["Docimasia hepatica", "Liveborn", "Glycogen in liver"],
        ["Burton's line", "Lead poisoning", "Blue-black line at gingival margin"],
    ],
    [4.5*cm, 5.5*cm, 7*cm]
)
story.append(tests)
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 10 β€” BALLISTICS
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 10  |  BALLISTICS & FIREARMS", C_RED))
story.append(sp(6))

story.append(section_box("Shotgun Cartridge β€” Components", C_RED_LIGHT, C_RED))
story.append(sp(4))

cart_data = [
    [Paragraph("<b>COMPONENT</b>", TH), Paragraph("<b>MATERIAL / FUNCTION</b>", TH)],
    [Paragraph("Top crimp / wad", TD), Paragraph("Plastic crimp or top cardboard wad; holds shot in cartridge", TD)],
    [Paragraph("Shot pellets", TD), Paragraph("Lead or steel spheres; actual projectiles; size varies by gauge", TD)],
    [Paragraph("Over-shot wad", TD), Paragraph("Cardboard disc separating shot from powder", TD)],
    [Paragraph("Propellant powder", TD), Paragraph("Nitrocellulose-based smokeless powder; generates propulsive gas", TD)],
    [Paragraph("Base wad", TD), Paragraph("Cardboard wad above primer; seals gases", TD)],
    [Paragraph("Brass base (head)", TD), Paragraph("Metal base holding entire cartridge; contains primer cup", TD)],
    [Paragraph("Primer (percussion cap)", TD), Paragraph("Lead styphnate; ignites on firing pin impact", TD)],
]
cart_table = Table(cart_data, colWidths=[5*cm, 12*cm])
cart_table.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_RED),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_RED_LIGHT]),
    ('GRID', (0,0), (-1,-1), 0.4, C_RED),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(cart_table)
story.append(sp(6))

# ASCII diagram of cartridge
diag_data = [[
    Paragraph("""<para align="center">
<b>LABELLED SHOTGUN CARTRIDGE DIAGRAM</b><br/>
<br/>
[ TOP CRIMP / WADS ]<br/>
[ SHOT PELLETS (lead) ]<br/>
[ OVER-SHOT WAD ]<br/>
[ PROPELLANT POWDER ]<br/>
[ BASE WAD ]<br/>
[ BRASS BASE + PRIMER ]<br/>
</para>""", make_style('diag',
        fontSize=9, textColor=C_DARK_BLUE, fontName='Helvetica-Bold',
        alignment=TA_CENTER, leading=14))
]]
diag_t = Table(diag_data, colWidths=[17*cm])
diag_t.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,-1), C_LIGHT_BLUE),
    ('BOX', (0,0), (-1,-1), 2, C_DARK_BLUE),
    ('TOPPADDING', (0,0), (-1,-1), 10),
    ('BOTTOMPADDING', (0,0), (-1,-1), 10),
]))
story.append(diag_t)
story.append(sp(8))

story.append(section_box("Tandem Bullet", C_ORANGE_LIGHT, C_ORANGE))
story.append(sp(4))
story += bullet_list([
    "Two bullets fired simultaneously from a rifled firearm, one behind the other",
    "Results in one entry wound but two projectiles on imaging/autopsy",
    "Medico-legal confusion: single entry + two bullets may suggest multiple shots or internal ricochet",
    "Mechanism: second bullet loaded while first still in barrel"
])
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# CHAPTER 11 β€” CLINICAL FLOWCHARTS
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("CHAPTER 11  |  CLINICAL MANAGEMENT FLOWCHARTS", C_TEAL))
story.append(sp(8))

# ── FLOWCHART 1: OPC Poisoning Management ─────────────────────────────────────
story.append(section_box("Flowchart 1: OPC / Organophosphorus Poisoning Management", C_TEAL_LIGHT, C_TEAL))
story.append(sp(6))

W_FC = 16*cm
story.append(flowchart_box("PATIENT PRESENTATION: Miosis + Salivation + Sweating + Bradycardia + Bronchospasm", W_FC, bg=C_TEAL))
story.append(arrow())
story.append(flowchart_box("DIAGNOSIS: Cholinergic Syndrome (OPC Poisoning)", W_FC, bg=C_MED_BLUE))
story.append(arrow())

opc_step2 = Table([
    [flowchart_box("MUSCARINIC\nSLUDGE signs", 5.2*cm, bg=C_GREEN, text_color=C_WHITE),
     flowchart_box("NICOTINIC\nFasciculation, Weakness, Paralysis", 5.2*cm, bg=C_ORANGE, text_color=C_WHITE),
     flowchart_box("CNS\nAnxiety, Seizures, Coma", 5.2*cm, bg=C_RED, text_color=C_WHITE)],
], colWidths=[5.5*cm, 5.5*cm, 5.5*cm])
opc_step2.setStyle(TableStyle([('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),2),('RIGHTPADDING',(0,0),(-1,-1),2)]))
story.append(opc_step2)
story.append(arrow())
story.append(flowchart_box("CONFIRM: Serum / RBC Cholinesterase Level (markedly reduced)", W_FC, bg=C_DARK_BLUE))
story.append(arrow())

opc_mgmt = [
    ["Step 1", "DECONTAMINATION: Remove clothing, wash skin with soap/water; ABC support"],
    ["Step 2", "AIRWAY: Suction secretions; intubate if GCS < 8 or respiratory failure"],
    ["Step 3", "ATROPINE: 2-4 mg IV bolus; repeat every 5-10 min; ENDPOINT = drying of secretions (NOT pupil size); may need 20-100+ mg"],
    ["Step 4", "PRALIDOXIME (PAM): 1-2 g IV over 15-30 min; MUST be given within 24-48 hrs (before aging); reactivates cholinesterase"],
    ["Step 5", "BENZODIAZEPINES: Diazepam 10 mg IV for seizures"],
    ["Step 6", "GASTRIC LAVAGE + Activated charcoal if recent oral ingestion"],
    ["Step 7", "ICU monitoring: vitals, SpO2, urine output, repeat cholinesterase levels"],
]
opc_t = Table(
    [[Paragraph("<b>Step</b>", TH), Paragraph("<b>Action</b>", TH)]] +
    [[Paragraph(r[0], TD_B), Paragraph(r[1], TD)] for r in opc_mgmt],
    colWidths=[2*cm, 14*cm]
)
opc_t.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_TEAL),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_TEAL_LIGHT]),
    ('GRID', (0,0), (-1,-1), 0.4, C_TEAL),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(opc_t)
story.append(sp(10))

# ── FLOWCHART 2: Snake Bite Management ────────────────────────────────────────
story.append(section_box("Flowchart 2: Snakebite Management", C_GREEN_LIGHT, C_GREEN))
story.append(sp(6))
story.append(flowchart_box("SNAKEBITE VICTIM", W_FC, bg=C_GREEN))
story.append(arrow())
story.append(flowchart_box("FIRST AID: Immobilize limb (splint); Pressure immobilization bandage (NOT tourniquet); Transfer to hospital", W_FC, bg=C_MED_BLUE))
story.append(arrow())
story.append(diamond_box("Is it POISONOUS? (fang marks, local swelling, systemic symptoms)", W_FC))
story.append(arrow())

sb_types = Table([
    [flowchart_box("NEUROTOXIC\n(Krait/Cobra)\nPtosis, Paralysis,\nResp. failure", 7.5*cm, bg=C_PURPLE),
     flowchart_box("VASCULOTOXIC\n(Viper)\nSwelling, Coagulopathy\nRenal failure", 7.5*cm, bg=C_RED)],
], colWidths=[8*cm, 8*cm])
sb_types.setStyle(TableStyle([('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),2),('RIGHTPADDING',(0,0),(-1,-1),2)]))
story.append(sb_types)
story.append(arrow())
story.append(flowchart_box("POLYVALENT ANTI-SNAKE VENOM (ASV) IV β€” dose by clinical response, not body weight", W_FC, bg=C_DARK_BLUE))
story.append(arrow())

sb_mgmt = [
    ["Neurotoxic", "Neostigmine 0.5-2.5 mg + Atropine 0.6 mg IV; ventilatory support; watch for resp. failure"],
    ["Vasculotoxic", "FFP / blood for coagulopathy; IV fluids; dialysis for renal failure; watch WBCT20"],
    ["Both", "Monitor: vitals, urine output, neuro status; repeat ASV if no improvement in 1-2 hrs"],
]
sb_t = Table(
    [[Paragraph("<b>Type</b>", TH), Paragraph("<b>Specific Management</b>", TH)]] +
    [[Paragraph(r[0], TD_B), Paragraph(r[1], TD)] for r in sb_mgmt],
    colWidths=[3*cm, 14*cm]
)
sb_t.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_GREEN),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_GREEN_LIGHT]),
    ('GRID', (0,0), (-1,-1), 0.4, C_GREEN),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(sb_t)
story.append(PageBreak())

# ── FLOWCHART 3: Coma Cocktail ─────────────────────────────────────────────────
story.append(section_box("Flowchart 3: Coma Cocktail β€” Unknown Comatose Patient", C_AMBER_LIGHT, C_AMBER))
story.append(sp(6))
story.append(flowchart_box("COMATOSE PATIENT β€” Unknown cause", W_FC, bg=C_AMBER))
story.append(arrow())
story.append(flowchart_box("STEP 1: Secure airway + IV access + SpO2 + BGL + ECG + blood cultures", W_FC, bg=C_MED_BLUE))
story.append(arrow())

coma_cocktail = [
    ["1", "THIAMINE 100 mg IV", "FIRST β€” before dextrose (prevents Wernicke's in alcoholics)"],
    ["2", "50% DEXTROSE 50 mL IV", "Hypoglycemia correction"],
    ["3", "NALOXONE 0.4-2 mg IV", "Opioid reversal; repeat every 2-3 min up to 10 mg"],
    ["4", "FLUMAZENIL 0.2 mg IV", "Benzodiazepine reversal; CAUTION if seizure history"],
    ["5", "100% OXYGEN", "All causes benefit"],
]
cc_t = Table(
    [[Paragraph("<b>Order</b>", TH), Paragraph("<b>Drug</b>", TH), Paragraph("<b>Rationale</b>", TH)]] +
    [[Paragraph(r[0], TD_C), Paragraph(r[1], TD_B), Paragraph(r[2], TD)] for r in coma_cocktail],
    colWidths=[1.5*cm, 5.5*cm, 10*cm]
)
cc_t.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_AMBER),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_AMBER_LIGHT]),
    ('GRID', (0,0), (-1,-1), 0.4, C_AMBER),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(cc_t)
story.append(sp(10))

# ── FLOWCHART 4: Drowning Investigation ───────────────────────────────────────
story.append(section_box("Flowchart 4: Body Recovered from Water β€” Investigation Protocol", C_LIGHT_BLUE, C_MED_BLUE))
story.append(sp(6))
story.append(flowchart_box("BODY RECOVERED FROM WATER", W_FC, bg=C_MED_BLUE))
story.append(arrow())
story.append(diamond_box("Is there froth at mouth/nostrils? Cadaveric spasm? Vegetation in hand?", W_FC))
story.append(arrow())

drown_flow = Table([
    [flowchart_box("YES — features present\n→ Likely ANTEMORTEM DROWNING", 7.5*cm, bg=C_TEAL),
     flowchart_box("NO / Absent\n→ Consider Postmortem Submersion\nor other cause of death", 7.5*cm, bg=C_RED)],
], colWidths=[8*cm, 8*cm])
drown_flow.setStyle(TableStyle([('VALIGN',(0,0),(-1,-1),'TOP'),('LEFTPADDING',(0,0),(-1,-1),2)]))
story.append(drown_flow)
story.append(arrow())
story.append(flowchart_box("CONFIRM: Diatom test (bone marrow) | Gettler test | Emphysema aquosum on lung", W_FC, bg=C_DARK_BLUE))
story.append(arrow())

drown_samples = [
    ["Diatom test", "Bone marrow (femur), brain, liver, kidney β€” acid maceration"],
    ["Gettler test", "Blood from L and R heart β€” compare chloride levels"],
    ["Toxicology", "Blood, urine, vitreous humor"],
    ["Sexual assault", "Vaginal swabs, clothing, pubic hair (if assault suspected)"],
    ["Histology", "Lung, brain, kidney in formalin"],
]
dt = Table(
    [[Paragraph("<b>Test</b>", TH), Paragraph("<b>Samples Required</b>", TH)]] +
    [[Paragraph(r[0], TD_B), Paragraph(r[1], TD)] for r in drown_samples],
    colWidths=[4*cm, 13*cm]
)
dt.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_MED_BLUE),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_LIGHT_BLUE]),
    ('GRID', (0,0), (-1,-1), 0.4, C_MED_BLUE),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(dt)
story.append(sp(10))

# ── FLOWCHART 5: Datura Poisoning ─────────────────────────────────────────────
story.append(section_box("Flowchart 5: Datura (Atropine) Poisoning Management", C_PURPLE_LIGHT, C_PURPLE))
story.append(sp(6))
story.append(flowchart_box("PRESENTATION: Hot + Blind + Dry + Red + Mad\n(Hyperthermia | Mydriasis | Dry skin/mouth | Flushing | Delirium)", W_FC, bg=C_PURPLE))
story.append(arrow())
story.append(flowchart_box("DIAGNOSIS: Anticholinergic Toxidrome (Datura/Belladonna/Atropine)", W_FC, bg=C_MED_BLUE))
story.append(arrow())
datura_mgmt = [
    ["1", "Gastric lavage with KMnO4 solution (decontamination)"],
    ["2", "PHYSOSTIGMINE 1-2 mg slow IV (specific antidote β€” reverses CNS + peripheral anticholinergic effects)"],
    ["3", "NEOSTIGMINE (for peripheral effects only; does not cross BBB)"],
    ["4", "DIAZEPAM IV for agitation/seizures"],
    ["5", "Cold sponging + paracetamol for hyperthermia"],
    ["6", "Urinary catheterization for urinary retention"],
    ["7", "ICU monitoring; dark, quiet room (reduces stimulation)"],
]
dat_t = Table(
    [[Paragraph("<b>Step</b>", TH), Paragraph("<b>Management</b>", TH)]] +
    [[Paragraph(r[0], TD_C), Paragraph(r[1], TD)] for r in datura_mgmt],
    colWidths=[1.5*cm, 15.5*cm]
)
dat_t.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_PURPLE),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_PURPLE_LIGHT]),
    ('GRID', (0,0), (-1,-1), 0.4, C_PURPLE),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(dat_t)
story.append(sp(10))

# ── FLOWCHART 6: Brainstem Death ───────────────────────────────────────────────
story.append(section_box("Flowchart 6: Brainstem Death Certification", C_RED_LIGHT, C_RED))
story.append(sp(6))
story.append(flowchart_box("PATIENT: Apnoeic coma on ventilator with known irreversible brain damage", W_FC, bg=C_RED))
story.append(arrow())
story.append(diamond_box("EXCLUDE: Hypothermia (<35Β°C) | Drugs | Metabolic causes | Neuromuscular blockade", W_FC))
story.append(arrow())
story.append(flowchart_box("BRAINSTEM REFLEX TESTS (all must be absent)", W_FC, bg=C_MED_BLUE))
story.append(arrow())

bsd_tests = [
    ["Pupillary light reflex", "No response to bright light in either eye"],
    ["Corneal reflex", "No blink to corneal touch"],
    ["Oculocephalic (Doll's eye)", "No eye movement on head turning"],
    ["Oculovestibular (Caloric)", "No eye movement with 20 mL cold water in ear"],
    ["Gag / Cough reflex", "No response to pharyngeal/tracheal stimulation"],
    ["Motor response to pain", "No response to pain in cranial nerve distribution (supraorbital pressure)"],
]
bsd_t = Table(
    [[Paragraph("<b>Reflex</b>", TH), Paragraph("<b>Test Result (Absent = BSdeath)</b>", TH)]] +
    [[Paragraph(r[0], TD_B), Paragraph(r[1], TD)] for r in bsd_tests],
    colWidths=[5*cm, 12*cm]
)
bsd_t.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_RED),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_RED_LIGHT]),
    ('GRID', (0,0), (-1,-1), 0.4, C_RED),
    ('TOPPADDING', (0,0), (-1,-1), 4),
    ('BOTTOMPADDING', (0,0), (-1,-1), 4),
    ('LEFTPADDING', (0,0), (-1,-1), 6),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(bsd_t)
story.append(arrow())
story.append(flowchart_box("APNEA TEST: CO2 allowed to rise > 60 mmHg β†’ No respiratory effort = positive", W_FC, bg=C_DARK_BLUE))
story.append(arrow())
story.append(flowchart_box("REPEAT ALL TESTS (2nd time, by different senior physician not involved in transplant)\n→ BRAINSTEM DEATH CERTIFIED", W_FC, bg=C_TEAL))
story.append(PageBreak())

# ══════════════════════════════════════════════════════════════════════════════
# MASTER QUICK REFERENCE PAGE
# ══════════════════════════════════════════════════════════════════════════════
story.append(chapter_header("MASTER QUICK REFERENCE β€” FORENSIC MNEMONICS & KEY FACTS", C_DARK_BLUE))
story.append(sp(6))

mnemonics = [
    ["SLUDGE (OPC poisoning)", "Salivation, Lacrimation, Urination, Defecation, GI cramps, Emesis"],
    ["Datura toxidrome", "Hot as a hare | Blind as a bat | Dry as a bone | Red as a beet | Mad as a hatter"],
    ["Coma cocktail", "Thiamine β†’ Dextrose β†’ Naloxone β†’ Flumazenil β†’ O2"],
    ["Grievous hurt (8 types)", "Emas-Eye-Ear-Member-Power-Face-Fracture-Endanger (EEEMP FFE)"],
    ["M'Naghten rules", "Mental disease + Did not know nature of act OR did not know it was wrong"],
    ["Rigor mortis (Nysten's rule)", "Starts jaw β†’ neck β†’ upper limb β†’ trunk β†’ lower limb; disappears same order"],
    ["Casper's Dictum", "1 week air = 2 weeks water = 8 weeks earth (decomposition rate)"],
    ["Hanging mark", "OBLIQUE, INCOMPLETE (open at knot) β€” above thyroid cartilage"],
    ["Strangulation mark", "HORIZONTAL, COMPLETE β€” below thyroid cartilage"],
    ["Entry wound", "INVERTED margins + abrasion collar; bone bevel INWARD"],
    ["Exit wound", "EVERTED margins; no collar; bone bevel OUTWARD"],
    ["Hydrostatic test", "Lungs FLOAT = breathed air = liveborn"],
    ["Breslau's / Lung test", "Positive = liveborn; False +ve in putrefaction / artificial respiration"],
    ["Diatom test confirmation", "Diatoms in BONE MARROW = definitive antemortem drowning"],
    ["Burton's line", "Blue-black gum line = LEAD poisoning (Plumbism)"],
    ["Mees' lines", "White transverse nail lines = ARSENIC (or thallium) poisoning"],
    ["Cherry-red blood", "CO poisoning or HCN poisoning or refrigerated body"],
    ["Tardieu spots", "Subpleural/subepicardial petechiae in asphyxia"],
    ["Cadaveric spasm", "Instantaneous rigidity at death; ante-mortem only; no primary relaxation"],
    ["Tache noire", "Brown triangular desiccation mark on sclera; NOT an injury"],
    ["Adipocere", "Warm + moist + anaerobic β†’ saponification of fat β†’ waxy grey-white material"],
    ["Vitriolage (IPC 326A)", "Acid attack; introduced 2013; 10 years to life imprisonment"],
    ["Res ipsa loquitur", "The thing speaks for itself (swab left inside patient)"],
    ["Narcoanalysis", "Cannot be done without consent (Selvi vs Karnataka, 2010)"],
]

mn_t = Table(
    [[Paragraph("<b>Mnemonic / Fact</b>", TH), Paragraph("<b>Full Meaning</b>", TH)]] +
    [[Paragraph(r[0], TD_B), Paragraph(r[1], TD)] for r in mnemonics],
    colWidths=[5.5*cm, 11.5*cm]
)
mn_t.setStyle(TableStyle([
    ('BACKGROUND', (0,0), (-1,0), C_DARK_BLUE),
    ('ROWBACKGROUNDS', (0,1), (-1,-1), [C_WHITE, C_LIGHT_BLUE]),
    ('GRID', (0,0), (-1,-1), 0.4, C_MED_BLUE),
    ('TOPPADDING', (0,0), (-1,-1), 3),
    ('BOTTOMPADDING', (0,0), (-1,-1), 3),
    ('LEFTPADDING', (0,0), (-1,-1), 5),
    ('VALIGN', (0,0), (-1,-1), 'MIDDLE'),
]))
story.append(mn_t)

# ── Build PDF ──────────────────────────────────────────────────────────────────
doc = SimpleDocTemplate(
    OUTPUT,
    pagesize=A4,
    leftMargin=1.5*cm,
    rightMargin=1.5*cm,
    topMargin=1.5*cm,
    bottomMargin=1.8*cm,
    title="Forensic Medicine & Toxicology Quick Reference",
    author="Orris β€” Based on Narayan Reddy, Gautam Biswas, Parikh",
    subject="Forensic Medicine Summary PDF"
)

doc.build(story, canvasmaker=NumberedCanvas)
print(f"PDF generated: {OUTPUT}")
Running Command

cd /home/daytona/workspace/forensic-pdf && python generate_pdf.py 2>&1

Running Command

ls -lh /home/daytona/workspace/forensic-pdf/Forensic_Medicine_Quick_Reference.pd…

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.

Give my content

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.

Download the PDF summary I created

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.