S = (c³/16πG) ∫ R √(-g) d⁴x + S_matter; variation gives G_μν = (8πG/c⁴) T_μν; cosmological constant via λg_μν term.