/* =========================================================
   КВАРЦ — медіа мережа. Стилі сайту.
   Палітра з брендбуку: глухий чорний, кварцовий сірий,
   теплий кремовий, стриманий охристий.
   ========================================================= */

@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-italic.woff2') format('woff2');
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* бренд */
  --black: #1c1c1d;
  --quartz: #8c8b88;
  --cream: #ede4d5;
  --ochre: #d6b07c;

  /* інтерфейс */
  --paper: #f6f1e8;
  --paper-deep: #efe7da;
  --ink: #1c1c1d;
  --ink-soft: #45423f;
  --muted: #696560;
  --line: #dcd2c2;
  --line-strong: #b9ae9c;
  --accent: #8a5f2a; /* охра, затемнена для читабельного тексту */

  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;

  --container: 1320px;
  --feed-w: 340px;
  --col-gap: 44px;
  --urgent: #b0412b; /* лише для позначки «Терміново» */
  --narrow: 720px;
  --wide: 1040px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 2px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- База ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'kern', 'liga';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

main:focus {
  outline: none;
}

::selection {
  background: var(--ochre);
  color: var(--black);
}

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

.container--narrow {
  max-width: calc(var(--narrow) + 2 * var(--gutter));
}

.container--wide {
  max-width: calc(var(--wide) + 2 * var(--gutter));
}

.visually-hidden {
  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: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--black);
  color: var(--cream);
  font-size: 14px;
}

.skip-link:focus {
  top: 16px;
}

.muted {
  color: var(--muted);
}

.icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.icon--sm {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -2px;
}

.emblem {
  width: auto;
  height: 48px;
  color: currentColor;
}

/* ---------- Логотип ---------- */

.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.wordmark__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 3.2vw, 42px);
  letter-spacing: 0.035em;
  padding-left: 0.035em;
}

.wordmark__sub {
  margin-top: 6px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(8.5px, 0.8vw, 10.5px);
  letter-spacing: 0.46em;
  padding-left: 0.46em;
  text-transform: uppercase;
}

/* ---------- Верхня смуга з датою ---------- */

.topbar {
  background: var(--black);
  color: #cfc6b8;
  font-size: 12px;
  line-height: 1;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
}

.topbar__date {
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.topbar__links {
  display: flex;
  align-items: center;
  gap: 18px;
  overflow: hidden;
  white-space: nowrap;
}

.topbar__links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-block: 10px;
  font-weight: 600;
  transition: color 0.2s var(--ease);
}

.topbar__links a:hover {
  color: var(--ochre);
}

/* ---------- Смуга «Терміново» ---------- */

.breaking {
  background: var(--ochre);
  color: var(--black);
}

.breaking__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 46px;
}

.breaking__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 5px 10px;
  background: var(--black);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.breaking__title {
  flex: 1;
  min-width: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
}

.breaking__inner:hover .breaking__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breaking__time {
  flex: none;
  font-size: 13px;
  font-weight: 700;
}

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

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding-block: 14px 12px;
}

.site-header__start {
  display: flex;
  align-items: center;
}

.site-header__end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

.brand {
  display: block;
  padding: 4px 8px;
}

.header-link {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}

.header-link:hover,
.header-link.is-current {
  border-bottom-color: var(--ink);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -8px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
  transition: background-color 0.2s var(--ease);
}

.icon-btn:hover {
  background: var(--paper-deep);
}

.category-bar {
  border-top: 1px solid var(--line);
}

.category-bar__list {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 3vw, 36px);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.category-bar__list::-webkit-scrollbar {
  display: none;
}

.category-bar a {
  display: block;
  padding-block: 11px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.category-bar a:hover {
  color: var(--ink);
}

.category-bar a[aria-current='page'] {
  color: var(--ink);
  border-bottom-color: var(--ochre);
}

/* ---------- Меню (висувна панель) ---------- */

.site-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgb(28 28 29 / 0);
  transition: background-color 0.3s var(--ease);
}

.site-menu.is-open {
  background: rgb(28 28 29 / 0.55);
}

