/*
  Двобій: тема новин спорту поєдинків (бокс, ММА, теніс, олімпійські види).
  (c) 2026 vii-studio.com

  Design Read: новинне видання для вболівальників в Україні, переважно
  з телефона; мова вечора боїв: темна сцена, контраст, кінематографічні
  фото, кутаста типографіка Tektur, що перегукується з октагоном і кутами рингу.
  Нативний CSS без бібліотек, змінний шрифт Tektur (wdth 75-100, wght 400-900)
  для заголовків і Golos Text для тексту.

  Dials: DESIGN_VARIANCE 8 / MOTION_INTENSITY 5 / VISUAL_DENSITY 4.

  Колір (Color Consistency Lock): одна акцентна родина, «червоний кут рингу».
  Темна схема #F0442E, світла #C8321E (для AA на світлому тлі). Акцент лише
  для кікерів, активних станів, тонких ліній, кнопок і номерів; без світіння
  і без великих червоних заливок. Постер з фото завжди темний в обох схемах:
  це медіа, а не секція сторінки.

  ПРАВИЛО ФОРМ (Shape Consistency Lock), мотив октагону:
  1. Обкладинки, картки з фото і постер мають скошені кути: clip-path
     восьмикутник з фасками 12px (--c), дрібні мініатюри 10px.
  2. Кнопки, кнопки «поділитися», номери сторінок: фаски 8px. Фон і контур
     малюють псевдоелементи, тому рамка фокуса не обрізається.
  3. Текстові контейнери, поля форм, таби, банер кукі: прямокутні, радіус 0.
  4. Жодних закруглень ніде (border-radius: 0 у всій темі).

  Рух: reveal (opacity + translateY 14px, 450ms), повільний зум постера при
  завантаженні, зум фото 1.04 при наведенні, :active кнопок translateY(1px),
  прогрес-бар роутера. Анімуються лише transform і opacity; усе вимикається
  при prefers-reduced-motion: reduce.
*/

/* ---------- Шрифти (self-hosted, варіативні woff2) ---------- */

@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(../fonts/tektur-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: 'Tektur';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(../fonts/tektur-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Tektur';
  font-style: normal;
  font-weight: 400 900;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(../fonts/tektur-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: 'Golos Text';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/golos-text-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: 'Golos Text';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/golos-text-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(../fonts/golos-text-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: #F3F4F5;
  --surface: #FCFCFC;
  --raised: #E7E9EC;
  --text: #111214;
  --muted: #585B62;
  --line: #DCDEE2;
  --field-line: #80848C;
  --accent: #C8321E;
  --on-accent: #FCFCFC;

  /* Сцена постера: однакова в обох схемах (фото з темним скрімом). */
  --stage: #0E0F11;
  --on-stage: #F0F0EE;
  --on-stage-muted: #C9CBCF;
  --accent-stage: #F0442E;

  --font-display: 'Tektur', 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-text: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --header-h: 64px;
  --gutter: 16px;
  --container: 1320px;
  --c: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0F11;
    --surface: #16181C;
    --raised: #1D2025;
    --text: #F0F0EE;
    --muted: #A0A3A9;
    --line: #272A30;
    --field-line: #6A6E76;
    --accent: #F0442E;
    --on-accent: #0E0F11;
  }
}

@media (min-width: 768px) {
  :root { --header-h: 68px; --gutter: 24px; }
}
@media (min-width: 1200px) {
  :root { --gutter: 32px; }
}

/* ---------- Основа ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  /* Довге слово в заголовку (напр. «напівсередньоваговика» на 36px)
     переноситься, а не розпирає сторінку вбік. */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main { display: block; flex: 1 0 auto; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 760;
  font-stretch: 90%;
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; }

button, input { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Скошені кути: один восьмикутник на всю тему ---------- */

.frame,
.poster,
.article-cover,
.skel-cut,
.sec-title::before,
.btn::before,
.share-btn::before,
.page::before,
.icon-btn::before,
.tab-cut::before {
  clip-path: polygon(
    var(--c) 0, calc(100% - var(--c)) 0,
    100% var(--c), 100% calc(100% - var(--c)),
    calc(100% - var(--c)) 100%, var(--c) 100%,
    0 calc(100% - var(--c)), 0 var(--c)
  );
}

/* Внутрішній шар контурних кнопок: фаска менша на 0.59px, тож діагональ
   рамки має ту саму товщину 1px, що й прямі сторони. */
.btn::after,
.share-btn::after,
.page::after {
  --k: calc(var(--c) - .59px);
  clip-path: polygon(
    var(--k) 0, calc(100% - var(--k)) 0,
    100% var(--k), 100% calc(100% - var(--k)),
    calc(100% - var(--k)) 100%, var(--k) 100%,
    0 calc(100% - var(--k)), 0 var(--k)
  );
}

/* Контейнер фото: пропорції, тло-заглушка, обрізка кутів. */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--raised);
  margin: 0;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.r-219 { aspect-ratio: 21 / 9; }
.r-169 { aspect-ratio: 16 / 9; }
.r-1610 { aspect-ratio: 16 / 10; }
.r-32 { aspect-ratio: 3 / 2; }
.r-43 { aspect-ratio: 4 / 3; }
.r-11 { aspect-ratio: 1 / 1; }
.frame-sm { --c: 10px; }

/* ---------- Прогрес-бар роутера ---------- */

#route-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
#route-progress.is-active {
  opacity: 1;
  animation: route-run 1.6s var(--ease) forwards;
}
@keyframes route-run {
  from { transform: scaleX(0); }
  to { transform: scaleX(.86); }
}

/* ---------- Кнопки ---------- */

.btn {
  --c: 8px;
  --edge: var(--accent);
  --fill: var(--accent);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 48px;
  padding: 0 24px;
  border: 0;
  background: none;
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  font-stretch: 95%;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease);
}
.btn::before,
.btn::after {
  content: '';
  position: absolute;
  z-index: -1;
}
.btn::before { inset: 0; background: var(--edge); }
.btn::after { inset: 1px; background: var(--fill); }
.btn .ph { font-size: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { cursor: progress; opacity: .7; }

.btn-ghost {
  --edge: var(--field-line);
  --fill: var(--bg);
  color: var(--text);
}
.btn-ghost:hover { --edge: var(--accent); color: var(--accent); }

.icon-btn {
  --c: 8px;
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  transition: transform .18s var(--ease);
}
.icon-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--raised);
  opacity: 0;
  transition: opacity .2s ease;
}
.icon-btn:hover::before { opacity: 1; }
.icon-btn:active { transform: translateY(1px); }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text);
}
/* Плашка знака: «кут рингу», скошений праворуч згори і ліворуч знизу. */
.logo-post {
  display: block;
  width: 11px;
  height: 26px;
  background: var(--accent);
  flex: 0 0 auto;
  clip-path: polygon(0 0, 45% 0, 100% 22%, 100% 100%, 55% 100%, 0 78%);
}

