.ar_page { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; width: min(1140px, 100%); margin: 0 auto; padding-bottom: 10px; }
/* ponytail: явных строк сетки — под 100 записей; выросла граница — добавить строк */
.ar_page_home { --ar_hero: 500px; grid-template-rows: calc(var(--ar_hero) / 2) calc(var(--ar_hero) / 2) auto repeat(50, auto) 1fr; }
.ar_page_home:not(:has(.ar_post)) { grid-template-rows: 0 0 auto repeat(50, auto) 1fr; }
.ar_page_cat { --ar_hero: 500px; grid-template-rows: calc(var(--ar_hero) * .55) calc(var(--ar_hero) * .45) auto repeat(100, auto) 1fr; }
.ar_page_flow { grid-template-rows: auto repeat(110, auto) 1fr; }

.ar_page_home .ar_post:nth-of-type(1) { grid-area: 1 / 1 / 3 / 7; }
.ar_page_home .ar_post:nth-of-type(2) { grid-area: 1 / 7 / 2 / 10; }
.ar_page_home .ar_post:nth-of-type(3) { grid-area: 1 / 10 / 2 / 13; }
.ar_page_home .ar_post:nth-of-type(4) { grid-area: 2 / 7 / 3 / 10; }
.ar_page_home .ar_post:nth-of-type(5) { grid-area: 2 / 10 / 3 / 13; }
.ar_page_home .ar_post:only-of-type { grid-area: 1 / 1 / 3 / 13; }
.ar_page_cat .ar_post:nth-of-type(1) { grid-area: 1 / 1 / 3 / 7; }
.ar_page_cat .ar_post:only-of-type { grid-area: 1 / 1 / 3 / 13; }
.ar_page_cat .ar_post:nth-of-type(2) { grid-area: 1 / 7 / 2 / 13; }
.ar_page_cat .ar_post:nth-of-type(3) { grid-area: 2 / 7 / 3 / 10; }
.ar_page_cat .ar_post:nth-of-type(4) { grid-area: 2 / 10 / 3 / 13; }
.ar_page_home:not(:has(.ar_post:nth-of-type(6))) .ar_heading { display: none; }
.ar_page_home .ar_empty { grid-row: 3; }

:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-self: stretch;
  padding: 0;
  overflow: hidden;
  background: #212121;
  border: solid #fff;
  border-width: 0 0 5px 5px;
}
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_post_pic { position: absolute; inset: 0; margin: 0; }
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_post_pic:empty { display: block; }
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_post_pic img { width: 100%; height: 100%; }
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_post_pic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .85)); }
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_post_text { position: relative; padding: 0 20px 18px 25px; color: #fff; }
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_chip { position: relative; left: 0; display: inline-block; margin: 0 0 8px; }
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_post_title { margin: 0 0 6px; font-size: 18px; line-height: 1.35; }
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_post_title a { color: #fff; }
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_post_desc { display: none; }
:is(.ar_page_home .ar_post:nth-of-type(-n + 5), .ar_page_cat .ar_post:nth-of-type(-n + 4)) .ar_post_meta { color: #ddd; }
.ar_page_home .ar_post:nth-of-type(1) .ar_post_title,
.ar_page_cat .ar_post:nth-of-type(1) .ar_post_title { font-size: 26px; line-height: 1.35; }

:is(.ar_page_flow > .ar_post, .ar_page_cat .ar_post:nth-of-type(n + 5)) { display: flex; gap: 30px; padding-right: 15px; }
:is(.ar_page_flow > .ar_post, .ar_page_cat .ar_post:nth-of-type(n + 5)) .ar_post_pic { flex: 0 0 360px; margin: 0; }
:is(.ar_page_flow > .ar_post, .ar_page_cat .ar_post:nth-of-type(n + 5)) .ar_post_pic img { height: 257px; }
:is(.ar_page_flow > .ar_post, .ar_page_cat .ar_post:nth-of-type(n + 5)) .ar_post_text { flex: 1 1 0; min-width: 0; }
:is(.ar_page_flow > .ar_post, .ar_page_cat .ar_post:nth-of-type(n + 5)) .ar_post_title { font-size: 22px; line-height: 1.4; }

@media (min-width: 1024px) {
  .ar_page_home .ar_heading,
  .ar_page_cat .ar_heading { grid-area: 3 / 1 / 4 / 9; }
  .ar_page_home .ar_empty { grid-column: 1 / 9; }
  .ar_page_home .ar_post:nth-of-type(n + 6):nth-of-type(even) { grid-column: 1 / 5; }
  .ar_page_home .ar_post:nth-of-type(n + 6):nth-of-type(odd) { grid-column: 5 / 9; }
  .ar_page_cat .ar_post:nth-of-type(n + 5) { grid-column: 1 / 9; }
  .ar_page_home .ar_side,
  .ar_page_cat .ar_side { grid-area: 3 / 9 / -1 / 13; }
  .ar_page_flow > :not(.ar_side) { grid-column: 1 / 9; }
  .ar_page_flow > .ar_side { grid-area: 1 / 9 / -1 / 13; }
}
