/* ============================================================
   Свисток: спортивні новини українською. Тема svystok.
   (c) 2026 vii-studio.com

   Design Read: мультиспортивне новинне медіа для широкої української
   аудиторії, мова сучасного світлого спортивного журналу: багато повітря,
   м'які форми, навігація за видами спорту з іконками, стриманий рух.
   Dials: DESIGN_VARIANCE 6 / MOTION_INTENSITY 5 / VISUAL_DENSITY 5.

   Типографіка: Geologica (заголовки, 500-800) + Onest (текст, 400-600),
   обидва self-hosted woff2 (кирилиця, розширена кирилиця, латиниця).
   Колір: одна акцентна родина «кобальт», без фіолетового і без градієнтів.

   ПРАВИЛО ФОРМ (Shape Lock):
   - контейнери (картки, плитки, панелі, обкладинки, картинки) - радіус 16px (--r);
   - інтерактивні елементи (кнопки, пігулки видів спорту, чипи, поле пошуку,
     поле пошти, пагінація, «Усі новини») - повна таблетка 999px (--r-pill);
   - квадратні іконкові кнопки і значки видів спорту - коло (50%);
   - єдиний виняток: інлайн-код у тексті статті (.35em), бо це частина рядка.
   Тіні лише тоновані під фон і лише для піднятих карток при наведенні.
   ============================================================ */

/* ---------- шрифти (self-hosted, лише cyrillic, cyrillic-ext, latin) ---------- */
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../fonts/geologica-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../fonts/geologica-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geologica';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../fonts/geologica-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/onest-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/onest-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- токени: світла схема ---------- */
:root {
  color-scheme: light dark;

  --bg: #F4F6FA;
  --surface: #FDFDFE;
  --panel: #EAEEF6;          /* м'яка нейтральна підкладка: «Найчитаніше», плейсхолдери фото */
  --ink: #0C1222;
  --ink-2: #2A3350;          /* другорядний текст: ліди, пункти меню */
  --muted: #56607A;          /* мета, підписи (5.8:1 на фоні) */
  --line: #DEE3EE;
  --field-line: #7C869C;     /* рамка полів вводу: від 3.1:1 до фону, поверхні і панелі (WCAG 1.4.11) */
  --accent: #1F4FD6;
  --accent-hover: #1A43B8;
  --accent-soft: #E6ECFC;    /* підкладка акценту: «Коротко», значки, цитати */
  --accent-line: rgba(31, 79, 214, 0.16);
  --on-accent: #FDFDFE;
  --danger: #B42318;

  --shadow-hover: 0 1px 2px rgba(22, 38, 86, 0.05), 0 18px 36px -16px rgba(22, 38, 86, 0.24);
  --shadow-pop: 0 24px 56px -24px rgba(22, 38, 86, 0.32);
  --skel: rgba(22, 38, 86, 0.07);
  --skel-sheen: rgba(253, 253, 254, 0.65);

  --font-d: 'Geologica', 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-t: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r: 16px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1280px;
  --gutter: 24px;
  --gap: 20px;
  --col: 700px;              /* колонка читання статті, близько 68 знаків */
  --section: 80px;           /* повітря між блоками головної */
}

/* ---------- токени: темна схема ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0F1C;
    --surface: #111829;
    --panel: #0E1424;
    --ink: #E7ECF7;
    --ink-2: #C3CBDD;
    --muted: #98A3BD;
    --line: #1F2940;
    --field-line: #5A6684;
    --accent: #6F95FF;
    --accent-hover: #8AA9FF;
    --accent-soft: #16224A;
    --accent-line: rgba(111, 149, 255, 0.2);
    --on-accent: #0A0F1C;
    --danger: #FF8A80;

    --shadow-hover: 0 1px 2px rgba(2, 5, 14, 0.4), 0 20px 40px -18px rgba(2, 5, 14, 0.8);
    --shadow-pop: 0 24px 60px -20px rgba(2, 5, 14, 0.85);
    --skel: rgba(152, 163, 189, 0.09);
    --skel-sheen: rgba(231, 236, 247, 0.06);
  }
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  /* clip, а не hidden: не ламає липку шапку і страхує від горизонтального скролу */
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-t);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-d); font-weight: 700; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; }
figure { margin: 0; }
input { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent-soft); color: var(--ink); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.vh {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -64px; z-index: 120;
  padding: 12px 20px; border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent);
  font: 600 15px/1 var(--font-t);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus-visible { transform: translateY(80px); }

/* ---------- прогрес-бар роутера (анімуються лише transform і opacity) ---------- */
#route-progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 110;
  height: 3px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s var(--ease), opacity 0.25s ease;
}
#route-progress.is-active { transform: scaleX(0.72); opacity: 1; }

/* ---------- поява на скролі: opacity + translateY(16px), 500ms, каскад через --i ---------- */
@keyframes sv-rise {
  from { opacity: 0; transform: translateY(16px); }
}
@keyframes sv-drop {
  from { opacity: 0; transform: translateY(-8px); }
}
html.js .reveal { opacity: 0; }
/* fill-mode backwards: після анімації елемент повертається до звичайних стилів,
   тож hover-підйом карток працює, а не перекривається кінцевим кадром. */
html.js .reveal.is-in {
  opacity: 1;
  animation: sv-rise 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}

/* ---------- обкладинки: кадрування дозволене скрізь, крім сторінки статті ---------- */
.media { position: relative; overflow: hidden; background: var(--panel); }
.media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media > img, .cover img { transition: opacity 0.45s ease, transform 0.7s var(--ease); }
/* плавна поява картинки після завантаження; LCP-картинки (fetchpriority) не ховаємо */
html.js .media > img:not([fetchpriority]) { opacity: 0; }
html.js .media > img.loaded { opacity: 1; }
.r-1610 { aspect-ratio: 16 / 10; }
.r-169 { aspect-ratio: 16 / 9; }
.r-43 { aspect-ratio: 4 / 3; }
.r-32 { aspect-ratio: 3 / 2; }
.r-11 { aspect-ratio: 1 / 1; }

