/* Racing — frame racing[1:606] / racing-mobile[67:4].
 * Mobile delta M2: the runner table re-flows into cards below 1200px.
 */

/* ── hero (racing[1:631]) ─────────────────────────────────────────────── */
/* headline-row-2[1:638] holds one plain text node [1:639] — this frame drops
   the violet mark the other heroes carry, on both widths. */
.hero__line--2 .hero__mark { padding: 0; background: none; color: var(--color-ink); }

/* ── meeting timeline (racing[1:653]) ─────────────────────────────────── */
.meetings__inner { display: flex; flex-direction: column; gap: var(--space-32); }
.timeline { display: flex; flex-direction: column; }
/* meeting-row[1:655 / 14:2]: white card, 1px #e5e7eb, radius 4 */
.meeting__link {
  display: flex; align-items: center; gap: var(--space-16);
  padding-block: var(--space-20); border-radius: var(--radius-sm);
  background: var(--color-bg); box-shadow: inset 0 0 0 1px var(--color-border);
  text-decoration: none; color: var(--color-ink);
}
.meeting--current .meeting__link { background: var(--color-lime); }
.meeting__link:hover { background: var(--color-sand); }
.meeting--current .meeting__link:hover { background: var(--color-lime-hover); }

/* number-graphic[14:3]: 56, radius 4, 1px #1a1a1a; the current row [1:656]
   fills ink and sets the figure white. */
.meeting__no {
  flex: none; width: 56px; height: 56px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: var(--fs-h6); line-height: 35.28px; font-weight: 800;
  background: var(--color-bg); box-shadow: inset 0 0 0 1px var(--color-ink);
}
.meeting--current .meeting__no { background: var(--color-ink); color: #fff; box-shadow: none; }
.meeting__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.meeting__track { font-size: var(--fs-body); line-height: 20.16px; font-weight: 800; text-transform: uppercase; }
/* [1:660] 13/16.38 at 0.7 — ink at 0.7 on white is 6.4:1 */
.meeting__type { font-size: var(--fs-xs); line-height: 16.38px; opacity: .7; }
.meeting__time { flex: none; font-size: var(--fs-small); line-height: 18px; font-weight: 800; }

/* ── selected meeting header (racing[1:694]) ──────────────────────────── */
/* [1:694] / [67:79] carry one rule, on the bottom edge — no line on top */
.meeting-head { box-shadow: inset 0 -1px 0 var(--color-border); }
.meeting-head__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-24);
  min-height: 96px; flex-wrap: wrap;
}
.meeting-head__meta { display: flex; align-items: center; gap: var(--space-12); }
.meeting-head__label { font-size: var(--fs-3xs); line-height: 14px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase; }
.meeting-head__dot { width: 4px; height: 4px; border-radius: var(--radius-xs); background: var(--color-ink); }
.meeting-head__when { font-size: var(--fs-xs); line-height: 16.38px; opacity: .7; }
.meeting-head__title { display: flex; align-items: center; gap: var(--space-16); }
.meeting-head__no {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: var(--color-lime); display: grid; place-items: center;
  font-size: var(--fs-h5); line-height: 40px; font-weight: 800;
}
.meeting-head__name { font-size: 48px; line-height: 60.48px; font-weight: 800; text-transform: uppercase; }
.meeting-head__controls { gap: var(--space-8); }
.meeting-head__tab { padding: 10px 16px; border-radius: var(--radius-md); font-size: var(--fs-2xs); line-height: 15.12px; }

/* ── runner table (racing[1:710]) ─────────────────────────────────────── */
.workspace__inner { display: flex; gap: var(--space-32); align-items: flex-start; }
.workspace__table {
  flex: 1 1 978px; min-width: 0;
  border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--color-border);
  overflow: hidden;
}
.runners { font-size: var(--fs-small); }
/* Columns are 16 apart inside a 24 gutter: content sits at 24 / 80 / 346 / 462 /
   638 / 734 of the 978 table ([11:58]…[11:66]). Equal 24 padding on every cell
   would push the runner name 32px right of the mockup, so the gutter lives on
   the first and last cell and the columns keep 8+8. */
