This paper combines several new constructions in mathematics and physics.
Mathematically, we study framed flat PGL(K,C)-connections on a large class of 3-manifolds M
with boundary. We define a space L_K(M) of framed flat connections on the boundary of M
that extend to M. Our goal is to understand an open part of L_K(M) as a Lagrangian in the
symplectic space of framed flat connections on the boundary, and as a K_2-Lagrangian,
meaning that the K_2-avatar of the symplectic form restricts to zero. We construct an open
part of L_K(M) from data assigned to a hypersimplicial K-decomposition of an ideal
triangulation of M, generalizing Thurston's gluing equations in 3d hyperbolic geometry, and
combining them with the cluster coordinates for framed flat PGL(K)-connections on surfaces.
Using a canonical map from the complex of configurations of decorated flags to the Bloch
complex, we prove that any generic component of L_K(M) is K_2-isotropic if the boundary
satisfies some topological constraints (Theorem 4.2). In some cases this implies that
L_K(M) is K_2-Lagrangian. For general M, we extend a classic result of Neumann-Zagier on
symplectic properties of PGL(2) gluing equations to reduce the K_2-Lagrangian property to a
combinatorial claim. Physically, we use the symplectic properties of K-decompositions to
construct 3d N=2 superconformal field theories T_K[M] corresponding (conjecturally) to the
compactification of K M5-branes on M. This extends known constructions for K=2. Just as for
K=2, the theories T_K[M] are described as IR fixed points of abelian Chern-Simons-matter
theories. Changes of triangulation (2-3 moves) lead to abelian mirror symmetries that are
all generated by the elementary duality between N_f=1 SQED and the XYZ model. In the large
K limit, we find evidence that the degrees of freedom of T_K[M] grow cubically in K.