/* Kurier IT: ostry, nowoczesny polski dziennik technologiczny.
   Paleta: papier #ffffff, atrament #17191d, chlodna szarosc #5b6570, akcent #d3232a.
   Radius 0, twarde krawedzie, grube linie miedzy sekcjami. */

:root {
  --paper: #ffffff;
  --ink: #17191d;
  --gray: #5b6570;
  --gray-soft: #f2f3f5;
  --hairline: #e0e3e7;
  --accent: #d3232a;
  --accent-dark: #a91b21;
  --font-display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --font-text: "Work Sans", Arial, sans-serif;
  --rule: 3px solid var(--ink);
  --skel-base: rgba(23, 25, 29, 0.07);
  --skel-sheen: rgba(255, 255, 255, 0.55);
  --skel-radius: 0;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  /* Страховка от горизонтальной прокрутки: clip, а не hidden, чтобы не ломать
     липкие и абсолютно спозиционированные элементы (мобильное меню, cookie-бар). */
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.6;
  font-optical-sizing: auto;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Заголовки и подписи из базы могут содержать неразрывные куски (домены,
   названия версий). Перенос включается только для слова, которое иначе не
   влезает в колонку, — обычная вёрстка при этом не меняется. */
h1, h2, h3, h4, .feed-title, .mr-list a, .card-excerpt, .lead-excerpt {
  overflow-wrap: break-word;
}

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

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; z-index: 200; font-weight: 600;
}
.skip-link:focus-visible { left: 0; }

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

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper);
  font-family: var(--font-text); font-weight: 600; font-size: 15px;
  border: 2px solid var(--ink); border-radius: 0;
  padding: 11px 22px; min-height: 44px;
  cursor: pointer; transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:active { transform: translateY(1px); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.btn-line {
  background: transparent; color: var(--ink);
  border: 2px solid var(--ink); margin-top: auto;
}
.btn-line:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- header ---------- */

.topbar { border-bottom: 1px solid var(--hairline); }
.topbar-in {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 36px; font-size: 13px; color: var(--gray);
}
/* Служебных ссылок в шапке может оказаться больше, чем в прототипе (список
   берётся из базы): разрешаем перенос, иначе строка распирает контейнер. */
.topbar-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.topbar-nav a { padding: 8px 0; font-weight: 500; }
.topbar-nav a:hover { color: var(--accent); }

.masthead { border-bottom: var(--rule); position: relative; }
.masthead-in {
  display: flex; align-items: center; gap: 36px;
  min-height: 76px;
}

.logo {
  font-family: var(--font-display); font-weight: 800;
  font-size: 30px; letter-spacing: -0.02em; line-height: 1;
  display: inline-flex; align-items: baseline; gap: 6px;
}
.logo-dot { color: var(--accent); }

/* Рубрик в меню может быть больше четырёх (берутся из базы). Без переноса
   строка меню не сжимается и выталкивает шапку за край окна. */
.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav a {
  display: inline-block; padding: 26px 14px;
  font-weight: 600; font-size: 15.5px;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a.is-active { color: var(--accent); border-bottom-color: var(--accent); }

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

.nav-search {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 15px;
  padding: 10px 14px; min-height: 44px;
  border: 2px solid var(--ink);
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-search:hover { background: var(--ink); color: var(--paper); }
.nav-search .ph { font-size: 18px; }

.burger {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 2px solid var(--ink); border-radius: 0;
  color: var(--ink); font-size: 22px; cursor: pointer;
}
.burger:hover { background: var(--ink); color: var(--paper); }

/* ---------- kickers, meta, section heads ---------- */

.kicker {
  font-size: 12.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.09em; color: var(--accent);
}
.kicker a:hover { text-decoration: underline; text-underline-offset: 3px; }

.card-meta, .art-date {
  font-size: 13px; color: var(--gray); font-weight: 500;
}
.msep { margin: 0 7px; color: var(--hairline); }

.sec-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  border-top: var(--rule);
  padding-top: 14px; margin-bottom: 26px;
}
.sec-title {
  font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -0.015em;
  /* Рядом стоит ссылка «все» с white-space: nowrap, поэтому заголовку нужно
     разрешить сжиматься: иначе пара распирает шапку секции на узких экранах. */
  min-width: 0;
}
.sec-title a:hover, .lead-title a:hover, .card-title a:hover, .mini-title a:hover,
.work-title a:hover, .mo-title a:hover, .ev-title a:hover, .lead-card-title a:hover {
  color: var(--accent);
}
.sec-title a, .sec-title span { position: relative; padding-left: 22px; display: inline-block; }
.sec-title a::before, .sec-title span::before {
  content: ""; position: absolute; left: 0; top: 0.28em;
  width: 12px; height: 12px; background: var(--accent);
}
.sec-more {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 600; color: var(--gray);
  white-space: nowrap; padding: 6px 0;
}
.sec-more:hover { color: var(--accent); }
.sec-more .ph { font-size: 16px; transition: transform 0.18s ease; }
.sec-more:hover .ph { transform: translateX(3px); }

.home-sec { margin-top: 48px; }

/* ---------- hero ---------- */

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px;
  padding-top: 30px;
}
/* Дорожка minmax(0, 1fr) сама по себе не спасает: у элемента сетки
   min-width: auto, и он всё равно распирается содержимым (картинки, длинные
   слова в заголовках). Явный min-width: 0 запрещает это. */
.hero-main { min-width: 0; }

.lead-story .kicker { margin-bottom: 10px; }
.lead-media { display: block; }
.lead-title {
  font-size: clamp(28px, 4.2vw, 46px); font-weight: 800;
  letter-spacing: -0.02em; margin: 16px 0 12px;
}
.lead-excerpt { color: var(--gray); font-size: 17px; max-width: 62ch; margin-bottom: 10px; }

.hero-minis {
  /* minmax(0, ...) обязателен: чистый 1fr это minmax(auto, 1fr), такая дорожка
     не сжимается уже своего содержимого — миниатюра распирает одну колонку,
     а соседняя схлопывается в столбик по одному слову. */
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px;
  border-top: 1px solid var(--hairline);
  margin-top: 26px; padding-top: 22px;
}
.mini-story { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; }
/* Текстовый блок анонса должен уметь сжиматься внутри своей дорожки. */
.mini-story > * { min-width: 0; }
/* Если у материала нет картинки, единственный блок текста не должен попадать
   в узкую колонку миниатюры — растягиваем его на всю ширину строки. */
.mini-story > :only-child { grid-column: 1 / -1; }
.mini-thumb { display: block; }
.mini-title { font-size: 17.5px; font-weight: 700; margin: 6px 0 8px; }

/* feed */

.hero-side { border-left: var(--rule); padding-left: 26px; display: flex; flex-direction: column; }
.side-title {
  font-family: var(--font-display); font-size: 19px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.feed-head { padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.feed { flex: 1; }
.feed-item { border-bottom: 1px solid var(--hairline); }
.feed-item a { display: block; padding: 13px 0; transition: transform 0.15s ease; }
.feed-item a:hover { transform: translateX(4px); }
.feed-item a:hover .feed-title { color: var(--accent); }
.feed-when {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums; margin-bottom: 4px;
}
.badge-pilne {
  background: var(--accent); color: var(--paper);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 2px 7px;
}
.feed-title { display: block; font-weight: 600; font-size: 15px; line-height: 1.35; }
.side-all {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 16px; font-weight: 600; font-size: 14px;
}
.side-all:hover { color: var(--accent); }

/* ---------- cards ---------- */

/* Карточка почти всегда лежит в дорожке сетки: min-width: 0 не даёт обложке
   или длинному слову в заголовке распереть колонку. */
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { display: block; }
.card-body { padding-top: 14px; display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.card-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.card-excerpt { color: var(--gray); font-size: 14.5px; line-height: 1.55; }
.card-body .card-meta { margin-top: auto; }

/* Две карточки с обложками: без minmax(0, ...) колонка с более широкой
   картинкой съедает соседнюю. */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.duo > .card + .card { border-left: 1px solid var(--hairline); padding-left: 40px; }
.duo .card-title { font-size: clamp(21px, 2.4vw, 27px); }

.grid-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 32px; }
.grid-cards.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- opinie ---------- */

.opinie {
  margin-top: 48px; background: var(--gray-soft);
  border-top: var(--rule);
  padding: 0 0 44px;
}
.opinie .sec-head { border-top: 0; padding-top: 34px; }
.op-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.op-card { display: flex; flex-direction: column; min-width: 0; }
.op-avatar { width: 56px; height: 56px; margin-bottom: 14px; }
.op-quote { margin: 0 0 14px; flex: 1; }
.op-quote p {
  font-family: var(--font-display); font-weight: 600;
  font-size: 18.5px; line-height: 1.3; letter-spacing: -0.01em;
}
.op-quote a { border-bottom: 2px solid transparent; transition: color 0.15s ease; }
.op-quote a:hover { color: var(--accent); }
.op-name { font-weight: 700; font-size: 14px; }
.op-role { font-size: 13px; color: var(--gray); }

/* ---------- praca rows + sidebar ---------- */

.split-side { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; }

/* Левая колонка листинга и сам список — элементы сетки, им нужен min-width: 0,
   иначе миниатюры и длинные заголовки распирают колонку на широких экранах. */
.listing-mainc { min-width: 0; }
.worklist { display: flex; flex-direction: column; min-width: 0; }
.work-row {
  display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 22px;
  padding: 22px 0; border-bottom: 1px solid var(--hairline);
}
/* Материал без обложки: единственный текстовый блок занимает всю строку,
   а не узкую колонку под миниатюру. */
.work-row > :only-child { grid-column: 1 / -1; }
.worklist .work-row:first-child { padding-top: 0; }
.work-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.work-title { font-size: 21px; font-weight: 700; }
.work-body .card-meta { margin-top: auto; }

.sidebar { border-left: 1px solid var(--hairline); padding-left: 32px; }
.mostread .side-title { padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.mr-list { counter-reset: none; }
.mr-list li {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px;
  padding: 13px 0; border-bottom: 1px solid var(--hairline);
}
.mr-num {
  font-family: var(--font-display); font-weight: 800; font-size: 26px;
  line-height: 1; color: var(--accent);
}
/* Ссылка — элемент сетки рядом с номером: без min-width: 0 длинный заголовок
   вылезает за колонку сайдбара. */
.mr-list a { font-weight: 600; font-size: 14.5px; line-height: 1.35; display: block; min-width: 0; }
.mr-list a:hover { color: var(--accent); }

/* ---------- mosaic ---------- */

.mosaic { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; }
/* Обеим колонкам мозаики нужен min-width: 0: в левой лежит крупная обложка. */
.mosaic > * { min-width: 0; }
.mo-feature .card-title { font-size: clamp(22px, 2.6vw, 30px); }
.mo-list { display: flex; flex-direction: column; border-left: 1px solid var(--hairline); padding-left: 40px; }
.mo-mini { padding: 0 0 22px; }
.mo-mini + .mo-mini { padding-top: 22px; border-top: 1px solid var(--hairline); }
.mo-mini .kicker { margin-bottom: 8px; }
.mo-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.mo-mini .card-excerpt { margin-bottom: 8px; }

/* ---------- wydarzenia ---------- */

.ev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.ev-card {
  border: 2px solid var(--ink);
  padding: 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ev-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--accent); }
.ev-date {
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
}
.ev-title { font-size: 22px; font-weight: 700; }
.ev-cta { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ev-cta .card-excerpt { color: #aeb6bd; }
.ev-cta .btn-line { color: var(--paper); border-color: var(--paper); margin-top: 6px; }
.ev-cta .btn-line:hover { background: var(--paper); color: var(--ink); }
.ev-cta:hover { box-shadow: 6px 6px 0 var(--accent); }

/* ---------- newsletter ---------- */

.newsletter-band {
  margin-top: 56px; border-top: var(--rule);
  background: var(--gray-soft);
  padding: 46px 0 54px;
}
.nl-wrap { max-width: 620px; text-align: left; }
.nl-title { font-size: clamp(26px, 3vw, 34px); font-weight: 800; margin-bottom: 10px; }
.nl-text { color: var(--gray); margin-bottom: 20px; max-width: 52ch; }
.nl-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.nl-row { display: flex; gap: 10px; }
.nl-row input {
  flex: 1; min-width: 0; min-height: 44px;
  border: 2px solid var(--ink); border-radius: 0;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-text); font-size: 15px; padding: 10px 14px;
}
.nl-row input::placeholder { color: #767f89; }
.nl-row input:focus-visible { outline-offset: 0; }
.nl-success { font-weight: 600; padding: 12px 0; }
.nl-success .ph { color: var(--accent); margin-right: 8px; }

.newsletter-box { margin-top: 34px; }
.newsletter-box .side-title { padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }
.newsletter-box .nl-text { font-size: 14px; margin: 12px 0 14px; }
.newsletter-box .nl-row { flex-direction: column; }

/* ---------- footer ---------- */

.site-footer { margin-top: 64px; border-top: var(--rule); }
.foot-top {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px;
  padding: 44px 20px 36px;
}
.foot-logo { font-size: 26px; margin-bottom: 12px; display: inline-flex; }
.foot-brand p:not(.logo) { color: var(--gray); font-size: 14.5px; max-width: 34ch; }
/* Сетка колонок подвала сама лежит в дорожке minmax(0, 1fr) — ей тоже нужен
   min-width: 0, иначе длинные названия рубрик распирают подвал. */
.foot-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; min-width: 0; }
.foot-col h3 { font-size: 15px; font-weight: 800; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.foot-col h3 a:hover { color: var(--accent); }
.foot-col li { margin-bottom: 8px; }
.foot-col ul a { font-size: 14px; color: var(--gray); }
.foot-col ul a:hover { color: var(--accent); }
.foot-bottom { border-top: 1px solid var(--hairline); }
.foot-bottom-in {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 16px; padding-bottom: 18px;
  font-size: 13px; color: var(--gray);
}

/* ---------- listings ---------- */

.page-listing-in, .art-wrap, .static-wrap, .search-wrap { padding-top: 22px; }

.crumbs { font-size: 13px; color: var(--gray); margin-bottom: 18px; }
.crumbs a:hover { color: var(--accent); }
.crumbs span[aria-current] { color: var(--ink); font-weight: 600; }
.csep { margin: 0 8px; color: var(--hairline); }

.page-head { border-bottom: var(--rule); padding-bottom: 22px; margin-bottom: 30px; }
.page-head h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 800; letter-spacing: -0.02em; }
.page-desc { color: var(--gray); font-size: 17px; margin-top: 10px; max-width: 62ch; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 7px 16px; border: 2px solid var(--ink);
  font-weight: 600; font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}
.chip:hover { background: var(--ink); color: var(--paper); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.listing-cols { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; }

.lead-card {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px;
  padding-bottom: 30px; border-bottom: 1px solid var(--hairline); margin-bottom: 30px;
}
/* Обложка и текст — элементы сетки, им нужен min-width: 0; а если обложки нет,
   единственный блок занимает всю ширину, а не 1.2fr. */
.lead-card > * { min-width: 0; }
.lead-card > :only-child { grid-column: 1 / -1; }
.lead-card-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lead-card-title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; letter-spacing: -0.015em; }
.lead-card .lead-excerpt { font-size: 15.5px; }
.lead-card-body .card-meta { margin-top: auto; }

/* Страниц может быть много, а кнопки «Poprzednia/Następna» широкие: без
   переноса ряд пагинации вылезает за край на узких экранах. */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 38px; }
.pagination a, .pagination .is-disabled {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; min-height: 44px; padding: 0 12px;
  font-weight: 700; font-size: 15px;
  border: 2px solid var(--ink);
}
.pagination a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.pagination .is-disabled { color: #9aa2ab; border-color: var(--hairline); cursor: not-allowed; }
.pagination .pag-next { padding: 0 16px; }

.cross-sec { margin-top: 52px; }
.cross-sec .grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cross-sec .card-title { font-size: 18px; }

/* ---------- article ---------- */

.art { max-width: 820px; }
.art-head .kicker { margin-bottom: 12px; }
.art-title { font-size: clamp(30px, 4.6vw, 50px); font-weight: 800; letter-spacing: -0.02em; }
.art-lead { font-size: 19px; line-height: 1.55; color: var(--gray); margin-top: 16px; max-width: 66ch; }

.art-meta {
  display: flex; align-items: center; gap: 14px;
  margin-top: 22px; padding: 14px 0;
  border-top: var(--rule); border-bottom: 1px solid var(--hairline);
}
.art-ava { width: 48px; height: 48px; flex: none; }
/* Блок с именем автора и датой — flex-элемент: без min-width: 0 длинное имя
   или подпись распирают строку меты. */
.art-meta > div, .author-box > div { min-width: 0; }
.art-author { font-weight: 700; font-size: 15px; }

.art-hero { margin: 26px 0 0; }
/* Колонка статьи 820 пикселей, при пропорции 16:9 обложка занимала 461 пиксель
   высоты и вытесняла текст за первый экран ноутбука. Ограничиваем высоту:
   у .media уже есть overflow: hidden, а у картинки height: 100% и object-fit: cover,
   поэтому кадр не сжимается, а аккуратно обрезается по центру. */
/* width: 100% обязателен: при ширине auto браузер переносит потолок высоты
   обратно в ширину через пропорцию, и обёртка ужималась до 640 пикселей вместо
   820, то есть картинка уменьшалась, а не обрезалась. */
.art-hero .media { width: 100%; max-height: clamp(240px, 40vh, 400px); }
.art-hero figcaption { font-size: 13px; color: var(--gray); padding-top: 10px; }

/* Тело статьи приходит из базы как готовый HTML: длинная ссылка без пробелов
   не должна выталкивать текст за колонку. */
.art-body { margin-top: 28px; font-size: 17px; line-height: 1.75; max-width: 700px; overflow-wrap: break-word; }
.art-body p { margin-bottom: 20px; }
/* Широкая таблица получает собственную горизонтальную прокрутку, а встроенные
   плееры ограничиваются шириной колонки — иначе страница едет вбок. */
.art-body table { display: block; width: max-content; max-width: 100%; overflow-x: auto; }
.art-body iframe, .art-body video, .art-body embed, .art-body object { max-width: 100%; }
.art-body h2 {
  font-size: clamp(22px, 3vw, 30px); font-weight: 800;
  margin: 34px 0 16px; letter-spacing: -0.015em;
}
.art-body blockquote {
  margin: 30px 0; padding: 4px 0 4px 24px;
  border-left: 4px solid var(--accent);
}
.art-body blockquote p {
  font-family: var(--font-display); font-weight: 600;
  font-size: 21px; line-height: 1.4; margin-bottom: 10px;
}
.art-body blockquote footer { font-size: 14px; color: var(--gray); font-weight: 600; }

.read-also {
  margin: 30px 0; padding: 20px 24px;
  background: var(--gray-soft); border-top: var(--rule);
}
.ra-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  font-size: 12.5px; color: var(--accent); margin-bottom: 10px;
}
.read-also li { margin-bottom: 8px; }
.read-also li:last-child { margin-bottom: 0; }
.read-also a { font-weight: 600; font-size: 15.5px; line-height: 1.4; }
.read-also a:hover { color: var(--accent); }

.source-box {
  margin-top: 30px; padding: 16px 20px;
  border: 1px solid var(--hairline); border-left: 4px solid var(--ink);
  font-size: 14.5px;
  /* В подписи источника нередко стоит голый URL одним длинным словом. */
  overflow-wrap: break-word;
}
.source-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 12.5px; margin-right: 6px; }
.source-box a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.source-box a:hover { color: var(--accent); }

.author-box {
  display: flex; align-items: center; gap: 14px;
  margin-top: 34px; padding: 18px 0;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}

.more-sec { margin-top: 56px; }

/* ---------- static pages ---------- */

.static-page { max-width: 720px; padding-bottom: 10px; }
.static-page h1 {
  font-size: clamp(32px, 4.6vw, 48px); font-weight: 800; letter-spacing: -0.02em;
  border-bottom: var(--rule); padding-bottom: 20px; margin-bottom: 26px;
}
.static-page p { margin-bottom: 18px; font-size: 16.5px; line-height: 1.7; }
.static-page a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.static-page a:hover { color: var(--accent-dark); }

/* ---------- search ---------- */

.search-wrap { max-width: 860px; }
.search-form { max-width: 620px; }
.search-form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.search-hint { font-size: 14px; color: var(--gray); margin-top: 14px; }
.search-hint a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.search-hint a:hover { color: var(--accent); }
.s-results { margin-top: 34px; }
.s-count { font-size: 15px; color: var(--gray); border-top: var(--rule); padding-top: 14px; margin-bottom: 6px; }
.s-count .s-q { color: var(--ink); }

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

.notfound { padding: 70px 20px 30px; max-width: 640px; }
.notfound .kicker { margin-bottom: 14px; }
.notfound h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.nf-actions { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }

/* ---------- cookie bar ---------- */

.cookiebar {
  position: fixed; left: 20px; bottom: 20px; z-index: 90;
  max-width: 400px; background: var(--paper);
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 rgba(23, 25, 29, 0.12);
  padding: 18px 20px;
}
.cookiebar p { font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 8px 16px; font-size: 14px; }

/* ---------- media / skeletons ---------- */

.media { position: relative; overflow: hidden; background: var(--skel-base); display: block; }
.media > img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 0.35s ease;
}
.media > img.loaded { opacity: 1; }

.r169 { aspect-ratio: 16 / 9; }
.r43 { aspect-ratio: 4 / 3; }
.r11 { aspect-ratio: 1 / 1; }

.skel { position: relative; overflow: hidden; background: var(--skel-base); border-radius: var(--skel-radius); }
.skel::after {
  content: ""; position: absolute; inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--skel-sheen), transparent);
  animation: skel-sheen 1.4s ease-in-out infinite;
}
@keyframes skel-sheen { 100% { transform: translateX(100%); } }