/* ============================================================
   Дрібні компоненти
   ============================================================ */

/* кнопки: таблетки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--r-pill);
  background: var(--accent); color: var(--on-accent);
  font: 600 15.5px/1 var(--font-t);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.25s var(--ease), transform 0.2s var(--ease);
}
.btn i { font-size: 18px; }
.btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn:active { transform: scale(0.98); box-shadow: none; }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--field-line); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px transparent; }
.btn-soft { background: var(--accent-soft); color: var(--accent); }
.btn-soft:hover { background: var(--accent); color: var(--on-accent); }

/* круглі іконкові кнопки */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 21px;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s var(--ease), opacity 0.2s ease;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.icon-btn:active { transform: scale(0.94); }
.icon-btn:disabled { opacity: 0.35; cursor: default; background: transparent; color: var(--ink); border-color: var(--line); }

/* значок виду спорту в м'якому колі */
.sport-badge {
  display: inline-grid; place-items: center; flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 23px;
}
.sport-badge--xl { width: 76px; height: 76px; font-size: 40px; }

/* пігулки видів спорту (шапка, підвал, порожні стани) */
.sports-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.sports-list--wrap { flex-wrap: wrap; gap: 8px; }
.sport-pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 42px; padding: 0 16px 0 12px;
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font: 600 15px/1 var(--font-t);
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease);
}
.sport-pill i { font-size: 19px; color: var(--accent); transition: color 0.25s var(--ease); }
.sport-pill:hover { background: var(--accent-soft); color: var(--ink); }
.sport-pill:active { transform: scale(0.98); }
.sport-pill.is-active { background: var(--accent); color: var(--on-accent); }
.sport-pill.is-active i { color: var(--on-accent); }
.sports-list--wrap .sport-pill { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.sports-list--wrap .sport-pill:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 1px transparent; }

/* чипи підрубрик */
.chips ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center;
  min-height: 40px; padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font: 600 14.5px/1 var(--font-t);
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}
a.chip:hover { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px transparent; }
a.chip:active { transform: scale(0.98); }
.chip.is-active { background: var(--accent); color: var(--on-accent); box-shadow: none; }

/* «Усі новини»: легка таблетка зі стрілкою */
.more {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  font: 600 14.5px/1 var(--font-t);
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s var(--ease);
}
.more i { font-size: 16px; transition: transform 0.25s var(--ease); }
.more:hover { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px transparent; }
.more:hover i { transform: translateX(3px); }
.more:active { transform: scale(0.98); }

/* кікер: іконка виду спорту + назва рубрики, текстом над заголовком */
.kicker {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  align-self: flex-start;
  color: var(--accent);
  font: 600 13.5px/1.2 var(--font-t);
  transition: color 0.2s ease;
}
.kicker i { font-size: 16px; }
.kicker:hover { color: var(--ink); }

/* рядок вихідних даних */
.meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.meta:empty { display: none; }

/* заголовок блоку */
.block-title { font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.625rem); font-weight: 750; letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 20px; }

/* ============================================================
   Шапка і стрічка видів спорту
   ============================================================ */
.site-header {
  position: relative; z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
  }
}
.header-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo sports actions";
  align-items: center;
  column-gap: 28px;
  min-height: 72px;
}
.logo {
  grid-area: logo;
  display: inline-flex; align-items: baseline; gap: 3px;
  color: var(--ink);
  font: 800 26px/1 var(--font-d);
  letter-spacing: -0.035em;
}
/* знак издания: квадрат со скруглением темы, ставится перед названием */
.logo-mark {
  align-self: center;
  width: 30px; height: 30px;
  margin-right: 9px;
  border-radius: 9px;
  flex: 0 0 auto;
  transition: transform 0.45s var(--ease);
}
.logo:hover .logo-mark { transform: translateY(-2px); }
.logo-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transition: transform 0.45s var(--ease);
}
.logo:hover .logo-dot { transform: translateY(-5px); }
.sports {
  grid-area: sports;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  /* запас під кільце фокусу пігулок: overflow інакше обрізав би його */
  padding: 6px;
  margin: -6px;
}
.sports::-webkit-scrollbar { display: none; }
.header-actions { grid-area: actions; display: flex; gap: 8px; }
.burger { display: none; }

/* панель бургера: підрубрики і службові сторінки */
.menu-panel {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  max-height: calc(100dvh - 130px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
}
.site-header.is-open .menu-panel { display: block; animation: sv-drop 0.3s var(--ease); }
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 24px 32px;
  padding-block: 24px 28px;
}
.menu-root { display: flex; align-items: center; gap: 10px; font: 700 17px/1.2 var(--font-d); color: var(--ink); transition: color 0.2s ease; }
.menu-root .sport-badge { width: 38px; height: 38px; font-size: 20px; }
.menu-root:hover { color: var(--accent); }
.menu-sub { list-style: none; margin: 8px 0 0 48px; padding: 0; display: grid; gap: 2px; }
.menu-sub a { display: inline-block; padding: 5px 0; color: var(--ink-2); font-size: 15px; transition: color 0.2s ease; }
.menu-sub a:hover { color: var(--accent); }

/* ============================================================
   Картки
   ============================================================ */
.card {
  position: relative;
  display: flex; flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}
.card:active { transform: translateY(0) scale(0.99); }
.card:has(.card-title a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.card-title a:focus-visible { outline: none; }
.card-media { position: relative; flex: none; }
.card:hover .media > img.loaded,
.card:hover .media > img[fetchpriority] { transform: scale(1.035); }
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-width: 0; padding: 18px 20px 20px; }
.card-body .meta { margin-top: auto; padding-top: 2px; }
/* заголовки не обрізаємо: картка росте за текстом, обрізається лише лід.
   Довге слово, що не влазить у рядок, переноситься, а не розпирає картку. */