.runners th, .runner td { padding-inline: var(--space-8); }
.runners tr > *:first-child { padding-left: var(--space-24); }
.runners tr > *:last-child { padding-right: var(--space-24); }
.runners thead th {
  padding-block: var(--space-12);
  font-size: var(--fs-3xs); line-height: 14px; font-weight: 800;
  letter-spacing: 1.1px; text-transform: uppercase; text-align: left;
  border-bottom: 1px solid var(--color-border);
  /* the mockup sets these column heads in #1a1a1a at 0.6 — #767676 is the same
     blend on white as a solid value (4.54:1) */
  color: var(--color-faint);
}
.runners__odds-head { display: flex; gap: var(--space-8); }
.runners__odds-head > span { flex: 1; text-align: center; }
.runners__c-no { width: 72px; }
.runners__c-name { width: 266px; }
.runners__c-barrier { width: 116px; }
.runners__c-jockey { width: 176px; }
.runners__c-form { width: 96px; }
.runners__c-odds { width: 252px; }

/* runner-row[11:62]: 76 high — 16 + the 44 odds button + 16 */
.runner td { padding-block: var(--space-16); vertical-align: middle; }
.runner + .runner td { border-top: 1px solid var(--color-border); }
.runner--featured { background: var(--color-lime); }
.runner:hover:not(.runner--featured) { background: var(--color-surface-2); }
/* number chip [11:73] 40×34; on the favourite [11:63] the hairline is ink */
.runner__no {
  display: grid; place-items: center; width: 40px; height: 34px;
  border-radius: var(--radius-sm); background: var(--color-bg);
  box-shadow: inset 0 0 0 1px var(--color-border);
  font-size: var(--fs-small); line-height: 18px; font-weight: 800;
}
.runner--featured .runner__no { background: var(--color-lime); box-shadow: inset 0 0 0 1px var(--color-ink); }
.runner__name { font-size: var(--fs-body); line-height: 20.16px; font-weight: 700; }
/* [1:724] 13/16.38 at 0.6 · [1:725] 14/18 at 0.8 · [1:726] 14/18 bold.
   Прозрачность — ТОЛЬКО на ячейках данных: те же классы стоят на <th>, где цвет
   уже приглушён до #767676, и 0.6 поверх него давало 2.25:1. */
.runner td.runners__c-barrier { font-size: var(--fs-xs); line-height: 16.38px; opacity: .6; }
.runner td.runners__c-jockey { line-height: 18px; opacity: .8; }
.runners th.runners__c-barrier { font-size: var(--fs-3xs); }
/* На лаймовой строке фаворита приглушать нечего: ink@0.6 на лайме — 5.3:1,
   но полный ink читается заметно лучше и уже принят как решение. */
.runner--featured td.runners__c-barrier,
.runner--featured td.runners__c-jockey { opacity: 1; }
.runner__form { line-height: 18px; font-weight: 700; }

.runner__odds { display: flex; gap: var(--space-8); }
.runner__odds .odd { min-width: 106px; }
/* win-button[11:67]: the selected button keeps its ink hairline in the mockup */
.runner__odds .odd--on,
.runner__odds .odd[aria-pressed="true"] { box-shadow: inset 0 0 0 1px var(--color-ink); }
/* [11:68] 9/11.34. The mockup drops the label to 0.4 on the unselected buttons
   (2.5:1 at 9px) and 0.7 on the selected one — 0.7 is used throughout instead:
   6.4:1 on white, 6.0:1 on lime, both AA. */
.runner__odds .odd__label { font-size: var(--fs-nano); line-height: 11.34px; opacity: .7; }
.runner__odds .odd__value { font-size: var(--fs-body); line-height: 20.16px; }

/* bet-slip-panel[11:112] is 310 wide — without min-width:0 the panel's
   min-content size (316) beats the flex basis. */
.workspace__inner .slip { flex: 0 0 310px; min-width: 0; }

