/* Прототип «Новости Саратова». Обычный CSS без препроцессоров и утилит —
   чтобы файл переносился в тему WordPress копированием, без сборки. */

:root {
  /* Синий несёт конструкцию — шапку и заголовки блоков.
     Янтарь появляется там, где что-то значит: ссылки, действия,
     разделители дней. Синий и янтарь — дополнительные цвета. */
  --c-accent: #1d4f8c;
  --c-accent-dark: #143a68;
  --c-accent-soft: #dbe8f6;
  --c-amber: #c2410c;
  --c-amber-soft: #fdece0;
  --c-page: #eef1f5;
  --c-card: #fff;
  --c-text: #15171c;
  --c-muted: #656a75;

  /* Разделители волосяные и полупрозрачные: сплошная серая линия на белом
     читается как рамка таблицы, полупрозрачная — как край поверхности. */
  --c-line: rgba(16, 24, 40, 0.09);
  --c-line-soft: rgba(16, 24, 40, 0.06);

  --shell: 1680px;
  --gap: 14px;

  /* Радиусы разнесены по назначению: мелкие элементы почти прямые,
     карточки заметно скруглены. Один радиус на всё делает страницу
     либо угловатой, либо мыльной. */
  --radius: 10px;
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;

  /* Тень в два слоя: короткая держит край поверхности, длинная и почти
     прозрачная даёт мягкую посадку. Одна тень средней плотности выглядит
     как приём десятилетней давности. */
  --sh-card:
    0 1px 2px rgba(16, 24, 40, 0.05),
    0 10px 28px -14px rgba(16, 24, 40, 0.18);
  --sh-lift:
    0 2px 4px rgba(16, 24, 40, 0.07),
    0 18px 36px -16px rgba(16, 24, 40, 0.28);
  --sh-pop:
    0 4px 8px rgba(16, 24, 40, 0.08),
    0 24px 48px -20px rgba(16, 24, 40, 0.35);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html {
  color-scheme: light;
  accent-color: var(--c-accent);
}

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

body,
h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

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

body {
  background: var(--c-page);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Отрицательный трекинг на крупном тексте: при кегле выше 16 px межбуквенное
   расстояние системных шрифтов рассчитано на текст, а не на заголовок,
   и строка выглядит разреженной. Мелкого текста это не касается. */
h1,
h2,
.hero__caption,
.rubric__head,
.strip__title,
.feed__heading,
.card-item__title,
.aside-block__title,
.post__title {
  letter-spacing: -0.014em;
}

/* Строки заголовков выравниваются по длине, у абзацев не остаётся
   висячих слов. Браузеры без поддержки просто игнорируют. */
h1,
h2,
.hero__caption,
.card-item__title,
.rubric__lead-title {
  text-wrap: balance;
}

p,
.card-item__excerpt,
.post__body p {
  text-wrap: pretty;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 clamp(8px, 1.2vw, 20px);
}

/* Карточка держится на тени, а не на рамке. Рамка вокруг каждого блока
   превращает страницу в таблицу; тень отделяет поверхность от фона
   и оставляет края чистыми. Волосяная линия сверху нужна на светлом фоне,
   где одной тени мало, чтобы обозначить край. */
.card {
  background: var(--c-card);
  border-radius: var(--r-md);
  box-shadow: var(--sh-card), inset 0 0 0 1px var(--c-line-soft);
}

/* --- шапка --- */

/* Демонстрационное объявление: тематическая сцена во всю плашку, поверх неё
   затемнение под текст. Сцена нарисована вектором в разметке, поэтому
   рекламное место не тянет ни одного внешнего запроса. */
.ad {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 104px;
  margin: 8px 0;
  padding: 22px 16px 14px;
  border-radius: var(--radius);
  background: var(--ad);
  color: #fff;
  overflow: hidden;
}

.ad__scene {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}

/* Затемнение идёт от текста к картинке: слева читаемо, справа видно сцену. */
.ad__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--ad) 92%, #10102a) 0%,
    color-mix(in srgb, var(--ad) 72%, #10102a) 28%,
    transparent 62%
  );
}

.ad__note,
.ad__badge {
  position: absolute;
  top: 6px;
  font-size: 10px;
}

