  We parametrise the gauge-invariant ideals of the Toeplitz-Nica-Pimsner
algebra of a strong compactly aligned product system over $\mathbb{Z}_+^d$ by
using $2^d$-tuples of ideals of the coefficient algebra that are invariant,
partially ordered, and maximal. We give an algebraic characterisation of
maximality that allows the iteration of a $2^d$-tuple to the maximal one
inducing the same gauge-invariant ideal. The parametrisation respects
inclusions and intersections, while we characterise the join operation on the
$2^d$-tuples that renders the parametrisation a lattice isomorphism.
  The problem of the parametrisation of the gauge-invariant ideals is
equivalent to the study of relative Cuntz-Nica-Pimsner algebras, for which we
provide a generalised Gauge-Invariant Uniqueness Theorem. We focus further on
equivariant quotients of the Cuntz-Nica-Pimsner algebra and provide
applications to regular product systems, C*-dynamical systems, strong finitely
aligned higher-rank graphs, and product systems on finite frames. In
particular, we provide a description of the parametrisation for (possibly
non-automorphic) C*-dynamical systems and row-finite higher-rank graphs, which
squares with known results when restricting to crossed products and to locally
convex row-finite higher-rank graphs.
