Give me detailed classification of stroke including all the types & then detailed about circle of willi's - PG level answer with using textbook like Susan B O sullivan

Reading File
Finding Sources
Finding Sources
Finding Sources
Reading File
Reading File
Reading File
Reading File
Reading File
Finding Sources
Finding Sources
Reading File
Reading File
Finding Sources
Loading Image
Loading Image
Reading File
Reading File
Finding Sources
Loading Image
Reading File
I now have comprehensive content from authoritative sources. Let me compile the full PG-level answer.

STROKE: Detailed Classification & Circle of Willis

Sources: Neuroanatomy through Clinical Cases 3rd Ed. (Blumenfeld), Tintinalli's Emergency Medicine, Grainger & Allison's Diagnostic Radiology, Fuster & Hurst's The Heart 15th Ed., Miller's Anesthesia 10th Ed., Frameworks for Internal Medicine

PART I: CLASSIFICATION OF STROKE

Definition

Stroke is an acute neurological deficit of vascular origin, lasting >24 hours (or resulting in death), caused either by ischemic infarction or hemorrhage of brain tissue. It is the leading cause of significant neurological disability and a major cause of death worldwide.

MASTER CLASSIFICATION

Stroke types flowchart - hemorrhagic vs ischemic
Stroke Classification Flowchart - Frameworks for Internal Medicine

A. ISCHEMIC STROKE (~80% of all strokes)

Ischemic stroke occurs when inadequate blood supply to a region of the brain lasts long enough to cause infarction (death) of brain tissue. The key distinction is between embolic (sudden, maximal at onset) and thrombotic (stuttering onset) mechanisms, though in clinical practice this distinction is often not easy to make on clinical grounds alone.

TOAST Classification (Trial of ORG 10172 in Acute Stroke Treatment)

The most widely used etiological classification of ischemic stroke. It stratifies subtypes based on pathophysiology and guides secondary prevention:

1. Large Artery Atherosclerosis (Large Vessel Disease)

  • Mechanism: In situ thrombosis at an atherosclerotic plaque OR artery-to-artery embolism from a proximal stenosis (carotid, vertebral, basilar, MCA).
  • Diagnostic criteria: >50% stenosis or occlusion of a major cerebral or supplying artery; clinical and imaging findings consistent with cortical or cerebellar infarct.
  • Clinical features: Often stuttering/stepwise onset; may be preceded by TIAs; cortical signs (aphasia, neglect, hemianopia); MCA territory most commonly involved.
  • Imaging: Large territorial infarcts; MCA territory, posterior circulation infarcts.
  • Important note (Grainger & Allison): MCA territory infarcts can arise from emboli from the heart or carotid artery, or from in situ thrombosis in the MCA itself.

2. Cardioembolism

  • Mechanism: Embolus originating from the heart travels to occlude a cerebral artery. Accounts for approximately 20% of ischemic strokes.
  • Sources:
    • Atrial fibrillation (thrombus in left atrial appendage) - most common
    • Myocardial infarction (mural thrombus on hypokinetic segment)
    • Valvular disease / prosthetic valves
    • Cardiomyopathy (low ejection fraction)
    • Cardiac tumors (myxoma)
    • Paradoxical emboli through patent foramen ovale (PFO)
  • Clinical features: Sudden onset, maximal deficits at onset; cortical infarcts; multiple vascular territory involvement suggests cardiac source; peripheral infarcts involving multiple vascular territories must come from a proximal (cardiac) source.
  • Imaging: Typically large cortical infarcts; can be hemorrhagic; bilateral or multiple territory involvement.

3. Small Vessel Occlusion (Lacunar Stroke)

  • Mechanism: Occlusion of small, deep penetrating arteries (lenticulostriate, thalamoperforating, pontine perforators) - typically due to lipohyalinosis or microatheroma from chronic hypertension.
  • Territories: Basal ganglia, thalamus, internal capsule, pons, corona radiata.
  • Clinical syndromes (classic lacunar syndromes):
    • Pure motor hemiparesis (posterior limb of internal capsule or pons)
    • Pure sensory stroke (thalamus - VPL nucleus)
    • Sensorimotor stroke
    • Ataxic hemiparesis (pons or internal capsule)
    • Dysarthria-clumsy hand syndrome
  • Diagnostic criteria: Infarct <1.5 cm on MRI; no cortical involvement; no cardioembolic or large vessel source identified.
  • Note (Blumenfeld): "Small-vessel infarcts are sometimes called lacunar infarcts because they resemble small lakes or cavities when the brain is examined on pathologic section."
  • Important caveat (Grainger & Allison): Deep white matter infarcts are typically small vessel in nature but can result from emboli originating from large vessel atheroma or cardiac source - always rule these out.

4. Stroke of Other Determined Etiology

Rare, non-atherosclerotic causes - especially important in young patients:
  • Arterial dissection (carotid or vertebral) - traumatic or spontaneous; thrombus forms at dissection site and embolizes
  • Hypercoagulable states: Protein C/S deficiency, Factor V Leiden, antiphospholipid syndrome, prothrombin gene mutation
  • Vasculitis: Primary CNS vasculitis, SLE, temporal arteritis, polyarteritis nodosa, Wegener's granulomatosis
  • Hematological: Sickle cell disease, polycythemia, hyperviscosity
  • Non-inflammatory vessel wall disease: CADASIL, fibromuscular dysplasia, Moyamoya disease
  • Infections: HIV, syphilis, TB, aspergillosis, trichinosis
  • Migraine-associated stroke (migrainous infarction)
  • Drug-induced: Cocaine, amphetamines

5. Cryptogenic / Undetermined Source

  • All investigations are negative OR two or more possible causes are identified, OR workup is incomplete.
  • ESUS (Embolic Stroke of Undetermined Source): A newer subcategory - non-lacunar infarct with no atrial fibrillation, no high-risk cardiac source, no significant ipsilateral large-artery stenosis. Implies presumed occult embolism as the mechanism.

6. Hypoperfusion Stroke (Watershed / Hemodynamic)

  • Mechanism: Global or regional cerebral hypoperfusion (severe hypotension, cardiac failure, carotid stenosis with hypotensive episode) causes ischemia in arterial border zones.
  • Territories: ACA-MCA watershed; MCA-PCA watershed.
  • Clinical features: "Man in the barrel" syndrome (proximal arm/leg weakness with relative sparing of face/hands); transcortical aphasia; higher-order visual processing disturbances.
  • Key concept (Blumenfeld): "When the blood supply to two adjacent cerebral arteries is compromised, the regions between the two vessels are most susceptible to ischemia - these are called watershed zones."

B. HEMORRHAGIC STROKE (~20% of all strokes)

1. Intracerebral Hemorrhage (ICH) (~15%)

  • Mechanism: Rupture of small intraparenchymal arteries/arterioles, most often at sites of chronic hypertensive damage (Charcot-Bouchard microaneurysms) or amyloid angiopathy.
  • Common sites:
    • Putamen (most common) - 35%
    • Thalamus - 20%
    • Cerebellum - 15%
    • Pons - 10%
    • Subcortical white matter (lobar) - often amyloid angiopathy in elderly
  • Causes:
    • Hypertension (primary; most common overall)
    • Cerebral amyloid angiopathy (lobar, elderly patients)
    • Vascular malformations: AVM, cavernoma
    • Iatrogenic anticoagulation (warfarin, DOACs)
    • Cocaine use
    • Brain tumor (hemorrhage into tumor)
    • Cerebral venous thrombosis with hemorrhagic venous infarction
    • Hemorrhagic transformation of ischemic stroke
  • Pathophysiology: ICP rises causing local neuronal damage; secondary vasoconstriction mediated by blood breakdown products can cause remote perfusion changes (diaschisis).
  • Clinical: Sudden onset; headache common; neurological deficit progresses over minutes to hours (hematoma expansion); vomiting, hypertension; decreased consciousness.
  • Risk factors: Advanced age, prior stroke, hypertension, tobacco, alcohol, Asian/African descent.

2. Subarachnoid Hemorrhage (SAH) (~5%)

  • Mechanism: Hemorrhage into the subarachnoid space (between pia and arachnoid).
  • Primary causes:
    • Berry (saccular) aneurysm rupture - most common (~85%); typically at bifurcation points in the circle of Willis
    • Vascular malformation rupture (AVM, dural AV fistula)
    • Perimesencephalic nonaneurysmal SAH (PM-NASAH) - venous origin; limited to cisterns around midbrain; benign course
    • Trauma (traumatic SAH)
  • Classic presentation: Sudden-onset "thunderclap" headache - "worst headache of life" (sentinel headache may precede rupture by days); neck stiffness, photophobia, loss of consciousness.
  • Common aneurysm sites (circle of Willis):
    • Anterior communicating artery (AComm) - most common (~30%)
    • Posterior communicating artery (PComm) - presents with CN III palsy
    • MCA bifurcation
    • ICA bifurcation
    • Basilar tip ("top of the basilar")

TEMPORAL CLASSIFICATION

TypeDurationDefinition
TIA (Transient Ischemic Attack)<24 hours (typically <1 hour)Transient neurological deficit, no infarction on MRI
RIND (Reversible Ischemic Neurological Deficit)<72 hoursNow largely abandoned term
Completed StrokePermanent deficitEstablished infarction
Stroke-in-evolutionProgressingWorsening deficits over hours

VASCULAR TERRITORY CLASSIFICATION

TerritoryVesselKey Deficits
AnteriorACAContralateral leg > arm weakness (medial homunculus); abulia, alien hand
MiddleMCA (dominant)Contralateral face/arm > leg weakness; Broca's or Wernicke's aphasia; hemianopia; hemisensory loss
MiddleMCA (non-dominant)Contralateral face/arm > leg weakness; hemispatial neglect; anosognosia
PosteriorPCAContralateral hemianopia; cortical blindness (bilateral); thalamic pain; alexia without agraphia
Posterior fossaBasilar / vertebralDiplopia, dysarthria, dysphagia, ataxia, crossed sensorimotor deficits, locked-in syndrome
BrainstemPerforatorsVarious alternating/crossed syndromes (Wallenberg, Weber, etc.)

PART II: CIRCLE OF WILLIS

Source: Neuroanatomy through Clinical Cases 3rd Ed. (Blumenfeld); Miller's Anesthesia 10th Ed.

Anatomy and Structure

The circle of Willis is an anastomotic ring at the base of the brain, formed by the terminal branches of both the internal carotid arteries (anterior circulation) and the vertebrobasilar system (posterior circulation). It sits in the interpeduncular cistern, on the inferior surface of the brain.
CRITICAL FACT: A complete, full-caliber circle of Willis is present in only approximately 34% of individuals (Blumenfeld). Anatomical variants are common, and an incomplete ring is the rule rather than the exception in clinical practice.

Anterior and Posterior Circulations

Anterior and Posterior Circulations - ICA, vertebral arteries, and their intracranial segments
Figure 10.2 - Neuroanatomy through Clinical Cases (Blumenfeld): Anterior circulation arises from the internal carotid arteries; posterior circulation arises from the vertebral arteries.

Anterior Circulation (Carotid System)

Origin: Common carotid arteries arising from the aorta (left side) or brachiocephalic artery (right side). At the carotid bifurcation in the neck, the ICA separates from the ECA.
Segments of the Internal Carotid Artery (ICA):
  1. Cervical segment - relatively vertical course in the neck; no branches
  2. Petrous segment - enters carotid canal of temporal bone; sharp horizontal bend
  3. Cavernous segment - S-shaped turn (carotid siphon) within the cavernous sinus
  4. Supraclinoid (intracranial) segment - passes anterior clinoid process, pierces dura, enters subarachnoid space
