/* ============================================================
   today.tennis — дизайн-система «Club Edition»
   Светлое редакционное спортивное медиа: много воздуха, крупные
   фото, чистая типографика, привычный скорборд.
   ============================================================ */

:root {
  /* --- палитра --- */
  --bg:        #ffffff;
  --bg-soft:   #f6f7f4;
  --bg-tint:   #eef2e7;
  --ink:       #12160f;
  --ink-2:     #3d4438;
  --muted:     #6b7263;
  --faint:     #9aa192;
  --line:      #e4e7de;
  --line-soft: #eef0e9;

  --court:     #1d7a3a;   /* кортовый зелёный — ссылки, акценты, читаем на белом */
  --court-deep:#155e2c;
  --ball:      #c8e415;   /* теннисный мяч — live, подача, выделения на тёмном */
  --clay:      #c65f2b;   /* вторичный: превью, Challenger */
  --sky:       #2b6cb0;   /* третичный: аналитика, WTA */
  --red:       #d92d20;   /* live-бейдж, критичное */

  --dark:      #101408;   /* футер, тёмные панели */
  --dark-2:    #1a2010;

  /* --- типографика --- */
  --f-head: 'Inter Tight', 'Arial', sans-serif;
  --f-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --f-serif: 'Spectral', 'Georgia', serif;
  --f-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* --- сетка --- */
  --gutter: 24px;
  --maxw: 1280px;

  /* --- формы --- */
  --r-card: 14px;
  --r-btn: 10px;
  --shadow-card: 0 1px 2px rgba(18,22,15,.04), 0 8px 24px -12px rgba(18,22,15,.12);
  --shadow-hover: 0 2px 4px rgba(18,22,15,.06), 0 16px 40px -12px rgba(18,22,15,.2);

  --ease: cubic-bezier(.2,.7,.3,1);
}

/* ============ база ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ball); color: var(--ink); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: #cdd2c4; border-radius: 6px; border: 2px solid var(--bg-soft); }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

:focus-visible { outline: 2px solid var(--court); outline-offset: 2px; border-radius: 4px; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img, svg { display: block; }
img { max-width: 100%; }

/* ============ типографические утилиты ============ */
.label {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--faint);
}
.label--court { color: var(--court); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ============ верхняя полоса-тикер (тёмная, как у ESPN/Sofascore) ============ */
.ticker {
  background: var(--dark);
  color: #e8ebe0;
  display: flex; align-items: stretch;
  overflow: hidden;
}
.ticker__tag {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 7px;
  padding: 0 16px;
  background: var(--ball);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  z-index: 2;
}
.ticker__viewport { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker__track {
  display: flex; white-space: nowrap;
  flex-shrink: 0;
  animation: marquee var(--marquee-dur, 48s) linear infinite;
  will-change: transform;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(var(--marquee-shift, -50%)); } }
.ticker__item {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 20px;
  font-size: 12px;
  color: #b9bfae;
  border-right: 1px solid rgba(255,255,255,.07);
}
.ticker__item .t-name { color: #fff; font-weight: 600; }
.ticker__item .t-score { color: var(--ball); font-weight: 700; font-family: var(--f-mono); font-size: 11.5px; }
.ticker__item .t-tour { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #6d7462; }

/* ============ шапка ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__in {
  display: flex; align-items: center; gap: 32px;
  height: 64px;
}

/* логотип: мяч + слово */
.logo { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo__ball { width: 28px; height: 28px; }
.logo__word {
  font-family: var(--f-head);
  font-size: 20px; font-weight: 800;
  letter-spacing: -.03em;
  color: var(--ink);
}
.logo__word b { color: var(--court); }

.main-nav { display: flex; gap: 2px; }
.main-nav a {
  font-size: 14px; font-weight: 600;
  color: var(--ink-2);
  padding: 9px 14px;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.main-nav a.is-active { color: var(--court); }
.main-nav a.is-active:hover { background: var(--bg-tint); }
.main-nav a .live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); margin-right: 6px; vertical-align: 1px;
  animation: pulse 1.6s ease-in-out infinite;
}

.header-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

/* языки */
.lang { position: relative; }
.lang__btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  background: var(--bg);
  transition: border-color .15s;
}
.lang__btn:hover { border-color: var(--faint); }
.lang__btn::after { content: '▾'; font-size: 9px; color: var(--faint); }
.lang__list {
  position: absolute; right: 0; top: calc(100% + 6px);
  min-width: 100px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-hover);
  padding: 5px;
  display: none; z-index: 60;
}
.lang.is-open .lang__list { display: block; }
.lang__list button {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  transition: background .12s;
}
.lang__list button:hover { background: var(--bg-soft); }
.lang__list button.is-current { color: var(--court); }

/* бургер: три независимые черты, в открытом состоянии — крестик */
.burger {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  position: relative;
}
.burger i {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .22s var(--ease), opacity .18s;
}
.burger i:nth-child(1) { top: 13px; }
.burger i:nth-child(2) { top: 19px; }
.burger i:nth-child(3) { top: 25px; }
.burger.is-open { border-color: var(--ink); }
.burger.is-open i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open i:nth-child(2) { opacity: 0; }
.burger.is-open i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* мобильное меню: оверлей поверх контента */
.mobile-nav {
  display: block;
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  z-index: 95;
  background: #fff;
  box-shadow: 0 20px 60px rgba(18,22,15,.18);
  padding: 8px var(--gutter) 24px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s;
}
.mobile-nav.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
/* затемнение под оверлеем */
.mobile-nav::before {
  content: '';
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: rgba(18,22,15,.28);
  z-index: -1;
  opacity: 0;
  transition: opacity .2s ease;
}
.mobile-nav.is-open::before { opacity: 1; }
.mobile-nav a {
  display: block;
  font-family: var(--f-head);
  font-size: 26px; font-weight: 800; letter-spacing: -.02em;
  padding: 16px 0;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav a:last-of-type { border-bottom: none; }
.mobile-nav a.is-active { color: var(--court); }
.mobile-nav .live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); margin-right: 10px; vertical-align: 3px;
  animation: pulse 1.6s ease-in-out infinite;
}
body.menu-open { overflow: hidden; }