.main-nav {
  display: none;
  align-items: stretch;
  gap: 30px;
  margin-left: 20px;
  height: 100%;
  white-space: nowrap;
}
.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 650;
  font-stretch: 95%;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .35s var(--ease);
}
.main-nav a:hover { color: var(--accent); }
.main-nav a:hover::after,
.main-nav a.is-active::after { transform: scaleX(1); }
.main-nav a.is-active { color: var(--accent); }

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

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .burger { display: none; }
}

/* Повноекранне меню на мобільному: під шапкою, на всю висоту екрана. */
.menu-panel {
  position: fixed;
  left: 0; right: 0;
  top: var(--header-h);
  bottom: 0;
  z-index: 59;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border-top: 1px solid var(--line);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity .3s var(--ease), transform .45s var(--ease), visibility 0s linear .45s;
}
.site-header.is-open .menu-panel {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity .3s var(--ease), transform .45s var(--ease), visibility 0s;
}
html.menu-open { overflow: hidden; }

.menu-nav { padding-block: 8px 24px; }
.menu-group {
  padding-block: 18px;
  border-bottom: 1px solid var(--line);
}
.menu-link {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 44px);
  font-weight: 800;
  font-stretch: 92%;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.menu-link.is-active { color: var(--accent); }
.menu-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 10px;
}
.menu-sub a {
  display: inline-block;
  padding-block: 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
}
.menu-sub a:hover { color: var(--accent); }
.menu-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-block: 8px 40px;
  font-size: 15px;
}
.menu-foot a { color: var(--muted); padding-block: 6px; }
.menu-foot a:hover { color: var(--text); }
.menu-foot .menu-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}
@media (min-width: 900px) {
  .menu-panel { display: none; }
}

/* ---------- Кікер і вихідні дані ---------- */

.kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  font-stretch: 92%;
  line-height: 1.3;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker:hover { text-decoration: underline; text-underline-offset: .2em; }
.kicker-sep { margin-inline: .35em; opacity: .55; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.meta > * + *::before {
  content: '';
  display: inline-block;
  width: 1px;
  height: .95em;
  margin-inline: .7em;
  background: currentColor;
  opacity: .45;
  vertical-align: -.12em;
}

/* ---------- Заголовки секцій ---------- */

.section { margin-top: clamp(56px, 7vw, 96px); }

.sec-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(20px, 2.4vw, 32px);
}
.sec-head::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}
.sec-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.sec-title::before {
  --c: 2px;
  content: '';
  width: 7px;
  height: .9em;
  background: var(--accent);
  flex: 0 0 auto;
}

/* ---------- Постер ---------- */

.poster {
  position: relative;
  container-type: inline-size;
  background: var(--stage);
  color: var(--on-stage);
  margin-top: clamp(16px, 2.4vw, 32px);
}

.poster-media {
  position: absolute;
  inset: 0;
  margin: 0;
  overflow: hidden;
}
.poster-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  color: transparent;
  transition: transform 1.2s var(--ease);
}
/* Скрім: знизу майже непрозорий, тож текст на будь-якому кадрі
   тримає контраст AA; зліва додаткове затемнення під колонку тексту. */
.poster-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(10 11 13 / .95) 0%, rgb(10 11 13 / .86) 28%, rgb(10 11 13 / .5) 56%, rgb(10 11 13 / .08) 82%, rgb(10 11 13 / 0) 100%),
    linear-gradient(to right, rgb(10 11 13 / .5) 0%, rgb(10 11 13 / 0) 62%);
}

