/* ============================================================
   Аргентина — Англия, полуфинал ЧМ-2026
   Редакционная матч-страница. Один first-party CSS, без шрифтов извне.
   Переменные --fr/--es-* сохранены из шаблона, но перенаведены на
   цвета Аргентины (небесно-синий) и Англии (красный).
   ============================================================ */

:root {
  --ink:        #14181d;   /* почти чёрный основной текст */
  --ink-2:      #4a5158;   /* вторичный текст */
  --ink-3:      #61686f;   /* третичный / подписи — 5.05:1 на --paper-2, 5.65:1 на белом */
  --paper:      #ffffff;
  --paper-2:    #f4f2ee;   /* тёплый нейтральный фон секции */
  --rule:       #d9d5cd;   /* тонкие разделители */
  --rule-2:     #e8e5df;
  --fr:         #255490;   /* синий Аргентины (акцент/ссылки) — 6.83:1 на --paper-2 */
  --fr-soft:    #e9f0f8;
  --es-red:     #b8102a;   /* красный Англии — 5.97:1 на --paper-2 */
  --es-gold:    #c8102e;   /* красный Англии (яркий, для акцентов) */
  --es-soft:    #fbecec;
  --live:       #b3221f;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;

  --w:      1180px;
  --w-narrow: 760px;
  --gut:    20px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;   /* страховка от горизонтального скролла */
}

.tabnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

.wrap {
  width: 100%;
  max-width: var(--w);
  margin: 0 auto;
  padding: 0 var(--gut);
}
.wrap--narrow { max-width: var(--w-narrow); }

img, svg { max-width: 100%; height: auto; }

/* ---------- ссылки и фокус ---------- */

