A compound of Formula (I): or a pharmaceutically acceptable salt thereof, wherein: Ring A is cycloalkyl, heterocyclyl, aryl, or heteroaryl; Ring B is indolyl or pyrrolopyridinyl; or benzimidazolyl; X is C(R')(R"), O, or S(O) x ; L 1 is -NHCH 2 -; L 2 is -C(O)NR A - or -NR A C(O)-; each R 1 is independently C 1 -C 6 alkyl, halo, azido, cyclopropyl, 2-propynyloxy, cyano, -C(O)R D , or -OR B ; each R 3 is independently C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 1 -C 6 haloalkyl, halo, cyano, nitro, azido, cycloalkyl, heterocyclyl, aryl, heteroaryl, -OR B , - C(O)R D , -C(O)OR B , -NR A R C ,-NR A C(O)R D , -S(O) x R E , -OS(O) x R E , -C(O)NR A S(O) x R E , - NR A S(O) x R E , or -S(O) x NR A , each of which is optionally substituted with 1-5 R 5 ; or each R 2 is independently C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 1 -C 6 haloalkyl, halo, cyano, or nitro; each of R' and R" is independently H, C 1 -C 6 alkyl, or C 1 -C 6 heteroalkyl; each R 5 is independently C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 1 -C 6 haloalkyl, halo, cyano, or oxo; or two R 5 , taken together with the atoms to which they are attached, form a ring (e.g., a 3-7 membered ring), optionally substituted with 1-5 R 6 ; each R A , R B , R C , R D , or R E is independently H, C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 1 -C 6 haloalkyl, cycloalkyl, heterocyclyl, aryl, or heteroaryl, each of which is optionally substituted with 1-4 R 6 ; or R A and R C , together with the atoms to which each is attached, form a heterocyclyl ring optionally substituted with 1-4 R 8 ; each R 6 is independently C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 2 -C 6 heteroalkenyl, C 2 -C 6 heteroalkynyl, C 1 -C 6 haloalkyl, cycloalkyl, heterocyclyl, aryl, heteroaryl, halo, cyano, or nitro; each of n, o, and p is independently 0, 1, 2, 3, 4, 5, or 6; and x is 0, 1, or 2; Ring A is cycloalkyl, heterocyclyl, aryl, or heteroaryl; Ring B is indolyl or pyrrolopyridinyl; or benzimidazolyl; X is C(R')(R"), O, or S(O) x ; L 1 is -NHCH 2 -; L 2 is -C(O)NR A - or -NR A C(O)-; each R 1 is independently C 1 -C 6 alkyl, halo, azido, cyclopropyl, 2-propynyloxy, cyano, -C(O)R D , or -OR B ; each R 3 is independently C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 1 -C 6 haloalkyl, halo, cyano, nitro, azido, cycloalkyl, heterocyclyl, aryl, heteroaryl, -OR B , - C(O)R D , -C(O)OR B , -NR A R C ,-NR A C(O)R D , -S(O) x R E , -OS(O) x R E , -C(O)NR A S(O) x R E , - NR A S(O) x R E , or -S(O) x NR A , each of which is optionally substituted with 1-5 R 5 ; or each R 2 is independently C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 1 -C 6 haloalkyl, halo, cyano, or nitro; each of R' and R" is independently H, C 1 -C 6 alkyl, or C 1 -C 6 heteroalkyl; each R 5 is independently C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 1 -C 6 haloalkyl, halo, cyano, or oxo; or two R 5 , taken together with the atoms to which they are attached, form a ring (e.g., a 3-7 membered ring), optionally substituted with 1-5 R 6 ; each R A , R B , R C , R D , or R E is independently H, C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 1 -C 6 haloalkyl, cycloalkyl, heterocyclyl, aryl, or heteroaryl, each of which is optionally substituted with 1-4 R 6 ; or R A and R C , together with the atoms to which each is attached, form a heterocyclyl ring optionally substituted with 1-4 R 8 ; each R 6 is independently C 1 -C 6 alkyl, C 2 -C 6 alkenyl, C 2 -C 6 alkynyl, C 1 -C 6 heteroalkyl, C 2 -C 6 heteroalkenyl, C 2 -C 6 heteroalkynyl, C 1 -C 6 haloalkyl, cycloalkyl, heterocyclyl, aryl, heteroaryl, halo, cyano, or nitro; each of n, o, and p is independently 0, 1, 2, 3, 4, 5, or 6; and x is 0, 1, or 2; <EOS>