## 2 Materials and Methods  
Our metagrating structure is illustrated in Figure 1a, which consists of a bottom metal, a ZnSe dielectric layer, and a top metal strip array. LSPRs in such grating are determined by half wavelength resonance condition, which is written as [32]:  
\[\lambda=2n_{\text{eff}}W/L,\ (L=1,\ 2,\ 3,\ \ldots) \tag{1}\]  
where \(\lambda\) is the resonance wavelength in free-space, \(W\) is the width of gold strip, \(L\) is an integer, and \(n_{\text{eff}}\) is the effective refractive index. These LSPRs can be regarded as standing waves formed underneath the gold strips. Besides LSPRs, the metagrating also supports PSPs for incident TM polarization, whose excitation is governed by momentum conservation and can be described by [33]:  
\[\frac{2\pi}{\lambda}n\sin\theta+m\frac{2\pi}{P}=\pm\frac{2\pi}{\lambda}\sqrt{ \frac{\varepsilon_{m}n^{2}}{\varepsilon_{m}+n^{2}}},\ (m=\pm 1,\ 2,\ 3,\ \ldots) \tag{2}\]  
where \(\theta\) is the incident angle, \(n\) is the refractive index of surrounding environment, which we take as air in our case. \(P\) is the period of the grating, \(m\) is an integer, and \(\varepsilon_{m}\) is the permittivity of gold. In order to excite both LSPRs and PSPs within our interested wavelength range of 3-9 \(\upmu\)m, the width and period of the metal strips are chosen to be \(W\) = 1.3 \(\upmu\)m and \(P\) = 4.5 \(\upmu\)m, respectively. Other designed thickness parameters are given in Figure 1 caption.  
To fabricate the structure, we first deposited a 310 nm thick Cu film on a Si substrate as the reflector, and then grew a 113 nm thick ZnSe film on top of the Cu using the electron beam evaporation technique. The thickness of ZnSe was measured with ellipsometer SE850 (Sentech, Berlin, Germany). After that, a 105 nm thick gold strip array was fabricated using stepper photolithography, metal deposition, and lift-off processes. Scanning electron microscope (SEM) image of the fabricated sample is shown in Figure 1b. The area size of the strip array is \(8\times 8\) mm. The geometric parameters of the fabricated sample are listed in Table 1, which were obtained from SEM images and ellipsometry measurements. These sample parameters are in good agreement with the designed parameters in Figure 1a. To add ODT molecules as the analyte, the fabricated sample was immersed in 1 mM/L ODT (>95%, Sigma-Aldrich, St. Louis, MO, USA) in ethanol solution for 24 hours at room temperature, and then rinsed thoroughly with ethanol and dried with nitrogen gas. In the self-assembling process, ODT molecules form a monolayer on surfaces of both Au strips and the ZnSe layer [34; 35; 36]. A SEM image of the sample with monolayer ODT is shown in Figure 1c. Due to some surface imperfections, local aggregation of ODT molecules is evident.  
The metagrating sample was characterized with angle-variable Fourier transform infrared (FTIR) reflection spectroscopy [37]. The sample and the detector were mounted on two co-axial rotational stages, which allowed for a continuous scan of the incident angle. The angles were selected from 30\({}^{\circ}\) to 60\({}^{\circ}\) to avoid complexity caused by dispersive fingerprint absorptions of ODT molecules. In such a way, ODT can be regarded as a non-dispersive medium with a constant refractive index. Incident TM polarization with an electrical field perpendicular to the metal strips is used to excite different resonant modes in the measurement. The reflection from a copper mirror was used as the reference background spectrum. To minimize noise arising from environmental disturbance in the optical system, each spectrum was averaged over 64 scans with a resolution of 0.5 cm\({}^{-1}\).