/* Prognosi — дизайн-система.
   Жанр: спортивное медиа + данные (sports.ru, flashscore, legalbet):
   тёмная шапка, светлый контент, плотные строки матчей, цвет = смысл
   (зелёный — победа/прошёл, красный — поражение/live, жёлтый — ожидание),
   карточки с тонкой рамкой без теней. Витрина: /styleguide/. */

/* Inter со своего домена (вариативный, 100–900): без запроса к Google и без блокировки отрисовки.
   Файлы — @fontsource-variable/inter, подмножества кириллица и латиница. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-cyrillic.de93fdc85e3d.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin.260c81a4759b.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
                 U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- 1. Токены ---------- */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #f2f4f6;
  --surface: #ffffff;
  --surface-2: #f6f8fa;
  --line: #e2e6ea;
  --line-strong: #cfd5db;
  --fg: #0f1720;
  --fg-2: #33404c;
  --muted: #64717e;

  --chrome: #0d151e;          /* шапка и тёмные плашки */
  --chrome-2: #17212c;
  --chrome-fg: #e9eef3;
  --chrome-muted: #93a1ae;

  --accent: #00a85a;          /* бренд: «прошёл» */
  --accent-strong: #00894a;   /* ссылки и текст на светлом — контраст 4.5:1 */
  --accent-soft: #e2f5eb;
  --on-accent: #ffffff;

  --win: #12a150;
  --win-soft: #e3f5ea;
  --loss: #e03a3e;
  --loss-soft: #fde8e8;
  --draw: #8a96a3;
  --draw-soft: #eef1f4;
  --pending: #d99200;
  --pending-soft: #fdf3dc;
  --live: #e03a3e;

  --cta: #ffcc00;             /* кнопка перехода к букмекеру */
  --on-cta: #111111;

  --r-sm: 6px;
  --r-md: 10px;
  --r-pill: 999px;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;

  --t-xs: 12px; --t-sm: 13px; --t-base: 15px; --t-md: 17px; --t-lg: 20px; --t-xl: 26px; --t-2xl: 34px;

  --content: 760px;           /* колонка текста */
  --page: 1180px;             /* страница с сайдбаром */
  --team-lift: 0%;            /* насколько осветлить цвет клуба: тёмные клубные цвета на тёмном фоне не видны */
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1017; --surface: #111a23; --surface-2: #17212c; --line: #213040; --line-strong: #2d3e50;
    --fg: #e6edf3; --fg-2: #c3cdd6; --muted: #8b99a7;
    --chrome: #060b10; --chrome-2: #111a23;
    --accent: #1fc777; --accent-strong: #3ad48a; --accent-soft: #0f2b1e;
    --win: #2ecc71; --win-soft: #0f2b1e; --loss: #ff5a5f; --loss-soft: #341518;
    --draw-soft: #1c2631; --pending: #f0b429; --pending-soft: #33280d;
    --team-lift: 50%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1017; --surface: #111a23; --surface-2: #17212c; --line: #213040; --line-strong: #2d3e50;
  --fg: #e6edf3; --fg-2: #c3cdd6; --muted: #8b99a7;
  --chrome: #060b10; --chrome-2: #111a23;
  --accent: #1fc777; --accent-strong: #3ad48a; --accent-soft: #0f2b1e;
  --win: #2ecc71; --win-soft: #0f2b1e; --loss: #ff5a5f; --loss-soft: #341518;
  --draw-soft: #1c2631; --pending: #f0b429; --pending-soft: #33280d;
  --team-lift: 50%;
  color-scheme: dark;
}

/* ---------- 2. Основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  font: 400 var(--t-base)/1.55 var(--font);
  font-feature-settings: "tnum" 1, "cv11" 1;
}
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--t-2xl); font-weight: 800; }
h2 { font-size: var(--t-xl); font-weight: 800; }
h3 { font-size: var(--t-lg); font-weight: 700; }
@media (max-width: 640px) {
  h1 { font-size: var(--t-xl); }
  h2 { font-size: var(--t-lg); }
}
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 3. Каркас страницы ---------- */
.container { max-width: var(--page); margin: 0 auto; padding: 0 var(--s-4); }
.layout { display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
.layout--single { grid-template-columns: minmax(0, var(--content)); justify-content: center; }
/* Сайдбар без содержимого (нет статей и т. п.) не держит пустую колонку справа. */
.layout:not(:has(> .sidebar > *)):not(.layout--single) { grid-template-columns: minmax(0, 1fr); }
.layout:not(:has(> .sidebar > *)) > .sidebar { display: none; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); } }
main { padding: var(--s-5) 0 var(--s-7); flex: 1 0 auto; } /* подвал прижат к низу на коротких страницах */
.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }

