/* ===================================================================
   Макеты сайта. Подключается, если выбран не «Классический» макет.
   Выбор макета: Настройки → Основное → Макет сайта (только админ).
   Структура меняется только на широких экранах, на телефоне — как обычно.
   =================================================================== */

/* ---------- Журнал ---------- */
html[data-layout="magazine"] { --radius: 0px; }
html[data-layout="magazine"] .card__img, html[data-layout="magazine"] .card__tag, html[data-layout="magazine"] .post__cover, html[data-layout="magazine"] .chips a { border-radius: 0; }
html[data-layout="magazine"] .card__title, html[data-layout="magazine"] .block__title, html[data-layout="magazine"] .list-title, html[data-layout="magazine"] .post__title {
  font-family: Georgia, "Times New Roman", serif;
}
html[data-layout="magazine"] .block__title { text-transform: uppercase; letter-spacing: .04em; font-size: 22px; padding-bottom: 8px; border-bottom: 3px solid var(--accent); }
html[data-layout="magazine"] .block__head { display: block; }
html[data-layout="magazine"] .block__all { display: none; }
@media (min-width: 961px) {
  html[data-layout="magazine"] .header { position: relative; }
  html[data-layout="magazine"] .header__in { position: relative; height: auto; flex-wrap: wrap; justify-content: center; gap: 0; padding-top: 20px; padding-bottom: 0; }
  html[data-layout="magazine"] .logo { flex-basis: 100%; justify-content: center; }
  html[data-layout="magazine"] .logo__name { font-size: 30px; font-family: Georgia, "Times New Roman", serif; letter-spacing: -.01em; }
  html[data-layout="magazine"] .nav { flex-basis: 100%; margin-top: 16px; border-top: 1px solid var(--line); padding: 6px 0; }
  html[data-layout="magazine"] .header__tools { position: absolute; right: 32px; top: 18px; margin: 0; }
  /* Строка поиска в шапке: стоит в одной строке с меню справа, а не отдельной строкой под ним. */
  html[data-layout="magazine"][data-search-in] .header__in { align-items: center; }
  html[data-layout="magazine"][data-search-in] .logo { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
  html[data-layout="magazine"][data-search-in] .nav { flex: 1 1 0; flex-basis: 0; min-width: 0; margin-top: 0; border-top: 0; padding: 6px 0 6px 250px; }
  html[data-layout="magazine"][data-search-in] .header__in > .hsearch { margin: 6px 0; }
  html[data-layout="magazine"] .panel { background: transparent; padding-left: 0; padding-right: 0; }
  html[data-layout="magazine"] .panel > .block:first-of-type .grid3 > .card:first-child,
  html[data-layout="magazine"] .grid3[data-infinite] > .card:first-child { grid-column: span 2; }
  html[data-layout="magazine"] .panel > .block:first-of-type .grid3 > .card:first-child .card__title,
  html[data-layout="magazine"] .grid3[data-infinite] > .card:first-child .card__title { font-size: 28px; line-height: 1.25; }
}

/* ---------- Блог ---------- */
@media (min-width: 601px) {
  html[data-layout="blog"] .header__in, html[data-layout="blog"] .hsearch, html[data-layout="blog"] .wrap { max-width: 1000px; }
  html[data-layout="blog"] .grid3 { grid-template-columns: 1fr; gap: 28px; }
  html[data-layout="blog"] .grid3 > .card:not(.card--small) { display: grid; grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 24px; align-items: start; }
  html[data-layout="blog"] .grid3 > .card:not(.card--small) .card__link { display: contents; }
  html[data-layout="blog"] .grid3 > .card:not(.card--small) .card__img { grid-row: 1 / 3; }
  html[data-layout="blog"] .grid3 > .card:not(.card--small) .card__title { margin-top: 0; font-size: 22px; }
  html[data-layout="blog"] .grid3 > .card:not(.card--small) .card__meta { align-self: start; }
}

/* ---------- Минимализм ---------- */
html[data-layout="minimal"] { --radius: 6px; }
html[data-layout="minimal"] .grid3 > .card:not(.card--small) .card__img { display: none; }
html[data-layout="minimal"] .grid3 { grid-template-columns: 1fr; gap: 0; }
html[data-layout="minimal"] .grid3 > .card:not(.card--small) { padding: 20px 0; border-bottom: 1px solid var(--line); }
html[data-layout="minimal"] .grid3 > .card:not(.card--small) .card__title { margin: 0; font-size: 22px; }
html[data-layout="minimal"] .grid3 > .card:not(.card--small) .card__meta { margin-top: 6px; }
html[data-layout="minimal"] .block__title, html[data-layout="minimal"] .list-title { font-size: 22px; text-transform: none; }
html[data-layout="minimal"] .block + .block { border-top: 0; }
@media (min-width: 961px) {
  html[data-layout="minimal"] .header__in, html[data-layout="minimal"] .hsearch, html[data-layout="minimal"] .wrap { max-width: 880px; }
  html[data-layout="minimal"] .panel { background: transparent; padding-left: 0; padding-right: 0; }
}

/* ---------- Плитки ---------- */
html[data-layout="tiles"] .grid3 > .card:not(.card--small) .card__link { position: relative; }
html[data-layout="tiles"] .grid3 > .card:not(.card--small) .card__img { aspect-ratio: 4 / 5; border-radius: var(--radius); }
html[data-layout="tiles"] .grid3 > .card:not(.card--small) .card__title {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 56px 16px 16px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85)); border-radius: 0 0 var(--radius) var(--radius); font-size: 19px;
}
html[data-layout="tiles"] .grid3 > .card:not(.card--small) .card__link:hover .card__title { color: #fff; }
html[data-layout="tiles"] .grid3 > .card:not(.card--small) .card__tag { top: 12px; bottom: auto; }
html[data-layout="tiles"] .grid3 { gap: 20px; }

/* ---------- Новостная лента ---------- */
@media (min-width: 961px) {
  html[data-layout="news"] .header__in { height: 60px; }
  html[data-layout="news"] .header__in, html[data-layout="news"] .hsearch, html[data-layout="news"] .wrap { max-width: 1440px; }
  html[data-layout="news"] .panel { padding: 20px 24px 32px; }
  html[data-layout="news"] .grid3 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 18px; }
}
html[data-layout="news"] .grid3 > .card:not(.card--small) .card__img { aspect-ratio: 3 / 2; }
html[data-layout="news"] .grid3 > .card:not(.card--small) .card__title { font-size: 15px; margin-top: 10px; }
html[data-layout="news"] .card__meta { font-size: 12px; margin-top: 6px; }
html[data-layout="news"] .block__title { font-size: 22px; }
html[data-layout="news"] .list-title { font-size: 24px; }

