/* Beat the clock: level chooser, slope diagram and the dark-board result table.
   Tokens (--board, --on-ink, --line-money, ...) come from the game frame in
   ws.css; this file only adds what that frame does not already style. */

/* The level chooser and personal-best line sit above the dark game board,
   on the page's own background, so they need no ink-board colour override. */
.btc-levels {
  margin-bottom: var(--s4);
}

.btc-best {
  margin: var(--s2) 0 0;
  font-size: var(--t-small);
  color: var(--ink-3);
}

/* The slope diagram is decorative (aria-hidden): the table beside it carries
   the same comparison in full, accessible form. */
.btc-slope {
  margin: var(--s4) 0;
  overflow-x: auto;
}

.btc-slope svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 26rem;
  font-family: var(--font);
}

.slope__head {
  font-size: 0.8rem;
  font-weight: 800;
  fill: var(--on-ink-3);
}

.slope__label {
  font-size: 0.8rem;
  font-weight: 700;
  fill: var(--on-ink);
}

.slope__link {
  fill: none;
  stroke: var(--on-ink-3);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.slope__link.is-match {
  stroke: var(--line-money);
  stroke-width: 4;
}

.slope__dot {
  stroke-width: 2.5;
}

.slope__dot--you {
  fill: var(--board);
  stroke: #fff;
}

.slope__dot--engine {
  fill: #fff;
  stroke: var(--board);
}

/* The per-item breakdown reuses .table/.table--stack (7.21) inside the dark
   game board, so only its colours move to the ink-board palette here. */
.game__board .table-wrap {
  border-top-color: var(--board-rule);
}

.game__board .table {
  color: var(--on-ink);
}

.game__board .table th,
.game__board .table td {
  border-bottom-color: var(--board-rule);
}

.game__board .table thead th {
  border-bottom-color: var(--line-money);
  color: var(--on-ink-3);
}

.game__board .table td.is-match {
  color: var(--line-money);
}

@media (max-width: 45rem) {
  .game__board .table--stack tbody tr {
    border-bottom-color: var(--board-rule);
  }

  .game__board .table--stack td[data-label]::before {
    color: var(--on-ink-3);
  }
}

/* ------------------------------------------------------------------ mini */
.btc-mini {
  padding: var(--s5);
}

.btc-mini__how {
  margin: 0 0 var(--s4);
  color: #eef0f2;
  font-size: var(--t-small);
}

.tickets--mini {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
}

.ticket--mini {
  min-height: 4.5rem;
}

.ticket--mini .ticket__body {
  justify-content: center;
}

.btc-mini__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s4);
}

.btc-mini__result {
  margin-top: var(--s3);
  min-height: 1.4em;
  font-weight: 700;
  color: var(--on-ink);
}

@media (max-width: 30rem) {
  .tickets--mini {
    grid-template-columns: minmax(0, 1fr);
  }
}