/* Шапка: строка с логотипом, видами спорта и разделами; под ней подменю текущего вида спорта. */
.site-header { background: var(--chrome); color: var(--chrome-fg); position: sticky; top: 0; z-index: 10; }
.site-header__row { display: flex; align-items: center; gap: var(--s-3); min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 9px; flex: none; color: #fff; margin-right: var(--s-3); }
.logo:hover { text-decoration: none; }
.logo__word { font-weight: 800; font-size: 19px; letter-spacing: -0.035em; }
.logo__word b { color: var(--accent); font-weight: 800; }
.logo__mark { transition: transform .25s ease; }
.logo:hover .logo__mark { transform: rotate(-12deg); }
.main-nav { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.main-nav a {
  color: var(--chrome-muted); font-weight: 600; font-size: var(--t-sm); padding: 7px 13px; border-radius: var(--r-pill);
  white-space: nowrap; transition: color .15s, background-color .15s;
}
.main-nav a:hover { color: #fff; text-decoration: none; background: var(--chrome-2); }
.main-nav a[aria-current="page"] { color: #fff; background: var(--chrome-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.main-nav__sep { width: 1px; height: 18px; background: var(--chrome-2); margin: 0 8px; flex: none; }
.header-search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; width: 220px; flex: none;
  border-radius: var(--r-pill); background: var(--chrome-2); color: var(--chrome-muted); transition: box-shadow .15s;
}
.header-search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.header-search svg { flex: none; }
.header-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--chrome-fg);
  font: 500 var(--t-sm) var(--font);
}
.header-search input::placeholder { color: var(--chrome-muted); }
.header-search input::-webkit-search-cancel-button { display: none; }
.theme-toggle {
  display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: var(--r-pill);
  background: var(--chrome-2); color: var(--chrome-fg); cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle__sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle__moon { display: none; }
}
.sub-nav { background: var(--chrome-2); border-top: 1px solid rgba(255,255,255,.04); }
.sub-nav__row { display: flex; align-items: center; gap: var(--s-4); min-height: 42px; }
.sub-nav__links { display: flex; gap: var(--s-1); overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.sub-nav__links a {
  color: var(--chrome-muted); font-weight: 600; font-size: var(--t-sm); padding: 11px 10px 9px; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.sub-nav__links a:hover { color: #fff; text-decoration: none; }
.sub-nav__links a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }
.live-chip {
  display: inline-flex; align-items: center; gap: 7px; flex: none; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  background: rgba(255, 90, 95, .14); color: #ff8a8d; font: 700 var(--t-xs)/1 var(--font);
}
.live-chip:hover { text-decoration: none; background: rgba(255, 90, 95, .22); }
.live-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.2s infinite; }
@media (prefers-reduced-motion: reduce) { .live-chip i { animation: none; } .logo__mark { transition: none; } }
@media (max-width: 1180px) { .header-search { width: 160px; } .main-nav a { padding: 7px 10px; } }
/* Узкий экран: логотип, поиск и тема в первой строке, разделы — прокручиваемой лентой под ними. */
@media (max-width: 960px) {
  /* Поле прозрачно лежит поверх иконки: тап по ней фокусирует его, и форма раскрывается на всю строку. */
  .header-search { position: relative; width: 36px; padding: 0; justify-content: center; }
  .header-search input { position: absolute; inset: 0; opacity: 0; }
  .header-search:focus-within { position: absolute; top: 10px; left: var(--s-4); right: calc(var(--s-4) + 44px); width: auto; padding: 0 14px; justify-content: flex-start; z-index: 1; }
  .header-search:focus-within input { position: static; opacity: 1; }
  .site-header__row { flex-wrap: wrap; position: relative; row-gap: 0; }
  .logo { margin-right: auto; min-height: 56px; }
  .site-header__row > .live-chip .live-chip__label { display: none; }
  .main-nav { order: 3; flex-basis: 100%; margin: 0 calc(-1 * var(--s-4)); padding: 0 var(--s-4) 10px;
    mask-image: linear-gradient(to right, #000 85%, transparent); }
  .sub-nav__links { mask-image: linear-gradient(to right, #000 85%, transparent); }
}
/* Подвал: бренд с подписью, три колонки ссылок, внизу 18+ и предупреждение. */
.site-footer { background: var(--chrome); color: var(--chrome-muted); font-size: var(--t-sm); padding: var(--s-7) 0 var(--s-5); }
.site-footer__top { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.site-footer__brand p { margin: var(--s-3) 0 0; max-width: 340px; line-height: 1.6; }
.site-footer__col { display: flex; flex-direction: column; gap: 9px; }
.site-footer__col h3 { margin: 0 0 4px; color: #fff; font-size: var(--t-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.site-footer__col a { color: var(--chrome-muted); font-weight: 500; width: fit-content; }
.site-footer__col a:hover { color: #fff; text-decoration: none; }
.site-footer__bottom {
  display: flex; align-items: center; gap: var(--s-4); margin-top: var(--s-6); padding-top: var(--s-5);
  border-top: 1px solid var(--chrome-2); font-size: var(--t-xs); line-height: 1.5;
}
.site-footer__bottom p { margin: 0; flex: 1; }
.site-footer__copy { white-space: nowrap; }
.age-badge {
  display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--loss); color: #fff; font: 800 var(--t-sm)/1 var(--font);
}
@media (max-width: 860px) {
  .site-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .site-footer__bottom { flex-wrap: wrap; }
  .site-footer__bottom p { flex-basis: calc(100% - 54px); }
}

/* Хлебные крошки */
.breadcrumbs { font-size: var(--t-sm); color: var(--muted); margin-bottom: var(--s-3); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs span + span::before { content: "/"; margin: 0 6px; color: var(--line-strong); }

/* Заголовок страницы сущности */
.page-head { display: flex; gap: var(--s-4); align-items: center; margin-bottom: var(--s-4); }
.page-head__meta { color: var(--muted); font-size: var(--t-sm); margin-top: 4px; }

/* ---------- 4. Компоненты ---------- */

/* Панель — базовая поверхность */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.panel__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line);
}
.panel__title { font-weight: 800; font-size: var(--t-md); }
.panel__body { padding: var(--s-4); }
.panel__more { font-size: var(--t-sm); font-weight: 600; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px;
  border-radius: var(--r-sm); border: 1px solid transparent; font: 700 var(--t-sm)/1 var(--font);
  cursor: pointer; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(0.96); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--cta { background: var(--cta); color: var(--on-cta); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn--sm { height: 32px; padding: 0 12px; font-size: var(--t-xs); }
.btn--block { width: 100%; }

/* Бейджи */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--r-sm);
  font: 700 11px/1 var(--font); letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap;
  background: var(--draw-soft); color: var(--fg-2);
}
.badge--win { background: var(--win-soft); color: var(--win); }
.badge--loss { background: var(--loss-soft); color: var(--loss); }
.badge--pending { background: var(--pending-soft); color: var(--pending); }
.badge--live { background: var(--live); color: #fff; }
.badge--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.2s infinite; }
.badge--accent { background: var(--accent-soft); color: var(--accent-strong); }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .badge--live::before { animation: none; } }

/* Пилюли-фильтры и вкладки */
.pills { display: flex; gap: var(--s-2); overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pill {
  height: 32px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line); color: var(--fg-2);
  font-weight: 600; font-size: var(--t-sm); white-space: nowrap;
}
/* Алфавит и другие короткие наборы: переносятся строками, а не прячутся за краем. */
.pills--wrap { flex-wrap: wrap; overflow: visible; gap: 6px; }
.pills--wrap .pill { height: 30px; min-width: 30px; padding: 0 9px; justify-content: center; }
.pill:hover { text-decoration: none; border-color: var(--line-strong); }
/* Инверсия текста и фона: видно и в светлой теме, и в тёмной, где --chrome почти равен фону. */
.pill[aria-current="true"], .pill.is-active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tabs { display: flex; gap: var(--s-4); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 0; color: var(--muted); font-weight: 600; font-size: var(--t-sm); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--fg); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--accent); }

/* Эмблема: логотип или монограмма в цветах клуба */
.crest {
  --c1: var(--chrome-2); --c2: #fff;
  width: var(--size, 28px); height: var(--size, 28px); flex: none; border-radius: 50%;
  display: inline-grid; place-items: center; overflow: hidden;
  background: var(--c1); color: var(--c2);
  font: 800 calc(var(--size, 28px) * 0.36)/1 var(--font); letter-spacing: -0.02em;
}
.crest img { width: 100%; height: 100%; object-fit: contain; }
.crest:has(img) { background: transparent; border-radius: 0; }
.crest--lg { --size: 64px; }
.crest--md { --size: 40px; }
.crest--sm { --size: 22px; }
.crest--long { font-size: calc(var(--size, 28px) * 0.27); letter-spacing: -0.04em; }
.avatar { border-radius: var(--r-md); }

/* Форма команды: квадраты В/П/ОТ */
.form { display: inline-flex; gap: 3px; }
.form i {
  width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center;
  font: 800 10px/1 var(--font); font-style: normal; color: #fff; background: var(--draw);
}
.form i.W { background: var(--win); }
.form i.L { background: var(--loss); }
.form i.OTW { background: var(--win-soft); color: var(--win); box-shadow: inset 0 0 0 1.5px var(--win); }
.form i.OTL { background: var(--loss-soft); color: var(--loss); box-shadow: inset 0 0 0 1.5px var(--loss); }
.form i[title] { cursor: help; }

/* Плашка лиги над списком матчей */
.league-head {
  display: flex; align-items: center; gap: var(--s-2); padding: 8px var(--s-4);
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-weight: 700; font-size: var(--t-sm);
}
.league-head a { color: var(--fg); }
.league-head .muted { font-weight: 500; margin-left: auto; }

/* Строка матча */
.match-row {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: var(--s-3); align-items: center;
  padding: 10px var(--s-4); border-bottom: 1px solid var(--line); color: var(--fg);
}
.match-row:last-child { border-bottom: 0; }
.match-row:hover { background: var(--surface-2); text-decoration: none; }
.match-row__time { font-size: var(--t-sm); color: var(--muted); line-height: 1.3; }
.match-row__time b { display: block; color: var(--fg); font-weight: 700; }
.match-row__teams { display: grid; gap: 6px; min-width: 0; }
.match-row__team { display: flex; align-items: center; gap: var(--s-2); min-width: 0; font-weight: 500; }
.match-row__team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-row__team.is-winner { font-weight: 800; }
.match-row__score { display: grid; gap: 6px; text-align: right; font-weight: 800; min-width: 18px; }
.match-row__odds { display: flex; gap: 4px; }
@media (max-width: 520px) { .match-row { grid-template-columns: 46px minmax(0, 1fr) auto; } .match-row__odds { display: none; } }

/* Коэффициент */
.odd {
  display: inline-grid; place-items: center; min-width: 52px; height: 36px; padding: 0 6px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  font-size: var(--t-sm); font-weight: 700; line-height: 1.05; color: var(--fg);
}
.odd small { display: block; font-size: 10px; font-weight: 600; color: var(--muted); }
.odd.is-best { border-color: var(--accent); background: var(--accent-soft); }

/* Таблица */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.table th {
  text-align: right; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { text-align: right; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th:first-child, .table td:first-child { text-align: center; width: 36px; color: var(--muted); }
.table th.l, .table td.l { text-align: left; }
.table .grow { width: 100%; } /* остальные колонки по содержимому — таблицы конференций выравниваются */
.table th:not(.grow):not(:first-child) { min-width: 36px; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-highlight td { background: var(--accent-soft); }
.table .team-cell { display: flex; align-items: center; gap: var(--s-2); font-weight: 600; color: var(--fg); }
.table td.pts { font-weight: 800; }
.table tr.zone-line td { border-bottom: 2px solid var(--line-strong); }
.table tr.table__group td { text-align: left; color: var(--muted); background: var(--surface-2); font-size: var(--t-xs);
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 6px 12px; }
.panel__toggle { display: block; width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--accent-strong); font: 600 var(--t-sm)/1.2 var(--font); cursor: pointer; }
.panel__toggle:hover { background: var(--surface-2); }
.table .show-sm { display: none; }
@media (max-width: 520px) {
  .table .hide-sm { display: none; }
  .table .show-sm { display: block; font-size: var(--t-xs); margin-top: 2px; }
  /* Длинное название в главной колонке переносится, чтобы числа справа не уезжали за край экрана. */
  .table td.grow { white-space: normal; }
}

/* Факты */
/* Флекс с ростом ячеек: неполный последний ряд растягивается на всю ширину — без пустых дыр, как у сетки.
   Разделители — тенями ячеек, контейнер обрезает лишние по краям. */
.facts { display: flex; flex-wrap: wrap; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; padding: 0; list-style: none; }
:where(.facts) { margin: 0; } /* нулевая специфичность: отступ задаёт .stack */
.facts li { flex: 1 1 160px; display: grid; gap: 3px; align-content: start; padding: 12px 16px;
  box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); margin: 0 -1px -1px 0; }
.facts b { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.facts span { font-weight: 700; font-size: var(--t-base); line-height: 1.35; }

/* Большое число */
.stat { display: grid; gap: 2px; }
.stat__value { font-size: var(--t-xl); font-weight: 800; letter-spacing: -0.02em; }
.stat__label { font-size: var(--t-xs); color: var(--muted); }

/* Карточки сущностей в статьях */
.entity-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-4); align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4);
  margin: var(--s-5) 0; color: var(--fg); position: relative;
}
.entity-card:hover { border-color: var(--line-strong); text-decoration: none; }
.entity-card__kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.entity-card__title { font-weight: 800; font-size: var(--t-md); color: var(--fg); }
.entity-card__title::after { content: ""; position: absolute; inset: 0; } /* вся карточка кликабельна */
.entity-card__meta { font-size: var(--t-sm); color: var(--muted); margin-top: 2px; }
.entity-card__aside { text-align: right; }
@media (max-width: 520px) { .entity-card { grid-template-columns: auto minmax(0, 1fr); } .entity-card__aside { grid-column: 1 / -1; text-align: left; } }

/* Табло матча (страница матча, боя и карточка match): в цветах соперников, как «матч дня» */
.scoreboard { position: relative; isolation: isolate; overflow: hidden; border-radius: 18px; color: #fff; background: #070c12; }
.scoreboard::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 16% 45%, color-mix(in srgb, var(--h, var(--accent)) 70%, transparent), transparent 45%),
              radial-gradient(circle at 84% 45%, color-mix(in srgb, var(--a, var(--accent)) 70%, transparent), transparent 45%),
              linear-gradient(180deg, #0c141c, #05080c); }
.scoreboard::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .06;
  background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 64px); }
.scoreboard__main { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--s-4); align-items: center; text-align: center; padding: var(--s-6) var(--s-5); }
.scoreboard a { color: #fff; }
.scoreboard a:hover { text-decoration: none; }
.scoreboard__team { display: grid; justify-items: center; gap: 6px; font-weight: 800; font-size: var(--t-lg); }
.scoreboard__team small { font-size: var(--t-xs); font-weight: 600; color: rgba(255,255,255,.7); }
.scoreboard .crest--lg { --size: 104px; filter: drop-shadow(0 10px 26px rgba(0,0,0,.6)); }
.scoreboard__score { font-size: 56px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.scoreboard__meta { font-size: var(--t-sm); color: rgba(255,255,255,.75); margin-top: 8px; }
.scoreboard__foot { padding: 0 var(--s-5) var(--s-5); }
.scoreboard--compact .scoreboard__main { padding: var(--s-4); }
.scoreboard--compact .crest--lg { --size: 56px; }
.scoreboard--compact .scoreboard__team { font-size: var(--t-base); }
.scoreboard--compact .scoreboard__score { font-size: 32px; }
@media (max-width: 640px) {
  .scoreboard__main { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: var(--s-5) var(--s-3); gap: var(--s-2); }
  .scoreboard .crest--lg { --size: 60px; }
  .scoreboard__team { font-size: var(--t-sm); word-break: normal; overflow-wrap: anywhere; }
  .scoreboard__team small { font-size: 11px; }
  .scoreboard__score { font-size: 34px; }
  .scoreboard__meta { max-width: 104px; margin-inline: auto; font-size: 11px; }
}

/* Сравнение бойцов */
.tape { display: grid; grid-template-columns: 1fr auto 1fr; font-size: var(--t-sm); }
.tape > div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.tape .l { text-align: right; padding-right: var(--s-4); font-weight: 700; }
.tape .r { text-align: left; padding-left: var(--s-4); font-weight: 700; }
.tape .c { text-align: center; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.tape .is-better { color: var(--accent-strong); }

/* Карточка прогноза */
.prediction { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.prediction__pick {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-3); align-items: center;
  padding: var(--s-4); background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.prediction__market { font-size: var(--t-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.prediction__value { font-size: var(--t-lg); font-weight: 800; }
.prediction__odds { font-size: var(--t-xl); font-weight: 900; color: var(--accent-strong); }
.prediction__foot { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); flex-wrap: wrap; }
.prediction__author { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); margin-right: auto; }

/* Маркировка рекламы (закон о рекламе, ст. 18.1) */
.ad-label { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 11px; color: var(--muted); line-height: 1.4; }
.ad-label b { color: var(--fg-2); font-weight: 700; }
.ad-slot { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: var(--s-3); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: var(--s-3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 14px; color: var(--fg-2); }

/* Списки статей */
.article-list { list-style: none; margin: 0; padding: 0; }
.article-list li { padding: 12px var(--s-4); border-bottom: 1px solid var(--line); }
.article-list li:last-child { border-bottom: 0; }
.article-list a { color: var(--fg); font-weight: 700; }
.article-list .muted { display: block; font-size: var(--t-xs); margin-top: 2px; }

/* ---------- 5. Типографика статьи ---------- */
.prose { font-size: var(--t-md); line-height: 1.7; color: var(--fg); }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose p, .prose ul, .prose ol { margin-bottom: 0; }
.prose a.entity-link { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a.entity-link:hover { color: var(--accent-strong); }
.prose blockquote { margin: 1.4em 0; padding-left: var(--s-4); border-left: 3px solid var(--accent); color: var(--fg-2); }
.prose .table-wrap, .prose .entity-card, .prose .scoreboard, .prose .panel { font-size: var(--t-base); line-height: 1.55; }
.article-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: var(--t-sm); margin: var(--s-3) 0 var(--s-5); }

/* Служебное: витрина */
.sg-section { scroll-margin-top: 72px; }
.sg-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--s-2); }
.sg-swatch { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; font-size: var(--t-xs); }
.sg-swatch i { display: block; height: 44px; }
.sg-swatch span { display: block; padding: 6px 8px; background: var(--surface); }
.sg-row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }

/* ---------- 6. Страницы ---------- */
/* Шапка страницы сущности: тёмная полоса с подсветкой в цвете клуба (--h, по умолчанию бренд) */
.hero { --h: var(--accent); position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-5); align-items: center;
  padding: var(--s-6); border-radius: 18px; color: #fff; background: #070c12; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--h) 70%, transparent), transparent 42%),
              radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--h2, var(--h)) 35%, transparent), transparent 45%),
              linear-gradient(180deg, #0c141c, #05080c); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .06;
  background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 64px); }
