Dynamic inversion of planar-chiral response of terahertz metasurface based on critical transition of checkerboard structures