/* Race page — A3 language: dark-free tiles, element tile, fill bar, green prices. */
.rhead { padding: 18px; display: grid; gap: 14px; }
.rhead__main { display: flex; gap: 14px; align-items: flex-start; }
.rhead__title { flex: 1; min-width: 0; }
.rhead__title h1 { font-size: var(--fs-h1); line-height: 1.12; font-weight: 800; letter-spacing: -.03em; overflow-wrap: anywhere; }
.rhead__facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.rhead__facts li { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 767px) { .rhead__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } }  /* 2×2, no 3+1 orphan */
.rhead__facts .icon { width: 16px; height: 16px; }
.rhead__clock { display: grid; justify-items: end; gap: 6px; text-align: right; }
.rhead__clock b { font-size: 34px; line-height: 1; font-weight: 800; letter-spacing: -.03em; }
.rhead__clock b.is-soon { color: #A65E00; }
@media (max-width: 767px) {
  .rhead__main { flex-wrap: wrap; }
  .rhead__clock { width: 100%; justify-items: start; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .rhead__title h1 { font-size: 22px; }
}
.rstrip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; scroll-snap-type: x proximity; }
.rn { position: relative; display: grid; justify-items: center; gap: 1px; min-width: 60px; padding: 7px 8px; border-radius: 12px; flex: none; scroll-snap-align: start; background: var(--surface-2); border: 1px solid transparent; text-decoration: none; transition: background var(--t), border-color var(--t); }
.rn:hover { border-color: var(--line-strong); }
.rn b { font-size: 14px; font-weight: 800; }
.rn span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.rn.is-cur { background: var(--ink); color: #fff; }
.rn.is-cur span { color: rgba(255, 255, 255, .75); }
.rn--official, .rn--provisional { background: var(--surface); border-color: var(--line); }
.rn--abandoned span { color: var(--error); }

.result .podium { display: grid; gap: 6px; }
.podium li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-s); background: var(--surface-2); flex-wrap: wrap; }
.podium b { flex: 1; min-width: 140px; }
.podium .num { font-size: 13px; color: var(--ink-2); }
.pos { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800; }
.pos--1 { background: var(--accent); color: var(--accent-ink); }
.divs { margin-top: 12px; max-width: 420px; }

.field { padding: 14px 0 6px; overflow: hidden; }
/* .field is also the form-field component (display:grid, auto track) — pin the track so the table cannot widen the tile past the viewport */
.tile.field { grid-template-columns: minmax(0, 1fr); }
.field__bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 0 14px 10px; border-bottom: 1px solid var(--line); }
/* the tab strip takes its own width; when it does not fit, the toggles wrap to the next row instead of sitting over scrolled-away tabs */
.bettabs { flex: 1 1 auto; min-width: 0; max-width: 100%; }
.field__toggles { display: flex; gap: 8px; }
.tog { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line); font-size: 13px; font-weight: 700; cursor: pointer; background: var(--surface); }
.tog input { width: 16px; height: 16px; accent-color: var(--ink); }
.field__note { margin: 12px 14px 0; }
.builder { padding: 12px 14px 0; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.builder__help { flex: 1 1 340px; display: flex; gap: 8px; font-size: 14px; color: var(--ink-2); }
.builder__help .icon { flex: none; color: var(--brand-ink); width: 18px; height: 18px; margin-top: 1px; }

/* the runner table → cards on mobile (ТЗ §6.4, §11.2) */
.runners-t { width: 100%; border-collapse: collapse; font-size: var(--fs-table); }
.runners-t th { text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 10px 8px; border-bottom: 1px solid var(--line); }
.runners-t th:first-child { padding-left: 14px; }
.runners-t th.r, .runners-t td.r { text-align: right; }
.runners-t td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.runners-t td:first-child { padding-left: 14px; }
.runners-t td:last-child, .runners-t th:last-child { padding-right: 14px; }
.runners-t abbr { text-decoration: underline dotted; cursor: help; }
.rr { transition: background var(--t); }
.rr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.rr__id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rr__id > div { flex: 1; min-width: 0; }
.rr__id b { font-size: 15px; }
.rr__mob { display: none; }
.rr__age { display: block; color: var(--ink-2); font-size: 12px; }
.rr__more { width: 36px; height: 36px; }
.rr__more[aria-expanded="true"] .icon { transform: rotate(180deg); }
.rr__more .icon { transition: transform var(--t2) var(--ease); width: 18px; height: 18px; }
.rr__extra { margin-top: 8px; max-width: 360px; }
.rr__hist { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.rr__hist .up { color: var(--success); font-weight: 700; }
.rr__hist .down { color: var(--error); font-weight: 700; }
.rr__ins { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.rr__ins .icon { width: 15px; height: 15px; color: var(--brand-ink); }
.c-people span { display: block; font-weight: 600; }
.c-people small { color: var(--ink-2); }
.c-form { letter-spacing: .08em; }
.c-price .odds { width: 72px; min-height: 44px; }
.c-price .odds small { display: none; }
.rr.is-scr td:not(:first-child), .rr.is-scr .rr__id b { color: var(--ink-2); }
.rr.is-scr .rr__id b { text-decoration: line-through; }
.pickbox { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.pickbox input { width: 22px; height: 22px; accent-color: var(--ink); cursor: pointer; }
.sel { height: 40px; min-width: 96px; padding: 0 8px; border-radius: var(--r-s); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; }
.sel:focus { outline: none; border-color: var(--ink); box-shadow: var(--focus-ring); }

@media (max-width: 767px) {
  .runners-t thead, .runners-t thead * { position: absolute; width: 1px; height: 1px; padding: 0 !important; margin: -1px; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .runners-t, .runners-t tbody, .runners-t tr, .runners-t td { display: block; }
  .rr { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .rr td { border: 0; padding: 0 !important; }
  .rr .c-runner { grid-column: 1 / -1; }
  .rr .c-barrier, .rr .c-weight, .rr .c-people, .rr .c-form { display: none !important; }
  .rr__mob { display: block; color: var(--ink-2); font-size: 12px; line-height: 16px; margin-top: 2px; }
  .rr__age { display: none; }
  .rr td.r { text-align: left; }
  .rr .c-price .odds { width: 100%; }
  .rr .c-price .odds small { display: block; }
  .rr td[data-pos-col], .rr td.r:not(.c-price) { display: flex; align-items: center; gap: 6px; }
  .rr td[data-pos-col]::before { content: attr(data-label); font-size: 12px; color: var(--ink-2); }
}

.bquote { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px; margin: 10px 14px 8px; border-radius: var(--r-m); background: var(--surface-2); }
.bquote__stake { flex: 0 0 160px; }
#ex-stake { padding-left: 34px; }   /* the race section is also .field, whose input padding would put "A$" over the amount */
.bquote__out { flex: 1 1 260px; font-size: 14px; }
.bquote__out b { font-size: 20px; }
.bquote__hint { color: var(--ink-2); }
.bquote__act { display: flex; gap: 8px; flex-wrap: wrap; }

.pick { display: grid; gap: 6px; margin-bottom: 14px; }
.pick a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-m); background: var(--surface-2); text-decoration: none; }
.pick a:hover { background: #E6ECF2; }
.pick span:nth-child(2) { flex: 1; min-width: 0; }
.pick b { display: block; }
.pick small { color: var(--ink-2); font-size: 12px; }
