Can you tell me about heart chambers and with well-prepared diagrams? I have a presentation tomorrow for it.

Reading File
Finding Sources
Searching the Web

heart chambers anatomy diagram labeled 4 chambers

Reading File
Loading Image
Loading Image
Reading File
Loading Image
Loading Image
I now have excellent textbook content and multiple high-quality diagrams. Here is a complete, well-illustrated guide to the heart chambers.

The Four Chambers of the Heart

The heart is a hollow muscular organ divided into four chambers - two upper chambers (atria) and two lower chambers (ventricles). The right side handles deoxygenated blood; the left side handles oxygenated blood.

Overview Diagram - All Four Chambers

Four Chambers of the Heart - labeled cross-section showing right atrium, right ventricle, left atrium, left ventricle, tricuspid valve, mitral valve, and atrial/ventricular septa

Internal Anatomy with Valves and Major Vessels

Detailed internal heart diagram showing all chambers, tricuspid valve, pulmonary valve, aortic valve, mitral valve, aorta, pulmonary artery, chordae tendineae, and papillary muscles

Textbook Atlas View - Right Atrium & Right Ventricle Opened

(From Color Atlas of Human Anatomy, Vol. 2 - Internal Organs)
Textbook anatomical illustration: A = Right atrium opened (right lateral view) showing sinus of venae cavae, pectinate muscles, crista terminalis, fossa ovalis, and tricuspid valve. B = Right ventricle opened (anterior view) showing supraventricular crest, trabeculae carneae, chordae tendineae, and papillary muscles.

Chamber-by-Chamber Breakdown

1. Right Atrium

The right atrium is the entry point for deoxygenated blood returning from the body.
  • Receives blood from:
    • Superior vena cava (SVC) - from upper body, head, and arms
    • Inferior vena cava (IVC) - from lower body
    • Coronary sinus - deoxygenated blood from the heart muscle itself
  • Two structural parts:
    • Sinus of the venae cavae - smooth-walled posterior portion (embryologically derived from the sinus venosus)
    • True atrium - anterior portion bearing pectinate muscles (ridged muscle bands)
  • Key landmarks:
    • Crista terminalis - muscular ridge separating smooth and trabeculated parts
    • Fossa ovalis - oval depression in the interatrial septum; remnant of the fetal foramen ovale
    • Limbus fossae ovalis - the raised rim bordering the fossa ovalis
  • Outlet: Blood flows through the tricuspid valve into the right ventricle
"The right atrium consists of two parts. The two venae cavae drain into its posterior portion... The true atrium lies anterior and is derived from the original embryologic atrium, where cardiac muscle projects as trabeculae known as pectinate muscles." - Color Atlas of Human Anatomy, Vol. 2

2. Right Ventricle

The right ventricle pumps deoxygenated blood to the lungs via the pulmonary circulation.
  • Divided into two tracts by the supraventricular crest and septomarginal trabecula:
    • Inflow tract - posteroinferior, receives blood from right atrium; has irregular trabeculae carneae (muscular ridges)
    • Outflow tract (conus arteriosus) - anterosuperior, smooth-walled; leads to the pulmonary trunk
  • Wall: Relatively thin (handles low-pressure pulmonary circulation)
  • Tricuspid valve (right atrioventricular valve):
    • Three leaflets (cusps): anterior, posterior, septal
    • Held in place by chordae tendineae attached to papillary muscles (anterior, posterior, septal)
    • Prevents backflow into right atrium during systole
  • Interventricular septum: Mostly muscular (~1.2 cm thick); small membranous part (~1 mm thick) near the atria
  • Outlet: Pulmonary valve (3 semilunar cusps) → pulmonary artery → lungs

3. Left Atrium

The left atrium receives freshly oxygenated blood returning from the lungs.
  • Receives blood from: Four pulmonary veins (two from each lung), entering the upper posterior portion
    • No valves at pulmonary vein openings
  • Wall: Predominantly smooth; slightly smaller interior than right atrium
  • Left auricle (appendage) - anterolateral extension with small pectinate muscles
  • Interatrial septum: Bears the valve of the foramen ovale on the left side (corresponds to the fossa ovalis on the right)
  • Outlet: Blood flows through the mitral valve into the left ventricle

4. Left Ventricle

The left ventricle is the main pumping chamber of the heart, supplying the entire systemic circulation.
  • Wall: ~3x thicker than the right ventricle (must generate high pressure for systemic circulation)
  • Two tracts:
    • Inflow tract - with jagged trabeculae carneae; receives blood from left atrium
    • Outflow tract - smooth-walled; runs along the interventricular septum to the aorta
  • Mitral valve (left atrioventricular valve / bicuspid valve):
    • Two leaflets: anterior cusp and posterior cusp
    • Chordae tendineae attach to two papillary muscles (anterior and posterior)
    • The anterior cusp is continuous with the aortic wall, dividing inflow from outflow
  • Outlet: Aortic valve (3 semilunar cusps) → aorta → systemic circulation
"The muscular wall of the left ventricle is about three times thicker than that of the right." - Color Atlas of Human Anatomy, Vol. 2

Blood Flow Summary Through All Chambers

Deoxygenated blood from body
        ↓ (via SVC + IVC)
  [RIGHT ATRIUM]
        ↓ (tricuspid valve)
  [RIGHT VENTRICLE]
        ↓ (pulmonary valve → pulmonary artery)
        ↓ (to lungs for oxygenation)
        ↓ (pulmonary veins)
  [LEFT ATRIUM]
        ↓ (mitral valve)
  [LEFT VENTRICLE]
        ↓ (aortic valve → aorta)
  Oxygenated blood to entire body

Septa (Walls Between Chambers)

SeptumLocationKey Feature
Interatrial septumBetween right and left atriaContains fossa ovalis (closed foramen ovale)
Interventricular septumBetween right and left ventriclesMuscular (thick) + membranous (thin) parts
AV septumBetween atria and ventriclesSeparates atrial and ventricular compartments

The Four Valves at a Glance

ValveTypeLocationFunction
TricuspidAV valve (3 leaflets)Right AV orificeRA → RV; prevents backflow
PulmonarySemilunar (3 cusps)RV outflowRV → Pulmonary artery
Mitral (Bicuspid)AV valve (2 leaflets)Left AV orificeLA → LV; prevents backflow
AorticSemilunar (3 cusps)LV outflowLV → Aorta

Quick Comparison: Right vs. Left Ventricle

FeatureRight VentricleLeft Ventricle
Wall thicknessThin~3x thicker
Pressure generatedLow (pulmonary)High (systemic)
ShapeCrescent-shapedConical/elliptical
AV valveTricuspid (3 leaflets)Mitral (2 leaflets)
Outlet valvePulmonaryAortic
DestinationLungsEntire body

Sources:
Good luck with your presentation tomorrow! The diagrams above - especially the cross-section showing all four chambers with valves, and the textbook atlas showing the opened right atrium and right ventricle - should work well as visual aids. The blood flow summary box is a great slide to include for clarity.

Can you refer me a book, uh, from which I can learn about heart, its design, its working, and, uh, the problems caused in it and how to treat it? Very well, each and every topic should be, uh, mm, written.

Finding Sources
Searching the Web

best comprehensive cardiology textbook anatomy physiology diseases treatment complete

Finding Sources
Finding Sources
Finding Sources
Finding Sources
Finding Sources
I now have everything I need to give you a thorough recommendation. Here it is:

Best Books to Learn Everything About the Heart

Based on what's available in our medical library and the wider cardiology literature, here are the top recommendations matched to what you're looking for - anatomy/design, how it works, diseases, and treatments.

🥇 #1 - For Absolute Completeness

Braunwald's Heart Disease: A Textbook of Cardiovascular Medicine (2-Volume Set)

"The Bible of Cardiology" - used by cardiologists worldwide
What it covers:
Your NeedWhat Braunwald's Has
Design (Anatomy)Cardiac microanatomy, ultrastructure of contractile cells, sarcomere structure, valve anatomy
Working (Physiology)Cardiac contraction & relaxation, calcium ion fluxes, adrenergic signaling, Frank-Starling mechanism, contractile performance
DiseasesIschemic heart disease, heart failure, arrhythmias, valvular disease, cardiomyopathies, congenital heart disease, pericardial disease, hypertension, endocarditis
TreatmentPharmacology, interventional cardiology, cardiac surgery, devices (pacemakers, defibrillators), cardiac imaging for diagnosis
This is a 2-volume, ~2,000+ page reference. It goes into deep detail on every single topic - from the molecular mechanism of contraction to surgical repair of valves. If you want to know everything, this is it.
Best for: Medical students, residents, cardiologists, anyone who wants the full picture with evidence-based depth.

🥈 #2 - Comprehensive but More Readable

Fuster and Hurst's The Heart, 15th Edition

What it covers (from its table of contents in our library):
  • Global burden of cardiovascular diseases - epidemiology and risk factors
  • Ischemic heart disease (coronary artery disease, heart attacks)
  • Stroke and aortic disease
  • Atrial fibrillation and other arrhythmias
  • Congenital heart disease
  • Infective endocarditis
  • Valvular heart disease (aortic, mitral, rheumatic)
  • Chagas disease and other cardiomyopathies
  • Modifiable risk factors: hypertension, obesity, diet, dyslipidemia, smoking, diabetes, physical inactivity
  • Special topics: COVID-19 and the heart, pregnancy-related cardiac risk, HIV and cardiovascular disease, mental illness and heart disease, air pollution effects
  • Prevention strategies with global targets
This book is slightly more organized and readable than Braunwald's while still being highly comprehensive. It's 22 blocks/chapters vs Braunwald's 16 (but Braunwald's blocks are denser).
Best for: Someone who wants a complete, well-structured, clinically oriented textbook that covers anatomy to prevention.

🥉 #3 - If You Want to Start With Anatomy First

Color Atlas of Human Anatomy, Vol. 2: Internal Organs

This is the book we used in your last session (heart chambers diagrams). It covers:
  • External shape and surfaces of the heart
  • All four chambers in detail
  • All four valves
  • Coronary vessels
  • Cardiac conduction system
  • The pericardium
It is visual and diagram-heavy - perfect if you want to understand the physical design of the heart before moving to physiology and disease.

My Recommendation for You

Given that you want anatomy + physiology + diseases + treatment all in one place, here is the best path:
  1. Start with Color Atlas of Human Anatomy Vol. 2 - to build your mental picture of the heart's structure.
  2. Then move to Fuster and Hurst's The Heart (15th Ed.) - for a complete, readable journey from how the heart works to every disease and its treatment. This one book alone covers everything you described.
  3. Use Braunwald's Heart Disease as your reference when you want to go deeper on any specific topic - it is the most authoritative resource in cardiology.
All three of these books are available in the library here, so you can search and read any topic directly. Just ask!

Can you tell me any online source?

Searching the Web

best free online resources learn heart anatomy physiology diseases treatment cardiology

Searching the Web

free cardiology online course heart anatomy physiology Khan Academy AHA

Here are the best online sources, organized from beginner to advanced:

Best Online Sources to Learn About the Heart

🟢 Free Sources

1. Khan Academy - Circulatory System

100% free. Covers everything step by step with videos:
  • Parts of the heart and blood flow
  • The heart as a double pump
  • Electrical system of the heart
  • Blood pressure, arteries, veins
  • Advanced circulatory physiology
This is the best starting point if you want clear, easy explanations with visuals.

2. TeachMeAnatomy

Best for: Anatomy and structure of the heart teachmeanatomy.info/thorax/organs/heart
Free website written by medical students and doctors. Covers:
  • Heart chambers, valves, and vessels
  • Coronary circulation
  • Conducting system
  • Clear labeled diagrams on every page

3. MedlinePlus (U.S. National Library of Medicine)

Best for: Heart diseases and treatments - patient-friendly language medlineplus.gov/heartdiseases.html
Run by the U.S. government - completely free and very reliable. Covers:
  • Every major heart disease (heart attack, heart failure, arrhythmias, valve disease, etc.)
  • Causes, symptoms, diagnosis, and treatment for each condition
  • Links to the latest guidelines

