/* === PHYSL 210 — flashcard decks (keyed by module id) === */
// { t: term/front, d: definition/back }

const FLASHCARDS = {
  cell: [
    { t:'Phospholipid bilayer', d:'The core of all biological membranes: two leaflets of amphipathic phospholipids with polar heads facing aqueous environments and nonpolar fatty-acid tails forming the hydrophobic core.' },
    { t:'Amphipathic molecule', d:'A molecule with both polar (hydrophilic) and nonpolar (hydrophobic) regions; examples include phospholipids, cholesterol, and integral membrane proteins.' },
    { t:'Cholesterol (in membranes)', d:'Amphipathic sterol present ~1:1 with phospholipids in the plasma membrane; maintains proper membrane fluidity and is largely absent from organelle membranes.' },
    { t:'Glycocalyx', d:'Layer of carbohydrates linked to glycoproteins and glycolipids on the outer leaflet of the plasma membrane; important for cell identification, adhesion, and cell–cell interactions.' },
    { t:'Desmosome', d:'Adhering junction that links adjacent cells via cadherins anchored intracellularly to intermediate filaments (keratin); provides mechanical strength in tissues subject to stretching.' },
    { t:'Tight junction', d:'Occludin-based junction that seals the paracellular space in epithelia, forcing transcellular transport and establishing apical/basolateral polarity; the only junction that forms a nearly impermeable seal.' },
    { t:'Gap junction', d:'Channel formed by paired connexons (six connexin proteins each) linking the cytoplasms of adjacent cells through a 1.5-nm pore; electrically and metabolically couples cells (e.g., cardiac myocytes, bone cells).' },
    { t:'Nucleus', d:'Largest organelle; double-membrane (nuclear envelope) with nuclear pores for selective transport; contains chromatin (DNA + proteins) and the nucleolus (rRNA synthesis); controls protein synthesis.' },
    { t:'Rough ER vs Smooth ER', d:'RER has ribosomes on its cytosolic surface and synthesises/modifies secretory and membrane proteins. SER lacks ribosomes; synthesises lipids, stores Ca²⁺ (sarcoplasmic reticulum in muscle), and detoxifies drugs (liver).' },
    { t:'Golgi apparatus', d:'Stack of flattened membrane sacs (cisternae) that receives proteins from the RER, performs post-translational modifications, and sorts/packages them into vesicles for secretion, membrane insertion, or lysosomal delivery.' },
    { t:'Lysosome', d:'Membrane-bound organelle containing hydrolytic enzymes active at pH 5.0; degrades extracellular debris (endocytosed pathogens), worn organelles, and intracellular waste.' },
    { t:'Peroxisome', d:'Contains oxidative enzymes that use O₂ to remove hydrogen from fatty acids, alcohol, and drugs, generating H₂O₂; catalase immediately detoxifies H₂O₂ (2H₂O₂ → 2H₂O + O₂). Abundant in liver and kidney.' },
    { t:'Mitochondrion', d:'Double-membrane organelle (outer membrane + inner cristae) that produces ATP via cellular respiration. Contains its own circular DNA; number correlates with cell energy demand.' },
    { t:'Na⁺/K⁺-ATPase', d:'Primary active transport pump that moves 3 Na⁺ out and 2 K⁺ in per ATP hydrolysed; electrogenic (net positive charge exported), creating the chemical and electrical gradients that underlie membrane excitability.' },
    { t:'Simple diffusion', d:'Passive movement of molecules down their concentration gradient directly through the lipid bilayer, requiring no energy or carrier; fastest for small, nonpolar molecules (O₂, CO₂). Rate depends on gradient, surface area, and membrane thickness.' },
    { t:'Facilitated diffusion', d:'Passive, protein-mediated transport of solutes down their concentration gradient using specific carrier or channel proteins; selective, saturable, but requires no ATP.' },
    { t:'Secondary active transport', d:'Uses the Na⁺ electrochemical gradient (set by the Na⁺/K⁺-ATPase) to drive another solute uphill; cotransport moves both Na⁺ and the solute in the same direction; countertransport moves them in opposite directions.' },
    { t:'Phagocytosis vs exocytosis', d:'Phagocytosis: pseudopods engulf large particles (e.g., bacteria) into a phagosome that fuses with lysosomes — material enters cell. Exocytosis: vesicles fuse with plasma membrane to release contents outside the cell.' },
    { t:'G-protein-coupled receptor cascade', d:'First messenger binds receptor → α-subunit exchanges GDP for GTP → GTP-α activates adenylate cyclase → ATP → cAMP → protein kinase A phosphorylates target proteins → cellular response. GTP hydrolysis terminates signalling.' },
    { t:'Lipid-soluble messenger action', d:'Steroid/thyroid hormones cross the plasma membrane, bind cytoplasmic or nuclear receptors; the messenger–receptor complex translocates to the nucleus, binds a DNA response element, and acts as a transcription factor to alter protein synthesis.' },
  ],
  blood: [
    { t:'Hematocrit', d:'Percentage of blood volume occupied by packed RBCs (~42% female, ~47% male); elevated in polycythemia, reduced in anaemia. Plasma makes up ~55% of blood volume.' },
    { t:'Plasma proteins', d:'Four classes: albumins (colloid osmotic pressure, transport), globulins (antibodies, enzymes, clotting factors), fibrinogen (clotting), transferrin (iron transport). Mainly synthesised by the liver; serum is plasma minus fibrinogen and the other clotting factors.' },
    { t:'Haemoglobin A', d:'Tetramer (α₂β₂) with four heme groups; each heme contains Fe²⁺ that binds one O₂ reversibly (oxygenation). CO binds Hb with 200× greater affinity than O₂, competitively blocking O₂ transport.' },
    { t:'Erythropoietin (EPO)', d:'Glycoprotein hormone released by the kidney when O₂ delivery falls; stimulates differentiation of erythroid precursors in bone marrow to increase RBC production. Reduced in chronic kidney disease → anaemia.' },
    { t:'RBC lifespan & recycling', d:'RBCs live ~120 days; old cells are phagocytosed by macrophages in the spleen. Heme → biliverdin → bilirubin (secreted in bile); globin → amino acids; iron → recycled via transferrin to bone marrow.' },
    { t:'Sickle cell disease', d:'Autosomal recessive: single amino acid substitution in β-globin (HbS α₂β*₂) causes RBCs to sickle under low O₂; rigid sickle-shaped cells damage capillaries and are haemolysed (haemolytic anaemia).' },
    { t:'Pernicious anaemia', d:'Anaemia caused by deficiency of intrinsic factor (from gastric parietal cells) or dietary vitamin B12, impairing DNA synthesis and RBC maturation in the bone marrow.' },
    { t:'Innate vs adaptive immunity', d:'Innate: non-specific, no memory, fast (seconds–hours), uses phagocytes (neutrophils, macrophages) and complement. Adaptive: specific, has memory, slow (days–weeks), uses B cells (humoral) and T cells (cellular).' },
    { t:'Steps of inflammation', d:'Vessel injury → release of histamine/inflammatory mediators → vasodilation + increased permeability → leukocyte margination → tethering/rolling → activation → firm adhesion → diapedesis → chemotaxis → phagocytosis.' },
    { t:'Complement — OIL', d:'Activated complement proteins serve three functions: Opsonisation (coating pathogens for enhanced phagocytosis), Inflammatory mediators (recruit leukocytes), and Lysis (MAC — membrane attack complex — forms pores in pathogen membranes).' },
    { t:'B cells & humoral immunity', d:'B cells recognise antigens via surface antibodies, undergo clonal expansion, and differentiate into plasma cells secreting specific antibodies. Memory B cells provide faster secondary responses. Major defence against bacteria and toxins.' },
    { t:'T cells & cellular immunity', d:'Cytotoxic T cells (CD8) kill virally infected and cancer cells directly. Helper T cells (CD4) release cytokines (IL-2, TNF-α) that activate B cells and other immune cells. T cells require antigen presentation via MHC proteins.' },
    { t:'Platelet plug formation', d:'(1) Adhesion: vWF bridges platelets to exposed collagen. (2) Activation: platelets release ADP, TXA₂, serotonin, and Ca²⁺. (3) Aggregation: platelets aggregate via fibrinogen bridges to form the primary (white) thrombus.' },
    { t:'TXA₂ vs PGI₂', d:'Thromboxane A₂ (TXA₂, from COX-1 in platelets): promotes vasoconstriction and platelet aggregation (pro-haemostatic). Prostacyclin (PGI₂, from COX-2 in endothelium): promotes vasodilation and inhibits aggregation (anti-haemostatic).' },
    { t:'Coagulation cascade', d:'Extrinsic (tissue factor + Factor VII) and intrinsic (Factor XII contact) pathways converge on Factor Xa. Xa + Va + Ca²⁺ + phospholipid = prothrombinase → prothrombin → thrombin → fibrinogen → fibrin (stable clot).' },
    { t:'Natural anticoagulants', d:'Antithrombin III inhibits thrombin; thrombomodulin on endothelium converts thrombin to an activator of Protein C, which inhibits Factors Va and VIIIa; TFPI inhibits Xa and VIIa. Fibrinolysis: tPA → plasminogen → plasmin → fibrin degradation.' },
    { t:'ABO blood groups', d:'Antigens are carbohydrates on RBC surface (encoded by enzymes). Anti-A and anti-B are naturally occurring IgM antibodies against absent antigens. Type O (universal donor): no A or B antigens; type AB (universal recipient): no anti-A or anti-B.' },
    { t:'Rh blood group & sensitisation', d:'D antigen is an RBC membrane protein; Rh⁻ individuals produce IgG anti-D only after exposure to Rh⁺ blood. Maternal sensitisation: Rh⁻ mother with Rh⁺ fetus develops anti-D; antibodies cross placenta in subsequent pregnancies causing haemolytic disease of the newborn.' },
  ],
  nms: [
    { t:'Resting membrane potential (−70 mV)', d:'Set by the Na⁺/K⁺-ATPase (3 Na⁺ out / 2 K⁺ in per ATP, electrogenic) and K⁺ leak channels; Em ≈ −70 mV, between EK⁺ (−90 mV) and ENa⁺ (+55 mV) but much closer to EK⁺ because K⁺ permeability is 50–100× greater than Na⁺.' },
    { t:'Equilibrium potential', d:'Membrane potential at which the electrical gradient exactly opposes the chemical gradient for a specific ion. EK⁺ ≈ −90 mV (K⁺ wants to leave chemically but electrical gradient pulls it back); ENa⁺ ≈ +55 mV.' },
    { t:'Action potential phases', d:'(1) Rest −70 mV; (2) Depolarisation — Na(V) opens, Na⁺»K⁺, membrane reaches ≈+30 mV; (3) Repolarisation — Na(V) inactivates, K(V) opens; (4) After-hyperpolarisation — K(V) still open, dips below −70 mV; (5) Return to rest.' },
    { t:'Absolute refractory period', d:'Period during Na⁺ channel inactivation when no stimulus can trigger another AP; responsible for unidirectional propagation of the action potential along the axon.' },
    { t:'Relative refractory period', d:'After the absolute refractory period: some (not all) Na⁺ channels have recovered to the resting state while K⁺ channels are still open, hyperpolarising the membrane; a larger-than-normal stimulus can trigger a new AP.' },
    { t:'Electrotonic conduction', d:'Passive (decremental) spread of electrical current inside the axon from an active site; rapid but decays with distance. Depolarises adjacent membrane toward threshold so a new AP can be regenerated.' },
    { t:'Saltatory conduction', d:'In myelinated axons, current jumps between nodes of Ranvier (where voltage-gated Na⁺ channels are concentrated), bypassing the insulated internodal segments; speeds: myelinated 12–130 m/s vs unmyelinated 0.5–2 m/s.' },
    { t:'Schwann cells vs oligodendrocytes', d:'Schwann cells myelinate a single axon segment in the PNS. Oligodendrocytes myelinate multiple axon segments in the CNS. Both produce the myelin sheath that insulates axons and enables saltatory conduction.' },
    { t:'Neuron types', d:'Afferent (sensory): carry information from periphery to CNS via dorsal roots; cell bodies in dorsal root ganglia. Efferent (motor): carry information from CNS to periphery via ventral roots. Interneurons: entirely within CNS, can be excitatory or inhibitory.' },
    { t:'EPSP vs IPSP', d:'EPSP (excitatory PSP): glutamate opens Na⁺ channels → Na⁺ influx → depolarisation (toward threshold). IPSP (inhibitory PSP): GABA or glycine opens Cl⁻ channels → Cl⁻ influx → hyperpolarisation (away from threshold).' },
    { t:'Synaptic integration', d:'EPSPs and IPSPs are graded, decay with distance, and summate at the axon hillock. Temporal summation: overlapping PSPs from one axon add up. Spatial summation: simultaneous PSPs from multiple synapses add up. If threshold (≈−50 mV) is reached, an AP fires.' },
    { t:'Chemical vs electrical synapses', d:'Electrical (gap junctions): bidirectional, fast, inflexible. Chemical: can be excitatory or inhibitory, slower, flexible, allows plasticity and complex integration. Only chemical synapses can produce inhibition.' },
    { t:'Neuromuscular junction (NMJ)', d:'One motor AP reliably generates one muscle AP (no summation needed, unlike CNS). ACh binds nicotinic receptors on the motor end plate → end-plate potential → muscle AP. Acetylcholinesterase terminates signalling. Each muscle fibre is innervated by only one axon.' },
    { t:'Motor unit', d:'One motor neuron, its axon, and all the skeletal muscle fibres it innervates; the smallest increment of muscle force the nervous system can produce. Small motor units (few fibres) allow fine control; large units produce more force.' },
    { t:'Excitation–contraction coupling', d:'Muscle AP → T-tubule → DHP receptor (voltage sensor) physically activates ryanodine receptor in SR lateral sac → Ca²⁺ floods cytosol → binds troponin → contraction. Ca²⁺ returned to SR by Ca²⁺-ATPase → relaxation.' },
    { t:'Sarcomere structure', d:'Contractile unit between two Z-lines; thick filaments (myosin) occupy the A-band; thin filaments (actin + troponin + tropomyosin) extend from Z-lines into A-band. H-zone (thick only) and I-band (thin only) narrow during contraction; filament lengths unchanged.' },
    { t:'Cross-bridge cycle (6 steps)', d:'(1) Ca²⁺ binds troponin → binding sites exposed; (2) energised myosin head (ADP+Pi) attaches to actin; (3) power stroke — head swivels, thin filament pulled, ADP+Pi released; (4) ATP binds → head detaches; (5) ATP hydrolysed → head re-cocked; (6) Ca²⁺ pumped back to SR → relaxation.' },
    { t:'Slow-twitch vs fast-twitch fibres', d:'Slow-twitch (type I, red): small, many mitochondria, high myoglobin, aerobic metabolism, fatigue-resistant; suited for endurance. Fast-twitch glycolytic (type IIb, white): large, few mitochondria, high glycogen, anaerobic glycolysis, powerful but fatigue quickly.' },
  ],
  cns: [
    { t:'Grey vs white matter', d:'Grey matter = neuronal cell bodies; white matter = myelinated axon tracts.' },
    { t:'Dorsal column pathway', d:'Ascending tract carrying fine touch, vibration and proprioception.' },
    { t:'Spinothalamic tract', d:'Ascending tract carrying pain and temperature sensation.' },
    { t:'Corticospinal tract', d:'Main descending pathway for voluntary motor control.' },
    { t:'Hippocampus', d:'Brain structure essential for forming new declarative memories.' },
    { t:'Reticular activating system', d:'Brainstem network governing arousal and the sleep–wake cycle.' },
  ],
  ans: [
    { t:'Preganglionic neurotransmitter', d:'Acetylcholine — released by all autonomic preganglionic neurons onto nicotinic receptors.' },
    { t:'Sympathetic outflow', d:'Thoracolumbar (T1–L2); short preganglionic, long postganglionic fibres.' },
    { t:'Parasympathetic outflow', d:'Craniosacral; long preganglionic, short postganglionic fibres.' },
    { t:'Adrenal medulla', d:'A modified sympathetic ganglion that secretes mainly adrenaline (~80% epinephrine) and some noradrenaline (~20% norepinephrine) into the blood as hormones.' },
    { t:'Muscarinic receptor', d:'Receptor for ACh at parasympathetic target organs (and sweat glands).' },
    { t:'Fight-or-flight', d:'Sympathetic response: ↑heart rate, pupil/bronchial dilation, reduced digestion.' },
  ],
  ss: [
    { t:'Phototransduction', d:'Light hyperpolarises photoreceptors and reduces glutamate release, signalling the visual pathway.' },
    { t:'Rods vs cones', d:'Rods = dim-light/peripheral vision; cones = colour and high-acuity vision.' },
    { t:'Tonotopy', d:'Frequency map of the basilar membrane: high frequencies at the base, low at the apex.' },
    { t:'Adaptation', d:'Decline in receptor response during a constant, maintained stimulus.' },
    { t:'Receptor potential', d:'Graded change in membrane potential produced by sensory transduction.' },
    { t:'Hair cells', d:'Cochlear receptors that convert stereocilia deflection into a receptor potential.' },
  ],
  cardio: [
    { t:'Cardiac output', d:'Heart rate × stroke volume — the blood pumped per minute.' },
    { t:'Wiggers diagram', d:'Plot linking ECG, pressures, ventricular volume and heart sounds across one cardiac cycle.' },
    { t:'SA node', d:'The heart’s natural pacemaker; slow-type action potentials set the rhythm.' },
    { t:'Plateau phase', d:'Ca²⁺ influx balancing K⁺ efflux prolongs the ventricular action potential.' },
    { t:'Baroreceptors', d:'Stretch sensors in the carotid sinus and aortic arch that buffer arterial pressure.' },
    { t:'Starling forces', d:'Balance of hydrostatic and oncotic pressures governing capillary fluid exchange.' },
  ],
  gi: [
    { t:'Parietal cells', d:'Gastric cells that secrete hydrochloric acid and intrinsic factor.' },
    { t:'Peristalsis vs segmentation', d:'Peristalsis propels contents forward; segmentation mixes them.' },
    { t:'Micelle', d:'Bile-salt aggregate that carries digested fats to the intestinal epithelium for absorption.' },
    { t:'Secretin', d:'Hormone released by duodenal acid that stimulates bicarbonate secretion.' },
    { t:'Cholecystokinin (CCK)', d:'Hormone that triggers gallbladder contraction and pancreatic enzyme release.' },
    { t:'GI wall layers', d:'From the lumen out: mucosa, submucosa, muscularis externa, serosa.' },
  ],
  resp: [
    { t:'Surfactant', d:'Type II-pneumocyte secretion that lowers surface tension and raises lung compliance.' },
    { t:'Bohr effect', d:'Rightward shift of the O₂–Hb curve with ↑CO₂, ↑H⁺ and ↑temperature, unloading O₂.' },
    { t:'Compliance', d:'A measure of how easily the lungs expand for a given change in pressure.' },
    { t:'V/Q matching', d:'Pairing of ventilation and perfusion (≈0.8) for efficient gas exchange.' },
    { t:'Central chemoreceptors', d:'Sense CO₂/H⁺ in the CSF to regulate ventilation.' },
    { t:'Tidal volume', d:'Volume of air moved in or out of the lungs during a normal breath.' },
  ],
  renal: [
    { t:'Glomerular filtration rate', d:'Volume of plasma filtered per minute (~125 mL/min); tightly autoregulated.' },
    { t:'ADH', d:'Inserts aquaporins in the collecting duct to reabsorb water and concentrate urine.' },
    { t:'Aldosterone', d:'Increases Na⁺ reabsorption and K⁺ secretion in the distal nephron.' },
    { t:'Transport maximum (Tm)', d:'Saturation point of a tubular carrier; exceeding it (e.g. glucose) causes spillover into urine.' },
    { t:'Countercurrent multiplier', d:'Loop-of-Henle mechanism that builds the medullary osmotic gradient.' },
    { t:'Three renal processes', d:'Glomerular filtration, tubular reabsorption and tubular secretion.' },
  ],
  endo: [
    { t:'Steroid hormone action', d:'Lipid-soluble; crosses the membrane to bind nuclear receptors and alter transcription.' },
    { t:'Posterior pituitary', d:'Stores and releases ADH and oxytocin made in the hypothalamus.' },
    { t:'Negative feedback', d:'Dominant endocrine control: a product inhibits its own further release.' },
    { t:'PTH', d:'Raises blood Ca²⁺ via bone, kidney and vitamin-D activation.' },
    { t:'Insulin vs glucagon', d:'Insulin lowers blood glucose (uptake/storage); glucagon raises it.' },
    { t:'Anterior pituitary hormones', d:'GH, TSH, ACTH, PRL, FSH and LH, controlled by hypothalamic releasing hormones.' },
  ],
  repro: [
    { t:'SRY gene', d:'Y-chromosome gene that drives testis development; absent → ovary forms.' },
    { t:'LH surge', d:'Mid-cycle spike of luteinising hormone that triggers ovulation (~day 14).' },
    { t:'hCG', d:'Embryonic hormone that maintains the corpus luteum early in pregnancy.' },
    { t:'Corpus luteum', d:'Post-ovulatory structure that secretes progesterone to support the endometrium.' },
    { t:'Oxytocin', d:'Drives uterine contractions in labour and milk ejection (let-down).' },
    { t:'Gonadotropins', d:'FSH and LH — pituitary hormones that drive gametogenesis in both sexes.' },
  ],
};

Object.assign(window, { FLASHCARDS });