.card-title { font-family: var(--font-d); color: var(--ink); overflow-wrap: anywhere; }
.card-title a { transition: color 0.2s ease; }
/* уся картка клікабельна: розтягнуте посилання заголовка (кікер лежить вище) */
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card:hover .card-title a { color: var(--accent); }
.card-lead { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; text-wrap: pretty; }

.t-sm { font-size: 16.5px; font-weight: 650; line-height: 1.3; }
.t-md { font-size: 19px; font-weight: 650; line-height: 1.28; letter-spacing: -0.005em; }
.t-lg { font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.625rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.t-xl { font-size: clamp(1.625rem, 1.1rem + 1.4vw, 2.5rem); font-weight: 750; line-height: 1.12; letter-spacing: -0.015em; }
.t-xxl { font-size: clamp(1.75rem, 1.05rem + 2vw, 3rem); font-weight: 750; line-height: 1.08; letter-spacing: -0.02em; }
.card:has(.t-lg, .t-xl, .t-xxl) > .card-body { padding: 24px 28px 26px; gap: 12px; }
.card:has(.t-xl, .t-xxl) .card-lead { font-size: 17px; }

/* текстова картка (без обкладинки): великий значок виду спорту і довший лід */
.card-badge { width: 52px; height: 52px; font-size: 27px; margin-bottom: 4px; }
.card--text .card-lead { -webkit-line-clamp: 5; }

/* обкладинка тягнеться на всю висоту клітинки (бенто, рядки). aspect-ratio
   лишається мінімальною висотою, flex-grow додає решту. */
.card--fill .card-media { flex: 1 1 auto; display: flex; flex-direction: column; }
.card--fill .card-media .media { flex: 1 1 auto; }

/* горизонтальна картка: фото ліворуч. Явна ширина 100% робить розмір
   «перевизначеним», і пропорція не розпирає доріжку; висота 100% тягне фото
   на всю висоту ряду, а aspect-ratio задає мінімум. */
.card--h { display: grid; grid-template-columns: minmax(0, var(--media-w, 44%)) minmax(0, 1fr); }
.card--h .card-media .media { width: 100%; height: 100%; }
.card--h.card--text { display: flex; }

/* рядок без підкладки (списки) */
.card--flat { background: transparent; border: 0; border-radius: 0; overflow: visible; gap: 16px; }
.card--flat:hover { transform: none; box-shadow: none; }
.card--flat:active { transform: scale(0.99); }
.card--flat .media { border-radius: var(--r); }
.card--flat .card-body { padding: 0; gap: 6px; }
.card--flat.card--h .card-media .media { height: auto; }

/* ============================================================
   Головна: бенто-лід
   ============================================================ */
.home { padding-top: 28px; }
.bento { display: grid; gap: var(--gap); }
.bento .tile--main .card-lead { -webkit-line-clamp: 3; }

/* solo: один матеріал на всю ширину, фото ліворуч */
.bento--solo .tile--main { --media-w: 58%; }
.bento--solo .tile--main > .card-body { padding: clamp(24px, 3vw, 44px); justify-content: center; gap: 16px; }
.bento--solo .tile--main .card-body .meta { margin-top: 8px; }

/* головна плитка без обкладинки тягнеться на висоту сусідніх плиток:
   текст стоїть по центру висоти, а не лишає під собою порожню половину */
.bento .tile--main.card--text > .card-body { justify-content: center; }
.bento .tile--main.card--text .card-body .meta { margin-top: 8px; }

/* s1: головний + одна плитка */
.bento--s1 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

/* s2: головний на два поверхи + дві плитки */
.bento--s2 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-areas: "main side1" "main side2"; }

/* s2f: + вертикальна «Коротко» */
.bento--s2f { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-areas: "main main side1 feed" "main main side2 feed"; }

/* s1f і s0f: запасні комбінації, якщо лід прийде коротшим за стрічку */
.bento--s1f { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "main side1 feed"; }
.bento--s0f { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); grid-template-areas: "main feed"; }

.bento:not(.bento--solo):not(.bento--s1) .tile--main { grid-area: main; }
.bento .tile--side:nth-child(2) { grid-area: side1; }
.bento .tile--side:nth-child(3) { grid-area: side2; }
.bento .tile--feed { grid-area: feed; }
.bento--s1 .tile--side:nth-child(2) { grid-area: auto; }

/* плитка «Коротко»: єдина тонована акцентом плитка головної */
.tile--feed {
  display: flex; flex-direction: column;
  min-width: 0;
  padding: 24px 22px 18px;
  border-radius: var(--r);
  background: var(--accent-soft);
}
.feed-title { font-size: 22px; font-weight: 750; letter-spacing: -0.015em; line-height: 1.1; margin: 0 0 6px; }
.feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; justify-content: space-between; flex: 1 1 auto; }
.feed-list li { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 8px; padding: 12px 0; border-top: 1px solid var(--accent-line); }
.feed-list li:first-child { border-top: 0; }
.feed-list time { color: var(--accent); font: 700 14px/1.45 var(--font-d); font-variant-numeric: tabular-nums; }
.feed-date { display: block; color: var(--muted); font: 500 12px/1.3 var(--font-t); }
.feed-list a { color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; transition: color 0.2s ease; }
.feed-list a:hover { color: var(--accent); }

/* ============================================================
   Головна: «Ще головне» (сітка на шість доріжок без дірок)
   ============================================================ */