.site-menu__panel {
  height: 100%;
  width: min(440px, 92vw);
  overflow-y: auto;
  background: var(--paper);
  padding: 22px clamp(20px, 4vw, 36px) 40px;
  transform: translateX(-102%);
  transition: transform 0.35s var(--ease);
}

.site-menu.is-open .site-menu__panel {
  transform: none;
}

.site-menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.site-menu__emblem {
  height: 44px;
}

.site-menu__list {
  margin-top: 28px;
}

.site-menu__list a {
  display: block;
  padding-block: 9px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  border-bottom: 1px solid var(--line);
}

.site-menu__list a:hover {
  color: var(--accent);
}

/* ---------- Форма пошуку ---------- */

.search-form {
  display: flex;
  align-items: center;
  border-bottom: 1.5px solid var(--ink);
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  background: none;
  font-size: 20px;
  outline: none;
}

.search-form input::placeholder {
  color: var(--quartz);
}

.search-form input::-webkit-search-cancel-button {
  filter: grayscale(1);
}

.search-form button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
}

.search-form:focus-within {
  border-bottom-color: var(--accent);
}

/* ---------- Рубрика-«кікер», дати ---------- */

.kicker {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

a.kicker:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

time {
  font-variant-numeric: tabular-nums;
}

/* ---------- Зображення ---------- */

.media {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

a:hover .media img {
  transform: scale(1.025);
}

.media--placeholder {
  display: grid;
  place-items: center;
}

.media--placeholder.is-cream {
  background: var(--cream);
}

.media--placeholder.is-ochre {
  background: var(--ochre);
}

.media__emblem {
  height: 42%;
  max-height: 120px;
  color: rgb(28 28 29 / 0.28);
}

/* ---------- Сітка новинного сайту: основна колонка + стрічка праворуч ---------- */

.news-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--feed-w);
  gap: 0 var(--col-gap);
  align-items: start;
  margin-top: 28px;
}

.news-grid--home {
  grid-template-areas:
    'top feed'
    'rest feed';
  grid-template-rows: auto 1fr;
}

.news-grid--home .news-grid__top {
  grid-area: top;
  min-width: 0;
}

.news-grid--home > .feed {
  grid-area: feed;
}

.news-grid--home .news-grid__rest {
  grid-area: rest;
  min-width: 0;
}

.news-grid__main {
  min-width: 0;
}

/* ---------- Головна новина ---------- */

.lead {
  --lead-fs: clamp(26px, 3.1vw, 46px);
  --lead-overhang: calc(var(--lead-fs) * 0.88);
}

/* Фото і заголовок лежать в одній клітинці сітки; заголовок притиснутий донизу
   і зсунутий на один рядок нижче краю фото. */
.lead__link {
  display: grid;
  isolation: isolate;
  padding-bottom: var(--lead-overhang);
  background: var(--paper);
}

.lead__media,
.lead__title {
  grid-area: 1 / 1;
}

.lead__media {
  aspect-ratio: 16 / 9;
  min-height: 100%;
}

.lead__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgb(18 18 19 / 0.82) 0%,
    rgb(18 18 19 / 0.5) 26%,
    rgb(18 18 19 / 0) 58%
  );
  pointer-events: none;
}

/* Заголовок «виходить» за межі фото — як у макеті.
   Білий текст у режимі difference стає майже чорним на кремовому тлі. */
.lead__title {
  position: relative;
  z-index: 1;
  align-self: end;
  transform: translateY(var(--lead-overhang));
  padding-top: 0.4em;
  padding-inline: clamp(16px, 2.2vw, 28px);
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--lead-fs);
  line-height: 1.06;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: #fff;
  mix-blend-mode: difference;
}

.lead__meta,
.lead__excerpt {
  padding-inline: clamp(16px, 2.2vw, 28px);
}

