/* === PHYSL 210 — module data (topics, lectures, objectives, notes) === */

// soft pastel from a hue, matching the design system (L~0.92, C~0.05)
const modColor = (h) => ({
  bg:   `oklch(0.925 0.05 ${h})`,
  soft: `oklch(0.965 0.028 ${h})`,
  ink:  `oklch(0.55 0.10 ${h})`,
});

const L = (t, recs) => ({ t, recs });

const MODULES = [
  {
    id:'cell', name:'Cell Physiology', short:'Cell', term:'spring', instructor:'Dr. K. Smith',
    hue:45, progress:1, chapter:'Vander Ch. 3–5',
    blurb:'Structure of the cell, membrane transport, and signal transduction.',
    lectures:[ L('Introduction to Cell Physiology & Membrane Composition',5), L('Cell Junctions',4), L('Cell Organelles I — Nucleus, ER & Golgi',6), L('Cell Organelles II — Lysosomes, Mitochondria & Cytoskeleton',5), L('Membrane Transport',7), L('Signal Transduction',5) ],
    objectives:[
      'Describe the structure of the phospholipid bilayer and the roles of cholesterol, glycolipids and membrane proteins in membrane function.',
      'Distinguish desmosomes, tight junctions and gap junctions and explain the functional consequence of each junction type.',
      'Identify the major cell organelles (nucleus, RER, SER, Golgi, lysosomes, peroxisomes, mitochondria) and state the function of each.',
      'Compare simple diffusion, facilitated diffusion, primary and secondary active transport, and osmosis with respect to energy requirement, direction and use of membrane proteins.',
      'Explain endocytosis (phagocytosis, pinocytosis, receptor-mediated) and exocytosis as routes for bulk movement across the plasma membrane.',
      'Describe G-protein-coupled receptor signalling: ligand binding → G-protein activation → adenylate cyclase → cAMP → protein kinase cascade.',
      'Explain how lipid-soluble chemical messengers cross the membrane, bind intracellular receptors, and act as transcription factors at DNA response elements.',
    ],
    notes:[
      'The plasma membrane is a phospholipid bilayer: polar heads face aqueous environments (hydrophilic), nonpolar tails form the hydrophobic core. Cholesterol (~1:1 with phospholipids) maintains proper membrane fluidity. Organelle membranes contain very little cholesterol.',
      'Integral membrane proteins are amphipathic and span the bilayer (transmembrane proteins); peripheral proteins are not amphipathic and associate with the inner or outer surface. Glycoproteins and glycolipids form the glycocalyx on the cell exterior, important for cell identification.',
      'Desmosomes anchor cells via cadherins linked to intermediate filaments — provide mechanical strength without preventing paracellular movement. Tight junctions (occludins) form nearly impermeable seals, force transcellular transport, and establish apical/basolateral polarity in epithelia. Gap junctions (connexons, 1.5-nm pore) electrically and metabolically couple adjacent cells.',
      'Organelle functions: RER (ribosomes bound) synthesises and post-translationally modifies secretory/membrane proteins; SER synthesises lipids, stores Ca²⁺ (sarcoplasmic reticulum in muscle), detoxifies drugs (liver). Golgi sorts and packages proteins into vesicles for secretion, membrane insertion, or lysosomal targeting. Lysosomes contain hydrolytic enzymes active at pH 5.0; degrade endocytosed pathogens and worn organelles. Peroxisomes oxidise fatty acids and toxins using O₂; catalase detoxifies H₂O₂ produced (2H₂O₂ → 2H₂O + O₂).',
      'Mitochondria have a double membrane; the inner membrane forms cristae where ATP is produced via cellular respiration. Mitochondrial number correlates with energy demands (many in cardiac/skeletal muscle; absent from RBCs). They contain their own circular DNA, consistent with endosymbiotic bacterial origin.',
      'Simple diffusion: passive, no protein required, fastest for small nonpolar molecules; rate depends on concentration gradient, surface area, membrane thickness, and molecular size/polarity. Facilitated diffusion: passive, uses specific carrier or channel proteins; saturable and selective but no energy needed. Primary active transport (Na⁺/K⁺-ATPase): 3 Na⁺ out, 2 K⁺ in per ATP; electrogenic, establishes chemical and electrical gradients. Secondary active transport uses the Na⁺ gradient to co-transport another solute (cotransport = same direction; countertransport = opposite direction).',
      'G-protein-coupled receptors: first messenger binds receptor → conformational change → α-subunit exchanges GDP for GTP → GTP-bound α moves to effector protein → adenylate cyclase converts ATP to cAMP (second messenger) → cAMP activates protein kinases that phosphorylate target proteins → cellular response. GTP hydrolysis by α-subunit terminates signalling and returns G-protein to inactive state.',
      'Lipid-soluble messengers (steroid/thyroid hormones) cross the plasma membrane, bind receptors in the cytoplasm or nucleus, and translocate to the nucleus. The messenger–receptor complex binds a specific DNA sequence called the response element and acts as a transcription factor, increasing or decreasing the rate of gene transcription and ultimately the amount of target protein produced.',
    ],
  },
  {
    id:'blood', name:'Blood', short:'Blood', term:'spring', instructor:'Dr. S. Das',
    hue:25, progress:1, chapter:'Vander Ch. 12',
    blurb:'Composition of blood, gas transport, immunity and haemostasis.',
    lectures:[ L('Blood Basics, Plasma & Hematopoiesis',4), L('Red Blood Cells, Haemoglobin & Anaemia',5), L('White Blood Cells & Innate Immunity',4), L('Inflammation & Phagocytosis',4), L('Complement, B Cells & Acquired Immunity',5), L('Platelets & Haemostasis',5), L('Coagulation Cascade & Blood Groups',5) ],
    objectives:[
      'Describe the composition of blood: plasma proteins (albumins, globulins, fibrinogen, transferrin) and formed elements (erythrocytes, leukocytes, platelets).',
      'Explain erythropoiesis, the regulation of RBC production by erythropoietin, and the dietary requirements (iron, folic acid, vitamin B12 and intrinsic factor) for normal RBC formation.',
      'Distinguish innate (non-specific, fast, no memory) from acquired (specific, slow, has memory) immunity and identify the cell types and molecules involved in each.',
      'Describe the cellular events of inflammation: vascular changes, leukocyte margination, tethering/rolling, activation, diapedesis and chemotaxis to the site of infection.',
      'Outline the three steps of haemostasis (vasoconstriction → platelet plug → coagulation) and describe the intrinsic and extrinsic pathways of the coagulation cascade.',
      'Explain the ABO and Rh blood-group systems: the nature of the antigens and antibodies, how blood type is determined by agglutination, and the consequences of mismatched transfusions.',
      'Identify causes of anaemia (iron deficiency, pernicious, aplastic, haemolytic, sickle cell) and abnormal haemostasis (thrombocytopenia, haemophilia, thrombosis).',
    ],
    notes:[
      'Hematocrit is the percentage of blood volume occupied by red blood cells (~42% female, ~47% male); plasma (~55%) contains albumins (colloid osmotic pressure, transport), globulins (antibodies, clotting factors), fibrinogen (clotting), and transferrin (iron transport). Serum is plasma with clotting factors removed.',
      'Haemoglobin A (α₂β₂) contains four heme groups, each with Fe²⁺ that reversibly binds one O₂ molecule (oxygenation, not oxidation). CO binds Hb with 200× greater affinity than O₂, making it lethal. Old RBCs are phagocytosed in the spleen; iron is recycled, globin → amino acids, heme → biliverdin → bilirubin (bile).',
      'Erythropoietin (EPO) is released from the kidney when tissue O₂ delivery falls (low blood volume, anaemia, pulmonary disease); EPO stimulates bone marrow to produce more erythrocytes. Pernicious anaemia results from lack of intrinsic factor or vitamin B12; sickle cell anaemia from a single amino acid mutation in β-globin (HbS), causing rigid sickled cells.',
      'Innate immunity: phagocytes (neutrophils, macrophages) use pattern recognition receptors (Toll-like receptors) to recognise pathogens; opsonins (antibodies, complement C3b) coat pathogens and enhance phagocytosis. Cellular events of inflammation: margination → tethering/rolling → activation → firm attachment → diapedesis → chemotaxis (in response to C5a, IL-8, bacterial products) → phagocytosis → oxygen-dependent and oxygen-independent killing.',
      'Acquired immunity is mediated by B cells (humoral: secrete antibodies that opsonise, activate complement, and neutralise toxins) and T cells (cellular: cytotoxic T cells kill virally infected cells; helper T cells release cytokines). Both lymphocyte types undergo clonal expansion and produce long-lived memory cells for faster secondary responses. Complement proteins (OIL) facilitate opsonization, inflammation, and lysis via the MAC (membrane attack complex).',
      'Primary haemostasis: vessel injury exposes collagen → von Willebrand factor bridges platelets to collagen → platelets activate (shape change, release of ADP/TXA₂/serotonin) → platelet aggregation forms the platelet plug. PGI₂ and NO from intact endothelium inhibit platelet aggregation to limit clot to the injury site. Aspirin irreversibly inhibits COX, reducing both TXA₂ (pro-clot) and PGI₂ (anti-clot).',
      'Secondary haemostasis (coagulation): extrinsic pathway (tissue factor + Factor VII) and intrinsic pathway (Factor XII contact activation) converge on Factor Xa. Factor Xa + Va + Ca²⁺ + phospholipid = prothrombinase → converts prothrombin to thrombin. Thrombin converts fibrinogen to fibrin and activates Factors V, VIII, XI, XIII. Natural anticoagulants (antithrombin III, thrombomodulin/Protein C, TFPI) prevent runaway clot formation. Fibrinolysis: tPA → plasminogen → plasmin degrades fibrin.',
      'ABO antigens are carbohydrates on RBC surfaces; ABO genes code for enzymes that add these sugars. Anti-A and anti-B are naturally occurring IgM antibodies present against absent antigens: type O (universal donor) has neither A nor B antigen; type AB (universal recipient) has neither antibody. Rh D antigen is a protein; Rh⁻ individuals develop IgG anti-D only after exposure; maternal Rh⁻ sensitisation can cause haemolytic disease of the newborn in subsequent Rh⁺ pregnancies.',
    ],
  },
  {
    id:'nms', name:'Nerve, Muscle & Synapse', short:'NMS', term:'spring', instructor:'Dr. S. Gosgnach',
    hue:90, progress:1, chapter:'Vander Ch. 6–9',
    blurb:'How signals are generated and transmitted, and how muscle contracts.',
    lectures:[ L('Introduction to the Nervous System & Neuron Structure',4), L('Resting Membrane Potential',4), L('The Action Potential — Generation & Phases',4), L('Conduction, Myelination & Synaptic Transmission',5), L('Chemical Synapses & Synaptic Integration',5), L('Muscle, the NMJ & Excitation–Contraction Coupling',5), L('Cross-bridge Cycling & Muscle Fibre Types',5) ],
    objectives:[
      'Explain how the resting membrane potential (≈−70 mV) is established by the Na⁺/K⁺-ATPase and the differential permeability of K⁺ and Na⁺ leak channels.',
      'Describe the ionic basis of each phase of the action potential (depolarisation, repolarisation, after-hyperpolarisation) and the absolute and relative refractory periods.',
      'Compare electrotonic conduction with saltatory conduction; explain how myelination by Schwann cells (PNS) or oligodendrocytes (CNS) increases conduction velocity.',
      'Distinguish chemical from electrical synapses; trace the sequence of events at an excitatory (glutamate/Na⁺) and inhibitory (GABA–glycine/Cl⁻) synapse; explain temporal and spatial summation at the axon hillock.',
      'Describe the sequence from motor neuron AP → ACh release at the NMJ → end-plate potential → muscle AP and distinguish the NMJ from central chemical synapses.',
      'Outline excitation–contraction coupling: T-tubule propagation → DHP receptor → ryanodine receptor → Ca²⁺ release from sarcoplasmic reticulum.',
      'List the six steps of cross-bridge cycling and explain the roles of Ca²⁺, troponin, tropomyosin, myosin ATPase, actin, and ATP in contraction and relaxation.',
    ],
    notes:[
      'The Na⁺/K⁺-ATPase is electrogenic (3 Na⁺ out / 2 K⁺ in per ATP), creating a net negative charge inside. K⁺ leak channels are 50–100× more numerous than Na⁺ leak channels, so the resting potential (~−70 mV) is much closer to EK⁺ (−90 mV) than ENa⁺ (+55 mV). Intracellular concentrations: K⁺ ≈ 150 mM, Na⁺ ≈ 15 mM; extracellular: Na⁺ ≈ 150 mM, K⁺ ≈ 5 mM.',
      'Action potential phases: (1) rest −70 mV — voltage-gated Na⁺ (Na(V)) and K⁺ (K(V)) channels closed; (2) depolarisation — Na(V) activation gates open, Na⁺»K⁺ permeability, membrane reaches ≈+30 mV; (3) repolarisation — Na(V) inactivates, K(V) opens (K⁺»»Na⁺); (4) after-hyperpolarisation — K(V) still open, membrane overshoots below −70 mV; (5) return to rest — K(V) closes.',
      'Absolute refractory period: Na(V) channels are inactivated; no stimulus can trigger a second AP. Relative refractory period: Na(V) channels have recovered but K(V) channels are still open, requiring a larger-than-normal stimulus. Both refractory periods enforce unidirectional AP propagation.',
      'Myelination insulates the axon between nodes of Ranvier, where voltage-gated Na⁺ channels are concentrated; current jumps node-to-node (saltatory conduction). Myelinated axons: 12–130 m/s; unmyelinated: 0.5–2 m/s. Schwann cells myelinate axons in the PNS; oligodendrocytes myelinate (multiple axons each) in the CNS.',
      'At chemical synapses: AP depolarises terminal → voltage-gated Ca²⁺ channels open → Ca²⁺ influx triggers exocytosis of neurotransmitter vesicles → transmitter diffuses 40 nm across cleft → binds ligand-gated receptors. Glutamate opens Na⁺ channels → EPSP (depolarisation). GABA and glycine open Cl⁻ channels → IPSP (hyperpolarisation). EPSPs and IPSPs summate temporally and spatially at the axon hillock; threshold ≈ −50 mV triggers an AP.',
      'At the NMJ: one motor neuron AP reliably generates one muscle AP (unlike CNS where summation is required). ACh released from the motor terminal binds nicotinic receptors on the motor end plate → Na⁺ influx → end-plate potential → muscle AP propagates along sarcolemma and down T-tubules. Acetylcholinesterase in the cleft rapidly degrades ACh, terminating the signal. Each skeletal muscle fibre is innervated by only one motor axon. The motor unit is the smallest functional unit of the motor system.',
      'Excitation–contraction coupling (skeletal muscle): AP propagates down T-tubule → DHP receptor (voltage sensor) physically opens the ryanodine receptor (Ca²⁺ channel) in the lateral sac of the SR → Ca²⁺ floods cytosol. Six-step cross-bridge cycle: (1) Ca²⁺ binds troponin → tropomyosin shifts, actin binding sites exposed; (2) energised myosin head (with ADP+Pi) attaches to actin; (3) power stroke — myosin swivels, thin filament pulled toward sarcomere centre, ADP+Pi released; (4) ATP binds myosin → cross-bridge detaches from actin; (5) ATP hydrolysed → myosin head returns to high-energy cocked position; (6) Ca²⁺ pumped back into SR by Ca²⁺-ATPase → tropomyosin re-covers binding sites → relaxation.',
      'ATP plays three roles in muscle: (1) energises the power stroke via hydrolysis; (2) detaches the myosin cross-bridge from actin; (3) powers the SR Ca²⁺ pump for relaxation. Slow-twitch (red, type I) fibres: small diameter, many mitochondria, high myoglobin, fatigue-resistant; suited for endurance. Fast-twitch glycolytic (white, type IIb) fibres: large diameter, few mitochondria, high glycogen, rapid but fatigue quickly; suited for power/speed.',
    ],
  },
  {
    id:'cns', name:'Central Nervous System', short:'CNS', term:'spring', instructor:'Dr. A. Prochazka',
    hue:155, progress:1, chapter:'Vander Ch. 8',
    blurb:'Organisation of the brain and spinal cord and higher functions.',
    lectures:[ L('Organisation of brain & cord',4), L('Spinal tracts',2), L('Higher-order processing',3), L('Memory, emotion & motivation',6), L('Sleep & consciousness',7) ],
    objectives:[
      'Describe the organisation of the brain and spinal cord.',
      'Identify the major ascending and descending spinal tracts.',
      'Relate brain regions to memory, emotion and consciousness.',
      'Explain the states of sleep and wakefulness.',
    ],
    notes:[
      'Grey matter contains neuronal cell bodies; white matter contains myelinated tracts.',
      'The dorsal columns carry fine touch and proprioception; the spinothalamic tract carries pain and temperature.',
      'The corticospinal tract is the main descending pathway for voluntary movement.',
      'The hippocampus is essential for forming new declarative memories; the amygdala processes emotion.',
      'Sleep alternates between NREM and REM; the reticular activating system governs arousal.',
    ],
  },
  {
    id:'ans', name:'Autonomic Nervous System', short:'ANS', term:'spring', instructor:'Dr. S. Barton',
    hue:198, progress:0.4, chapter:'Vander Ch. 6', current:true,
    blurb:'Structure and function of the sympathetic and parasympathetic divisions.',
    lectures:[ L('Sympathetic & parasympathetic anatomy',5), L('Neurotransmitters & organ effects',5) ],
    objectives:[
      'Contrast the anatomy of the sympathetic and parasympathetic divisions.',
      'Identify the neurotransmitters and receptors of the ANS.',
      'Describe the fight-or-flight versus rest-and-digest responses.',
      'Explain the role of the adrenal medulla.',
    ],
    notes:[
      'Sympathetic fibres leave the thoracolumbar cord with short pre- and long postganglionic neurons; parasympathetic is craniosacral with the reverse.',
      'All preganglionic neurons release ACh onto nicotinic receptors.',
      'Postganglionic sympathetic neurons release noradrenaline (onto adrenergic receptors); parasympathetic release ACh onto muscarinic receptors.',
      'The adrenal medulla is a modified sympathetic ganglion that secretes adrenaline into the blood.',
      'Sympathetic activation raises heart rate and dilates pupils and bronchioles; parasympathetic does the opposite and promotes digestion.',
    ],
  },
  {
    id:'ss', name:'Special Senses', short:'Senses', term:'spring', instructor:'Dr. S. Gosgnach',
    hue:235, progress:0, chapter:'Vander Ch. 7',
    blurb:'Physiology of sensory systems, focusing on vision and hearing.',
    lectures:[ L('Somatosensation & receptors',3), L('Vision & phototransduction',4), L('Hearing & the cochlea',4) ],
    objectives:[
      'Describe sensory receptors, receptor potentials and adaptation.',
      'Explain phototransduction and the visual pathway.',
      'Outline the physiology of hearing.',
    ],
    notes:[
      'Receptor potentials are graded; stimulus intensity is coded by firing frequency and the number of receptors activated.',
      'Phototransduction: light → retinal isomerises → rhodopsin activated → reduced glutamate release (photoreceptors hyperpolarise to light).',
      'Rods serve dim-light/peripheral vision; cones serve colour and high acuity.',
      'In the cochlea, the basilar membrane performs tonotopic frequency analysis — high frequencies at the base, low at the apex.',
      'Hair cells convert mechanical deflection of stereocilia into receptor potentials.',
    ],
  },
  {
    id:'cardio', name:'Cardiovascular Physiology', short:'Cardio', term:'spring', instructor:'Dr. K. Smith',
    hue:12, progress:0, chapter:'Vander Ch. 12',
    blurb:'The heart, conduction system, cardiac cycle and blood-pressure regulation.',
    lectures:[ L('Hemodynamics',5), L('The cardiac cycle & Wiggers',4), L('Cardiac action potentials',4), L('Conduction system & ECG',4), L('Heart valves & sounds',3), L('Blood-pressure regulation',4), L('Vessels & capillary exchange',4) ],
    objectives:[
      'Describe the events and pressure/volume changes of the cardiac cycle.',
      'Compare fast- and slow-type cardiac action potentials.',
      'Explain regulation of mean arterial pressure by baroreceptors.',
      'Describe capillary exchange and the function of each vessel type.',
    ],
    notes:[
      'Cardiac output = heart rate × stroke volume; stroke volume depends on preload, afterload and contractility.',
      'SA-node (slow-type) action potentials depend on funny (If) and Ca²⁺ currents and set the pace; ventricular (fast-type) APs have a Na⁺ upstroke and a Ca²⁺ plateau.',
      'The Wiggers diagram links ECG, pressures, ventricular volume and heart sounds in one cardiac cycle.',
      'Mean arterial pressure ≈ diastolic + ⅓ pulse pressure; baroreceptors in the carotid sinus and aortic arch buffer it via the ANS.',
      'Capillary exchange is governed by Starling forces — the balance of hydrostatic and oncotic pressures.',
    ],
  },
  {
    id:'gi', name:'Gastrointestinal Physiology', short:'GI', term:'summer', instructor:'Dr. E. Leslie',
    hue:70, progress:0, chapter:'Vander Ch. 15',
    blurb:'Digestion, absorption, secretion, motility and their regulation.',
    lectures:[ L('GI organisation & motility',5), L('Mouth, saliva & swallowing',6), L('Stomach & gastric secretion',5), L('Pancreas, liver & bile',6), L('Small-intestine digestion & absorption',5), L('Large intestine & water balance',4), L('Regulation of GI activity',4) ],
    objectives:[
      'Describe the layers of the GI tract and their functions.',
      'Explain digestion and absorption of carbohydrate, protein and fat.',
      'Outline motility — peristalsis and segmentation.',
      'Describe the regulation of GI secretion and motility.',
    ],
    notes:[
      'The GI wall has four layers: mucosa, submucosa, muscularis externa and serosa.',
      'Carbohydrates are absorbed as monosaccharides, proteins as amino acids/di-tripeptides, and fats as micelles forming chylomicrons.',
      'Peristalsis propels contents forward; segmentation mixes them for digestion and absorption.',
      'Gastric parietal cells secrete HCl and intrinsic factor; chief cells secrete pepsinogen.',
      'GI activity is regulated by the enteric nervous system, the ANS and hormones (gastrin, secretin, CCK).',
    ],
  },
  {
    id:'resp', name:'Respiratory Physiology', short:'Resp', term:'summer', instructor:'Dr. S. Pagliardini',
    hue:215, progress:0, chapter:'Vander Ch. 13',
    blurb:'Lungs and airways, ventilation, gas exchange and its control.',
    lectures:[ L('Functional anatomy & zones',7), L('Mechanics & pressures',5), L('Surfactant & compliance',4), L('Lung volumes & spirometry',4), L('Gas exchange & V/Q',5), L('O₂ & CO₂ transport',4), L('Control of breathing',2) ],
    objectives:[
      'Describe the muscles and pressures involved in ventilation.',
      'Explain the role of surfactant and surface tension.',
      'Interpret lung volumes, capacities and spirometry.',
      'Describe gas exchange, the O₂ dissociation curve and ventilation–perfusion matching.',
    ],
    notes:[
      'Inspiration is active (diaphragm + external intercostals); quiet expiration is passive elastic recoil.',
      'Surfactant from type II pneumocytes lowers surface tension, increases compliance and prevents alveolar collapse.',
      'The O₂–haemoglobin dissociation curve is sigmoidal; it shifts right with ↑CO₂, ↑H⁺, ↑temperature and ↑2,3-BPG (Bohr effect).',
      'Most CO₂ is carried as bicarbonate; the lungs match ventilation to perfusion (V/Q ≈ 0.8) for efficient exchange.',
      'Central chemoreceptors respond to CO₂/H⁺ in CSF; peripheral chemoreceptors respond mainly to low arterial O₂.',
    ],
  },
  {
    id:'renal', name:'Renal Physiology', short:'Renal', term:'summer', instructor:'Dr. S. Das',
    hue:278, progress:0, chapter:'Vander Ch. 14',
    blurb:'Structure and function of the kidneys and the urinary system.',
    lectures:[ L('The nephron',4), L('Glomerular filtration',4), L('Tubular reabsorption & secretion',6), L('Salt & water balance',4), L('Medullary gradient & concentration',4), L('K⁺ & acid–base balance',4), L('Glucose handling & diabetes',4) ],
    objectives:[
      'Describe the nephron and the three basic renal processes.',
      'Explain regulation of salt and water balance by ADH and aldosterone.',
      'Describe the medullary osmotic gradient and urine concentration.',
      'Outline renal handling of glucose and acid–base balance.',
    ],
    notes:[
      'The three basic processes are glomerular filtration, tubular reabsorption and tubular secretion.',
      'GFR is the volume filtered per minute (~125 mL/min) and is tightly autoregulated.',
      'ADH increases water reabsorption by inserting aquaporins in the collecting duct; aldosterone increases Na⁺ reabsorption (and K⁺ secretion).',
      'The countercurrent multiplier in the loop of Henle builds the medullary osmotic gradient needed to concentrate urine.',
      'Glucose is normally fully reabsorbed; glucosuria appears once the transport maximum (Tm) is exceeded, as in diabetes mellitus.',
    ],
  },
  {
    id:'endo', name:'Endocrine Physiology', short:'Endo', term:'summer', instructor:'Dr. S. Harvey',
    hue:330, progress:0, chapter:'Vander Ch. 11',
    blurb:'Hormones and endocrine organs, their actions and disorders.',
    lectures:[ L('Hormone classes & action',7), L('Hypothalamus & pituitary',5), L('Thyroid gland',4), L('Adrenal gland & stress',4), L('Pancreas & glucose',5), L('Calcium & phosphate',6), L('Endocrine disorders',4) ],
    objectives:[
      'Classify hormones and describe their mechanisms of action.',
      'Describe the hypothalamic–pituitary axis and its target hormones.',
      'Explain the endocrine control of calcium and phosphate.',
      'Relate hormone excess or deficiency to disease.',
    ],
    notes:[
      'Peptide/amine hormones bind surface receptors and act through second messengers; steroid/thyroid hormones cross the membrane to nuclear receptors.',
      'The anterior pituitary secretes GH, TSH, ACTH, PRL, FSH and LH under hypothalamic releasing hormones; the posterior pituitary stores ADH and oxytocin.',
      'Negative feedback dominates endocrine regulation (e.g. thyroid hormone inhibits TSH and TRH).',
      'PTH raises blood Ca²⁺ (bone, kidney, vitamin-D activation); calcitonin lowers it.',
      'Insulin lowers blood glucose (uptake/storage); glucagon raises it — deficiency or resistance causes diabetes mellitus.',
    ],
  },
  {
    id:'repro', name:'Reproductive Physiology', short:'Repro', term:'summer', instructor:'Dr. K. Smith',
    hue:305, progress:0, chapter:'Vander Ch. 17',
    blurb:'Male and female reproductive systems and sex determination.',
    lectures:[ L('Sex determination & differentiation',3), L('Male reproduction & spermatogenesis',4), L('Female cycle & menstruation',3), L('Control of ovarian function',4), L('Pregnancy & fertilisation',3), L('Parturition & lactation',4), L('Puberty & menopause',4) ],
    objectives:[
      'Explain sex determination and differentiation.',
      'Describe spermatogenesis and its hormonal control.',
      'Outline the menstrual cycle and control of ovarian function.',
      'Describe fertilisation, pregnancy and lactation.',
    ],
    notes:[
      'The SRY gene on the Y chromosome drives testis development; without it the gonad becomes an ovary.',
      'FSH and LH from the pituitary drive gametogenesis and sex-steroid production in both sexes.',
      'The menstrual cycle has follicular and luteal phases; the LH surge triggers ovulation around day 14.',
      'After fertilisation, hCG from the embryo maintains the corpus luteum and its progesterone output.',
      'Oxytocin drives uterine contractions in labour and milk ejection; prolactin drives milk production.',
    ],
  },
];

const MOD_BY_ID = Object.fromEntries(MODULES.map(m => [m.id, m]));

Object.assign(window, { MODULES, MOD_BY_ID, modColor });
