/* =========================================================
   М'ЯЧ · футбольний портал — pitch.in.ua
   Чистий CSS, без фреймворків. Квадратні кути, плоскі кольори.
   Зміст: 1 база · 2 шапка · 3 стрічка матчів · 4 секції · 5 картки
          6 головна · 7 матчі · 8 реклама · 9 стаття · 10 клуби/енциклопедія
          11 підвал · 12 рух
   ========================================================= */

/* ---------- 1. База ---------- */
:root {
  --bg: #0b1220;
  --surface: #121c2f;
  --surface-2: #1a263d;
  --surface-3: #22304a;
  --line: #24324d;
  --ink: #f3f5f8;
  --muted: #a7b2c4;
  --faint: #7d8aa1;
  --accent: #2bd36b;
  --accent-2: #4be283;
  --accent-ink: #06140b;
  --paper: #eef1f5;
  --paper-ink: #0b1220;
  --hot: #ff5a3c;
  --gold: #f5c542;
  --sky: #5aa9ff;

  --m: clamp(16px, 2.2vw, 32px);
  --gap: 8px;
  --section: clamp(56px, 7vw, 112px);
  --max: 1440px;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.2rem, 1.1rem + 0.6vw, 1.5rem);
  --step-head: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);

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

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-body)/1.55 var(--text);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 12px 16px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 8px; }
.wrap { padding-inline: var(--m); max-width: var(--max); margin-inline: auto; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none; border: 0; cursor: pointer;
  padding: 12px 20px; min-height: 48px;
  transition: transform .18s var(--ease), background-color .18s;
}
.btn:hover { background: var(--accent-2); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn svg { transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--ghost { background: var(--surface-2); color: var(--ink); }
.btn--ghost:hover { background: var(--surface-3); }

/* мітки категорій */
.tag { display: inline-block; padding: 3px 8px; font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; line-height: 1.3; background: var(--surface-3); color: var(--ink); }
.tag--news { background: var(--sky); color: #04121f; }
.tag--predictions { background: var(--accent); color: var(--accent-ink); }
.tag--analytics { background: var(--gold); color: #1d1600; }
.tag--encyclopedia { background: var(--paper); color: var(--paper-ink); }
.tag--demo { background: transparent; color: var(--hot); box-shadow: inset 0 0 0 1px var(--hot); }

/* плашка «демонстраційні дані» */
.demo-note { margin-top: 12px; font-size: var(--step-small); color: var(--muted); border-left: 3px solid var(--hot); padding: 6px 12px; background: var(--surface); }
.demo-note b { color: var(--ink); }
.feed-empty { color: var(--muted); padding: 24px; background: var(--surface); }

/* ---------- 2. Шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto; gap: var(--gap);
  padding: var(--gap) var(--gap) 0; background: var(--bg);
}
.topbar > * { min-height: 60px; }
.logo { display: flex; align-items: center; gap: 12px; background: var(--accent); color: var(--accent-ink); padding: 0 18px; text-decoration: none; }
.logo b { font: 800 22px/1 var(--display); letter-spacing: -0.04em; }
.logo span { font-size: 13px; font-weight: 500; line-height: 1.15; max-width: 9ch; }
.nav { background: var(--surface); display: flex; align-items: center; padding: 0 12px; }
.nav ul { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { display: block; padding: 10px 14px; text-decoration: none; font-weight: 500; color: var(--muted); transition: color .15s, background-color .15s; }
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current] { color: var(--ink); background: var(--surface-2); box-shadow: inset 0 -3px 0 var(--accent); }
.topbar__cta { display: flex; align-items: center; gap: 10px; padding: 0 20px; background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none; transition: background-color .15s; }
.topbar__cta:hover { background: #fff; }
.live { width: 9px; height: 9px; border-radius: 50%; background: var(--hot); flex: none; animation: live 1.6s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255,90,60,.6); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255,90,60,0); } }
.menu-btn { display: none; background: var(--surface); border: 0; padding: 0 18px; cursor: pointer; font-weight: 600; min-width: 96px; }

@media (max-width: 1100px) {
  .topbar { grid-template-columns: 1fr auto; gap: 6px; padding: 6px 6px 0; }
  .topbar > * { min-height: 54px; }
  .menu-btn { display: block; }
  .topbar__cta { display: none; }
  .nav { display: none; grid-column: 1 / -1; padding: 8px; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { padding: 14px; font-size: 18px; color: var(--ink); }
}

/* ---------- 3. Стрічка матчів ---------- */
.ticker { display: flex; align-items: stretch; margin: var(--gap) var(--gap) 0; background: var(--surface); min-height: 52px; overflow: hidden; }
.ticker__label { flex: none; display: grid; place-items: center; padding: 0 14px; background: var(--surface-3); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ticker__track { display: flex; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.ticker__track::-webkit-scrollbar { display: none; }
.ticker__item { flex: none; display: grid; grid-template-columns: auto auto; column-gap: 10px; align-content: center; padding: 6px 18px; border-right: 1px solid var(--line); text-decoration: none; font-size: 14px; scroll-snap-align: start; }
.ticker__item time { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.ticker__item small { grid-column: 1 / -1; color: var(--faint); font-size: 12px; }
a.ticker__item:hover { background: var(--surface-2); }

/* ---------- 4. Секції ---------- */
.sec { padding-top: var(--section); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.sec-head h2 { font: 800 var(--step-head)/1 var(--display); letter-spacing: -0.035em; }
.sec-head p { max-width: 52ch; color: var(--muted); }
.link-more { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; color: var(--accent); white-space: nowrap; }
.link-more:hover { text-decoration: underline; text-underline-offset: 4px; }

/* заголовок сторінки розділу */
.page-head { padding: clamp(32px, 5vw, 72px) var(--m) 0; max-width: var(--max); margin-inline: auto; }
.page-head h1 { font: 800 clamp(40px, 6vw, 96px)/.95 var(--display); letter-spacing: -0.045em; }
.page-head p { margin-top: 18px; max-width: 60ch; font-size: var(--step-lead); color: var(--muted); line-height: 1.4; }
.crumbs { font-size: var(--step-small); color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.aside { display: grid; gap: var(--gap); align-content: start; }
.aside .sticky { position: sticky; top: 80px; }
@media (max-width: 1100px) {
  .two-col { grid-template-columns: 1fr; }
  .aside { grid-template-columns: 1fr 1fr; }
  .aside .sticky { position: static; }
}
@media (max-width: 760px) { .aside { grid-template-columns: 1fr; } }

/* ---------- 5. Картки (з JSON) ---------- */
.feed--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--gap); }
.feed--list, .feed--compact { display: grid; gap: var(--gap); }
.feed--hero { display: grid; }
.feed > .ad { grid-column: 1 / -1; }

.card { position: relative; display: flex; flex-direction: column; text-decoration: none; background: var(--surface); min-width: 0; }
.card__pic { overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface-2); }
.card__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card__pic img { transform: scale(1.05); }
.card__pic.is-broken { background: linear-gradient(135deg, var(--surface-2), var(--surface-3)); }
.card__pic.is-broken img { display: none; }
.card__body { padding: 18px 20px 22px; display: grid; gap: 10px; align-content: start; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: var(--step-small); color: var(--muted); }
.card__title { font-size: 19px; line-height: 1.3; font-weight: 700; transition: color .15s; text-wrap: pretty; }
.card:hover .card__title { color: var(--accent); }
.card__excerpt { color: var(--muted); font-size: 16px; line-height: 1.5; }
.card__by { font-size: var(--step-small); color: var(--faint); }

.card--hero { display: grid; grid-template-columns: 1.35fr 1fr; background: var(--surface-2); min-height: 460px; }
.card--hero .card__pic { aspect-ratio: auto; }
.card--hero .card__body { padding: clamp(20px, 3vw, 40px); align-content: end; gap: 16px; }
.card--hero .card__title { font: 800 clamp(24px, 2.4vw, 38px)/1.1 var(--display); letter-spacing: -0.03em; }
.card--hero .card__excerpt { color: var(--ink); font-size: var(--step-body); }

.card--list { flex-direction: row; }
.card--list .card__pic { flex: 0 0 38%; aspect-ratio: 4 / 3; }
.card--list .card__body { padding: 14px 16px; }
.card--list .card__title { font-size: 16px; }

.card--compact { background: transparent; border-bottom: 1px solid var(--line); }
.card--compact .card__body { padding: 14px 0; gap: 6px; }
.card--compact .card__title { font-size: 16px; font-weight: 600; }

@media (max-width: 960px) {
  .card--hero { grid-template-columns: 1fr; min-height: 0; }
  .card--hero .card__pic { aspect-ratio: 16 / 10; }
}

/* ---------- 6. Головна ---------- */
.home-intro { padding: 28px var(--m) 0; max-width: var(--max); margin-inline: auto; display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.home-intro h1 { font: 800 clamp(15px, 1.2vw, 18px)/1.3 var(--text); color: var(--muted); max-width: 60ch; }
.home-intro h1 b { display: block; font: 800 clamp(44px, 7vw, 112px)/.85 var(--display); letter-spacing: -0.05em; color: var(--ink); margin-bottom: 12px; }
.home-top { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); margin-top: 24px; }
.home-top__side { background: var(--surface); padding: 18px 20px; }
.home-top__side h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
@media (max-width: 1100px) { .home-top { grid-template-columns: 1fr; } }

/* блок «Матч дня» */
.matchday { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.tile { position: relative; overflow: hidden; background: var(--surface); }
.tile--photo { min-height: 320px; }
.tile--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile--photo figcaption { position: absolute; left: 0; bottom: 0; padding: 10px 14px; background: var(--bg); font-size: var(--step-small); }
.tile--match { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; background: var(--surface-2); }
.tile--match .when { font-size: var(--step-small); color: var(--muted); }
.tile--match h3 { font: 800 clamp(24px, 2.4vw, 40px)/1.1 var(--display); letter-spacing: -0.03em; margin-top: 8px; }
.count { font: 700 clamp(26px, 2.6vw, 40px)/1 var(--display); font-variant-numeric: tabular-nums; color: var(--accent); }
.odds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.odds div { background: var(--bg); padding: 10px clamp(6px, .8vw, 12px); min-width: 0; }
.odds dt { font-size: var(--step-small); color: var(--muted); }
.odds dd { font-weight: 700; font-size: clamp(16px, 1.4vw, 20px); font-variant-numeric: tabular-nums; }
.odds-src { font-size: 13px; color: var(--faint); }
@media (max-width: 760px) { .matchday { grid-template-columns: 1fr; } .tile--photo { min-height: 0; aspect-ratio: 16 / 10; } .tile--match { padding: 18px; } }

/* опитування */
.vote-box { background: var(--surface); padding: 24px; display: grid; gap: 16px; }
.vote-box h3 { font: 700 22px/1.2 var(--display); letter-spacing: -0.02em; }
.vote { display: flex; flex-wrap: wrap; gap: 6px; }
.vote button { flex: 1 1 30%; justify-content: center; border: 0; cursor: pointer; background: var(--bg); padding: 12px 16px; min-height: 52px; font-weight: 700; display: flex; gap: 10px; align-items: center; transition: background-color .15s, transform .15s var(--ease); }
.vote button:hover { background: var(--surface-2); }
.vote button:active { transform: scale(.97); }
.vote button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.vote .pct { font-variant-numeric: tabular-nums; font-weight: 500; opacity: .85; }
.vote-note { font-size: 15px; color: var(--muted); min-height: 1.6em; }

/* плитки категорій */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: var(--gap); }
.cat { display: grid; align-content: space-between; gap: 28px; min-height: 160px; padding: 22px; background: var(--surface); text-decoration: none; transition: background-color .15s; }
.cat:hover { background: var(--surface-2); }
.cat b { font: 800 22px/1.1 var(--display); letter-spacing: -0.02em; }
.cat span { color: var(--muted); font-size: 15px; }
.cat--accent { background: var(--accent); color: var(--accent-ink); }
.cat--accent span { color: var(--accent-ink); }
.cat--accent:hover { background: var(--accent-2); }
.cat--soon { opacity: .6; cursor: default; }
.cat--soon:hover { background: var(--surface); }

/* таблиця */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 16px; }
.tbl th { text-align: right; font-weight: 500; color: var(--muted); font-size: 14px; padding: 10px 12px; }
.tbl td { text-align: right; padding: 12px; }
.tbl th:nth-child(2), .tbl td:nth-child(2) { text-align: left; width: 100%; }
.tbl th:first-child, .tbl td:first-child { text-align: left; width: 2.5em; color: var(--muted); }
.tbl tbody tr:nth-child(odd) { background: var(--surface); }
.tbl td:last-child { font-weight: 700; }
.tbl tr.ucl td:first-child { color: var(--accent); font-weight: 700; }
.legend { margin-top: 12px; font-size: 14px; color: var(--muted); }
.legend b { color: var(--accent); }
@media (max-width: 760px) { .tbl th, .tbl td { padding: 10px 8px; } .tbl .hide-sm { display: none; } }

.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

/* FAQ */
.faq { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
.faq h2 { grid-column: 1 / 4; font: 800 clamp(28px, 2.6vw, 40px)/1.05 var(--display); letter-spacing: -0.03em; }
.faq__text { grid-column: 5 / 13; columns: 2; column-gap: 56px; }
.faq__text p { break-inside: avoid; margin-bottom: 20px; font-size: 16px; line-height: 1.55; }
@media (max-width: 960px) { .faq { grid-template-columns: 1fr; } .faq h2, .faq__text { grid-column: auto; } .faq__text { columns: 1; } }

/* ---------- 7. Матчі ---------- */
.agenda { display: grid; grid-template-columns: 150px 1fr; gap: 24px; }
.days { display: grid; gap: 6px; align-content: start; }
.day { border: 0; cursor: pointer; text-align: left; background: var(--surface); min-height: 60px; padding: 10px 14px; display: grid; gap: 2px; transition: background-color .15s; }
.day:hover { background: var(--surface-2); }
.day b { font-size: 16px; }
.day span { font-size: 13px; color: var(--muted); }
.day[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.day[aria-selected="true"] span { color: #44506a; }
/* рядок матчу підлаштовується під ширину свого блоку (container query), а не екрана */
.matches { display: grid; gap: 4px; container-type: inline-size; }
.match {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px;
  min-height: 64px; padding: 14px; background: var(--surface);
}
.match__teams { grid-column: 1 / -1; grid-row: 2; }
.match__comp { grid-column: 1; grid-row: 3; }
.match__link { grid-column: 2; grid-row: 1; }
@container (min-width: 720px) {
  .match { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 140px) 96px; gap: 16px; padding: 10px 18px; }
  .match__teams, .match__comp, .match__link { grid-column: auto; grid-row: auto; }
}
.match:nth-child(even) { background: var(--surface-2); }
.match__time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 16px; }
.match__teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; font-weight: 600; }
.match__teams > :first-child { text-align: right; }
.match__teams a { text-decoration: none; border-bottom: 1px solid var(--line); }
.match__teams a:hover { color: var(--accent); border-color: var(--accent); }
.match__score { min-width: 64px; text-align: center; padding: 6px 10px; background: var(--bg); font-variant-numeric: tabular-nums; font-weight: 700; }
.match__comp { color: var(--muted); font-size: 14px; }
.match__link { justify-self: end; font-size: 14px; font-weight: 700; text-decoration: none; background: var(--accent); color: var(--accent-ink); padding: 6px 12px; }
.match__link:hover { background: var(--accent-2); }
.match__link--none { background: none; color: var(--faint); font-weight: 500; padding: 0; }
@media (max-width: 760px) {
  .agenda { grid-template-columns: 1fr; gap: 12px; }
  .days { grid-auto-flow: column; grid-auto-columns: 1fr; }
}

/* ---------- 8. Реклама: універсальний блок ---------- */
.ad {
  position: relative; display: grid; place-items: center;
  background: var(--surface); color: var(--muted); text-align: center;
  font-size: var(--step-small); overflow: hidden;
}
.ad::before { content: "Реклама"; position: absolute; top: 8px; left: 12px; font-size: 12px; color: var(--faint); }
.ad a { display: grid; place-items: center; width: 100%; height: 100%; padding: 32px 16px; text-decoration: none; }
.ad img { max-width: 100%; height: auto; margin-inline: auto; }
.ad a:has(img), .ad a:has(picture) { padding: 30px 0 0; }
.ad iframe, .ad ins { max-width: 100%; margin-inline: auto; display: block; }
.ad > *:not(a) { margin-top: 22px; }
.ad--wide { min-height: 110px; }
.ad--box { min-height: 250px; }
.ad--tall { min-height: 600px; }
.ad--inline { min-height: 280px; }
.ad--footer { min-height: 110px; }
.ad-row { padding: var(--gap); max-width: var(--max); margin-inline: auto; }
.ad-row--sec { padding: var(--section) var(--m) 0; }
@media (max-width: 640px) { .ad--tall { min-height: 300px; } .ad--wide, .ad--footer { min-height: 100px; } }

/* ---------- 9. Стаття ---------- */
.masthead { padding: var(--gap); }
.masthead__pic { position: relative; height: 46svh; min-height: 260px; overflow: hidden; background: var(--surface); }
.masthead__pic img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.masthead__pic figcaption { position: absolute; right: 0; bottom: 0; background: var(--bg); padding: 8px 14px; font-size: var(--step-small); }

.page { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 760px); justify-content: center; padding-inline: var(--m); gap: 56px; }
.page__side { padding-top: 40px; }
.page__main { padding-top: 40px; min-width: 0; }
.art-cat { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.art-title { font: 800 clamp(26px, 2.8vw, 44px)/1.1 var(--display); letter-spacing: -0.035em; text-wrap: balance; }
.standfirst { margin-top: 24px; font-size: var(--step-lead); line-height: 1.4; }
.byline { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; font-size: 15px; color: var(--muted); }
.byline .who { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.ava { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; }
.share { margin-left: auto; border: 0; cursor: pointer; background: var(--surface-2); padding: 10px 16px; font-weight: 600; transition: background-color .15s; }
.share:hover { background: var(--surface-3); }

.side-card { background: var(--surface); padding: 22px; }
.side-card + .side-card, .side-card + .ad, .ad + .side-card { margin-top: var(--gap); }
.side-card h2 { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
.mini-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; }
.mini-match b { font: 800 20px/1.1 var(--display); letter-spacing: -0.02em; display: block; }
.mini-match span { font-size: var(--step-small); color: var(--muted); }
.mini-match .vs { font: 700 24px/1 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.side-card .btn { width: 100%; justify-content: center; margin-top: 18px; }
.toc ol { display: grid; gap: 2px; }
.toc a { display: block; padding: 8px 10px; text-decoration: none; color: var(--muted); transition: color .15s, background-color .15s; }
.toc a:hover, .toc a.is-active { color: var(--ink); background: var(--surface-2); }
.side-sticky { position: sticky; top: 80px; margin-top: var(--gap); }

.summary { margin-top: 32px; background: var(--accent); color: var(--accent-ink); padding: 24px; display: grid; gap: 8px; }
.summary h2 { font: 700 20px/1.2 var(--display); letter-spacing: -0.02em; margin-bottom: 4px; }
.summary li { font-size: 17px; }

.prose { margin-top: 40px; font-size: 18px; line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font: 800 clamp(22px, 2.1vw, 30px)/1.15 var(--display); letter-spacing: -0.03em; margin-top: 2.2em; scroll-margin-top: 90px; }
.prose h3 { font-size: 21px; font-weight: 700; margin-top: 1.6em; scroll-margin-top: 90px; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose ul { list-style: square; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { background: var(--surface); padding: 24px 28px; font-size: 20px; line-height: 1.45; font-weight: 500; }
.prose blockquote cite { display: block; margin-top: 12px; font-style: normal; font-size: 15px; color: var(--muted); font-weight: 400; }
.prose figure img { width: 100%; }
.prose figcaption { font-size: var(--step-small); color: var(--muted); margin-top: 8px; }
.prose .ad { margin-block: 40px; }
.lineup { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.lineup div { background: var(--surface); padding: 18px 20px; }
.lineup h3 { margin: 0 0 8px; font-size: 18px; }
.lineup p { font-size: 16px; color: var(--muted); line-height: 1.6; }
@media (max-width: 600px) { .lineup { grid-template-columns: 1fr; } }

.warn { margin-top: 48px; display: flex; gap: 14px; align-items: flex-start; background: var(--surface); padding: 20px; font-size: 16px; }
.warn b { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--hot); color: #fff; font-size: 14px; }
.author-box { margin-top: var(--gap); display: grid; grid-template-columns: auto 1fr; gap: 18px; background: var(--paper); color: var(--paper-ink); padding: 24px; }
.author-box .ava { width: 64px; height: 64px; background: var(--paper-ink); color: var(--paper); font-size: 20px; }
.author-box h2 { font-size: 18px; }
.author-box p { font-size: 16px; color: #3d495e; margin-top: 4px; }
.related { padding-inline: var(--m); max-width: var(--max); margin-inline: auto; }

@media (max-width: 960px) {
  .page { grid-template-columns: 1fr; gap: 0; }
  .page__side { order: 2; padding: 40px 0 0; display: grid; gap: var(--gap); }
  .page__side .side-card + .side-card, .page__side .side-card + .ad { margin-top: 0; }
  .side-sticky { position: static; margin-top: 0; }
  .page__side .toc { display: none; }
  .masthead__pic { height: 32svh; }
}

/* ---------- 10. Клуби, гравці, енциклопедія ---------- */
.entity { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 3vw, 40px); align-items: end; }
.crest {
  width: clamp(96px, 12vw, 168px); aspect-ratio: 1; display: grid; place-items: center;
  font: 800 clamp(28px, 3.6vw, 52px)/1 var(--display); letter-spacing: -0.04em;
  background: var(--c1, var(--surface-3)); color: var(--c2, var(--ink));
  clip-path: polygon(50% 0, 100% 12%, 100% 62%, 50% 100%, 0 62%, 0 12%);
}
.crest--round { clip-path: circle(50%); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--gap); margin-top: 32px; }
.facts div { background: var(--surface); padding: 16px 18px; }
.facts dt { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin-top: 6px; font-weight: 700; font-size: 18px; }
.source-note { font-size: var(--step-small); color: var(--faint); margin-top: 32px; }
.source-note a { color: var(--muted); }
.entity-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--gap); }
.entity-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 18px; background: var(--surface); text-decoration: none; transition: background-color .15s; }
.entity-card:hover { background: var(--surface-2); }
.entity-card .crest { width: 64px; font-size: 20px; }
.entity-card b { display: block; font-size: 18px; }
.entity-card span { font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .entity { grid-template-columns: 1fr; align-items: start; } }

/* ---------- 11. Підвал ---------- */
.footer { margin-top: var(--section); background: var(--paper); color: var(--paper-ink); padding: 40px var(--m) 20px; }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; font-size: 16px; max-width: var(--max); margin-inline: auto; }
.footer__cols h2 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.footer__cols li { color: #445066; margin-bottom: 6px; }
.footer__cols a { text-decoration: none; }
.footer__cols a:hover { color: var(--paper-ink); text-decoration: underline; text-underline-offset: 3px; }
.age { display: flex; gap: 12px; align-items: flex-start; color: #445066; }
.age b { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--paper-ink); color: var(--paper); font-size: 14px; }
.footer__word { margin: 48px auto 0; max-width: var(--max); }
.footer__word svg { width: 100%; height: auto; display: block; }
.footer__word text { font-family: var(--display); font-weight: 800; fill: var(--paper-ink); letter-spacing: -0.04em; }
.footer__legal { margin: 20px auto 0; font-size: 13px; color: #4f5b70; display: grid; gap: 6px; max-width: var(--max); }
.footer__legal a { color: inherit; }
@media (max-width: 760px) { .footer__cols { grid-template-columns: 1fr 1fr; gap: 28px 20px; font-size: 15px; } }

/* ---------- 404 ---------- */
.lost { min-height: calc(100svh - 68px); display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding: var(--gap); }
.lost > div { background: var(--surface); padding: clamp(24px, 4vw, 56px); display: flex; flex-direction: column; justify-content: flex-end; gap: 24px; }
.lost h1 { font: 800 clamp(120px, 18vw, 300px)/.8 var(--display); letter-spacing: -0.06em; color: var(--accent); }
.lost p { font-size: var(--step-lead); max-width: 28ch; }
.lost figure { position: relative; overflow: hidden; }
.lost figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .lost { grid-template-columns: 1fr; } .lost figure { aspect-ratio: 4 / 3; } }

/* ---------- 12. Рух (лише transform/opacity/clip) ---------- */
.js .rise { opacity: 0; transform: translateY(20px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .rise.in { opacity: 1; transform: none; }
.js .shutter { clip-path: inset(0 0 100% 0); transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1); }
.js .shutter img { transform: scale(1.12); transition: transform 1.6s var(--ease); }
.js .shutter.in { clip-path: inset(0 0 0 0); }
.js .shutter.in img { transform: scale(1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .rise { opacity: 1; transform: none; }
  .js .shutter { clip-path: none; }
  .js .shutter img { transform: none; }
}