.digest { margin-top: 56px; }
.digest-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 24px 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.digest-grid > .card { grid-column: span 2; }
.digest--1 .digest-grid > .card { grid-column: 1 / -1; }
.digest--2 .digest-grid > .card,
.digest--4 .digest-grid > .card,
.digest--5 .digest-grid > .card:nth-child(-n+2) { grid-column: span 3; }
.digest .card--h { --thumb: 96px; grid-template-columns: var(--thumb) minmax(0, 1fr); align-items: start; }
.digest--1 .card--h,
.digest--2 .card--h { --thumb: 132px; }
/* рядок без обкладинки: на місці мініатюри квадрат зі значком виду спорту */
.card--flat.card--text .card-body { position: relative; min-height: var(--thumb, 96px); padding-left: calc(var(--thumb, 96px) + 16px); }
.card--flat.card--text .card-badge { position: absolute; left: 0; top: 0; width: var(--thumb, 96px); height: var(--thumb, 96px); margin: 0; border-radius: var(--r); font-size: calc(var(--thumb, 96px) * 0.4); }

/* ============================================================
   Головна: блоки видів спорту
   ============================================================ */
.sport { margin-top: var(--section); }
.sport-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sport-name { font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.875rem); font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
.sport-name a { display: inline-flex; align-items: center; gap: 14px; transition: color 0.2s ease; }
.sport-name a:hover { color: var(--accent); }
.sport-head .more { margin-left: auto; }
.strip-nav { display: flex; gap: 8px; }
.strip-nav.is-idle { display: none; }

/* solo: широка горизонтальна картка */
.card--wide { --media-w: 56%; }

/* rail: заголовок окремою колонкою ліворуч, праворуч стрічка */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* місце для тіні піднятої картки, яку інакше обрізав би overflow */
  padding-block: 8px 20px;
  margin-block: -8px -20px;
}
.strip::-webkit-scrollbar { display: none; }
.strip > * { scroll-snap-align: start; }
.strip:focus-visible { outline-offset: 6px; border-radius: var(--r); }

/* duo: пара горизонтальних карток */
.duo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.duo-grid .card--h { --media-w: 46%; }
.card--text.card--fill .card-lead { -webkit-line-clamp: 8; }

/* feature: велика картка і два рядки праворуч */
.feature-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.feature-rows { display: grid; grid-template-rows: 1fr 1fr; gap: var(--gap); min-width: 0; }
.feature-rows .card--h { --media-w: 46%; }
.feature-rows .card--h:only-child { grid-row: 1 / -1; }

/* ============================================================
   Головна: навігатор «Види спорту» (поки сайт наповнюється)
   ============================================================ */
.sports-grid-block { margin-top: var(--section); }
.sports-grid { display: flex; flex-wrap: wrap; gap: var(--gap); list-style: none; margin: 0; padding: 0; }
.sport-tile {
  position: relative;
  flex: 1 1 300px;
  display: flex; align-items: flex-start; gap: 16px;
  min-width: 0;
  padding: 22px 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s ease;
}
.sport-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--accent) 22%, var(--line)); }
.sport-tile:active { transform: scale(0.99); }
.sport-tile:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.sport-tile h3 a:focus-visible { outline: none; }
.sport-tile .sport-badge { width: 52px; height: 52px; font-size: 28px; transition: background-color 0.3s var(--ease), color 0.3s var(--ease); }
.sport-tile:hover .sport-badge { background: var(--accent); color: var(--on-accent); }
.sport-tile-body { min-width: 0; flex: 1 1 auto; padding-top: 2px; }
.sport-tile h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.sport-tile h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.sport-tile-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; list-style: none; margin: 8px 0 0; padding: 0; }
.sport-tile-sub a { position: relative; z-index: 2; color: var(--muted); font-size: 14.5px; transition: color 0.2s ease; }
.sport-tile-sub a:hover { color: var(--accent); }
.sport-tile-arrow { flex: none; margin-top: 4px; color: var(--muted); font-size: 20px; transition: transform 0.3s var(--ease), color 0.2s ease; }
.sport-tile:hover .sport-tile-arrow { color: var(--accent); transform: translate(2px, -2px); }

/* ============================================================
   «Найчитаніше»
   ============================================================ */
.mostread { padding: 24px 24px 20px; border-radius: var(--r); background: var(--panel); }
.mostread-list { list-style: none; margin: 0; padding: 0; }
.mostread-list li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.mostread-list li:first-child { border-top: 0; padding-top: 2px; }
.rank { color: var(--accent); font: 800 30px/1 var(--font-d); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.mostread-body { min-width: 0; display: grid; gap: 4px; }
.mostread-cat { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; line-height: 1.3; }
.mostread-cat i { color: var(--accent); font-size: 15px; }
.mostread-body a { color: var(--ink); font: 600 16px/1.35 var(--font-d); overflow-wrap: anywhere; transition: color 0.2s ease; }
.mostread-body a:hover { color: var(--accent); }

/* на головній - колонки в один ряд: скільки пунктів, стільки колонок */
.mostread--wide { margin-top: var(--section); padding: 28px 28px 24px; }
.mostread--wide .mostread-list { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); }
.mostread--wide .mostread-list li { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 4px 22px; border-top: 0; border-left: 1px solid var(--line); align-content: start; }
.mostread--wide .mostread-list li:first-child { border-left: 0; padding-left: 0; padding-top: 4px; }
.mostread--wide .rank { font-size: 44px; }

/* ============================================================
   Підписка (розсилка + Telegram)
   ============================================================ */