.skel-line { height: 0.85em; }
.skel-line.w-40 { width: 40%; }
.skel-line.w-60 { width: 60%; }
.skel-line.w-80 { width: 80%; }
.skel-title { height: 1.6em; width: 70%; }
.skel-title.w-90 { width: 90%; }
.skel-title.w-80 { width: 80%; }
.skel-title.w-60 { width: 60%; }
.skel-title.w-40 { width: 40%; }
.skel-kicker { height: 0.75em; width: 18%; }
.skel-media { aspect-ratio: 16 / 9; width: 100%; border-radius: var(--skel-radius); }
.skel-avatar { width: 40px; height: 40px; border-radius: 0; }

.skel-page { padding-top: 30px; display: flex; flex-direction: column; gap: 14px; }
.skel-hero { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; }
.skel-hero-main { display: flex; flex-direction: column; gap: 14px; }
.skel-hero-side { display: flex; flex-direction: column; gap: 20px; border-left: var(--rule); padding-left: 26px; }
.skel-feed-row { display: flex; flex-direction: column; gap: 8px; }
.skel-rule { height: 3px; background: var(--ink); margin-top: 26px; }
.skel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 12px; }
.skel-card { display: flex; flex-direction: column; gap: 10px; }
.skel-crumbs { margin-bottom: 8px; }
.skel-h1 { height: 2.4em; }
.skel-lead-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 30px; margin: 10px 0 16px; }
.skel-lead-copy { display: flex; flex-direction: column; gap: 12px; }
.skel-article { max-width: 820px; }
/* Заглушка обложки статьи держит ту же высоту, что и живой герой, иначе после
   загрузки страница дёргается: высокий серый прямоугольник сменяется низкой
   картинкой. Правило намеренно локальное: заглушки главной и списков
   соответствуют своим картинкам и остаются как были. */