/* ---------- Обложка: первая статья — широким баннером ---------- */
html[data-layout="hero"] .panel > .block:first-of-type .grid3 > .card:first-child,
html[data-layout="hero"] .grid3[data-infinite] > .card:first-child { grid-column: 1 / -1; position: relative; }
html[data-layout="hero"] .panel > .block:first-of-type .grid3 > .card:first-child .card__img,
html[data-layout="hero"] .grid3[data-infinite] > .card:first-child .card__img { aspect-ratio: 21 / 9; }
html[data-layout="hero"] .panel > .block:first-of-type .grid3 > .card:first-child .card__title,
html[data-layout="hero"] .grid3[data-infinite] > .card:first-child .card__title {
  position: absolute; left: 0; right: 0; bottom: 44px; margin: 0; padding: 70px 28px 20px; color: #fff; font-size: 30px; line-height: 1.2;
  background: linear-gradient(transparent, rgba(0, 0, 0, .82));
}
html[data-layout="hero"] .panel > .block:first-of-type .grid3 > .card:first-child .card__link:hover .card__title,
html[data-layout="hero"] .grid3[data-infinite] > .card:first-child .card__link:hover .card__title { color: #fff; }
html[data-layout="hero"] .panel > .block:first-of-type .grid3 > .card:first-child .card__link,
html[data-layout="hero"] .grid3[data-infinite] > .card:first-child .card__link { display: block; }
@media (max-width: 700px) {
  html[data-layout="hero"] .panel > .block:first-of-type .grid3 > .card:first-child .card__title,
  html[data-layout="hero"] .grid3[data-infinite] > .card:first-child .card__title { font-size: 20px; padding: 40px 16px 14px; }
  html[data-layout="hero"] .grid3 > .card:first-child .card__img { aspect-ratio: 16 / 10; }
}

/* ---------- Мозаика: колонки карточек разной высоты ---------- */
html[data-layout="mosaic"] .grid3 { display: block; column-count: 3; column-gap: 22px; }
html[data-layout="mosaic"] .grid3 > .card { display: block; break-inside: avoid; margin: 0 0 26px; }
html[data-layout="mosaic"] .grid3 > .card:not(.card--small):nth-child(3n + 1) .card__img { aspect-ratio: 4 / 5; }
html[data-layout="mosaic"] .grid3 > .card:not(.card--small):nth-child(3n + 2) .card__img { aspect-ratio: 1 / 1; }
html[data-layout="mosaic"] .grid3 > .card:not(.card--small):nth-child(3n) .card__img { aspect-ratio: 16 / 10; }
@media (max-width: 960px) { html[data-layout="mosaic"] .grid3 { column-count: 2; } }
@media (max-width: 560px) { html[data-layout="mosaic"] .grid3 { column-count: 1; } }

/* ---------- Компактный список: маленькая картинка слева ---------- */
html[data-layout="compact"] .grid3 { grid-template-columns: 1fr; gap: 0; }
html[data-layout="compact"] .grid3 > .card:not(.card--small) { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
html[data-layout="compact"] .grid3 > .card:not(.card--small) .card__link { display: contents; }
html[data-layout="compact"] .grid3 > .card:not(.card--small) .card__img { grid-row: 1 / 3; aspect-ratio: 4 / 3; }
html[data-layout="compact"] .grid3 > .card:not(.card--small) .card__title { margin: 0; font-size: 18px; }
html[data-layout="compact"] .grid3 > .card:not(.card--small) .card__meta { margin-top: 6px; align-self: start; }
html[data-layout="compact"] .grid3 > .card:not(.card--small) .card__tag { display: none; }
@media (max-width: 560px) {
  html[data-layout="compact"] .grid3 > .card:not(.card--small) { grid-template-columns: 110px minmax(0, 1fr); column-gap: 12px; }
  html[data-layout="compact"] .grid3 > .card:not(.card--small) .card__title { font-size: 16px; }
}

/* ---------- По центру: узкая колонка, крупные карточки ---------- */
html[data-layout="centered"] .grid3 { grid-template-columns: 1fr; gap: 44px; max-width: 720px; margin: 0 auto; }
html[data-layout="centered"] .grid3 > .card:not(.card--small) { text-align: center; }
html[data-layout="centered"] .grid3 > .card:not(.card--small) .card__img { aspect-ratio: 3 / 2; }
html[data-layout="centered"] .grid3 > .card:not(.card--small) .card__title { font-size: 26px; margin-top: 18px; }
html[data-layout="centered"] .grid3 > .card:not(.card--small) .card__meta { justify-content: center; }
html[data-layout="centered"] .block__head { justify-content: center; text-align: center; }
@media (min-width: 961px) {
  html[data-layout="centered"] .header__in, html[data-layout="centered"] .hsearch, html[data-layout="centered"] .wrap { max-width: 1000px; }
}
html[data-layout="hero"] .panel > .block:first-of-type .grid3 > .card:first-child .card__tag,
html[data-layout="hero"] .grid3[data-infinite] > .card:first-child .card__tag { top: 14px; bottom: auto; }

/* ===================================================================
   Страница статьи: у каждого макета свой вид (ширина колонки, заголовок, обложка, боковая колонка)
   =================================================================== */

/* ---------- Журнал: крупный заголовок с засечками, буквица ---------- */
html[data-article="magazine"] .crumbs { justify-content: center; }
html[data-article="magazine"] .post-head { text-align: center; max-width: 900px; margin: 0 auto 26px; }
html[data-article="magazine"] .post__title { font-family: Georgia, "Times New Roman", serif; font-size: 42px; line-height: 1.2; letter-spacing: -.01em; }
html[data-article="magazine"] .post__subtitle { font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-style: italic; }
html[data-article="magazine"] .post__meta { justify-content: center; }
html[data-article="magazine"] .post__cover { border-radius: 0; max-height: 640px; }
html[data-article="magazine"] .content { font-family: Georgia, "Times New Roman", serif; font-size: 19px; }
html[data-article="magazine"] .content > p:first-of-type::first-letter { float: left; padding: 6px 10px 0 0; font-size: 3.6em; line-height: .85; font-weight: 700; color: var(--accent); }
@media (max-width: 700px) { html[data-article="magazine"] .post__title { font-size: 30px; } }

/* ---------- Блог: одна узкая колонка, без боковой панели ---------- */
html[data-article="blog"] .post__title { font-size: 34px; }
@media (min-width: 961px) {
  html[data-article="blog"] .post-layout { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin-left: auto; margin-right: auto; }
  html[data-article="blog"] .post-aside { display: none; }
  html[data-article="blog"] .post-head, html[data-article="blog"] .post__cover, html[data-article="blog"] .crumbs { max-width: 760px; margin-left: auto; margin-right: auto; }
}

/* ---------- Минимализм: только текст, без обложки и боковой панели ---------- */
html[data-article="minimal"] .post__cover { display: none; }
html[data-article="minimal"] .post__title { font-size: 32px; font-weight: 600; }
html[data-article="minimal"] .post__subtitle { font-size: 18px; }
html[data-article="minimal"] .content { line-height: 1.75; }
@media (min-width: 961px) {
  html[data-article="minimal"] .post-layout { grid-template-columns: minmax(0, 1fr); max-width: 680px; margin-left: auto; margin-right: auto; }
  html[data-article="minimal"] .post-aside { display: none; }
  html[data-article="minimal"] .post-head, html[data-article="minimal"] .crumbs { max-width: 680px; margin-left: auto; margin-right: auto; }
}



/* ---------- tiles: заголовок поверх обложки (оба элемента в одной ячейке сетки — заголовок всегда внутри картинки) ---------- */
html[data-article="tiles"] .post-page { display: grid; grid-template-columns: minmax(0, 1fr); }
html[data-article="tiles"] .post-page > * { grid-column: 1; }
html[data-article="tiles"] .post-page > .crumbs { grid-row: 1; }
html[data-article="tiles"] .post__cover { grid-row: 2; width: 100%; height: 100%; min-height: 380px; max-height: none; aspect-ratio: auto; object-fit: cover; border-radius: 22px; }
html[data-article="tiles"] .post-head { grid-row: 2; align-self: end; position: relative; z-index: 1; margin: 0; padding: 90px 30px 22px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .86)); border-radius: 0 0 22px 22px; }
html[data-article="tiles"] .post-page > .ad { grid-row: 3; }
html[data-article="tiles"] .post-page > .post-layout { grid-row: 4; }
html[data-article="tiles"] .post-head :is(.post__title, .post__subtitle, .post__meta, .post__author, .post-byline a) { color: #fff; }
html[data-article="tiles"] .post-head .post__subtitle { opacity: .92; margin-bottom: 12px; }
html[data-article="tiles"] .post-head .post-byline { display: flex; margin: 0 0 8px; }
html[data-article="tiles"] .post-head .post-byline__who time { display: none; }
html[data-article="tiles"] .post-head .post__meta .post__author { display: none; }
html[data-article="tiles"] .post-page:not(:has(.post__cover)) .post-head { grid-row: 2; padding: 0; margin: 0 0 20px; background: none; color: inherit; }
html[data-article="tiles"] .post-page:not(:has(.post__cover)) .post-head :is(.post__title, .post__subtitle) { color: var(--text); }
html[data-article="tiles"] .post-page:not(:has(.post__cover)) .post-head :is(.post__meta, .post__author, .post-byline a) { color: var(--meta); }
@media (max-width: 700px) {
  html[data-article="tiles"] .post__cover { min-height: 300px; }
  html[data-article="tiles"] .post-head { padding: 70px 16px 16px; }
  html[data-article="tiles"] .post__title { font-size: 22px; }
}

/* ---------- hero: заголовок поверх обложки (оба элемента в одной ячейке сетки — заголовок всегда внутри картинки) ---------- */
html[data-article="hero"] .post-page { display: grid; grid-template-columns: minmax(0, 1fr); }
html[data-article="hero"] .post-page > * { grid-column: 1; }
html[data-article="hero"] .post-page > .crumbs { grid-row: 1; }
html[data-article="hero"] .post__cover { grid-row: 2; width: 100%; height: 100%; min-height: 440px; max-height: none; aspect-ratio: auto; object-fit: cover; border-radius: 0px; }
html[data-article="hero"] .post-head { grid-row: 2; align-self: end; position: relative; z-index: 1; margin: 0; padding: 90px 30px 22px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .86)); border-radius: 0 0 0px 0px; }
html[data-article="hero"] .post-page > .ad { grid-row: 3; }
html[data-article="hero"] .post-page > .post-layout { grid-row: 4; }
html[data-article="hero"] .post-head :is(.post__title, .post__subtitle, .post__meta, .post__author, .post-byline a) { color: #fff; }
html[data-article="hero"] .post-head .post__subtitle { opacity: .92; margin-bottom: 12px; }
html[data-article="hero"] .post-head .post-byline { display: flex; margin: 0 0 8px; }
html[data-article="hero"] .post-head .post-byline__who time { display: none; }
html[data-article="hero"] .post-head .post__meta .post__author { display: none; }
html[data-article="hero"] .post-page:not(:has(.post__cover)) .post-head { grid-row: 2; padding: 0; margin: 0 0 20px; background: none; color: inherit; }
html[data-article="hero"] .post-page:not(:has(.post__cover)) .post-head :is(.post__title, .post__subtitle) { color: var(--text); }
html[data-article="hero"] .post-page:not(:has(.post__cover)) .post-head :is(.post__meta, .post__author, .post-byline a) { color: var(--meta); }
@media (max-width: 700px) {
  html[data-article="hero"] .post__cover { min-height: 300px; }
  html[data-article="hero"] .post-head { padding: 70px 16px 16px; }
  html[data-article="hero"] .post__title { font-size: 22px; }
}

/* ---------- trio: заголовок поверх обложки (оба элемента в одной ячейке сетки — заголовок всегда внутри картинки) ---------- */
html[data-article="trio"] .post-page { display: grid; grid-template-columns: minmax(0, 1fr); }
html[data-article="trio"] .post-page > * { grid-column: 1; }
html[data-article="trio"] .post-page > .crumbs { grid-row: 1; }
html[data-article="trio"] .post__cover { grid-row: 2; width: 100%; height: 100%; min-height: 400px; max-height: none; aspect-ratio: auto; object-fit: cover; border-radius: 14px; }
html[data-article="trio"] .post-head { grid-row: 2; align-self: end; position: relative; z-index: 1; margin: 0; padding: 90px 30px 22px; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .86)); border-radius: 0 0 14px 14px; }
html[data-article="trio"] .post-page > .ad { grid-row: 3; }
html[data-article="trio"] .post-page > .post-layout { grid-row: 4; }
html[data-article="trio"] .post-head :is(.post__title, .post__subtitle, .post__meta, .post__author, .post-byline a) { color: #fff; }
html[data-article="trio"] .post-head .post__subtitle { opacity: .92; margin-bottom: 12px; }
html[data-article="trio"] .post-head .post-byline { display: flex; margin: 0 0 8px; }
html[data-article="trio"] .post-head .post-byline__who time { display: none; }
html[data-article="trio"] .post-head .post__meta .post__author { display: none; }
html[data-article="trio"] .post-page:not(:has(.post__cover)) .post-head { grid-row: 2; padding: 0; margin: 0 0 20px; background: none; color: inherit; }
html[data-article="trio"] .post-page:not(:has(.post__cover)) .post-head :is(.post__title, .post__subtitle) { color: var(--text); }
html[data-article="trio"] .post-page:not(:has(.post__cover)) .post-head :is(.post__meta, .post__author, .post-byline a) { color: var(--meta); }
@media (max-width: 700px) {
  html[data-article="trio"] .post__cover { min-height: 300px; }
  html[data-article="trio"] .post-head { padding: 70px 16px 16px; }
  html[data-article="trio"] .post__title { font-size: 22px; }
}

/* ---------- Новостная лента: плотнее, шире боковая колонка ---------- */
html[data-article="news"] .post__title { font-size: 28px; }
html[data-article="news"] .post__subtitle { font-size: 16px; }
html[data-article="news"] .post__cover { max-height: 380px; }
html[data-article="news"] .content { font-size: 17px; line-height: 1.55; }
@media (min-width: 961px) { html[data-article="news"] .post-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; } }

