.lap1-differential {
  --lap1-row-font-size: calc(1rem - 0.5px);
  --lap1-label-font-size: calc(0.8rem - 0.5px);
}

.full-throttle-chart {
  --lap1-row-font-size: 0.9rem;
  --lap1-label-font-size: 0.75rem;
}

.full-throttle-chart .lap1-track::before { content: none; }
.full-throttle-chart .lap1-bar.gain { left: 0; }
.full-throttle-sample { color: #aab7c8; }

.lap1-chart {
  --lap1-gain: #55b9e9;
  --lap1-loss: #ff6879;
  --lap1-grid: #2a3544;
  font-variant-numeric: tabular-nums;
}

.lap1-chart-row {
  display: grid;
  grid-template-columns: minmax(6.25rem, 25%) minmax(0, 1fr) 2.8rem;
  align-items: center;
  gap: 0.65rem;
  min-height: 1.8rem;
}

.lap1-differential .lap1-chart-row {
  grid-template-columns: minmax(7rem, 25%) 3.5rem 6.5rem minmax(0, 1fr) 3.1rem;
}

.lap1-context { text-align: center; }

.lap1-chart-scale {
  color: #aab7c8;
  font-size: var(--lap1-label-font-size);
}

.lap1-axis {
  display: flex;
  justify-content: space-between;
}

.lap1-chart-list {
  font-size: var(--lap1-row-font-size);
  list-style: none;
  margin: 0;
  padding: 0;
}

.lap1-track {
  position: relative;
  min-height: 1.8rem;
  border-bottom: 1px solid var(--lap1-grid);
  border-inline: 1px solid var(--lap1-grid);
}

.lap1-track::before {
  position: absolute;
  inset: 0 auto 0 50%;
  border-left: 1px solid #66768b;
  content: "";
}

.lap1-bar {
  position: absolute;
  top: 20%;
  height: 60%;
}

.lap1-bar.gain {
  left: 50%;
  background: var(--lap1-gain);
  border-radius: 0 3px 3px 0;
}

.lap1-bar.loss {
  right: 50%;
  background: var(--lap1-loss);
  border-radius: 3px 0 0 3px;
}

.lap1-value {
  text-align: right;
}

.lap1-value.gain { color: var(--lap1-gain); }
.lap1-value.loss { color: var(--lap1-loss); }

.research-table-card .lap1-table {
  width: 100%;
  font-size: var(--lap1-row-font-size);
  font-variant-numeric: tabular-nums;
}

.research-table-card .lap1-table thead th {
  font-size: var(--lap1-label-font-size);
}

.research-table-card .lap1-table th[scope="row"] {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
}

.lap1-table tbody td:last-child {
  font-weight: 700;
}

.lap1-table :is(th, td):not(:first-child) {
  text-align: right;
}

@media (max-width: 600px) {
  .lap1-differential {
    --lap1-row-font-size: calc(0.72rem - 0.5px);
    --lap1-label-font-size: calc(0.78rem - 0.5px);
  }

  .lap1-chart-row {
    gap: 0.35rem;
    grid-template-columns: minmax(5.5rem, 37%) minmax(0, 1fr) 2.4rem;
  }

  .lap1-differential .lap1-chart-row {
    grid-template-columns: minmax(0, 1.25fr) 2rem 3.2rem minmax(2.5rem, 1fr) 2.4rem;
  }

  .lap1-differential .lap1-driver-name { overflow-wrap: anywhere; }

  .lap1-differential .research-table-card .lap1-table :is(th, td) {
    padding: 0.4rem 0.25rem;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}