.poster-body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  min-height: min(125cqw, 80vh);
  padding: 22px 20px 24px;
}
@media (min-width: 768px) {
  .poster-body {
    min-height: min(calc(100cqw * 9 / 16), 78vh);
    padding: clamp(28px, 4cqw, 56px);
    gap: 16px;
  }
}
@media (min-width: 1024px) {
  .poster-body { min-height: min(calc(100cqw * 9 / 21), 78vh); }
}

.poster-body > * { max-width: 900px; }

.poster .kicker {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  color: var(--on-stage);
}
.poster .kicker::before {
  content: '';
  width: 22px;
  height: 3px;
  background: var(--accent-stage);
}

.poster-title {
  font-size: clamp(28px, 4.6cqw, 62px);
  font-weight: 800;
  font-stretch: 88%;
  line-height: 1.03;
  letter-spacing: -0.015em;
  color: var(--on-stage);
}
.poster-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.poster-title a:focus-visible { outline-color: var(--on-stage); }
.poster:hover .poster-title a {
  text-decoration: underline;
  text-decoration-color: var(--accent-stage);
  text-decoration-thickness: 3px;
  text-underline-offset: .12em;
}
.poster:hover .poster-media img { transform: scale(1.02); }

.poster-lead {
  font-size: clamp(16px, 1.6cqw, 19px);
  line-height: 1.5;
  color: var(--on-stage-muted);
  max-width: 64ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster .meta { color: var(--on-stage-muted); }

/* Постер без фото: та сама сцена, але на поверхні теми. */
.poster-text {
  background: var(--surface);
  color: var(--text);
  border-top: 3px solid var(--accent);
}
.poster-text .poster-body { min-height: 0; padding-block: clamp(40px, 6cqw, 88px); }
.poster-text .poster-title,
.poster-text .kicker { color: var(--text); }
.poster-text .kicker::before { background: var(--accent); }
.poster-text .poster-lead,
.poster-text .meta { color: var(--muted); }
.poster-text:hover .poster-title a { text-decoration-color: var(--accent); }
.poster-text .poster-title a:focus-visible { outline-color: var(--accent); }

/* Менший постер: перший матеріал рубрики. */
.poster-sm .poster-body { gap: 12px; }
@media (min-width: 768px) {
  .poster-sm .poster-body { min-height: min(calc(100cqw * 9 / 16), 60vh); }
}
@media (min-width: 1024px) {
  .poster-sm .poster-body { min-height: min(calc(100cqw * 9 / 19), 60vh); }
}
.poster-sm .poster-title { font-size: clamp(26px, 4.4cqw, 46px); }

/* ---------- Картки ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.card-media { display: block; }
.card-media img { transition: transform .7s var(--ease), opacity .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }

.card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.card-title {
  font-size: clamp(19px, 1.6vw, 22px);
  font-weight: 740;
  font-stretch: 90%;
  line-height: 1.18;
}
.card-title-lg {
  font-size: clamp(24px, 2.5vw, 34px);
  font-weight: 780;
  font-stretch: 88%;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.card-title a,
.card-title-lg a {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: .14em;
}
.card:hover .card-title a,
.card:hover .card-title-lg a,
.card-title a:focus-visible,
.card-title-lg a:focus-visible { text-decoration-color: var(--accent); }

.card-lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Текстова картка (матеріал без обкладинки): прямокутна поверхня з
   акцентною лінією згори, лід довший, щоб картка не виглядала порожньою. */
.card-text {
  padding: clamp(20px, 2.2vw, 28px);
  background: var(--surface);
  border-top: 2px solid var(--accent);
}
.card-text .card-lead { -webkit-line-clamp: 5; }

/* Горизонтальна картка: фото ліворуч, текст праворуч. */
@media (min-width: 768px) {
  .card-h {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(24px, 3vw, 44px);
    align-items: center;
  }
  .card-h .card-lead { -webkit-line-clamp: 4; }
}

/* ---------- Головне ---------- */

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}
@media (min-width: 900px) {
  .main-grid-2,
  .main-grid-3 {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(28px, 3.4vw, 52px);
    align-items: start;
  }
}

