Electronic-structure methods for twisted moiré layers