  We introduce two new tools for studying CAT(0) spaces: \emph{curtains},
versions of cubical hyperplanes; and the \emph{curtain model}, a counterpart of
the curve graph. These tools shed new light on CAT(0) spaces, allowing us to
prove a dichotomy of a rank-rigidity flavour, establish Ivanov-style rigidity
theorems for isometries of the curtain model, find isometry-invariant copies of
its Gromov boundary in the visual boundary of the underlying CAT(0) space, and
characterise rank-one isometries both in terms of their action on the curtain
model and in terms of curtains. Finally, we show that the curtain model is
universal for WPD actions over all groups acting properly on the CAT(0) space.