.main-stack {
  display: flex;
  flex-direction: column;
}
.brief {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.brief:first-child { padding-top: 0; border-top: 0; }
@media (min-width: 900px) {
  .brief:first-child { padding-top: 18px; border-top: 2px solid var(--accent); }
}
.brief .card-title { font-size: clamp(21px, 2vw, 28px); line-height: 1.12; }
.brief .card-lead { -webkit-line-clamp: 3; }
.brief:hover .card-title a { text-decoration-color: var(--accent); }

/* ---------- Кути: квадранти дисциплін ---------- */

.corners {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.corner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
  padding: 28px 0 32px;
  background: var(--bg);
}
@media (min-width: 768px) {
  .corners-2,
  .corners-3,
  .corners-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .corners-3 .corner:first-child { grid-column: 1 / -1; }
  .corner { padding: 32px clamp(24px, 3vw, 36px) 36px; }
  .corners-2 .corner:nth-child(odd),
  .corners-4 .corner:nth-child(odd),
  .corners-3 .corner:nth-child(even) { padding-left: 0; }
  .corners-2 .corner:nth-child(even),
  .corners-4 .corner:nth-child(even),
  .corners-3 .corner:nth-child(odd):not(:first-child) { padding-right: 0; }
  .corners-1 .corner,
  .corners-3 .corner:first-child { padding-inline: 0; }
}

.corner-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.corner-head::after {
  content: '';
  position: absolute;
  left: 0; bottom: -1px;
  width: 64px;
  height: 2px;
  background: var(--accent);
}
.corner-name {
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 800;
  font-stretch: 100%;
  line-height: .95;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.corner-name a:hover { color: var(--accent); }
.corner-more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-block: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.corner-more:hover { color: var(--accent); }

.corner-body {
  display: grid;
  gap: 22px;
}
@media (min-width: 900px) {
  .corners-1 .corner-body,
  .corners-3 .corner:first-child .corner-body {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: clamp(28px, 3.4vw, 52px);
    align-items: start;
  }
}

.corner-list { list-style: none; display: flex; flex-direction: column; }
.corner-list li {
  padding-block: 14px;
  border-top: 1px solid var(--line);
}
.corner-list li:first-child { padding-top: 0; border-top: 0; }
@media (min-width: 900px) {
  .corners-1 .corner-list li:first-child,
  .corners-3 .corner:first-child .corner-list li:first-child { padding-top: 0; }
}
.corner-list a {
  display: block;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}
.corner-list a:hover { color: var(--accent); }
.corner-list time {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Розділи (коли свіжих матеріалів по рубриках ще немає) ---------- */

.disc-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.disc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 0 28px;
  background: var(--bg);
}
.disc-name {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1;
  text-transform: uppercase;
}
.disc-name .ph {
  display: inline-block;
  margin-left: .3em;
  font-size: .6em;
  vertical-align: .3em;
  color: var(--accent);
  transition: transform .35s var(--ease);
}
.disc-name a:hover { color: var(--accent); }
.disc-name a:hover .ph { transform: translate(3px, -3px); }
.disc p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  max-width: 40ch;
}
.disc-sub {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: auto;
  padding-top: 6px;
}
.disc-sub a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: .25em;
}
.disc-sub a:hover { color: var(--accent); text-decoration-color: currentColor; }
@media (min-width: 640px) {
  .disc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .disc { padding: 28px 28px 30px; }
  .disc:nth-child(odd) { padding-left: 0; }
  .disc:nth-child(even) { padding-right: 0; }
  /* Непарна остання картка займає весь рядок: без сірої порожньої клітинки. */
  .disc:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .disc-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .disc-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .disc-grid-4 .disc,
  .disc-grid-3 .disc { padding: 30px 28px 32px; }
  .disc-grid-4 .disc:first-child,
  .disc-grid-3 .disc:first-child { padding-left: 0; }
  .disc-grid-4 .disc:last-child,
  .disc-grid-3 .disc:last-child { padding-right: 0; }
  .disc-grid-4 .disc:nth-child(odd):not(:first-child),
  .disc-grid-3 .disc:nth-child(odd):not(:first-child) { padding-left: 28px; }
  .disc-grid-4 .disc:nth-child(even):not(:last-child),
  .disc-grid-3 .disc:nth-child(even):not(:last-child) { padding-right: 28px; }
  /* Більше чотирьох розділів: краї рядків вирівняні, неповний рядок
     добирає остання картка, тож порожніх клітинок немає. */
  .disc-grid-4 .disc:nth-child(4n+1):not(:first-child) { padding-left: 0; }
  .disc-grid-4 .disc:nth-child(4n):not(:last-child) { padding-right: 0; }
  .disc-grid-4 .disc:last-child:nth-child(4n+2) { grid-column: span 3; }
  .disc-grid-4 .disc:last-child:nth-child(4n+3) { grid-column: span 2; }
  .disc-grid-3 .disc:last-child { grid-column: auto; }
}

/* ---------- Стрічка і Найчитаніше ---------- */

.pulse {
  display: grid;
  gap: clamp(56px, 7vw, 96px);
}
@media (min-width: 1024px) {
  .pulse-2 {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: clamp(48px, 5vw, 88px);
    align-items: start;
  }
}
.pulse-1 > * { max-width: 880px; }

.stream-day {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  font-stretch: 95%;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.stream-group + .stream-group { margin-top: 30px; }

.stream {
  --time-w: 58px;
  --rail-x: calc(var(--time-w) + 14px);
  position: relative;
  list-style: none;
}
/* Лінія шкали. */
.stream::before {
  content: '';
  position: absolute;
  top: 10px; bottom: 10px;
  left: var(--rail-x);
  width: 2px;
  background: var(--accent);
  opacity: .5;
}
.stream-item {
  position: relative;
  display: grid;
  grid-template-columns: var(--time-w) minmax(0, 1fr);
  column-gap: 38px;
  padding-block: 12px;
}
/* Мітка на шкалі: маленький ромб. */
.stream-item::before {
  content: '';
  position: absolute;
  top: 19px;
  left: calc(var(--rail-x) - 3px);
  width: 8px;
  height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
}
.stream-time {
  padding-top: 2px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  font-stretch: 90%;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text);
}
.stream-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.stream-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.38;
}
.stream-title:hover { color: var(--accent); }
.stream-cat {
  align-self: flex-start;
  color: var(--muted);
  font-size: 13.5px;
}
.stream-cat:hover { color: var(--accent); }