.ad__note {
  left: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.ad__badge {
  right: 10px;
  z-index: 1;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  font-weight: 700;
}

.ad__body {
  position: relative;
  flex: 1;
  min-width: 0;
}

.ad__label {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

.ad__title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.ad__text {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.35;
  opacity: 0.9;
}

.ad__cta {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ad);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Узкое место: только подпись, заголовок и кнопка. Сцены здесь нет —
   на такой высоте картинке негде развернуться, она стала бы полоской. */
.ad--slim {
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 19px 12px 9px;
  background: var(--ad);
}

.ad--slim .ad__note {
  left: 12px;
}

.ad--slim .ad__label {
  margin-bottom: 1px;
  font-size: 10px;
}

.ad--slim .ad__title {
  font-size: 14px;
  line-height: 1.25;
}

.ad--slim .ad__cta {
  padding: 5px 11px;
  font-size: 12px;
}

/* В узких местах объявление становится вертикальным: сцена сверху,
   текст внизу — поэтому и затемнение разворачивается снизу вверх. */
.ad--inline,
.ad--vertical {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 168px;
  padding-top: 56px;
}

.ad--inline .ad__scrim,
.ad--vertical .ad__scrim {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 26%,
    color-mix(in srgb, var(--ad) 58%, #10102a) 52%,
    color-mix(in srgb, var(--ad) 92%, #10102a) 88%
  );
}

/* Если колонка развернулась во всю ширину, вертикальная раскладка ни к чему. */
@container (min-width: 560px) {
  .ad--inline {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    min-height: 104px;
    padding-top: 22px;
  }

  .ad--inline .ad__scrim {
    background: linear-gradient(
      90deg,
      color-mix(in srgb, var(--ad) 92%, #10102a) 0%,
      color-mix(in srgb, var(--ad) 72%, #10102a) 28%,
      transparent 62%
    );
  }
}

@media (max-width: 700px) {
  /* Узкий формат остаётся строкой и на телефоне — он для того и нужен.
     Остальные становятся постером, но ниже, чем на десктопе: на маленьком
     экране объявление в 168 px съедало почти четверть первого экрана. */
  .ad:not(.ad--slim) {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    min-height: 132px;
    padding: 34px 12px 10px;
  }

  .ad:not(.ad--slim) .ad__title {
    font-size: 16px;
  }

  /* Описание в две строки, а не в три: на телефоне высота объявления
     дороже, чем третья строка пояснения. */
  .ad:not(.ad--slim) .ad__text {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 12px;
  }

  .ad:not(.ad--slim) .ad__cta {
    padding: 6px 12px;
    font-size: 12px;
  }

  .ad .ad__scrim {
    background: linear-gradient(
      180deg,
      transparent 0%,
      color-mix(in srgb, var(--ad) 60%, #10102a) 42%,
      color-mix(in srgb, var(--ad) 88%, #10102a) 100%
    );
  }
}

/* Шапка липкая, поэтому под ней всё время что-то проезжает. Полупрозрачный
   фон с размытием показывает движение и не превращается в глухую панель.
   Браузерам без backdrop-filter достаётся сплошной градиент — он идёт
   первым свойством и просто не перекрывается. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(100deg, var(--c-accent-dark), var(--c-accent) 55%, #2e6cb0);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 6px 24px -8px rgba(12, 32, 60, 0.45);
  color: #fff;
}

@supports (backdrop-filter: blur(1px)) {
  .topbar {
    background: linear-gradient(
      100deg,
      color-mix(in srgb, var(--c-accent-dark) 88%, transparent),
      color-mix(in srgb, var(--c-accent) 86%, transparent) 55%,
      color-mix(in srgb, #2e6cb0 86%, transparent)
    );
    backdrop-filter: blur(14px) saturate(1.5);
  }
}

.topbar__inner {
  display: grid;
  grid-template-areas: 'brand nav meta';
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 56px;
}

.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--c-accent);
  font-size: 15px;
  letter-spacing: -0.04em;
}

.brand__text {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  line-height: 1.15;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

.nav__link {
  display: block;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14.5px;
  white-space: nowrap;
  transition: background 0.16s var(--ease);
}

.nav__link:hover,
.nav__link[aria-current='page'] {
  background: rgba(255, 255, 255, 0.16);
}

.topbar__meta {
  position: relative;
  grid-area: meta;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  white-space: nowrap;
}

.weather {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border: 0;
  border-radius: 999px;
  background: var(--c-accent-dark);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.weather:hover,
.weather[aria-expanded='true'] {
  background: #fff;
  color: var(--c-accent-dark);
}

.weather__icon {
  display: inline-flex;
}

/* Прогноз раскрывается из строки в шапке — отдельного блока в колонке
   под то же самое не нужно. */
.wx {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 244px;
  padding: 12px 14px 14px;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-pop), inset 0 0 0 1px var(--c-line-soft);
  color: var(--c-text);
  white-space: normal;
}

.wx__title {
  margin-bottom: 4px;
  color: var(--c-accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.clock {
  opacity: 0.9;
}

/* Гамбургер нужен только на узких экранах. */
.burger {
  grid-area: burger;
  display: none;
  gap: 4px;
  width: 38px;
  height: 34px;
  padding: 8px;
  border: 0;
  border-radius: var(--radius);
  background: var(--c-accent-dark);
  cursor: pointer;
}

.burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

/* --- сетка --- */

/* Колонки заданы долями, а не пикселями: на широком мониторе они растут,
   на среднем — сжимаются до минимума и только потом переносятся. */
.layout {
  display: grid;
  grid-template-columns:
    minmax(300px, 1.15fr)
    minmax(0, 3fr)
    minmax(300px, 1.1fr);
  gap: var(--gap);
  align-items: stretch;
  padding: var(--gap) 0 24px;
}

/* Лента вынута из потока и растянута на высоту строки: иначе её собственные
   сорок материалов задавали бы высоту всей сетки, а короткая — обрывалась бы
   выше соседних колонок. Лишнее подрезается, кнопка открывает его. */
.column--feed {
  position: relative;
  min-height: 420px;
}

.column--feed > .feed {
  position: absolute;
  inset: 0;
}

/* Подрезанный материал внизу растворяется, чтобы обрыв читался как
   продолжение списка, а не как сломанная вёрстка. */
.column--feed > .feed .feed__scroll:not(.feed__scroll--capped)::after {
  content: '';
  position: sticky;
  bottom: 0;
  display: block;
  height: 26px;
  margin-top: -26px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}

/* Материал и список рубрики занимают всё, кроме правой колонки. */
.column--wide {
  grid-column: 1 / 3;
}

/* Главная разложена на шесть блоков сетки. Мельче, чем нужно для десктопа,
   но только так их можно переставить на телефоне поодиночке. */
.column--feed {
  grid-column: 1;
  grid-row: 1 / span 4;
}

.column--hero {
  grid-column: 2;
  grid-row: 1;
}

.column--strip {
  grid-column: 2;
  grid-row: 2;
}

.column--promo {
  grid-column: 2;
  grid-row: 3;
}

/* Объявление здесь — единственный житель ряда, и расстояние до соседей
   задаёт сетка. Собственные поля дали бы двойной отступ. */
.column--promo .ad {
  margin: 0;
}

.column--main {
  grid-column: 2;
  grid-row: 4;
}

.column--aside {
  grid-column: 3;
  grid-row: 1 / span 4;
}

/* Лента и правая колонка тянутся на все четыре ряда. Без явных высот сетка
   раздаёт их излишек поровну между рядами, и блоки в центре разъезжаются —
   под объявлением появлялась дыра в полсотни пикселей. Пусть весь запас
   уходит в последний ряд, где он никому не мешает. */
.layout--home {
  grid-template-rows: min-content min-content min-content 1fr;
}

.column {
  container-type: inline-size;
  display: grid;
  align-content: start;
  gap: var(--gap);
  min-width: 0;
}

.section-title {
  margin-bottom: 8px;
  color: var(--c-amber);
  font-size: 20px;
  font-weight: 700;
}

/* --- лента слева --- */

/* overflow обязателен: без него скрытые материалы ленты растягивают документ
   и появляется пустая прокрутка ниже подвала. Календарь границей карточки
   не срезается, потому что позиционируется fixed. */
.feed {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.feed__scroll {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Прокрутка появляется только после «Загрузить ещё» — до этого лишние
   материалы просто не показаны. */
.feed__scroll--capped {
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Разделитель дня — надпись с уходящей вправо линией, а не сплошная плашка:
   две плашки подряд под шапкой выглядели тяжело. */
.feed__group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 6px;
  background: var(--c-card);
  color: var(--c-amber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.feed__group-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-line);
}

.feed__items {
  display: grid;
}

.feed__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--c-line-soft);
}

.feed__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Объявление внутри ленты — только на телефоне. В широкой раскладке лента
   стоит боковой колонкой, и врезка там сломала бы ритм списка. */
.feed__ad {
  display: none;
}

.feed__more {
  margin: 10px 12px 12px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--c-accent) 18%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c-accent) 6%, #fff);
  color: var(--c-accent-dark);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.feed__more:hover {
  border-color: transparent;
  background: var(--c-accent);
  color: #fff;
}

.feed__archive {
  padding: 9px;
  border-top: 1px solid var(--c-line);
  color: var(--c-amber);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.feed__archive:hover {
  background: var(--c-accent-soft);
}

.is-hidden {
  display: none;
}

/* Значок всегда слева, метка рубрики всегда справа — независимо от того,
   есть ли в конкретном материале и то, и другое. */
.feed__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}


.feed__date {
  color: var(--c-muted);
  font-size: 12px;
}

/* Значок материала: молния — горячее, камера — фоторепортаж, треугольник — видео. */
.flag {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: #fff;
  background: var(--c-accent);
}

.flag--hot {
  background: #d8443c;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- строка с календарём над лентой --- */

/* Шапка ленты оформлена так же, как заголовки рубрик и строки ЖКХ, —
   у всех блоков главной один и тот же приём. */
.feed__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 11px;
  border-bottom: 1px solid var(--c-line-soft);
  background: color-mix(in srgb, var(--c-accent) 7%, #fff);
  color: var(--c-accent-dark);
}

.feed__bar::before {
  content: '';
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--c-accent);
}

.feed__heading {
  font-size: 17px;
  font-weight: 700;
}

.feed__cal {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--c-accent) 22%, transparent);
  border-radius: var(--r-xs);
  background: #fff;
  color: var(--c-accent);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.feed__cal:hover,
.feed__cal[aria-expanded='true'] {
  border-color: transparent;
  background: var(--c-accent);
  color: #fff;
}

.feed__reset {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.feed__reset:hover {
  background: #fff;
  color: var(--c-accent);
}

/* fixed, а не absolute: карточка ленты обрезает содержимое, и всплывающий
   календарь внутри неё был бы срезан. Координаты выставляются при открытии. */
.cal {
  position: fixed;
  z-index: 50;
  width: 250px;
  padding: 10px;
  border-radius: var(--r-md);
  background: #fff;
  box-shadow: var(--sh-pop), inset 0 0 0 1px var(--c-line-soft);
}

.cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--c-accent-dark);
  font-size: 13px;
  font-weight: 700;
}

.cal__head button {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--c-accent-soft);
  color: var(--c-accent-dark);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.cal__week,
.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal__week {
  margin-bottom: 2px;
  color: var(--c-muted);
  font-size: 10px;
  text-align: center;
  text-transform: uppercase;
}

.cal__day {
  padding: 5px 0;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--c-text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.cal__day:hover:not(:disabled) {
  background: var(--c-accent-soft);
}

.cal__day:disabled {
  color: #c6c6cf;
  cursor: default;
}

.cal__day.is-today {
  box-shadow: inset 0 0 0 1px var(--c-amber);
  font-weight: 700;
}

.cal__day.is-selected {
  background: var(--c-amber);
  color: #fff;
}

.feed__empty {
  padding: 14px 8px;
  color: var(--c-muted);
  font-size: 13px;
  text-align: center;
}

/* Заголовок ограничен тремя строками, чтобы длинный не растягивал строку
   ленты вдвое против соседних. */
.feed__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
}

.feed__item:hover .feed__title {
  color: var(--c-accent);
}

/* Пропорция совпадает с готовой нарезкой td_100x70, поэтому картинка почти
   не перекадрируется. Растягивать миниатюру на всю высоту строки нельзя:
   на вертикальном кадре от снимка остаётся неузнаваемый фрагмент. */
.feed__thumb {
  width: 92px;
  aspect-ratio: 10 / 7;
  align-self: center;
  border-radius: var(--r-sm);
  object-fit: cover;
}

/* --- главный блок --- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  overflow: hidden;
}

/* Слайды лежат друг на друге, поэтому высоту блока задаёт список справа:
   при переключении темы вёрстка не дёргается. */
.hero__stage {
  position: relative;
  min-height: 340px;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Затемнение в три остановки вместо двух: линейный градиент от прозрачного
   к чёрному даёт видимую полосу на середине снимка, ступенчатый —
   не даёт. Разница заметна на светлых фотографиях. */
.hero__overlay {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 56px 18px 16px;
  background: linear-gradient(
    to top,
    rgba(8, 12, 20, 0.86) 0%,
    rgba(8, 12, 20, 0.62) 38%,
    rgba(8, 12, 20, 0.18) 72%,
    transparent 100%
  );
  color: #fff;
}

.hero__caption {
  display: block;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.22;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hero__stamp {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12px;
}

/* Метка на снимке — не плотная плашка, а стеклянная таблетка: сквозь неё
   видно фотографию, и она не спорит с заголовком. */
.hero__kind {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(200, 46, 38, 0.82);
  backdrop-filter: blur(6px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.hero__when {
  opacity: 0.85;
}

.hero__views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  opacity: 0.85;
}

.hero__list {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--c-line);
}

.hero__link {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--c-line-soft);
  font-size: 15px;
  line-height: 1.35;
}

.hero__link:last-child {
  border-bottom: 0;
}

/* Активный материал помечается подложкой и скобой, а не сплошной синей
   заливкой с белым текстом: список из семи строк, где одна залита цветом,
   выглядел как выделение в старом файловом менеджере. */
.hero__link:hover,
.hero__link.is-active {
  background: color-mix(in srgb, var(--c-accent) 6%, #fff);
  color: var(--c-accent-dark);
  font-weight: 600;
}

.hero__link::before {
  content: '';
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--c-accent);
  opacity: 0;
  transition: opacity 0.18s var(--ease);
}

.hero__link:hover::before,
.hero__link.is-active::before {
  opacity: 1;
}

/* --- карточки --- */

/* Число колонок подбирается по доступной ширине, а не задаётся числом:
   в широкой колонке карточек больше, в узкой — меньше, на телефоне одна. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--gap);
}

.cards--wide {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.card-item {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-item__image {
  aspect-ratio: 16 / 10;
  width: 100%;
  object-fit: cover;
}

.card-item__body {
  padding: 12px 14px 14px;
}

.card-item__date {
  color: var(--c-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.card-item__title {
  display: block;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
}

.card-item:hover .card-item__title {
  color: var(--c-accent);
}

.card-item__excerpt {
  display: block;
  margin-top: 8px;
  color: var(--c-muted);
  font-size: 13px;
}

/* --- блок рубрик на главной --- */

/* Рубрик четыре, поэтому колонок либо две, либо одна: при трёх последняя
   карточка оставалась бы одна в ряду. Порог считается по ширине колонки,
   а не окна, — блок живёт внутри сетки и о размере окна знать не должен. */
.rubrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

@container (min-width: 620px) {
  .rubrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.rubric {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Рекламная строка занимает всю ширину блока рубрик. */
.rubrics__ad {
  grid-column: 1 / -1;
}

.rubrics__ad .ad {
  margin: 0;
}

/* Цвет рубрики держится подложкой в семь процентов и вертикальной скобой,
   а не заливкой всей плашки. Четыре сплошные цветные полосы подряд
   перетягивали внимание с материалов на оформление — это и читалось
   как портал нулевых. */
.rubric__head {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 11px;
  border-bottom: 1px solid var(--c-line-soft);
  background: color-mix(in srgb, var(--rubric, var(--c-amber)) 7%, #fff);
  color: var(--rubric, var(--c-amber));
  font-size: 17px;
  font-weight: 700;
}

.rubric__head::before {
  content: '';
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--rubric, var(--c-amber));
}

.rubric__more {
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 500;
  transition: color 0.15s var(--ease);
}

.rubric__head:hover .rubric__more {
  color: var(--rubric, var(--c-amber));
}

/* Снимок здесь намеренно мелкий: рубрики стоят под главным блоком и не должны
   перетягивать внимание на себя. */
.rubric__lead {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--c-line);
}

.rubric__image {
  width: 92px;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-sm);
  object-fit: cover;
  align-self: start;
}

/* Заголовки в карточках рубрик выровнены по высоте: три строки для главного
   материала и две для остальных. Без этого соседние карточки разъезжаются. */
.rubric__lead-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  min-height: calc(4em * 1.3);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.rubric__lead:hover .rubric__lead-title {
  color: var(--rubric, var(--c-amber));
}

.rubric__list {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.rubric__item {
  display: block;
  padding: 7px 10px;
  border-bottom: 1px solid var(--c-line);
  font-size: 13px;
  line-height: 1.4;
}

.rubric__item > span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: calc(2em * 1.4);
}

.rubric__list li:last-child .rubric__item {
  border-bottom: 0;
}

.rubric__item {
  transition: padding-left 0.15s ease, background 0.15s ease;
}

.rubric__item:hover {
  padding-left: 15px;
  background: #fafaff;
  color: var(--rubric, var(--c-amber));
}

.rubric__date {
  display: block;
  margin-bottom: 3px;
  color: var(--c-muted);
  font-size: 11px;
}

/* --- рубрика строкой под главным блоком --- */

.strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  overflow: hidden;
}

/* Тот же приём, что у заголовков рубрик: подложка вместо заливки, скоба
   цветом рубрики. Скоба здесь вертикальная слева — блок стоит строкой. */
.strip__head {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--rubric, var(--c-amber)) 8%, #fff);
  color: var(--rubric, var(--c-amber));
}

.strip__head::before {
  content: '';
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--rubric, var(--c-amber));
}

.strip__title {
  font-size: 17px;
  font-weight: 700;
}

.strip__more {
  color: var(--c-muted);
  font-size: 11px;
  transition: color 0.15s var(--ease);
}

.strip__head:hover .strip__more {
  color: var(--rubric, var(--c-amber));
}

/* Материалов ровно три, поэтому колонок либо три, либо одна — промежуточные
   варианты оставляли бы последний материал один в ряду. */
.strip__items {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@container (min-width: 560px) {
  .strip__items {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.strip__item {
  display: block;
  padding: 9px 12px;
  border-left: 3px solid transparent;
  box-shadow: inset 1px 0 0 var(--c-line);
  transition: border-color 0.15s, background 0.15s;
}

.strip__item:hover {
  border-left-color: var(--rubric, var(--c-amber));
  background: #fafaff;
}

.strip__date {
  display: block;
  margin-bottom: 3px;
  color: var(--c-muted);
  font-size: 11px;
}

.strip__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.4;
}

.strip__item:hover .strip__text {
  color: var(--rubric, var(--c-amber));
}

@container (max-width: 620px) {
  .strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .strip__head {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .strip__item {
    border-left: 0;
    border-top: 1px solid var(--c-line);
    box-shadow: none;
  }
}

/* --- правая колонка --- */

.aside-block {
  padding: 14px;
}

/* Заголовок правой колонки отбивается коротким подчёркиванием, а не линией
   во всю ширину: линия делит карточку надвое, отрезок только помечает
   начало блока. */
.aside-block__title {
  position: relative;
  margin-bottom: 14px;
  padding-bottom: 9px;
  color: var(--c-amber);
  font-size: 18px;
  font-weight: 700;
}

.aside-block__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 3px;
  border-radius: 3px;
  background: var(--c-amber);
}

.aside-block__image {
  width: 100%;
  margin-bottom: 7px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-sm);
}

.aside-block__caption {
  display: block;
  color: var(--c-amber);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

/* --- строки прогноза --- */

.forecast__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1px 8px;
  padding: 7px 0;
  border-top: 1px solid var(--c-line);
  font-size: 13px;
}

.forecast__when {
  font-weight: 600;
  text-transform: capitalize;
}

.forecast__cond {
  display: flex;
  align-items: center;
  gap: 5px;
  grid-column: 1;
  color: var(--c-muted);
  font-size: 12px;
}

.forecast__temp {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--c-accent-dark);
  font-weight: 700;
  white-space: nowrap;
}

/* --- промо портала --- */

.promo {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(150deg, #1d4d6b, #16324a 58%, #2a1f4d);
  color: #fff;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.promo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 30, 60, 0.28);
}

/* Карта уходит за правый край: это водяной знак, на котором лежит текст,
   а не иллюстрация под ним. Файл уже серый, фильтр добирает остатки цвета
   и осветляет — на тёмной плашке карта должна быть светлее фона. */
.promo__map {
  position: absolute;
  right: -14%;
  bottom: -14%;
  width: 118%;
  height: auto;
  opacity: 0.55;
  /* Инверсия обязательна: вся карта — тонкие тёмные линии на светлой заливке.
     Без неё заливка выбеливает плашку, а границы районов пропадают. После
     инверсии заливка уходит в чёрный и гасится режимом screen, а линии
     становятся светлыми и читаются. */
  filter: grayscale(1) invert(1) contrast(1.25);
  mix-blend-mode: screen;
  transition: transform 0.6s ease, opacity 0.3s ease;
}

.promo:hover .promo__map {
  transform: scale(1.05);
  opacity: 0.7;
}

.promo__body {
  position: relative;
  display: block;
  padding: 14px;
}

.promo__label {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.promo__title {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
}

.promo__text {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.88;
}

.promo__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 10px;
}

.promo__chip {
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  font-size: 11px;
}

.promo__cta {
  display: inline-block;
  margin-top: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  color: #16324a;
  font-size: 13px;
  font-weight: 600;
}

.promo:hover .promo__cta {
  background: #ffe9a8;
}

/* --- статьи в правой колонке --- */

.reads {
  overflow: hidden;
}

.reads__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--c-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.reads__more {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.8;
}

.reads__head:hover .reads__more {
  opacity: 1;
}

.reads__lead {
  display: block;
  border-bottom: 1px solid var(--c-line);
}

.reads__cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.reads__lead:hover .reads__cover {
  transform: scale(1.05);
}

.reads__body {
  display: block;
  padding: 9px 10px 11px;
}

.reads__date {
  display: block;
  margin-bottom: 3px;
  color: var(--c-muted);
  font-size: 11px;
}

.reads__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.reads__lead:hover .reads__title {
  color: var(--c-amber);
}

.reads__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin-top: 5px;
  color: var(--c-muted);
  font-size: 12px;
  line-height: 1.4;
}

.reads__item {
  display: block;
  padding: 8px 10px;
  border-bottom: 1px solid var(--c-line);
  border-left: 3px solid transparent;
  font-size: 13px;
  line-height: 1.35;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.reads__list li:last-child .reads__item {
  border-bottom: 0;
}

.reads__item:hover {
  border-left-color: var(--c-amber);
  background: #fafaff;
  color: var(--c-amber);
}

.tip {
  padding: 12px;
  border-radius: var(--radius);
  background: var(--c-accent-soft);
}

.tip__title {
  margin-bottom: 8px;
  color: var(--c-accent-dark);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.tip__text {
  color: #4a4a58;
  font-size: 13px;
}

.tip__socials {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.tip__social {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.tip__contact {
  display: block;
  color: var(--c-accent-dark);
  font-size: 14px;
  font-weight: 600;
}

/* --- страница материала --- */

.post {
  padding: 26px clamp(18px, 3vw, 34px) 30px;
}

.post__meta {
  margin-bottom: 12px;
  color: var(--c-muted);
  font-size: 13px;
}

/* Заголовок материала — единственное место, где кегль уходит далеко вверх.
   Он же задаёт тон всей странице, поэтому растёт вместе с колонкой. */
.post__title {
  margin-bottom: 20px;
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.14;
  letter-spacing: -0.021em;
}

.post__cover {
  width: 100%;
  margin-bottom: 24px;
  border-radius: var(--r-md);
}

/* Мера строки ограничена 68 знаками: на широком мониторе колонка материала
   растягивается до 900 px, и глаз теряет начало следующей строки.
   Ограничение снято на узких экранах — там ширины и так нет. */
.post__body {
  max-width: 68ch;
  font-size: 18px;
  line-height: 1.72;
}

.post__body p {
  margin: 0 0 1em;
}

.post__body h2,
.post__body h3 {
  margin: 1.4em 0 0.5em;
  line-height: 1.25;
}

.post__body a {
  color: var(--c-accent);
  text-decoration: underline;
}

.post__body img {
  margin: 1em 0;
  border-radius: var(--radius);
}

.post__body figcaption {
  color: var(--c-muted);
  font-size: 13px;
}

.post__body blockquote {
  margin: 1.4em 0;
  padding: 14px 18px;
  border-left: 3px solid var(--c-accent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: color-mix(in srgb, var(--c-accent) 5%, #fff);
  color: #33384a;
}

/* --- страница контактов --- */

.contacts {
  padding: 18px;
}

.contacts__title {
  margin-bottom: 14px;
  font-size: 28px;
  line-height: 1.2;
}

.contacts__group {
  padding-top: 14px;
  border-top: 1px solid var(--c-line);
}

.contacts__group + .contacts__group {
  margin-top: 14px;
}

.contacts__head {
  margin-bottom: 8px;
  color: var(--c-amber);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contacts__lead {
  max-width: 62ch;
  margin-bottom: 10px;
  color: var(--c-muted);
  font-size: 14px;
}

.contacts__pair {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 4px 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--c-line);
}

.contacts__pair:last-of-type {
  border-bottom: 0;
}

.contacts__key {
  color: var(--c-muted);
  font-size: 13px;
}

.contacts__value {
  font-size: 15px;
}

a.contacts__value {
  color: var(--c-accent);
  font-weight: 600;
}

a.contacts__value:hover {
  color: var(--c-amber);
  text-decoration: underline;
}

.contacts__socials {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.contacts__legal {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 620px) {
  .contacts__pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* --- страница рубрики --- */

.page-head {
  padding: 12px 14px;
}

.page-head__title {
  font-size: 26px;
}

.page-head__count {
  color: var(--c-muted);
  font-size: 13px;
}

/* --- подвал --- */

.footer {
  padding: 18px 0 20px;
  background: var(--c-accent-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

/* Выходные данные разложены по колонкам: сплошным столбцом, как на текущем
   сайте, они занимают целый экран. */
.imprint {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 32px;
  max-width: 1040px;
}

@media (max-width: 820px) {
  .imprint {
    grid-template-columns: minmax(0, 1fr);
  }
}

.imprint__brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.imprint__age {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 700;
}

.imprint__head {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.imprint__line {
  display: block;
  margin-top: 3px;
  opacity: 0.78;
  font-size: 12px;
  line-height: 1.4;
}

a.imprint__line:hover {
  opacity: 1;
  text-decoration: underline;
}

.imprint__socials {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.imprint__social {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
}

.imprint__social:hover {
  background: #fff;
  color: var(--c-accent-dark);
}

.imprint__legal {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 11px;
  line-height: 1.45;
  opacity: 0.62;
}

.imprint__legal a {
  margin-left: 6px;
  text-decoration: underline;
}

.footer__note {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.5;
}

/* --- отделка --- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--c-amber);
  outline-offset: 2px;
}

/* Карточка приподнимается, снимок внутри чуть наезжает — движение короткое,
   чтобы лента не «дышала» при быстром просмотре. */
.card-item,
.rubric {
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.card-item:hover,
.rubric:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lift), inset 0 0 0 1px var(--c-line-soft);
}

.card-item__image,
.rubric__image,
.aside-block__image {
  transition: transform 0.4s ease;
}

.card-item:hover .card-item__image,
.rubric__lead:hover .rubric__image,
.aside-block:hover .aside-block__image {
  transform: scale(1.05);
}

.card-item,
.aside-block {
  overflow: hidden;
}

.feed__item {
  transition: background 0.15s var(--ease);
}

.feed__item:hover {
  background: color-mix(in srgb, var(--c-accent) 4%, #fff);
}

.hero__link {
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.hero__link.is-active {
  padding-left: 16px;
}

.feed__more {
  transition: background 0.15s ease, color 0.15s ease;
}

/* Блоки проявляются при загрузке. Главный блок исключён: он несёт основную
   картинку страницы, и задерживать её отрисовку ради эффекта не стоит. */
@media (prefers-reduced-motion: no-preference) {
  .column > *:not(.hero) {
    animation: rise 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
  }

  .column > *:nth-child(2) {
    animation-delay: 0.05s;
  }

  .column > *:nth-child(3) {
    animation-delay: 0.1s;
  }

  .column > *:nth-child(4) {
    animation-delay: 0.15s;
  }

  .feed__results .feed__item {
    animation: rise 0.3s ease both;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Полоса прочитанного на странице материала. Масштаб задаёт скрипт: вариант
   на scroll-таймлайне CSS в проверке остался на нуле. */
.progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  height: 3px;
  background: linear-gradient(90deg, var(--c-amber), #ea8c4a);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* --- адаптив --- */

@media (max-width: 1000px) {
  .topbar__inner {
    grid-template-areas:
      'brand meta burger'
      'nav nav nav';
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  /* Дата над погодой: в строку они не помещаются вместе с логотипом
     и его подписью, а подпись важнее. */
  .topbar__meta {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 3px;
    justify-self: end;
  }

  .burger {
    display: grid;
  }

  .nav {
    display: none;
  }

  .nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
  }

  .nav.is-open .nav__link {
    padding: 11px 12px;
    font-size: 15px;
  }
}

/* Средние экраны: правая колонка остаётся, лента уходит вниз во всю ширину
   и там раскладывается в несколько колонок вместо одной узкой. */
@media (max-width: 1240px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  }

  /* Лента ушла вниз во всю ширину — растягивать её больше не по чему,
     возвращаем в обычный поток. */
  .column--feed {
    position: static;
    grid-column: 1 / -1;
    grid-row: 5;
    min-height: 0;
  }

  .column--hero { grid-column: 1; grid-row: 1; }
  .column--strip { grid-column: 1; grid-row: 2; }
  .column--promo { grid-column: 1; grid-row: 3; }
  .column--main { grid-column: 1; grid-row: 4; }

  .column--aside {
    grid-column: 2;
    grid-row: 1 / span 4;
  }

  .layout--home {
    grid-template-rows: min-content min-content min-content 1fr min-content;
  }

  .column--feed > .feed {
    position: static;
  }

  /* Пока лента не переведена в режим прокрутки — она просто растёт.
     Оговорка :not обязательна: иначе это правило перебивало бы включение
     прокрутки по кнопке. */
  .column--feed .feed__scroll:not(.feed__scroll--capped) {
    overflow: visible;
  }

  .column--wide {
    grid-column: 1 / 2;
  }

  /* Лента развёрнута во всю ширину — материалы внутри дня идут в несколько
     колонок, но сами подгруппы по датам остаются друг под другом. */
  .column--feed .feed__items {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* Ниже этого порога правая колонка съедала бы ширину у центральной,
   и карточки схлопывались бы в одну на строку. */
@media (max-width: 980px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .column--wide {
    grid-column: 1 / -1;
  }

  /* На телефоне лента идёт сразу за главным блоком и объявлением: это то,
     за чем сюда приходят. Полоса ЖКХ и остальное уезжают под неё. */
  .column--hero,
  .column--promo,
  .column--feed,
  .column--strip,
  .column--main,
  .column--aside {
    grid-column: 1;
  }

  /* В одну колонку ничего не растягивается — явные ряды больше не нужны. */
  .layout--home {
    grid-template-rows: none;
  }

  .column--hero { grid-row: 1; }
  .column--promo { grid-row: 2; }
  .column--feed { grid-row: 3; }
  .column--strip { grid-row: 4; }
  .column--main { grid-row: 5; }
  .column--aside { grid-row: 6; }

  /* Список тем под снимком урезан: семь заголовков занимали пол-экрана
     до того, как читатель доберётся до ленты. */
  .hero__list .hero__link:nth-child(n + 5) {
    display: none;
  }

  .feed__ad {
    display: block;
    grid-column: 1 / -1;
    padding: 8px;
    border-bottom: 1px solid var(--c-line);
  }

  .feed__ad .ad {
    margin: 0;
  }
}

@media (max-width: 700px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__list {
    border-left: 0;
    border-top: 1px solid var(--c-line);
  }

  .post {
    padding: 16px;
  }

  .post__title {
    font-size: 24px;
  }

  .post__body {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .brand__mark {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .brand__text {
    font-size: 10px;
  }

  .clock {
    font-size: 11px;
  }

  .weather {
    padding: 3px 8px 3px 7px;
    font-size: 12px;
  }
}

/* --- то, чего не было в прототипе: вывод самого WordPress --- */

/* Своё объявление: картинка целиком, без обрезки и без подложки.
   Высоту задаёт сам макет — рекламодатель прислал его в своей пропорции,
   и показать половину хуже, чем показать целиком. */
.ad--own {
  display: block;
  gap: 0;
  min-height: 0;
  padding: 0;
  background: none;
}

.ad--own .ad__own-image {
  width: 100%;
  height: auto;
  border-radius: inherit;
}

/* Пометка «Реклама» ложится поверх макета, поэтому ей нужна собственная
   подложка: на светлой картинке белый текст без неё пропадает. */
.ad__note--over {
  top: 6px;
  left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.55);
  color: #fff;
  opacity: 1;
}

@supports (backdrop-filter: blur(1px)) {
  .ad__note--over {
    background: rgba(8, 12, 20, 0.38);
    backdrop-filter: blur(6px);
  }
}

/* Маркировка идёт под макетом мелкой строкой — так же, как её показывают
   на нынешнем сайте. */
.ad__erid {
  display: block;
  padding: 3px 6px;
  color: var(--c-muted);
  font-size: 10px;
  text-align: right;
}

/* Собственный класс WordPress для скрытого текста. */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Выравнивания и подписи из редактора. */
.post__body .alignleft {
  float: left;
  margin: 0 1em 0.6em 0;
}

.post__body .alignright {
  float: right;
  margin: 0 0 0.6em 1em;
}

.post__body .aligncenter {
  margin-left: auto;
  margin-right: auto;
}

/* Широкие блоки редактора выходят за меру строки — она задана для текста,
   а не для иллюстраций. */
.post__body .alignwide,
.post__body .alignfull {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.post__body .wp-caption,
.post__body figure {
  max-width: 100%;
  margin: 1.4em 0;
}

.post__body .wp-caption-text,
.post__body figcaption {
  margin-top: 7px;
  color: var(--c-muted);
  font-size: 13px;
  line-height: 1.45;
}

.post__body ul,
.post__body ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
  list-style: revert;
}

.post__body table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--r-sm);
  box-shadow: inset 0 0 0 1px var(--c-line);
  font-size: 15px;
  overflow: hidden;
}

.post__body th,
.post__body td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--c-line-soft);
  text-align: left;
}

.post__body th {
  background: color-mix(in srgb, var(--c-accent) 5%, #fff);
  font-weight: 650;
}

.post__body tr:last-child td {
  border-bottom: 0;
}

.post__pages {
  margin-top: 1em;
  font-weight: 600;
}

/* Поиск. Поля ввода — единственное место, где нужна видимая граница:
   волосяной линии карточек для них мало, поле должно читаться как поле. */
.searchform {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.searchform__field {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid rgba(16, 24, 40, 0.18);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.searchform__field:focus {
  outline: 0;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 18%, transparent);
}

.searchform__submit {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--c-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.searchform__submit:hover {
  background: var(--c-accent-dark);
}

/* Постраничная навигация архивов. */
.pagination {
  margin-top: var(--gap);
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination .page-numbers {
  display: block;
  min-width: 40px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--c-card);
  box-shadow: var(--sh-card), inset 0 0 0 1px var(--c-line-soft);
  font-size: 14px;
  text-align: center;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.pagination .page-numbers:hover {
  color: var(--c-accent);
}

.pagination .page-numbers.current {
  background: var(--c-accent);
  box-shadow: none;
  color: #fff;
  font-weight: 700;
}

.pagination .dots {
  background: none;
  box-shadow: none;
}

/* Комментарии. На сайте они выключены, но тема не должна разваливаться,
   если их когда-нибудь включат. */
.comment-list {
  margin: 0 0 1em;
  padding: 0;
  list-style: none;
}

.comment-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--c-line-soft);
}

.comment-list .children {
  margin-left: 20px;
  padding-left: 14px;
  border-left: 2px solid var(--c-line);
  list-style: none;
}

.comment-form input[type='text'],
.comment-form input[type='email'],
.comment-form input[type='url'],
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(16, 24, 40, 0.18);
  border-radius: var(--r-sm);
  background: #fff;
  font: inherit;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.comment-form input[type='text']:focus,
.comment-form input[type='email']:focus,
.comment-form input[type='url']:focus,
.comment-form textarea:focus {
  outline: 0;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 18%, transparent);
}

.comment-form .submit {
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--c-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