/* ============ статусы ============ */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.85); }
}
.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}
.status-live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; color: var(--red);
  text-transform: uppercase;
}
.status-ft {
  font-size: 11px; font-weight: 700;
  letter-spacing: .08em; color: var(--faint);
  text-transform: uppercase;
}
.status-sched {
  font-size: 11px; font-weight: 700;
  letter-spacing: .06em; color: var(--muted);
}

/* ============ заголовки секций ============ */
.section-head {
  display: flex; align-items: baseline; gap: 14px;
  padding: 0 0 16px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 {
  font-family: var(--f-head);
  font-size: 26px; font-weight: 800;
  letter-spacing: -.02em;
}
.section-head .label { margin-left: auto; }
.section-head .status-live { margin-left: auto; }

/* ============ киккеры рубрик ============ */
.kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  margin-bottom: 12px;
}
.kicker::before {
  content: ''; width: 8px; height: 8px; border-radius: 2px;
  background: currentColor;
}
.kicker { color: var(--court); }
.kicker--analytics { color: var(--sky); }
.kicker--preview { color: var(--clay); }
.kicker--data { color: #8a6d00; }

/* ============ мета-строка ============ */
.meta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--faint); font-weight: 500;
}
.meta-row .comments-n { color: var(--court); font-weight: 600; }

