.works th.sortable button {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}
.works th.sortable button:hover { color: var(--ink); }
.works th.sortable button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* Let the search field and cards fit the available space on narrow screens. */
.query-row input { min-width: 0; }
.lab-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

@media (max-width: 480px) {
  .works { table-layout: fixed; }
  .works th, .works td { padding-right: 8px; overflow-wrap: anywhere; }
  .works th { letter-spacing: .02em; }
  .works th:nth-child(1) { width: 31%; }
  .works th:nth-child(2) { width: 33%; }
  .works th:nth-child(3) { width: 24%; letter-spacing: 0; }
  .works th:nth-child(5) { width: 12%; padding-right: 0; }
  .works td:last-child { padding-right: 0; }
  .works .lang, .works .stars { white-space: normal; }
}
