+// CSS rules for stortable clicky table headers: Update the display of
+// the /table based on the current state. Each column has its own set
+// nearly-identical rules, only the class names differ.
+//
+// The clickytables.xsl stylesheet generates two inputs for each column.
+// These inputs are siblings of the table and all precede it in document
+// order. Moreover, the inputs for a column are ordered with respect to
+// each other, in this sequence:
+//
+// input.clicky-NAME -- checked iff NAME is selected for sorting.
+// input.clicky-NAME-rev -- checked to select reverse order.
+//
+// One of the column selection inputs will have a 'checked' attribute to
+// indicate the default order. This input is always first in document
+// order. No other inputs begin checked.
+//
+// The table itself consists of a thead (where the header labels are
+// located) and two tbody elements. The bulk of these rules relate
+// to updating the headers to visually indicate the current state.
+//
+// A sortable column's th element has the .clicky-NAME class, matching
+// its corresponding inputs, and has two label children. The first label
+// is visible only when the column is unselected, and is linked to the
+// .clicky-NAME input to activate that column. The second label is visible
+// only on the selected column and is linked to the .clicky-NAME-rev input
+// to toggle the reverse order.
+//
+// For the table body, the first tbody contains the default ordering
+// and is not styled by these rules (except to hide it when alternate
+// orderings are selected). The second tbody contains rows for all
+// alternate orderings, and is revealed by these rules. When revealed,
+// rows with the NAMEfwd or NAMErev class (for the forward and reverse
+// orderings, respectively) are shown and other rows are hidden.
+
+$clickynames: name, date, size;
+@each $col in $clickynames {
+ input.clicky-#{$col} {