/* Racing — palmer-bets-racing 41:37 / palmer-bets-racing-mobile 76:4 */

/* ── next to jump  41:75 ─────────────────────────────────────────────── */
.jump-band { padding: 24px 0; background: var(--color-dark); color: #fff; }
.jump-band__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.jump-band__titles { display: flex; flex-direction: column; gap: 2px; }
.jump-band__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; line-height: 27px; letter-spacing: .03em; }
.jump-band__sub { font-size: 12px; line-height: 16px; color: var(--color-on-dark); }
.jump-band__all { font-weight: 600; font-size: 13px; line-height: 17px; color: #fff; text-decoration: none; white-space: nowrap; }
.jump-band__all:hover { color: var(--color-brand); }
.jump { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
.jump-card { min-width: 0; }
.jump-card__link {
  display: flex; flex-direction: column; gap: 8px; padding: 14px;
  background: var(--color-dark); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--color-dark-3);
  color: #fff; text-decoration: none;
  transition: box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.jump-card__link:hover { box-shadow: inset 0 0 0 1px var(--color-brand); transform: translateY(-2px); }
.jump-card__link--live { background: var(--color-brand); box-shadow: none; }
.jump-card__link--live:hover { box-shadow: inset 0 0 0 1px #fff; }
.jump-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jump-card__min { font-weight: 800; font-size: 15px; line-height: 20px; color: var(--color-brand); white-space: nowrap; }
.jump-card__link--live .jump-card__min { font-size: 16px; line-height: 21px; color: #fff; }
.jump-card__link--live .chip--dark { background: rgba(255, 255, 255, 0.165); color: #fff; }
.jump-card__body { display: flex; flex-direction: column; gap: 1px; }
.jump-card__track { font-weight: 700; font-size: 14px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jump-card__race { font-size: 12px; line-height: 16px; color: var(--color-on-dark); }
.jump-card__link--live .jump-card__race { color: #fff; }

/* ── workspace  41:122 ───────────────────────────────────────────────── */
.race-workspace { padding: 32px 0; background: var(--color-bg); }
.race-workspace__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.race-workspace__main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.race-workspace__slip { position: sticky; top: calc(var(--header-h) + 24px); }

/* selected race card 41:124 */
.race-card { display: flex; flex-direction: column; gap: 20px; padding: 20px; background: #fff; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--color-border); }
.race-card__head { display: flex; flex-direction: column; gap: 6px; }
.race-card__title { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 32px; color: var(--color-text); letter-spacing: .02em; }
.race-card__meta { font-size: 13px; line-height: 17px; color: var(--color-muted); }
.race-card__rule { height: 1px; border: 0; margin: 0; background: var(--color-border); }
.race-card__tabs { display: flex; align-items: center; gap: 12px; }
.race-card__label { font-weight: 700; font-size: 12px; line-height: 16px; color: var(--color-muted); }
.race-tabs { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.race-tab {
  padding: 8px 16px; border: 0; border-radius: var(--radius); background: var(--color-surface); color: var(--color-text);
  font-family: var(--font-body); font-weight: 700; font-size: 13px; line-height: 17px; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.race-tab:hover { background: var(--color-border); }
.race-tab.is-active, .race-tab[aria-selected="true"] { background: var(--color-brand); color: #fff; }
.race-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.market-tabs { display: flex; gap: 8px; }
.market-tab {
  padding: 8px 16px; border: 0; background: none; color: var(--color-muted); box-shadow: inset 0 -3px 0 transparent;
  font-family: var(--font-body); font-weight: 700; font-size: 13px; line-height: 17px; cursor: pointer;
  transition: color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.market-tab:hover { color: var(--color-text); }
.market-tab.is-active, .market-tab[aria-selected="true"] { color: var(--color-brand); box-shadow: inset 0 -3px 0 var(--color-brand); }
.market-tab:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* runners 41:154 — one grid for the header and the rows */
.runners { background: #fff; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--color-border); overflow: hidden; }
.runners__head, .runner {
  display: grid; grid-template-columns: 30px 138px 200px 80px 60px 60px 120px 120px; gap: 12px; align-items: center;
}
.runners__head { padding: 12px 16px; background: var(--color-surface); box-shadow: inset 0 -1px 0 var(--color-border); font-weight: 700; font-size: 11px; line-height: 14px; color: var(--color-muted); }
.runners__list { display: flex; flex-direction: column; }
.runner { padding: 12px; box-shadow: inset 0 -1px 0 var(--color-border); }
.runner:last-child { box-shadow: none; }
.runner__no { font-weight: 700; font-size: 14px; line-height: 18px; color: var(--color-text); }
.runner__name { font-weight: 700; font-size: 14px; line-height: 18px; color: var(--color-text); }
.runner__jt { display: flex; flex-direction: column; gap: 2px; }
.runner__jockey { font-size: 13px; line-height: 17px; color: var(--color-text); }
.runner__trainer { font-size: 11px; line-height: 14px; color: var(--color-muted-3); }
.runner__meta { display: contents; }
.runner__form, .runner__bar, .runner__wt { font-size: 13px; line-height: 17px; color: var(--color-muted); }
.runner__odds { display: contents; }
.odd--race { justify-content: center; padding: 10px; }
.odd--race .odd__price { text-align: center; }
.runner:first-child .odd--race:first-child:not(.is-selected) { box-shadow: inset 0 0 0 1px var(--color-border); }

/* same race multi (not drawn: explanatory panel in the card's style) */
.srm { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
.srm__title { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 22px; color: var(--color-text); letter-spacing: .03em; }
.srm__text { font-size: 14px; line-height: 22px; color: var(--color-muted); }
.srm__list { display: flex; flex-direction: column; gap: 6px; padding-left: 18px; list-style: decimal; font-size: 13px; line-height: 20px; color: var(--color-muted); }

/* upcoming races 41:268 */
.upcoming { background: #fff; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--color-border); overflow: hidden; }
.upcoming__head { display: flex; align-items: center; justify-content: space-between; padding: 16px; background: var(--color-surface); }
.upcoming__title { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 22px; color: var(--color-text); letter-spacing: .03em; }
.upcoming__all { font-weight: 600; font-size: 13px; line-height: 17px; color: var(--color-brand); text-decoration: none; }
.upcoming__all:hover { text-decoration: underline; }
.upcoming__list { display: flex; flex-direction: column; }
.upcoming__row { display: grid; grid-template-columns: 80px 200px 150px 1fr 120px; gap: 20px; align-items: center; padding: 16px; box-shadow: inset 0 -1px 0 var(--color-border); }
.upcoming__row:last-child { box-shadow: none; }
.upcoming__time, .upcoming__name { font-weight: 700; font-size: 14px; line-height: 18px; color: var(--color-text); }
.upcoming__kind { font-weight: 600; font-size: 12px; line-height: 16px; color: var(--color-muted); }
.upcoming__starts { font-weight: 600; font-size: 13px; line-height: 17px; color: var(--color-brand); }
.upcoming__link { font-weight: 700; font-size: 13px; line-height: 17px; color: var(--color-brand); text-decoration: none; text-align: right; white-space: nowrap; }
.upcoming__link:hover { text-decoration: underline; }

/* ── mobile  76:4 ────────────────────────────────────────────────────── */
@media (max-width: 1199px) {
  .page-intro__title { font-size: 24px; line-height: 32px; }
  .page-intro__lead { line-height: 18px; }

  .jump-band { padding: 20px 0; }
  .jump-band__title { font-size: 16px; line-height: 22px; }
  .jump-band__sub { display: none; }
  .jump-band__all { font-size: 12px; line-height: 16px; color: var(--color-on-dark); }
  .jump { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--container-pad-mobile)); padding-right: var(--container-pad-mobile); }
  .jump::-webkit-scrollbar { display: none; }
  .jump-card { flex: 0 0 130px; }
  .jump-card__link { gap: 6px; padding: 10px; }
  .jump-card__min { font-size: 14px; line-height: 18px; }
  .jump-card__track { font-size: 12px; line-height: 16px; }
  .jump-card__race { font-size: 11px; line-height: 14px; }

  .race-workspace { padding: 0; }
  .race-workspace__grid { grid-template-columns: 1fr; gap: 0; }
  .race-workspace__grid.container { padding: 0; }
  .race-workspace__main { gap: 0; }
  .race-workspace__slip { display: none; }

  .race-card { gap: 0; padding: 0; border-radius: 0; box-shadow: none; }
  .race-card__head { gap: 4px; padding: 16px; }
  .race-card__title { font-size: 20px; line-height: 27px; }
  .race-card__meta { font-size: 12px; line-height: 16px; }
  .race-card__rule { display: none; }
  .race-card__tabs { padding: 0 16px 12px; }
  .race-card__label { display: none; }
  .race-tabs { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
  .race-tab { flex: 0 0 40px; width: 40px; padding: 10px 0; font-size: 12px; line-height: 16px; text-align: center; }
  .market-tabs { gap: 16px; padding: 0 16px; }
  .market-tab { padding: 12px 0; font-size: 12px; line-height: 16px; }

  .runners { border-radius: 0; box-shadow: none; }
  .runners__head { grid-template-columns: 1fr 136px; padding: 8px 16px; box-shadow: none; }
  .runners__col--no, .runners__col--jt, .runners__col--form, .runners__col--bar, .runners__col--wt { display: none; }
  .runners__col--win, .runners__col--place { text-align: center; }
  .runners__head .runners__col--win { grid-column: 2; grid-row: 1; margin-right: 70px; }
  .runners__head .runners__col--place { grid-column: 2; margin-left: 70px; grid-row: 1; }
  .runner { grid-template-columns: 16px minmax(0, 1fr) 136px; grid-template-areas: "no details odds"; gap: 8px; padding: 12px; }
  .runner__no { grid-area: no; font-size: 13px; line-height: 17px; }
  .runner__name { grid-area: details; font-size: 13px; line-height: 17px; }
  .runner__jt { display: block; grid-area: details; margin-top: 21px; font-size: 11px; line-height: 14px; color: var(--color-muted); }
  .runner__jockey { font-size: 11px; line-height: 14px; color: var(--color-muted); }
  .runner__trainer { font-size: 11px; line-height: 14px; color: var(--color-muted); }
  .runner__meta { display: flex; gap: 6px; grid-area: details; margin-top: 39px; }
  .runner__form, .runner__bar, .runner__wt { padding: 2px 6px; border-radius: 3px; background: var(--color-surface); font-weight: 700; font-size: 9px; line-height: 12px; white-space: nowrap; }
  .runner__name, .runner__jt, .runner__meta { align-self: start; }
  .runner__odds { display: flex; gap: 4px; grid-area: odds; }
  .odd--race { flex: 1; padding: 8px; min-height: 40px; }
  .odd--race .odd__price { font-size: 12px; line-height: 16px; }

  .srm { padding: 16px; }
  .upcoming { border-radius: 0; box-shadow: none; padding: 16px; }
  .upcoming__head { padding: 0 0 12px; background: transparent; }
  .upcoming__all { font-size: 12px; line-height: 16px; }
  .upcoming__row { grid-template-columns: 40px 1fr auto; grid-template-areas: "time name starts" "time kind link"; gap: 2px 8px; padding: 10px 0; }
  .upcoming__time { grid-area: time; align-self: start; font-size: 12px; line-height: 16px; }
  .upcoming__name { grid-area: name; font-size: 12px; line-height: 16px; }
  .upcoming__kind { grid-area: kind; font-size: 10px; line-height: 13px; color: var(--color-muted-3); }
  .upcoming__starts { grid-area: starts; text-align: right; font-size: 11px; line-height: 14px; }
  .upcoming__link { grid-area: link; font-weight: 600; font-size: 10px; line-height: 13px; color: var(--color-muted-3); }
}
