[proofplan]
We prove that every complete block of $q$ consecutive integers contributes zero to the character sum. The key algebraic input is that a nonprincipal character has some reduced residue class $a$ with $\chi(a) \neq 1$, while multiplication by $a$ permutes the reduced residue classes modulo $q$. After decomposing the integers $1 \leq n \leq x$ into complete blocks of length $q$ and one final incomplete block, only the incomplete block remains, and its contribution is bounded by its length.
[/proofplan]
[step:Show that the sum over one complete residue system modulo $q$ vanishes]
Define the complete residue sum $A \in \mathbb{C}$ by
\begin{align*}
A := \sum_{r=1}^{q} \chi(r).
\end{align*}
Since $\chi$ is nonprincipal, there exists an integer $a \in \mathbb{Z}$ such that $\gcd(a,q)=1$ and $\chi(a) \neq 1$. Multiplication by $a$ induces a bijection of the residue classes modulo $q$, hence periodicity of $\chi$ gives
\begin{align*}
A
&= \sum_{r=1}^{q} \chi(ar).
\end{align*}
Using complete multiplicativity of the Dirichlet character,
\begin{align*}
A
&= \sum_{r=1}^{q} \chi(a)\chi(r)
= \chi(a) \sum_{r=1}^{q} \chi(r)
= \chi(a)A.
\end{align*}
Therefore $(1-\chi(a))A=0$. Since $\chi(a)\neq 1$, it follows that $A=0$.
[guided]
We first isolate the cancellation that happens in one full period. Define
\begin{align*}
A := \sum_{r=1}^{q} \chi(r).
\end{align*}
Because $\chi$ is nonprincipal, it cannot agree with the principal character on every residue class. Since a Dirichlet character is already $0$ on integers not coprime to $q$, nonprincipality means that there is some integer $a \in \mathbb{Z}$ with $\gcd(a,q)=1$ and $\chi(a)\neq 1$.
Now multiplication by $a$ is invertible modulo $q$, because $\gcd(a,q)=1$. Hence the map on residue classes modulo $q$ given by
\begin{align*}
r \pmod q \mapsto ar \pmod q
\end{align*}
is a bijection. Since $\chi$ is periodic modulo $q$, replacing the complete list of residues $1,\dots,q$ by the complete list $a,2a,\dots,qa$ modulo $q$ does not change the sum:
\begin{align*}
A
&= \sum_{r=1}^{q} \chi(ar).
\end{align*}
By complete multiplicativity of $\chi$,
\begin{align*}
\sum_{r=1}^{q} \chi(ar)
&= \sum_{r=1}^{q} \chi(a)\chi(r)
= \chi(a)\sum_{r=1}^{q}\chi(r)
= \chi(a)A.
\end{align*}
Thus $A=\chi(a)A$, so
\begin{align*}
(1-\chi(a))A=0.
\end{align*}
The coefficient $1-\chi(a)$ is nonzero by the choice of $a$, and therefore $A=0$.
[/guided]
[/step]
[step:Decompose the partial sum into complete blocks and one remainder]
Let $x \geq 1$ be fixed, and define $N := \lfloor x \rfloor \in \mathbb{N}$. Choose integers $M \geq 0$ and $R \in \{0,1,\dots,q-1\}$ by Euclidean division:
\begin{align*}
N = Mq + R.
\end{align*}
Then
\begin{align*}
\sum_{1 \leq n \leq x}\chi(n)
&= \sum_{n=1}^{N}\chi(n) \\
&= \sum_{m=0}^{M-1}\sum_{r=1}^{q}\chi(mq+r)
+ \sum_{r=1}^{R}\chi(Mq+r).
\end{align*}
For each $m \in \{0,\dots,M-1\}$, periodicity modulo $q$ gives $\chi(mq+r)=\chi(r)$ for every $r \in \{1,\dots,q\}$, so each complete block has sum $A=0$. Hence
\begin{align*}
\sum_{1 \leq n \leq x}\chi(n)
= \sum_{r=1}^{R}\chi(Mq+r).
\end{align*}
[/step]
[step:Bound the remaining incomplete block uniformly in $x$]
For every integer $n$, the Dirichlet character value satisfies $|\chi(n)| \leq 1$. Therefore
\begin{align*}
\left|\sum_{1 \leq n \leq x}\chi(n)\right|
&= \left|\sum_{r=1}^{R}\chi(Mq+r)\right| \\
&\leq \sum_{r=1}^{R}|\chi(Mq+r)| \\
&\leq R \\
&\leq q-1.
\end{align*}
Thus the theorem holds with
\begin{align*}
C_q := q.
\end{align*}
This constant depends only on $q$ and satisfies the required bound for every $x \geq 1$.
[/step]