/*
 * The criteria of one search, laid out to fit without scrolling.
 *
 * Stacked label-over-control it ran to 1563px against 1116px of room — a scroll
 * for nine switches and three rows of buttons. Measured at 480px on real data,
 * this comes to 685px: labels beside their controls, one line per criterion,
 * and the switches in two columns.
 *
 * Those two columns are split by WHERE THE ANSWER COMES FROM, which is the same
 * division as the two rows of icons on every card. One distinction taught in
 * three places rather than three arrangements to learn.
 */

.criteria-rail {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Label in a fixed column, control filling the rest — so every label starts at
 * the same x and every row of buttons ends at the same right edge. */
.criteria-rail__field {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: center;
  gap: var(--space-3);
}

.criteria-rail__label {
  font-size: var(--label-size);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: var(--label-weight);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.criteria-rail__mark {
  width: 0.7rem;
  height: 0.7rem;
  flex: none;
}

.criteria-rail__input {
  width: 100%;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  color: var(--ink);
}

.criteria-rail__input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

.criteria-rail__steps {
  display: flex;
  gap: var(--space-1);
}

.criteria-rail__step {
  flex: 1;
  text-align: center;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-muted);
  text-decoration: none;
}

.criteria-rail__note {
  margin: 0 0 var(--space-2) 6.5rem;
  font-size: var(--text-xs);
  line-height: 1.45;
  color: var(--ink-faint);
}

.criteria-rail__rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-2) 0;
  width: 100%;
}

.criteria-rail__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 var(--space-4);
}

.criteria-rail__column {
  display: flex;
  flex-direction: column;
}

.criteria-rail__column .criteria-rail__label {
  margin-bottom: var(--space-1);
  min-height: 1rem;
}

.criteria-rail__foot {
  margin: var(--space-2) 0 0;
  font-size: 0.5625rem;
  line-height: 1.45;
  color: var(--ink-faint);
}
