Let $d>1$ be square-free, and $K=\mathbf Q(\sqrt{-d})$. Choose an embedding of $K$ in $\mathbf C$, and let $E = \mathbf C/\mathcal O_K$. It is known that $E$ admits a model over the Hilbert class field $H$ of $K$. Let it be given such a model. Let $I \subseteq \mathcal O_{H}$ be the bad reduction locus of $E$ (i.e. the product of the primes of $H$ where $E$ has bad reduction). Let $(n) = N_{H/\mathbf Q}(I)$. (Note: I am just as happy if you take $(n) = I \cap \mathbf Q$ instead.)
What is known about $n$, as a function of $d$?
Can one say what its prime factors are, or at least narrow down the possibilities? Or, if that is too hopeful:
Can one give an upper bound on $n$ in terms of $d$? (Perhaps by cleverly estimating the growth of $j(\tau)$ along vertical half-lines?) Can one give an upper bound on the largest prime factor of $n$?
The following question is the one I am most interested in: for a given prime $p$, is it true that $p$ divides almost all numbers $n(d)$? In other words, do almost all CM curves have bad reduction at some prime above $p$? (One might expect small primes to divide the numbers $n(d)$ very frequently, and since every prime is small...)
I searched the literature for something that might help, but I didn't find anything very explicit. Thank you in advance for anything that might help.