2 cups flour, plus more for dusting
2 ¼ teaspoon salt, divided
1 ½ sticks (¾ cup) very cold unsalted butter, sliced
1 tablespoon red wine vinegar
1 ½ pounds heirloom tomatoes, sliced ¼-inch thick
4 ounces Gruyere or parmesan cheese, finely grated (about 1 ½ cups)
1 egg, beaten
Sea salt
Pepper
½ lemon, zested
1 tablespoon thyme, chopped