.top-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.top-list li {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}
.top-list li:first-child { border-top: 0; padding-top: 4px; }
.top-num {
  font-family: var(--font-display);
  font-size: 50px;
  font-weight: 800;
  font-stretch: 78%;
  line-height: .82;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.top-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.top-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.38;
}
.top-title:hover { color: var(--accent); }
.top-cat { color: var(--muted); font-size: 13px; }

/* ---------- Розсилка і Telegram ---------- */

.subscribe {
  display: grid;
  gap: 28px;
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 56px);
  background: var(--surface);
  border-top: 2px solid var(--accent);
}
.subscribe-title {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  font-stretch: 95%;
  line-height: 1.02;
  text-transform: uppercase;
}
.subscribe-intro p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 17px;
  max-width: 44ch;
}
@media (min-width: 900px) {
  .subscribe {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: end;
    column-gap: clamp(32px, 5vw, 80px);
  }
  .subscribe-tg { grid-column: 1 / -1; }
}

.nl-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nl-form label,
.search-form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.nl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nl-row input { flex: 1 1 220px; }
.nl-hint { color: var(--muted); font-size: 13.5px; }

.field,
.nl-form input,
.search-form input {
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--field-line);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
}
.subscribe .nl-form input { background: var(--bg); }
.nl-form input::placeholder,
.search-form input::placeholder { color: var(--muted); opacity: 1; }
.nl-form input:focus-visible,
.search-form input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}
.nl-form input.is-invalid { border-color: var(--accent); }
.subscribe .btn-ghost { --fill: var(--surface); }

/* Відповіді спільного newsletter.js. */
.nl-note { color: var(--muted); font-size: 14px; }
.nl-error { color: var(--accent) !important; font-size: 14px; font-weight: 600; }
.form-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  font-weight: 600;
}
.form-ok .ph { color: var(--accent); font-size: 22px; }

.subscribe-tg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.subscribe-tg .ph-telegram-logo { font-size: 28px; color: var(--accent); }
.subscribe-tg p { flex: 1 1 260px; color: var(--muted); }
.subscribe-tg p b { color: var(--text); font-weight: 600; }

/* Компактна розсилка в колонці рубрики. */
.nl-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border-top: 2px solid var(--accent);
}
.nl-box h2 {
  font-size: 22px;
  font-weight: 800;
  font-stretch: 95%;
  text-transform: uppercase;
  line-height: 1.05;
}
.nl-box > p { color: var(--muted); font-size: 15px; }
.nl-box .nl-row input { flex-basis: 100%; }
.nl-box .btn { width: 100%; }

/* ---------- Хлібні крихти ---------- */

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: clamp(20px, 3vw, 32px);
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  /* Запас під рамку фокуса (2px + відступ 3px), який overflow інакше обрізає;
     від'ємні поля компенсують його, тож розкладка не зсувається. */
  padding-inline: 5px;
  margin-inline: -5px;
  padding-bottom: 5px;
  margin-bottom: -5px;
}
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: .5; font-family: var(--font-display); }
.crumbs [aria-current] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

/* ---------- Рубрика ---------- */

