/* Only grids identified in the rendered roadbook. Keep each route's own colors. */
.stats[data-rb-stats] {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
  align-items: stretch;
}

.stats[data-rb-stats] > .stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-inline-size: 0;
  padding: .8rem .45rem;
  text-align: center;
  overflow-wrap: anywhere;
}

.stats[data-rb-stats] > .stat > [data-rb-value] {
  order: -1;
  display: block;
  min-inline-size: 0;
  font-family: system-ui, sans-serif;
  font-size: clamp(1.125rem, 2.5vw, 1.4rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: normal;
  line-height: 1.35;
  white-space: normal;
}

.stats[data-rb-stats] > .stat > [data-rb-value] small {
  font: 500 .72em/1.25 system-ui, sans-serif;
  margin-inline: .12em;
}

.stats[data-rb-stats] > .stat > [data-rb-label] {
  font: 400 .8rem/1.5 system-ui, sans-serif;
  letter-spacing: normal;
  margin-block-start: .2rem;
  white-space: normal;
}

@media (max-width: 40rem) {
  .stats[data-rb-stats] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stats[data-rb-stats] > .stat:nth-child(odd) {
    border-inline-start-width: 0;
  }
}