/* ---------- Мозаика: широкая страница, текст в две колонки ---------- */
html[data-article="mosaic"] .post__cover { max-height: 720px; }
@media (min-width: 961px) {
  html[data-article="mosaic"] .post-layout { grid-template-columns: minmax(0, 1fr); }
  html[data-article="mosaic"] .post-aside { display: none; }
  html[data-article="mosaic"] .post { max-width: 1040px; margin: 0 auto; }
  html[data-article="mosaic"] .post .content { column-count: 2; column-gap: 52px; }
  html[data-article="mosaic"] .post .content :is(img, figure, table, blockquote, .gallery, .note, .proscons, iframe) { break-inside: avoid; }
  html[data-article="mosaic"] .post .content :is(h1, h2, h3) { break-after: avoid; }
}

/* ---------- Компактный список: обложка небольшой справа ---------- */
html[data-article="compact"] .post__title { font-size: 26px; }
html[data-article="compact"] .content { font-size: 16.5px; line-height: 1.55; }
@media (min-width: 761px) {
  html[data-article="compact"] .post__cover { float: right; width: 340px; max-width: 42%; margin: 0 0 16px 28px; border-radius: 10px; aspect-ratio: 4 / 3; }
}

/* ---------- По центру: узкая колонка, заголовок по центру ---------- */
html[data-article="centered"] .crumbs { justify-content: center; }
html[data-article="centered"] .post-head { text-align: center; max-width: 760px; margin: 0 auto 24px; }
html[data-article="centered"] .post__meta { justify-content: center; }
html[data-article="centered"] .post__cover { max-width: 960px; margin-left: auto; margin-right: auto; }
html[data-article="centered"] .content { font-size: 19px; line-height: 1.75; }
@media (min-width: 961px) {
  html[data-article="centered"] .post-layout { grid-template-columns: minmax(0, 1fr); max-width: 720px; margin-left: auto; margin-right: auto; }
  html[data-article="centered"] .post-aside { display: none; }
}