.cat-head { padding-bottom: 8px; }
.cat-title {
  margin-top: clamp(18px, 3vw, 36px);
  font-size: clamp(34px, 10.5vw, 136px);
  font-weight: 800;
  font-stretch: 100%;
  line-height: .9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.cat-desc {
  margin-top: 18px;
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
}

.tabs {
  display: flex;
  gap: 4px;
  margin-top: clamp(24px, 3vw, 36px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
@media (max-width: 767px) {
  /* На телефоні таби прокручуються до краю екрана. */
  .tabs {
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
}
.tab {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 650;
  font-stretch: 95%;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.tab:first-child { padding-left: 0; }
/* Стрічка табів прокручується (overflow), тому рамка фокуса всередині таба. */
.tab:focus-visible { outline-offset: -2px; }
.tab::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .35s var(--ease);
}
.tab:first-child::after { left: 0; }
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); }
.tab.is-active::after,
.tab:hover::after { transform: scaleX(1); }

.cat-layout {
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  margin-top: clamp(24px, 3vw, 36px);
}
@media (min-width: 1100px) {
  .cat-layout:not(.is-flat) {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 56px;
    align-items: start;
  }
}
.cat-main > .poster { margin-top: 0; }

.rows {
  display: flex;
  flex-direction: column;
  margin-top: 36px;
}
.cat-main > .rows:first-child { margin-top: 0; }

.row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; padding-top: 0; }
.rows-lined .row:first-child { border-top: 1px solid var(--line); padding-top: 22px; }
.row-nomedia { grid-template-columns: minmax(0, 1fr); }
.row-media img { transition: transform .7s var(--ease), opacity .4s ease; }
.row:hover .row-media img { transform: scale(1.04); }
.row-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.row-title {
  font-size: 18px;
  font-weight: 740;
  font-stretch: 90%;
  line-height: 1.2;
}
.row-title a {
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 2px;
  text-underline-offset: .14em;
}
.row:hover .row-title a,
.row-title a:focus-visible { text-decoration-color: var(--accent); }
.row-lead {
  display: none;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.55;
}
@media (min-width: 768px) {
  .row {
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 28px;
    padding-block: 28px;
  }
  .row-nomedia { grid-template-columns: minmax(0, 1fr); }
  .row-title { font-size: clamp(20px, 1.9vw, 25px); }
  .row-lead {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

.rail {
  display: grid;
  gap: 40px;
  align-content: start;
}
@media (min-width: 1100px) {
  .cat-layout:not(.is-flat) .rail {
    position: sticky;
    top: calc(var(--header-h) + 24px);
  }
}
@media (min-width: 768px) {
  .is-flat .rail-2 {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 72px);
    align-items: start;
  }
}
@media (min-width: 900px) {
  /* Коротка рубрика: розсилка смугою, заголовок і текст ліворуч, форма праворуч. */
  .is-flat .rail-1 .nl-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    column-gap: clamp(32px, 5vw, 80px);
    row-gap: 10px;
    align-items: end;
    padding: clamp(28px, 3.4vw, 44px);
  }
  .is-flat .rail-1 .nl-box > h2 { grid-column: 1; grid-row: 1; font-size: clamp(24px, 2.4vw, 32px); }
  .is-flat .rail-1 .nl-box > p { grid-column: 1; grid-row: 2; }
  .is-flat .rail-1 .nl-box > form { grid-column: 2; grid-row: 1 / span 2; }
  .is-flat .rail-1 .nl-box .nl-row input { flex-basis: 220px; }
  .is-flat .rail-1 .nl-box .btn { width: auto; }
}
.rail-title {
  margin-bottom: 18px;
  font-size: 20px;
  font-weight: 800;
  font-stretch: 100%;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
  border-top: 2px solid var(--accent);
}
.empty-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 800;
  font-stretch: 92%;
  line-height: 1.1;
}
.empty > p:not(.empty-title) { color: var(--muted); max-width: 52ch; }
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.empty .btn-ghost { --fill: var(--surface); }

/* ---------- Пагінація ---------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 40px;
}
.page {
  --c: 8px;
  --edge: var(--field-line);
  --fill: var(--bg);
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: transform .18s var(--ease);
}
.page::before,
.page::after { content: ''; position: absolute; z-index: -1; }
.page::before { inset: 0; background: var(--edge); }
.page::after { inset: 1px; background: var(--fill); }
.page:hover { --edge: var(--accent); color: var(--accent); }
.page:active { transform: translateY(1px); }
.page.is-current { --edge: var(--accent); --fill: var(--accent); color: var(--on-accent); }
.page.is-disabled { opacity: .4; }
.page.is-disabled:hover { --edge: var(--field-line); color: inherit; }

/* ---------- Стаття ---------- */

.preview-note {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  font-size: 15px;
}

.article-layout { margin-top: 0; }
.article-head { margin-top: clamp(20px, 3vw, 32px); }
@media (min-width: 1100px) {
  .has-rail .article-rail { margin-top: calc(clamp(20px, 3vw, 32px) + 21px + clamp(20px, 3vw, 32px)); }
}
.article-main {
  max-width: 760px;
  margin-inline: auto;
  min-width: 0;
}
@media (min-width: 1100px) {
  .article-layout.has-rail {
    display: grid;
    grid-template-columns: minmax(0, 760px) 280px;
    justify-content: space-between;
    gap: 56px;
    align-items: start;
  }
  .has-rail .article-main { margin-inline: 0; }
}

