/* Публичный сайт: поиск в шапке, новости, страница боя, поиск по сайту.
   Базовый язык «плакат» — в app.css; здесь только то, чего там нет. */

/* Поиск в шапке */
.nav a { white-space: nowrap; }
.site-search { display: flex; gap: 6px; flex: 0 1 260px; min-width: 150px; }
.site-search input[type=search] { padding: 6px 10px; font-size: 15px; min-width: 0; }
.site-search .btn { flex: none; }
@media (max-width: 1180px) and (min-width: 901px) {
  .topbar .container { gap: 20px; }
  .nav { gap: 16px; }
  .nav a { font-size: 16px; }
  .site-search .btn { display: none; }
}
@media (max-width: 900px) {
  .site-search { display: none; width: 100%; flex: none; }
  .topbar.open .site-search { display: flex; padding: 12px 0 0; }
  .site-search input[type=search] { padding: 10px 12px; font-size: 16px; }
}

/* Новости */
.news-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; padding: 20px 0; color: inherit; text-decoration: none; }
.news-row:hover { color: inherit; }
.news-row:hover .rowtitle { color: var(--red); }
.news-row.no-cover { grid-template-columns: minmax(0, 1fr); }
.news-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--blue-tint); }
.news-row .rowtitle { line-height: 1.35; }
.news-lead { margin: 6px 0 0; color: var(--muted); max-width: 68ch; }
@media (max-width: 600px) {
  .news-row { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
  .news-cover { aspect-ratio: 1; }
  .news-lead { display: none; }
}
.article { max-width: 760px; }
.article h1 { font-size: clamp(28px, 4.4vw, 44px); margin-top: 8px; }
.article .rowmeta { font-size: 15px; }
.article-cover { width: 100%; margin: 24px 0; }
.article-body { font-size: 18px; line-height: 1.6; }
.article-body p { margin: 0 0 1.1em; }

/* Страница боя: два угла через волосяную линию */
.bout-corners { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); border-top: 2px solid var(--line-strong); border-bottom: 1px solid var(--line); margin-top: 24px; }
.corner { padding: 20px 0; }
.corner.blue-corner { text-align: right; }
.corner-label { font-family: var(--head); font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
.red-corner .corner-label { color: var(--red); }
.blue-corner .corner-label { color: var(--blue); }
.corner-name { font: 700 clamp(24px, 3.4vw, 36px)/1.05 var(--head); text-transform: uppercase; margin: 6px 0 12px; }
.corner-name a { color: var(--ink); text-decoration: none; }
.corner-name a:hover { color: var(--red); }
.corner .kv { font-size: 15px; }
/* Синий угол зеркальный: подписи прижаты к значениям у правого края */
.blue-corner .kv { justify-items: end; width: max-content; max-width: 100%; margin-left: auto; }
.versus { align-self: center; padding: 0 24px; font: 700 22px var(--head); color: var(--muted); text-transform: uppercase; }
.bout-result { font: 700 clamp(20px, 2.6vw, 26px)/1.2 var(--head); text-transform: uppercase; }
@media (max-width: 700px) {
  .bout-corners { grid-template-columns: minmax(0, 1fr); }
  .corner.blue-corner { text-align: left; border-top: 1px solid var(--line); }
  .blue-corner .kv { justify-items: start; width: auto; margin-left: 0; }
  .versus { display: none; }
}

/* Результаты поиска и фильтры */
.searchbar .year { flex: 0 1 120px; }
.search-page .searchbar input { flex: 1 1 260px; }
.search-group + .search-group { margin-top: 40px; }
.note { max-width: 70ch; margin: 0 0 12px; }
p.empty { max-width: 70ch; }

/* Поделиться профилем */
.share-status { font-size: 14px; color: var(--ok); }

/* Плашка про cookie: снизу, без затемнения страницы */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--ink); color: #fff; border-top: 1px solid rgba(255, 255, 255, .2); }
.cookie-bar[hidden] { display: none; }
.cookie-bar .container { display: flex; gap: 12px 24px; align-items: center; flex-wrap: wrap; padding-top: 14px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.cookie-bar p { margin: 0; flex: 1 1 420px; font-size: 14px; color: rgba(255, 255, 255, .86); max-width: 70ch; }
.cookie-bar a { color: #fff; }
.cookie-bar .row { flex: none; gap: 8px; }
.cookie-bar .btn-outline { color: #fff; border-color: rgba(255, 255, 255, .6); }
.cookie-bar .btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }
@media (max-width: 600px) { .cookie-bar .row { width: 100%; } .cookie-bar .row .btn { flex: 1; } }

/* Карта до согласия: Яндекс не загружается, пока посетитель не попросит */
.map-gate { display: grid; place-items: center; text-align: center; background: var(--blue-tint); }
.map-gate div { max-width: 46ch; padding: 24px 16px; }
.map-gate p { color: var(--muted); font-size: 14px; }

/* Участники турнира: таблица на компьютере, строки-записи на телефоне */
.people-tools { display: flex; gap: 8px 16px; align-items: center; flex-wrap: wrap; padding: 16px 0 4px; }
.people-tools input[type=search] { flex: 1 1 260px; max-width: 420px; }
.people-tools [data-found]:empty { display: none; }
.people-title { display: flex; gap: 10px; align-items: baseline; margin: 28px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.people-title .num { font-family: var(--font); font-size: 15px; font-weight: 400; }
.people .p-age, .people .p-weight, .people .p-rank { white-space: nowrap; }
.people .p-disc { color: var(--muted); }
.people tr[hidden] { display: none; }
/* Одинаковые колонки у «Допущены» и «Заявлены», чтобы списки читались как один */
@media (min-width: 601px) {
  .people { table-layout: fixed; min-width: 860px; }
  .people th:nth-child(1) { width: 19%; } .people th:nth-child(2) { width: 18%; } .people th:nth-child(3) { width: 12%; }
  .people th:nth-child(4) { width: 13%; } .people th:nth-child(5) { width: 8%; } .people th:nth-child(6) { width: 6%; }
  .people th:nth-child(7) { width: 9%; } .people th:nth-child(8) { width: 5%; }
  .people td { overflow-wrap: break-word; hyphens: auto; }
}
@media (max-width: 600px) {
  .people thead { display: none; }
  .people, .people tbody, .people tr { display: block; }
  .people tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .people td { display: inline; padding: 0; border: 0; font-size: 14px; color: var(--muted); white-space: normal; }
  .people td:empty { display: none; }
  .people .p-name { display: block; font-size: 18px; line-height: 1.3; margin-bottom: 2px; }
  .people .p-club, .people .p-coach { color: var(--ink); }
  .people .p-coach::before { content: " · "; }
  /* Год рождения начинает третью строку */
  .people .p-age::before { content: "\A"; white-space: pre; }
  .people .p-weight::before, .people .p-rank::before, .people .p-disc::before { content: " · "; }
  .people .p-weight::after { content: " кг"; }
  .people .p-bouts::before { content: " · боёв "; }
  .people .p-cat::before { content: " · кат. "; }
  .people .p-hidden .p-cat::before { content: "кат. "; }
}
/* Ученики тренера: на телефоне строка складывается, «Место» не уходит за прокрутку */
@media (max-width: 600px) {
  .pupils thead { display: none; }
  .pupils, .pupils tbody { display: block; }
  .pupils tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 12px; row-gap: 2px;
    grid-template-areas: "name name name" "year rank rank" "bouts wins place"; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .pupils td { display: block; border: 0; padding: 0; text-align: left !important; font-size: 14px; }
  .pupils td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }
  .pupils .u-name { grid-area: name; font-size: 17px; }
  .pupils td:empty { visibility: hidden; }
  .pupils .u-year { grid-area: year; } .pupils .u-rank { grid-area: rank; }
  .pupils .u-bouts { grid-area: bouts; } .pupils .u-wins { grid-area: wins; } .pupils .u-place { grid-area: place; }
}

/* Заставка при первом открытии: логотип на белом, плавно уходит */
.intro { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--paper); transition: opacity .6s ease; }
.intro img { width: min(38vw, 180px); height: auto; animation: intro-in .7s ease-out both; }
.intro-out { opacity: 0; pointer-events: none; }
@keyframes intro-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* О ЦРЕ */
.about { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; align-items: start; }
.about-text .lead { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.4; max-width: 34ch; }
.about-text p { max-width: 62ch; }
.about-logo { width: 240px; height: auto; }
.about-score { margin-top: 40px; }
@media (max-width: 700px) { .about { grid-template-columns: minmax(0, 1fr); gap: 24px; } .about-logo { width: 140px; order: -1; } }