Mnemonic for supraclinoid ICA branches - "OPAAM":
  • O - Ophthalmic artery (enters optic foramen with optic nerve; main retinal blood supply)
  • P - Posterior communicating artery (PComm)
  • A - Anterior choroidal artery
  • A - Anterior cerebral artery (ACA)
  • M - Middle cerebral artery (MCA)

Posterior Circulation (Vertebrobasilar System)

Origin: Vertebral arteries arise from the subclavian arteries, ascend through foramina transversaria of cervical vertebrae (C6 to C1), enter the foramen magnum, and join at the pontomedullary junction to form the basilar artery.
Branches of the vertebrobasilar system:
  • Vertebral artery branches: PICA (posterior inferior cerebellar artery), anterior spinal artery, posterior spinal artery
  • Basilar artery branches: AICA (anterior inferior cerebellar artery), pontine perforators, SCA (superior cerebellar artery)
  • Terminal branches of basilar artery: Two PCAs (posterior cerebral arteries) at the basilar tip

The Circle of Willis - Complete Anatomy

Circle of Willis and its main branches - inferior view of the brain
Figure 10.3 - Neuroanatomy through Clinical Cases (Blumenfeld): Circle of Willis and its main branches, inferior view.
The anterior and posterior circulations are joined by:
  • Anterior communicating artery (AComm): Connects the two ACAs anteriorly
  • Posterior communicating arteries (PComm) - bilateral: Connect the ICA (supraclinoid segment) to the ipsilateral PCA, linking anterior and posterior circulations
The complete ring consists of:
ComponentOrigin
ACA (A1 segments - bilateral)Terminal ICA
Anterior communicating artery (AComm)Joins two ACAs
ICA (bilateral, supraclinoid)Carotid system
PComm (bilateral)ICA to PCA
PCA (P1 segments - bilateral)Basilar tip
Basilar artery (top)Vertebral junction

Segment Nomenclature

The initial segments of the three main cerebral arteries are denoted:
  • ACA: A1 (precommunicating) → A2 (postcommunicating, into interhemispheric fissure)
  • MCA: M1 (sphenoidal/horizontal) → M2 (insular, within Sylvian fissure) → M3/M4 (opercular/cortical)
  • PCA: P1 (precommunicating/interpeduncular) → P2 (ambient cistern) → P3/P4 (quadrigeminal/calcarine)

Functional Significance of the Circle of Willis

Under normal physiological conditions, blood from the anterior and posterior circulations does not admix because the pressures in the two systems are essentially equal. Side-to-side admixing across the circle is also limited under normal flow conditions.
Pathological role (collateral circulation): When one arterial branch is occluded, the circle of Willis acts as an anteroposterior or side-to-side shunt to redistribute blood and increase collateral flow to the ischemic region. This is its critical protective function.
  • A patient with complete occlusion of the ICA proximal to the circle may be entirely asymptomatic if collateral flow through AComm (from contralateral ICA) and PComm (from basilar) is sufficient.
  • Conversely, patients with hypoplastic communicating arteries (common anatomical variant) have poor collateral capacity and suffer larger infarcts.

Vascular Territories of the Three Main Cerebral Arteries

The three main arteries give rise to two types of branches:
  1. Superficial (cortical) branches - travel in subarachnoid space into sulci; supply cortex and subcortical white matter
  2. Deep (perforating) branches - arise from proximal segments near the circle; supply basal ganglia, thalamus, internal capsule