.article-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.article-title {
  font-size: clamp(36px, 4.2vw, 52px);
  font-weight: 800;
  font-stretch: 86%;
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.article-lead {
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.5;
  color: var(--text);
  opacity: .86;
}
.article-head .meta { font-size: 14px; }

.article-figure {
  margin: clamp(24px, 3vw, 36px) 0 0;
}
/* Обкладинка статті не кадрується: пропорції оригіналу (варіант wide),
   лише фаски восьмикутника по кутах. */
.article-cover {
  --c: 12px;
  background: var(--raised);
  overflow: hidden;
}
.article-cover img {
  width: 100%;
  height: auto;
}
.photo-credit {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13.5px;
}
.photo-credit a {
  text-decoration: underline;
  text-underline-offset: .2em;
  text-decoration-color: var(--field-line);
}
.photo-credit a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* Тіло статті: стилі на голих тегах, класи санітайзер вирізає. */
.prose {
  margin-top: clamp(28px, 3vw, 40px);
  font-size: 18px;
  line-height: 1.7;
}
.prose > * { max-width: 66ch; }
.prose > * + * { margin-top: 1.1em; }
.prose p { margin: 0; }
.prose > * + p { margin-top: 1.1em; }
.prose h2 {
  margin-top: 1.9em;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 780;
  font-stretch: 90%;
  line-height: 1.15;
}
.prose h3 {
  margin-top: 1.7em;
  font-size: clamp(20px, 2vw, 23px);
  font-weight: 740;
  line-height: 1.2;
}
.prose h2 + *,
.prose h3 + * { margin-top: .6em; }
.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong { font-weight: 600; }
.prose ul,
.prose ol {
  list-style: none;
  padding-left: 1.6em;
}
.prose li { position: relative; }
.prose li + li { margin-top: .5em; }
.prose ul > li::before {
  content: '';
  position: absolute;
  left: -1.25em;
  top: .68em;
  width: 7px;
  height: 7px;
  background: var(--accent);
  transform: rotate(45deg);
}
.prose ol { counter-reset: item; }
.prose ol > li { counter-increment: item; }
.prose ol > li::before {
  content: counter(item);
  position: absolute;
  left: -1.6em;
  top: 0;
  min-width: 1.2em;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 26px;
  border-left: 5px solid var(--accent);
  font-size: clamp(20px, 2vw, 23px);
  font-weight: 500;
  line-height: 1.5;
}
.prose blockquote p + p { margin-top: .7em; }
.prose figure { margin: 1.6em 0; }
.prose figure img,
.prose > img { width: 100%; height: auto; }
.prose figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.prose hr {
  width: 64px;
  height: 2px;
  margin: 2em 0;
  border: 0;
  background: var(--accent);
}
.prose code {
  padding: .1em .35em;
  background: var(--raised);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
}
.prose pre {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow-x: auto;
  font-size: 15px;
  line-height: 1.55;
}
.prose pre code { padding: 0; background: none; }

.source-box {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
.source-box a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--field-line);
  text-underline-offset: .2em;
}
.source-box a:hover { color: var(--accent); text-decoration-color: currentColor; }

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
}
.share-title {
  font-size: 14px;
  font-weight: 700;
  font-stretch: 95%;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.share-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.share-list li { display: flex; }
.share-list li[hidden] { display: none; }
.share-btn {
  --c: 8px;
  --edge: var(--field-line);
  --fill: var(--bg);
  position: relative;
  isolation: isolate;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: transform .18s var(--ease);
}
.share-btn::before,
.share-btn::after { content: ''; position: absolute; z-index: -1; }
.share-btn::before { inset: 0; background: var(--edge); }
.share-btn::after { inset: 1px; background: var(--fill); }
.share-btn:hover { --edge: var(--accent); color: var(--accent); }
.share-btn:active { transform: translateY(1px); }
.share-copy.is-copied { --edge: var(--accent); --fill: var(--accent); color: var(--on-accent); }

/* Липка колонка «Найчитаніше» праворуч від статті. */
.article-rail { display: none; }
@media (min-width: 1100px) {
  .article-rail {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 28px);
    padding-top: 18px;
    border-top: 2px solid var(--accent);
  }
  .article-rail .top-num { font-size: 40px; }
  .article-rail .top-list li { grid-template-columns: 40px minmax(0, 1fr); }
  .article-rail .top-title { font-size: 16px; }
}

/* «Читайте також»: горизонтальна смуга карток. */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 80%);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.strip > * { scroll-snap-align: start; }
@media (min-width: 768px) {
  .strip { grid-auto-columns: minmax(280px, 44%); gap: 28px; }
}
@media (min-width: 1100px) {
  .strip {
    grid-auto-columns: minmax(0, 1fr);
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }
  .strip-1 { grid-auto-columns: minmax(0, 1fr); }
}
.strip-1 { grid-auto-columns: 100%; }

/* ---------- Пошук ---------- */

