/* ---------------------------------------------------------- the section */

.market-trail__meta {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  max-width: var(--measure-mid);
}

.market-trail__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: var(--space-md) 0 var(--space-lg);
}

.market-trail__caption {
  margin: var(--space-sm) 0 0;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.market-trail__table-wrap {
  overflow-x: auto;
}

.market-trail__table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  margin-top: var(--space-md);
}

.market-trail__table th,
.market-trail__table td {
  padding: var(--row-pad-y) var(--space-sm);
  border-bottom: var(--border-width) solid var(--border-default);
  text-align: left;
}

.market-trail__table th {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
}

.market-trail__num {
  text-align: right;
}

.market-trail__mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.market-trail__row--now td {
  font-weight: var(--weight-semibold);
}

/* The breakdown row sits under its night, so the night keeps its hairline and
   whatever ends the table loses one. */
.market-trail__table tr:last-child td {
  border-bottom: none;
}

/* ------------------------------------------------- what moved a price

   A row of its own spanning the table, folded away: the figure is the
   answer and the working is only wanted when somebody disagrees with it. */
.market-trail__why-row td {
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
  background: var(--surface-sunk);
}

.market-trail__why {
  margin: 0;
}

.market-trail__why-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  transition: color var(--dur-fast) var(--ease-out);
}

/* Safari still draws its own triangle without this. */
.market-trail__why-toggle::-webkit-details-marker {
  display: none;
}

.market-trail__why-toggle::before {
  content: "\203A";
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease-out);
}

.market-trail__why[open] .market-trail__why-toggle::before {
  transform: rotate(90deg);
}

.market-trail__why-toggle:hover {
  color: var(--text-secondary);
}

.price-steps {
  margin: var(--space-sm) 0 var(--space-xs);
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--space-xs);
}

.price-step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  align-items: baseline;
  gap: var(--space-sm);
}

.price-step__change {
  text-align: right;
}

.price-step__what {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-xs);
  min-width: 0;
}

.price-step__label {
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.price-step__detail {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

/* The league's own movement is the one line that is not about this player, so
   it reads as the remainder it is rather than as another thing they did. */
.price-step--league .price-step__label,
.price-step--season .price-step__label {
  color: var(--text-secondary);
  font-style: italic;
}

.market-trail__link {
  color: inherit;
  text-decoration: none;
}

.market-trail__link:hover {
  text-decoration: underline;
}

.market-trail__note {
  margin: var(--space-md) 0 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  max-width: var(--measure-mid);
}