4. American Heart Association (AHA)

Best for: Diseases, risk factors, prevention, and treatment guidelines heart.org
The most authoritative heart health organization in the world. Free resources on:
  • How the heart works
  • All major heart conditions
  • Treatment options including medications and surgery
  • Prevention and lifestyle

5. Cleveland Clinic - Heart Health

Best for: Practical, well-written disease explanations my.clevelandclinic.org/health/diseases (search "heart")
One of the top heart hospitals in the world. Their website has free, detailed articles on virtually every heart condition with treatment breakdowns.

🔵 Free Video Courses (YouTube)

Khan Academy - Flow Through the Heart (4.9M views, great starting video):
Lecturio - Complete Cardiology Masterclass (exam-level, very thorough):

🟡 Paid / Structured Courses

Coursera - Cardiovascular Courses

  • Structured courses from universities
  • Covers anatomy, physiology, ECG, cardiac surgery, nursing
  • Some are free to audit; certificates cost money

Lecturio Medical

  • Video lectures + question bank
  • Great for medical students
  • Free 7-day trial available

Quick Guide: Which Source for What?

Your GoalGo To
Understand the heart's structureTeachMeAnatomy
Learn how the heart worksKhan Academy
Learn about a specific diseaseMedlinePlus or Cleveland Clinic
Official treatment guidelinesAmerican Heart Association
Structured video courseLecturio or Coursera
Quick video explanationKhan Academy YouTube
All the free ones are excellent - you can cover everything you need without spending a penny. Start with Khan Academy for the basics, then use TeachMeAnatomy for structure details, and MedlinePlus/AHA for diseases and treatments.

Uh, tell me the 22 types of arrhythmia.

Reading File
Finding Sources
Finding Sources
Searching the Web

types of cardiac arrhythmias complete classification list

Reading File
Reading File
Reading File
I have all the information I need. Here is a complete, accurate breakdown:

Types of Cardiac Arrhythmias

Important clarification: There is no medically established list of exactly "22 types" of arrhythmia. The number depends entirely on how specifically you classify them. Standard cardiology textbooks (including Barash's Clinical Anesthesia and Braunwald's Heart Disease) organize arrhythmias into categories and subtypes. Listed below are all the major and minor types - which together number around 20+ depending on the classification system used.

What Is an Arrhythmia?

Any change in cardiac rhythm from normal sinus rhythm is an arrhythmia. Normal sinus rhythm is 60-100 beats per minute (bpm), originating from the sinoatrial (SA) node.

The Two Master Categories

All arrhythmias fall into one of two broad groups:
CategoryHeart RateDefinition
Bradyarrhythmia< 60 bpmHeart beats too slowly
Tachyarrhythmia> 100 bpmHeart beats too fast

GROUP A: BRADYARRHYTHMIAS (Slow Heart Rhythms)

1. Sinus Bradycardia

  • Heart rate < 60 bpm, but rhythm still originates from the SA node
  • Can be normal (athletes, during sleep) or pathological (hypothyroidism, inferior MI)

2. Sick Sinus Syndrome (SSS)

  • The SA node fails to generate impulses reliably
  • Causes alternating slow and fast heart rates ("tachy-brady syndrome")
  • Often requires a pacemaker

3. First-Degree AV Block

  • Every impulse from the atria reaches the ventricles, but with a prolonged PR interval (> 0.20 sec)
  • Usually benign; no treatment needed

4. Second-Degree AV Block - Mobitz Type I (Wenckebach)

  • PR interval gets progressively longer with each beat until one beat is completely dropped
  • Then the cycle repeats
  • Generally less dangerous

5. Second-Degree AV Block - Mobitz Type II

  • PR interval stays constant, but beats are intermittently dropped without warning
  • More dangerous than Mobitz I; often progresses to complete heart block
  • Usually requires a pacemaker

6. Third-Degree AV Block (Complete Heart Block)

  • The atria and ventricles beat completely independently of each other
  • No impulse passes through the AV node
  • Life-threatening; requires emergency pacing

GROUP B: TACHYARRHYTHMIAS (Fast Heart Rhythms)

Tachyarrhythmias are further divided by where they originate and what the ECG looks like.

SUBGROUP B1: Regular Rhythm, Narrow QRS (Supraventricular)

7. Sinus Tachycardia

  • Heart rate > 100 bpm, normal origin from SA node
  • Caused by fever, anxiety, pain, exercise, hyperthyroidism
  • Not a true "pathological" arrhythmia - it is a normal physiological response

8. Sinus Arrhythmia

  • Subtle variation in heart rate with the breathing cycle (speeds up with inhalation, slows with exhalation)
  • Normal finding, especially in young people and athletes

9. AV Nodal Reentrant Tachycardia (AVNRT)

  • Most common cause of sudden rapid palpitations in young healthy people
  • A circular electrical loop forms within or near the AV node
  • Heart rate: 150-250 bpm, abrupt onset and offset

10. AV Reciprocating Tachycardia - Orthodromic (AVRT)

  • Involves an accessory pathway (extra electrical connection between atria and ventricles)
  • Impulse goes down through the AV node and back up through the accessory pathway
  • Seen in Wolff-Parkinson-White (WPW) syndrome

11. Junctional Tachycardia

  • Originates from the AV node/junction area (not the SA node)
  • Often caused by digoxin toxicity or after cardiac surgery

12. Atrial Flutter

  • Rapid, regular atrial activity at ~300 bpm; ventricles typically respond at 150 bpm (2:1 block)
  • Saw-tooth pattern on ECG
  • Associated with atrial enlargement, heart disease, hyperthyroidism

SUBGROUP B2: Irregular Rhythm, Narrow QRS

13. Atrial Fibrillation (AFib)

  • The most common arrhythmia - affects 1-2% of the general population
  • Chaotic, disorganized atrial electrical activity; completely irregular ventricular response
  • Major risk factor for stroke
  • Associated with hypertension, age, heart failure, alcohol ("Holiday Heart")

14. Multifocal Atrial Tachycardia (MAT)

  • Multiple sites in the atria fire randomly
  • Three or more different P-wave shapes on ECG
  • Common in COPD patients

15. Frequent Premature Atrial Contractions (PACs)

  • Extra beats that originate in the atria before the SA node fires
  • Very common; often felt as "skipped beats" or palpitations
  • Usually benign

SUBGROUP B3: Regular Rhythm, Wide QRS

16. Monomorphic Ventricular Tachycardia (VT)

  • Rapid rhythm originating from the ventricles, all QRS complexes look the same
  • Rate typically 100-250 bpm
  • Can be well-tolerated or cause hemodynamic collapse; potentially lethal

17. AV Reciprocating Tachycardia - Antidromic (AVRT)

  • Accessory pathway variant where impulse goes down through the accessory pathway and up through the AV node
  • Results in a wide QRS (looks like VT)
  • Seen in WPW syndrome

18. Supraventricular Tachycardia (SVT) with Bundle Branch Block

  • A supraventricular rhythm (e.g., AVNRT, AFib) that appears wide on ECG because of a bundle branch block
  • Can be mistaken for ventricular tachycardia

SUBGROUP B4: Irregular Rhythm, Wide QRS

19. Polymorphic Ventricular Tachycardia

  • Rapid ventricular rhythm where QRS complexes change shape beat to beat
  • Most dangerous subtype: Torsades de Pointes - associated with prolonged QT interval, spins around the baseline
  • Can degenerate into ventricular fibrillation

20. Ventricular Fibrillation (VFib)

  • Completely chaotic ventricular electrical activity - no effective pumping
  • Causes immediate cardiac arrest and death within minutes if untreated
  • Treatment: immediate defibrillation (electric shock)

21. Frequent Premature Ventricular Contractions (PVCs)

  • Extra beats originating from the ventricles
  • Wide, bizarre-looking QRS complexes on ECG
  • Common in healthy people; concerning if frequent in heart disease patients

22. Irregular SVT with Bundle Branch Block

  • An irregular supraventricular tachycardia (e.g., AFib) with a bundle branch block producing wide, irregular complexes
  • Dangerous to confuse with polymorphic VT

Summary Table

#ArrhythmiaRateOriginDanger Level
1Sinus Bradycardia< 60SA nodeLow-Moderate
2Sick Sinus SyndromeVariableSA nodeModerate
31st-Degree AV BlockNormalAV nodeLow
42nd-Degree Block Mobitz INormal/SlowAV nodeLow-Moderate
52nd-Degree Block Mobitz IINormal/SlowAV nodeHigh
63rd-Degree (Complete) BlockSlowAV junctionVery High
7Sinus Tachycardia> 100SA nodeLow (physiological)
8Sinus Arrhythmia~60-100SA nodeNone (normal)
9AVNRT150-250AV nodeModerate
10AVRT - Orthodromic150-250Accessory pathModerate
11Junctional Tachycardia70-130AV junctionModerate
12Atrial Flutter250-350 atrialAtriaModerate-High
13Atrial FibrillationIrregularAtriaHigh (stroke risk)
14Multifocal Atrial Tach.> 100Multiple atrialModerate
15PACsNormal + extrasAtriaLow
16Monomorphic VT100-250VentriclesVery High
17AVRT - Antidromic150-250Accessory pathHigh
18SVT with Bundle Branch Block> 100SupraventricularModerate
19Polymorphic VT / Torsades> 200VentriclesExtremely High
20Ventricular FibrillationChaoticVentriclesLethal
21PVCsNormal + extrasVentriclesLow-High
22Irregular SVT with BBB> 100SupraventricularModerate-High

Source: Barash Clinical Anesthesia 9e, Table 33-10 Arrhythmia Classification; Medical Physiology (Boron & Boulpaep), pp. 730-731; Braunwald's Heart Disease

Create a visual ECG reference guide for recognizing each arrhythmia type

Running Command

mkdir -p /home/daytona/workspace/ecg-guide && echo "dir ready"

Writing File