.search-page { max-width: 920px; }
.search-title {
  margin-top: clamp(18px, 3vw, 36px);
  font-size: clamp(44px, 10vw, 120px);
  font-weight: 800;
  font-stretch: 100%;
  line-height: .9;
  text-transform: uppercase;
}
.search-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 28px;
}
.search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.search-row input { flex: 1 1 260px; }
.search-hint {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.results { margin-top: 40px; }
.results-count {
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}
.results-count b { color: var(--text); font-weight: 600; }
.results .rows { margin-top: 22px; }

/* ---------- Службова сторінка ---------- */

.static-page { max-width: 760px; }
.static-title {
  margin-top: clamp(18px, 3vw, 36px);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 800;
  font-stretch: 92%;
  line-height: 1;
}
.static-page .prose { margin-top: 28px; }

/* ---------- 404 ---------- */

.err {
  padding-top: clamp(24px, 5vw, 64px);
}
.err-code {
  font-family: var(--font-display);
  font-size: clamp(120px, 28vw, 300px);
  font-weight: 800;
  font-stretch: 100%;
  line-height: .8;
  letter-spacing: -0.02em;
  color: var(--text);
}
.err-code span { color: var(--accent); }
.err-title {
  margin-top: clamp(20px, 3vw, 32px);
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  font-stretch: 90%;
}
.err-text {
  margin-top: 14px;
  max-width: 54ch;
  color: var(--muted);
  font-size: 17px;
}
.err .actions { margin-top: 26px; }

.cards {
  display: grid;
  gap: 36px 28px;
}
@media (min-width: 768px) {
  .cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Футер ---------- */

.site-footer {
  margin-top: clamp(72px, 9vw, 128px);
  padding-block: clamp(40px, 5vw, 64px) 28px;
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.footer-mark {
  display: inline-flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 22px);
  font-family: var(--font-display);
  font-size: clamp(56px, 13vw, 176px);
  font-weight: 800;
  font-stretch: 100%;
  line-height: .82;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text);
}
.footer-mark .logo-post {
  width: clamp(18px, 2.4vw, 34px);
  height: .9em;
}
.footer-grid {
  display: grid;
  gap: 32px;
  margin-top: clamp(32px, 4vw, 52px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .footer-grid { grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); }
  .footer-grid.has-tg { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, .8fr)) minmax(0, 1.2fr); }
}
.footer-about p {
  max-width: 44ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.footer-nav h2,
.footer-tg h2 {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 700;
  font-stretch: 95%;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-nav ul { list-style: none; }
.footer-nav li + li { margin-top: 6px; }
.footer-nav a {
  display: inline-block;
  padding-block: 3px;
  font-size: 15.5px;
  font-weight: 500;
}
.footer-nav a:hover { color: var(--accent); }
.footer-tg p { color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.footer-tg p b { color: var(--text); font-weight: 600; }
.footer-tg .btn-ghost { --fill: var(--surface); }
/* На головній Telegram уже є в смузі підписки: без другого такого самого заклику. */
.page-home .footer-tg { display: none; }
.page-home .footer-grid.has-tg { grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)); }
@media (max-width: 1099px) {
  .page-home .footer-grid.has-tg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .page-home .footer-grid.has-tg { grid-template-columns: minmax(0, 1fr); }
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Кукі ---------- */

.cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 460px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  box-shadow: 0 18px 48px -18px rgb(14 15 17 / .35);
  font-size: 14.5px;
  line-height: 1.5;
}
.cookie[hidden] { display: none; }
.cookie a { text-decoration: underline; text-underline-offset: .2em; }
.cookie a:hover { color: var(--accent); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie .btn { min-height: 44px; padding-inline: 18px; font-size: 14px; }
.cookie .btn-ghost { --fill: var(--surface); }

/* ---------- Скелетони SPA-роутера ---------- */

.skel {
  display: block;
  background: var(--raised);
}
.skel-line { height: 14px; margin-top: 12px; }
.skel-kicker { width: 96px; height: 12px; }
.skel-title { height: 30px; margin-top: 12px; }
.skel-big { height: clamp(40px, 8vw, 110px); margin-top: 28px; width: 55%; }
.skel-poster {
  margin-top: clamp(16px, 2.4vw, 32px);
  height: min(125vw, 72vh);
}
@media (min-width: 768px) {
  .skel-poster { height: min(52vw, 60vh); }
}
.skel-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
@media (min-width: 768px) {
  .skel-row { grid-template-columns: 248px minmax(0, 1fr); gap: 28px; }
}
.skel-tabs { display: flex; gap: 12px; margin-top: 28px; }
.skel-tabs .skel { width: 92px; height: 40px; }
.skel-two {
  display: grid;
  gap: 28px;
  margin-top: 56px;
}
@media (min-width: 900px) {
  .skel-two { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}
.w-90 { width: 90%; }
.w-75 { width: 75%; }
.w-60 { width: 60%; }
.w-40 { width: 40%; }

main.is-loading .skel { animation: skel-pulse 1.3s ease-in-out infinite alternate; }
@keyframes skel-pulse {
  from { opacity: 1; }
  to { opacity: .55; }
}

/* ---------- Рух ---------- */

/* Фото проявляються після завантаження (клас loaded ставить site.js). */
.js .frame img { opacity: 0; transition: opacity .45s ease, transform .7s var(--ease); }
.js .frame img.loaded { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .45s var(--ease), transform .45s var(--ease);
  }
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }

  /* Постер: повільний «наїзд» кадру при завантаженні. */
  .js .poster-media img:not(.loaded) { transform: scale(1.04); }
  .js .poster-media img.loaded { animation: poster-in 1.2s var(--ease) backwards; }
  @keyframes poster-in {
    from { transform: scale(1.04); }
    to { transform: scale(1); }
  }
}

/* Фото постера й обкладинка статті видимі одразу: це LCP-кадр. */
.js .poster-media img,
.js .article-cover img { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js .frame img { opacity: 1; }
  .card:hover .card-media img,
  .row:hover .row-media img,
  .poster:hover .poster-media img { transform: none; }
  .btn:hover, .btn:active,
  .page:active, .share-btn:active, .icon-btn:active { transform: none; }
}

/* ---------- Мобільна раскладка ---------- */

@media (max-width: 767px) {
  .poster { --c: 10px; }
  .poster-title { font-size: clamp(28px, 8cqw, 36px); }
  .poster-lead { font-size: 16px; }
  .card-title-lg { font-size: 25px; }
  .corner { padding-block: 26px 30px; }
  .top-num { font-size: 44px; }
  .top-list li { grid-template-columns: 44px minmax(0, 1fr); }
  .stream { --time-w: 48px; }
  .stream-item { column-gap: 30px; }
  .stream-time { font-size: 15px; }
  .stream-title { font-size: 17px; }
  .subscribe { margin-inline: calc(var(--gutter) * -1); }
  .footer-bottom { flex-direction: column; }
}