.lead__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.lead__excerpt {
  margin-top: 8px;
  max-width: 68ch;
  font-size: 16.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.top-cards {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.card__link:hover .card__title,
.row__link:hover .row__title,
.cat-block__main a:hover .cat-block__title {
  text-decoration: underline;
  text-decoration-color: var(--ochre);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

/* ---------- Стрічка новин ---------- */

.feed {
  position: sticky;
  top: 16px;
  align-self: start;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  border-top: 3px solid var(--ink);
  background: var(--paper);
}

.feed__head {
  padding: 12px 0 10px;
  border-bottom: 1px solid var(--ink);
}

.feed__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.feed__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.feed__loading {
  padding: 14px 0;
  font-size: 13px;
  color: var(--muted);
}

.feed__date {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 0 6px;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.feed__item a {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 9px 4px 9px 0;
  border-bottom: 1px solid var(--line);
}

.feed__item time {
  padding-top: 1px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.feed__text {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.38;
  transition: color 0.15s var(--ease);
}

.feed__item a:hover .feed__text {
  color: var(--accent);
}

.feed__item.is-urgent .feed__text {
  font-weight: 800;
}

.feed__all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 16px;
  background: var(--black);
  color: var(--cream);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 0.2s var(--ease);
}

.feed__all:hover {
  background: #000;
  color: var(--ochre);
}

.live-dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--urgent);
}

.live-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--urgent);
  opacity: 0;
  animation: live-pulse 2.2s var(--ease) infinite;
}

@keyframes live-pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.badge-urgent {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px 1px;
  background: var(--urgent);
  color: #fff;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  vertical-align: 2px;
}

.card__meta .badge-urgent,
.row__meta .badge-urgent,
.lead__meta .badge-urgent,
.article__kicker .badge-urgent {
  margin-right: 0;
  vertical-align: 0;
}

/* ---------- Блоки та сітки ---------- */

.block {
  margin-top: clamp(40px, 5vw, 60px);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  margin-bottom: 22px;
  border-top: 3px solid var(--ink);
}

.section-head__title {
  font-family: var(--serif);
  font-size: clamp(26px, 2.4vw, 32px);
  font-weight: 600;
  line-height: 1.1;
}

.section-head--small {
  margin-bottom: 16px;
  padding-top: 10px;
}

.section-head--small .section-head__title {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head__link:hover {
  color: var(--accent);
}

.grid {
  display: grid;
  gap: 32px 24px;
}

.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Картка матеріалу ---------- */

.card {
  display: flex;
  flex-direction: column;
}

.card__link {
  display: block;
}

.card__media {
  aspect-ratio: 3 / 2;
}

.card__title {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(20px, 1.6vw, 23px);
  font-weight: 600;
  line-height: 1.16;
}

.card--compact .card__media {
  aspect-ratio: 16 / 10;
}

.card--compact .card__title {
  font-size: clamp(18px, 1.35vw, 20px);
}

.card__meta,
.row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.card__meta {
  margin-top: 12px;
}

.card__excerpt {
  margin-top: 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}

/* ---------- Блоки рубрик ---------- */

.cat-grid {
  display: grid;
  gap: 40px 32px;
}

.cat-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cat-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cat-block {
  min-width: 0;
}

/* Непарний останній блок розтягується на всю ширину: фото ліворуч, заголовки праворуч */
.cat-grid--2 > .cat-block:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 32px;
}

.cat-grid--2 > .cat-block:last-child:nth-child(odd) > .section-head {
  grid-column: 1 / -1;
}

.cat-grid--2 > .cat-block:last-child:nth-child(odd) > .headlines {
  margin-top: 0;
}

.cat-block__main a {
  display: block;
}

.cat-block__media {
  aspect-ratio: 16 / 10;
}

.cat-block__title {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(20px, 1.6vw, 23px);
  font-weight: 600;
  line-height: 1.16;
}

.headlines {
  margin-top: 14px;
}