~/ecg-guide/ecg_reference_guide.html

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ECG Arrhythmia Visual Reference Guide</title>
<style>
  * { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f4f8;
    color: #1a202c;
    padding: 0;
  }
  .cover {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 50%, #3182ce 100%);
    color: white;
    text-align: center;
    padding: 60px 40px 50px;
  }
  .cover h1 { font-size: 2.6em; font-weight: 800; letter-spacing: 1px; margin-bottom: 10px; }
  .cover h2 { font-size: 1.3em; font-weight: 300; opacity: 0.9; margin-bottom: 20px; }
  .cover .badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    padding: 6px 18px;
    font-size: 0.9em;
    margin: 4px;
  }
  .toc {
    background: white;
    max-width: 900px;
    margin: 30px auto;
    border-radius: 12px;
    padding: 30px 35px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  }
  .toc h3 { color: #2b6cb0; font-size: 1.2em; margin-bottom: 16px; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; }
  .toc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 30px; }
  .toc-item { font-size: 0.88em; padding: 3px 0; color: #4a5568; }
  .toc-item span { color: #2b6cb0; font-weight: 700; margin-right: 6px; }
  .section-header {
    max-width: 900px;
    margin: 30px auto 12px;
    padding: 0 20px;
  }
  .section-header h2 {
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .section-header h2::after {
    content: '';
    flex: 1;
    height: 2px;
    background: #e2e8f0;
  }
  .card {
    background: white;
    max-width: 900px;
    margin: 0 auto 18px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    border-left: 5px solid #3182ce;
    display: grid;
    grid-template-columns: 1fr 340px;
  }
  .card.danger-critical { border-left-color: #c53030; }
  .card.danger-high     { border-left-color: #dd6b20; }
  .card.danger-moderate { border-left-color: #d69e2e; }
  .card.danger-low      { border-left-color: #38a169; }
  .card.danger-none     { border-left-color: #a0aec0; }
  .card-body { padding: 18px 22px; }
  .card-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
  }
  .card-num {
    background: #2b6cb0;
    color: white;
    font-size: 0.75em;
    font-weight: 700;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .card.danger-critical .card-num { background: #c53030; }
  .card.danger-high .card-num { background: #dd6b20; }
  .card.danger-moderate .card-num { background: #d69e2e; }
  .card.danger-low .card-num { background: #38a169; }
  .card.danger-none .card-num { background: #a0aec0; }
  .card-title h3 { font-size: 1.05em; font-weight: 700; color: #1a202c; }
  .card-title .alias { font-size: 0.8em; color: #718096; font-style: italic; }
  .tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
  .tag {
    font-size: 0.72em;
    padding: 2px 9px;
    border-radius: 10px;
    font-weight: 600;
  }
  .tag-rate { background: #ebf8ff; color: #2b6cb0; }
  .tag-origin { background: #f0fff4; color: #276749; }
  .tag-rhythm { background: #faf5ff; color: #6b46c1; }
  .tag-danger-critical { background: #fff5f5; color: #c53030; }
  .tag-danger-high { background: #fffaf0; color: #c05621; }
  .tag-danger-moderate { background: #fffff0; color: #975a16; }
  .tag-danger-low { background: #f0fff4; color: #276749; }
  .tag-danger-none { background: #f7fafc; color: #718096; }
  .card-info { font-size: 0.84em; color: #4a5568; line-height: 1.6; margin-bottom: 8px; }
  .ecg-features {
    font-size: 0.8em;
    background: #f7fafc;
    border-radius: 8px;
    padding: 8px 12px;
  }
  .ecg-features strong { color: #2b6cb0; }
  .ecg-features ul { margin-left: 14px; }
  .ecg-features li { margin: 2px 0; color: #4a5568; }
  .card-ecg {
    background: #0a1628;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    min-height: 120px;
  }
  .card-ecg svg { width: 100%; height: auto; }
  .ecg-label {
    fill: #63b3ed;
    font-size: 9px;
    font-family: monospace;
  }
  .grid-line { stroke: #1a3a5c; stroke-width: 0.5; }
  .grid-line-major { stroke: #1e4a72; stroke-width: 1; }
  .ecg-trace { fill: none; stroke: #48bb78; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .ecg-trace-red { fill: none; stroke: #fc8181; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .ecg-trace-yellow { fill: none; stroke: #f6e05e; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  @media print {
    body { background: white; }
    .cover { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .card { break-inside: avoid; page-break-inside: avoid; }
  }
  @media (max-width: 700px) {
    .card { grid-template-columns: 1fr; }
    .card-ecg { min-height: 80px; }
    .toc-grid { grid-template-columns: 1fr; }
  }
  .key-box {
    max-width: 900px;
    margin: 0 auto 24px;
    background: white;
    border-radius: 10px;
    padding: 16px 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
  }
  .key-item { display: flex; align-items: center; gap: 6px; font-size: 0.82em; }
  .key-swatch { width: 16px; height: 4px; border-radius: 2px; }
  .footer {
    text-align: center;
    padding: 30px;
    font-size: 0.8em;
    color: #a0aec0;
  }
</style>
</head>
<body>

<!-- COVER -->
<div class="cover">
  <h1>ECG Arrhythmia Reference Guide</h1>
  <h2>Visual Recognition of All 22 Cardiac Arrhythmia Types</h2>
  <div>
    <span class="badge">22 Arrhythmia Types</span>
    <span class="badge">ECG Strip Diagrams</span>
    <span class="badge">Key Features</span>
    <span class="badge">Danger Levels</span>
  </div>
</div>

<!-- TABLE OF CONTENTS -->
<div class="toc">
  <h3>Contents</h3>
  <div class="toc-grid">
    <div class="toc-item"><span>1.</span> Sinus Bradycardia</div>
    <div class="toc-item"><span>2.</span> Sick Sinus Syndrome</div>
    <div class="toc-item"><span>3.</span> 1st-Degree AV Block</div>
    <div class="toc-item"><span>4.</span> 2nd-Degree Block Mobitz I (Wenckebach)</div>
    <div class="toc-item"><span>5.</span> 2nd-Degree Block Mobitz II</div>
    <div class="toc-item"><span>6.</span> 3rd-Degree (Complete) Heart Block</div>
    <div class="toc-item"><span>7.</span> Sinus Tachycardia</div>
    <div class="toc-item"><span>8.</span> Sinus Arrhythmia</div>
    <div class="toc-item"><span>9.</span> AVNRT</div>
    <div class="toc-item"><span>10.</span> AVRT - Orthodromic</div>
    <div class="toc-item"><span>11.</span> Junctional Tachycardia</div>
    <div class="toc-item"><span>12.</span> Atrial Flutter</div>
    <div class="toc-item"><span>13.</span> Atrial Fibrillation</div>
    <div class="toc-item"><span>14.</span> Multifocal Atrial Tachycardia (MAT)</div>
    <div class="toc-item"><span>15.</span> Premature Atrial Contractions (PACs)</div>
    <div class="toc-item"><span>16.</span> Monomorphic Ventricular Tachycardia</div>
    <div class="toc-item"><span>17.</span> AVRT - Antidromic</div>
    <div class="toc-item"><span>18.</span> SVT with Bundle Branch Block</div>
    <div class="toc-item"><span>19.</span> Polymorphic VT / Torsades de Pointes</div>
    <div class="toc-item"><span>20.</span> Ventricular Fibrillation</div>
    <div class="toc-item"><span>21.</span> Premature Ventricular Contractions (PVCs)</div>
    <div class="toc-item"><span>22.</span> Irregular SVT with Bundle Branch Block</div>
  </div>
</div>

<!-- COLOUR KEY -->
<div class="key-box" style="padding: 12px 22px;">
  <strong style="font-size:0.85em; color:#4a5568;">Danger Level:</strong>
  <div class="key-item"><div class="key-swatch" style="background:#c53030"></div> Critical / Lethal</div>
  <div class="key-item"><div class="key-swatch" style="background:#dd6b20"></div> Very High</div>
  <div class="key-item"><div class="key-swatch" style="background:#d69e2e"></div> Moderate</div>
  <div class="key-item"><div class="key-swatch" style="background:#38a169"></div> Low</div>
  <div class="key-item"><div class="key-swatch" style="background:#a0aec0"></div> Normal / Benign</div>
</div>

<!-- ===== SECTION: BRADYARRHYTHMIAS ===== -->
<div class="section-header"><h2>Group A - Bradyarrhythmias</h2></div>

<!-- 1. Sinus Bradycardia -->
<div class="card danger-low" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">1</div>
      <h3>Sinus Bradycardia</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: &lt;60 bpm</span>
      <span class="tag tag-origin">Origin: SA Node</span>
      <span class="tag tag-rhythm">Rhythm: Regular</span>
      <span class="tag tag-danger-low">Danger: Low</span>
    </div>
    <p class="card-info">Normal P wave before every QRS. All intervals normal but slow. Common in athletes, during sleep, or with hypothyroidism.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Rate &lt;60 bpm, regular rhythm</li>
        <li>Normal P wave before every QRS (upright in II)</li>
        <li>Normal PR interval (0.12-0.20 sec)</li>
        <li>Normal QRS (&lt;0.12 sec)</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <!-- Grid -->
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="18" x2="320" y2="18" class="grid-line"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="0" y1="54" x2="320" y2="54" class="grid-line"/>
      <line x1="0" y1="72" x2="320" y2="72" class="grid-line"/>
      <line x1="40" y1="0" x2="40" y2="90" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="120" y1="0" x2="120" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="200" y1="0" x2="200" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <line x1="280" y1="0" x2="280" y2="90" class="grid-line-major"/>
      <!-- Baseline -->
      <!-- Beat 1 at x=30 -->
      <path class="ecg-trace" d="
        M0,45 L15,45
        C18,45 20,40 22,38 C24,36 26,36 28,38 C30,40 30,45 30,45
        L36,45
        L36,45 L38,16 L40,72 L42,45
        L48,45 C52,43 54,43 56,45
        L80,45
        C83,45 85,40 87,38 C89,36 91,36 93,38 C95,40 95,45 95,45
        L101,45
        L101,45 L103,16 L105,72 L107,45
        L113,45 C117,43 119,43 121,45
        L160,45
        C163,45 165,40 167,38 C169,36 171,36 173,38 C175,40 175,45 175,45
        L181,45
        L181,45 L183,16 L185,72 L187,45
        L193,45 C197,43 199,43 201,45
        L240,45
        C243,45 245,40 247,38 C249,36 251,36 253,38 C255,40 255,45 255,45
        L261,45
        L261,45 L263,16 L265,72 L267,45
        L273,45 C277,43 279,43 281,45
        L320,45
      "/>
      <text x="4" y="86" class="ecg-label">Sinus Bradycardia — slow but regular, normal PQRST morphology</text>
    </svg>
  </div>
</div>

<!-- 2. Sick Sinus Syndrome -->
<div class="card danger-moderate" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">2</div>
      <h3>Sick Sinus Syndrome</h3>
      <span class="alias">Tachy-Brady Syndrome</span>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: Variable</span>
      <span class="tag tag-origin">Origin: SA Node failure</span>
      <span class="tag tag-rhythm">Rhythm: Irregular</span>
      <span class="tag tag-danger-moderate">Danger: Moderate</span>
    </div>
    <p class="card-info">SA node fails to fire reliably. Long pauses after bursts of fast rhythm. Can alternate between bradycardia and tachycardia.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Prolonged pauses between beats (&gt;2 sec)</li>
        <li>Alternating fast and slow rates</li>
        <li>Absent or abnormal P waves during pauses</li>
        <li>Escape beats may appear</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- 2 fast beats, long pause, 1 slow beat -->
      <path class="ecg-trace-yellow" d="
        M0,45 L10,45
        C12,43 13,41 14,40 C15,39 16,39 17,40 C18,41 18,45 18,45
        L22,45 L23,16 L25,72 L27,45
        L31,45 C33,44 35,44 37,45
        L42,45
        C44,43 45,41 46,40 C47,39 48,39 49,40 C50,41 50,45 50,45
        L54,45 L55,16 L57,72 L59,45
        L63,45 C65,44 67,44 69,45
        L160,45
        C163,45 165,40 167,38 C169,36 171,36 173,38 C175,40 175,45 175,45
        L181,45 L183,16 L185,72 L187,45
        L193,45 C197,43 199,43 201,45
        L320,45
      "/>
      <text x="68" y="30" style="fill:#f6e05e;font-size:9px;font-family:monospace;">← LONG PAUSE →</text>
      <text x="4" y="86" class="ecg-label">Sick Sinus — fast bursts + prolonged pauses</text>
    </svg>
  </div>
</div>

<!-- 3. 1st Degree AV Block -->
<div class="card danger-low" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">3</div>
      <h3>1st-Degree AV Block</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: Normal</span>
      <span class="tag tag-origin">Origin: AV Node delay</span>
      <span class="tag tag-rhythm">Rhythm: Regular</span>
      <span class="tag tag-danger-low">Danger: Low</span>
    </div>
    <p class="card-info">Every impulse gets through, but slowly. PR interval is prolonged (&gt;0.20 sec / 1 large box). Usually benign and requires no treatment.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>PR interval &gt;0.20 sec (prolonged but constant)</li>
        <li>Every P wave followed by a QRS</li>
        <li>Normal QRS morphology</li>
        <li>Regular rhythm</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Long PR (big gap between P and QRS) -->
      <path class="ecg-trace" d="
        M0,45 L8,45
        C10,43 11,41 12,40 C13,39 14,39 15,40 C16,41 16,45 16,45
        L28,45 L30,16 L32,72 L34,45
        L40,45 C43,43 45,43 47,45
        L88,45
        C90,43 91,41 92,40 C93,39 94,39 95,40 C96,41 96,45 96,45
        L108,45 L110,16 L112,72 L114,45
        L120,45 C123,43 125,43 127,45
        L168,45
        C170,43 171,41 172,40 C173,39 174,39 175,40 C176,41 176,45 176,45
        L188,45 L190,16 L192,72 L194,45
        L200,45 C203,43 205,43 207,45
        L248,45
        C250,43 251,41 252,40 C253,39 254,39 255,40 C256,41 256,45 256,45
        L268,45 L270,16 L272,72 L274,45
        L280,45 C283,43 285,43 287,45
        L320,45
      "/>
      <line x1="15" y1="38" x2="29" y2="38" style="stroke:#f6e05e;stroke-width:1;stroke-dasharray:2,2;"/>
      <text x="16" y="35" style="fill:#f6e05e;font-size:8px;">Long PR</text>
      <text x="4" y="86" class="ecg-label">1st-Degree Block — prolonged PR, all P waves conduct</text>
    </svg>
  </div>
</div>

<!-- 4. Mobitz I Wenckebach -->
<div class="card danger-moderate" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">4</div>
      <h3>2nd-Degree Block — Mobitz Type I</h3>
      <span class="alias">Wenckebach</span>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: Slow-Normal</span>
      <span class="tag tag-origin">Origin: AV Node</span>
      <span class="tag tag-rhythm">Rhythm: Irregular (grouped)</span>
      <span class="tag tag-danger-moderate">Danger: Moderate</span>
    </div>
    <p class="card-info">PR interval lengthens progressively until one QRS is completely dropped. Then resets. "Longer, longer, longer, DROP - then repeat."</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>PR progressively lengthens beat-to-beat</li>
        <li>One QRS periodically dropped (P without QRS)</li>
        <li>R-R intervals progressively shorten before the pause</li>
        <li>Grouped beating pattern</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Beat1: short PR, Beat2: medium PR, Beat3: long PR, Beat4: P only no QRS, repeat -->
      <path class="ecg-trace-yellow" d="
        M0,45 L6,45
        C8,43 9,41 10,40 C11,39 12,39 13,40 C14,41 14,45 14,45
        L20,45 L22,16 L24,72 L26,45 L32,45
        C34,43 35,41 36,40 C37,39 38,39 39,40 C40,41 40,45 40,45
        L50,45 L52,16 L54,72 L56,45 L62,45
        C64,43 65,41 66,40 C67,39 68,39 69,40 C70,41 70,45 70,45
        L84,45 L86,16 L88,72 L90,45
        L96,45
        C98,43 99,41 100,40 C101,39 102,39 103,40 C104,41 104,45 104,45
        L140,45
        C142,43 143,41 144,40 C145,39 146,39 147,40 C148,41 148,45 148,45
        L154,45 L156,16 L158,72 L160,45 L166,45
        C168,43 169,41 170,40 C171,39 172,39 173,40 C174,41 174,45 174,45
        L188,45 L190,16 L192,72 L194,45
        L200,45
        C202,43 203,41 204,40 C205,39 206,39 207,40 C208,41 208,45 208,45
        L226,45 L228,16 L230,72 L232,45
        L238,45
        C240,43 241,41 242,40 C243,39 244,39 245,40 C246,41 246,45 246,45
        L260,45
        C262,43 263,41 264,40 C265,39 266,39 267,40 C268,41 268,45 268,45
        L284,45 L286,16 L288,72 L290,45
        L296,45
        C298,43 299,41 300,40 C301,39 302,39 303,40 C304,41 304,45 304,45
        L320,45
      "/>
      <text x="96" y="30" style="fill:#fc8181;font-size:8px;">P blocked</text>
      <text x="4" y="86" class="ecg-label">Mobitz I — PR gets longer, longer...then a beat is dropped</text>
    </svg>
  </div>
</div>

<!-- 5. Mobitz II -->
<div class="card danger-high" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">5</div>
      <h3>2nd-Degree Block — Mobitz Type II</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: Slow</span>
      <span class="tag tag-origin">Origin: Bundle of His / Branches</span>
      <span class="tag tag-rhythm">Rhythm: Irregular (dropped beats)</span>
      <span class="tag tag-danger-high">Danger: Very High</span>
    </div>
    <p class="card-info">PR interval stays constant, then suddenly a QRS is dropped with no warning. More dangerous than Mobitz I. Often needs a pacemaker.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Constant PR interval (no lengthening)</li>
        <li>Sudden dropped QRS (P with no QRS)</li>
        <li>Often wide QRS (bundle branch block)</li>
        <li>Can be 2:1, 3:1, or higher block ratio</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Constant PR, every 3rd P has no QRS -->
      <path class="ecg-trace-red" d="
        M0,45 L6,45
        C8,43 9,41 10,40 C11,39 12,39 13,40 C14,41 14,45 14,45
        L20,45 L22,16 L25,72 L27,45 L34,45
        C36,43 37,41 38,40 C39,39 40,39 41,40 C42,41 42,45 42,45
        L48,45 L50,16 L53,72 L55,45 L62,45
        C64,43 65,41 66,40 C67,39 68,39 69,40 C70,41 70,45 70,45
        L108,45
        C110,43 111,41 112,40 C113,39 114,39 115,40 C116,41 116,45 116,45
        L122,45 L124,16 L127,72 L129,45 L136,45
        C138,43 139,41 140,40 C141,39 142,39 143,40 C144,41 144,45 144,45
        L150,45 L152,16 L155,72 L157,45 L164,45
        C166,43 167,41 168,40 C169,39 170,39 171,40 C172,41 172,45 172,45
        L210,45
        C212,43 213,41 214,40 C215,39 216,39 217,40 C218,41 218,45 218,45
        L224,45 L226,16 L229,72 L231,45 L238,45
        C240,43 241,41 242,40 C243,39 244,39 245,40 C246,41 246,45 246,45
        L252,45 L254,16 L257,72 L259,45 L266,45
        C268,43 269,41 270,40 C271,39 272,39 273,40 C274,41 274,45 274,45
        L320,45
      "/>
      <text x="72" y="30" style="fill:#fc8181;font-size:8px;">P blocked</text>
      <text x="4" y="86" class="ecg-label">Mobitz II — constant PR, sudden dropped beat without warning</text>
    </svg>
  </div>
</div>

<!-- 6. Complete Heart Block -->
<div class="card danger-critical" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">6</div>
      <h3>3rd-Degree (Complete) Heart Block</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: Atria ~70 / Ventricles ~30-40</span>
      <span class="tag tag-origin">Origin: AV dissociation</span>
      <span class="tag tag-rhythm">Rhythm: Regular but dissociated</span>
      <span class="tag tag-danger-critical">Danger: CRITICAL</span>
    </div>
    <p class="card-info">No impulse passes from atria to ventricles. Atria and ventricles beat independently. Ventricles rely on a slow escape rhythm. Life-threatening.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>P waves and QRS complexes march independently</li>
        <li>P rate &gt; QRS rate</li>
        <li>Wide QRS (ventricular escape rhythm)</li>
        <li>No relationship between P and QRS</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- P waves at fast rate, wide QRS at slow rate, no relation -->
      <!-- P waves (faster) -->
      <path style="fill:none;stroke:#63b3ed;stroke-width:1.5;" d="
        M10,45 C12,43 13,41 14,40 C15,39 16,39 17,40 C18,41 18,45 18,45
        M50,45 C52,43 53,41 54,40 C55,39 56,39 57,40 C58,41 58,45 58,45
        M90,45 C92,43 93,41 94,40 C95,39 96,39 97,40 C98,41 98,45 98,45
        M130,45 C132,43 133,41 134,40 C135,39 136,39 137,40 C138,41 138,45 138,45
        M170,45 C172,43 173,41 174,40 C175,39 176,39 177,40 C178,41 178,45 178,45
        M210,45 C212,43 213,41 214,40 C215,39 216,39 217,40 C218,41 218,45 218,45
        M250,45 C252,43 253,41 254,40 C255,39 256,39 257,40 C258,41 258,45 258,45
        M290,45 C292,43 293,41 294,40 C295,39 296,39 297,40 C298,41 298,45 298,45
      "/>
      <!-- Wide QRS at slow rate (no P before them) -->
      <path class="ecg-trace-red" d="
        M0,45 L320,45
      "/>
      <path style="fill:none;stroke:#fc8181;stroke-width:2.5;" d="
        M35,45 L37,45 L39,20 L43,70 L47,45
        M115,45 L117,45 L119,20 L123,70 L127,45
        M195,45 L197,45 L199,20 L203,70 L207,45
        M275,45 L277,45 L279,20 L283,70 L287,45
      "/>
      <text x="4" y="12" style="fill:#63b3ed;font-size:8px;">P waves (fast, blue)</text>
      <text x="4" y="22" style="fill:#fc8181;font-size:8px;">QRS (slow, wide, red) — no relation to P</text>
      <text x="4" y="86" class="ecg-label">Complete Heart Block — total AV dissociation</text>
    </svg>
  </div>
</div>

<!-- ===== SECTION: TACHYARRHYTHMIAS ===== -->
<div class="section-header"><h2>Group B — Tachyarrhythmias: Regular Narrow QRS</h2></div>

<!-- 7. Sinus Tachycardia -->
<div class="card danger-none" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">7</div>
      <h3>Sinus Tachycardia</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: 100-180 bpm</span>
      <span class="tag tag-origin">Origin: SA Node</span>
      <span class="tag tag-rhythm">Rhythm: Regular</span>
      <span class="tag tag-danger-none">Danger: Normal Response</span>
    </div>
    <p class="card-info">Fast but normal rhythm from SA node. Caused by exercise, fever, anxiety, pain, or hyperthyroidism. Treat the underlying cause, not the rhythm.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Rate &gt;100 bpm, regular</li>
        <li>Normal upright P wave before every QRS</li>
        <li>Normal PR and QRS intervals</li>
        <li>Gradual onset and offset</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="40" y1="0" x2="40" y2="90" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="120" y1="0" x2="120" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="200" y1="0" x2="200" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <line x1="280" y1="0" x2="280" y2="90" class="grid-line-major"/>
      <!-- Fast but regular normal beats -->
      <path class="ecg-trace" d="
        M0,45 L4,45
        C5,43 6,41 7,40 C8,39 9,39 10,40 C11,41 11,45 11,45
        L14,45 L15,16 L17,72 L19,45 L24,45
        C25,44 27,44 29,45
        L34,45
        C35,43 36,41 37,40 C38,39 39,39 40,40 C41,41 41,45 41,45
        L44,45 L45,16 L47,72 L49,45 L54,45
        C55,44 57,44 59,45
        L64,45
        C65,43 66,41 67,40 C68,39 69,39 70,40 C71,41 71,45 71,45
        L74,45 L75,16 L77,72 L79,45 L84,45
        C85,44 87,44 89,45
        L94,45
        C95,43 96,41 97,40 C98,39 99,39 100,40 C101,41 101,45 101,45
        L104,45 L105,16 L107,72 L109,45 L114,45
        C115,44 117,44 119,45
        L124,45
        C125,43 126,41 127,40 C128,39 129,39 130,40 C131,41 131,45 131,45
        L134,45 L135,16 L137,72 L139,45 L144,45
        C145,44 147,44 149,45
        L154,45
        C155,43 156,41 157,40 C158,39 159,39 160,40 C161,41 161,45 161,45
        L164,45 L165,16 L167,72 L169,45 L174,45
        C175,44 177,44 179,45
        L184,45
        C185,43 186,41 187,40 C188,39 189,39 190,40 C191,41 191,45 191,45
        L194,45 L195,16 L197,72 L199,45 L204,45
        C205,44 207,44 209,45
        L214,45
        C215,43 216,41 217,40 C218,39 219,39 220,40 C221,41 221,45 221,45
        L224,45 L225,16 L227,72 L229,45 L234,45
        C235,44 237,44 239,45
        L244,45
        C245,43 246,41 247,40 C248,39 249,39 250,40 C251,41 251,45 251,45
        L254,45 L255,16 L257,72 L259,45 L264,45
        C265,44 267,44 269,45
        L274,45
        C275,43 276,41 277,40 C278,39 279,39 280,40 C281,41 281,45 281,45
        L284,45 L285,16 L287,72 L289,45 L294,45
        C295,44 297,44 299,45
        L320,45
      "/>
      <text x="4" y="86" class="ecg-label">Sinus Tachycardia — fast, regular, normal morphology</text>
    </svg>
  </div>
</div>

<!-- 8. Sinus Arrhythmia -->
<div class="card danger-none" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">8</div>
      <h3>Sinus Arrhythmia</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: 60-100 bpm (varying)</span>
      <span class="tag tag-origin">Origin: SA Node</span>
      <span class="tag tag-rhythm">Rhythm: Irregular (respiratory)</span>
      <span class="tag tag-danger-none">Danger: Normal Finding</span>
    </div>
    <p class="card-info">Heart speeds up with inhalation and slows with exhalation. A completely normal finding, especially in young people and athletes. No treatment needed.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Normal P-QRS-T morphology</li>
        <li>R-R intervals vary with breathing cycle</li>
        <li>Fastest rate at peak inhalation</li>
        <li>Normal PR interval throughout</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Beats that get closer together then further apart -->
      <path class="ecg-trace" d="
        M0,45 L8,45
        C9,43 10,41 11,40 C12,39 13,39 14,40 C15,41 15,45 15,45
        L20,45 L22,16 L24,72 L26,45 L35,45
        C36,43 37,41 38,40 C39,39 40,39 41,40 C42,41 42,45 42,45
        L47,45 L49,16 L51,72 L53,45 L59,45
        C60,43 61,41 62,40 C63,39 64,39 65,40 C66,41 66,45 66,45
        L71,45 L73,16 L75,72 L77,45 L81,45
        C82,43 83,41 84,40 C85,39 86,39 87,40 C88,41 88,45 88,45
        L93,45 L95,16 L97,72 L99,45
        L110,45
        C111,43 112,41 113,40 C114,39 115,39 116,40 C117,41 117,45 117,45
        L122,45 L124,16 L126,72 L128,45
        L143,45
        C144,43 145,41 146,40 C147,39 148,39 149,40 C150,41 150,45 150,45
        L155,45 L157,16 L159,72 L161,45
        L175,45
        C176,43 177,41 178,40 C179,39 180,39 181,40 C182,41 182,45 182,45
        L187,45 L189,16 L191,72 L193,45
        L205,45
        C206,43 207,41 208,40 C209,39 210,39 211,40 C212,41 212,45 212,45
        L217,45 L219,16 L221,72 L223,45
        L232,45
        C233,43 234,41 235,40 C236,39 237,39 238,40 C239,41 239,45 239,45
        L244,45 L246,16 L248,72 L250,45
        L258,45
        C259,43 260,41 261,40 C262,39 263,39 264,40 C265,41 265,45 265,45
        L270,45 L272,16 L274,72 L276,45
        L282,45
        C283,43 284,41 285,40 C286,39 287,39 288,40 C289,41 289,45 289,45
        L294,45 L296,16 L298,72 L300,45 L320,45
      "/>
      <text x="4" y="86" class="ecg-label">Sinus Arrhythmia — varying R-R with breathing, normal morphology</text>
    </svg>
  </div>
</div>

<!-- 9. AVNRT -->
<div class="card danger-moderate" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">9</div>
      <h3>AV Nodal Reentrant Tachycardia (AVNRT)</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: 150-250 bpm</span>
      <span class="tag tag-origin">Origin: AV Node re-entry loop</span>
      <span class="tag tag-rhythm">Rhythm: Regular</span>
      <span class="tag tag-danger-moderate">Danger: Moderate</span>
    </div>
    <p class="card-info">Most common SVT. Abrupt onset ("on/off switch" palpitations). P waves hidden in or just after QRS. Responds to Valsalva, adenosine.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Rate 150-250 bpm, very regular</li>
        <li>P waves buried in or immediately after QRS (retrograde P)</li>
        <li>Narrow QRS (&lt;0.12 sec)</li>
        <li>Abrupt onset and termination</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="40" y1="0" x2="40" y2="90" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="120" y1="0" x2="120" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="200" y1="0" x2="200" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <line x1="280" y1="0" x2="280" y2="90" class="grid-line-major"/>
      <!-- Very fast narrow QRS, no visible P -->
      <path class="ecg-trace-yellow" d="
        M0,45 L3,45 L4,16 L6,72 L8,45 L18,45
        L19,16 L21,72 L23,45 L33,45
        L34,16 L36,72 L38,45 L48,45
        L49,16 L51,72 L53,45 L63,45
        L64,16 L66,72 L68,45 L78,45
        L79,16 L81,72 L83,45 L93,45
        L94,16 L96,72 L98,45 L108,45
        L109,16 L111,72 L113,45 L123,45
        L124,16 L126,72 L128,45 L138,45
        L139,16 L141,72 L143,45 L153,45
        L154,16 L156,72 L158,45 L168,45
        L169,16 L171,72 L173,45 L183,45
        L184,16 L186,72 L188,45 L198,45
        L199,16 L201,72 L203,45 L213,45
        L214,16 L216,72 L218,45 L228,45
        L229,16 L231,72 L233,45 L243,45
        L244,16 L246,72 L248,45 L258,45
        L259,16 L261,72 L263,45 L273,45
        L274,16 L276,72 L278,45 L288,45
        L289,16 L291,72 L293,45 L303,45
        L304,16 L306,72 L308,45 L320,45
      "/>
      <text x="4" y="86" class="ecg-label">AVNRT — very fast, regular, narrow QRS, P buried in QRS</text>
    </svg>
  </div>
</div>

<!-- 10. AVRT Orthodromic -->
<div class="card danger-moderate" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">10</div>
      <h3>AVRT — Orthodromic (WPW)</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: 150-250 bpm</span>
      <span class="tag tag-origin">Origin: Accessory pathway (Kent bundle)</span>
      <span class="tag tag-rhythm">Rhythm: Regular</span>
      <span class="tag tag-danger-moderate">Danger: Moderate-High</span>
    </div>
    <p class="card-info">In sinus rhythm: delta wave + short PR = WPW. During tachycardia: narrow QRS (impulse goes down AV node, up accessory path). Retrograde P visible after QRS.</p>
    <div class="ecg-features">
      <strong>Key ECG Features (sinus rhythm):</strong>
      <ul>
        <li>Short PR interval (&lt;0.12 sec)</li>
        <li>Delta wave (slurred upstroke of QRS)</li>
        <li>Wide QRS during sinus rhythm</li>
        <li>During SVT: narrow QRS, retrograde P after QRS (RP &lt; PR)</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Delta wave morphology (short PR, slurred QRS upstroke) -->
      <path class="ecg-trace-yellow" d="
        M0,45 L6,45
        C8,43 9,41 10,40 C11,39 12,39 13,40 C14,41 14,45 14,45
        L17,45 L17,42 L22,18 L27,72 L30,45
        L38,45 C40,44 42,44 44,45
        L86,45
        C88,43 89,41 90,40 C91,39 92,39 93,40 C94,41 94,45 94,45
        L97,45 L97,42 L102,18 L107,72 L110,45
        L118,45 C120,44 122,44 124,45
        L166,45
        C168,43 169,41 170,40 C171,39 172,39 173,40 C174,41 174,45 174,45
        L177,45 L177,42 L182,18 L187,72 L190,45
        L198,45 C200,44 202,44 204,45
        L246,45
        C248,43 249,41 250,40 C251,39 252,39 253,40 C254,41 254,45 254,45
        L257,45 L257,42 L262,18 L267,72 L270,45
        L278,45 C280,44 282,44 284,45
        L320,45
      "/>
      <text x="17" y="32" style="fill:#f6e05e;font-size:7px;">Δ</text>
      <text x="97" y="32" style="fill:#f6e05e;font-size:7px;">Δ</text>
      <text x="177" y="32" style="fill:#f6e05e;font-size:7px;">Δ</text>
      <text x="257" y="32" style="fill:#f6e05e;font-size:7px;">Δ</text>
      <text x="4" y="86" class="ecg-label">WPW sinus rhythm — short PR + delta wave (slurred QRS upstroke)</text>
    </svg>
  </div>
</div>

<!-- 11. Junctional Tachycardia -->
<div class="card danger-moderate" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">11</div>
      <h3>Junctional Tachycardia</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: 70-130 bpm</span>
      <span class="tag tag-origin">Origin: AV Junction</span>
      <span class="tag tag-rhythm">Rhythm: Regular</span>
      <span class="tag tag-danger-moderate">Danger: Moderate</span>
    </div>
    <p class="card-info">AV junction takes over pacemaker function. P waves absent, inverted, or appear after QRS. Common with digoxin toxicity or post-cardiac surgery.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Narrow QRS, regular rhythm</li>
        <li>No visible P waves, or inverted P before/after QRS</li>
        <li>Rate faster than junctional escape (&gt;60 bpm)</li>
        <li>No relationship between any P and QRS</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- No P waves, regular narrow QRS -->
      <path class="ecg-trace-yellow" d="
        M0,45 L12,45 L13,16 L16,72 L18,45 L22,45
        L52,45 L53,16 L56,72 L58,45 L62,45
        L92,45 L93,16 L96,72 L98,45 L102,45
        L132,45 L133,16 L136,72 L138,45 L142,45
        L172,45 L173,16 L176,72 L178,45 L182,45
        L212,45 L213,16 L216,72 L218,45 L222,45
        L252,45 L253,16 L256,72 L258,45 L262,45
        L292,45 L293,16 L296,72 L298,45 L320,45
      "/>
      <text x="4" y="86" class="ecg-label">Junctional Tach — regular narrow QRS, no visible P waves</text>
    </svg>
  </div>
</div>

<!-- 12. Atrial Flutter -->
<div class="card danger-high" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">12</div>
      <h3>Atrial Flutter</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Atria ~300 / Ventricles ~150 bpm</span>
      <span class="tag tag-origin">Origin: Right Atrium re-entry</span>
      <span class="tag tag-rhythm">Rhythm: Regular (2:1 ratio)</span>
      <span class="tag tag-danger-high">Danger: High</span>
    </div>
    <p class="card-info">Classic "sawtooth" or "picket fence" baseline in lead II. Usually 2:1 block (every 2nd flutter wave conducts). Regular ventricular response ~150 bpm.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Sawtooth flutter waves at ~300/min (F waves)</li>
        <li>No isoelectric baseline between atrial waves</li>
        <li>Regular ventricular rate (usually 150 bpm with 2:1)</li>
        <li>Narrow QRS (unless aberrant conduction)</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Sawtooth baseline + QRS every 2nd flutter -->
      <path class="ecg-trace-yellow" d="
        M0,45
        L5,38 L10,50 L15,38 L20,50 L25,38 L30,50
        L31,16 L33,72 L35,48
        L40,38 L45,50 L50,38 L55,50 L60,38 L65,50
        L66,16 L68,72 L70,48
        L75,38 L80,50 L85,38 L90,50 L95,38 L100,50
        L101,16 L103,72 L105,48
        L110,38 L115,50 L120,38 L125,50 L130,38 L135,50
        L136,16 L138,72 L140,48
        L145,38 L150,50 L155,38 L160,50 L165,38 L170,50
        L171,16 L173,72 L175,48
        L180,38 L185,50 L190,38 L195,50 L200,38 L205,50
        L206,16 L208,72 L210,48
        L215,38 L220,50 L225,38 L230,50 L235,38 L240,50
        L241,16 L243,72 L245,48
        L250,38 L255,50 L260,38 L265,50 L270,38 L275,50
        L276,16 L278,72 L280,48
        L285,38 L290,50 L295,38 L300,50 L305,38 L310,50 L320,48
      "/>
      <text x="4" y="86" class="ecg-label">Atrial Flutter — sawtooth F waves at ~300/min, QRS every 2nd wave</text>
    </svg>
  </div>
</div>

<!-- ===== SECTION: Irregular Narrow QRS ===== -->
<div class="section-header"><h2>Group B — Tachyarrhythmias: Irregular Narrow QRS</h2></div>

<!-- 13. Atrial Fibrillation -->
<div class="card danger-high" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">13</div>
      <h3>Atrial Fibrillation (AFib)</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: 100-160 bpm (irregular)</span>
      <span class="tag tag-origin">Origin: Multiple atrial foci</span>
      <span class="tag tag-rhythm">Rhythm: Irregularly Irregular</span>
      <span class="tag tag-danger-high">Danger: High (stroke risk)</span>
    </div>
    <p class="card-info">Most common arrhythmia. "Irregularly irregular" - no two R-R intervals are the same. No distinct P waves - replaced by chaotic fibrillatory baseline. Major stroke risk.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>No identifiable P waves - wavy/chaotic baseline</li>
        <li>Irregularly irregular R-R intervals</li>
        <li>Narrow QRS (usually)</li>
        <li>Variable ventricular rate 100-160 bpm if uncontrolled</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Fibrillatory baseline + irregular narrow QRS -->
      <path class="ecg-trace-red" d="
        M0,45 L2,44 L4,46 L6,44 L8,47 L10,43 L12,46
        L13,16 L15,72 L17,46 L19,44 L21,46 L23,43 L25,46 L27,44
        L36,45 L38,44 L40,46 L42,43
        L43,16 L45,72 L47,46 L49,44 L51,46 L53,43 L55,46 L57,44 L59,46 L61,43 L63,45
        L64,16 L66,72 L68,46 L70,44 L72,46 L74,44 L76,46
        L90,45 L92,44 L94,46 L96,43
        L97,16 L99,72 L101,46 L103,44 L105,46 L107,44
        L116,45 L118,43 L120,46
        L121,16 L123,72 L125,46 L127,44 L129,46 L131,43 L133,45
        L146,45 L148,43 L150,46 L152,43 L154,45
        L155,16 L157,72 L159,46 L161,44 L163,46 L165,43 L167,46
        L177,45 L179,44 L181,46 L183,43
        L184,16 L186,72 L188,46 L190,44 L192,46 L194,43 L196,46
        L209,45 L211,44 L213,46 L215,43 L217,45
        L218,16 L220,72 L222,46 L224,44 L226,46 L228,43 L230,45
        L239,45 L241,43 L243,46
        L244,16 L246,72 L248,46 L250,44 L252,46 L254,43
        L265,45 L267,44 L269,46 L271,43 L273,45
        L274,16 L276,72 L278,46 L280,44 L282,46 L284,43 L286,45
        L297,45 L299,43 L301,46 L303,44 L305,45
        L306,16 L308,72 L310,46 L312,44 L314,46 L316,43 L318,45 L320,45
      "/>
      <text x="4" y="86" class="ecg-label">AFib — chaotic baseline, irregularly irregular QRS, no P waves</text>
    </svg>
  </div>
</div>

<!-- 14. MAT -->
<div class="card danger-moderate" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">14</div>
      <h3>Multifocal Atrial Tachycardia (MAT)</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: &gt;100 bpm</span>
      <span class="tag tag-origin">Origin: Multiple atrial foci</span>
      <span class="tag tag-rhythm">Rhythm: Irregular</span>
      <span class="tag tag-danger-moderate">Danger: Moderate</span>
    </div>
    <p class="card-info">Multiple sites in the atria fire randomly, each producing a different P-wave shape. Common in COPD. Distinguished from AFib by visible (but varied) P waves.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>3+ distinct P wave morphologies</li>
        <li>Irregular R-R intervals</li>
        <li>Rate &gt;100 bpm</li>
        <li>Isoelectric baseline between P waves (unlike AFib)</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Different P wave shapes before each QRS -->
      <path class="ecg-trace-yellow" d="M0,45 L320,45"/>
      <!-- Beat 1: tall P -->
      <path class="ecg-trace-yellow" d="M6,45 C8,40 10,36 12,40 C14,44 14,45 14,45 L18,45 L19,16 L21,72 L23,45 L30,45"/>
      <!-- Beat 2: wide flat P -->
      <path class="ecg-trace-yellow" d="M42,45 C43,44 45,43 50,43 C55,43 57,44 58,45 L62,45 L63,16 L65,72 L67,45 L73,45"/>
      <!-- Beat 3: inverted P -->
      <path class="ecg-trace-yellow" d="M84,45 C86,46 88,49 90,46 C92,43 92,45 92,45 L96,45 L97,16 L99,72 L101,45 L107,45"/>
      <!-- Beat 4: normal P -->
      <path class="ecg-trace-yellow" d="M118,45 C120,43 121,41 122,40 C123,39 124,39 125,40 C126,41 126,45 126,45 L130,45 L131,16 L133,72 L135,45 L141,45"/>
      <!-- Beat 5: tall P again -->
      <path class="ecg-trace-yellow" d="M152,45 C154,40 156,35 158,40 C160,45 160,45 160,45 L164,45 L165,16 L167,72 L169,45 L175,45"/>
      <!-- Beat 6: wide flat P -->
      <path class="ecg-trace-yellow" d="M186,45 C187,44 189,43 194,43 C199,43 201,44 202,45 L206,45 L207,16 L209,72 L211,45 L217,45"/>
      <!-- Beat 7: inverted P -->
      <path class="ecg-trace-yellow" d="M228,45 C230,47 232,50 234,47 C236,44 236,45 236,45 L240,45 L241,16 L243,72 L245,45 L251,45"/>
      <!-- Beat 8 -->
      <path class="ecg-trace-yellow" d="M262,45 C264,43 265,41 266,40 C267,39 268,39 269,40 C270,41 270,45 270,45 L274,45 L275,16 L277,72 L279,45 L285,45"/>
      <text x="4" y="86" class="ecg-label">MAT — 3+ different P wave shapes, irregular, rate &gt;100</text>
    </svg>
  </div>
</div>

<!-- 15. PACs -->
<div class="card danger-low" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">15</div>
      <h3>Premature Atrial Contractions (PACs)</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: Normal + extra beats</span>
      <span class="tag tag-origin">Origin: Ectopic atrial focus</span>
      <span class="tag tag-rhythm">Rhythm: Mostly regular + early beats</span>
      <span class="tag tag-danger-low">Danger: Low (usually)</span>
    </div>
    <p class="card-info">Extra beats firing from an ectopic atrial site before the SA node fires. P wave looks different. Followed by incomplete compensatory pause. Very common, often benign.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Early (premature) beat with abnormal P wave morphology</li>
        <li>Narrow QRS (identical to normal beats)</li>
        <li>Followed by incomplete compensatory pause</li>
        <li>Resets the SA node</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Normal, normal, PAC (early + different P), pause, normal -->
      <path class="ecg-trace" d="
        M0,45 L8,45
        C9,43 10,41 11,40 C12,39 13,39 14,40 C15,41 15,45 15,45
        L20,45 L22,16 L24,72 L26,45 L36,45 C38,44 40,44 42,45
        L82,45
        C83,43 84,41 85,40 C86,39 87,39 88,40 C89,41 89,45 89,45
        L94,45 L96,16 L98,72 L100,45 L110,45 C112,44 114,44 116,45
      "/>
      <!-- PAC beat (early, different P) -->
      <path style="fill:none;stroke:#f6e05e;stroke-width:2;" d="
        M130,45
        C132,40 134,36 136,40 C138,44 138,45 138,45
        L142,45 L143,16 L145,72 L147,45 L153,45
      "/>
      <!-- Pause then normal resume -->
      <path class="ecg-trace" d="
        M180,45
        C181,43 182,41 183,40 C184,39 185,39 186,40 C187,41 187,45 187,45
        L192,45 L194,16 L196,72 L198,45 L208,45 C210,44 212,44 214,45
        L254,45
        C255,43 256,41 257,40 C258,39 259,39 260,40 C261,41 261,45 261,45
        L266,45 L268,16 L270,72 L272,45 L282,45 C284,44 286,44 288,45
        L320,45
      "/>
      <text x="128" y="32" style="fill:#f6e05e;font-size:8px;">PAC</text>
      <text x="153" y="32" style="fill:#f6e05e;font-size:8px;">pause</text>
      <text x="4" y="86" class="ecg-label">PACs — early beat with different P wave + compensatory pause</text>
    </svg>
  </div>
</div>

<!-- ===== SECTION: Wide QRS Tachyarrhythmias ===== -->
<div class="section-header"><h2>Group B — Tachyarrhythmias: Wide QRS</h2></div>

<!-- 16. Monomorphic VT -->
<div class="card danger-critical" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">16</div>
      <h3>Monomorphic Ventricular Tachycardia (VT)</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: 100-250 bpm</span>
      <span class="tag tag-origin">Origin: Ventricles</span>
      <span class="tag tag-rhythm">Rhythm: Regular</span>
      <span class="tag tag-danger-critical">Danger: Critical</span>
    </div>
    <p class="card-info">All QRS complexes look the same (monomorphic) but are wide and bizarre. Can be tolerated or cause hemodynamic collapse. Can degenerate to VFib. Emergency treatment required.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Rate &gt;100 bpm, wide QRS (&gt;0.12 sec)</li>
        <li>All QRS complexes identical (monomorphic)</li>
        <li>AV dissociation (P waves independent, if visible)</li>
        <li>Fusion beats and capture beats may be seen</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="40" y1="0" x2="40" y2="90" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="120" y1="0" x2="120" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="200" y1="0" x2="200" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <line x1="280" y1="0" x2="280" y2="90" class="grid-line-major"/>
      <!-- Wide bizarre identical QRS at fast rate -->
      <path class="ecg-trace-red" d="
        M0,45 L5,45 L6,45 L8,20 L12,70 L16,40 L20,45
        L25,45 L26,45 L28,20 L32,70 L36,40 L40,45
        L45,45 L46,45 L48,20 L52,70 L56,40 L60,45
        L65,45 L66,45 L68,20 L72,70 L76,40 L80,45
        L85,45 L86,45 L88,20 L92,70 L96,40 L100,45
        L105,45 L106,45 L108,20 L112,70 L116,40 L120,45
        L125,45 L126,45 L128,20 L132,70 L136,40 L140,45
        L145,45 L146,45 L148,20 L152,70 L156,40 L160,45
        L165,45 L166,45 L168,20 L172,70 L176,40 L180,45
        L185,45 L186,45 L188,20 L192,70 L196,40 L200,45
        L205,45 L206,45 L208,20 L212,70 L216,40 L220,45
        L225,45 L226,45 L228,20 L232,70 L236,40 L240,45
        L245,45 L246,45 L248,20 L252,70 L256,40 L260,45
        L265,45 L266,45 L268,20 L272,70 L276,40 L280,45
        L285,45 L286,45 L288,20 L292,70 L296,40 L300,45
        L305,45 L306,45 L308,20 L312,70 L316,40 L320,45
      "/>
      <text x="4" y="86" class="ecg-label">Monomorphic VT — fast, wide, all QRS same shape, no P waves</text>
    </svg>
  </div>
</div>

<!-- 17. AVRT Antidromic -->
<div class="card danger-high" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">17</div>
      <h3>AVRT — Antidromic (WPW)</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: 150-250 bpm</span>
      <span class="tag tag-origin">Origin: Accessory pathway (antegrade)</span>
      <span class="tag tag-rhythm">Rhythm: Regular</span>
      <span class="tag tag-danger-high">Danger: High</span>
    </div>
    <p class="card-info">Impulse travels DOWN the accessory pathway and UP through the AV node - producing a wide QRS. Looks like VT but is supraventricular. Do NOT give AV nodal agents (adenosine, verapamil) if pre-excited AFib suspected.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Fast rate, wide QRS (&gt;0.12 sec)</li>
        <li>Maximum pre-excitation (fully delta wave)</li>
        <li>Can look identical to monomorphic VT</li>
        <li>Retrograde P after QRS</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Wide QRS fast, slurred upstroke (delta) -->
      <path class="ecg-trace-red" d="
        M0,45 L6,45 L6,43 L10,22 L16,68 L22,40 L28,45
        L44,45 L44,43 L48,22 L54,68 L60,40 L66,45
        L82,45 L82,43 L86,22 L92,68 L98,40 L104,45
        L120,45 L120,43 L124,22 L130,68 L136,40 L142,45
        L158,45 L158,43 L162,22 L168,68 L174,40 L180,45
        L196,45 L196,43 L200,22 L206,68 L212,40 L218,45
        L234,45 L234,43 L238,22 L244,68 L250,40 L256,45
        L272,45 L272,43 L276,22 L282,68 L288,40 L294,45
        L310,45 L310,43 L314,22 L320,68
      "/>
      <text x="4" y="86" class="ecg-label">Antidromic AVRT — wide QRS tachycardia, looks like VT</text>
    </svg>
  </div>
</div>

<!-- 18. SVT with BBB -->
<div class="card danger-moderate" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">18</div>
      <h3>SVT with Bundle Branch Block</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: &gt;100 bpm</span>
      <span class="tag tag-origin">Origin: Supraventricular + BBB</span>
      <span class="tag tag-rhythm">Rhythm: Regular</span>
      <span class="tag tag-danger-moderate">Danger: Moderate</span>
    </div>
    <p class="card-info">A supraventricular tachycardia (like AVNRT or atrial flutter) with a pre-existing or rate-related bundle branch block. Wide QRS makes it look like VT. Compare to prior ECGs to identify BBB.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Fast rate, wide QRS (&gt;0.12 sec)</li>
        <li>RBBB or LBBB morphology</li>
        <li>Identical QRS shape throughout (if mono BBB)</li>
        <li>May see P waves buried in rapid rate</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- RBBB morphology QRS (rSR' pattern) at fast rate -->
      <path class="ecg-trace-yellow" d="
        M0,45 L4,45 L5,25 L9,60 L11,40 L13,18 L17,72 L20,45
        L34,45 L35,25 L39,60 L41,40 L43,18 L47,72 L50,45
        L64,45 L65,25 L69,60 L71,40 L73,18 L77,72 L80,45
        L94,45 L95,25 L99,60 L101,40 L103,18 L107,72 L110,45
        L124,45 L125,25 L129,60 L131,40 L133,18 L137,72 L140,45
        L154,45 L155,25 L159,60 L161,40 L163,18 L167,72 L170,45
        L184,45 L185,25 L189,60 L191,40 L193,18 L197,72 L200,45
        L214,45 L215,25 L219,60 L221,40 L223,18 L227,72 L230,45
        L244,45 L245,25 L249,60 L251,40 L253,18 L257,72 L260,45
        L274,45 L275,25 L279,60 L281,40 L283,18 L287,72 L290,45
        L304,45 L305,25 L309,60 L311,40 L313,18 L317,72 L320,45
      "/>
      <text x="4" y="86" class="ecg-label">SVT + BBB — wide QRS tach, RBBB pattern, regular</text>
    </svg>
  </div>
</div>

<!-- 19. Polymorphic VT / Torsades -->
<div class="card danger-critical" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">19</div>
      <h3>Polymorphic VT / Torsades de Pointes</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: &gt;200 bpm</span>
      <span class="tag tag-origin">Origin: Ventricles (multiple foci)</span>
      <span class="tag tag-rhythm">Rhythm: Irregular, twisting</span>
      <span class="tag tag-danger-critical">Danger: CRITICAL</span>
    </div>
    <p class="card-info">"Torsades" = "twisting of the points" - QRS complexes appear to rotate around the baseline. Associated with prolonged QT interval. Can degenerate to VFib. Stop QT-prolonging drugs immediately.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>QRS amplitude and axis continuously changing</li>
        <li>Complexes appear to "twist" around baseline</li>
        <li>Rate &gt;200 bpm, irregular</li>
        <li>Preceded by prolonged QT in sinus rhythm</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="45" x2="320" y2="45" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Twisting amplitude pattern - characteristic Torsades -->
      <path class="ecg-trace-red" d="
        M0,45
        L3,45 L5,30 L8,60 L11,38 L14,45
        L16,45 L18,25 L22,68 L25,35 L28,45
        L30,45 L32,18 L36,72 L39,30 L42,45
        L44,45 L46,15 L50,75 L53,28 L56,45
        L58,45 L60,20 L64,72 L67,32 L70,45
        L72,45 L74,28 L77,65 L80,38 L83,45
        L85,45 L87,32 L90,62 L93,40 L96,45
        L98,45 L100,36 L103,56 L106,42 L109,45
        L111,45 L113,40 L116,52 L119,44 L122,45
        L124,45 L126,44 L128,48 L130,45 L132,45
        L134,45 L136,42 L138,50 L141,44 L144,45
        L146,45 L148,38 L152,54 L155,42 L158,45
        L160,45 L162,32 L166,60 L169,38 L172,45
        L174,45 L176,25 L180,68 L183,34 L186,45
        L188,45 L190,18 L194,74 L197,28 L200,45
        L202,45 L204,12 L208,78 L211,24 L214,45
        L216,45 L218,18 L222,74 L225,30 L228,45
        L230,45 L232,25 L236,68 L239,35 L242,45
        L244,45 L246,32 L250,62 L253,38 L256,45
        L258,45 L260,38 L264,56 L267,42 L270,45
        L272,45 L274,44 L276,50 L278,45 L280,45
        L282,45 L284,42 L286,50 L289,44 L292,45
        L294,45 L296,36 L299,56 L302,42 L305,45
        L307,45 L309,30 L313,62 L316,38 L319,45 L320,45
      "/>
      <text x="4" y="86" class="ecg-label">Torsades de Pointes — QRS "twists" around baseline, very fast</text>
    </svg>
  </div>
</div>

<!-- 20. Ventricular Fibrillation -->
<div class="card danger-critical" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">20</div>
      <h3>Ventricular Fibrillation (VFib)</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: Chaotic / No output</span>
      <span class="tag tag-origin">Origin: Ventricles (chaotic)</span>
      <span class="tag tag-rhythm">Rhythm: No identifiable rhythm</span>
      <span class="tag tag-danger-critical">Danger: LETHAL — Cardiac Arrest</span>
    </div>
    <p class="card-info">Completely disorganized ventricular electrical activity. No effective pumping. Immediate cardiac arrest and death without defibrillation within minutes. Call code, begin CPR, defibrillate immediately.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>No recognizable P waves, QRS, or T waves</li>
        <li>Completely chaotic, irregular waveforms</li>
        <li>Varying amplitude and frequency</li>
        <li>No organized rhythm whatsoever</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="45" x2="320" y2="45" class="grid-line-major"/>
      <!-- Pure chaos -->
      <path class="ecg-trace-red" d="
        M0,45 L2,38 L4,55 L6,30 L8,62 L10,40 L12,20 L14,68 L16,42 L18,58 L20,35
        L22,70 L24,28 L26,52 L28,38 L30,65 L32,22 L34,72 L36,35 L38,60 L40,30
        L42,55 L44,25 L46,68 L48,40 L50,18 L52,74 L54,38 L56,55 L58,30 L60,65
        L62,28 L64,70 L66,35 L68,58 L70,22 L72,68 L74,40 L76,15 L78,72 L80,42
        L82,60 L84,28 L86,65 L88,38 L90,20 L92,70 L94,45 L96,55 L98,30 L100,65
        L102,25 L104,72 L106,38 L108,18 L110,68 L112,42 L114,58 L116,32 L118,62
        L120,28 L122,70 L124,40 L126,22 L128,75 L130,35 L132,60 L134,30 L136,65
        L138,25 L140,68 L142,38 L144,55 L146,20 L148,72 L150,40 L152,62 L154,28
        L156,70 L158,35 L160,18 L162,75 L164,42 L166,58 L168,25 L170,68 L172,38
        L174,55 L176,22 L178,72 L180,40 L182,62 L184,28 L186,65 L188,32 L190,70
        L192,35 L194,20 L196,68 L198,45 L200,58 L202,25 L204,72 L206,38 L208,18
        L210,75 L212,42 L214,60 L216,30 L218,65 L220,28 L222,70 L224,40 L226,55
        L228,22 L230,68 L232,35 L234,58 L236,25 L238,72 L240,40 L242,18 L244,65
        L246,38 L248,55 L250,28 L252,70 L254,42 L256,20 L258,75 L260,35 L262,62
        L264,30 L266,68 L268,38 L270,55 L272,22 L274,70 L276,40 L278,18 L280,72
        L282,42 L284,60 L286,28 L288,65 L290,32 L292,70 L294,35 L296,55 L298,25
        L300,68 L302,40 L304,20 L306,75 L308,42 L310,58 L312,28 L314,65 L316,35 L318,55 L320,45
      "/>
      <text x="4" y="86" class="ecg-label">VFib — completely chaotic, no QRS, no output — DEFIB IMMEDIATELY</text>
    </svg>
  </div>
</div>

<!-- 21. PVCs -->
<div class="card danger-low" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">21</div>
      <h3>Premature Ventricular Contractions (PVCs)</h3>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: Normal + extra beats</span>
      <span class="tag tag-origin">Origin: Ectopic ventricular focus</span>
      <span class="tag tag-rhythm">Mostly regular + early wide beats</span>
      <span class="tag tag-danger-low">Danger: Low-High (context-dependent)</span>
    </div>
    <p class="card-info">Extra beats from ectopic ventricular foci. Wide, bizarre QRS with a full compensatory pause after. Common in healthy people; concerning in patients with structural heart disease or in runs (couplets, triplets).</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Early, wide (&gt;0.12 sec), bizarre-shaped QRS</li>
        <li>No P wave before the PVC</li>
        <li>T wave opposite direction to QRS (discordant)</li>
        <li>Full compensatory pause after PVC</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Normal, normal, PVC (wide bizarre), full pause, normal -->
      <path class="ecg-trace" d="
        M0,45 L8,45
        C9,43 10,41 11,40 C12,39 13,39 14,40 C15,41 15,45 15,45
        L20,45 L22,16 L24,72 L26,45 L36,45 C38,44 40,44 42,45
        L82,45
        C83,43 84,41 85,40 C86,39 87,39 88,40 C89,41 89,45 89,45
        L94,45 L96,16 L98,72 L100,45 L110,45 C112,44 114,44 116,45
      "/>
      <!-- PVC -->
      <path style="fill:none;stroke:#fc8181;stroke-width:2.5;" d="
        M130,45 L132,45 L134,15 L139,75 L144,48 L148,62 L152,45
      "/>
      <!-- Full compensatory pause then resume -->
      <path class="ecg-trace" d="
        M192,45
        C193,43 194,41 195,40 C196,39 197,39 198,40 C199,41 199,45 199,45
        L204,45 L206,16 L208,72 L210,45 L220,45 C222,44 224,44 226,45
        L266,45
        C267,43 268,41 269,40 C270,39 271,39 272,40 C273,41 273,45 273,45
        L278,45 L280,16 L282,72 L284,45 L294,45 C296,44 298,44 300,45
        L320,45
      "/>
      <text x="130" y="10" style="fill:#fc8181;font-size:8px;">PVC</text>
      <text x="153" y="32" style="fill:#a0aec0;font-size:7px;">full pause</text>
      <text x="4" y="86" class="ecg-label">PVC — early, wide, bizarre QRS + full compensatory pause</text>
    </svg>
  </div>
</div>

<!-- 22. Irregular SVT with BBB -->
<div class="card danger-moderate" style="max-width:900px;margin:0 auto 18px;">
  <div class="card-body">
    <div class="card-title">
      <div class="card-num">22</div>
      <h3>Irregular SVT with Bundle Branch Block</h3>
      <span class="alias">e.g. AFib + BBB</span>
    </div>
    <div class="tags">
      <span class="tag tag-rate">Rate: &gt;100 bpm</span>
      <span class="tag tag-origin">Origin: Supraventricular + BBB</span>
      <span class="tag tag-rhythm">Rhythm: Irregularly irregular</span>
      <span class="tag tag-danger-moderate">Danger: Moderate-High</span>
    </div>
    <p class="card-info">An irregular supraventricular tachycardia (like AFib or MAT) combined with a bundle branch block. Wide AND irregular - the most difficult to distinguish from polymorphic VT. Requires clinical context and prior ECG comparison.</p>
    <div class="ecg-features">
      <strong>Key ECG Features:</strong>
      <ul>
        <li>Wide QRS (&gt;0.12 sec) - same BBB morphology</li>
        <li>Irregularly irregular rhythm</li>
        <li>No visible P waves (if AFib)</li>
        <li>QRS shape stays same (unlike polymorphic VT)</li>
      </ul>
    </div>
  </div>
  <div class="card-ecg">
    <svg viewBox="0 0 320 90" xmlns="http://www.w3.org/2000/svg">
      <rect width="320" height="90" fill="#0a1628"/>
      <line x1="0" y1="36" x2="320" y2="36" class="grid-line-major"/>
      <line x1="80" y1="0" x2="80" y2="90" class="grid-line-major"/>
      <line x1="160" y1="0" x2="160" y2="90" class="grid-line-major"/>
      <line x1="240" y1="0" x2="240" y2="90" class="grid-line-major"/>
      <!-- Irregular R-R but all wide same BBB morphology; fibrillatory baseline -->
      <path style="fill:none;stroke:#2d5a8e;stroke-width:1;" d="
        M0,45 L2,44 L4,46 L6,44 L8,47 L10,43 L12,46 L14,44 L16,47 L18,43 L20,46 L22,44
        L26,47 L28,43 L30,46 L32,44 L36,47 L38,43 L40,46 L42,44 L46,47 L48,43 L50,46
        L58,44 L60,47 L62,43 L64,46 L66,44 L70,47 L72,43 L74,46
        L84,44 L86,47 L88,43 L90,46 L92,44 L96,47 L98,43 L100,46
        L110,44 L112,47 L114,43 L116,46 L118,44 L122,47 L124,43 L126,46
        L136,44 L138,47 L140,43 L142,46 L144,44 L148,47 L150,43 L152,46
        L162,44 L164,47 L166,43 L168,46 L170,44 L174,47 L176,43 L178,46
        L190,44 L192,47 L194,43 L196,46 L198,44 L202,47 L204,43 L206,46
        L216,44 L218,47 L220,43 L222,46 L224,44 L228,47 L230,43 L232,46
        L242,44 L244,47 L246,43 L248,46 L250,44 L254,47 L256,43 L258,46
        L268,44 L270,47 L272,43 L274,46 L276,44 L280,47 L282,43 L284,46
        L294,44 L296,47 L298,43 L300,46 L302,44 L306,47 L308,43 L310,46 L320,44
      "/>
      <!-- Wide BBB QRS at irregular intervals -->
      <path class="ecg-trace-yellow" d="
        M14,45 L15,45 L16,25 L20,68 L22,40 L24,18 L28,72 L31,45
        L48,45 L49,25 L53,68 L55,40 L57,18 L61,72 L64,45
        L74,45 L75,25 L79,68 L81,40 L83,18 L87,72 L90,45
        L105,45 L106,25 L110,68 L112,40 L114,18 L118,72 L121,45
        L134,45 L135,25 L139,68 L141,40 L143,18 L147,72 L150,45
        L166,45 L167,25 L171,68 L173,40 L175,18 L179,72 L182,45
        L200,45 L201,25 L205,68 L207,40 L209,18 L213,72 L216,45
        L228,45 L229,25 L233,68 L235,40 L237,18 L241,72 L244,45
        L258,45 L259,25 L263,68 L265,40 L267,18 L271,72 L274,45
        L290,45 L291,25 L295,68 L297,40 L299,18 L303,72 L306,45
        L314,45 L315,25 L319,68 L320,62
      "/>
      <text x="4" y="86" class="ecg-label">Irregular SVT + BBB — wide, irregular, same QRS shape (AFib+BBB)</text>
    </svg>
  </div>
</div>

<!-- FOOTER -->
<div class="footer">
  <p><strong>ECG Arrhythmia Visual Reference Guide</strong></p>
  <p>Source: Barash Clinical Anesthesia 9e (Table 33-10) &bull; Braunwald's Heart Disease &bull; Medical Physiology (Boron &amp; Boulpaep)</p>
  <p style="margin-top:6px;">ECG strips are schematic illustrations for educational pattern recognition. Always correlate with clinical presentation.</p>
</div>

</body>
</html>
Running Command

wc -l /home/daytona/workspace/ecg-guide/ecg_reference_guide.html && ls -lh /home…

Your ECG reference guide is ready - 71KB, 1,579 lines of fully self-contained HTML with hand-crafted SVG ECG strips for all 22 arrhythmia types.

ecg reference guide

HTML File · HTML


What's inside the guide:

For every one of the 22 arrhythmias:
  • A dark-background SVG ECG strip drawn to show the characteristic pattern (sawtooth for flutter, chaotic for VFib, twisting for Torsades, long PR for 1st-degree block, etc.)
  • Colour-coded danger level on the card border and badge:
    • 🔴 Red = Critical / Lethal (VFib, Torsades, Complete Heart Block, Mono VT)
    • 🟠 Orange = Very High (Mobitz II, Antidromic AVRT, Atrial Flutter, AFib)
    • 🟡 Yellow = Moderate
    • 🟢 Green = Low
    • ⚫ Grey = Normal/benign
  • Key ECG features bullet list (rate, rhythm, P wave, PR, QRS notes)
  • Clinical description of when and why it occurs
Structure:
  • Cover page with title
  • Full table of contents
  • Colour legend
  • Cards grouped by category (Bradys → Regular narrow tach → Irregular narrow → Wide QRS)
Open it in any browser - it also prints cleanly for a physical reference card.

It is HTML. How can I open it?

Great question! Here are all the ways you can open it:

How to Open the HTML File

Easiest Way - Just Double-Click It

  1. Download the file by clicking the link above
  2. Find it in your Downloads folder
  3. Double-click the file - it will open automatically in your default web browser (Chrome, Firefox, Edge, Safari - any of them work)
That's it. No special software needed.

Other Ways to Open It

Drag and Drop:
  • Open your browser (Chrome, Firefox, Edge)
  • Drag the downloaded .html file directly into the browser window
Right-click method:
  • Right-click the file
  • Choose "Open with"
  • Select your browser (Chrome, Edge, Firefox, etc.)

Want a PDF Instead?

Once it's open in your browser:
  1. Press Ctrl + P (Windows) or Cmd + P (Mac) to print
  2. Change the destination to "Save as PDF"
  3. Click Save
Now you have a PDF you can share, print, or use in your presentation.

Want a PowerPoint Instead?

Just let me know - I can convert this into a .pptx file with one slide per arrhythmia, ready to use directly in your presentation tomorrow!

Generate a printable PDF of this ECG reference guide

Reading File
Running Command

which wkhtmltopdf; which weasyprint; which chromium; which chromium-browser; whi…

Running Command

chromium --headless --disable-gpu --no-sandbox --print-to-pdf=/home/daytona/work…

PDF generated successfully - 1,009,154 bytes (~986 KB). The dbus errors are harmless (no display server in the sandbox) - Chromium still processed it perfectly.

ecg reference guide

PDF Document · PDF


What you get:
  • Full-colour printable PDF (~1 MB)
  • All 22 arrhythmia cards with dark-background SVG ECG strips
  • Colour-coded danger levels, key ECG features, clinical descriptions
  • Prints beautifully on A4 or letter-size paper
  • Also works as a digital reference you can zoom into on any device
To print it, just open the PDF and hit Ctrl+P (Windows) or Cmd+P (Mac).

Which part of body doesn't have any blood supply, but it is still alive?

Finding Sources
Finding Sources
Searching the Web

parts of human body with no blood supply avascular but alive

Finding Sources
Finding Sources
Excellent - confirmed directly from the textbooks. Here is the complete answer:

Parts of the Body With No Blood Supply - Yet Still Alive

These structures are called avascular tissues - they contain no blood vessels at all, but survive through alternative ways of getting oxygen and nutrients.

1. The Cornea (Most Famous Answer)

The cornea - the clear dome at the front of your eye - is the most well-known example. It is completely avascular by design.
"The cornea is avascular and lined anteriorly by epithelial cells and posteriorly by endothelial cells." - Goldman-Cecil Medicine
Why no blood vessels? Blood vessels would block light from entering the eye, destroying your vision. The cornea must stay perfectly transparent.
How does it survive then?
  • Gets oxygen directly from the air through the tear film (which is why your eyes dry out and feel uncomfortable if you stare without blinking)
  • Gets nutrients (glucose, amino acids) from the aqueous humor (the clear fluid inside the front of the eye)
  • Gets some nutrients from limbal blood vessels at its very edge by diffusion
Fun fact: The cornea is the fastest-healing tissue in the human body - a surface scratch can heal in as little as 24 hours.

2. The Crystalline Lens of the Eye

The lens (the internal focusing structure behind the iris) is also completely avascular.
"Since the crystalline lens is avascular, the lens epithelium receives its nutrition from the aqueous humor." - Robbins & Cotran Pathologic Basis of Disease
How does it survive? Entirely dependent on aqueous humor for glucose and nutrients.
What happens when it fails? When the lens does not get adequate nutrition or suffers oxidative damage over time, the proteins inside it cloud over - this is a cataract.

3. Articular Cartilage

The smooth cartilage covering the ends of your bones at joints (knees, hips, shoulders) has no blood vessels at all.
"Unlike bone, cartilage is very avascular and depends on diffusion for transmittal of nutrients across the matrix." - Schwartz's Principles of Surgery
How does it survive? Nutrients diffuse in from the synovial fluid (the lubricating joint fluid) through a process of compression and relaxation - essentially, the cartilage "pumps" nutrients in as you move. This is why exercise is important for joint health.
Why this matters clinically: Because cartilage has no blood supply, it heals extremely poorly when damaged. A torn or worn-out cartilage surface cannot repair itself - this is the root problem in osteoarthritis.

4. Menisci (Knee Cartilage)

The menisci (the C-shaped shock absorbers in your knee) are mostly avascular.
"White-white zone: Avascular. Nutrition derived solely from synovial fluid via passive diffusion. Poor healing response." - Miller's Review of Orthopaedics
The meniscus has three zones:
ZoneVascularityHealing Ability
Red-Red (outer edge)Well vascularizedHeals well
Red-White (middle)Partial blood supplyLimited healing
White-White (inner zone)Completely avascularDoes not heal
This is why surgeons try to repair tears in the outer zones but often have to remove (resect) the inner zone tears - they simply cannot heal.

5. The Epidermis (Outer Skin Layer)

The epidermis - the outermost layer of your skin that you can see and touch - has no blood vessels. Blood vessels only exist in the deeper dermis layer below it.
The epidermis gets its nutrients by diffusion upward from the dermal blood vessels below.

6. Hair and Nails

Hair shafts and nails themselves contain no living cells and no blood supply once they grow out from their roots. The living part is only at the root (hair follicle and nail matrix) - the rest is dead keratin protein.

Quick Summary Table

StructureHow It Gets NutrientsClinical Relevance
CorneaTear film (O₂ from air) + aqueous humorFastest healer; contact lens overuse can cause vessel in-growth
Crystalline LensAqueous humorCataracts when nutrition fails
Articular CartilageSynovial fluid via diffusionHeals poorly; osteoarthritis
Meniscus (inner zone)Synovial fluid via diffusionCannot heal; often surgically removed
EpidermisDiffusion from dermis belowWounds heal from the edges inward
Hair/NailsOnly root is aliveNo pain when cut

The single most classic exam answer is the cornea - the only transparent tissue in the body, kept avascular deliberately so it doesn't block light. But as you can see, avascular living tissue is more common than most people realize!
This is a shared conversation. Sign in to Orris to start your own chat.