.hero h1 { color: #fff; font-size: var(--t-2xl); line-height: 1.1; }
.hero .crest--lg { --size: 96px; filter: drop-shadow(0 8px 22px rgba(0,0,0,.55)); }
.hero .avatar { width: 112px; height: 112px; object-fit: cover; border-radius: 16px; box-shadow: 0 8px 22px rgba(0,0,0,.5); }
.hero__kicker { font-size: var(--t-xs); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.7); }
.hero__meta { color: rgba(255,255,255,.78); font-size: var(--t-sm); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.hero__meta a { color: #fff; font-weight: 600; }
.hero .muted { color: rgba(255,255,255,.72); } /* серый --muted на тёмной подложке не дотягивает до 4.5:1 */
.hero__aside { display: flex; gap: var(--s-4); text-align: center; }
.hero .stat { padding: 10px 16px; border-radius: 12px; background: rgba(255,255,255,.08); min-width: 84px; }
.hero .stat__value { color: #fff; font-size: var(--t-2xl); font-weight: 900; }
.hero .stat__label { color: rgba(255,255,255,.7); }
@media (max-width: 640px) {
  .hero { grid-template-columns: auto minmax(0, 1fr); padding: var(--s-4); gap: var(--s-3); }
  .hero h1 { font-size: var(--t-xl); }
  .hero .crest--lg { --size: 64px; } .hero .avatar { width: 72px; height: 72px; }
  .hero__aside { grid-column: 1 / -1; }
}

/* Сетка плиток (команды лиги, домашние клубы) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-2); }
.tile { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); color: var(--fg); min-width: 0; }
.tile:hover { border-color: var(--line-strong); text-decoration: none; }
.tile > div { min-width: 0; }
.tile b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile span { font-size: var(--t-xs); color: var(--muted); }

/* Сайдбар */
.sidebar { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-4); position: sticky; top: 72px; min-width: 0; }
.sidebar > * { min-width: 0; } /* широкая таблица не должна раздвигать колонку — скроллится внутри панели */
@media (max-width: 960px) { .sidebar { position: static; } }

/* Строка боя в карде */
.bout-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--s-3); align-items: center;
  padding: 12px var(--s-4); border-bottom: 1px solid var(--line); color: var(--fg); }
