Circles $C_1$, $C_2$, and $C_3$ have their centers at $(0,0)$, $(12,0)$, and $(24,0)$, and have radii $1$, $2$, and $4$, respectively. Line $l_1$ is a common internal tangent to $C_1$ and $C_2$ and has a positive slope, and line $l_2$ is a common internal tangent to $C_2$ and $C_3$ and has a negative slope. Given that lines $l_1$ and $l_2$ intersect at $(x,y)$, and that $x=p-q\sqrt{r}$, where $p$, $q$, and $r$ are positive integers and $r$ is not divisible by the square of any prime, find $p+q+r$.