/* ============ герой главной ============ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: var(--gutter);
  margin-top: 26px;
}
.hero__media {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  min-height: 420px;
}
.hero__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.hero:hover .hero__media img { transform: scale(1.03); }
.hero__media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,14,6,.78) 0%, rgba(10,14,6,.18) 55%, transparent 100%);
}
.hero__caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 28px;
  z-index: 2;
  color: #fff;
}
.hero__caption .kicker { color: var(--ball); margin-bottom: 10px; }
.hero__caption h1 {
  font-family: var(--f-head);
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 800; letter-spacing: -.025em;
  line-height: 1.04;
  margin-bottom: 12px;
}
.hero__caption .meta-row { color: rgba(255,255,255,.75); }
.hero__caption .comments-n { color: var(--ball); }

/* правая колонка героя: компактный матч-центр */
.hero__side {
  display: flex; flex-direction: column; gap: 14px;
  align-self: start;
}
.match-center {
  background: var(--dark);
  border-radius: var(--r-card);
  color: #eef1e4;
  padding: 18px 22px 16px;
}
.match-center__head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.match-center__head .status-ft, .match-center__head .status-live { color: var(--ball); }
.match-center__head .label { color: #79816c; }
.mc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mc-row:last-of-type { border-bottom: none; }
.mc-name {
  flex: 1; min-width: 0;
  font-family: var(--f-head);
  font-size: 18px; font-weight: 700; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-name .rank { font-family: var(--f-body); font-size: 11px; color: #79816c; font-weight: 600; margin-right: 8px; }
.mc-sets { display: flex; gap: 13px; font-family: var(--f-mono); font-size: 16.5px; font-weight: 700; }
.mc-sets .dim { color: #79816c; }
.mc-sets .won { color: var(--ball); }
.match-center .btn { margin-top: 14px; align-self: flex-start; padding: 11px 18px; }

/* соседние материалы под матч-центром */
.hero__next {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #fff;
  overflow: hidden;
}
.hero__next a {
  display: block;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .15s;
}
.hero__next a:last-child { border-bottom: none; }
.hero__next a:hover { background: var(--bg-soft); }
.hero__next .kicker { margin: 0 0 5px; }
.hero__next h4 {
  font-family: var(--f-head);
  font-size: 14.5px; font-weight: 700; letter-spacing: -.01em;
  line-height: 1.3;
  transition: color .15s;
}
.hero__next a:hover h4 { color: var(--court); }

/* ============ лайв-блок на главной: горизонтальная карусель ============ */
.live-carousel { position: relative; }
.live-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.live-track::-webkit-scrollbar { display: none; }
.live-track .live-card {
  flex: 0 0 400px;
  scroll-snap-align: start;
}
/* стрелки карусели */
.carousel-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  transition: all .15s;
}
.carousel-nav:hover { border-color: var(--ink); }
.carousel-nav svg { width: 15px; height: 15px; }
.carousel-nav--prev { left: -14px; }
.carousel-nav--next { right: -14px; }
.carousel-nav[disabled] { opacity: 0; pointer-events: none; }
/* индикатор прокрутки */
.live-progress {
  margin-top: 14px;
  height: 3px;
  background: var(--line-soft);
  border-radius: 3px;
  max-width: 220px;
  overflow: hidden;
}
.live-progress__bar {
  height: 100%;
  background: var(--ink);
  border-radius: 3px;
  width: 30%;
  transition: transform .2s ease, width .2s ease;
}
.live-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px 22px 14px;
  transition: box-shadow .2s, border-color .2s;
}
.live-card .match-row { grid-template-columns: 82px minmax(0,1fr) auto; }
.live-card .mr-player { font-size: 14px; }
.live-card .set-cell { min-width: 32px; }
/* в карусели статус встроен в шапку карточки — колонка статуса не нужна */
.live-card .live-card__tour .status-live { margin-left: auto; }
.live-card .match-row { grid-template-columns: minmax(0,1fr) auto; }
.live-card .match-row .mr-status { display: none; }
.live-card__round { margin-left: auto; }
.live-card:hover { box-shadow: var(--shadow-card); border-color: #d4d8ca; }
.live-card__tour {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.live-card__tour .label { color: var(--faint); }

/* ============ матч-строка (общий компонент) ============ */
.match-row {
  display: grid;
  grid-template-columns: 88px minmax(0,1fr) auto;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  transition: background .15s;
}
.match-row:first-of-type { border-top: none; }
.tourney .match-row, .live-card .match-row { cursor: pointer; }
.tourney .match-row:hover, .live-card .match-row:hover { background: var(--bg-soft); }

.mr-status {
  display: flex; flex-direction: column; gap: 3px;
  padding-left: 2px;
}
.mr-status .label { letter-spacing: .06em; font-size: 10px; }

.mr-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mr-player {
  display: flex; align-items: center; gap: 9px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  min-width: 0;
}
.mr-player .rank {
  font-size: 11px; color: var(--faint); font-weight: 600;
  min-width: 32px;
}
.mr-player .pname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mr-player.is-winner { color: var(--ink); font-weight: 700; }
.mr-player.is-winner .pname::after {
  content: '';
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ball);
  margin-left: 8px; vertical-align: 2px;
}
.mr-player.is-loser { color: var(--muted); }

.serve-ball { width: 11px; height: 11px; flex-shrink: 0; }

.mr-sets { display: flex; align-items: center; font-family: var(--f-mono); }
.set-cell {
  min-width: 36px;
  display: flex; flex-direction: column; gap: 5px;
  text-align: center;
  font-size: 14px; font-weight: 500;
  padding: 4px 0;
}
.set-cell span { display: block; }
.set-cell .is-winner { color: var(--ink); font-weight: 700; }
.set-cell .is-loser { color: var(--faint); }
.set-cell--pts span {
  color: var(--ink); font-weight: 700;
  background: var(--bg-tint);
  border-radius: 4px;
  padding: 2px 4px;
}
.set-cell sup { font-size: 9px; color: var(--faint); margin-left: 1px; }

/* вспышка изменения счёта */
@keyframes score-flash {
  0% { background: var(--ball); }
  100% { background: var(--bg-tint); }
}
.set-cell--pts.flash span { animation: score-flash 1.2s var(--ease); }
@keyframes set-flash {
  0% { background: var(--ball); }
  100% { background: transparent; }
}
.set-cell:not(.set-cell--pts).flash span { animation: set-flash 1.2s var(--ease); border-radius: 4px; }

/* ============ лента новостей ============ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 26px var(--gutter);
}
.news-card { display: flex; flex-direction: column; }
.news-card__media {
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 16/10;
  margin-bottom: 14px;
  background: var(--bg-soft);
}
.news-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.news-card:hover .news-card__media img { transform: scale(1.04); }
.news-card h3 {
  font-family: var(--f-head);
  font-size: 19px; font-weight: 700;
  letter-spacing: -.015em; line-height: 1.22;
  margin-bottom: 8px;
  transition: color .15s;
}
.news-card:hover h3 { color: var(--court); }
.news-card p {
  font-size: 14px; color: var(--muted); line-height: 1.5;
  margin-bottom: 12px; flex: 1;
}
.news-card .kicker { margin-bottom: 8px; }
.news-card .meta-row { font-size: 12px; }

/* списочные карточки второго ряда */
.news-list { border-top: 1px solid var(--line); margin-top: 4px; }
.news-row {
  display: flex; align-items: baseline; gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-soft);
}
.news-row .kicker { margin: 0; flex-shrink: 0; width: 148px; }
.news-row h3 {
  font-family: var(--f-head);
  font-size: 16.5px; font-weight: 700; letter-spacing: -.01em;
  flex: 1;
  transition: color .15s;
}
.news-row:hover h3 { color: var(--court); }
.news-row .meta-row { flex-shrink: 0; font-size: 12px; }

/* ============ кнопки ============ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 700;
  padding: 12px 22px;
  border-radius: var(--r-btn);
  transition: all .16s ease;
}
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--court); }
.btn--lime { background: var(--ball); color: var(--ink); }
.btn--lime:hover { background: #d8f325; }
.btn--ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ============ скорборд ============ */
.page-title {
  padding: 30px 0 22px;
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
}
.page-title h1 {
  font-family: var(--f-head);
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800; letter-spacing: -.03em;
}
.page-title .label { margin-left: auto; }

.filters {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
  padding: 4px 0 22px;
}
.f-group { display: flex; gap: 4px; background: var(--bg-soft); border-radius: 10px; padding: 4px; }
.f-btn {
  padding: 8px 15px;
  border-radius: 7px;
  font-size: 13px; font-weight: 600;
  color: var(--muted);
  display: flex; align-items: center; gap: 7px;
  transition: all .15s;
}
.f-btn:hover { color: var(--ink); }
.f-btn.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(18,22,15,.12); }
.f-btn.is-on .dot { animation: pulse 1.6s ease-in-out infinite; }
.f-btn .count { font-size: 11px; color: var(--faint); }
.f-btn.is-on .count { color: var(--muted); }

.tourney {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  margin-bottom: 18px;
  background: #fff;
  overflow: clip; /* не hidden: иначе липкая шапка турнира прилипает к рамке карточки и закрывает первую строку */
}
.tourney__head {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 64px; z-index: 10;
}
.t-badge {
  font-size: 10px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 6px;
  flex-shrink: 0;
}
.t-badge--atp { background: var(--ink); color: var(--ball); }
.t-badge--wta { background: var(--sky); color: #fff; }
.t-badge--chl { background: #f6e8df; color: var(--clay); }
.t-badge--itf { background: var(--bg-tint); color: var(--court); }
.tourney__name {
  font-family: var(--f-head);
  font-size: 15.5px; font-weight: 700; letter-spacing: -.01em;
}
.tourney__info {
  margin-left: auto;
  font-size: 12px; color: var(--faint); font-weight: 500;
  display: flex; gap: 16px;
}
.tourney__info b { color: var(--ink-2); font-weight: 600; }
.tourney .match-row { padding: 10px 18px; border-top: 1px solid var(--line-soft); }
.tourney .match-row .mr-status { padding-left: 0; }

/* ============ статья ============ */
.article { max-width: 720px; margin: 0 auto; padding: 44px var(--gutter) 0; }
.article > .kicker { margin-bottom: 14px; }
.article h1 {
  font-family: var(--f-head);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800; letter-spacing: -.03em;
  line-height: 1.05;
  margin-bottom: 18px;
}
.article .lead {
  font-family: var(--f-serif);
  font-size: 20px; line-height: 1.5; color: var(--ink-2);
  margin-bottom: 20px;
}
.article .meta-row {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.article-hero {
  border-radius: var(--r-card);
  overflow: hidden;
  margin: 26px 0 8px;
  aspect-ratio: 16/9;
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-hero-cap {
  font-size: 12px; color: var(--faint);
  padding: 8px 2px 0;
}

.article-body {
  margin-top: 26px;
  font-family: var(--f-serif);
  font-size: 18px; line-height: 1.72;
  color: #23281e;
}
.article-body p { margin-bottom: 1.35em; }
.article-body h2 {
  font-family: var(--f-head);
  font-size: 24px; font-weight: 800; letter-spacing: -.02em;
  margin: 1.7em 0 .6em;
  color: var(--ink);
}
.pull-quote {
  margin: 1.9em 0;
  padding: 6px 0 6px 24px;
  border-left: 3px solid var(--ball);
  font-family: var(--f-head);
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 700; letter-spacing: -.015em;
  line-height: 1.25; color: var(--ink);
}
.pull-quote cite {
  display: block; margin-top: 10px;
  font-family: var(--f-body); font-size: 12px; font-style: normal;
  font-weight: 600; letter-spacing: .1em; color: var(--faint);
  text-transform: uppercase;
}

/* таблица статистики */
.stat-table {
  margin: 2em 0 2.2em;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  font-family: var(--f-body);
}
.stat-table__title {
  padding: 12px 18px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
}
.stat-table table { width: 100%; border-collapse: collapse; }
.stat-table th, .stat-table td {
  font-size: 13.5px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line-soft);
  text-align: center;
  font-family: var(--f-mono);
}
.stat-table th:first-child, .stat-table td:first-child {
  text-align: left; font-family: var(--f-body);
  color: var(--muted); font-size: 13px; font-weight: 500;
}
.stat-table thead th {
  font-family: var(--f-head);
  font-size: 13px; font-weight: 800; letter-spacing: 0;
  color: var(--ink);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.stat-table td.best { color: var(--court); font-weight: 700; }
.stat-table tbody tr:last-child td { border-bottom: none; }
.stat-table tbody tr:hover { background: var(--bg-soft); }

/* ============ комментарии ============ */
.comments { max-width: 720px; margin: 64px auto 0; padding: 0 var(--gutter); }
.comments .section-head { margin-bottom: 6px; }
.comment {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr);
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  background: var(--bg-tint); color: var(--court-deep);
  flex-shrink: 0;
}
.avatar--official {
  background: var(--ink);
  padding: 9px;
}
.c-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.c-name { font-size: 14px; font-weight: 700; }
.c-time { font-size: 12px; color: var(--faint); }
.c-badge {
  font-size: 10px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--court);
  background: var(--bg-tint);
  padding: 3px 8px; border-radius: 20px;
}
.c-text { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.c-actions { margin-top: 10px; display: flex; gap: 18px; }
.c-actions button {
  font-size: 12.5px; font-weight: 600; color: var(--faint);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 6px;
  transition: all .15s;
}
.c-actions button:hover { color: var(--court); background: var(--bg-soft); }
.c-actions button.liked { color: var(--court); }

/* ответ редакции — мягко отличим, без крика про ИИ */
.comment--official {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 18px 20px;
  margin: 14px 0 14px 56px;
  border-bottom: 1px solid var(--line);
}
.comment--official .c-name { color: var(--court); }

.comment-form {
  margin-top: 30px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.comment-form:focus-within { border-color: var(--faint); box-shadow: var(--shadow-card); }
.comment-form textarea {
  width: 100%; min-height: 100px;
  background: transparent; border: none; resize: vertical;
  padding: 16px 18px;
  color: var(--ink);
  font-family: var(--f-body); font-size: 15px; line-height: 1.6;
}
.comment-form textarea:focus { outline: none; }
.comment-form__bar {
  display: flex; align-items: center; gap: 14px;
  border-top: 1px solid var(--line-soft);
  padding: 10px 14px 10px 18px;
}
.comment-form__hint { font-size: 12px; color: var(--faint); }

/* ============ футер ============ */
.site-footer {
  margin-top: 90px;
  background: var(--dark);
  color: #c6ccb8;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0 44px;
}
.site-footer .logo__word { color: #fff; }
.site-footer .logo__word b { color: var(--ball); }
.site-footer h4 {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .16em;
  color: #79816c;
  margin-bottom: 18px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 11px; }
.site-footer li a { font-size: 14px; color: #c6ccb8; transition: color .15s; }
.site-footer li a:hover { color: var(--ball); }
.footer-brand p { margin-top: 16px; font-size: 13.5px; line-height: 1.65; color: #8a907c; max-width: 36ch; }
.footer-brand .api-link {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px;
  font-size: 13.5px; font-weight: 600;
  color: var(--ball);
  border-bottom: 1px solid rgba(200,228,21,.35);
  padding-bottom: 2px;
  transition: border-color .15s;
}
.footer-brand .api-link:hover { border-color: var(--ball); }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.09);
  padding: 20px 0;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 12.5px; color: #79816c;
}

/* ============ гайд ============ */
.guide-hero { padding: 64px 0 44px; border-bottom: 1px solid var(--line); }
.guide-hero h1 {
  font-family: var(--f-head);
  font-size: clamp(40px, 6.5vw, 84px);
  font-weight: 800; letter-spacing: -.035em; line-height: .98;
}
.guide-hero h1 span { color: var(--court); }
.guide-hero p { margin-top: 20px; max-width: 62ch; color: var(--ink-2); font-size: 17px; line-height: 1.65; }
.guide-section { padding: 52px 0; border-bottom: 1px solid var(--line); }
.guide-section > .label { display: block; margin-bottom: 8px; }
.guide-section h2 {
  font-family: var(--f-head); font-size: 32px; font-weight: 800;
  letter-spacing: -.025em; margin-bottom: 24px;
}
.guide-section > p { max-width: 64ch; color: var(--ink-2); margin-bottom: 26px; }

.swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.swatch {
  border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
  background: #fff;
}
.swatch__chip { height: 76px; }
.swatch__meta { padding: 11px 13px; border-top: 1px solid var(--line-soft); }
.swatch__meta .mono { font-family: var(--f-mono); font-size: 12px; font-weight: 700; display: block; }
.swatch__meta .usage { font-size: 11.5px; color: var(--faint); display: block; margin-top: 3px; }

.type-spec { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.type-spec__row {
  display: grid; grid-template-columns: 230px minmax(0,1fr) auto;
  gap: 26px; align-items: baseline;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.type-spec__row:last-child { border-bottom: none; }
.type-spec__meta { font-size: 12px; color: var(--faint); line-height: 1.7; }
.type-spec__size { font-family: var(--f-mono); font-size: 11px; color: var(--court); font-weight: 700; }
.specimen-1 { font-family: var(--f-head); font-weight: 800; letter-spacing: -.03em; font-size: 42px; line-height: 1; }
.specimen-2 { font-family: var(--f-head); font-weight: 700; letter-spacing: -.015em; font-size: 24px; }
.specimen-3 { font-family: var(--f-serif); font-size: 17px; line-height: 1.65; color: #23281e; max-width: 58ch; }
.specimen-4 { font-family: var(--f-mono); font-size: 19px; font-variant-numeric: tabular-nums; }

.component-stage {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg-soft);
  padding: 32px;
  margin-bottom: 14px;
}
.component-stage--dark { background: var(--dark); border-color: var(--dark); }
.component-note { font-size: 12.5px; color: var(--faint); margin: 22px 0 12px; font-weight: 600; }
.component-note:first-of-type { margin-top: 0; }

.device-row { display: flex; gap: 26px; flex-wrap: wrap; }
.device { width: 300px; flex-shrink: 0; }
.device__frame {
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 10px;
  background: #fff;
  box-shadow: var(--shadow-card);
}
.device__screen {
  border-radius: 20px; overflow: hidden;
  height: 560px; background: var(--bg);
}
.device__screen iframe {
  width: 390px; height: 730px; border: none;
  transform: scale(.72); transform-origin: top left;
}
.device__cap {
  margin-top: 12px;
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
  text-align: center;
}

.states-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr));
  gap: 16px;
}
.state-demo {
  border: 1px solid var(--line); border-radius: var(--r-card);
  overflow: hidden; background: #fff;
}
.state-demo__head {
  padding: 10px 16px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.state-demo .match-row { padding: 10px 16px; }

/* ============ адаптив ============ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .hero__media { min-height: 340px; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .type-spec__row { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .main-nav { display: none; }
  .burger { display: block; }
  .live-track .live-card { flex-basis: 330px; }
  .carousel-nav { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .hero__caption { padding: 20px; }

  .match-row { grid-template-columns: minmax(0,1fr) auto; }
  .mr-status {
    grid-column: 1 / -1;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 0 0 8px;
  }
  .set-cell { min-width: 30px; font-size: 13px; }
  .mr-player { font-size: 13.5px; }
  .tourney .match-row { padding: 12px 14px; }
  .tourney__head { flex-wrap: wrap; gap: 8px; top: 63px; }
  .tourney__info { margin-left: 0; width: 100%; }

  .news-row { flex-direction: column; gap: 6px; align-items: flex-start; }
  .news-row .kicker { width: auto; }

  .site-footer__grid { grid-template-columns: 1fr; gap: 30px; }
  .filters { flex-direction: column; align-items: flex-start; }
  .f-group { overflow-x: auto; max-width: 100%; }
  .comment--official { margin-left: 0; }
  .component-stage { padding: 18px; }
  .article { padding-top: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   Разделы: турниры, игроки, статьи, API (страницы на данных базы)
   Блок держим В КОНЦЕ файла, перед медиа-запросами дизайн-гайда.
   ============================================================ */

.back-link {
  display: inline-block; margin: 6px 0 14px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.back-link:hover { color: var(--court); }

.empty {
  padding: 28px 20px; text-align: center; color: var(--muted);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-card);
}
.empty--big { padding: 48px 24px; }
.empty--big p { margin: 0 0 10px; font-size: 16px; }
.empty a { color: var(--court); font-weight: 600; }

.flag {
  flex-shrink: 0;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--muted); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px;
}

.search { display: flex; align-items: center; margin-left: auto; }
.search input {
  width: 240px; max-width: 100%; height: 36px; padding: 0 12px;
  font-family: var(--f-body); font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-btn);
}
.search input:focus { outline: none; border-color: var(--court); }

/* ---- список турниров ---- */
.t-group { margin-bottom: 36px; }
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.t-card {
  display: block; padding: 16px 18px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-card);
  transition: box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.t-card:hover { box-shadow: var(--shadow-card); border-color: var(--line-soft); }
.t-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.t-card__live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 700; color: var(--red);
}
.t-card__name { font-family: var(--f-head); font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.t-card__meta { margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.t-card__champ { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: 13px; }
.t-card__champ b { color: var(--ink); }

/* ---- карточка турнира ---- */
.t-head { margin: 4px 0 18px; }
.t-head h1 { margin: 10px 0 6px; font-size: clamp(26px, 4vw, 40px); }
.champs { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.champ {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--bg-tint); border-radius: var(--r-card);
  font-size: 15px;
}
.champ b { font-family: var(--f-head); font-size: 17px; }
.champ__score { font-family: var(--f-mono); font-weight: 700; font-size: 13px; }

/* ---- игроки: список ---- */
.p-list { border: 1px solid var(--line); border-radius: var(--r-card); overflow: clip; background: #fff; }
.p-row {
  display: grid; grid-template-columns: 40px 28px 20px 1fr auto auto; align-items: center; gap: 11px;
  padding: 11px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink);
}
.p-row:last-child { border-bottom: 0; }
.p-row:hover { background: var(--bg-soft); }
.p-row__rank { font-family: var(--f-mono); font-size: 14px; font-weight: 700; color: var(--muted); }
.p-row__name { font-weight: 600; }
.p-row__pts { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.p-row__move { font-size: 11px; font-weight: 700; }
.p-row__move.up { color: var(--court); }
.p-row__move.down { color: var(--clay); }

/* ---- карточка игрока ---- */
.p-head { display: flex; align-items: center; gap: 20px; margin: 6px 0 22px; }
.p-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); }
.p-photo--none { background: var(--bg-tint); }
.p-head h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 40px); }
.p-head__text .label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.rank-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.rank-tile {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; background: var(--bg-soft); border-radius: var(--r-card);
}
.rank-tile b { font-family: var(--f-mono); font-size: 26px; font-weight: 700; line-height: 1.1; }

.bio { max-width: 720px; margin-bottom: 30px; }
.bio h2, .p-matches h2 { font-size: 20px; margin: 0 0 12px; }
.bio p { font-family: var(--f-serif); font-size: 17px; line-height: 1.72; margin: 0 0 12px; color: var(--ink-2); }

.p-matches { margin-bottom: 40px; }
.p-match {
  display: grid; grid-template-columns: 30px minmax(150px, 1.2fr) minmax(140px, 1.4fr) auto;
  align-items: center; gap: 14px;
  padding: 11px 14px; border-bottom: 1px solid var(--line-soft);
}
.p-match:hover { background: var(--bg-soft); }
.p-match__res {
  width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 700; color: #fff; background: var(--faint);
}
.p-match.is-win .p-match__res { background: var(--court); }
.p-match.is-loss .p-match__res { background: var(--clay); }
.p-match__ev { display: flex; flex-direction: column; }
.p-match__ev b { font-size: 14px; }
.p-match__opp { font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; }
.p-match__score { font-family: var(--f-mono); font-size: 13px; font-weight: 700; text-align: right; }

/* ---- статьи ---- */
.a-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.a-card { display: block; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); }
.a-card h3 { margin: 8px 0; font-size: 19px; }
.a-card p { color: var(--muted); font-size: 14px; margin: 0 0 10px; }

/* ---- API ---- */
.api-lead { max-width: 720px; margin-bottom: 26px; }
.api-lead p { font-family: var(--f-serif); font-size: 18px; line-height: 1.7; color: var(--ink-2); }
.api-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 34px; }
.api-tile { display: flex; flex-direction: column; gap: 3px; padding: 18px; background: var(--bg-soft); border-radius: var(--r-card); }
.api-tile b { font-family: var(--f-mono); font-size: 26px; font-weight: 700; }
.api-note { max-width: 760px; margin-bottom: 48px; }
.api-note h2 { font-size: 22px; margin: 0 0 12px; }
.api-list { margin: 0 0 16px; padding-left: 18px; }
.api-list li { margin-bottom: 8px; font-size: 15px; color: var(--ink-2); }
.api-list a { color: var(--court); font-weight: 600; }