.bout-row:last-child { border-bottom: 0; }
.bout-row:hover { background: var(--surface-2); text-decoration: none; }
.bout-row__side { display: grid; gap: 2px; min-width: 0; }
.bout-row__side b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bout-row__side span { font-size: var(--t-xs); color: var(--muted); }
.bout-row__side--r { text-align: right; }
.bout-row__vs { display: grid; justify-items: center; gap: 4px; font-size: var(--t-xs); color: var(--muted); text-align: center; }

/* Итог боя: W / L / D / NC */
.result { width: 26px; height: 22px; border-radius: 4px; display: inline-grid; place-items: center; font: 800 11px/1 var(--font); color: #fff; background: var(--draw); }
.result.W { background: var(--win); }
.result.L { background: var(--loss); }

/* Сводка личных встреч */
.h2h-sum { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: var(--s-4); text-align: center; }
.h2h-sum .stat__value { font-size: var(--t-2xl); }
@media (max-width: 640px) { .h2h-sum { gap: var(--s-2); } .h2h-sum .stat__value { font-size: var(--t-xl); } .h2h-sum > * { min-width: 0; overflow-wrap: anywhere; } }
.h2h-bar { display: flex; height: 8px; border-radius: var(--r-pill); overflow: hidden; background: var(--draw-soft); margin-top: var(--s-3); }
.h2h-bar i { display: block; }

/* Две колонки сравнения команд на странице матча */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.compare > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-3) var(--s-4); display: grid; gap: var(--s-2); }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }

/* Обложка статьи */
.cover { margin: 0; }
.cover img { width: 100%; border-radius: var(--r-md); aspect-ratio: 16 / 9; object-fit: cover; }
.cover figcaption { font-size: var(--t-xs); color: var(--muted); margin-top: 6px; }

/* Заголовок секции на странице */
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.section-title h2 { font-size: var(--t-lg); }

/* Поиск */
.search { display: flex; gap: var(--s-2); max-width: 560px; }
.search input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--fg); font: 500 var(--t-base) var(--font); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

/* Прогноз: лента и тело */
.prediction__event { display: grid; gap: 2px; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); color: var(--fg); }
.prediction__event:hover { background: var(--surface-2); text-decoration: none; }
.prediction__event .muted { font-size: var(--t-xs); }
.prediction__body { padding: var(--s-3) var(--s-4) 0; font-size: var(--t-base); }
.prediction__market a { color: inherit; text-decoration: underline dotted; }

/* Тренды */
.trends { display: grid; gap: var(--s-2); margin: 0; padding: 0; list-style: none; }
.trends li { display: flex; gap: var(--s-2); align-items: baseline; font-size: var(--t-sm); }
.trends li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); transform: translateY(-2px); }
.trend-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }

/* Карточка «Форма и тренды»: цвет клуба — полоса сверху и заливка полосок. */
.tcard { --team: var(--accent); --team-c: color-mix(in srgb, var(--team), #fff var(--team-lift)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; box-shadow: inset 0 4px 0 var(--team-c); }
.tcard__head { display: flex; align-items: center; gap: var(--s-3); padding: 18px var(--s-4) var(--s-3); }
.tcard__head .crest { flex: none; }
.tcard__title { display: grid; gap: 2px; min-width: 0; }
.tcard__title a { font-weight: 800; font-size: var(--t-md); color: var(--fg); line-height: 1.2; }
.tcard__title span { font-size: var(--t-xs); color: var(--muted); }
.tcard__place { margin-left: auto; display: grid; justify-items: center; flex: none; min-width: 48px; padding: 6px 8px;
  border-radius: var(--r-sm); background: var(--surface-2); }
.tcard__place b { font-size: var(--t-lg); font-weight: 900; line-height: 1; }
.tcard__place span { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tcard__form { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-2) var(--s-4) var(--s-3); }
.tcard__form .form i { width: 24px; height: 24px; border-radius: 6px; font-size: 11px; }
.tcard__label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tcard__body { display: grid; gap: var(--s-3); padding: var(--s-3) var(--s-4) var(--s-4); border-top: 1px solid var(--line); flex: 1; align-content: start; }
.tcard__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); }
.tcard__kpis div { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.tcard__kpis b { font-size: var(--t-lg); font-weight: 800; line-height: 1.1; }
.tcard__kpis span { font-size: var(--t-xs); color: var(--muted); white-space: nowrap; }
.tcard__bars { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tcard__bars li { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: var(--s-2); font-size: var(--t-sm); }
.tcard__bars li > span { color: var(--fg-2); white-space: nowrap; }
.tcard__track { display: block; height: 8px; border-radius: var(--r-pill); background: var(--draw-soft); overflow: hidden; }
.tcard__track i { display: block; height: 100%; border-radius: inherit; background: var(--team-c); min-width: 2px; }
.tcard__bars b { text-align: right; font-weight: 800; }
.tcard__bars small { color: var(--muted); font-weight: 600; }
.tcard__note { margin: 0; font-size: var(--t-xs); color: var(--muted); }
.tcard__legend { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0 0; font-size: var(--t-xs); color: var(--muted); }
.tcard__legend .form { flex: none; }

/* Таблицы в сайдбаре: колонка 300px, поэтому без минимальной ширины и с меньшими отступами. */
.sidebar .table th, .sidebar .table td { padding: 7px 6px; }
.sidebar .table th:not(.grow):not(:first-child) { min-width: 0; }
.sidebar .form { gap: 2px; }
.sidebar .form i { width: 14px; height: 14px; font-size: 8px; }
.sidebar .team-cell { min-width: 0; }
.sidebar .team-cell > :last-child, .table .team-cell .team-cell__name { overflow: hidden; text-overflow: ellipsis; }


/* ---------- Главная «журнал»: матч дня, сегодня, карточки, результаты ---------- */
.home-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--s-4); margin-bottom: var(--s-6); }
.home-section { margin-bottom: var(--s-6); }
.live-dot { color: var(--live); font-weight: 800; text-transform: uppercase; font-size: var(--t-xs); }

/* Матч дня: подсветка в цветах клубов на тёмном фоне в обеих темах */
.feature { position: relative; border-radius: 18px; overflow: hidden; color: #fff; min-height: 340px; display: flex; flex-direction: column;
  background: #070c12; isolation: isolate; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 18% 45%, color-mix(in srgb, var(--h) 75%, transparent), transparent 45%),
              radial-gradient(circle at 82% 45%, color-mix(in srgb, var(--a) 75%, transparent), transparent 45%),
              linear-gradient(180deg, #0c141c, #05080c); }
.feature::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07;
  background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 64px); }