.subscribe {
  display: grid; gap: 28px;
  margin-top: var(--section);
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.subscribe.has-tg { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.subscribe-main { container-type: inline-size; min-width: 0; }
.subscribe-inner { display: grid; gap: 20px; }
.subscribe-copy { display: flex; gap: 16px; align-items: flex-start; }
.subscribe-copy .block-title { margin-bottom: 6px; }
.subscribe-copy p { margin: 0; color: var(--muted); font-size: 15.5px; }
.subscribe-form label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 14.5px; font-weight: 600; }
.subscribe-row { display: flex; flex-direction: column; gap: 10px; }
.subscribe-row input {
  flex: 1 1 auto; min-width: 0;
  min-height: 50px; padding: 0 22px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--field-line);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.subscribe-row input::placeholder { color: var(--muted); opacity: 1; }
.subscribe-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.subscribe-row input.is-invalid { border-color: var(--danger); }
.subscribe-row .btn { min-height: 50px; }
/* newsletter.js пише колір помилки інлайном; перекриваємо на токен, що проходить контраст в обох схемах */
.subscribe-form .nl-error { color: var(--danger) !important; font-size: 14px; }
.subscribe-form .nl-note { color: var(--muted); font-size: 14px; }
.subscribe .form-ok { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 20px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
@container (min-width: 380px) {
  .subscribe-row { flex-direction: row; }
}
@container (min-width: 700px) {
  .subscribe-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: end; gap: 40px; }
}
.subscribe-tg {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  padding: 22px;
  border-radius: var(--r);
  background: var(--panel);
}
.subscribe-tg h3 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.subscribe-tg p { margin: 0; color: var(--muted); font-size: 15px; }
.subscribe-tg .btn { margin-top: auto; }

/* ============================================================
   Рубрика
   ============================================================ */
.crumbs { margin: 24px 0 24px; color: var(--muted); font-size: 14px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.crumbs li { display: inline-flex; align-items: center; min-width: 0; }
.crumbs li:last-child { overflow: hidden; }
.crumbs a { transition: color 0.2s ease; }
.crumbs a:hover { color: var(--accent); }
.crumbs i { margin: 0 6px; font-size: 12px; opacity: 0.7; }
.crumbs [aria-current] { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cat-head { display: flex; align-items: center; gap: 22px; margin-bottom: 24px; }
.cat-head-text { min-width: 0; flex: 1 1 auto; }
.cat-parent { display: inline-block; margin-bottom: 4px; color: var(--accent); font: 600 14px/1.3 var(--font-t); transition: color 0.2s ease; }
.cat-parent:hover { color: var(--ink); }
.cat-head h1 { font-size: clamp(2.125rem, 1.5rem + 2vw, 3.25rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.cat-desc { max-width: 62ch; margin: 10px 0 0; color: var(--muted); font-size: 17px; text-wrap: pretty; }

.cat-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: 32px; }
.cat-main { min-width: 0; }
.card--featured { --media-w: 52%; margin-bottom: var(--gap); }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.cat-grid > .card--span { grid-column: 1 / -1; --media-w: 46%; }
.rail { display: flex; flex-direction: column; gap: var(--gap); position: sticky; top: 96px; min-width: 0; }
.rail .subscribe { margin-top: 0; }
/* короткий листинг: бокова колонка стає смугою під ним */
.cat-layout--flat { grid-template-columns: minmax(0, 1fr); }
.cat-layout--flat .rail { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }

/* ============================================================
   Стаття
   ============================================================ */
.article-col { max-width: var(--col); margin-inline: auto; }
.preview-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 0 0 24px; padding: 14px 18px;
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 15px;
}
.preview-note i { color: var(--accent); font-size: 20px; margin-top: 1px; }
.article-head { margin-bottom: 36px; }
.article-head .kicker { font-size: 14.5px; }
.article-head .kicker i { font-size: 18px; }
.article-title {
  margin: 14px 0 0;
  font-size: clamp(2.25rem, 1.6rem + 2vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  /* слово довше за колонку («Найрезультативніший» на 36px ширше за 358px) переноситься */
  overflow-wrap: anywhere;
}
.article-lead { margin: 18px 0 0; color: var(--ink-2); font-size: clamp(1.125rem, 1.02rem + 0.4vw, 1.3125rem); line-height: 1.55; text-wrap: pretty; }
.article-meta {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  list-style: none;
  margin: 24px 0 0; padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.article-meta li { display: inline-flex; align-items: center; gap: 7px; }
.article-meta i { color: var(--accent); font-size: 17px; }

/* обкладинка статті НЕ обрізається: width 100%, height auto, без aspect-ratio і object-fit */
.article-cover { max-width: 1040px; margin: 0 auto 44px; }
.article-cover.is-portrait { max-width: 640px; }
.cover { overflow: hidden; border-radius: var(--r); background: var(--panel); }
.cover img { display: block; width: 100%; height: auto; }
.photo-credit { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 13.5px; }
.photo-credit i { font-size: 16px; }
.photo-credit a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--field-line); text-underline-offset: 3px; transition: color 0.2s ease; }
.photo-credit a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* тіло статті: класи санітайзер вирізає, тому стилі на голих тегах */
.prose { color: var(--ink); font-size: 18px; line-height: 1.7; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { margin: 1.9em 0 0.6em; font-size: 1.625rem; font-weight: 700; line-height: 1.22; letter-spacing: -0.012em; }
.prose h3 { margin: 1.6em 0 0.5em; font-size: 1.3125rem; font-weight: 650; line-height: 1.3; }
.prose strong, .prose b { font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); transition: text-decoration-color 0.2s ease; }
.prose a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.prose li { margin: 0.4em 0; padding-left: 0.25em; }
.prose li::marker { color: var(--accent); }
.prose ol > li::marker { font-family: var(--font-d); font-weight: 700; }
.prose blockquote {
  margin: 1.8em 0; padding: 22px 26px;
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--ink);
  font-family: var(--font-d); font-weight: 500; font-size: 1.1875rem; line-height: 1.55;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure { margin: 1.8em 0; }
.prose img { border-radius: var(--r); }
.prose figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.prose hr { height: 1px; margin: 2.2em 0; border: 0; background: var(--line); }
.prose code { padding: 0.12em 0.4em; border-radius: 0.35em; background: var(--panel); font: 0.88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.prose pre { margin: 1.6em 0; padding: 16px 20px; overflow-x: auto; border-radius: var(--r); background: var(--panel); font-size: 15px; }
.prose pre code { padding: 0; background: none; }
/* галерея і відео з gallery.js: наш радіус замість нейтрального */
.prose .nn-gallery-stage, .prose .nn-video { border-radius: var(--r); }

.source-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 36px 0 0; padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 15px;
}
.source-box a { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 600; transition: color 0.2s ease; }
.source-box a:hover { color: var(--ink); }

/* «Поділитися» (розмітка спільна: resources/views/shared/share.blade.php) */
.share {
  margin-top: 28px; padding: 20px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.share-title { margin: 0 0 14px; font: 700 17px/1.2 var(--font-d); color: var(--ink); }
/* 12 мереж + копіювання + системне вікно: з проміжком 6px усі 13 кнопок уміщаються в один ряд колонки */
.share-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 20px; line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.share-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.share-btn:active { transform: scale(0.94); }
.share-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.share-btn.is-copied,
.share-copy.is-copied,
.share-copy.is-copied:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); transform: none; box-shadow: none; }
[data-share-native-item][hidden] { display: none !important; }

/* «Читайте також»: одна широка + дві компактні під нею */
.related { margin-top: 88px; padding: 56px 0 8px; border-top: 1px solid var(--line); }
.related-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.related-head .block-title { margin: 0; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.related-grid > .card--wide { grid-column: 1 / -1; --media-w: 50%; }
.card--compact { --media-w: 180px; }
.related--404 { margin-top: 72px; }

/* ============================================================
   Пошук, службові сторінки, 404, порожні стани
   ============================================================ */
.search-page { max-width: 820px; margin: 0 auto; }
.page-title { margin: 0 0 26px; font-size: clamp(2.25rem, 1.6rem + 2vw, 3rem); font-weight: 800; line-height: 1.06; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.search-form label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 15px; font-weight: 600; }
.search-row { display: flex; gap: 10px; }
.search-field { position: relative; flex: 1 1 auto; min-width: 0; }
.search-field i { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; pointer-events: none; }
.search-field input {
  width: 100%; min-height: 56px; padding: 0 22px 0 52px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--field-line);
  background: var(--surface);
  color: var(--ink);
  font-size: 17px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-field input::-webkit-search-cancel-button { cursor: pointer; }
.search-row .btn { min-height: 56px; padding: 0 30px; }
#search-results { margin-top: 32px; }
.search-hint { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.results-count { margin: 0 0 16px; color: var(--ink-2); font: 650 16px/1.4 var(--font-d); }
.results { display: grid; gap: 12px; }
.card--result { --media-w: 150px; }
.card--result .card-body { padding: 16px 20px; gap: 8px; }

.static-page { max-width: var(--col); margin: 0 auto; }

.page-404 { max-width: 620px; margin: 40px auto 0; text-align: center; }
/* .page-404 .err-code, а не .err-code: інакше перемагає загальне .page-404 p нижче */
.page-404 .err-code { max-width: none; margin: 0; color: var(--ink); font: 800 clamp(7rem, 4rem + 12vw, 12rem)/0.9 var(--font-d); letter-spacing: -0.05em; }
.err-code span { color: var(--accent); }
.page-404 h1 { margin: 18px 0 10px; font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem); font-weight: 750; letter-spacing: -0.015em; }
.page-404 p { margin: 0 auto 28px; max-width: 48ch; color: var(--muted); text-wrap: pretty; }

.empty {
  max-width: 620px; margin: 32px auto 0; padding: 44px 32px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  text-align: center;
}
.empty .sport-badge { margin-bottom: 18px; }
.empty h2 { margin-bottom: 10px; font-size: 1.625rem; font-weight: 750; letter-spacing: -0.015em; }
.empty p { max-width: 46ch; margin: 0 auto 24px; color: var(--muted); text-wrap: pretty; }
.empty .sports-list--wrap { justify-content: center; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.empty--listing + .cat-layout { margin-top: 40px; }
.empty--search { margin-top: 0; }

/* пагінація: таблетки і кола */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.page {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 14px;
  border-radius: var(--r-pill);
  box-shadow: inset 0 0 0 1px var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font: 600 15px/1 var(--font-t);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease);
}
.page i { font-size: 17px; }
a.page:hover { background: var(--accent-soft); color: var(--accent); }
a.page:active { transform: scale(0.96); }
.page.is-current { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.page.is-disabled { opacity: 0.4; }

/* ============================================================
   Підвал (поверхня теми, без інверсії)
   ============================================================ */
.site-footer { margin-top: 96px; padding: 56px 0 28px; border-top: 1px solid var(--line); background: var(--surface); }
.related + .site-footer { margin-top: 88px; }
.footer-top { display: grid; gap: 28px 48px; align-items: center; }
.footer-top.has-tg { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.footer-brand p { max-width: 46ch; margin: 14px 0 0; color: var(--muted); font-size: 15px; }
.footer-tg {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 20px 22px;
  border-radius: var(--r);
  background: var(--panel);
}
.footer-tg-title { margin: 0 0 2px; font-size: 17px; font-weight: 700; }
.footer-tg-text p { margin: 0; color: var(--muted); font-size: 14.5px; }
.footer-sports { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.footer-sports .sports-list { flex-wrap: wrap; gap: 6px; }
.footer-sports .sport-pill { background: var(--bg); }
.footer-sports .sport-pill:hover { background: var(--accent-soft); }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.footer-copy { margin: 0; }
.footer-pages ul { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }
.footer-pages a { transition: color 0.2s ease; }
.footer-pages a:hover { color: var(--accent); }

/* ---------- плашка кукі ---------- */
.cookie {
  position: fixed; bottom: 16px; left: 0; right: 0; z-index: 90;
  width: max-content;
  max-width: min(420px, calc(100vw - 32px));
  margin-inline: auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-pop);
  animation: sv-rise 0.5s var(--ease);
}
.cookie[hidden] { display: none; }
.cookie p { margin: 0 0 14px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.cookie a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cookie-actions { display: flex; gap: 10px; }
.cookie .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* ============================================================
   Скелетони SPA-роутера
   ============================================================ */
main.is-loading { min-height: 70vh; }
.skel { position: relative; overflow: hidden; background: var(--skel); border-radius: var(--r-pill); }
.skel::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skel-sheen), transparent);
  animation: sv-sheen 1.4s ease-in-out infinite;
}
@keyframes sv-sheen { to { transform: translateX(100%); } }
.skel-media { width: 100%; border-radius: var(--r); }
.skel-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.skel-card .skel-media { border-radius: 0; }
.skel-card--h { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: var(--gap); }
.skel-body { display: grid; gap: 12px; padding: 20px; align-content: start; }
.skel-feed { display: grid; gap: 16px; align-content: start; padding: 24px 22px; border-radius: var(--r); background: var(--accent-soft); }
.skel-panel { display: grid; gap: 14px; padding: 24px; border-radius: var(--r); background: var(--panel); }
.skel-line { height: 12px; width: 100%; }
.skel-title { height: 22px; width: 92%; }
.skel-h1 { height: 40px; margin-top: 12px; }
.skel-kicker { height: 12px; width: 110px; }
.skel-lead { margin-top: 20px; }
.skel-meta { margin: 24px 0 36px; }
.skel-badge { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.skel-badge--xl { width: 76px; height: 76px; }
.skel-chip-row { display: flex; gap: 8px; }
.skel-chip { width: 110px; height: 40px; }
.skel-crumbs { width: 220px; margin: 24px 0; }
.skel-prose { display: grid; gap: 16px; }
.w-40 { width: 40%; }
.w-60 { width: 60%; }
.w-80 { width: 80%; }

/* ============================================================
   Широкий екран: заголовок стрічки окремою колонкою
   ============================================================ */
@media (min-width: 1120px) {
  .sport--rail { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: stretch; }
  .sport--rail .sport-head { flex-direction: column; align-items: flex-start; justify-content: space-between; flex-wrap: nowrap; margin: 0; padding: 6px 0 2px; }
  .sport--rail .sport-name a { flex-direction: column; align-items: flex-start; gap: 16px; }
  .sport--rail .sport-name .sport-badge { width: 60px; height: 60px; font-size: 32px; }
  .sport--rail .sport-head .more { margin-left: 0; margin-top: auto; }
  .sport--rail .strip-nav { margin-top: 4px; }
}

/* ============================================================
   Планшет і вужче: стрічка видів спорту під шапкою, бургер
   ============================================================ */
@media (max-width: 1119px) {
  .header-bar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "logo . actions" "sports sports sports";
    min-height: 0;
  }
  .logo, .header-actions { height: 64px; align-items: center; }
  .burger { display: inline-flex; }
  .sports {
    margin: -6px calc(var(--gutter) * -1) 0;
    padding: 6px var(--gutter) 12px;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--gutter);
  }
  .sports-list li { scroll-snap-align: start; }
  /* останню пігулку не дотягнути до лівого краю: її точка прив'язки - правий край,
     інакше браузер доснаплює активну «Інші види» до сусідньої і обрізає її */
  .sports-list li:last-child { scroll-snap-align: end; }
  .header-bar .sport-pill { background: var(--bg); min-height: 40px; }
  .header-bar .sport-pill:hover { background: var(--accent-soft); }
  .header-bar .sport-pill.is-active { background: var(--accent); }
  .header-bar .sports-list { gap: 6px; }

  /* бенто на дві колонки: головний горизонтальний зверху */
  .bento--s2, .bento--s2f, .bento--s1f, .bento--s0f {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "main main" "side1 side2" "feed feed";
  }
  .bento--s0f { grid-template-areas: "main main" "feed feed"; }
  .bento--s1f { grid-template-areas: "main main" "side1 feed"; }
  .bento:not(.bento--solo):not(.bento--s1) .tile--main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
  .bento:not(.bento--solo):not(.bento--s1) .tile--main .card-media .media { width: 100%; height: 100%; }
  .bento:not(.bento--solo):not(.bento--s1) .tile--main.card--text { display: flex; }
  .bento--s2f .tile--feed .feed-list, .bento--s0f .tile--feed .feed-list { display: block; columns: 2; column-gap: 32px; }
  .bento--s2f .feed-list li, .bento--s0f .feed-list li { break-inside: avoid; border-top: 0; border-bottom: 1px solid var(--accent-line); }

  .digest--3 .digest-grid > .card:first-child,
  .digest--5 .digest-grid > .card:first-child { grid-column: 1 / -1; }
  .digest--3 .digest-grid > .card:not(:first-child),
  .digest--5 .digest-grid > .card:not(:first-child) { grid-column: span 3; }

  .mostread--wide .mostread-list { display: block; columns: 2; column-gap: 40px; }
  .mostread--wide .mostread-list li { break-inside: avoid; grid-template-columns: 44px minmax(0, 1fr); padding: 14px 0; border-left: 0; border-top: 1px solid var(--line); }
  .mostread--wide .mostread-list li:first-child { padding-top: 14px; border-top: 0; }
  .mostread--wide .rank { font-size: 32px; }

  .footer-top.has-tg { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 959px) {
  .cat-layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
  .subscribe.has-tg { grid-template-columns: minmax(0, 1fr); }
  .feature-grid, .duo-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-rows { grid-template-rows: none; }
  .feature-rows .card--h .card-media .media { aspect-ratio: 4 / 3; height: auto; }
}

/* ============================================================
   Телефон (< 768px): усе явно складається в одну колонку
   ============================================================ */
@media (max-width: 767px) {
  :root { --gutter: 16px; --gap: 16px; --section: 56px; }
  body { font-size: 16.5px; }
  .home { padding-top: 16px; }

  .logo { font-size: 24px; }
  .header-actions { gap: 6px; }

  /* бенто: одна колонка; бічні плитки стають рядками з мініатюрою ліворуч */
  .bento, .bento--s1, .bento--s2, .bento--s2f, .bento--s1f, .bento--s0f {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
  }
  .bento .tile--main, .bento .tile--side, .bento .tile--feed { grid-area: auto !important; }
  .bento .tile--main,
  .bento:not(.bento--solo):not(.bento--s1) .tile--main { display: flex; flex-direction: column; }
  .bento .tile--main .card-media .media,
  .bento:not(.bento--solo):not(.bento--s1) .tile--main .card-media .media { width: auto; height: auto; aspect-ratio: 16 / 10; }
  .bento--solo .tile--main > .card-body { padding: 20px 20px 22px; }
  .bento .tile--side { display: grid; grid-template-columns: 38% minmax(0, 1fr); }
  .bento .tile--side.card--text { display: flex; }
  .bento .tile--side .card-media .media { height: 100%; aspect-ratio: 1 / 1; }
  .bento .tile--side .card-body { padding: 14px 16px; }
  .bento .tile--side .card-title { font-size: 16.5px; }
  .bento--s2f .tile--feed .feed-list, .bento--s0f .tile--feed .feed-list { columns: 1; }

  .card:has(.t-lg, .t-xl, .t-xxl) > .card-body { padding: 20px 20px 22px; }
  .card--h:not(.card--flat):not(.card--compact):not(.card--result):not(.card--row):not(.tile--side) { display: flex; flex-direction: column; }
  .card--h:not(.card--flat):not(.card--compact):not(.card--result):not(.card--row):not(.tile--side) .card-media .media { height: auto; aspect-ratio: 16 / 10; }
  /* рядки блоків видів спорту лишаються компактними: мініатюра ліворуч, без ліду */
  .card--row { --media-w: 38%; }
  .card--row .card-media .media { height: 100%; aspect-ratio: 1 / 1; }
  .card--row .card-body { padding: 14px 16px; gap: 8px; }
  .card--row .card-title { font-size: 16.5px; }
  .card--row:not(.card--text) .card-lead { display: none; }

  .digest-grid { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 18px; }
  .digest-grid > .card,
  .digest--2 .digest-grid > .card,
  .digest--3 .digest-grid > .card,
  .digest--4 .digest-grid > .card,
  .digest--5 .digest-grid > .card { grid-column: auto !important; }
  .digest .card--h, .digest--1 .card--h, .digest--2 .card--h { --thumb: 84px; }

  .sport-head { margin-bottom: 16px; }
  .sport-name .sport-badge { width: 40px; height: 40px; font-size: 21px; }
  .sport-name a { gap: 12px; }
  .sport-head .more { min-height: 36px; padding: 0 14px; font-size: 14px; }
  .strip-nav { display: none; }
  .strip {
    grid-auto-columns: 78%;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .feature-rows .card--h { --media-w: 38%; }

  .mostread--wide { padding: 22px 20px 16px; }
  .mostread--wide .mostread-list { columns: 1; }

  .subscribe { padding: 22px 18px; }
  .subscribe-copy .sport-badge { display: none; }

  .crumbs { margin: 16px 0 18px; font-size: 13.5px; }
  .cat-head { gap: 16px; align-items: flex-start; }
  .cat-head .sport-badge--xl { width: 56px; height: 56px; font-size: 30px; }
  .chips { margin: -6px calc(var(--gutter) * -1); padding-block: 6px; overflow-x: auto; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips ul { flex-wrap: nowrap; padding-inline: var(--gutter); width: max-content; }
  .cat-layout { margin-top: 24px; gap: 32px; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
  .rail, .cat-layout--flat .rail { grid-template-columns: minmax(0, 1fr); }

  .article-head { margin-bottom: 26px; }
  .article-meta { gap: 6px 16px; font-size: 14px; }
  .article-cover { margin-inline: calc(var(--gutter) * -1); margin-bottom: 32px; }
  .article-cover .cover { border-radius: 0; }
  .article-cover .photo-credit { padding-inline: var(--gutter); }
  .prose { font-size: 17.5px; }
  .prose h2 { font-size: 1.4375rem; }
  .prose blockquote { padding: 18px 20px; font-size: 1.0625rem; }
  .share { padding: 18px 16px 20px; }

  .related { margin-top: 64px; padding-top: 40px; }
  .related-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .card--compact { --media-w: 116px; }
  .card--compact .card-body { padding: 14px 16px; }
  .card--result { --media-w: 112px; }
  .card--result .card-body { padding: 12px 14px; }

  .search-row { flex-direction: column; }
  .search-row .btn { width: 100%; }
  .empty { padding: 32px 20px; }

  .site-footer { margin-top: 72px; padding-top: 40px; }
  .footer-tg { grid-template-columns: auto minmax(0, 1fr); }
  .footer-tg .btn { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* вузький телефон: кнопки «поділитися» двома рівними рядками по сім */
@media (max-width: 480px) {
  .share-list { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
  .share-list li { display: flex; justify-content: center; }
  .share-btn { width: 100%; max-width: 42px; height: auto; aspect-ratio: 1; font-size: 18px; }
  .cookie-actions .btn { flex: 1 1 0; }
}

/* липка шапка лише там, де вона не з'їдає півекрана */
@media (min-width: 768px) {
  .site-header { position: sticky; top: 0; }
}

/* ============================================================
   Зменшений рух: вимикаємо все, що рухається
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal { opacity: 1; animation: none !important; }
  .card:hover, .card:active, .btn:hover, .btn:active, .share-btn:hover, .logo:hover .logo-dot,
  .card:hover .media > img.loaded, .card:hover .media > img[fetchpriority],
  .sport-tile:hover, .sport-tile:active, .sport-tile:hover .sport-tile-arrow,
  .sport-pill:active, .chip:active, .more:active, .more:hover i { transform: none; }
  .skel::after { display: none; }
  #route-progress { transition: opacity 0.2s ease !important; }
}