/* ---- пункт меню на внешний проект ---- */
.ext-arrow { font-size: 9px; margin-left: 3px; opacity: .55; vertical-align: super; }

@media (max-width: 760px) {
  .p-row { grid-template-columns: 32px 26px 18px 1fr auto; gap: 9px; padding: 10px 12px; }
  .p-row__pts { display: none; }
  .p-match { grid-template-columns: 26px 1fr auto; gap: 10px; }
  .p-match__opp { grid-column: 2 / -1; }
  .p-head { gap: 14px; }
  .p-photo { width: 68px; height: 68px; }
  .search input { width: 100%; }
  .search { width: 100%; margin: 8px 0 0; }
}

/* ---- главная на данных: текстовый герой и плитка результатов ---- */
.hero__media--text {
  display: flex; align-items: flex-end; min-height: 280px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  border-radius: var(--r-card);
}
.hero__media--text .hero__caption { position: static; padding: 28px; }
.hero__media--text h1 { color: #fff; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.res-card {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline;
  padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
}
.res-card:hover { box-shadow: var(--shadow-card); }
.res-card .t-badge { grid-column: 1 / -1; justify-self: start; margin-bottom: 6px; }
.res-card__t { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.res-card__w { font-weight: 700; }
.res-card__l { color: var(--muted); }
.res-card__s { grid-row: 3 / 5; grid-column: 2; font-family: var(--f-mono); font-size: 13px; font-weight: 700; text-align: right; }


/* материал без фотографии: тёмная плашка вместо снимка */
.hero__media--flat {
  display: flex; align-items: flex-end; min-height: 260px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  border-radius: var(--r-card);
}
.hero__media--flat .hero__caption { position: static; padding: 26px; }
.hero__media--flat h1 { color: #fff; }
.article-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 40px; }
.article-links .btn { border: 1px solid var(--line); }
.news-rows .news-row { display: block; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.news-rows .news-row h3 { margin: 6px 0 4px; font-size: 17px; }

/* обложка в карточке игрока: игровой кадр из фотобанка */
.p-cover { margin: 0 0 18px; }
.p-cover img {
  width: 100%; max-height: 380px; object-fit: cover;
  border-radius: var(--r-card); display: block;
}
.p-cover figcaption { margin-top: 7px; font-size: 11.5px; }
.p-cover a { color: var(--muted); text-decoration: underline; }
.photo-credit { font-size: 11px; opacity: .8; }
.photo-credit a { color: var(--muted); text-decoration: underline; }


/* Кадры игроков кадрируем по верхней части: при обрезке по центру срезает лицо. */
.news-card__media img,
.hero__media img,
.article-hero img,
.p-cover img { object-fit: cover; object-position: 50% 8%; }   /* кадрируем ниже лица, а не по макушке */
.news-card__media { overflow: clip; border-radius: 10px; }
.news-card__media img { width: 100%; height: 100%; display: block; }

/* Вертикальный кадр в широком блоке кадрируем по верхней части, а не вписываем:
   поля по бокам выглядят хуже обрезки. */
/* Снимок заполняет плашку целиком; точка кадрирования приходит из данных (где найдено лицо). */
.news-card__media img, .hero__media img, .article-hero img { object-fit: cover; object-position: 50% 25%; }
.article-hero img { max-height: 520px; width: 100%; }



}
.article-hero--tall img { object-fit: cover; object-position: 50% 15%; max-height: 520px; width: 100%; }

/* Единая пропорция карточек ленты: иначе блоки разной высоты. */
.news-card__media { aspect-ratio: 16 / 10; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   Страница Live: плотный список матчей и панель выбранного.
   ============================================================ */
.live-page { padding-bottom: 60px; }
.live-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 14px; }
.live-top__left { display: flex; align-items: baseline; gap: 14px; }
.live-top h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); }