.feature__top { display: flex; justify-content: space-between; gap: var(--s-2); padding: var(--s-5) var(--s-5) 0; }
.feature__tag { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: var(--r-pill); background: rgba(255,255,255,.12);
  font-size: var(--t-xs); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.feature__main { flex: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: var(--s-4) var(--s-5); }
.feature__club { text-align: center; }
.feature__club .crest { --size: 110px; filter: drop-shadow(0 10px 28px rgba(0,0,0,.6)); margin-bottom: var(--s-3); }
.feature__club h2 { margin: 0; font-size: var(--t-xl); font-weight: 900; color: #fff; }
.feature__club small { display: block; opacity: .75; font-size: var(--t-sm); margin-bottom: 8px; }
.feature__time { text-align: center; }
.feature__time b { display: block; font-size: 56px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.feature__time span { opacity: .75; font-size: var(--t-sm); }
.feature__foot { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5) var(--s-5); }
.feature__foot .prob { flex: 1; }
.feature__cta { padding: 12px 22px; border-radius: var(--r-pill); background: var(--accent); color: #fff; font-weight: 800; font-size: var(--t-sm); white-space: nowrap; }
.feature__cta:hover { text-decoration: none; filter: brightness(1.1); }

/* Шансы по линии */
.prob__track { display: flex; height: 8px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-2); gap: 2px; }
.prob__track i { display: block; }
.prob__draw { background: var(--line-strong); }
.prob__nums { display: flex; justify-content: space-between; font-size: var(--t-xs); font-weight: 700; margin-top: 6px; color: var(--muted); }
.prob--dark .prob__track { background: rgba(255,255,255,.15); }
.prob--dark .prob__draw { background: rgba(255,255,255,.4); }
.prob--dark .prob__nums { color: rgba(255,255,255,.9); }

/* Сегодня */
.today-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); }
.today-panel h2 { font-size: var(--t-md); margin: 0 0 var(--s-2); display: flex; justify-content: space-between; align-items: baseline; }
.today-panel h2 small { font-size: var(--t-xs); color: var(--muted); font-weight: 600; }
.today-panel .panel__more { margin-top: auto; padding-top: var(--s-2); text-align: center; }
.mini-match { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s-3); align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); color: var(--fg); }
.mini-match:hover { text-decoration: none; outline: 1px solid var(--line-strong); }
.mini-match__time { font-weight: 800; font-size: var(--t-sm); line-height: 1.2; }
.mini-match__teams { min-width: 0; }
.mini-match__teams > span { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: var(--t-sm); line-height: 1.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-match__p { display: flex; flex-direction: column; font-size: var(--t-xs); color: var(--muted); text-align: right; line-height: 1.7; }
.mini-match__p b { color: var(--fg); font-size: var(--t-sm); }

/* Карточки ближайших матчей: полоса сверху в цветах соперников */
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--s-3); }
.match-card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--fg);
  background-image: linear-gradient(90deg, var(--h) 50%, var(--a) 50%); background-size: 100% 3px; background-repeat: no-repeat; }
.match-card:hover { text-decoration: none; border-color: var(--line-strong); }
.match-card__meta { display: flex; justify-content: space-between; gap: var(--s-2); font-size: var(--t-xs); color: var(--muted); font-weight: 600; }
.match-card__meta > span { white-space: nowrap; }
.match-card__meta > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.match-card__meta b { color: var(--fg); font-size: var(--t-sm); }
.match-card__team { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.match-card__team .crest { --size: 32px; }
.match-card__team > span:not(.crest) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-card__team small, .match-card__team b { margin-left: auto; color: var(--muted); font-weight: 600; font-size: var(--t-xs); white-space: nowrap; }
.match-card__team b { color: var(--fg); font-size: var(--t-md); font-weight: 900; }

/* Результаты лентой */
.result-strip { display: flex; gap: var(--s-3); overflow-x: auto; padding-bottom: var(--s-2); scrollbar-width: thin; }
.result-card { flex: 0 0 200px; padding: var(--s-3) var(--s-4); border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); }
.result-card:hover { text-decoration: none; border-color: var(--line-strong); }
.result-card__meta { display: block; font-size: var(--t-xs); color: var(--muted); }
.result-card__row { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--t-sm); line-height: 2; }
.result-card__row > span:not(.crest) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-card__row b { margin-left: auto; font-size: var(--t-base); }
.result-card__row.is-loser { color: var(--muted); }

.tables-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-3); }
.match-block .match-grid:not(:empty) + .result-grid:not(:empty) { margin-top: var(--s-3); }
.layout .match-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

@media (max-width: 960px) {
  .home-top, .tables-2 { grid-template-columns: 1fr; }
  .feature__main { gap: var(--s-2); padding: var(--s-4) var(--s-3); }
  .feature__club .crest { --size: 64px; }
  .feature__club h2 { font-size: var(--t-md); }
  .feature__club small { font-size: 11px; }
  .feature__club .form i { width: 14px; height: 14px; font-size: 8px; }
  .feature__time b { font-size: 30px; }
  .feature__top { padding: var(--s-3) var(--s-3) 0; }
  .feature__tag { font-size: 10px; padding: 5px 9px; }
  .feature__foot { flex-direction: column; align-items: stretch; text-align: center; }
}

/* Баннер страниц-списков и разделов: та же тёмная подложка, что у шапки сущности, но компактнее */
.banner { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: var(--s-3); justify-items: start;
  padding: var(--s-6); border-radius: 18px; color: #fff; background: #070c12; }
.banner::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--h, var(--accent)) 55%, transparent), transparent 50%),
              radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--h, var(--accent)) 25%, transparent), transparent 45%),
              linear-gradient(180deg, #0c141c, #05080c); }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .06;
  background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 64px); }
