/* ---------- Performance table ---------- */

.perf__head { padding: 8px 16px; }

.table-wrap { overflow-x: auto; }

.perf .table-wrap { padding: 0 16px; }

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

.table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}

.table th,
.table td {
  text-align: left;
  padding: 16px 16px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  padding-bottom: 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.table th:first-child,
.table td:first-child { padding-left: 0; }

.table th:last-child,
.table td:last-child { padding-right: 0; text-align: right; }

.table th:nth-child(1) { width: 38%; }
.table th:nth-child(2),
.table th:nth-child(3) { width: 25%; }
.table th:nth-child(4) { width: 12%; }

.table td:first-child {
  color: var(--muted);
  transition: color 0.25s ease;
}

.perf tbody tr:hover td:first-child { color: var(--text); }

.perf__dir {
  margin-left: 5px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(233, 236, 233, 0.26);
}

.perf__val {
  display: block;
  font-family: var(--mono);
  font-size: 15px;
}

.perf__unit {
  font-size: 11px;
  color: var(--muted);
}

/* One bar per cell, scaled to the larger value of its row. */
.perf__bar {
  display: block;
  height: 2px;
  margin-top: 12px;
  border-radius: 1px;
  background: rgba(233, 236, 233, 0.08);
}

.perf__bar i {
  display: block;
  width: var(--w, 100%);
  height: 100%;
  border-radius: inherit;
  background: rgba(233, 236, 233, 0.30);
}

.perf .best .perf__bar i { background: var(--accent); }

.perf__x {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.perf .is-tie .perf__x { color: var(--muted); }

.js-reveal .perf__bar i { width: 0; }

.js-reveal .perf.is-in .perf__bar i {
  width: var(--w, 100%);
  transition: width 0.85s var(--ease-out);
}

.js-reveal .perf.is-in tbody tr:nth-child(1) .perf__bar i { transition-delay: 0.20s; }
.js-reveal .perf.is-in tbody tr:nth-child(2) .perf__bar i { transition-delay: 0.27s; }
.js-reveal .perf.is-in tbody tr:nth-child(3) .perf__bar i { transition-delay: 0.34s; }
.js-reveal .perf.is-in tbody tr:nth-child(4) .perf__bar i { transition-delay: 0.41s; }

/* Header readout: follows the row under the cursor. */
.perf__readout {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}

.perf__readout [data-read="verdict"] { color: var(--accent); }

.perf__readout [data-read="verdict"].is-muted { color: var(--muted); }

.perf__readout [data-read="verdict"]:empty,
.perf__readout [data-read="factor"]:empty { display: none; }

.perf__readout [data-read="verdict"]::before,
.perf__readout [data-read="factor"]::before {
  content: "\00b7";
  margin-right: 9px;
  color: rgba(233, 236, 233, 0.24);
}

.perf__meta {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px 18px;
  padding: 15px 16px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

.perf__meta-k {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(233, 236, 233, 0.26);
}

.perf__gain { color: var(--accent); }