a { color: var(--fr); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #072a66; }

:focus-visible {
  outline: 3px solid var(--fr);
  outline-offset: 2px;
}
/* На тёмных секциях синяя обводка дала бы контраст 1.71:1 против фона #14181d
   (WCAG 2.2 SC 1.4.11 требует ≥3:1). Здесь обводка белая — 15.6:1.
   Актуально в том числе для ссылок и кнопок, которые добавит сторонний плеер. */
.player-section :focus-visible,
.site-footer :focus-visible {
  outline-color: #ffffff;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  text-decoration: none;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ---------- шапка ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-mark {
  width: 6px;
  height: 26px;
  background: linear-gradient(
      to bottom,
      #75aadb 0 50%,
      var(--es-gold) 50% 100%);
  flex: none;
}
.brand-text { font-size: 15px; }
.brand-sub {
  display: block;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: block;
  padding: 10px 12px;      /* удобная зона нажатия */
  min-height: 44px;
  line-height: 24px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible { color: var(--ink); border-bottom-color: var(--fr); }

/* ---------- CSS-флаги ---------- */

.flag {
  display: inline-block;
  width: 54px;
  height: 36px;
  border: 1px solid rgba(0,0,0,.18);
  flex: none;
}
.flag--sm { width: 28px; height: 19px; vertical-align: -3px; margin-right: 6px; }

/* Аргентина: три горизонтальные полосы небесно-голубой / белый / голубой */
.flag-fr {
  background: linear-gradient(to bottom,
    #75aadb 0 33.33%,
    #ffffff 33.33% 66.66%,
    #75aadb 66.66% 100%);
}
/* Англия: крест Святого Георгия — красный крест на белом поле */
.flag-es {
  background:
    linear-gradient(#cf142b, #cf142b) center / 100% 30% no-repeat,
    linear-gradient(#cf142b, #cf142b) center / 30% 100% no-repeat,
    #ffffff;
}

/* ---------- главный матчевый блок ---------- */

/* Компактная шапка над плеером: даёт контекст (H1 + матч) и не отодвигает
   плеер вниз. Цветовой градиент команд теперь здесь. */
.hero {
  padding: 24px 0 20px;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(to right, var(--fr-soft), transparent 42%, transparent 58%, var(--es-soft));
}
.hero h1 { margin: 0 0 12px; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  max-width: none;
  font-size: 15px;
  color: var(--ink-2);
}
.hero-meta .flag--sm { margin: 0; }
.hero-meta strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-meta time { color: var(--ink-2); }
.hero-sep { color: var(--ink-3); }

/* Табло теперь идёт после плеера — фон нейтральный, без повторного градиента. */
.match {
  padding: 26px 0 34px;
  border-bottom: 1px solid var(--rule-2);
  background: var(--paper);
}
.stage {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
}
h1 {
  margin: 0 0 24px;
  font-size: clamp(1.6rem, 4.6vw, 2.7rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  font-weight: 800;
  max-width: 20ch;
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 300px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 22px 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.team {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.team--es { align-items: flex-end; text-align: right; }
.team-name {
  font-size: clamp(1.25rem, 3.4vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.team-note {
  font-size: 13px;
  color: var(--ink-2);
  max-width: 24ch;
}
.team--es .team-note { text-align: right; }

.center { text-align: center; }

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 6px;
  padding: 3px 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.status-dot {
  width: 8px; height: 8px;
  background: var(--ink-3);
  border-radius: 50%;
  flex: none;
}
[data-state="live"] .status-line { color: var(--live); border-color: var(--live); }
[data-state="live"] .status-dot  { background: var(--live); }
[data-state="finished"] .status-line { color: var(--ink); border-color: var(--ink); }
[data-state="finished"] .status-dot  { background: var(--ink); }

.kickoff-big {
  margin: 4px 0 0;
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.kickoff-msk {
  font-size: 0.32em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 4px;
}
.kickoff-date {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}
/* Зона «обратный отсчёт / счёт»: обоим состояниям отведена одна и та же высота,
   поэтому переключение prematch -> live -> finished не сдвигает макет. */
.countdown,
.score-wrap {
  margin: 10px 0 0;
  min-height: 80px;
  font-size: 14px;
  color: var(--ink-2);
}
.countdown { padding-top: 6px; }
.score {
  display: block;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.score-note {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-2);
}

/* факты под табло */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--rule-2);
  border: 1px solid var(--rule-2);
  border-top: none;
}
.fact {
  background: var(--paper);
  padding: 12px 14px;
}
.fact dt {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 3px;
}
.fact dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

/* ---------- секции ---------- */

.section {
  padding: 44px 0;
  border-bottom: 1px solid var(--rule-2);
}
.section--alt { background: var(--paper-2); }

h2 {
  margin: 0 0 14px;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 800;
  max-width: 26ch;
}
h3 {
  margin: 26px 0 8px;
  font-size: 1.1rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em;
}
p { margin: 0 0 14px; max-width: 68ch; }

.lede {
  font-size: 1.02rem;
  color: var(--ink-2);
  max-width: 62ch;
}
.note {
  font-size: 14px;
  color: var(--ink-2);
  border-left: 3px solid var(--rule);
  padding-left: 12px;
  max-width: 62ch;
}

/* асимметричная сетка «основное + врезка» */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.col-side {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}
.side-title {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 12px;
  max-width: none;
}
.side-p { font-size: 14.5px; color: var(--ink-2); }
.bullets {
  margin: 0;
  padding: 0;
  list-style: none;
}
.bullets li {
  font-size: 14.5px;
  color: var(--ink-2);
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-2);
}
.bullets li:last-child { border-bottom: none; }
.bullets strong { color: var(--ink); }

/* ---------- плеер ---------- */

.player-section {
  padding: 34px 0 40px;
  background: var(--ink);
  color: #f2f0ec;
  border-bottom: 1px solid var(--rule);
}
.player-section h2 { color: #fff; }
.player-section .lede { color: #b9c0c8; }

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 940px;           /* на широких экранах плеер не должен съедать весь экран */
  aspect-ratio: 16 / 9;       /* резерв под плеер — защита от CLS */
  margin: 18px 0 16px;
  background: #0b0e12;
  border: 1px solid #2b3138;
  overflow: hidden;
}
/* запасной вариант для браузеров без aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
  .video-wrapper { height: 0; padding-bottom: 56.25%; }
}
.dreams-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #8e979f;
  font-size: 15px;
}
.dreams-player iframe,
.dreams-player video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.player-fallback {
  font-size: 14px;
  color: #b9c0c8;
  max-width: 72ch;
  border-left: 3px solid #3a424b;
  padding-left: 12px;
}
.player-fallback strong { color: #fff; }
.player-fallback code {
  font-size: 13px;
  background: #22282f;
  padding: 1px 5px;
  color: #dfe4e9;
}
/* ---------- путь команд ---------- */

.road-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 20px;
}
.road { border-top: 2px solid var(--ink); padding-top: 12px; }
.road h3 { margin-top: 0; display: flex; align-items: center; font-size: 1.2rem; }
.road-list {
  list-style: none;
  margin: 12px 0 14px;
  padding: 0;
  counter-reset: none;
}
.road-list li {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.road-stage { color: var(--ink-3); font-size: 13px; }
.road-res {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  padding: 1px 8px;
  white-space: nowrap;
}
.road-res.win  { background: #e6efe6; color: #1e5b2a; }
.road-res.draw { background: #efece5; color: #6a5f43; }
.road-opp { font-weight: 600; text-align: right; }
.road-sum { font-size: 14px; color: var(--ink-2); margin: 0; }

/* ---------- игроки ---------- */

.players {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 22px;
}
.player {
  background: var(--paper-2);
  padding: 18px 18px 16px;
}
.player-team {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-3);
}
.player h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}
.player-stat {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 15px;
  color: var(--fr);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
}
.player p:last-child {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-2);
}
/* испанские карточки — акцент цветом ИСПАНИИ, но смысл несёт текстовая подпись команды */
.player:nth-child(n+5) .player-stat { color: var(--es-red); }

/* ---------- хронология ---------- */

.timeline {
  list-style: none;
  margin: 18px 0 22px;
  padding: 0;
  border-left: 2px solid var(--rule);
}
.tl-item {
  position: relative;
  padding: 0 0 24px 22px;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 8px;
  width: 10px;
  height: 10px;
  background: var(--ink-3);
}
.tl-item--wc::before { background: var(--fr); width: 12px; height: 12px; left: -7px; }
.tl-date {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-3);
}
.tl-tour { margin: 2px 0 2px; font-size: 14px; color: var(--ink-2); }
.tl-res  { margin: 0 0 4px; font-size: 1.1rem; }
.tl-txt  { margin: 0; font-size: 15px; color: var(--ink-2); max-width: 62ch; }

/* ---------- таблица ---------- */

.table-scroll {
  overflow-x: auto;
  margin: 18px 0 14px;
  -webkit-overflow-scrolling: touch;
}
.cmp {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 460px;
}
.cmp caption {
  caption-side: top;
  text-align: left;
  font-size: 14px;
  color: var(--ink-2);
  padding-bottom: 10px;
  max-width: 68ch;
}
.cmp th, .cmp td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.cmp thead th {
  border-bottom: 2px solid var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.cmp thead th:nth-child(2) { color: var(--fr); }
.cmp thead th:nth-child(3) { color: var(--es-red); }
.cmp tbody th { font-weight: 600; color: var(--ink-2); width: 42%; }
.cmp tbody td { font-weight: 700; }
.cmp tbody tr:nth-child(odd) th,
.cmp tbody tr:nth-child(odd) td { background: rgba(0,0,0,.018); }

/* ---------- FAQ ---------- */

#faq h3 { margin-top: 24px; }
#faq h3:first-of-type { margin-top: 18px; }
#faq p { color: var(--ink-2); }

/* ---------- источники ---------- */

.src-list {
  margin: 16px 0 22px;
  padding: 0;
  list-style: none;
}
.src-list li {
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
}
/* Вертикальный padding у строчной ссылки расширяет зону нажатия,
   не меняя высоту строки: ссылки остаются в потоке текста и переносятся. */
.src-list a {
  font-weight: 600;
  padding: 7px 0;
  margin: -7px 0;
}
.updated {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
}
.updated time { font-weight: 700; color: var(--ink); }

/* ---------- футер ---------- */

.site-footer {
  padding: 32px 0 44px;
  background: var(--ink);
  color: #a8b0b8;
  font-size: 13.5px;
}
.site-footer p { max-width: 82ch; margin-bottom: 10px; }
.foot-strong { color: #fff; font-weight: 700; font-size: 15px; }
.foot-updated { color: #7f878f; margin-top: 16px; margin-bottom: 0; }
.site-footer time { color: #a8b0b8; }

/* Счётчик посещаемости. Размеры зарезервированы (31×31), чтобы его
   подгрузка не сдвигала макет. */
.foot-counter {
  margin-top: 20px;
  min-height: 31px;
  line-height: 0;
}
.foot-counter img { display: block; }

/* ---------- адаптив ---------- */

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-nav { margin-left: 0; width: 100%; }
  .site-nav ul { gap: 0; }
  .site-nav a { padding: 10px 10px; font-size: 13.5px; }

  .scoreboard {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "fr es"
      "center center";
    gap: 18px 12px;
  }
  .team--fr { grid-area: fr; }
  .team--es { grid-area: es; }
  .center   { grid-area: center; border-top: 1px solid var(--rule); padding-top: 16px; }
  .team-note { font-size: 12px; }
  .flag { width: 44px; height: 29px; }

  .match { padding: 22px 0 26px; }
  .section { padding: 34px 0; }
  .player-section { padding: 28px 0 32px; }
}

@media (max-width: 380px) {
  :root { --gut: 14px; }
  .road-list li { grid-template-columns: 1fr auto; row-gap: 2px; }
  .road-opp { grid-column: 1 / -1; text-align: left; }
}

/* ---------- уважение к настройкам движения ---------- */

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

/* ---------- печать ---------- */

@media print {
  .site-header, .player-section, .site-nav { display: none; }
  body { font-size: 12pt; color: #000; }
}
