/* The styles of the live accuracy table on accuracy-benchmark.html.
 *
 * Scoped under .ab-* so the page cannot break the tables of the other pages.
 * The colors are the tokens of the site, so the page reads as part of the
 * same product.
 */

.ab-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-end;
  margin-bottom: var(--space-5);
}

.ab-controls .field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 180px;
}

.ab-controls label {
  font-size: var(--fs-200);
  color: var(--text-muted);
  font-weight: 600;
}

.ab-controls .input {
  font: inherit;
  font-size: var(--fs-300);
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--bg-raised);
  color: var(--text);
  min-width: 180px;
}

.ab-controls .input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.ab-controls__spacer {
  flex: 1 1 auto;
}

.ab-counter {
  font-size: var(--fs-200);
  color: var(--text-muted);
  margin: 0 0 var(--space-2);
}

.ab-note {
  font-size: var(--fs-200);
  color: var(--text-faint);
  margin: 0 0 var(--space-5);
}

.ab-tables {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
}

.ab-block__head {
  margin-bottom: var(--space-3);
}

.ab-block__title {
  font-size: var(--fs-600);
  margin: 0 0 var(--space-2);
}

.ab-block__lead {
  font-size: var(--fs-300);
  color: var(--text-muted);
  margin: 0;
  max-width: 68ch;
}

.ab-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--bg-raised);
}

.ab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-300);
  min-width: 780px;
}

.ab-table caption {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--fs-200);
  color: var(--text-muted);
  border-bottom: 1px solid var(--line);
}

.ab-table th,
.ab-table td {
  text-align: left;
  padding: 0.6rem var(--space-4);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.ab-table thead th {
  background: var(--bg-sunken);
  font-size: var(--fs-200);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.ab-table thead th button {
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.ab-table thead th button::after {
  content: " \2195";
  opacity: 0.45;
}

.ab-table thead th[aria-sort="ascending"] button::after {
  content: " \2191";
  opacity: 1;
}

.ab-table thead th[aria-sort="descending"] button::after {
  content: " \2193";
  opacity: 1;
}

.ab-table tbody tr:last-child td {
  border-bottom: 0;
}

.ab-vendor {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.ab-model {
  display: block;
  font-size: var(--fs-200);
  color: var(--text-faint);
}

.ab-metric {
  display: inline-block;
  font-size: var(--fs-200);
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  white-space: nowrap;
}

.ab-metric--relative {
  background: #fdf0dd;
  color: #7a4a08;
}

.ab-value {
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.ab-sub {
  display: block;
  font-size: var(--fs-200);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ab-cell--source a {
  color: var(--brand);
  word-break: break-word;
}

.ab-badge {
  display: inline-block;
  font-size: var(--fs-200);
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #fdf0dd;
  color: #7a4a08;
  margin-right: 0.4rem;
  white-space: nowrap;
}

.ab-claim-text {
  color: var(--text);
}

.ab-cell--compared,
.ab-cell--date,
.ab-cell--language {
  white-space: nowrap;
  color: var(--text-muted);
}

.ab-empty {
  padding: var(--space-5);
  color: var(--text-muted);
  font-size: var(--fs-300);
}

@media (max-width: 640px) {
  .ab-controls .field,
  .ab-controls .input {
    min-width: 100%;
    width: 100%;
  }

  .ab-controls__spacer {
    display: none;
  }

  .ab-badge {
    display: inline-block;
    white-space: normal;
  }
}
