/* Раменские бега. Светлый «каменный» фон, зелень поля и латунь; цвет дают фото, масти и чепраки. */
:root {
  --paper: #F3F4EF;
  --surface: #FFFFFF;
  --surface-2: #EBEDE6;
  --ink: #1A1D1A;
  --ink-2: #454B45;
  --muted: #737970;
  --line: #DCE0D7;
  --turf: #2F6A4F;
  --turf-2: #E2EDE6;
  --sand: #A97C45;
  --sand-2: #F2E9DC;
  --rose: #B23A31;
  --sky: #4C7393;
  --win-bg: #F7EEE9;
  --shadow: 0 1px 2px rgba(26, 29, 26, .05), 0 6px 24px rgba(26, 29, 26, .05);
  --display: 'Forum', 'Times New Roman', serif;
  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F110F; --surface: #171A17; --surface-2: #1F231F; --ink: #E8EBE5; --ink-2: #C5CBC3; --muted: #959C93;
    --line: #2B302A; --turf: #82C7A0; --turf-2: #1B2A21; --sand: #D2AE7C; --sand-2: #2A2318; --rose: #E8685F;
    --sky: #8FB4D3; --win-bg: #2A1B19; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F110F; --surface: #171A17; --surface-2: #1F231F; --ink: #E8EBE5; --ink-2: #C5CBC3; --muted: #959C93;
  --line: #2B302A; --turf: #82C7A0; --turf-2: #1B2A21; --sand: #D2AE7C; --sand-2: #2A2318; --rose: #E8685F;
  --sky: #8FB4D3; --win-bg: #2A1B19; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); overflow-x: hidden;
  font-variant-numeric: tabular-nums; }
a { color: var(--turf); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1 { font: 400 46px/1.08 var(--display); letter-spacing: .01em; }
h2 { font: 400 28px/1.15 var(--display); margin: 44px 0 14px; letter-spacing: .01em; }
h3 { font: 600 13px/1.3 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
p { margin: 0 0 12px; }
b, strong { font-weight: 600; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 20; background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted, .dim { color: var(--muted); }
.lede { font-size: 18px; color: var(--ink-2); max-width: 44em; margin-top: 12px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- шапка ---------- */
.top { background: var(--paper); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 26px; min-height: 70px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo .pt { width: 38px; height: 38px; }
.logo-t { font: 400 28px/1 var(--display); letter-spacing: .16em; text-transform: uppercase; }
.logo-t small { display: block; font: 500 10.5px/1.2 var(--sans); letter-spacing: .14em; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 2px; }
.nav a { color: var(--ink-2); padding: 8px 11px; font-weight: 500; font-size: 15px; white-space: nowrap; border-radius: 8px; }
.nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--sand); border-radius: 0; }
.find { margin-left: auto; position: relative; flex: 0 1 260px; min-width: 150px; }
.find input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface);
  color: var(--ink); padding: 0 14px 0 38px; font: 15px var(--sans); }
.find input:focus { outline: none; border-color: var(--turf); box-shadow: 0 0 0 3px var(--turf-2); }
.find-i { position: absolute; left: 13px; top: 12px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2; pointer-events: none; }
.find-m { display: none; margin-left: auto; width: 42px; height: 42px; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); }
.find-m svg { width: 18px; height: 18px; fill: none; stroke: var(--ink); stroke-width: 2; }