/* ===================================================================
   Новые виды страницы статьи: расположение боковых панелей
   =================================================================== */
.post-byline__ava { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 17px; }
.post-byline { align-items: center; gap: 12px; }
.post-byline__who { display: grid; line-height: 1.3; }
.post-byline__who a { font-weight: 700; color: var(--text); }
.post-byline__who time { font-size: 13px; color: var(--muted); }

/* ---------- Сайдбар слева ---------- */
@media (min-width: 961px) {
  html[data-article="left"] .post-layout { grid-template-columns: 340px minmax(0, 1fr); }
  html[data-article="left"] .post-aside { grid-column: 1; grid-row: 1; }
  html[data-article="left"] .post { grid-column: 2; grid-row: 1; }
}
html[data-article="left"] .post-rail, html[data-article="trio"] .post-rail, html[data-article="cookbook"] .post-rail { display: none !important; }
html[data-article="left"] .post-share-inline, html[data-article="trio"] .post-share-inline, html[data-article="cookbook"] .post-share-inline { display: flex !important; }

/* ---------- Без сайдбара: широкий текст ---------- */
html[data-article="wide"] .post-layout { grid-template-columns: minmax(0, 1fr); }
html[data-article="wide"] .post-aside { display: none; }
html[data-article="wide"] .post { max-width: 980px; margin: 0 auto; }
html[data-article="wide"] .content { font-size: 19px; line-height: 1.7; }