/* ── mobile: the table becomes cards (racing-mobile) ──────────────────── */
@media (max-width: 1199px) {
  /* racing-mobile utility-strip[67:5] is the 47 profile: pad 8, gap 4,
     warning 11/14, links 10/13 — the shared block is drawn for the 44 frames. */
  .u-strip { font-size: var(--fs-3xs); line-height: 14px; }
  .u-strip__links { font-size: var(--fs-micro); line-height: 13px; }

  /* racing-hero[67:20]: pad 40/40, gap 20. Headline [67:24] is a single 38/38
     node with a manual break — this frame drops the purple block entirely. */
  .hero { padding-block: var(--space-40); }
  .hero__title { gap: 0; }
  /* cta-primary[67:26] 358x44 */
  .hero__ctas .btn--primary { padding-block: 13px; }
  /* hero-photo[67:28] 358x260 */
  .hero__photo img { height: 260px; }
  /* micro-plaques[67:29] gap 12 */
  .plaques { gap: var(--space-12); }

  /* meetings-board[67:37]: pad 40/40, meeting-timeline[67:42] gap 8 */
  .meetings { padding-block: var(--space-40); }
  .timeline { gap: var(--space-8); }
  .meetings__inner { gap: var(--space-24); }
  /* meeting-row[67:43] 68 high: pad 12, chip 44, body at 68 → gap 12 */
  .meeting__link { padding: var(--space-12); gap: var(--space-12); }
  .meeting__no { width: 44px; height: 44px; font-size: var(--fs-subtitle); line-height: 25.2px; }
  .meeting__track { font-size: var(--fs-small); line-height: 18px; }
  /* [67:48] 12/15.12 — 0.7 on the open row, 0.6 on the rest */
  .meeting__type { font-size: var(--fs-2xs); line-height: 15.12px; }
  .meeting:not(.meeting--current) .meeting__type { opacity: .6; }

  /* selected-meeting-header[67:79]: pad 24, gap 16 */
  .meeting-head__inner { flex-direction: column; align-items: flex-start; gap: var(--space-16); padding-block: var(--space-24); min-height: 0; }
  .meeting-head__label { font-size: var(--fs-micro); line-height: 13px; letter-spacing: 1px; }
  .meeting-head__when { font-size: var(--fs-2xs); line-height: 15.12px; }
  .meeting-head__title { gap: var(--space-12); }
  .meeting-head__name { font-size: var(--fs-h6); line-height: 35.28px; }
  .meeting-head__no { width: 48px; height: 48px; font-size: var(--fs-lead); line-height: 30.24px; }
  /* market-controls[67:88]: two 174-wide tabs, 44 high, radius 4 */
  .meeting-head__controls { width: 100%; }
  .meeting-head__tab { flex: 1; min-height: 44px; border-radius: var(--radius-sm); }

  /* racing-workspace[67:93]: cards from 16, 24 down to the slip container,
     whose own 40 closes the block */
  .workspace { padding-block: var(--space-16) var(--space-40); }
  .workspace__inner { flex-direction: column; gap: var(--space-24); }
  .workspace__table, .workspace__inner .slip { width: 100%; flex: 1 1 auto; }
  /* the frame it wraps is gone: each runner is its own card [67:94] */
  .workspace__table { border-radius: 0; box-shadow: none; overflow: visible; }

  .runners thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .runners { display: block; width: 100%; }
  .runners tbody { display: flex; flex-direction: column; gap: var(--space-12); }
  /* runner-card[67:94] 358×120: pad 12, radius 4, and inside it a 32 chip, the
     name with the merged meta line under it, the form to the right, odds below */
  .runner {
    display: grid; width: 100%; padding: var(--space-12);
    grid-template-columns: 32px auto 1fr auto;
    column-gap: var(--space-12); row-gap: var(--space-2);
    border-radius: var(--radius-sm); box-shadow: inset 0 0 0 1px var(--color-border);
  }
  .runner + .runner td { border-top: 0; }
  /* [67:94] is a pale lime wash with a lime hairline, not the solid desktop row */
  .runner--featured { background: #f4ffd0; box-shadow: inset 0 0 0 1px var(--color-lime); }
  .runner td { display: block; padding: 0; border: 0; width: auto; }
  .runners tr > *:first-child, .runners tr > *:last-child { padding: 0; }
  .runners__c-no { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .runners__c-name { grid-column: 2 / span 2; grid-row: 1; min-width: 0; }
  .runners__c-form { grid-column: 4; grid-row: 1 / span 2; align-self: center; text-align: right; }
  .runners__c-barrier { grid-column: 2; grid-row: 2; }
  .runners__c-jockey { grid-column: 3; grid-row: 2; min-width: 0; }
  .runners__c-odds { grid-column: 1 / -1; grid-row: 3; margin-top: var(--space-10); }

  /* chip [67:96] 32×28, radius 2, 12/15.12 */
  .runner__no { width: 32px; height: 28px; border-radius: var(--radius-xs); font-size: var(--fs-2xs); line-height: 15.12px; }
  .runner__name { font-size: var(--fs-body-sm); line-height: 19px; }
  /* meta line [67:100] «Barrier 4 • J. McDonald» 12/15.12 at 0.6 */
  /* Только ячейки данных: те же классы стоят на <th>, где цвет уже приглушён,
     и 0.6 поверх него давало 2.25:1. */
  .runner td.runners__c-barrier, .runner td.runners__c-jockey {
    font-size: var(--fs-2xs); line-height: 15.12px; color: var(--color-ink); opacity: .6;
  }
  .runners__c-barrier::after { content: "•"; margin-left: var(--space-4); }
  /* The favourite's card is a pale lime wash, and ink at 0.6 drops to 3.9:1 on
     it. On that row the meta line takes the full ink the rest of the card uses —
     13.7:1 — instead of a tint that only clears AA on white. */
  .runner--featured td.runners__c-barrier,
  .runner--featured td.runners__c-jockey { opacity: 1; }
  /* form [67:101] 13/16.38 bold, full ink, right of the name line */
  .runners__c-form { font-size: var(--fs-xs); opacity: 1; }
  .runner__form { line-height: 16.38px; }
  /* odds buttons [67:103] 163×48 */
  .runner__odds .odd { min-width: 0; flex: 1; min-height: 48px; }
  .runner__odds .odd__value { font-size: var(--fs-body-sm); line-height: 19px; }

  /* responsible-gambling[70:1516]/[71:1585]: this frame draws the band at 716 —
     pad 40, header 90 (11/14 + 32/32 + a 32 mark, 6 apart), cards 166 high and
     12 apart. The shared block carries the 837 profile of the other frames. */
  .rg-band { padding-block: var(--space-40); }
  .rg-band__inner { gap: var(--space-24); }
  .rg-band__intro { gap: var(--space-6); max-width: none; }
  .rg-band .eyebrow { font-size: var(--fs-3xs); line-height: 14px; }
  .rg-band__title { font-size: var(--fs-h5); line-height: 32px; gap: var(--space-6); }
  .rg-band__mark { font-size: var(--fs-lead); line-height: 24px; padding: 4px 8px; }
  .rg-cards { gap: var(--space-12); }
  .rg-card { padding: var(--space-16); gap: var(--space-12); }
  .rg-card__num { font-size: var(--fs-title); line-height: 28px; }
  .rg-card__title { font-size: var(--fs-body-sm); line-height: 19px; }
  .rg-card__text { font-size: var(--fs-xs); line-height: 18px; }
  .rg-card__link { font-size: var(--fs-2xs); line-height: 15px; }

  /* footer 934 — these two frames are in the minority group (the shared block
     follows the 1035 majority): pad 40 and the copyright above the payments. */
  .site-footer { padding-block: var(--space-40); }
  .footer-brand { gap: var(--space-10); }
  .footer-divider--mobile { display: none; }
  .footer-bottom { order: 1; }
  .footer-pay { order: 2; }
}

/* The racing hero ends 20px above the next section, not 80 (racing[1:631]).
   Desktop only — below 1200 the shared mobile rhythm applies, and an unscoped
   rule here would win over it purely by file order. */
@media (min-width: 1200px) {
  .hero { padding-block: 72px var(--space-20); }
  .section--tight { padding-block: var(--space-40) var(--space-20); }
  /* meetings-board-container[1:647] keeps the full 80 on top */
  .meetings { padding-block: var(--space-80) var(--space-20); }
  /* racing-workspace[1:708]: the table meets the header rule with no gap, the
     slip [11:112] starts 40 lower, and the block closes on 80 */
  .workspace { padding-block: 0 var(--space-80); }
  /* 978 + 72 + 310 = 1360 */
  .workspace__inner { gap: 72px; }
  .workspace__inner .slip { margin-top: var(--space-40); }
  /* win-button[11:67] rounds at 6 in this frame, the shared .odd at 4 */
  .runner__odds .odd { border-radius: var(--radius-md); }
}