.skel-article .skel-media { max-height: clamp(240px, 40vh, 400px); }
.skel-para { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.skel-meta { margin-bottom: 10px; }

#app.is-loading { min-height: 70vh; }

/* ---------- route progress ---------- */

#route-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0; z-index: 120;
  background: var(--accent);
  opacity: 0;
  transition: width 0.4s ease, opacity 0.2s ease;
  pointer-events: none;
}
#route-progress.is-active { width: 70%; opacity: 1; }

/* ---------- reveal ---------- */

[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
.no-io [data-reveal] { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .skel::after { animation: none; display: none; }
  .media > img { transition: none; opacity: 1; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .sec-more .ph, .feed-item a, .ev-card { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr) 290px; gap: 30px; }
  .split-side, .listing-cols { grid-template-columns: minmax(0, 1fr) 290px; gap: 30px; }
  .op-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-nav a { padding: 26px 10px; font-size: 15px; }
}

@media (max-width: 920px) {
  /* Даже одиночная колонка должна быть minmax(0, 1fr): чистый 1fr не сжимается
     уже содержимого и на узких экранах даёт горизонтальную прокрутку. */
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-side { border-left: 0; padding-left: 0; border-top: var(--rule); padding-top: 16px; margin-top: 6px; }
  .split-side, .listing-cols { grid-template-columns: minmax(0, 1fr); }
  .sidebar { border-left: 0; padding-left: 0; border-top: var(--rule); padding-top: 18px; }
  .mosaic { grid-template-columns: minmax(0, 1fr); }
  .mo-list { border-left: 0; padding-left: 0; border-top: 1px solid var(--hairline); padding-top: 22px; }
  .duo { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .duo > .card + .card { border-left: 0; padding-left: 0; border-top: 1px solid var(--hairline); padding-top: 30px; }
  .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-top { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .skel-hero { grid-template-columns: minmax(0, 1fr); }
  .skel-hero-side { border-left: 0; padding-left: 0; }
}

@media (max-width: 767px) {
  .burger { display: inline-flex; }
  .nav-search span { display: none; }
  .nav-search { border: 2px solid var(--ink); width: 44px; justify-content: center; padding: 0; }
  .masthead-in { min-height: 64px; gap: 16px; }
  .logo { font-size: 26px; }

  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: var(--rule);
    z-index: 70;
  }
  body.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
  .site-nav a {
    display: block; padding: 13px 4px; font-size: 17px;
    border-bottom: 1px solid var(--hairline); margin-bottom: 0;
  }
  .site-nav li:last-child a { border-bottom: 0; }
  .site-nav a.is-active { border-bottom-color: var(--hairline); }

  .hero { padding-top: 20px; }
  /* Одна колонка тоже через minmax(0, ...): картинки и длинные слова не должны
     задавать минимальную ширину дорожки. */
  .hero-minis { grid-template-columns: minmax(0, 1fr); }
  .grid-cards, .grid-cards.g3, .cross-sec .grid-cards { grid-template-columns: minmax(0, 1fr); }
  .op-grid { grid-template-columns: minmax(0, 1fr); }
  .ev-grid { grid-template-columns: minmax(0, 1fr); }
  .lead-card { grid-template-columns: minmax(0, 1fr); }
  .work-row { grid-template-columns: 104px minmax(0, 1fr); gap: 14px; }
  .work-title { font-size: 18px; }
  .home-sec { margin-top: 38px; }
  .nl-row { flex-direction: column; }
  .nl-row .btn { justify-content: center; }
  .cookiebar { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .skel-grid { grid-template-columns: minmax(0, 1fr); }
  .skel-lead-row { grid-template-columns: minmax(0, 1fr); }
  .art-meta { flex-wrap: wrap; }
}
