[step:Reduce integral solutions to congruence solutions]
Fix an integer $m \geq 2$, and let
\begin{align*}
\pi_m: \mathbb{Z} &\to \mathbb{Z}/m\mathbb{Z}
\end{align*}
be the quotient map. Since $Q$ has integer coefficients, applying $\pi_m$ coefficientwise gives a homogeneous quadratic form
\begin{align*}
Q_m: (\mathbb{Z}/m\mathbb{Z})^3 &\to \mathbb{Z}/m\mathbb{Z}.
\end{align*}
If $(x,y,z) \in \mathbb{Z}^3$ satisfies $Q(x,y,z)=0$, then
\begin{align*}
Q_m(\pi_m(x),\pi_m(y),\pi_m(z))
= \pi_m(Q(x,y,z))
= \pi_m(0)
=0.
\end{align*}
Here an admissible residue solution means a residue triple satisfying every extra condition imposed on the integral solutions and preserved by reduction modulo $m$; for example, if one is searching for a nonzero primitive integral solution, then admissibility means that the reduced triple is not excluded by the corresponding reduced nonzero or primitivity condition. Thus failure of the congruence $Q_m(X,Y,Z)=0$ to have an admissible residue solution rules out an integral solution of $Q(x,y,z)=0$ with those same admissibility conditions.
Similarly, for the equation $x^2-Dy^2=N$, define
\begin{align*}
F: \mathbb{Z}^2 &\to \mathbb{Z} \\
(x,y) &\mapsto x^2-Dy^2-N.
\end{align*}
If $(x,y) \in \mathbb{Z}^2$ satisfies $F(x,y)=0$, then
\begin{align*}
\pi_m(x)^2-\pi_m(D)\pi_m(y)^2-\pi_m(N)=0
\end{align*}
in $\mathbb{Z}/m\mathbb{Z}$. Therefore every integral solution gives a solution modulo $m$. Taking $m$ to be small primes or $8$ is a finite necessary test.
[/step]