The quantum mechanical generation of hypermagnetic and hyperlectric fields in four-dimensional conformally flat background geometries rests on the simultaneous continuity of the effective horizon and of the extrinsic curvature across the inflationary boundary. The junction conditions for the gauge fields are derived in general terms and corroborated by explicit examples with particular attention to the limit of a sudden (but nonetheless continuous) transition of the effective horizon. After reducing the dynamics to a pair of integral equations related by duality transformations, we compute the power spectra and deduce a novel class of logarithmic corrections which turn out to be, however, numerically insignificant and overwhelmed by the conductivity effects once the gauge modes reenter the effective horizon. In this perspective the magnetogenesis requirements and the role of the postinflationary conductivity are clarified and reappraised. As long as the total duration of the inflationary phase is nearly minimal, quasi-flat hypermagnetic power spectra are comparatively more common than in the case of vacuum initial data.The qualitative description of large-scale cosmological perturbations [1][2][3] stipulates that a given wavelength exits the Hubble radius at some typical conformal time τ ex during an inflationary stage of expansion and approximately reenters at τ re , when the Universe still expands but in a decelerated manner. By a mode being beyond the horizon we only mean that the physical wavenumber is much less than the expansion rate: this does not necessarily have anything to do with causality [2]. Indeed, the initial conditions of the Einstein-Boltzmann hierarchy (mandatory for the calculation of the temperature and polarization anisotropies) are set when the relevant modes are larger than the Hubble radius prior to matter-radiation equality [3]. Similarly the physical wavenumbers of the hyperelectric and hypermagnetic fields a e-mail: massimo.giovannini@cern.ch can be much smaller than the rate of variation of the susceptibility (χ in what follows) which now plays the role of the effective horizon. The junction conditions of the gauge power spectra will be derived in general terms and then corroborated by specific examples with particular attention to the case of sudden (but continuous) postinflationary transitions. Using the obtained results the gauge power spectra will be computed in the case of generalized quantum mechanical initial conditions of the hypercharge field.The four-dimensional action discussed in [4-9] concisely summarizes a large class of magnetogenesis scenarios and it can be written, for the present ends, as 1where g denotes the determinant of the four-dimensional metric; 2 Y αβ and Y αβ are, respectively, the gauge field strength and its dual. While the two symmetric tensors M ρ σ and N ρ σ parametrize, in full generality, the dependence upon the electric and magnetic susceptibilities, Eq. (1) includes, as a special case, the derivative couplings typical of the relativistic th...