Non-parallelism, i.e. the effect of the slow variation of the boundary-layer flow in the chordwise and spanwise directions, in general produces a higher-order correction to the growth rate of instability modes. Here we investigate stationary crossflow vortices, which arise due to the instability of the three-dimensional boundary layer over a swept wing, focusing on a region near the leading edge where non-parallelism plays a leading-order role in their development. In this regime, the vortices align themselves with the local wall shear at leading order, and so have a marginally separated triple-deck structure, consisting of the inviscid main boundary layer, an upper deck and a viscous sublayer. We find that the streamwise (and spanwise) variations of both the base flow and the modal shape must be accounted for. An explicit expression for the growth rate is derived that shows a neutral point occurs in this regime, downstream of which non-parallelism has a stabilising effect. Stationary crossflow vortices thus have a viscous and non-parallel genesis near the leading edge. If an ‘effective pressure minimum’ occurs within this region then the growth rate becomes unbounded, and so the previous analysis is regularised within a localised region around it. A new instability is identified. The mode maintains its three-tiered structure, but the pressure perturbation now plays a passive role. Downstream, the instability evolves into a Cowley, Hocking & Tutty (Phys. Fluids, vol. 28, 1985, pp. 441–443) instability associated with a critical layer located in the lower deck. Finally, we consider the receptivity of the flow in the non-parallel regime: generation of stationary crossflow modes by arrays of chordwise-localised, spanwise-periodic surface roughness elements. The flow responds differently to different Fourier spectral content of the roughness, giving the lower deck a two-part structure. We find that roughness elements with sharper edges generate stronger modes. For roughness elements of fairly moderate height, the resulting nonlinear forcing leads to the so-called super-linearity of receptivity, namely, the amplitude of the generated crossflow mode deviates from the linear dependence on the roughness height even though the perturbation in the boundary layer remains linear.