Anterior Cerebral Artery (ACA)

  • Passes forward into the interhemispheric fissure, sweeps back over the corpus callosum
  • Main branches: pericallosal and callosomarginal arteries
  • Territory: Medial surface of frontal and anterior parietal lobes; medial sensorimotor cortex (leg area of homunculus)
  • Deep perforators (Heubner's recurrent artery): Head of caudate, anterior limb of internal capsule
  • Infarct deficits: Contralateral leg > arm weakness (medial homunculus); abulia; alien hand syndrome; urinary incontinence (parasagittal cortex)

Middle Cerebral Artery (MCA)

  • Turns laterally into the Sylvian fissure; bifurcates into superior and inferior divisions (sometimes three or four branches)
  • Territory: Most of the lateral convexity of the hemisphere (frontal, parietal, temporal lobes)
  • Deep perforators (lenticulostriate arteries): Putamen, caudate, globus pallidus, posterior limb internal capsule
  • Infarct deficits: Contralateral face and arm > leg weakness; hemisensory loss; hemianopia; aphasia (dominant) or hemispatial neglect (non-dominant)
  • Note (Grainger & Allison): MCA territory infarcts can arise from cardiac emboli, carotid embolism, or in situ MCA thrombosis.

Posterior Cerebral Artery (PCA)

  • Arises from the basilar tip; courses around the midbrain through the ambient and quadrigeminal cisterns
  • Territory: Occipital lobe (primary visual cortex), medial temporal lobe (including hippocampus), inferior temporal lobe
  • Deep perforators (thalamoperforators, posterior choroidal): Thalamus, midbrain, posterior limb of internal capsule, choroid plexus
  • Infarct deficits: Contralateral homonymous hemianopia (macula spared due to dual MCA/PCA supply); thalamic pain; alexia without agraphia (dominant occipital + splenium); prosopagnosia; cortical blindness (bilateral PCA occlusion)

Common Aneurysm Sites in the Circle of Willis

Berry aneurysms characteristically form at arterial bifurcation points where hemodynamic stress is greatest and the tunica media is deficient:
SiteFrequencyClinical Pearl
AComm~30%Most common; rupture causes SAH; may compress ACA
PComm (ICA-PComm junction)~25%Presents with CN III palsy (ptosis, mydriasis, ophthalmoplegia) from compression of CN III
MCA bifurcation (M1-M2)~20%Often presents with hemispheric hematoma
ICA bifurcation~10%
Basilar tip~5-10%"Top of the basilar" syndrome; bilateral PCA territory infarcts + thalamic infarcts
PICA origin~5%Lateral medullary (Wallenberg) syndrome

"Top of the Basilar" Syndrome

Occlusion of the distal basilar artery at its tip produces a characteristic combination of infratentorial and supratentorial infarcts:
  • Bilateral PCA territory infarcts (thalami + occipital lobes)
  • Superior cerebellar artery territory infarcts
  • Midbrain infarcts
  • Clinical: Behavioral changes, memory loss, visual disturbances, oculomotor abnormalities, altered consciousness
This pattern on neuroimaging strongly suggests a proximal embolic source (cardiac embolism to the basilar tip). (Grainger & Allison's Diagnostic Radiology)

Watershed (Border Zone) Zones

Watershed infarcts occur at the boundary zones between adjacent arterial territories when perfusion pressure drops globally:
  • ACA-MCA watershed: Cortex along the superior convexity parasagittally; causes proximal arm/shoulder > leg weakness ("man in the barrel")
  • MCA-PCA watershed: Posterior parieto-occipital region; causes higher-order visual processing disturbances, Balint syndrome
  • Internal (subcortical) watershed: Between superficial and deep MCA territories
Mechanism: Sudden ICA occlusion or severe systemic hypotension with bilateral carotid stenosis.

Summary Comparison: TOAST Subtypes

Subtype% of Ischemic StrokesKey InvestigationSecondary Prevention
Large vessel atherosclerosis~25%Carotid duplex, CTA/MRAAntiplatelet + statin + revascularization if indicated
Cardioembolism~20%Echocardiogram, Holter/telemetryAnticoagulation (AF → warfarin/DOAC)
Small vessel (lacunar)~25%MRI (DWI <1.5cm); BP controlAntiplatelet + aggressive BP/DM management
Other determined~5%Hypercoag panel, vessel imagingDepends on etiology
Cryptogenic/ESUS~25%Prolonged cardiac monitoringAntiplatelet; consider DOAC if high embolic risk
Hemorrhagic~20% totalCT head (gold standard acute)BP control; reverse anticoagulation

Key Textbook References:
  • Neuroanatomy through Clinical Cases, 3rd Ed. (Blumenfeld) - KCC 10.1, 10.2, 10.4; Figures 10.2, 10.3
  • Tintinalli's Emergency Medicine - Table 167-2 Stroke Classification
  • Grainger & Allison's Diagnostic Radiology - TOAST classification and imaging correlates
  • Fuster & Hurst's The Heart, 15th Ed. - Chapter 167: Stroke and Cerebrovascular Disease
  • Miller's Anesthesia, 10th Ed. - Cerebral vascular anatomy and circle of Willis variants
  • Frameworks for Internal Medicine - Stroke types flowchart

great now write it in notes formate flowchart easy to read & remember but coverd everything

Here's everything in clean, scannable notes + flowchart format:

🧠 STROKE — MASTER NOTES

PG-Level | Classification + Circle of Willis


━━━━━━━━━━━━━━━━━━━━━━━━

FLOWCHART 1 — STROKE MASTER TREE

━━━━━━━━━━━━━━━━━━━━━━━━

                          STROKE
                    (Focal neuro deficit
                     of vascular origin)
                            │
          ┌─────────────────┴──────────────────┐
          │                                     │
    ISCHEMIC (80%)                     HEMORRHAGIC (20%)
          │                                     │
    ┌─────┴──────┐                    ┌─────────┴──────────┐
    │            │                    │                     │
THROMBOTIC   EMBOLIC             INTRACEREBRAL         SUBARACHNOID
  (in situ)  (distant            HEMORRHAGE (ICH)       HEMORRHAGE
             source)              ~15%                    (SAH) ~5%
    │            │
    ↓            ↓
Large         Cardiogenic
vessel    OR  Artery-to-
thrombosis    artery

━━━━━━━━━━━━━━━━━━━━━━━━

FLOWCHART 2 — ISCHEMIC STROKE: TOAST CLASSIFICATION

━━━━━━━━━━━━━━━━━━━━━━━━

            ISCHEMIC STROKE
                  │
    ┌─────────────┼──────────────┐──────────────┬────────────────┐
    │             │              │              │                │
  LARGE         SMALL          CARDIO-       OTHER           CRYPTO-
  VESSEL        VESSEL         EMBOLIC       CAUSE           GENIC
  ATHERO-       (LACUNAR)       │            │              (ESUS)
  SCLEROSIS       │             │            │
    │             │           (see          (see
  ~25%           ~25%         Box A)        Box B)         ~25%
                              ~20%          ~5%

━━━━━━━━━━━━━━━━━━━━━━━━

SECTION 1 — ISCHEMIC STROKE SUBTYPES (TOAST)

━━━━━━━━━━━━━━━━━━━━━━━━

1️⃣ LARGE VESSEL ATHEROSCLEROSIS

┌─────────────────────────────────────────────────────────┐
│  MECHANISM:                                              │
│  ► In-situ thrombosis on atherosclerotic plaque         │
│  ► OR artery-to-artery embolism from proximal stenosis  │
│                                                         │
│  VESSELS: ICA > MCA > Vertebral > Basilar               │
│                                                         │
│  CLINICAL CLUES:                                        │
│  ✦ Stuttering/stepwise onset                           │
│  ✦ Preceded by TIAs                                    │
│  ✦ Cortical signs: aphasia, neglect, hemianopia        │
│                                                         │
│  CRITERIA:                                              │
│  ► >50% stenosis on imaging                            │
│  ► Cortical or cerebellar infarct on MRI               │
│                                                         │
│  Rx: Antiplatelet + Statin + Revascularization         │
└─────────────────────────────────────────────────────────┘

2️⃣ SMALL VESSEL (LACUNAR) STROKE

┌─────────────────────────────────────────────────────────┐
│  MECHANISM:                                              │
│  ► Lipohyalinosis / microatheroma of deep perforators   │
│  ► Chronic hypertension → Charcot-Bouchard aneurysms   │
│                                                         │
│  SITES: Putamen > Thalamus > Pons > Internal capsule    │
│         > Corona radiata                                │
│                                                         │
│  CLASSIC SYNDROMES (must memorize):                     │
│  ✦ Pure Motor Hemiparesis      → Post. limb IC / pons  │
│  ✦ Pure Sensory Stroke         → Thalamus (VPL)        │
│  ✦ Sensorimotor Stroke         → Thalamo-capsular      │
│  ✦ Ataxic Hemiparesis          → Pons / IC             │
│  ✦ Dysarthria-Clumsy Hand      → Pons / IC             │
│                                                         │
│  IMAGING: DWI infarct < 1.5 cm; no cortical involvement│
│                                                         │
│  ⚠ CAVEAT: Deep WM infarcts can be embolic — always    │
│    exclude large vessel + cardiac source first!         │
│                                                         │
│  Rx: Antiplatelet + strict BP/DM/lipid control         │
└─────────────────────────────────────────────────────────┘

3️⃣ CARDIOEMBOLIC STROKE

┌─────────────────────────────────────────────────────────┐
│  MECHANISM: Embolus from heart → cerebral artery        │
│  ~20% of all ischemic strokes                           │
│                                                         │
│  BOX A — CARDIAC SOURCES                               │
│  ┌────────────────────────────────────────┐            │
│  │  HIGH RISK:                            │            │
│  │  ► Atrial fibrillation (LAA thrombus)  │            │
│  │  ► Recent MI (mural thrombus)          │            │
│  │  ► Prosthetic valve                    │            │
│  │  ► Dilated cardiomyopathy (low EF)     │            │
│  │  ► Cardiac myxoma                      │            │
│  │  ► Infective endocarditis              │            │
│  │                                        │            │
│  │  MEDIUM RISK:                          │            │
│  │  ► Patent foramen ovale (PFO)          │            │
│  │  ► Atrial septal aneurysm              │            │
│  │  ► Mitral valve prolapse               │            │
│  └────────────────────────────────────────┘            │
│                                                         │
│  CLINICAL CLUES:                                        │
│  ✦ SUDDEN onset, maximal at onset                      │
│  ✦ Multiple territory infarcts → always cardiac        │
│  ✦ Hemorrhagic transformation common                   │
│  ✦ May have AF on ECG/Holter                           │
│                                                         │
│  Rx: Anticoagulation (warfarin / DOAC)                 │
└─────────────────────────────────────────────────────────┘

4️⃣ OTHER DETERMINED CAUSE

┌─────────────────────────────────────────────────────────┐
│  BOX B — THINK "YOUNG STROKE"                           │
│                                                         │
│  VASCULAR:                                              │
│  ► Arterial dissection (carotid/vertebral)             │
│  ► Fibromuscular dysplasia                             │
│  ► Moyamoya disease                                    │
│  ► CADASIL (hereditary WM disease)                     │
│                                                         │
│  INFLAMMATORY / VASCULITIS:                             │
│  ► Primary CNS vasculitis                              │
│  ► SLE, antiphospholipid syndrome                      │
│  ► Temporal arteritis, PAN, Wegener's                  │
│                                                         │
│  HYPERCOAGULABLE:                                       │
│  ► Protein C/S deficiency, Factor V Leiden             │
│  ► Antithrombin III deficiency                         │
│  ► Prothrombin gene mutation                           │
│  ► Antiphospholipid antibodies                         │
│  ► Sickle cell, polycythemia, hyperviscosity           │
│                                                         │
│  INFECTIONS: HIV, syphilis, TB meningitis              │
│  DRUGS: Cocaine, amphetamines                          │
│  OTHER: Migraine-associated infarction                 │
└─────────────────────────────────────────────────────────┘

5️⃣ CRYPTOGENIC / ESUS

┌─────────────────────────────────────────────────────────┐
│  CRYPTOGENIC: No cause found after full workup          │
│                                                         │
│  ESUS (Embolic Stroke of Undetermined Source):          │
│  ► Non-lacunar infarct on neuroimaging                 │
│  ► No AF detected                                      │
│  ► No >50% ipsilateral large-artery stenosis           │
│  ► No high-risk cardiac source                         │
│  ► Implies occult embolism                             │
│                                                         │
│  Rx: Antiplatelet; prolonged cardiac monitoring        │
└─────────────────────────────────────────────────────────┘

6️⃣ WATERSHED / HEMODYNAMIC STROKE

┌─────────────────────────────────────────────────────────┐
│  MECHANISM: Global/regional hypoperfusion →             │
│  ischemia at border zones between 2 territories        │
│                                                         │
│  ZONES & DEFICITS:                                      │
│  ┌─────────────────────────────────────────┐           │
│  │  ACA-MCA watershed                      │           │
│  │  → Proximal arm > leg weakness          │           │
│  │  → "MAN IN THE BARREL" syndrome        │           │
│  │                                         │           │
│  │  MCA-PCA watershed                      │           │
│  │  → Higher-order visual disturbance      │           │
│  │  → Transcortical aphasia               │           │
│  │  → Balint syndrome (bilateral)         │           │
│  └─────────────────────────────────────────┘           │
│                                                         │
│  TRIGGERS: Cardiac arrest, severe hypotension,         │
│            tight carotid stenosis + hypotensive        │
│            episode                                      │
└─────────────────────────────────────────────────────────┘

━━━━━━━━━━━━━━━━━━━━━━━━

SECTION 2 — HEMORRHAGIC STROKE

━━━━━━━━━━━━━━━━━━━━━━━━

FLOWCHART 3 — ICH vs SAH

          HEMORRHAGIC STROKE
                  │
    ┌─────────────┴───────────────┐
    │                             │
   ICH                          SAH
(Intraparenchymal)          (Subarachnoid)
~15%                         ~5%
    │                             │
    ├── HTN → basal ganglia       ├── Berry aneurysm (85%)
    │   putamen (MC)              │   at CoW bifurcations
    ├── Amyloid angiopathy        │
    │   → lobar (elderly)         ├── AVM rupture
    ├── AVM / cavernoma           │
    ├── Anticoagulants            └── Perimesencephalic
    ├── Cocaine                       nonaneurysmal SAH
    ├── Hemorrhagic transformation    (benign; venous)
    └── Cerebral venous thrombosis

🔴 ICH — LOCATION GUIDE

┌──────────────────────────────────────────────────────────┐
│  SITE           │  CAUSE           │  KEY DEFICIT        │
├──────────────────────────────────────────────────────────┤
│  Putamen (35%)  │  HTN             │  Contralat. motor + │
│                 │                  │  hemisensory         │
├──────────────────────────────────────────────────────────┤
│  Thalamus (20%) │  HTN             │  Sensory > motor;   │
│                 │                  │  eye deviation DOWN  │
├──────────────────────────────────────────────────────────┤
│  Pons (10%)     │  HTN             │  Quadriplegia;      │
│                 │                  │  pinpoint pupils     │
├──────────────────────────────────────────────────────────┤
│  Cerebellum     │  HTN / AVM       │  Ataxia; NO motor   │
│  (15%)          │                  │  deficit initially   │
├──────────────────────────────────────────────────────────┤
│  Lobar (WM)     │  Amyloid         │  Variable; elderly; │
│                 │  angiopathy      │  recurrent bleeds    │
└──────────────────────────────────────────────────────────┘

🔴 SAH — KEY POINTS

┌─────────────────────────────────────────────────────────┐
│  PRESENTATION:                                          │
│  ✦ "THUNDERCLAP" headache — worst in life              │
│  ✦ Sentinel headache days before (warning leak)        │
│  ✦ Neck stiffness, photophobia, vomiting               │
│  ✦ CN III palsy → PComm aneurysm                      │
│                                                         │
│  ANEURYSM SITES AT CIRCLE OF WILLIS:                   │
│  AComm         ~30%  (MC overall)                      │
│  PComm         ~25%  (CN III palsy)                    │
│  MCA bifurc.   ~20%                                    │
│  ICA bifurc.   ~10%                                    │
│  Basilar tip   ~5-10% (top of basilar syndrome)        │
└─────────────────────────────────────────────────────────┘

━━━━━━━━━━━━━━━━━━━━━━━━

SECTION 3 — TEMPORAL CLASSIFICATION

━━━━━━━━━━━━━━━━━━━━━━━━

DURATION OF DEFICIT
        │
        ├── <24 hrs, no infarct on MRI ─── TIA
        │   (typically <1 hour in practice)
        │
        ├── Progressing over hours ──────── STROKE-IN-EVOLUTION
        │
        └── Permanent, established ──────── COMPLETED STROKE

━━━━━━━━━━━━━━━━━━━━━━━━

SECTION 4 — CIRCLE OF WILLIS

━━━━━━━━━━━━━━━━━━━━━━━━

FLOWCHART 4 — BLOOD SUPPLY TO BRAIN

          AORTA
            │
    ┌───────┴────────┐
    │                │
BRACHIOCEPHALIC    L. COMMON
  ARTERY           CAROTID
    │
  ┌─┴──────────────┐
  │                │
R. COMMON       R. SUBCLAVIAN
CAROTID             │
    │            VERTEBRAL A.
    │                │
CAROTID          ascends through
BIFURCATION      foramina
    │            transversaria
    │                │
    ├── ECA          │
    │            enters foramen
    └── ICA      magnum
          │          │
      (4 SEGMENTS)   │
          │          │
    CERVICAL         │
    PETROUS      ┌───┘
    CAVERNOUS    │
    SUPRACLINOID ├── joins at
                 │   pontomedullary
                 │   junction
                 │
              BASILAR
              ARTERY
                 │
                 └── BASILAR TIP
                           │
                      ┌────┴────┐
                      │         │
                    L.PCA     R.PCA

FLOWCHART 5 — CIRCLE OF WILLIS ANATOMY

          ANTERIOR COMMUNICATING A. (AComm)
                    │
          ┌─────────┴────────┐
          │                  │
        L.ACA              R.ACA
          │                  │
        L.ICA              R.ICA
    (supraclinoid)      (supraclinoid)
          │                  │
       L.PComm           R.PComm
          │                  │
        L.PCA              R.PCA
          └─────────┬────────┘
                    │
              BASILAR TIP
              (basilar artery)

COMPLETE RING present in only ~34% of individuals!

ICA BRANCHES MNEMONIC — "OPAAM"

┌─────────────────────────────────────────────────────────┐
│  O — Ophthalmic artery                                  │
│      (→ optic foramen; retinal supply)                 │
│  P — Posterior communicating artery (PComm)             │
│      (→ links ICA to PCA; aneurysm → CN III palsy)    │
│  A — Anterior choroidal artery                          │
│      (→ posterior limb IC, optic tract, hippocampus)  │
│  A — Anterior cerebral artery (ACA)                     │
│  M — Middle cerebral artery (MCA)                       │
└─────────────────────────────────────────────────────────┘

ICA SEGMENTS — QUICK TABLE

┌──────────────┬──────────────────────────────────────────┐
│  SEGMENT     │  COURSE / NOTE                           │
├──────────────┼──────────────────────────────────────────┤
│  Cervical    │  Vertical in neck; NO branches           │
├──────────────┼──────────────────────────────────────────┤
│  Petrous     │  Carotid canal; horizontal bend           │
├──────────────┼──────────────────────────────────────────┤
│  Cavernous   │  S-curve = carotid siphon; within        │
│              │  cavernous sinus                          │
├──────────────┼──────────────────────────────────────────┤
│  Supraclinoid│  Pierces dura; enters subarachnoid space │
│  (intracranial)  gives OPAAM branches                   │
└──────────────┴──────────────────────────────────────────┘

VERTEBROBASILAR BRANCHES — FLOWCHART

VERTEBRAL ARTERY
    ├── Posterior inferior cerebellar a. (PICA)
    │   → lateral medulla + inferior cerebellum
    │   → PICA infarct = Wallenberg syndrome
    ├── Anterior spinal artery
    └── Posterior spinal artery

BASILAR ARTERY
    ├── AICA (anterior inferior cerebellar a.)
    │   → lateral pons + anterior inferior cerebellum
    ├── Pontine perforators
    │   → medial pons
    ├── SCA (superior cerebellar a.)
    │   → superior cerebellum + midbrain
    └── PCA (terminal) × 2
        → occipital lobe + medial temporal + thalamus

VASCULAR TERRITORIES AT A GLANCE

┌──────────────────────────────────────────────────────────────┐
│  ARTERY   │  TERRITORY              │  INFARCT DEFICITS      │
├──────────────────────────────────────────────────────────────┤
│  ACA      │  Medial frontal +        │  Leg > arm weakness    │
│           │  anterior parietal       │  Abulia, alien hand    │
│           │  (medial homunculus)     │  Urinary incontinence  │
├──────────────────────────────────────────────────────────────┤
│  MCA      │  Lateral convexity       │  Face + arm > leg      │
│  dominant │  frontal/parietal/temp.  │  Broca's / Wernicke's  │
│           │                          │  Hemianopia            │
├──────────────────────────────────────────────────────────────┤
│  MCA      │  Same territory          │  Face + arm > leg      │
│  non-dom  │                          │  Hemispatial NEGLECT   │
│           │                          │  Anosognosia           │
├──────────────────────────────────────────────────────────────┤
│  PCA      │  Occipital, medial       │  Homonymous hemianopia │
│           │  temporal, thalamus      │  (macula SPARED)       │
│           │                          │  Thalamic pain         │
│           │                          │  Alexia w/o agraphia   │
├──────────────────────────────────────────────────────────────┤
│  Basilar  │  Pons, midbrain,         │  Diplopia, dysarthria  │
│           │  cerebellum              │  Dysphagia, ataxia     │
│           │                          │  Crossed syndromes     │
│           │                          │  Locked-in (total occ) │
└──────────────────────────────────────────────────────────────┘

DEEP PERFORATORS — HIGH-YIELD TABLE

┌──────────────────────┬─────────────────────────────────────┐
│  ARTERY              │  DEEP STRUCTURES SUPPLIED           │
├──────────────────────┼─────────────────────────────────────┤
│  Lenticulostriate    │  Putamen, caudate, globus pallidus, │
│  (from MCA M1)       │  posterior limb internal capsule    │
├──────────────────────┼─────────────────────────────────────┤
│  Heubner's recurrent │  Head of caudate,                   │
│  (from ACA A1-A2)    │  anterior limb internal capsule     │
├──────────────────────┼─────────────────────────────────────┤
│  Thalamoperforators  │  Thalamus (medial, intralaminar)    │
│  (from P1 / PComm)   │                                     │
├──────────────────────┼─────────────────────────────────────┤
│  Ant. choroidal      │  Post. limb IC, optic tract,        │
│  (from ICA)          │  hippocampus, lateral geniculate    │
├──────────────────────┼─────────────────────────────────────┤
│  Pontine perforators │  Medial pons (paramedian)           │
│  (from basilar)      │  → lacunar strokes in pons          │
└──────────────────────┴─────────────────────────────────────┘

WATERSHED ZONES — VISUAL SUMMARY

CORONAL VIEW (simplified):

    Medial surface          Lateral surface
         │                        │
    ACA territory           MCA territory
         │                        │
    ←──── ACA-MCA WATERSHED ────→
         (parasagittal strip)
         DEFICIT: proximal arm/shoulder weakness
         "MAN IN THE BARREL"

    MCA territory           PCA territory
         │                        │
    ←── MCA-PCA WATERSHED ──────→
         (posterior parieto-occipital)
         DEFICIT: visual processing, transcortical aphasia

━━━━━━━━━━━━━━━━━━━━━━━━

SECTION 5 — HIGH-YIELD QUICK RECALL BOX

━━━━━━━━━━━━━━━━━━━━━━━━

┌─────────────────────────────────────────────────────────────┐
│            STROKE PEARLS — DON'T MISS                       │
├─────────────────────────────────────────────────────────────┤
│  ► Stroke ~80% ischemic / ~20% hemorrhagic                  │
│  ► TOAST: Large vessel 25% | Lacunar 25% |                  │
│    Cardioembolic 20% | Other 5% | Cryptogenic 25%           │
│  ► Multiple territories = CARDIAC source until proven       │
│    otherwise                                                │
│  ► Deep WM infarct ≠ always lacunar; rule out emboli       │
│  ► Complete CoW in only ~34% of people                      │
│  ► PComm aneurysm → CN III palsy (surgical emergency)       │
│  ► AComm aneurysm = MC SAH site (~30%)                      │
│  ► Basilar tip occlusion = bilateral thalami + occipital    │
│    lobes + cerebellar infarcts                              │
│  ► "Man in barrel" = ACA-MCA watershed                      │
│  ► Thunderclap headache = SAH until proven otherwise        │
│  ► tPA window: 4.5 hours from onset                         │
│  ► Thrombectomy: up to 24 hours (with penumbral imaging)    │
│  ► PICA infarct = Wallenberg syndrome                       │
│    (ipsilat. face numbness + contralat. body numbness)      │
│  ► Putamen = MC site of HTN-related ICH                     │
└─────────────────────────────────────────────────────────────┘

━━━━━━━━━━━━━━━━━━━━━━━━

SECTION 6 — MNEMONIC BANK

━━━━━━━━━━━━━━━━━━━━━━━━

ICA branches (supraclinoid):  O P A A M
                              Ophthalmic
                              Posterior communicating
                              Anterior choroidal
                              Anterior cerebral
                              Middle cerebral

LACUNAR syndromes:  "Pure Motor, Pure Sensory, Senso-Motor,
                     Ataxic Hemi, Dysarthria-Clumsy Hand"

HTN ICH sites (frequency):  "Put That Pons Carefully Lobar"
                              Putamen > Thalamus > Pons >
                              Cerebellum > Lobar

SAH aneurysm sites:  A-COMM is the MOST COMMON
                     P-COMM gives CN 3 compression
                     BASILAR TIP = bilateral PCA devastation

TOAST order:  Large, Small, Cardio, Other, Cryptogenic
              "Loud Students Create Outstanding Chaos"

Sources: Neuroanatomy through Clinical Cases 3rd Ed. (Blumenfeld) | Tintinalli's Emergency Medicine | Grainger & Allison's Diagnostic Radiology | Fuster & Hurst's The Heart 15th Ed. | Miller's Anesthesia 10th Ed. | Frameworks for Internal Medicine

Create a printable PDF quick reference card for stroke classification & CoW anatomy

Reading File
Running Command

ls -la /tmp/workspace/ 2>/dev/null || mkdir -p /tmp/workspace && echo "workspace ready"

Running Command

mkdir -p /tmp/workspace/stroke-refcard && python3 -c "from reportlab.lib import colors; print('reportlab OK')"

Writing File

~/stroke-refcard/build_card.py

"""
Stroke & Circle of Willis - Printable Quick Reference Card
A4 landscape, 2 pages — built with ReportLab
"""

from reportlab.lib.pagesizes import A4, landscape
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.platypus import (
    SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer,
    HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.platypus.flowables import Flowable
from reportlab.graphics.shapes import Drawing, Rect, String, Line, Polygon
from reportlab.graphics import renderPDF

# ── Colour Palette ────────────────────────────────────────────────────────────
C_NAVY     = colors.HexColor("#1a2e4a")
C_CRIMSON  = colors.HexColor("#c0392b")
C_TEAL     = colors.HexColor("#1abc9c")
C_AMBER    = colors.HexColor("#f39c12")
C_PURPLE   = colors.HexColor("#8e44ad")
C_BLUE     = colors.HexColor("#2980b9")
C_GREEN    = colors.HexColor("#27ae60")
C_ORANGE   = colors.HexColor("#e67e22")
C_LIGHT    = colors.HexColor("#ecf0f1")
C_DARKGRAY = colors.HexColor("#2c3e50")
C_MIDGRAY  = colors.HexColor("#7f8c8d")
C_WHITE    = colors.white
C_PALE_RED = colors.HexColor("#fdecea")
C_PALE_BLU = colors.HexColor("#e8f4fd")
C_PALE_GRN = colors.HexColor("#eafaf1")
C_PALE_YLW = colors.HexColor("#fef9e7")
C_PALE_PUR = colors.HexColor("#f5eef8")
C_PALE_TEA = colors.HexColor("#e8f8f5")

PAGE_W, PAGE_H = landscape(A4)   # 297 × 210 mm
MARGIN = 8 * mm

# ── Style helpers ─────────────────────────────────────────────────────────────
def sty(name, **kw):
    base = getSampleStyleSheet()["Normal"]
    kw.setdefault("fontName", "Helvetica")
    kw.setdefault("fontSize", 7.5)
    kw.setdefault("leading",  10)
    kw.setdefault("textColor", C_DARKGRAY)
    return ParagraphStyle(name, parent=base, **kw)

H1  = sty("H1",  fontName="Helvetica-Bold", fontSize=16, leading=20,
           textColor=C_WHITE, alignment=TA_CENTER)
H2  = sty("H2",  fontName="Helvetica-Bold", fontSize=9,  leading=12,
           textColor=C_WHITE, alignment=TA_CENTER)
H3  = sty("H3",  fontName="Helvetica-Bold", fontSize=8,  leading=11,
           textColor=C_NAVY)
BODY= sty("BODY",fontSize=7, leading=9.5)
BODW= sty("BODW",fontSize=7, leading=9.5, textColor=C_WHITE)
BOLD= sty("BOLD",fontName="Helvetica-Bold", fontSize=7, leading=9.5)
BOLW= sty("BOLW",fontName="Helvetica-Bold", fontSize=7, leading=9.5, textColor=C_WHITE)
SML = sty("SML", fontSize=6.2, leading=8.5, textColor=C_MIDGRAY)
CTR = sty("CTR", fontSize=7,   leading=9.5, alignment=TA_CENTER)
CTRB= sty("CTRB",fontName="Helvetica-Bold", fontSize=7.5, leading=10,
           alignment=TA_CENTER, textColor=C_NAVY)

def P(txt, style=BODY):  return Paragraph(txt, style)
def SP(h=2): return Spacer(1, h*mm)

def col_header(txt, bg=C_NAVY, fg=C_WHITE, size=8):
    return Paragraph(f"<b>{txt}</b>",
                     sty("ch", fontName="Helvetica-Bold", fontSize=size,
                         leading=11, textColor=fg, alignment=TA_CENTER))

# ── Section title bar ─────────────────────────────────────────────────────────
def section_bar(txt, bg=C_NAVY, width=None):
    w = width or (PAGE_W - 2*MARGIN)
    d = Drawing(w, 14)
    d.add(Rect(0, 0, w, 14, fillColor=bg, strokeColor=None))
    d.add(String(6, 3.5, txt, fontName="Helvetica-Bold",
                  fontSize=8.5, fillColor=colors.white))
    return d

# ── Flowable box ──────────────────────────────────────────────────────────────
class ColorBox(Flowable):
    """A filled rounded rectangle containing text lines."""
    def __init__(self, lines, bg, w, h, text_color=C_DARKGRAY,
                 font="Helvetica", fsize=6.8, bold_first=False):
        super().__init__()
        self.lines = lines
        self.bg    = bg
        self.w, self.h = w, h
        self.text_color = text_color
        self.font   = font
        self.fsize  = fsize
        self.bold_first = bold_first

    def wrap(self, *args): return self.w, self.h
    def draw(self):
        c = self.canv
        c.setFillColor(self.bg)
        c.roundRect(0, 0, self.w, self.h, 3, fill=1, stroke=0)
        c.setFillColor(self.text_color)
        y = self.h - self.fsize - 3
        for i, ln in enumerate(self.lines):
            fn = ("Helvetica-Bold" if (i == 0 and self.bold_first)
                  else self.font)
            c.setFont(fn, self.fsize)
            c.drawString(5, y, ln)
            y -= self.fsize + 2
            if y < 3: break


# ══════════════════════════════════════════════════════════════════════════════
#  PAGE 1
# ══════════════════════════════════════════════════════════════════════════════

def page1_elements():
    elems = []
    W = PAGE_W - 2*MARGIN  # usable width

    # ── MASTER HEADER ─────────────────────────────────────────────────────────
    hdr = Drawing(W, 26)
    hdr.add(Rect(0, 0, W, 26, fillColor=C_NAVY, strokeColor=None, rx=4, ry=4))
    hdr.add(String(W/2, 15, "STROKE  —  QUICK REFERENCE CARD",
                   fontName="Helvetica-Bold", fontSize=13,
                   fillColor=colors.white, textAnchor="middle"))
    hdr.add(String(W/2, 4, "Classification • Pathophysiology • TOAST • Circle of Willis",
                   fontName="Helvetica", fontSize=7,
                   fillColor=colors.HexColor("#bdc3c7"), textAnchor="middle"))
    elems.append(hdr); elems.append(SP(2))

    # ── ROW 1: Master tree + TOAST table ──────────────────────────────────────
    # Left: Master stroke tree
    tree_w = 88*mm
    tree = Drawing(tree_w, 62)
    tree.add(Rect(0, 0, tree_w, 62, fillColor=C_PALE_BLU, strokeColor=C_BLUE, strokeWidth=0.5, rx=3))
    tree.add(String(tree_w/2, 52, "STROKE MASTER TREE",
                    fontName="Helvetica-Bold", fontSize=7.5,
                    fillColor=C_NAVY, textAnchor="middle"))
    # stroke box
    bx = 34; by = 40; bw = 38; bh = 10
    tree.add(Rect(bx, by, bw, bh, fillColor=C_NAVY, rx=2))
    tree.add(String(bx+bw/2, by+2.5, "STROKE",
                    fontName="Helvetica-Bold", fontSize=7.5,
                    fillColor=colors.white, textAnchor="middle"))
    # branches
    cx = bx + bw/2
    tree.add(Line(cx-16, by, 28, 29, strokeColor=C_NAVY, strokeWidth=1))
    tree.add(Line(cx+16, by, tree_w-28, 29, strokeColor=C_NAVY, strokeWidth=1))
    # ischemic box
    tree.add(Rect(tree_w-72, 18, 44, 12, fillColor=C_BLUE, rx=2))
    tree.add(String(tree_w-72+22, 20.5, "ISCHEMIC  80%",
                    fontName="Helvetica-Bold", fontSize=7,
                    fillColor=colors.white, textAnchor="middle"))
    # haem box
    tree.add(Rect(4, 18, 44, 12, fillColor=C_CRIMSON, rx=2))
    tree.add(String(26, 20.5, "HEMORRHAGIC  20%",
                    fontName="Helvetica-Bold", fontSize=7,
                    fillColor=colors.white, textAnchor="middle"))
    # sub-branches ischemic
    ix = tree_w-72+22
    tree.add(Line(ix-10, 18, ix-16, 10, strokeColor=C_BLUE, strokeWidth=0.8))
    tree.add(Line(ix+10, 18, ix+16, 10, strokeColor=C_BLUE, strokeWidth=0.8))
    tree.add(Rect(tree_w-82, 1, 28, 10, fillColor=colors.HexColor("#d6eaf8"), rx=2))
    tree.add(String(tree_w-82+14, 3, "Ischemic",
                    fontName="Helvetica", fontSize=5.5,
                    fillColor=C_BLUE, textAnchor="middle"))
    tree.add(String(tree_w-82+14, -3.5, "(thrombotic/",
                    fontName="Helvetica", fontSize=5,
                    fillColor=C_BLUE, textAnchor="middle"))
    tree.add(Rect(tree_w-50, 1, 28, 10, fillColor=colors.HexColor("#d6eaf8"), rx=2))
    tree.add(String(tree_w-50+14, 3, "Embolic",
                    fontName="Helvetica", fontSize=5.5,
                    fillColor=C_BLUE, textAnchor="middle"))
    # sub-branches haem
    hx = 26
    tree.add(Line(hx-10, 18, hx-8, 10, strokeColor=C_CRIMSON, strokeWidth=0.8))
    tree.add(Line(hx+10, 18, hx+10, 10, strokeColor=C_CRIMSON, strokeWidth=0.8))
    tree.add(Rect(2, 1, 22, 9, fillColor=colors.HexColor("#fadbd8"), rx=2))
    tree.add(String(13, 3, "ICH ~15%",
                    fontName="Helvetica-Bold", fontSize=5.8,
                    fillColor=C_CRIMSON, textAnchor="middle"))
    tree.add(Rect(26, 1, 22, 9, fillColor=colors.HexColor("#fadbd8"), rx=2))
    tree.add(String(37, 3, "SAH ~5%",
                    fontName="Helvetica-Bold", fontSize=5.8,
                    fillColor=C_CRIMSON, textAnchor="middle"))

    # Right: TOAST classification table
    toast_w = W - tree_w - 4*mm
    toast_data = [
        [col_header("TOAST CLASSIFICATION OF ISCHEMIC STROKE", bg=C_BLUE, size=7.5)],
        [Table(
            [
                [P("<b>SUBTYPE</b>", BOLD), P("<b>%</b>", BOLD),
                 P("<b>MECHANISM</b>", BOLD), P("<b>KEY FEATURE</b>", BOLD),
                 P("<b>Rx</b>", BOLD)],
                [P("Large Vessel\nAtherosclerosis", BOLD),
                 P("~25%", CTR),
                 P("Thrombosis / A-to-A\nembolism at plaque"),
                 P("Stuttering onset\nTIAs; cortical signs\n>50% stenosis"),
                 P("Antiplatelet\n+ Statin\n+ Revasc.")],
                [P("Small Vessel\n(Lacunar)", BOLD),
                 P("~25%", CTR),
                 P("Lipohyalinosis of\ndeep perforators\n(HTN)"),
                 P("DWI <1.5 cm; deep\nno cortical signs\n5 classic syndromes"),
                 P("Antiplatelet\nBP/DM/\nlipid control")],
                [P("Cardioembolism", BOLD),
                 P("~20%", CTR),
                 P("Thrombus from\nheart → brain"),
                 P("Sudden onset;\nmulti-territory;\nHemorrhagic Tx"),
                 P("Anticoag.\n(DOAC/warfarin)")],
                [P("Other Cause", BOLD),
                 P("~5%", CTR),
                 P("Dissection, vasculitis,\nhypercoag, Moyamoya\nCADASIL, sickle cell"),
                 P("Young stroke\nworkup; rare\netiologies"),
                 P("Cause-\nspecific")],
                [P("Cryptogenic\n(ESUS)", BOLD),
                 P("~25%", CTR),
                 P("No cause found;\nESUS = non-lacunar\nno AF, no stenosis"),
                 P("Prolonged cardiac\nmonitoring;\noccult embolism"),
                 P("Antiplatelet;\nconsider\nDOAC")],
            ],
            colWidths=[toast_w*0.18, toast_w*0.07, toast_w*0.26,
                       toast_w*0.28, toast_w*0.19],
            style=TableStyle([
                ("BACKGROUND", (0,0), (-1,0), C_NAVY),
                ("TEXTCOLOR",  (0,0), (-1,0), C_WHITE),
                ("FONTNAME",   (0,0), (-1,0), "Helvetica-Bold"),
                ("FONTSIZE",   (0,0), (-1,0), 6.5),
                ("ROWBACKGROUNDS", (0,1), (-1,-1),
                 [C_PALE_BLU, C_WHITE, C_PALE_BLU, C_WHITE, C_PALE_BLU]),
                ("GRID",       (0,0), (-1,-1), 0.3, colors.HexColor("#bdc3c7")),
                ("VALIGN",     (0,0), (-1,-1), "TOP"),
                ("TOPPADDING", (0,0), (-1,-1), 2),
                ("BOTTOMPADDING", (0,0), (-1,-1), 2),
                ("LEFTPADDING", (0,0), (-1,-1), 2),
            ])
        )]
    ]

    row1 = Table(
        [[tree, Table(toast_data,
                      colWidths=[toast_w],
                      style=TableStyle([
                          ("GRID", (0,0), (-1,-1), 0, colors.white),
                          ("TOPPADDING", (0,0), (-1,-1), 0),
                          ("BOTTOMPADDING", (0,0), (-1,-1), 0),
                          ("LEFTPADDING", (0,0), (-1,-1), 0),
                          ("RIGHTPADDING", (0,0), (-1,-1), 0),
                      ]))]],
        colWidths=[tree_w + 4*mm, toast_w],
        style=TableStyle([
            ("VALIGN", (0,0), (-1,-1), "TOP"),
            ("LEFTPADDING", (0,0), (-1,-1), 0),
            ("RIGHTPADDING", (0,0), (-1,-1), 0),
            ("TOPPADDING", (0,0), (-1,-1), 0),
            ("BOTTOMPADDING", (0,0), (-1,-1), 0),
        ])
    )
    elems.append(row1); elems.append(SP(2))

    # ── ROW 2: Lacunar syndromes | ICH locations | SAH pearls | Temporal ─────
    # Lacunar syndromes
    lac_data = [
        [col_header("LACUNAR SYNDROMES", bg=C_TEAL)],
        [Table([
            [P("<b>SYNDROME</b>", BOLD), P("<b>SITE</b>", BOLD)],
            [P("Pure Motor Hemiplegia"),    P("Post. limb IC / Pons")],
            [P("Pure Sensory Stroke"),      P("Thalamus (VPL)")],
            [P("Sensorimotor Stroke"),      P("Thalamo-capsular")],
            [P("Ataxic Hemiparesis"),       P("Pons / IC")],
            [P("Dysarthria-Clumsy Hand"),   P("Pons / IC")],
        ], colWidths=[36*mm, 30*mm],
           style=TableStyle([
               ("BACKGROUND", (0,0), (-1,0), C_TEAL),
               ("TEXTCOLOR",  (0,0), (-1,0), C_WHITE),
               ("ROWBACKGROUNDS", (0,1),(-1,-1),[C_PALE_TEA, C_WHITE]*5),
               ("GRID", (0,0),(-1,-1), 0.3, colors.HexColor("#a9cce3")),
               ("FONTSIZE", (0,0),(-1,-1), 6.5),
               ("TOPPADDING", (0,0),(-1,-1), 1.5),
               ("BOTTOMPADDING", (0,0),(-1,-1), 1.5),
               ("LEFTPADDING", (0,0),(-1,-1), 2),
           ]))]
    ]

    # ICH locations
    ich_data = [
        [col_header("ICH LOCATIONS (HTN)", bg=C_CRIMSON)],
        [Table([
            [P("<b>SITE</b>", BOLD), P("<b>%</b>", BOLD), P("<b>KEY SIGN</b>", BOLD)],
            [P("Putamen"),       P("35%",CTR), P("Contralat. motor+sensory")],
            [P("Thalamus"),      P("20%",CTR), P("Sensory>motor; downgaze")],
            [P("Pons"),          P("10%",CTR), P("Quadriplegia; pinpoint pupils")],
            [P("Cerebellum"),    P("15%",CTR), P("Ataxia; no early motor ↓")],
            [P("Lobar (WM)"),    P("20%",CTR), P("Amyloid angiopathy; elderly")],
        ], colWidths=[22*mm, 10*mm, 36*mm],
           style=TableStyle([
               ("BACKGROUND", (0,0), (-1,0), C_CRIMSON),
               ("TEXTCOLOR",  (0,0), (-1,0), C_WHITE),
               ("ROWBACKGROUNDS", (0,1),(-1,-1),[C_PALE_RED, C_WHITE]*5),
               ("GRID", (0,0),(-1,-1), 0.3, colors.HexColor("#f1948a")),
               ("FONTSIZE", (0,0),(-1,-1), 6.5),
               ("TOPPADDING", (0,0),(-1,-1), 1.5),
               ("BOTTOMPADDING", (0,0),(-1,-1), 1.5),
               ("LEFTPADDING", (0,0),(-1,-1), 2),
           ]))]
    ]

    # SAH pearls
    sah_data = [
        [col_header("SAH ANEURYSM SITES", bg=C_PURPLE)],
        [Table([
            [P("<b>SITE</b>", BOLD), P("<b>%</b>", BOLD), P("<b>PEARL</b>", BOLD)],
            [P("AComm"),        P("30%",CTR), P("MC; behavioural Δ")],
            [P("PComm"),        P("25%",CTR), P("CN III palsy →surgical emerg.")],
            [P("MCA bifurc."),  P("20%",CTR), P("Hemispheric haematoma")],
            [P("ICA bifurc."),  P("10%",CTR), P("—")],
            [P("Basilar tip"),  P("8%",CTR),  P("Bilateral PCA + thalami")],
        ], colWidths=[20*mm, 9*mm, 38*mm],
           style=TableStyle([
               ("BACKGROUND", (0,0), (-1,0), C_PURPLE),
               ("TEXTCOLOR",  (0,0), (-1,0), C_WHITE),
               ("ROWBACKGROUNDS", (0,1),(-1,-1),[C_PALE_PUR, C_WHITE]*5),
               ("GRID", (0,0),(-1,-1), 0.3, colors.HexColor("#c39bd3")),
               ("FONTSIZE", (0,0),(-1,-1), 6.5),
               ("TOPPADDING", (0,0),(-1,-1), 1.5),
               ("BOTTOMPADDING", (0,0),(-1,-1), 1.5),
               ("LEFTPADDING", (0,0),(-1,-1), 2),
           ]))]
    ]

    # Temporal + treatment
    temp_data = [
        [col_header("TEMPORAL + TREATMENT", bg=C_AMBER)],
        [Table([
            [P("<b>TYPE</b>", BOLD),       P("<b>DURATION</b>", BOLD)],
            [P("TIA"),              P("<24 h; no MRI infarct")],
            [P("Stroke-in-evolution"), P("Progressing over hours")],
            [P("Completed stroke"), P("Permanent deficit")],
            [P("<b>tPA window</b>", BOLD),   P("<b>≤4.5 hours</b>", BOLD)],
            [P("<b>Thrombectomy</b>", BOLD),  P("<b>Up to 24 h (LVO)</b>", BOLD)],
        ], colWidths=[28*mm, 36*mm],
           style=TableStyle([
               ("BACKGROUND", (0,0), (-1,0), C_AMBER),
               ("TEXTCOLOR",  (0,0), (-1,0), C_WHITE),
               ("ROWBACKGROUNDS", (0,1),(-1,-1),[C_PALE_YLW, C_WHITE]*5),
               ("BACKGROUND", (0,4), (-1,-1), colors.HexColor("#fdebd0")),
               ("GRID", (0,0),(-1,-1), 0.3, colors.HexColor("#f0b27a")),
               ("FONTSIZE", (0,0),(-1,-1), 6.5),
               ("TOPPADDING", (0,0),(-1,-1), 1.5),
               ("BOTTOMPADDING", (0,0),(-1,-1), 1.5),
               ("LEFTPADDING", (0,0),(-1,-1), 2),
           ]))]
    ]

    def make_box(data, w):
        return Table(data, colWidths=[w],
                     style=TableStyle([
                         ("GRID", (0,0),(-1,-1), 0, colors.white),
                         ("TOPPADDING", (0,0),(-1,-1), 0),
                         ("BOTTOMPADDING", (0,0),(-1,-1), 0),
                         ("LEFTPADDING", (0,0),(-1,-1), 0),
                         ("RIGHTPADDING", (0,0),(-1,-1), 0),
                     ]))

    lw = 68*mm; iw = 70*mm; sw = 69*mm; tw = 66*mm
    gap = (W - lw - iw - sw - tw) / 3

    row2 = Table(
        [[make_box(lac_data, lw),
          make_box(ich_data, iw),
          make_box(sah_data, sw),
          make_box(temp_data, tw)]],
        colWidths=[lw+gap, iw+gap, sw+gap, tw],
        style=TableStyle([
            ("VALIGN", (0,0), (-1,-1), "TOP"),
            ("LEFTPADDING", (0,0), (-1,-1), 0),
            ("RIGHTPADDING", (0,0), (-1,-1), 0),
            ("TOPPADDING", (0,0), (-1,-1), 0),
            ("BOTTOMPADDING", (0,0), (-1,-1), 0),
        ])
    )
    elems.append(row2); elems.append(SP(2))

    # ── BOTTOM PEARLS STRIP ───────────────────────────────────────────────────
    pearls = [
        "⚡ Multiple territories → CARDIAC source",
        "⚡ Deep WM infarct ≠ always lacunar — exclude emboli",
        "⚡ Thunderclap headache → SAH until proven otherwise",
        "⚡ PComm aneurysm → CN III palsy (surgical emergency)",
        "⚡ 'Man in barrel' → ACA-MCA watershed",
        "⚡ ESUS = non-lacunar + no AF + no stenosis",
    ]
    pearl_cells = [[P(f"<b>{p}</b>",
                      sty("pp", fontName="Helvetica-Bold", fontSize=6.2,
                          leading=8, textColor=C_NAVY))]
                   for p in pearls]
    strip_tbl = Table(
        [pearl_cells[i] for i in range(len(pearl_cells))],
        colWidths=[W],
        style=TableStyle([
            ("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#fef9e7")),
            ("BOX", (0,0), (-1,-1), 0.5, C_AMBER),
            ("TOPPADDING", (0,0), (-1,-1), 1.5),
            ("BOTTOMPADDING", (0,0), (-1,-1), 1.5),
            ("LEFTPADDING", (0,0), (-1,-1), 4),
        ])
    )
    # Arrange pearls in 3 columns
    pc = [P(f"<b>{p}</b>",
             sty("pp2", fontName="Helvetica-Bold", fontSize=6,
                 leading=8.5, textColor=C_NAVY))
          for p in pearls]
    strip = Table(
        [[pc[0], pc[1], pc[2]], [pc[3], pc[4], pc[5]]],
        colWidths=[W/3, W/3, W/3],
        style=TableStyle([
            ("BACKGROUND", (0,0), (-1,-1), colors.HexColor("#fef9e7")),
            ("BOX", (0,0), (-1,-1), 0.8, C_AMBER),
            ("INNERGRID", (0,0), (-1,-1), 0.3, colors.HexColor("#f9e79f")),
            ("TOPPADDING", (0,0), (-1,-1), 2),
            ("BOTTOMPADDING", (0,0), (-1,-1), 2),
            ("LEFTPADDING", (0,0), (-1,-1), 4),
        ])
    )
    elems.append(strip)

    return elems


# ══════════════════════════════════════════════════════════════════════════════
#  PAGE 2
# ══════════════════════════════════════════════════════════════════════════════

def page2_elements():
    elems = []
    W = PAGE_W - 2*MARGIN

    # ── HEADER ────────────────────────────────────────────────────────────────
    hdr = Drawing(W, 26)
    hdr.add(Rect(0, 0, W, 26, fillColor=C_TEAL, strokeColor=None, rx=4, ry=4))
    hdr.add(String(W/2, 15, "CIRCLE  OF  WILLIS  —  ANATOMY & CLINICAL CORRELATES",
                   fontName="Helvetica-Bold", fontSize=13,
                   fillColor=colors.white, textAnchor="middle"))
    hdr.add(String(W/2, 4, "Neuroanatomy through Clinical Cases (Blumenfeld 3e)  |  Miller's Anesthesia 10e",
                   fontName="Helvetica", fontSize=7,
                   fillColor=colors.HexColor("#d5f5f0"), textAnchor="middle"))
    elems.append(hdr); elems.append(SP(2))

    # ── ROW 1: CoW diagram + ICA segments + Vertebrobasilar ───────────────────
    # -- CoW schematic diagram (drawn) --
    cow_w = 82*mm
    cow_h = 95*mm
    dg = Drawing(cow_w, cow_h)
    dg.add(Rect(0, 0, cow_w, cow_h,
                fillColor=colors.HexColor("#f0fafa"),
                strokeColor=C_TEAL, strokeWidth=0.5, rx=4))

    # Title
    dg.add(String(cow_w/2, cow_h-8, "CIRCLE OF WILLIS — Inferior View",
                  fontName="Helvetica-Bold", fontSize=6.5,
                  fillColor=C_NAVY, textAnchor="middle"))

    cx = cow_w / 2   # centre x
    cy = 46          # centre y of the ring

    def artery(x1,y1,x2,y2, col=C_CRIMSON, w=2):
        dg.add(Line(x1,y1,x2,y2, strokeColor=col, strokeWidth=w))
    def label(x,y,txt, col=C_NAVY, sz=5.5, anchor="start"):
        dg.add(String(x,y,txt, fontName="Helvetica", fontSize=sz,
                      fillColor=col, textAnchor=anchor))
    def blabel(x,y,txt, col=C_NAVY, sz=5.8, anchor="start"):
        dg.add(String(x,y,txt, fontName="Helvetica-Bold", fontSize=sz,
                      fillColor=col, textAnchor=anchor))

    # === DRAW THE RING ===
    # Basilar artery (vertical centre-bottom)
    artery(cx, 4, cx, cy-12, col=C_ORANGE, w=2.5)
    blabel(cx+2, 8, "Basilar A.", col=C_ORANGE)

    # Vertebrals
    artery(cx-8, 4, cx, 10, col=C_ORANGE, w=1.5)
    artery(cx+8, 4, cx, 10, col=C_ORANGE, w=1.5)
    label(2, 2, "L. Vertebral", col=C_ORANGE, sz=5)
    label(cx+10, 2, "R. Vertebral", col=C_ORANGE, sz=5)

    # PCA left & right (from basilar tip)
    artery(cx, cy-12, cx-22, cy-2,  col=C_PURPLE, w=1.8)
    artery(cx, cy-12, cx+22, cy-2,  col=C_PURPLE, w=1.8)
    label(4, cy-2, "L. PCA", col=C_PURPLE, sz=5.5)
    label(cx+24, cy-2, "R. PCA", col=C_PURPLE, sz=5.5)

    # PComm left & right (PCA to ICA)
    artery(cx-22, cy-2,  cx-22, cy+12, col=C_GREEN, w=1.5)
    artery(cx+22, cy-2,  cx+22, cy+12, col=C_GREEN, w=1.5)
    label(2, cy+5, "PComm", col=C_GREEN, sz=5.2)
    label(cx+24, cy+5, "PComm", col=C_GREEN, sz=5.2)

    # ICA left & right (vertical)
    artery(cx-22, cy+12, cx-22, cy+28, col=C_BLUE, w=2.5)
    artery(cx+22, cy+12, cx+22, cy+28, col=C_BLUE, w=2.5)
    label(2, cy+25, "L. ICA", col=C_BLUE, sz=5.5)
    label(cx+24, cy+25, "R. ICA", col=C_BLUE, sz=5.5)

    # ACA left & right (from ICA upward, then medial)
    artery(cx-22, cy+28, cx-6, cy+38, col=colors.HexColor("#1a5276"), w=2)
    artery(cx+22, cy+28, cx+6, cy+38, col=colors.HexColor("#1a5276"), w=2)

    # AComm (horizontal top)
    artery(cx-6, cy+38, cx+6, cy+38, col=C_GREEN, w=2)
    blabel(cx-14, cy+41, "AComm", col=C_GREEN, sz=5.5, anchor="middle")

    # ACA labels
    label(2, cy+36, "L.ACA", col=colors.HexColor("#1a5276"), sz=5.5)
    label(cx+10, cy+36, "R.ACA", col=colors.HexColor("#1a5276"), sz=5.5)

    # MCA left & right (from ICA, lateral)
    artery(cx-22, cy+20, cx-46, cy+20, col=colors.HexColor("#c0392b"), w=2)
    artery(cx+22, cy+20, cx+46, cy+20, col=colors.HexColor("#c0392b"), w=2)
    label(2, cy+22, "L.MCA", col=colors.HexColor("#c0392b"), sz=5.5)
    label(cx+28, cy+22, "R.MCA", col=colors.HexColor("#c0392b"), sz=5.5)

    # SCA
    artery(cx, cy-6, cx-16, cy-14, col=C_ORANGE, w=1.2)
    artery(cx, cy-6, cx+16, cy-14, col=C_ORANGE, w=1.2)
    label(2, cy-16, "SCA", col=C_ORANGE, sz=5)
    label(cx+17, cy-16, "SCA", col=C_ORANGE, sz=5)

    # Anterior choroidal
    artery(cx-22, cy+14, cx-36, cy+8, col=C_MIDGRAY, w=1)
    label(2, cy+7, "Ant.Choroidal", col=C_MIDGRAY, sz=4.8)

    # Ophthalmic
    artery(cx-22, cy+26, cx-38, cy+32, col=C_MIDGRAY, w=1)
    label(2, cy+30, "Ophthalmic A.", col=C_MIDGRAY, sz=4.8)

    # Complete ring note
    dg.add(Rect(10, cow_h-24, cow_w-20, 13,
                fillColor=colors.HexColor("#fef9e7"),
                strokeColor=C_AMBER, strokeWidth=0.7, rx=2))
    dg.add(String(cow_w/2, cow_h-15,
                  "Complete ring: only ~34% of individuals",
                  fontName="Helvetica-Bold", fontSize=5.5,
                  fillColor=C_CRIMSON, textAnchor="middle"))
    dg.add(String(cow_w/2, cow_h-22,
                  "Collateral flow when a branch is occluded",
                  fontName="Helvetica", fontSize=5.2,
                  fillColor=C_NAVY, textAnchor="middle"))

    # ── ICA segments ──────────────────────────────────────────────────────────
    ica_w = 62*mm
    ica_data = [
        [col_header("ICA SEGMENTS  +  OPAAM BRANCHES", bg=C_BLUE)],
        [Table([
            [P("<b>SEGMENT</b>", BOLD), P("<b>COURSE / NOTES</b>", BOLD)],
            [P("1. Cervical"),    P("Vertical in neck; NO branches")],
            [P("2. Petrous"),     P("Carotid canal; sharp horizontal bend")],
            [P("3. Cavernous"),   P("S-curve = carotid siphon within cavernous sinus")],
            [P("4. Supraclinoid"),P("Pierces dura → subarachnoid space; gives OPAAM")],
            [P("", BOLD), P("", BOLD)],
            [P("<b>OPAAM MNEMONIC</b>", BOLD), P("<b>BRANCH</b>", BOLD)],
            [P("O — Ophthalmic"),  P("Retinal supply via optic foramen")],
            [P("P — Post.Comm."),  P("Links ICA → PCA; aneurysm → CN III palsy")],
            [P("A — Ant.Choroidal"), P("Post. limb IC, optic tract, hippocampus")],
            [P("A — Ant.Cerebral"), P("→ ACA (medial frontal/parietal)")],
            [P("M — Mid.Cerebral"), P("→ MCA (lateral convexity; largest branch)")],
        ], colWidths=[28*mm, ica_w-28*mm],
           style=TableStyle([
               ("BACKGROUND", (0,0), (-1,0), C_BLUE),
               ("TEXTCOLOR",  (0,0), (-1,0), C_WHITE),
               ("BACKGROUND", (0,5), (-1,5), C_NAVY),
               ("TEXTCOLOR",  (0,5), (-1,5), C_WHITE),
               ("ROWBACKGROUNDS", (0,1), (-1,4), [C_PALE_BLU, C_WHITE]*3),
               ("ROWBACKGROUNDS", (0,6), (-1,-1),[C_PALE_BLU, C_WHITE]*5),
               ("GRID", (0,0), (-1,-1), 0.3, colors.HexColor("#aed6f1")),
               ("FONTSIZE", (0,0), (-1,-1), 6.2),
               ("TOPPADDING", (0,0), (-1,-1), 1.5),
               ("BOTTOMPADDING", (0,0), (-1,-1), 1.5),
               ("LEFTPADDING", (0,0), (-1,-1), 2),
           ]))]
    ]

    # ── Vertebrobasilar + territories ─────────────────────────────────────────
    vb_w = W - cow_w - ica_w - 6*mm
    vb_data = [
        [col_header("VERTEBROBASILAR BRANCHES", bg=C_ORANGE)],
        [Table([
            [P("<b>ARTERY</b>", BOLD), P("<b>SUPPLIES</b>", BOLD)],
            [P("PICA"),        P("Lat.medulla + inf.cerebellum → Wallenberg")],
            [P("Ant.Spinal"),  P("Ant. 2/3 spinal cord")],
            [P("AICA"),        P("Lat.pons + ant.inf.cerebellum")],
            [P("Pontine perf."), P("Medial pons (lacunar strokes)")],
            [P("SCA"),         P("Superior cerebellum + midbrain")],
            [P("PCA"),         P("Occipital lobe, med.temporal, thalamus")],
        ], colWidths=[18*mm, vb_w-18*mm],
           style=TableStyle([
               ("BACKGROUND", (0,0), (-1,0), C_ORANGE),
               ("TEXTCOLOR",  (0,0), (-1,0), C_WHITE),
               ("ROWBACKGROUNDS", (0,1),(-1,-1),[C_PALE_YLW, C_WHITE]*4),
               ("GRID", (0,0),(-1,-1), 0.3, colors.HexColor("#f0b27a")),
               ("FONTSIZE", (0,0),(-1,-1), 6.2),
               ("TOPPADDING", (0,0),(-1,-1), 1.5),
               ("BOTTOMPADDING", (0,0),(-1,-1), 1.5),
               ("LEFTPADDING", (0,0),(-1,-1), 2),
           ]))]
    ]

    def wrap_box(data, w):
        return Table(data, colWidths=[w],
                     style=TableStyle([
                         ("GRID", (0,0),(-1,-1),0,colors.white),
                         ("TOPPADDING",(0,0),(-1,-1),0),
                         ("BOTTOMPADDING",(0,0),(-1,-1),0),
                         ("LEFTPADDING",(0,0),(-1,-1),0),
                         ("RIGHTPADDING",(0,0),(-1,-1),0),
                     ]))

    row1 = Table(
        [[dg,
          wrap_box(ica_data, ica_w),
          wrap_box(vb_data, vb_w)]],
        colWidths=[cow_w + 3*mm, ica_w + 3*mm, vb_w],
        style=TableStyle([
            ("VALIGN",(0,0),(-1,-1),"TOP"),
            ("LEFTPADDING",(0,0),(-1,-1),0),
            ("RIGHTPADDING",(0,0),(-1,-1),0),
            ("TOPPADDING",(0,0),(-1,-1),0),
            ("BOTTOMPADDING",(0,0),(-1,-1),0),
        ])
    )
    elems.append(row1); elems.append(SP(2))

    # ── ROW 2: Vascular territories + Deep perforators + Watershed ───────────
    # Territories
    ter_w = 130*mm
    ter_data = [
        [col_header("VASCULAR TERRITORIES — INFARCT DEFICITS", bg=C_NAVY, size=7.5)],
        [Table([
            [P("<b>ARTERY</b>",BOLD), P("<b>TERRITORY</b>",BOLD),
             P("<b>DOMINANT HEMISPHERE</b>",BOLD), P("<b>NON-DOMINANT</b>",BOLD)],
            [P("<b>ACA</b>",sty("b",fontName="Helvetica-Bold",fontSize=7,
                                textColor=colors.HexColor("#1a5276"))),
             P("Medial frontal + ant.parietal (leg homunculus)"),
             P("Leg>arm weakness; abulia; alien hand; incontinence"), P("Same ± akinetic mutism")],
            [P("<b>MCA</b>",sty("b2",fontName="Helvetica-Bold",fontSize=7,
                                textColor=colors.HexColor("#c0392b"))),
             P("Lateral convexity — frontal/parietal/temporal"),
             P("Face+arm>leg; Broca's or Wernicke's aphasia; hemianopia"),
             P("Face+arm>leg; hemispatial NEGLECT; anosognosia")],
            [P("<b>PCA</b>",sty("b3",fontName="Helvetica-Bold",fontSize=7,
                                textColor=C_PURPLE)),
             P("Occipital, med.temporal, thalamus"),
             P("Hemianopia (macular sparing); alexia w/o agraphia; thalamic pain"),
             P("Hemianopia; prosopagnosia; cortical blindness if bilateral")],
            [P("<b>Basilar</b>",sty("b4",fontName="Helvetica-Bold",fontSize=7,
                                    textColor=C_ORANGE)),
             P("Pons, midbrain, cerebellum"),
             P("Diplopia, dysarthria, dysphagia, ataxia, crossed signs"),
             P("Locked-in syndrome (total occlusion)")],
        ], colWidths=[14*mm, 40*mm, 38*mm, ter_w-92*mm],
           style=TableStyle([
               ("BACKGROUND", (0,0),(-1,0), C_NAVY),
               ("TEXTCOLOR",  (0,0),(-1,0), C_WHITE),
               ("ROWBACKGROUNDS",(0,1),(-1,-1),[C_PALE_BLU,C_WHITE]*5),
               ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#bdc3c7")),
               ("FONTSIZE",(0,0),(-1,-1),6.2),
               ("VALIGN",(0,0),(-1,-1),"TOP"),
               ("TOPPADDING",(0,0),(-1,-1),2),
               ("BOTTOMPADDING",(0,0),(-1,-1),2),
               ("LEFTPADDING",(0,0),(-1,-1),2),
           ]))]
    ]

    # Deep perforators
    dp_w = 70*mm
    dp_data = [
        [col_header("DEEP PERFORATING ARTERIES", bg=C_TEAL)],
        [Table([
            [P("<b>ARTERY</b>",BOLD),      P("<b>FROM</b>",BOLD), P("<b>SUPPLIES</b>",BOLD)],
            [P("Lenticulostriate"),  P("MCA M1"), P("Putamen, caudate, post.limb IC")],
            [P("Heubner's recurrent"),P("ACA A1-A2"),P("Head caudate, ant.limb IC")],
            [P("Thalamoperforators"),P("P1/PComm"), P("Thalamus (medial/intralaminar)")],
            [P("Ant.Choroidal"),     P("ICA"),     P("Post.limb IC, optic tract, hippocampus")],
            [P("Pontine perforators"),P("Basilar"), P("Medial pons → lacunar strokes")],
        ], colWidths=[28*mm, 16*mm, dp_w-44*mm],
           style=TableStyle([
               ("BACKGROUND",(0,0),(-1,0),C_TEAL),
               ("TEXTCOLOR", (0,0),(-1,0),C_WHITE),
               ("ROWBACKGROUNDS",(0,1),(-1,-1),[C_PALE_TEA,C_WHITE]*4),
               ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#a2d9ce")),
               ("FONTSIZE",(0,0),(-1,-1),6.2),
               ("VALIGN",(0,0),(-1,-1),"TOP"),
               ("TOPPADDING",(0,0),(-1,-1),2),
               ("BOTTOMPADDING",(0,0),(-1,-1),2),
               ("LEFTPADDING",(0,0),(-1,-1),2),
           ]))]
    ]

    # Watershed zones
    ws_w = W - ter_w - dp_w - 4*mm
    ws_data = [
        [col_header("WATERSHED ZONES", bg=C_AMBER)],
        [Table([
            [P("<b>ZONE</b>",BOLD),       P("<b>DEFICIT</b>",BOLD)],
            [P("ACA-MCA\n(parasagittal)"),P("'Man in Barrel'\nProximal arm > shoulder weakness")],
            [P("MCA-PCA\n(post.parieto-occipital)"), P("Higher-order visual Δ\nTranscortical aphasia")],
            [P("Internal\n(subcortical)"),P("Deep MCA superficial\nvs.deep border zone")],
            [P(""),P("")],
            [P("<b>TRIGGER:</b>",BOLD),   P("Cardiac arrest,\nsevere hypotension,\nICA occlusion")],
        ], colWidths=[ws_w*0.42, ws_w*0.58],
           style=TableStyle([
               ("BACKGROUND",(0,0),(-1,0),C_AMBER),
               ("TEXTCOLOR", (0,0),(-1,0),C_WHITE),
               ("ROWBACKGROUNDS",(0,1),(-1,-1),[C_PALE_YLW,C_WHITE]*4),
               ("BACKGROUND",(0,4),(-1,4),colors.HexColor("#fdebd0")),
               ("GRID",(0,0),(-1,-1),0.3,colors.HexColor("#f0b27a")),
               ("FONTSIZE",(0,0),(-1,-1),6.2),
               ("VALIGN",(0,0),(-1,-1),"TOP"),
               ("TOPPADDING",(0,0),(-1,-1),2),
               ("BOTTOMPADDING",(0,0),(-1,-1),2),
               ("LEFTPADDING",(0,0),(-1,-1),2),
           ]))]
    ]

    def wrap_box2(data, w):
        return Table(data, colWidths=[w],
                     style=TableStyle([
                         ("GRID",(0,0),(-1,-1),0,colors.white),
                         ("TOPPADDING",(0,0),(-1,-1),0),
                         ("BOTTOMPADDING",(0,0),(-1,-1),0),
                         ("LEFTPADDING",(0,0),(-1,-1),0),
                         ("RIGHTPADDING",(0,0),(-1,-1),0),
                     ]))

    g = (W - ter_w - dp_w - ws_w) / 2
    row2 = Table(
        [[wrap_box2(ter_data, ter_w),
          wrap_box2(dp_data, dp_w),
          wrap_box2(ws_data, ws_w)]],
        colWidths=[ter_w+g, dp_w+g, ws_w],
        style=TableStyle([
            ("VALIGN",(0,0),(-1,-1),"TOP"),
            ("LEFTPADDING",(0,0),(-1,-1),0),
            ("RIGHTPADDING",(0,0),(-1,-1),0),
            ("TOPPADDING",(0,0),(-1,-1),0),
            ("BOTTOMPADDING",(0,0),(-1,-1),0),
        ])
    )
    elems.append(row2); elems.append(SP(2))

    # ── BOTTOM MNEMONICS STRIP ────────────────────────────────────────────────
    mn = [
        [P("<b>OPAAM</b>  (ICA branches):", BOLD),
         P("Ophthalmic · Post.Comm · Ant.Choroidal · ACA · MCA")],
        [P("<b>LACUNAR</b>  (5 syndromes):", BOLD),
         P("Pure Motor · Pure Sensory · Sensorimotor · Ataxic Hemi · Dysarthria-Clumsy Hand")],
        [P("<b>ICH SITES</b>  (frequency):", BOLD),
         P("Put That Pons Carefully Lobar   →   Putamen > Thalamus > Pons > Cerebellum > Lobar")],
        [P("<b>TOAST</b>  order:", BOLD),
         P('"Loud Students Create Outstanding Chaos"  →  Large · Small · Cardio · Other · Cryptogenic')],
    ]
    mnem = Table(mn, colWidths=[40*mm, W-40*mm],
                 style=TableStyle([
                     ("BACKGROUND",(0,0),(-1,-1),colors.HexColor("#f0f3ff")),
                     ("BOX",(0,0),(-1,-1),0.8,C_NAVY),
                     ("INNERGRID",(0,0),(-1,-1),0.3,colors.HexColor("#d6dbf5")),
                     ("FONTSIZE",(0,0),(-1,-1),6.5),
                     ("TOPPADDING",(0,0),(-1,-1),2.5),
                     ("BOTTOMPADDING",(0,0),(-1,-1),2.5),
                     ("LEFTPADDING",(0,0),(-1,-1),4),
                     ("VALIGN",(0,0),(-1,-1),"MIDDLE"),
                 ]))
    elems.append(mnem)

    # ── FOOTER ────────────────────────────────────────────────────────────────
    elems.append(SP(1.5))
    footer_txt = (
        "Sources: Neuroanatomy through Clinical Cases 3e (Blumenfeld) · Tintinalli's Emergency Medicine · "
        "Grainger & Allison's Diagnostic Radiology · Fuster & Hurst's The Heart 15e · Miller's Anesthesia 10e"
    )
    elems.append(P(footer_txt,
                   sty("ft", fontSize=5.2, leading=7, textColor=C_MIDGRAY,
                       alignment=TA_CENTER)))
    return elems


# ══════════════════════════════════════════════════════════════════════════════
#  BUILD PDF
# ══════════════════════════════════════════════════════════════════════════════

OUT = "/tmp/workspace/stroke-refcard/Stroke_CoW_QuickRef.pdf"

doc = SimpleDocTemplate(
    OUT,
    pagesize=landscape(A4),
    leftMargin=MARGIN, rightMargin=MARGIN,
    topMargin=MARGIN,  bottomMargin=MARGIN,
)

story = page1_elements()
from reportlab.platypus import PageBreak
story.append(PageBreak())
story += page2_elements()

doc.build(story)
print(f"PDF saved to: {OUT}")
Running Command

cd /tmp/workspace/stroke-refcard && python3 build_card.py 2>&1

Running Command

ls -lh /tmp/workspace/stroke-refcard/Stroke_CoW_QuickRef.pdf

Your quick reference card is ready:

Stroke CoW QuickRef

PDF Document · PDF


What's inside — 2 pages, A4 landscape:
Page 1 — Stroke Classification
  • Master stroke tree (Ischemic 80% vs Hemorrhagic 20%) as a visual flowchart
  • Full TOAST classification table - all 5 subtypes with mechanism, %, key features, and treatment
  • Lacunar syndromes table (all 5 syndromes + site)
  • ICH location guide (Putamen → Thalamus → Pons → Cerebellum → Lobar with causes + key signs)
  • SAH aneurysm sites table with CN III pearl
  • Temporal classification + tPA/thrombectomy windows
  • High-yield pearls strip across the bottom (6 must-know facts)
Page 2 — Circle of Willis
  • Hand-drawn CoW schematic (inferior view) with all vessels labeled and colour-coded: ACA/MCA (blue/red), PCA (purple), PComm/AComm (green), vertebrobasilar (orange), with the "~34% complete" warning box
  • ICA segments table (Cervical → Petrous → Cavernous → Supraclinoid) + full OPAAM mnemonic
  • Vertebrobasilar branches table (PICA, AICA, SCA, PCA + what each supplies)
  • Vascular territories table (ACA/MCA/PCA/Basilar with dominant vs non-dominant deficits)
  • Deep perforating arteries table (Lenticulostriate, Heubner's, Thalamoperforators, Ant.Choroidal, Pontine)
  • Watershed zones (ACA-MCA "man in barrel" + MCA-PCA)
  • Mnemonics strip (OPAAM, TOAST mnemonic, ICH sites, Lacunar syndromes)
  • Source attribution footer

vertebrobasilar artery syndrome comes under which classification?

Vertebrobasilar artery syndrome (VBS) fits across multiple levels of stroke classification simultaneously. Here is exactly where it sits:

Where VBS Falls in Stroke Classification

1. PRIMARY TYPE → Ischemic Stroke (~80%)

VBS is an ischemic stroke syndrome - it results from occlusion/stenosis of the vertebral or basilar arteries causing posterior circulation ischemia/infarction.

2. BY MECHANISM (TOAST) → Large Vessel Atherosclerosis (most commonly)

TOAST SubtypeHow VBS fits
Large Vessel AtherosclerosisMost common - atherosclerosis of vertebral/basilar arteries causing in-situ thrombosis or A-to-A embolism
CardioembolismEmbolus from heart lodges in basilar artery - "top of the basilar" syndrome
Small Vessel (Lacunar)Pontine perforator occlusion - causes brainstem lacunar syndromes (part of the VBS spectrum)
Other CauseVertebral artery dissection (young patients), vasculitis

3. BY VASCULAR TERRITORY → Posterior Circulation Stroke

This is the most clinically useful classification for VBS:
POSTERIOR CIRCULATION STROKE
           │
    ┌──────┴───────┐
    │               │
VERTEBRAL A.    BASILAR A.
SYNDROME        SYNDROME
    │               │
    ├── PICA         ├── AICA syndrome
    │   (Wallenberg) ├── Pontine syndromes
    ├── Ant.Spinal   ├── SCA syndrome
    │   A. syndrome  └── "Top of Basilar"
    └── Medial           syndrome
        Medullary
        syndrome

4. BY ANATOMY → Infratentorial / Posterior Fossa Stroke

Opposed to supratentorial (anterior circulation) strokes involving ACA/MCA/PCA.

5. BY TEMPORAL PATTERN

  • TIA: Vertebrobasilar TIA - transient episodes of vertigo, diplopia, drop attacks, dysarthria (<24 h, no infarct)
  • Completed stroke: Fixed posterior fossa deficits
  • Stroke-in-evolution: Basilar artery thrombosis - rapidly progressing, high mortality if untreated

Classic VBS Syndromes and Their Sub-Classification

SyndromeArtery OccludedTOASTSpecial Note
Wallenberg (lateral medullary)PICA or vertebralLarge vessel / OtherIpsilat. face + contralat. body numbness - "crossed" signs
Medial medullaryAnt. spinal / vertebral perforatorSmall vessel / Large vesselContralat. hemiplegia + ipsilat. tongue palsy
AICA syndromeAICALarge vesselIpsilat. hearing loss + facial palsy + ataxia
"Locked-in" syndromeBasilar (total)Large vessel / CardioembolicQuadriplegia + anarthria; eye movement preserved
Top of basilarBasilar tipCardioembolic (MC)Bilateral PCA + thalami; behavioral Δ + visual loss
Pontine lacunarPontine perforatorsSmall vesselPure motor hemiplegia / ataxic hemiparesis
SCA syndromeSCALarge vesselIpsilat. cerebellar ataxia + contralat. pain/temp loss

Summary Answer

VBS = Ischemic Stroke → Posterior Circulation → TOAST: Large Vessel Atherosclerosis (most common) OR Cardioembolism (basilar tip) OR Small Vessel (pontine perforators)
It is classified under the vascular territory classification as a posterior circulation stroke, and within TOAST it most commonly falls under large vessel atherosclerosis - except "top of the basilar" which is predominantly cardioembolic, and pure pontine lacunar strokes which are small vessel disease.
This is a shared conversation. Sign in to Orris to start your own chat.