/* подсказки поиска */
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 30; overflow: hidden; min-width: 300px; }
.find .suggest { left: auto; width: 360px; }
.sg { display: grid; grid-template-columns: auto 1fr auto; gap: 0 12px; align-items: center; padding: 9px 14px; color: var(--ink); border-bottom: 1px solid var(--line); }
.sg:last-child { border-bottom: 0; }
.sg:hover, .sg.on { background: var(--surface-2); text-decoration: none; }
.sg .pt, .sg .silks { width: 30px; height: 30px; grid-row: span 2; }
.sg b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg em { font-style: normal; font-size: 12px; color: var(--muted); }
.sg span { grid-column: 2 / -1; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { padding-bottom: 64px; }
.ph { padding: 36px 0 6px; }
.crumbs { padding-top: 24px; font-size: 14px; color: var(--muted); }
.crumbs + .ph, .crumbs + .dayhead, .crumbs + .hero-horse { padding-top: 8px; }
.facts { margin: 10px 0 2px; font-size: 17px; color: var(--ink-2); }

/* ---------- портрет масти и камзол ---------- */
.pt { display: inline-block; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none; vertical-align: middle;
  background: radial-gradient(circle at 30% 25%, #FCFBF7, #E2E4DC); box-shadow: inset 0 0 0 1px rgba(26, 29, 26, .08); }
.pt svg { width: 100%; height: 100%; display: block; }
.coat-bay { --body: #8A4A24; --mane: #1A1310; }
.coat-dbay { --body: #5A2F17; --mane: #140E0B; }
.coat-lbay { --body: #B06A35; --mane: #2A1D15; }
.coat-chestnut { --body: #A9532A; --mane: #B9662F; }
.coat-dchestnut { --body: #7A3A1C; --mane: #6A3018; }
.coat-lchestnut { --body: #C88A4F; --mane: #DDB27A; }
.coat-black { --body: #262525; --mane: #0D0D0D; }
.coat-grey { --body: #B3B5B1; --mane: #7A7D79; --dapple: #D8DAD5; }
.coat-dgrey { --body: #737775; --mane: #3E4140; --dapple: #8E928F; }
.coat-lgrey { --body: #D6D7D3; --mane: #A9ABA7; --dapple: #ECEDEA; }
.coat-rgrey { --body: #A88878; --mane: #6E4636; --dapple: #C2A596; }
.coat-brown { --body: #3A2318; --mane: #120B08; }
.coat-none { --body: #9A9C98; --mane: #6C6E6A; }
.silks { display: inline-block; width: 22px; height: 22px; flex: none; vertical-align: middle; }
.silks svg { width: 100%; height: 100%; display: block; }
.who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }

/* ---------- чепрак: номер лошади на цвете заезда ---------- */
.cloth { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 1px 5px 0;
  border-radius: 3px 3px 9px 9px; font: 700 13px/1 var(--sans); vertical-align: middle; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14); }
.sw { display: inline-block; width: 11px; height: 11px; margin-right: 8px; border-radius: 2px 2px 5px 5px; vertical-align: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .16); }
.c-white { background: #FFFFFF; color: #12131F; box-shadow: inset 0 0 0 1px #C3C6CF; }
.c-black { background: #17181F; color: #FFFFFF; box-shadow: inset 0 0 0 1px #3C3F55; }
.c-pink { background: #F3A6C4; color: #12131F; }
.c-yellow { background: #F7D03C; color: #12131F; }
.c-blue { background: #2443CC; color: #FFFFFF; }
.c-red { background: #D7262E; color: #FFFFFF; }
.c-green { background: #1C8A4B; color: #FFFFFF; }
.c-orange { background: #F28A22; color: #12131F; }
.c-lilac { background: #B88CDB; color: #12131F; }
.c-sky { background: #7FC9F3; color: #12131F; }
.c-none { background: var(--surface-2); color: var(--ink); }

/* ---------- форма: места последних стартов ---------- */
.form { display: inline-flex; gap: 3px; vertical-align: middle; }
.form i { display: inline-block; width: 20px; height: 20px; font: 600 12px/20px var(--sans); font-style: normal; text-align: center;
  border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.form .f1 { background: var(--rose); color: #fff; }
.form .f3 { background: var(--sky); color: #fff; }
.form .fo { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.formline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; font-size: 14px; color: var(--muted); }
.lbl { font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-right: 8px; }

/* ---------- таблицы ---------- */
.tblwrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl th.num { text-align: right; }
.tbl tr.win td { background: var(--win-bg); }
.tbl tr.scr td { color: var(--muted); }
.tbl tr.scr .hn { color: var(--muted); text-decoration: line-through; }
.tbl.mini { font-size: 14px; }
.tbl.mini td { padding: 8px 10px; }
.hn { font-weight: 600; letter-spacing: .01em; color: var(--ink); }
a.hn:hover { color: var(--turf); }
.sub { display: block; font-size: 13px; color: var(--muted); font-weight: 400; line-height: 1.35; margin-top: 2px; }
.sub.warn, .sub.live { color: var(--rose); }
.of { font-size: 12px; color: var(--muted); margin-left: 4px; }
.c-pl { width: 56px; white-space: nowrap; }
.pl { font: 400 22px/1 var(--display); }
.pl1 { color: var(--rose); }
.note { font-size: 13px; color: var(--muted); }
.best { color: var(--rose); font-weight: 700; }
.show-s, .show-m { display: none !important; }
.card { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.panel { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); padding: 6px 18px; }
.panel .tbl td:first-child, .panel .tbl th:first-child { padding-left: 2px; }
.panel .tbl td:last-child, .panel .tbl th:last-child { padding-right: 2px; }

/* ---------- главная ---------- */
.hero { position: relative; margin: 0 0 8px; color: #fff; background: #1A1D1A; overflow: hidden; }
.hero img { width: 100%; height: 560px; object-fit: cover; opacity: .92; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 12, 10, .05) 30%, rgba(10, 12, 10, .72)); }
.hero-in { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding-bottom: 76px; }
.hero h1 { font-size: 64px; max-width: 12em; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero .lede { color: #E9ECE6; max-width: 38em; }
.hero-cap { position: absolute; right: 20px; top: 18px; z-index: 2; font-size: 12.5px; color: rgba(255, 255, 255, .88);
  background: rgba(10, 12, 10, .45); padding: 5px 11px; border-radius: 12px; backdrop-filter: blur(6px); }
.hero-cap a { color: #fff; }
.eyebrow { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--sand); margin-bottom: 12px; display: block; }
.hero .eyebrow { color: #E7CFA6; }
.bigfind { position: relative; display: flex; gap: 8px; max-width: 620px; margin: 22px 0 0; }
.bigfind input { flex: 1; min-width: 0; height: 52px; border: 1px solid var(--line); border-radius: 26px; background: var(--surface);
  color: var(--ink); padding: 0 20px; font: 17px var(--sans); }
.bigfind input:focus { outline: none; border-color: var(--turf); box-shadow: 0 0 0 4px var(--turf-2); }
.bigfind button { height: 52px; padding: 0 24px; border: 0; border-radius: 26px; background: var(--turf); color: #fff;
  font: 600 16px var(--sans); cursor: pointer; }
.bigfind button:hover { filter: brightness(1.08); }
.bigfind .suggest { right: 0; top: 58px; }
.hero .bigfind input { border-color: transparent; }
.intro { padding: 40px 0 8px; }

.today { margin-top: -54px; position: relative; z-index: 3; padding: 22px 26px 12px; }
.today-h { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.today-h h2 { margin: 0; font-size: 26px; }
.prog-rows { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.prog-rows a { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); }
.prog-rows a:hover { text-decoration: none; }
.prog-rows a:hover .pr-c { color: var(--turf); }
.pr-no { font: 400 22px/1 var(--display); grid-row: span 2; display: flex; align-items: center; gap: 2px; min-width: 40px; }
.pr-t { font-weight: 600; font-size: 14px; }
.pr-t span { color: var(--muted); font-weight: 400; }
.pr-c { font-size: 13px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.sec-h { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin: 48px 0 16px; }
.sec-h h2 { margin: 0; }
.sec-h a { font-size: 15px; }
.grid-races { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.rc { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); transition: transform .2s ease; }
.rc:hover { text-decoration: none; transform: translateY(-2px); }
.rc-img { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.rc-img img { width: 100%; height: 100%; object-fit: cover; }
.rc-img .badge { position: absolute; left: 12px; top: 12px; }
.rc-noimg { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; padding: 14px 16px 0; }
.rc-noimg .pt { width: 44px; height: 44px; }
.rc-noimg .badge { padding-left: 0; background: none; box-shadow: none; color: var(--ink); }
.rc-b { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.rc-meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.rc-name { font: 400 21px/1.15 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.rc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--ink-2); }
.badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .92); color: #1A1D1A; border-radius: 12px;
  padding: 4px 10px 4px 6px; font-size: 13px; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }

.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.lead { list-style: none; margin: 0 0 6px; padding: 0; }
.lead li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.lead li:last-child { border-bottom: 0; }
.lead .rk { width: 18px; flex: none; font: 400 18px var(--display); color: var(--sand); text-align: center; }
.lead a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead b { font-size: 15px; }
.box { padding: 18px 20px 12px; }
.more { display: inline-block; font-size: 14px; margin-top: 6px; font-weight: 500; }
.more::after { content: ' →'; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; color: var(--ink); min-height: 158px; position: relative; overflow: hidden;
  transition: transform .2s ease; }
.tile:hover { text-decoration: none; transform: translateY(-2px); }
.tile .t-k { font: 600 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--sand); }
.tile .t-v { font: 400 36px/1.05 var(--display); letter-spacing: .02em; margin-top: 4px; }
.tile .t-d { font-size: 14px; color: var(--ink-2); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gallery a { position: relative; display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--surface-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery span { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 9px; color: #fff; font-size: 13px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .65)); }
.gallery.big { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }

.daychips { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.dchip { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface);
  box-shadow: var(--shadow); color: var(--ink); }
.dchip:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--turf), var(--shadow); }
.dchip b { font: 400 30px/1 var(--display); }
.dchip span { font-size: 13px; color: var(--ink-2); }
.dchip small { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.dchip.prog { box-shadow: inset 0 0 0 1.5px var(--sand); }
.dchip .wx { width: 15px; height: 15px; }
.tote-dot { position: absolute; top: 13px; right: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--sand); }
.tote-dot.inline { position: static; display: inline-block; vertical-align: 1px; }

/* ---------- беговой день ---------- */
.dayhead { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; padding: 34px 0 6px; }
.dayhead h1 small { display: block; font: 500 16px/1.4 var(--sans); color: var(--muted); margin-top: 8px; letter-spacing: 0; }
.daynav { display: flex; gap: 8px; }
.daynav a { padding: 8px 14px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); font-size: 14px; color: var(--ink); }
.weather { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 20px; background: var(--surface);
  box-shadow: var(--shadow); font-size: 14px; color: var(--ink-2); margin-top: 12px; }
.weather .wx { width: 22px; height: 22px; color: var(--sand); }
.weather b { color: var(--ink); }
.wx { display: inline-block; width: 18px; height: 18px; vertical-align: middle; color: var(--muted); }
.racenav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.racenav a { display: inline-flex; align-items: center; padding: 7px 13px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow);
  color: var(--ink); font-weight: 600; font-size: 14px; }
.racenav a small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.racenav a:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--turf), var(--shadow); }
.race { background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); margin: 20px 0; overflow: hidden; scroll-margin-top: 12px; }
.race-top { display: grid; grid-template-columns: minmax(0, 1fr); }
.race-top.has-img { grid-template-columns: 300px minmax(0, 1fr); }
.race-img { position: relative; display: block; background: var(--surface-2); }
.race-img img { width: 100%; height: 100%; object-fit: cover; min-height: 170px; }
.race-img .cap { position: absolute; left: 10px; bottom: 10px; font-size: 12px; color: #fff; background: rgba(0, 0, 0, .45); padding: 3px 8px; border-radius: 10px; }
.race-h { padding: 20px 24px 12px; }
.race-h h2 { margin: 0; font-size: 30px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.race-h h2 .sw { width: 16px; height: 16px; margin: 0; }
.race-m { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.cond { margin: 8px 0 0; font-size: 14px; color: var(--ink-2); max-width: 62em; }
.watch { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 16px 8px 10px; border: 0; border-radius: 20px;
  background: var(--turf-2); color: var(--turf); font: 600 14px var(--sans); cursor: pointer; }
.watch:hover { filter: brightness(.97); text-decoration: none; }
.watch i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--turf); color: #fff; font-style: normal; font-size: 10px; }
.player { aspect-ratio: 16 / 9; width: 100%; border: 0; display: block; background: #000; }
.race-body { padding: 0 24px 6px; }
.race-f { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; padding: 14px 24px 18px; font-size: 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.race-f p { margin: 0; }
.pays { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; }
.pays div { display: flex; gap: 6px; align-items: baseline; }
.pays dt { color: var(--muted); }
.pays dd { margin: 0; font-weight: 700; }
.legend { font-size: 13px; color: var(--muted); max-width: 62em; margin-top: 20px; }
.legend .form i { width: 17px; height: 17px; line-height: 17px; font-size: 11px; }
.callout { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 18px; margin: 16px 0; border-left: 4px solid var(--sand); }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout li { margin: 4px 0; }
.callout .cloth { margin: 0 2px; }

/* ---------- вкладки, сортировка ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 10px; }
.tabs a { padding: 7px 15px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-size: 14px; font-weight: 500; }
.tabs a:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--turf), var(--shadow); }
.tabs a[aria-current] { background: var(--ink); color: var(--paper); }
.sorts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; margin: 6px 0 12px; }
.sorts span { color: var(--muted); }
.sorts a { color: var(--ink-2); }
.sorts a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--sand); }
.pager { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin: 18px 0; }

/* ---------- лошадь ---------- */
.hero-horse { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 34px; align-items: center; padding: 30px 0 8px; }
.hero-horse .pt { width: 220px; height: 220px; box-shadow: 0 10px 40px rgba(26, 29, 26, .12), inset 0 0 0 1px rgba(26, 29, 26, .06); }
.hero-horse h1 { font: 400 54px/1.02 var(--display); letter-spacing: .07em; text-transform: uppercase; overflow-wrap: anywhere; }
.plate { display: inline-block; padding-bottom: 10px; border-bottom: 2px solid var(--sand); }
.ped { margin: 8px 0 0; color: var(--ink-2); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 16px; background: var(--sand-2); color: var(--ink);
  font-size: 13.5px; font-weight: 500; }
.chip.green { background: var(--turf-2); }
.chip.rose { background: var(--win-bg); }
.story { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 46em; margin: 22px 0 6px; }
.story b { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; margin: 24px 0 14px; padding: 6px 0; }
.stats div { padding: 12px 20px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats dt { font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stats dd { margin: 6px 0 0; font: 400 32px/1.05 var(--display); }
.stats dd.rub { font-size: 24px; }
.stats small { font: 500 14px var(--sans); color: var(--muted); margin-left: 6px; }
.chart { margin: 0; padding: 16px 18px 12px; max-width: 900px; }
.chart-scroll { overflow-x: auto; }
.chart svg { display: block; width: 100%; min-width: 560px; height: auto; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .yr { stroke-dasharray: 3 4; }
.chart .ax { fill: var(--muted); font: 12px var(--sans); }
.chart .p1 { fill: var(--rose); }
.chart .p3 { fill: var(--sky); }
.chart .px { fill: var(--surface); stroke: var(--muted); stroke-width: 1.5; }
.chart .trend { fill: none; stroke: var(--sand); stroke-width: 2.2; stroke-linejoin: round; }
.chart .area { fill: var(--turf-2); }
.chart .line { fill: none; stroke: var(--turf); stroke-width: 2.2; stroke-linejoin: round; }
.chart figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin: 0 4px 0 8px; vertical-align: -1px; }
.key.p1 { background: var(--rose); }
.key.p3 { background: var(--sky); }
.key.px { box-shadow: inset 0 0 0 1.5px var(--muted); }
.key.tr { width: 16px; height: 3px; border-radius: 2px; background: var(--sand); vertical-align: 2px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.two > * { min-width: 0; overflow-x: auto; }
.two .tbl + .tbl { margin-top: 16px; }
.tbl .num.wrap { white-space: normal; }
.duel { display: flex; width: 120px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-2); }
.duel .a { background: var(--turf); }
.duel .b { background: var(--line); }
.pbar { display: inline-block; width: 90px; height: 8px; border-radius: 4px; background: var(--surface-2); vertical-align: middle; overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--rose); }
.pv { font-size: 13px; margin-left: 8px; }
.scroll-y { max-height: 470px; overflow-y: auto; }
.results { list-style: none; padding: 0; margin: 0; }
.results li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.results li .pt, .results li .silks { width: 40px; height: 40px; }
.play { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--turf-2); color: var(--turf); font-size: 9px; }
.play:hover { background: var(--turf); color: #fff; text-decoration: none; }
.family { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.fam { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); }
.fam:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--turf), var(--shadow); }
.fam .pt { width: 46px; height: 46px; }
.fam b { display: block; font: 400 16px/1.2 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.fam span { font-size: 13px; color: var(--muted); }

/* ---------- цифры: бары ---------- */
.bars { display: grid; gap: 12px; max-width: 780px; margin: 16px 0; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 64px; gap: 4px 14px; align-items: center; }
.bar-row.head { font: 600 11.5px var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.bl { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.bt { position: relative; height: 26px; background: var(--surface-2); border-radius: 13px; }
.bt i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--turf); border-radius: 13px; }
.bt i.sand { background: var(--sand); }
.bt i.rose { background: var(--rose); }
.bt em { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--rose); }
.bv { text-align: right; font-weight: 700; }
.bn { grid-column: 2 / 4; font-size: 13px; color: var(--muted); margin-top: -2px; }
.big-num { display: grid; grid-template-columns: auto 1fr; gap: 8px 30px; align-items: center; padding: 26px 30px; margin: 22px 0; }
.big-num .v { font: 400 92px/1 var(--display); color: var(--rose); }
.big-num h2 { margin: 0 0 8px; font-size: 26px; }
.big-num p { margin: 0; max-width: 48em; color: var(--ink-2); }
ul.plain { margin: 0 0 12px; padding-left: 20px; }
ul.plain li { margin: 6px 0; }
.prose { max-width: 46em; }
.prose h2 { margin-top: 30px; }
.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px 16px; align-items: center; padding: 16px 18px; }
.vs .side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vs .side.r { justify-content: flex-end; text-align: right; }
.vs .side b { font: 400 17px/1.15 var(--display); letter-spacing: .05em; text-transform: uppercase; }
.vs .side .pt { width: 40px; height: 40px; }
.vs .score { font: 400 30px/1 var(--display); white-space: nowrap; }
.vs .score span { color: var(--muted); margin: 0 4px; }
.vs .bar { grid-column: 1 / -1; display: flex; height: 6px; border-radius: 3px; overflow: hidden; background: var(--surface-2); }
.vs .bar i { background: var(--turf); }
.vs .bar i + i { background: var(--sand); }
.vs .meta { grid-column: 1 / -1; font-size: 13px; color: var(--muted); text-align: center; margin-top: -4px; }
.vs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }

/* ---------- подвал ---------- */
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.foot-in { padding: 26px 20px 34px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px 40px; }
.foot p { max-width: 60em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; align-content: start; }

@media (max-width: 1020px) {
  .top-in { flex-wrap: wrap; gap: 0 12px; min-height: 0; padding-top: 12px; }
  .find { display: none; }
  .find-m { display: inline-grid; }
  .nav { order: 3; width: calc(100% + 40px); margin: 6px -20px 0; padding: 0 14px 6px; overflow-x: auto; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .nav::-webkit-scrollbar { display: none; }
  .hide-m { display: none; }
  .show-m { display: block !important; }
  .cols3 { grid-template-columns: 1fr; gap: 14px; }
  .two { grid-template-columns: 1fr; }
  .prog-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .race-top.has-img { grid-template-columns: 220px minmax(0, 1fr); }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 34px; }
  h2 { font-size: 24px; margin-top: 36px; }
  .nav { width: calc(100% + 32px); margin: 6px -16px 0; padding: 0 10px 6px; }
  .logo-t { font-size: 24px; }
  .hero img { height: 520px; }
  .hero h1 { font-size: 40px; }
  .hero .lede { font-size: 16px; }
  .hero-in { padding-bottom: 52px; }
  .hero-cap { left: 16px; right: auto; top: 12px; }
  .today { margin-top: -30px; padding: 18px 16px 8px; }
  .prog-rows { grid-template-columns: 1fr; }
  .lede { font-size: 16px; }
  .hide-s { display: none; }
  .show-s { display: block !important; }
  .race { margin-left: -16px; margin-right: -16px; border-radius: 0; }
  .race-top.has-img { grid-template-columns: 1fr; }
  .race-img img { min-height: 0; aspect-ratio: 16 / 9; }
  .race-h { padding: 16px 16px 10px; }
  .race-h h2 { font-size: 26px; }
  .race-body { padding: 0 16px 4px; }
  .race-f { padding: 12px 16px 16px; }
  .tbl { font-size: 14px; }
  .tbl td, .tbl th { padding-left: 6px; padding-right: 6px; }
  .tbl th { letter-spacing: .02em; font-size: 11px; }
  .tbl td:first-child, .tbl th:first-child { padding-left: 0; }
  .tbl td:last-child, .tbl th:last-child { padding-right: 0; }
  .c-pl { width: 36px; }
  .pl { font-size: 19px; }
  .hero-horse { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .hero-horse .pt { width: 132px; height: 132px; }
  .hero-horse h1 { font-size: 36px; }
  .story { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div { border-left: 0; border-top: 1px solid var(--line); padding: 12px 6px; }
  .stats div:nth-child(-n+2) { border-top: 0; }
  .stats dd { font-size: 28px; }
  .big-num { grid-template-columns: 1fr; padding: 20px; }
  .big-num .v { font-size: 72px; }
  .bar-row { grid-template-columns: 92px 1fr 52px; gap: 4px 10px; }
  .daychips { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .vs-list { grid-template-columns: 1fr; }
  .vs .side b { font-size: 15px; }
  .vs .score { font-size: 24px; }
  .bigfind button { padding: 0 18px; }
  .panel { padding: 4px 14px; border-radius: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- просмотр фото ---------- */
[data-ph] { cursor: zoom-in; }
html.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 100; background: #0B0D0B; color: #EEF0EA;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lb[hidden] { display: none; }
.lb-top { display: flex; align-items: center; gap: 16px; padding: 12px 16px 8px 20px; }
.lb-count { color: #9EA59C; font-size: 14px; white-space: nowrap; }
.lb-title { flex: 1; min-width: 0; font: 400 22px/1.2 var(--display); letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-x, .lb-nav { border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lb-x { width: 44px; height: 44px; font-size: 18px; flex: none; }
.lb-nav { width: 52px; height: 52px; font: 400 34px/1 var(--sans); padding-bottom: 4px; justify-self: center; }
.lb-x:hover, .lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-stage { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr) 80px; align-items: center; min-height: 0; }
.lb-media { position: relative; height: 100%; min-height: 0; }
.lb-img { position: absolute; left: 0; top: 4px; width: 100%; height: calc(100% - 8px); object-fit: contain; }
.lb-media iframe { position: absolute; inset: 0; margin: auto; width: min(100%, calc((100vh - 260px) * 16 / 9)); max-height: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #000; }
.lb-cap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 10px 20px 20px; display: grid; gap: 12px; }
.lb-field { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.lb-h { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 16px; background: rgba(255, 255, 255, .08);
  color: #EEF0EA; font-size: 13.5px; }
a.lb-h:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
.lb-h.me { box-shadow: inset 0 0 0 1.5px var(--sand); background: rgba(210, 174, 124, .14); }
.lb-h i { font-style: normal; color: #9EA59C; font-size: 12px; }
.lb-h i.win { color: #F08C82; font-weight: 700; }
.lb-h b { font-weight: 600; letter-spacing: .01em; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.lb-actions .watch { margin: 0; background: rgba(130, 199, 160, .16); color: #BFE3CD; }
.lb-actions .watch i { background: #82C7A0; color: #0F110F; }
.lb-actions .lnk { color: #CFE3D7; font-size: 14px; }
.lb-actions .lnk.dim { color: #9EA59C; }
.ph-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 10px; }
.ph-days { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-days a { padding: 5px 10px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); font-size: 13px; }
.ph-days a span { color: var(--muted); margin-left: 3px; }
.ph-days a:hover { text-decoration: none; box-shadow: 0 0 0 1px var(--turf), var(--shadow); }
.ph-day { scroll-margin-top: 10px; }
.ph-day[hidden], .gallery a[hidden] { display: none; }
@media (max-width: 640px) {
  .lb-top { padding: 10px 12px 6px 14px; gap: 10px; }
  .lb-title { font-size: 16px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .lb-stage { grid-template-columns: minmax(0, 1fr); }
  .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; font-size: 26px;
    background: rgba(0, 0, 0, .45); }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-media { grid-column: 1; }
  .lb-cap { padding: 10px 14px 16px; max-height: 42vh; overflow-y: auto; }
}