.banner h1 { color: #fff; font-size: var(--t-2xl); line-height: 1.1; margin: 0; }
.banner p, .banner .muted { color: rgba(255,255,255,.78); }
.banner .pills { margin: 0; max-width: 100%; }
.banner .pill { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
.banner .pill:hover { background: rgba(255,255,255,.16); }
.banner .pill.is-active, .banner .pill[aria-current="true"] { background: #fff; color: #0b1118; border-color: #fff; }
.banner form { width: 100%; max-width: 560px; }
@media (max-width: 640px) { .banner { padding: var(--s-4); } .banner h1 { font-size: var(--t-xl); } }

/* Список в сайдбаре: эмблема, название, подстрока (форма или последняя встреча), значение справа */
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li + li { border-top: 1px solid var(--line); }
.side-list__row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: var(--s-3); align-items: center;
  padding: 10px var(--s-4); color: var(--fg); }
.side-list__row:hover { background: var(--surface-2); text-decoration: none; }
.side-list__row > .crest:first-child { grid-column: 1 / 3; }
.side-list__n { width: 14px; text-align: center; color: var(--muted); font-size: var(--t-sm); font-weight: 700; }
.side-list__body { display: grid; gap: 5px; min-width: 0; }
.side-list__body b { font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list__body small { font-size: var(--t-xs); color: var(--muted); }
.side-list__body .form i { width: 16px; height: 16px; font-size: 9px; }
.side-list__val { font-size: var(--t-lg); font-weight: 900; white-space: nowrap; }
.side-list__val small { font-size: var(--t-xs); color: var(--muted); font-weight: 600; }
.side-list__val.is-win { color: var(--win); }
.side-list__val.is-loss { color: var(--loss); }
.side-list .crest--md { --size: 30px; }
.side-list__row { gap: 10px; padding: 9px 14px; }
.side-list__val { font-size: var(--t-md); }
.side-list__body b { white-space: normal; overflow: visible; line-height: 1.25; }

/* Страница матча: авторы голов у табло, ход матча, статистика */
.scoreboard__scorers { display: grid; gap: 2px; margin-top: 4px; font-size: var(--t-xs); font-weight: 500; color: rgba(255,255,255,.8); }
.timeline { overflow: hidden; }
.timeline__period { padding: 8px var(--s-4); background: var(--surface-2); font-size: var(--t-xs); font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); border-top: 1px solid var(--line); }
.timeline__period:first-child { border-top: 0; }
.timeline__row { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); align-items: center; gap: var(--s-2);
  padding: 9px var(--s-4); border-top: 1px solid var(--line); }
.timeline__time { text-align: center; font-size: var(--t-sm); color: var(--muted); font-weight: 700; }
.timeline__side { display: flex; justify-content: flex-end; min-width: 0; }
.timeline__side--away { justify-content: flex-start; }
.timeline__note { padding: 10px var(--s-4); font-size: var(--t-sm); border-top: 1px solid var(--line); }
.incident { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--t-sm); }
.incident a, .incident > span:not(.incident__icon) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline__side:not(.timeline__side--away) .incident { flex-direction: row-reverse; }
.incident--goal { font-weight: 700; }
.incident__icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 11px; }
.incident__icon--pen { border-radius: 6px; background: var(--pending-soft); color: var(--pending); font-weight: 800; font-size: 10px; width: 26px; }
.incident__score { padding: 2px 8px; border-radius: 6px; background: var(--fg); color: var(--bg); font-size: var(--t-xs); }
.match-stats { padding: var(--s-4); display: grid; gap: var(--s-4); }
.match-stats__head { display: flex; justify-content: space-between; font-weight: 800; font-size: var(--t-sm); }
.match-stats__head span { display: inline-flex; align-items: center; gap: 8px; }
.match-stats__nums { display: grid; grid-template-columns: 60px 1fr 60px; align-items: baseline; text-align: center; }
.match-stats__nums b:first-child { text-align: left; } .match-stats__nums b:last-child { text-align: right; }
.match-stats__nums b { font-size: var(--t-md); }
.match-stats__nums span { font-size: var(--t-sm); color: var(--muted); }
.match-stats__bar { display: flex; gap: 3px; height: 6px; margin-top: 6px; }
.match-stats__bar i { display: block; border-radius: 99px; background: var(--h); }
.match-stats__bar i + i { flex: 1; background: var(--a); }
@media (max-width: 640px) {
  .timeline__row { grid-template-columns: 44px minmax(0, 1fr); padding: 9px var(--s-3); box-shadow: inset 3px 0 0 var(--h); }
  .timeline__row--away { box-shadow: inset 3px 0 0 var(--a); }
  .timeline__time { order: -1; text-align: left; }
  .timeline__side:empty { display: none; }
  .timeline__side, .timeline__side--away { justify-content: flex-start; }
  .timeline__side:not(.timeline__side--away) .incident { flex-direction: row; }
}

/* Лидеры сезона, плитки статистики игрока, фото в составе */
.leaders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-3); align-items: start; }
.leaders .side-list__body a { color: var(--fg); }
.leaders .side-list li:first-child .side-list__val { color: var(--accent-strong); }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--s-2); }
.stat-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.stat-tile b { font-size: var(--t-xl); font-weight: 900; }
.stat-tile span { font-size: var(--t-xs); color: var(--muted); }
.stat-tile--accent { background: var(--accent-soft); border-color: transparent; }
.stat-tile--accent b { color: var(--accent-strong); }
.roster-photo { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }

/* Живой счёт: на идущем матче места в таблице уступают счёту */
.is-live .match-card__team small { display: none; }
.live-minute { font-size: var(--t-xs); font-weight: 600; opacity: .85; white-space: nowrap; }
.live-minute__short { display: none; }
/* В узких колонках времени статус встаёт столбиком: бейдж, под ним «1П · 13′». */
.mini-match__time .live-minute, .match-row__time .live-minute { display: block; margin-top: 4px; color: var(--live); opacity: 1; }
.mini-match__time .live-minute__long, .match-row__time .live-minute__long { display: none; }
.mini-match__time .live-minute__short, .match-row__time .live-minute__short { display: inline; }

/* ---------- Калькуляторы ---------- */
/* /kalkulyatory/: поля ввода, строки событий экспресса и системы, итоги плитками (.stat-tiles), вердикт. */
.calc { display: grid; gap: var(--s-4); }
.calc-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
.calc .field { display: grid; gap: 4px; min-width: 0; }
.calc .field[hidden] { display: none; }
.calc .field > span, .calc-leg--head span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
/* 16px — меньше iOS увеличивает страницу при фокусе. */
.calc input[type="text"], .calc select { width: 100%; min-width: 0; height: 44px; padding: 0 12px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); font: 600 16px var(--font);
  font-feature-settings: "tnum" 1; }
.calc select { padding-right: 8px; cursor: pointer; }
.calc input[type="text"]:focus, .calc select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.calc input[aria-invalid="true"] { border-color: var(--loss); background: var(--loss-soft); }
.calc-note { margin: 0; font-size: var(--t-sm); }

/* Строка события: номер, коэффициент, исход, удалить */
.calc-legs { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.calc-leg { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1.4fr) 44px; gap: var(--s-2); align-items: center; }
.calc-leg--head { margin-bottom: 4px; }
.calc-leg__n { text-align: center; font-weight: 800; color: var(--muted); }
.calc-leg__del { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: transparent;
  color: var(--muted); font: 400 22px/1 var(--font); cursor: pointer; }