.daybar { display: flex; align-items: center; gap: 8px; }
.day-btn {
  height: 32px; min-width: 32px; padding: 0 12px;
  font: 600 13px/1 var(--f-body); color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-btn); cursor: pointer;
}
.day-btn.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.live-filters { align-items: center; gap: 10px; flex-wrap: wrap; }

.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.live-list { border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; overflow: clip; }

/* заголовок турнира */
.tgroup + .tgroup { border-top: 6px solid var(--bg-soft); }
.thead {
  display: flex; align-items: center; gap: 9px; cursor: pointer;
  padding: 8px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--line);
  position: sticky; top: 64px; z-index: 5;
}
.thead .fl, .thead .t-badge { flex: none; }
.thead b { font-family: var(--f-head); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thead .label { font-size: 11px; white-space: nowrap; }
.thead .tlink { margin-left: auto; font-size: 11px; color: var(--muted); text-decoration: underline; }
.thead .chev { color: var(--faint); font-size: 13px; }
.tlive { display: inline-flex; align-items: center; gap: 4px; font: 700 10.5px var(--f-mono); color: var(--red); }
.tgroup.is-closed .tbody { display: none; }

/* матч: звезда | статус | игроки | счёт фиксированной колонкой */
.row {
  display: grid; grid-template-columns: 22px 58px minmax(0, 1fr) auto;
  align-items: center; column-gap: 10px;
  padding: 7px 12px; cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.row:nth-child(even) { background: #fafbf8; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--bg-soft); }
.row.is-open { background: var(--bg-tint); box-shadow: inset 3px 0 0 var(--court); }
.row--live { box-shadow: inset 3px 0 0 var(--red); }
.row.is-flash { animation: row-flash 1.2s var(--ease); }
@keyframes row-flash { 0% { background: rgba(200,228,21,.45); } 100% { background: transparent; } }

.fav { border: 0; background: none; color: #dfe3d8; font-size: 13px; cursor: pointer; padding: 0; line-height: 1; }
.fav.is-on { color: #e8b400; }
.when { display: flex; flex-direction: column; gap: 1px; }
.st { font: 700 9.5px/1.2 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; }
.st--live { color: var(--red); display: inline-flex; align-items: center; gap: 3px; }
.st--ft { color: var(--faint); }
.st--time { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.rd { font-size: 9.5px; color: var(--faint); font-style: normal; white-space: nowrap; }

.pair { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
/* имя и счёт стоят рядом, а не по разным краям строки: иначе взгляд их не связывает */
.side { display: grid; grid-template-columns: 11px 20px 18px minmax(0, 210px) auto 1fr; align-items: center; gap: 6px; }
.nm { display: contents; }
.nm b {
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nm--win b { font-weight: 700; color: var(--ink); }
/* флаг картинкой: три буквы кода читаются хуже и не узнаются с первого взгляда */
.fl { width: 18px; height: 13px; object-fit: cover; border-radius: 2px;
      box-shadow: 0 0 0 1px rgba(16,20,8,.12); display: block; }
.fl--none { width: 18px; height: 13px; font: 700 7px/13px var(--f-mono); color: var(--faint);
            background: var(--bg-soft); border-radius: 2px; text-align: center; font-style: normal; }
.fl--t { width: 21px; height: 15px; }
/* аватарка: настоящее фото там, где оно есть, иначе инициалы */
.av { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; object-position: 50% 12%;
      background: var(--bg-soft); display: block; }
.av--none { font: 700 8px/20px var(--f-mono); color: var(--ink-2); text-align: center;
            font-style: normal; letter-spacing: -.02em; background: var(--bg-tint);
            box-shadow: inset 0 0 0 1px var(--line); }
.av--big { width: 38px; height: 38px; }
.av--row { width: 28px; height: 28px; flex: none; }
.av--row.av--none { font-size: 10px; line-height: 28px; }
.av--big.av--none { font-size: 13px; line-height: 38px; }
.sd { display: none; }
.srv { width: 11px; height: 11px; }
.srv--none { width: 11px; height: 11px; display: inline-block; }

/* счёт: своя колонка, ячейки одинаковой ширины, цифры не пляшут */
.scores { display: grid; grid-auto-flow: column; grid-auto-columns: 21px; gap: 2px; margin-left: 10px; }
.sc {
  text-align: center; font: 600 13px/1.5 var(--f-mono); color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.sc--win { color: var(--ink); font-weight: 700; }
.sc--now { color: var(--ink); font-weight: 700; }
.sc--pts { background: var(--bg-tint); border-radius: 3px; color: var(--ink); font-weight: 700; }
.sc--empty { color: transparent; }
.note { grid-column: 3 / -1; font-size: 10.5px; color: var(--clay); margin-top: 1px; }

/* панель матча */
.live-panel {
  position: sticky; top: 84px;
  border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; padding: 16px;
}
.live-panel__empty { color: var(--muted); font-size: 13px; padding: 20px 0; text-align: center; }
.live-panel__head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pline { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.pline .fl { width: 21px; height: 15px; }
.pline b { font-size: 14px; font-weight: 500; flex: 1; min-width: 0; line-height: 1.25; }
.pline--win b { font-weight: 700; }
.pscore { display: grid; grid-auto-flow: column; grid-auto-columns: 22px; gap: 2px; margin-left: auto; }
.note--big { margin-top: 10px; font-size: 12px; }
.live-panel__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.live-panel__links .btn { border: 1px solid var(--line); font-size: 12px; padding: 7px 11px; }

@media (max-width: 900px) {
  .live-grid { grid-template-columns: 1fr; }
  .live-panel { position: static; order: -1; }
  .row { grid-template-columns: 20px 52px minmax(0, 1fr) auto; column-gap: 8px; padding: 7px 10px; }
  .side { grid-template-columns: 11px 16px minmax(0, 1fr) auto; }
  .row .av { display: none; }
  .fl, .fl--none { width: 16px; height: 12px; }
  .thead { top: 56px; }
}