/* ---------- Узкая колонка: дата и просмотры над заголовком, автор под ним ---------- */
html[data-article="focus"] .post-page { max-width: 840px; margin: 0 auto; padding: 26px 40px 44px; }
html[data-article="focus"] .post-head { display: flex; flex-direction: column; margin-bottom: 18px; }
html[data-article="focus"] .post__meta { order: -1; margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
html[data-article="focus"] .post__meta .post__author { display: none; }
html[data-article="focus"] .post__title { font-size: 38px; line-height: 1.2; font-weight: 800; }
html[data-article="focus"] .post__subtitle { order: 1; }
html[data-article="focus"] .post-byline { display: flex; order: 2; margin: 0 0 6px; }
html[data-article="focus"] .post-layout { grid-template-columns: minmax(0, 1fr); padding-top: 14px; }
html[data-article="focus"] .post-aside { display: none; }
html[data-article="focus"] .post { max-width: none; }
html[data-article="focus"] .post__cover { border-radius: 14px; }
html[data-article="focus"] .content { font-size: 17.5px; line-height: 1.7; }
@media (max-width: 700px) { html[data-article="focus"] .post-page { padding: 18px 16px 30px; } html[data-article="focus"] .post__title { font-size: 26px; } }

/* ---------- Три колонки: информация о материале — текст — новости ---------- */
html[data-article="trio"] .post__title { font-size: 34px; }
@media (min-width: 1100px) {
  html[data-article="trio"] .post-layout { grid-template-columns: 230px minmax(0, 1fr) 310px; gap: 30px; }
  html[data-article="trio"] .post-info { display: block; grid-column: 1; grid-row: 1; position: sticky; top: 90px; align-self: start; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 14px; }
  html[data-article="trio"] .post { grid-column: 2; grid-row: 1; max-width: none; }
  html[data-article="trio"] .post-aside { grid-column: 3; grid-row: 1; }
}
.post-info__author { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.post-info__author small { display: block; color: var(--muted); font-size: 12px; }
.post-info__author a { font-weight: 700; color: var(--text); }
.post-info__list { margin: 0; }
.post-info__list > div { padding: 9px 0; border-top: 1px solid var(--line); }
.post-info__list dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.post-info__list dd { margin: 0; }
.post-info__tags a { display: inline-block; margin: 2px 6px 2px 0; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12px; }
.post-info .share { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- Заголовок слева, обложка справа ---------- */
html[data-article="split"] .post__title { font-size: 34px; }
@media (min-width: 861px) {
  html[data-article="split"] .post-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); column-gap: 36px; align-items: center; }
  html[data-article="split"] .post-page > * { grid-column: 1 / -1; }
  html[data-article="split"] .post-page > .post-head { grid-column: 1; grid-row: 2; margin: 0; }
  html[data-article="split"] .post-page > .post__cover { grid-column: 2; grid-row: 2; aspect-ratio: 4 / 3; max-height: none; }
  html[data-article="split"] .post-page:not(:has(.post__cover)) > .post-head { grid-column: 1 / -1; }
}

/* ---------- Кулинарная книга: рубрики слева, статьи по центру, популярное справа ---------- */
/* Шапка: логотип и кнопки сверху, цветная полоса меню на всю ширину ниже */
@media (min-width: 961px) {
  html[data-layout="cookbook"] .header__in { flex-wrap: wrap; height: auto; gap: 0 20px; padding-top: 12px; padding-bottom: 0; }
  html[data-layout="cookbook"] .logo { padding-bottom: 12px; }
  html[data-layout="cookbook"] .header__tools { padding-bottom: 12px; }
  html[data-layout="cookbook"] .nav { order: 3; flex: 1 0 100%; justify-content: flex-start; gap: 0; padding: 0; background: var(--accent); position: relative; z-index: 0; }
  html[data-layout="cookbook"] .nav::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: -100vmax; right: -100vmax; background: var(--accent); }
  html[data-layout="cookbook"] .nav__link { color: #fff; padding: 13px 16px; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; border-radius: 0; opacity: .92; }
  html[data-layout="cookbook"] .nav__link:hover, html[data-layout="cookbook"] .nav__link.on, html[data-layout="cookbook"] .nav__drop.on > .nav__link { color: #fff; opacity: 1; background: rgba(0, 0, 0, .16); }
}
html[data-layout="cookbook"] { --radius: 8px; }
html[data-layout="cookbook"] .wrap, html[data-layout="cookbook"] .header__in, html[data-layout="cookbook"] .hsearch { max-width: 1400px; }
html[data-layout="cookbook"] .panel { background: transparent; padding: 22px 0 32px; }

.cb { display: grid; grid-template-columns: 250px minmax(0, 1fr) 290px; gap: 24px; align-items: start; }
.cb-left { display: grid; gap: 18px; padding: 16px 16px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cb-cat { display: grid; gap: 6px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.cb-cat:last-child { border-bottom: 0; }
.cb-cat__title { font-weight: 800; font-size: 16px; color: var(--accent); }
.cb-cat__links { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cb-cat__links a { font-size: 13.5px; line-height: 1.35; color: var(--text-2); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 2px; }
.cb-cat__links a:hover { color: var(--accent); }
.cb-cat__all { font-size: 12.5px; color: var(--muted); }
.cb-cat__all:hover { color: var(--accent); }

.cb-count { padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.cb-count b { color: var(--accent); }
.cb-block { margin-bottom: 26px; }
.cb-block__bar { margin: 0 0 14px; padding: 10px 16px; border-radius: var(--radius); background: var(--accent); color: #fff; font-size: 22px; font-weight: 800; }
.cb-block__bar a { color: #fff; }
.cb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cb-grid--small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cb-grid .card { position: relative; }
.cb-grid .card__link { position: relative; display: block; }
.cb-grid .card__img { aspect-ratio: 16 / 10; border-radius: var(--radius); }
.cb-grid--small .card__img { aspect-ratio: 4 / 3; }
.cb-grid .card__title { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 34px 14px 12px; color: #fff; font-size: 17px; line-height: 1.25; border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(to top, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0)); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cb-grid--small .card__title { font-size: 14px; padding: 28px 10px 10px; }
.cb-grid .card__date { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 3px 9px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 700; }
.cb-grid .card__meta { display: none; }

.cb-right { display: grid; gap: 18px; }
.cb-pop, .cb-useful { padding: 0 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.cb-pop__title { margin: 0 0 8px; padding: 12px 16px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); font-size: 20px; font-weight: 800; }
.cb-useful h2 { margin: 0; padding: 12px 16px 6px; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.cb-pop ul, .cb-useful ul { list-style: none; margin: 0; padding: 0 16px; display: grid; gap: 9px; }
.cb-pop li, .cb-useful li { padding-left: 14px; position: relative; font-size: 14.5px; line-height: 1.35; }
.cb-pop li::before, .cb-useful li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.cb-pop a, .cb-useful a { color: var(--text-2); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 2px; }
.cb-pop a:hover, .cb-useful a:hover { color: var(--accent); }
@media (max-width: 1200px) { .cb { grid-template-columns: 220px minmax(0, 1fr); } .cb-right { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .cb { grid-template-columns: 1fr; gap: 18px; }
  .cb-main { order: 1; } .cb-right { order: 2; grid-template-columns: 1fr; } .cb-left { order: 3; }
  .cb-grid--small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html[data-layout="cookbook"] .panel { padding: 14px 0 24px; }
}
@media (max-width: 520px) { .cb-grid { grid-template-columns: 1fr; } .cb-count { font-size: 18px; } }

/* Страница статьи «Кулинарная книга»: слева рубрики, по центру текст, справа боковая колонка */
html[data-article="cookbook"] .post-page { display: grid; grid-template-columns: 250px minmax(0, 1fr); column-gap: 24px; align-items: start; }
html[data-article="cookbook"] .post-page > * { grid-column: 2; min-width: 0; }
html[data-article="cookbook"] .post-page > .cb-left { grid-column: 1; grid-row: 1 / span 12; }
html[data-article="cookbook"] .post-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 24px; }
html[data-article="cookbook"] .post__title { color: var(--accent); font-size: clamp(28px, 3.4vw, 40px); }
html[data-article="cookbook"] .post__cover { border-radius: var(--radius); }
.cb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 18px; padding: 8px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.cb-actions__btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 6px; font-weight: 700; font-size: 14.5px; color: var(--text); }
.cb-actions__btn:hover { background: var(--accent); color: #fff; }
.cb-actions__upd { margin-left: auto; padding-right: 12px; font-size: 13.5px; color: var(--muted); }
@media (max-width: 1200px) { html[data-article="cookbook"] .post-page { grid-template-columns: minmax(0, 1fr); } html[data-article="cookbook"] .post-page > * { grid-column: 1; } html[data-article="cookbook"] .post-page > .cb-left { display: none; } }
@media (max-width: 960px) { html[data-article="cookbook"] .post-layout { grid-template-columns: minmax(0, 1fr); } }
html[data-layout="cookbook"] .header { overflow-x: clip; }
.cb--noleft { grid-template-columns: minmax(0, 1fr) 290px; }
@media (max-width: 960px) { .cb--noleft { grid-template-columns: 1fr; } }
html[data-article="cookbook"] .post-page:not(:has(> .cb-left)) { grid-template-columns: minmax(0, 1fr); }
html[data-article="cookbook"] .post-page:not(:has(> .cb-left)) > * { grid-column: 1; }

/* Макет «Кулинарная книга»: строка поиска внутри цветной полосы меню */
@media (min-width: 961px) {
  html[data-layout="cookbook"] .header__in::after { content: ""; order: 2; flex: 1 0 100%; height: 0; }
  html[data-layout="cookbook"][data-search-in="nav"] .nav { flex: 1 1 0; min-width: 0; }
  html[data-layout="cookbook"][data-search-in="nav"] .header__in > .hsearch, html[data-layout="cookbook"][data-search-in="nav"] .header__in > .hsearch[hidden] {
    order: 3; align-self: stretch; align-items: center; width: 270px; margin: 0; padding: 0 0 0 16px; background: var(--accent); position: relative; z-index: 0; }
  html[data-layout="cookbook"][data-search-in="nav"] .header__in > .hsearch::before { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; right: -100vmax; background: var(--accent); }
  html[data-layout="cookbook"][data-search-in="nav"] .header__in > .hsearch input { background: rgba(255, 255, 255, .92); color: #222; border-color: transparent; }
  html[data-layout="cookbook"][data-search-in="nav"] .header__in > .hsearch .hsearch__list { top: calc(100% + 2px); background: var(--surface); }
}

/* Левая колонка: «…» и «+» раскрывают остальные ссылки в тот же ряд, без разрыва */
.cb-cat__rest { display: none; }
.cb-cat__chk:checked ~ .cb-cat__links .cb-cat__rest { display: contents; }
.cb-cat__tog { display: flex; justify-content: space-between; align-items: center; cursor: pointer; color: var(--muted); user-select: none; }
.cb-cat__plus { position: relative; width: 16px; height: 16px; }
.cb-cat__plus::before, .cb-cat__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--text); border-radius: 1px; }
.cb-cat__plus::after { transform: rotate(90deg); transition: transform .15s; }
.cb-cat__chk:checked ~ .cb-cat__tog .cb-cat__plus::after { transform: rotate(0); }
.cb-cat__chk:checked ~ .cb-cat__tog .cb-cat__dots { visibility: hidden; }
