/* Lean Kernel Arena - Custom styles (chota overrides) */

@import url('https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.051/juliamono.css');

:root {
--font-family-mono: 'JuliaMono', monospace;
}

/* All columns shrink to fit content; .spacer-col absorbs extra width */
table th, table td {
  white-space: nowrap;
  padding-left: 0.8em;
  padding-right: 0.8em;
}
th.spacer-col, td.spacer-col {
  width: 100%;
}

/* Performance highlighting: dark green marks the fastest checker on a
   perf-compared test, light green those at least 10% faster than the
   official checker */
.bg-perf-best { background-color: #8ed699; }
.bg-perf-good { background-color: #d4edda; }

/* Results table with sticky header row and name column: the table scrolls
   inside its own box (position: sticky sticks to the nearest scroll
   container, which must not be the page as long as the table needs
   overflow-x). Sticky cells need opaque backgrounds, matching the row
   stripes of chota's table.striped. */
.sticky-table {
  overflow: auto;
  max-height: 90vh;
}
.sticky-table thead th {
  position: sticky;
  top: 0;
  background-color: var(--bg-color, #fff);
  z-index: 2;
}
.sticky-table th:first-child,
.sticky-table td:first-child {
  position: sticky;
  left: 0;
  background-color: var(--bg-color, #fff);
}
.sticky-table table.striped tr:nth-of-type(2n) td:first-child {
  background-color: var(--bg-secondary-color, #f3f3f6);
}
.sticky-table thead th:first-child {
  z-index: 3;
}

/* Collapsible test group rows: each group is a tbody whose summary row
   holds a hidden checkbox in a label; the checkbox state shows or hides
   the remaining rows of the tbody, no JavaScript needed */
tr.group-summary label {
  cursor: pointer;
  display: block;
}
tr.group-summary .group-toggle {
  display: none;
}
tbody.group:not(:has(.group-toggle:checked)) tr:not(.group-summary) {
  display: none;
}
tr.group-summary .group-arrow::before {
  content: "▸ ";
}
td.group-member {
  padding-left: 2.4em;
}
tbody.group:has(.group-toggle:checked) .group-arrow::before {
  content: "▾ ";
}

/* Citation box for a released round with a DOI */
.citation {
  background-color: var(--bg-secondary-color, #f3f3f6);
  border-left: 4px solid var(--color-primary, #14854f);
  padding: 0.6rem 1rem;
  margin: 1rem 0;
}
.citation code {
  white-space: pre-wrap;
  word-break: break-word;
}

/* Narrow gap between column groups (e.g. the per-outcome stats on the index) */
th.gap-col, td.gap-col {
  padding-left: 0;
  padding-right: 0;
  min-width: 1em;
}

/* Header rows are not data rows: keep them out of the zebra striping
   (the selector mirrors chota's striping rule to win on specificity) */
table.striped thead tr:nth-of-type(2n) {
  background-color: transparent;
}

/* Compact two-row header of the checker summary table */
table.checker-summary thead th {
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

/* Severity backgrounds for result cells: green marks a correct answer,
   red a wrong one, yellow a declined or crashed test. These replace
   chota's saturated .bg-error and .bg-success site-wide; chota marks
   its rules !important, so these must be, too. */
.bg-success { background-color: #d4edda !important; }
.bg-error { background-color: #f8d7da !important; }
.bg-warning { background-color: #fff3cd !important; }
