Solution (source code)

= Solution

For a <nonprincipal Dirichlet character>, complete periods sum to zero, so its partial sums are bounded by $q$. <Partial summation> at $X=q(1+t)$ yields
$$
L(1-it,\overline\chi)=\sum_{n\le X}\frac{\overline\chi(n)}{n^{1-it}}+O\left(\frac{q(1+t)}X\right).
$$
The head is bounded by $1+\log X$, hence $|L(1-it,\overline\chi)|\ll\log(q+t)$. The completed <functional equation> gives
$$
|L(it,\chi)|=\left(\frac q\pi\right)^{1/2}
\left|\frac{\Gamma((1-it)/2)}{\Gamma(it/2)}\right|,|L(1-it,\overline\chi)|.
$$
The stated gamma bounds make the ratio $O(t^{1/2})$: their exponential factors cancel, and their powers differ by $1/2$. Apply them directly for $t\ge4$; the compact interval $2\le t\le4$ is absorbed into the constant. Therefore
$$
\boxed{|L(it,\chi)|\ll\sqrt{qt}\,\log(q+t).}
$$
For the conductor-one principal case, Euler summation for zeta at $1-it$, truncated at $X=t^2$, gives a harmonic-size head, a <pole> term of size $1/t$, and remainder $O((1+t)/X)$. It gives the same $O(\log t)$ bound before applying the zeta <functional equation>.