.calc-leg__del:hover:not(:disabled) { color: var(--loss); border-color: var(--loss); }
.calc-leg__del:disabled { opacity: .35; cursor: default; }
.calc-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.calc-actions .btn:disabled { opacity: .45; cursor: default; filter: none; }

/* Переключатель «2 исхода / 3 исхода»: пилюли с radio внутри */
.calc-seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.calc-seg .pill { cursor: pointer; height: 36px; }
.calc-seg .pill:has(:checked) { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.calc-seg .pill:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.calc-check { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); font-weight: 600; cursor: pointer; justify-self: start; }
.calc-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }

/* Итоги */
.calc-result { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.calc-result .stat-tile b { font-size: var(--t-lg); overflow-wrap: anywhere; }
.calc-verdict { margin: 0; padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); background: var(--draw-soft); color: var(--fg-2);
  font-weight: 700; font-size: var(--t-sm); }
.calc-verdict.is-win { background: var(--win-soft); color: var(--win); }
.calc-verdict.is-loss { background: var(--loss-soft); color: var(--loss); }
/* Таблицы результатов (вилки, маржа): на телефоне 5 колонок не влезают — заголовки переносятся, отступы меньше. */
.calc .table th { white-space: normal; vertical-align: bottom; }
@media (max-width: 520px) { .calc .table th, .calc .table td { padding: 8px 4px; } }
.calc .table td:first-child { font-weight: 700; }
.calc-combos tr.is-lost td { color: var(--muted); }
.calc-dogon tr.is-over td { color: var(--loss); background: var(--loss-soft); } /* шаги, на которые не хватает банка */
.calc-tiles .tile b { white-space: normal; }
@media (max-width: 520px) {
  .calc-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .calc-leg { grid-template-columns: 20px 76px minmax(0, 1fr) 44px; gap: 6px; }
  .calc-leg select { padding: 0 4px 0 10px; }
}

/* ---------- Составы на матч ---------- */
@media (hover: none) { .hover-hint { display: none; } }  /* на телефоне наведения нет */
.lineups { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-4); }
.lineups .table td.num:first-child { width: 2.5em; }
@media (max-width: 640px) { .lineups { grid-template-columns: minmax(0, 1fr); } }

/* ---------- «Коротко» в статье: термин → пояснение ---------- */
.keypoints { background: var(--accent-soft); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--r-md); padding: var(--s-4) var(--s-5); }
.keypoints__title { display: flex; align-items: center; gap: 8px; font-size: var(--t-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--accent-strong); margin-bottom: var(--s-3); }
.keypoints dl { margin: 0; display: grid; }
.keypoints__row { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: var(--s-4);
  padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); }
.keypoints__row:first-child { border-top: 0; padding-top: 0; }
.keypoints__row:last-child { padding-bottom: 0; }
.keypoints dt { font-weight: 700; color: var(--fg); font-feature-settings: "tnum"; }
.keypoints dd { margin: 0; color: var(--fg-2); line-height: 1.5; }
@media (max-width: 560px) {
  .keypoints { padding: var(--s-4); }
  .keypoints__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ---------- Оформление текста статей: «Пример», «Важно», итоги в таблицах ---------- */
.prose .callout { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5); background: var(--surface-2); font-size: var(--t-base); line-height: 1.6; }
.prose .callout > * + * { margin-top: .6em; }
.prose .callout ul { padding-left: 1.2em; }
.callout__label { display: flex; align-items: center; gap: 8px; font-size: var(--t-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.prose .callout--example { border-left-color: var(--line-strong); }
.prose .callout--warn { border-left-color: var(--pending); background: var(--pending-soft, var(--surface-2)); }
.callout--warn .callout__label { color: var(--fg-2); }
.prose td.res-win { color: var(--win); font-weight: 600; }
.prose td.res-loss { color: var(--loss); font-weight: 600; }
.prose td.res-void { color: var(--muted); }
@media (max-width: 560px) { .prose .callout { padding: var(--s-4); } }

/* ---------- «Сезон в цифрах» в статьях (widget:season-numbers) ---------- */
.numbers { margin: var(--s-5) 0; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  overflow: hidden; font-size: var(--t-base); line-height: 1.45; }
.numbers__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px var(--s-4);
  padding: var(--s-3) var(--s-4); background: var(--chrome); color: var(--chrome-fg); }
.numbers__head span { font-size: var(--t-xs); color: var(--chrome-muted); }
.numbers__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.numbers__grid > div { padding: var(--s-4); box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); display: grid; gap: 4px; align-content: start; }
.numbers__grid b { font-size: var(--t-xl); font-weight: 800; color: var(--accent-strong); font-feature-settings: "tnum"; line-height: 1.1; }
.numbers__grid span { font-size: var(--t-sm); color: var(--fg-2); }
.numbers__table { margin: 0; }
/* Длинные заголовки («С ОТ и буллитами», «Основное время») переносятся, иначе на телефоне колонка уезжает за край. */
.numbers__table th { white-space: normal; vertical-align: bottom; }

/* ---------- Школа ставок: маршрут, карточки статей, чипы словаря ---------- */
.guide-path { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); counter-reset: none; }
.guide-step { display: flex; align-items: center; gap: var(--s-3); height: 100%; padding: var(--s-3) var(--s-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--fg); text-decoration: none;
  transition: border-color .15s, transform .15s; }
.guide-step:hover { border-color: var(--accent); transform: translateY(-1px); }
.guide-step__n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); font-weight: 800; font-feature-settings: "tnum"; }
.guide-step__body { display: grid; gap: 2px; min-width: 0; }
.guide-step__body b { font-size: var(--t-base); line-height: 1.3; }
.guide-step__body span { font-size: var(--t-xs); color: var(--muted); }

.guide-grid { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.guide-card { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4) var(--s-5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--fg); text-decoration: none;
  transition: border-color .15s, box-shadow .15s; }
.guide-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(13, 21, 30, .08); }
.guide-card__title { font-size: var(--t-md); line-height: 1.3; }
.guide-card__text { color: var(--fg-2); font-size: var(--t-sm); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.guide-card__meta { margin-top: auto; padding-top: var(--s-2); display: flex; align-items: center; justify-content: space-between; }
.guide-card__more { font-size: var(--t-sm); font-weight: 600; color: var(--accent-strong); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; padding: 5px 10px; border-radius: var(--r-pill); background: var(--surface-2);
  border: 1px solid var(--line); color: var(--fg); font-size: var(--t-sm); text-decoration: none; }
.chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.numbers__grid b.numbers__sm { font-size: var(--t-lg); white-space: nowrap; line-height: 1.3; }
