\appendix \section{Proof of Proposition~\ref{prop:psi}}\label{app:psi} Throughout, $\chi$ is primitive modulo $q > 1$, $t \ge 16$ and $3 \le h \le t$. We use the Brun--Titchmarsh inequality of Yamada \cite[Theorem 2]{Yamada}, which sharpens Montgomery--Vaughan \cite{MV}: for $x > 0$ and $y > 1$, $\pi(x + y) - \pi(x) < 2y/(\log y + 0.8601)$. We apply it only with the integer length $H = \lceil h \rceil$: $\pi(t + h) - \pi(t) \le \pi(t + H) - \pi(t) < 2H/(\log H + 0.8601) \le 2(h + 1)/(\log h + 0.8601) \le 2h/\log h$, the last step because $\log h \le 0.8601 h$. We also use the zero count of \cite[Corollary 1.2]{BMOR21}: for $\chi$ of conductor $q > 1$ and $T \ge 5/7$, the number $N(T, \chi)$ of zeros $\rho = \beta + i\gamma$ with $0 < \beta < 1$ and $|\gamma| \le T$ satisfies $|N(T, \chi) - \frac{T}{\pi}\log\frac{qT}{2\pi e}| \le 0.298 \log(qT) + 4.358$. Put $a = 0.298$, $b = 4.358$, $N^+(u) := \frac{u}{\pi}\log\frac{qu}{2\pi e} + a\log(qu) + b$. \emph{The weight.} Let $r_t(u) = 1$ on $[0, t]$, $(t + h - u)/h$ on $[t, t + h]$, $0$ for $u \ge t + h$, let $r_1$ be the same with $(t, h) = (1, 1)$, and $w = r_t - r_1$. Then $w$ is continuous, supported on $[1, t + h]$, and since $\Lambda(1) = 0$ and $r_1(n) = 0$ for $n \ge 2$, $\psi_w := \sum_n \Lambda(n)\chi(n) w(n) = \sum_n \Lambda(n)\chi(n) r_t(n)$. Hence $|\psi(t, \chi) - \psi_w| \le \sum_{t < n < t+h} \Lambda(n)$. By Brun--Titchmarsh the primes contribute at most $\log(t + h) \cdot 2h/\log h$; for $k \ge 2$ there are at most $(t + h)^{1/k} - t^{1/k} + 1 \le h/(k\sqrt t) + 1$ prime powers $p^k$ in $(t, t + h]$, each weighted $\log p \le \log(t + h)/k$, so they contribute at most $\log(t + h)(0.65 h/\sqrt t + \log\log_2(t + h) + 1)$. \emph{The transform.} $W(s) := \int_0^\infty w(u) u^{s-1}\,du = W_t(s) - W_1(s)$ with $W_t(s) = \frac{(t+h)^{s+1} - t^{s+1}}{h s (s+1)} = \frac{1}{hs}\int_t^{t+h} u^s\,du$ and $W_1(s) = \frac{2^{s+1} - 1}{s(s+1)}$. Both have a simple pole at $s = 0$ with residue $1$, so $W$ is entire, $W(s) = O(|s|^{-2})$ in vertical strips, and $|W(s)| \le 2/|s|^2$ on $\operatorname{Re} s = -U$ for every half-odd $U \ge 7/2$. \emph{The explicit formula.} By Mellin inversion (absolutely convergent on $\operatorname{Re} s = 2$), \[ \psi_w = \frac{1}{2\pi i}\int_{(2)} \Bigl(-\frac{L'}{L}(s, \chi)\Bigr) W(s)\,ds . \] Shift the contour to $\operatorname{Re} s = -U$ along horizontal segments at heights $\pm T_k \to \infty$ chosen with $\bigl||\gamma| - T_k\bigr| \gg 1/\log(qT_k)$ for all zeros; there $|L'/L(s, \chi)| \ll \log^2(qT_k)$ for $-1 \le \sigma \le 2$ and $\ll \log(q|s|)$ for $\sigma \le -1$, while on $\operatorname{Re} s = -U$, $|L'/L| \ll \log(q(U + |\tau|))$ \cite[Chapters 17 and 19]{Davenport}. Only the existence of such heights and these growth rates are used, so no constant is lost. As $\chi$ is nonprincipal there is no pole at $s = 1$, and $\psi_w = -\sum_\rho W(\rho)$ over all zeros of $L(s, \chi)$, trivial and nontrivial, with multiplicity, the sum converging absolutely. \emph{Nontrivial zeros.} By the hypothesis and the functional equation, $1/8 \le \beta \le 7/8$, so $|\rho| \ge 1/8$ and $|\rho + 1| \ge |\rho|$. From the two forms of $W_t$, $|W_t(\rho)| \le (t+h)^{\beta}\min\bigl(1/|\rho|,\ 2T'/(|\rho||\rho+1|)\bigr)$, so $\sum_\rho |W_t(\rho)| \le (t + h)^{7/8} Z_1(q, T')$ with $Z_1(q, T') := \sum_\rho \min(1/|\rho|, 2T'/(|\rho||\rho+1|))$. Also $|W_1(\rho)| \le (2^{\beta+1} + 1)/(|\rho||\rho+1|) \le 4.67/(|\rho||\rho+1|)$, and we put $Z_2(q) := \sum_\rho 1/(|\rho||\rho+1|)$. Split the zeros with $|\gamma| \le T'$ into $|\gamma| \le 1$ (each term $\le 8$, at most $N(1) \le N^+(1)$ of them) and $1 < |\gamma| \le T'$ (each term $\le 1/|\gamma|$); for $|\gamma| > T'$ use $2T'/\gamma^2$. Stieltjes integration by parts against $N(u) \le N^+(u)$ ($u \ge 5/7$), dropping a nonpositive boundary term, gives \[ Z_1(q, T') \le 7N^+(1) + \int_1^{T'} \frac{N^+(u)}{u^2}\,du + 4T'\int_{T'}^\infty \frac{N^+(u)}{u^3}\,du, \] and evaluating the integrals gives the bound for $Z_1$ in Proposition~\ref{prop:psi}. Similarly $Z_2(q) \le \frac{64}{9}N(1) + \sum_{|\gamma| > 1}\gamma^{-2} \le (\frac{64}{9} - 1)N^+(1) + 2\int_1^\infty N^+(u)u^{-3}\,du$, which gives the bound for $Z_2$ (as $55/9 < 6.12$). \emph{Trivial zeros.} They are at $0, -2, -4, \dots$ for even $\chi$ and at $-1, -3, \dots$ for odd $\chi$. One has $|W(0)| \le \log(t + h) + 1$, $|W(-1)| \le 1/t + \log 2 \le 1$, and $|W(-k)| \le t^{-k}/k + 1/(k(k-1))$ for $k \ge 2$, summing to at most $1.01$; in all, at most $\log(t + h) + 3.1$. Collecting the terms gives $|\psi(t, \chi)| \le E(t, h, q)$; the term $h/2 + 3/2$ in $E$ (which comes from the principal character in the general statement) is not needed here and is kept only as a harmless upper bound. \qed