The double membrane that separates the nucleoplasm (see nucleus) of a cell from the cytoplasm. The membranes consist of lipid bilayers that are separated by a perinuclear space (or compartment) some 20–40 nm wide. The outer membrane is continuous with the rough endoplasmic reticulum and is structurally and functionally distinct from the inner membrane. The envelope is perforated at intervals by nuclear pores, typically about 100 nm in diameter, which provide a channel for the selective transfer of water-soluble molecules between the nucleus and the cytoplasm. Each nuclear pore is surrounded by a disc-shaped structure (nuclear pore complex) consisting of an octagonal arrangement of eight protein granules. Covering the internal surface of the envelope is the nuclear lamina, a mesh of intermediate filaments formed by proteins called lamins. The lamina attaches to both the nuclear envelope and to the filamentous protein network that forms the nuclear matrix inside the nucleus; both the lamina and matrix maintain the shape of the nucleus.