  A spherical $L$-code, where $L \subseteq [-1,\infty)$, consists of unit
vectors in $\mathbb{R}^d$ whose pairwise inner products are contained in $L$.
Determining the maximum cardinality $N_L(d)$ of an $L$-code in $\mathbb{R}^d$
is a fundamental question in discrete geometry and has been extensively
investigated for various choices of $L$. Our understanding in high dimensions
is generally quite poor. Equiangular lines, corresponding to $L = \{-\alpha,
\alpha\}$, is a rare and notable solved case.
  Bukh studied an extension of equiangular lines and showed that $N_L(d) =
O_L(d)$ for $L = [-1, -\beta] \cup \{\alpha\}$ with $\alpha,\beta > 0$ (we call
such $L$-codes "uniacute"), leaving open the question of determining the
leading constant factor. Balla, Dr\"{a}xler, Keevash, and Sudakov proved a
"uniform bound" showing $\limsup_{d\to\infty} N_L(d)/d \le 2p$ for $L = [-1,
-\beta] \cup \{\alpha\}$ and $p = \lfloor \alpha/\beta \rfloor + 1$.
  For which $(\alpha,\beta)$ is this uniform bound tight? We completely answer
this question. We develop a framework for studying uniacute codes, including a
global structure theorem showing that the Gram matrix has an approximate
$p$-block structure. We also formulate a notion of "modular codes," which we
conjecture to be optimal in high dimensions.
