#context {
// 1. Get the final value of the counter
let count = question-counter.final(here()).first()
// 2. Generate the table
// We check if count > 0 to avoid errors if the document is empty
if count > 0 {
table(
columns: count, // Create one column per question
align: center + horizon,
// 3. Generate Headers (Q1, Q2, etc.)
..range(1, count + 1).map(n => [*Q#n*]),
// 4. Generate Empty Cells (bottom row)
..range(0, count).map(_ => [\ ])
)
}
}