.headline a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.headline time {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.headline__title {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.38;
  transition: color 0.15s var(--ease);
}

.headline a:hover .headline__title {
  color: var(--accent);
}

/* ---------- Темна смуга (Колонки) ---------- */

.band {
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: clamp(44px, 6vw, 72px);
  background: var(--black);
  color: var(--cream);
}

.band .section-head {
  border-top-color: rgb(237 228 213 / 0.5);
}

.band__intro {
  max-width: 60ch;
  margin: -12px 0 28px;
  color: #b9b2a6;
}

.card--dark .card__excerpt {
  color: #b9b2a6;
}

.card--dark .card__meta {
  color: #a39f98;
}

.card--dark .kicker {
  color: var(--ochre);
}

.card--dark .media--placeholder.is-cream {
  background: #2a2a2b;
}

.card--dark .media--placeholder.is-ochre {
  background: #3a3227;
}

.card--dark .media__emblem {
  color: rgb(237 228 213 / 0.35);
}

/* ---------- Списки (рубрики, усі матеріали) ---------- */

.list-page .page-head {
  margin-bottom: 26px;
  padding-bottom: 18px;
}

.page-head {
  margin-bottom: clamp(28px, 4vw, 44px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}

.page-head__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.page-head__title {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(38px, 4.6vw, 60px);
  font-weight: 600;
  line-height: 1.02;
}

.page-head__lead {
  max-width: 60ch;
  margin-top: 14px;
  font-size: 18px;
  color: var(--ink-soft);
}

.page-head__page {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.rows {
  display: grid;
}

.row + .row {
  border-top: 1px solid var(--line);
}

.row__link {
  display: grid;
  grid-template-columns: minmax(160px, 260px) 1fr;
  gap: clamp(16px, 2.4vw, 28px);
  padding-block: 22px;
}

.row:first-child .row__link {
  padding-top: 0;
}

.row__media {
  aspect-ratio: 3 / 2;
}

.row__title {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.15;
}

.row__excerpt {
  margin-top: 8px;
  font-size: 15px;
  max-width: 64ch;
  color: var(--ink-soft);
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
}

.pagination ol {
  display: flex;
  gap: 4px;
}

.pagination li > * {
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding-inline: 6px;
}

.pagination a:hover {
  color: var(--accent);
}

.pagination [aria-current='page'] {
  background: var(--black);
  color: var(--cream);
}

.pagination__step:last-child {
  justify-self: end;
}

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

.article--page {
  padding-top: clamp(32px, 5vw, 56px);
}

.article__header {
  max-width: 860px;
}

.article__kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.article__title {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.005em;
}

.article--page .article__title {
  margin-top: 0;
}

.article__lead {
  max-width: 760px;
  margin-top: 18px;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-top: 22px;
  padding-block: 14px;
  border-block: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.article__meta > * + *::before {
  content: '·';
  margin-inline: 12px;
  color: var(--line-strong);
}

.article__cover {
  margin: 28px 0 0;
}

.article__cover img {
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
}

.article__cover figcaption,
.prose figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.prose {
  margin-top: clamp(26px, 3vw, 36px);
  font-size: 18px;
  line-height: 1.72;
}

.article .prose,
.article__footer {
  max-width: 720px;
}

.article--page .prose,
.article--page .article__footer {
  max-width: none;
}

.prose > * + * {
  margin-top: 1.15em;
}

.article:not(.article--page) .prose > p:first-child::first-letter {
  float: left;
  margin: 0.08em 0.12em 0 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 4.1em;
  line-height: 0.82;
  color: var(--ink);
}

.prose h2 {
  margin-top: 1.6em;
  font-family: var(--serif);
  font-size: clamp(28px, 2.8vw, 34px);
  line-height: 1.15;
}

.prose h3,
.prose h4 {
  margin-top: 1.6em;
  font-family: var(--serif);
  font-size: clamp(23px, 2.2vw, 27px);
  line-height: 1.2;
}

.prose h2 + *,
.prose h3 + *,
.prose h4 + * {
  margin-top: 0.6em;
}

.prose a {
  text-decoration: underline;
  text-decoration-color: var(--ochre);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.18em;
  transition: color 0.2s var(--ease);
}

.prose a:hover {
  color: var(--accent);
}

.prose strong {
  font-weight: 700;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose ul {
  list-style: none;
}

.prose ul > li {
  position: relative;
}

.prose ul > li::before {
  content: '';
  position: absolute;
  left: -1.05em;
  top: 0.72em;
  width: 6px;
  height: 6px;
  background: var(--ochre);
  transform: rotate(45deg);
}

.prose ol {
  list-style: decimal;
}

.prose ol > li::marker {
  font-weight: 700;
  color: var(--accent);
}

.prose li + li {
  margin-top: 0.4em;
}

.prose blockquote {
  margin-inline: 0;
  padding: 0.2em 0 0.2em 1.2em;
  border-left: 2px solid var(--ochre);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.45em;
  line-height: 1.35;
  color: var(--ink);
}

.prose blockquote > * + * {
  margin-top: 0.6em;
}

.prose hr {
  width: 64px;
  height: 0;
  margin-block: 2.4em;
  margin-inline: auto;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

.prose img {
  width: 100%;
}

.prose figure {
  margin-inline: 0;
}

.prose code {
  padding: 0.1em 0.35em;
  background: var(--paper-deep);
  font-size: 0.88em;
}

.prose pre {
  overflow-x: auto;
  padding: 16px;
  background: var(--black);
  color: var(--cream);
  font-size: 14px;
  line-height: 1.6;
}

.prose pre code {
  padding: 0;
  background: none;
}

.table-wrap {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  font-weight: 700;
  border-bottom-color: var(--ink);
}

.embed--video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.embed--video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article__footer {
  margin-top: 40px;
}

.article__source {
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--muted);
}

.article__source a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ochre);
  text-underline-offset: 3px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tags a,
.tags span {
  display: inline-block;
  padding: 5px 12px;
  background: var(--paper-deep);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 0.2s var(--ease);
}

.tags a:hover {
  background: var(--cream);
}

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.share__label {
  margin-right: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.share a,
.share__copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.share a:hover,
.share__copy:hover {
  background: var(--black);
  border-color: var(--black);
  color: var(--cream);
}

.related {
  padding-top: 4px;
}

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

.search-page {
  padding-top: clamp(32px, 5vw, 56px);
}

.search-page .page-head {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 16px;
}

.search-status {
  margin: 18px 0 8px;
  font-size: 14px;
}

.search-page .row__link {
  grid-template-columns: 1fr;
}

.search-page .row__media {
  display: none;
}

/* ---------- Порожні стани, кнопки ---------- */

.empty-state {
  max-width: 640px;
  padding-block: clamp(64px, 10vw, 120px);
  text-align: center;
}

.empty-state__emblem {
  height: 88px;
  margin: 0 auto 28px;
  color: var(--accent);
}

.empty-state h1 {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  line-height: 1.08;
}

.empty-state p {
  margin-top: 14px;
  color: var(--ink-soft);
}

.empty-state a:not(.button) {
  text-decoration: underline;
  text-decoration-color: var(--ochre);
}

.empty-state__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px !important;
}

.button {
  display: inline-block;
  padding: 12px 26px;
  border: 1px solid var(--black);
  background: var(--black);
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.button:hover {
  background: transparent;
  color: var(--black);
}

.button--ghost {
  background: transparent;
  color: var(--black);
}

.button--ghost:hover {
  background: var(--black);
  color: var(--cream);
}

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

.site-footer {
  margin-top: clamp(64px, 9vw, 112px);
  background: var(--black);
  color: var(--cream);
}

.band + .site-footer,
main:has(> .band:last-child) + .site-footer {
  margin-top: 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px 28px;
  padding-block: clamp(48px, 6vw, 72px) 40px;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.site-footer__emblem {
  height: 56px;
  color: var(--ochre);
}

.site-footer .wordmark {
  align-items: flex-start;
}

.site-footer .wordmark__sub {
  padding-left: 0;
}

.site-footer__tagline {
  margin-top: 22px;
  max-width: 30ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.3;
  color: var(--cream);
}

.motto {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ochre);
}

.motto span + span::before {
  content: '◆';
  margin-right: 12px;
  font-size: 7px;
  vertical-align: 2px;
  color: rgb(214 176 124 / 0.6);
}

.site-footer__title {
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #a39f98;
}

.site-footer__col li + li {
  margin-top: 8px;
}

.site-footer__col a {
  font-size: 15px;
  color: var(--cream);
  transition: color 0.2s var(--ease);
  overflow-wrap: anywhere;
}

.site-footer__col a:hover {
  color: var(--ochre);
}

.site-footer__bottom {
  margin: 0;
  padding-block: 20px 28px;
  border-top: 1px solid rgb(237 228 213 / 0.14);
  font-size: 13px;
  color: #a39f98;
}

/* ---------- Адаптивність ---------- */

@media (max-width: 1280px) {
  :root {
    --feed-w: 300px;
    --col-gap: 32px;
  }
}

/* Планшети й телефони: одна колонка, стрічка — одразу після головного */
@media (max-width: 1100px) {
  .news-grid,
  .news-grid--home {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'top'
      'feed'
      'rest';
    grid-template-rows: auto;
  }

  .feed {
    position: static;
    max-height: none;
    margin-top: 40px;
  }

  .feed__scroll {
    overflow: visible;
  }

  .feed__date {
    position: static;
  }

  .feed__item.is-extra,
  .feed__day.is-extra {
    display: none;
  }

  .grid--4,
  .cat-grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--3 > :nth-child(3):last-child {
    display: none;
  }

  .cat-grid--2,
  .cat-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }

  .cat-grid--2 > .cat-block:last-child:nth-child(odd) {
    display: block;
  }

  .cat-grid--2 > .cat-block:last-child:nth-child(odd) > .headlines {
    margin-top: 14px;
  }

  .grid--2.grid,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar__links a:not(:first-child):not(:last-child) {
    display: none;
  }

  .breaking__inner {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-block: 10px;
  }

  .breaking__title {
    flex-basis: 100%;
    order: 3;
  }

  .site-header__bar {
    padding-block: 12px 10px;
  }

  .header-link {
    display: none;
  }

  .category-bar__list {
    justify-content: flex-start;
  }

  .news-grid {
    margin-top: 20px;
  }

  .news-grid--home {
    margin-top: 0;
  }

  .news-grid--home .lead {
    margin-inline: calc(-1 * var(--gutter));
  }

  .lead__media {
    aspect-ratio: 4 / 3.4;
  }

  .lead__meta,
  .lead__excerpt,
  .lead__title {
    padding-inline: var(--gutter);
  }

  .top-cards {
    margin-top: 22px;
    padding-top: 0;
    border-top: 0;
  }

  .grid--2.grid,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .grid--3 > :nth-child(3):last-child {
    display: flex;
  }

  /* Компактні картки на телефоні — рядком: текст ліворуч, мініатюра праворуч */
  .grid--3.top-cards,
  .related .grid--3 {
    gap: 0;
  }

  .card--compact .card__link,
  .news-grid__rest .grid--3 > .card:not(:first-child) .card__link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    grid-template-areas:
      'meta media'
      'title media';
    grid-template-rows: auto 1fr;
    column-gap: 14px;
    padding-block: 14px;
    border-top: 1px solid var(--line);
  }

  .card--compact .card__media,
  .news-grid__rest .grid--3 > .card:not(:first-child) .card__media {
    grid-area: media;
    aspect-ratio: 1;
  }

  .card--compact .card__meta,
  .news-grid__rest .grid--3 > .card:not(:first-child) .card__meta {
    grid-area: meta;
    margin-top: 0;
  }

  .card--compact .card__title,
  .news-grid__rest .grid--3 > .card:not(:first-child) .card__title {
    grid-area: title;
    font-size: 19px;
  }

  .news-grid__rest .grid--3 {
    gap: 0;
  }

  .news-grid__rest .grid--3 > .card:first-child {
    padding-bottom: 18px;
  }

  .news-grid__rest .grid--3 > .card:not(:first-child) .card__excerpt {
    display: none;
  }

  .row__link {
    grid-template-columns: 1fr 104px;
    gap: 14px;
    padding-block: 16px;
  }

  .row__media {
    order: 2;
    aspect-ratio: 1;
  }

  .row__title {
    font-size: 20px;
  }

  .row__excerpt {
    display: none;
  }

  .pagination {
    grid-template-columns: 1fr 1fr;
  }

  .pagination ol {
    display: none;
  }

  .prose {
    font-size: 17px;
  }

  .article__meta {
    gap: 4px 16px;
  }

  .article__meta > * + *::before {
    content: none;
  }

  .article__cover {
    margin-inline: calc(-1 * var(--gutter));
  }

  .article__cover figcaption {
    padding-inline: var(--gutter);
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 420px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .share,
  .related,
  .site-menu,
  .topbar,
  .breaking,
  .feed {
    display: none !important;
  }

  body {
    background: #fff;
  }
}
