Prepare the Oven and Baking Sheet: Preheat the oven to 325°F and position a rack in the center. Spray an approximately 18 × 13-inch baking sheet with baking spray, or line it with parchment paper or a Silpat mat. Combine the Dry Ingredients: In a large bowl, whisk together the flour, baking powder, sea salt, and pumpkin pie spice until evenly combined.
Beat the Butter and Sugar: In a medium-sized bowl, beat the melted, cooled butter or margarine with the packed light brown sugar.
Add the Eggs: Add the eggs one at a time, beating for 2 to 3 minutes until the mixture becomes thick and pale.
Mix in the Pumpkin: Beat the pumpkin purée into the egg mixture until incorporated.
Add the Flour Mixture: Add the dry ingredients to the wet mixture a little at a time, mixing until the ingredients are combined.
Rest the Dough: Let the dough rest for a couple of minutes in the mixing bowl.
Turn Out the Dough: Scrape the dough onto a clean work surface using a rubber spatula. Because of the pumpkin purée, the dough may be somewhat sticky.
Work the Dough: Use a little flour on the clean work surface to work the dough until it becomes firm enough to transfer to the prepared baking sheet.
Divide the Dough: Spray your hands with baking or cooking spray, then divide the dough into two equal pieces.
Shape the Logs: Shape each portion into a flattened log about 3 inches wide and 12 inches long. If using one baking sheet, position the logs a few inches apart so they do not stick together as they bake. If using two sheets, place one log on each lined baking sheet. Score the Logs: Use a sharp knife to lightly score each log without cutting completely through the dough. This step is optional.
Bake the First Time: Bake the logs at 325°F for about 20 to 25 minutes, until the dough is firm but still gives slightly when pressed.
Cool the Logs: Transfer the baking sheet to a wire rack and let the logs cool until they are comfortable enough to handle for slicing, about 15 minutes; they may sometimes be ready after about 10 minutes.
Lower the Oven Temperature: Reduce the oven temperature to 300°F while the logs cool.
Slice the First Log: Carefully transfer one cooled log to a cutting board. Using a very sharp knife or serrated knife, slice the log into biscotti. If using a serrated knife, use a sawing motion. Slice at a larger angle for longer biscotti or at a shorter angle for smaller pieces. Arrange the Biscotti: Place the sliced biscotti back on the baking sheet with the cut sides facing up.
Slice the Second Log: Transfer the second log to the cutting board and repeat the slicing process, arranging the pieces cut-side up on the baking sheet.
Bake the Biscotti Again: Bake the biscotti at 300°F for 7 minutes, then flip each piece and bake for another 7 minutes.
Cool Completely: Set the baking sheet on a wire rack and allow the biscotti to cool completely.
Prepare the Optional Icing: Place the powdered sugar in a bowl and gradually stir in the maple syrup, water, milk, or unsweetened almond milk until the desired consistency is reached.
Check the Icing Consistency: Let some icing fall from a spoon to test it. It should flow in a ribbon and hold its shape for a few seconds before blending back into the icing.
Adjust the Icing: If the icing is too thick, add a drop of water and test it again. If it is too thin, add a little more powdered sugar. Decorate the Biscotti: Transfer the icing to a squeeze bottle, piping bag fitted with a small round tip, or plastic zippered bag with one corner snipped off. Drizzle or pipe the icing over the cooled biscotti, then allow the icing to set.