/**
 * Онфлот — визуальный слой.
 *
 * Значения взяты из свода дизайн-системы (docs/design/, «Спецификация для CSS»).
 * Родительский bam/style.css не подключается: оформление описано здесь целиком.
 *
 * 1  Переменные
 * 2  База и типографика
 * 3  Сетка страницы
 * 4  Служебная полоса, шапка, меню
 * 5  Мобильное меню и поиск
 * 6  Вводный блок главной
 * 7  Лента и карточки
 * 8  Пагинация
 * 9  Сайдбар
 * 10 Страница материала
 * 11 Рубрика и поиск
 * 12 Комментарии и формы
 * 13 Подвал
 * 14 Адаптив
 */

/* ------------------------------------------------------------------ 1. Переменные */

:root {
	--paper: #F2EDE3;
	--paper-2: #E8E0D1;
	--rule: #C4BEAC;
	--salt: #5F5C4D;
	--khaki: #3E4232;
	--shadow: #23261D;
	--pepper: #1C1B17;
	--minium: #B85A32;      /* только графика */
	--minium-ink: #9C4520;  /* текст, ссылки, кнопки */
	--minium-hover: #7E3517;

	--font-display: "PT Sans Narrow", "Arial Narrow", Arial, sans-serif;
	--font-text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	--step-1: 4px;
	--step-2: 8px;
	--step-3: 12px;
	--step-4: 16px;
	--step-5: 20px;
	--step-6: 26px;
	--step-7: 32px;
	--step-8: 40px;
	--step-9: 56px;
	--step-10: 80px;

	--container: 1240px;
	--sidebar: 320px;
	--sidebar-article: 340px;
	--gutter: 56px;
	--gutter-article: 60px;
}

/* ------------------------------------------------------------------ 2. База и типографика */

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

body {
	margin: 0;
	background: var(--paper);
	color: var(--pepper);
	font-family: var(--font-text);
	font-size: 18px;
	line-height: 1.65;
	-webkit-text-size-adjust: 100%;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	color: var(--shadow);
	line-height: 1.08;
	text-wrap: pretty;
}

p {
	margin: 0 0 var(--step-6);
	text-wrap: pretty;
}

a {
	color: var(--minium-ink);
	text-decoration: none;
	transition: color .15s ease;
}

a:hover,
a:focus {
	color: var(--minium-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--minium-ink);
	outline-offset: 2px;
}

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

button {
	font: inherit;
	cursor: pointer;
}

hr {
	border: 0;
	border-top: 1px solid var(--rule);
	margin: var(--step-8) 0;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
}

.skip-link:focus {
	left: var(--step-4);
	top: var(--step-4);
	z-index: 100;
	width: auto;
	height: auto;
	clip: auto;
	padding: var(--step-3) var(--step-5);
	background: var(--shadow);
	color: var(--paper);
}

.onflot-icon {
	display: block;
	flex: none;
}

.onflot-mark {
	display: block;
	flex: none;
}

.onflot-anchor {
	display: inline-block;
	vertical-align: middle;
	color: var(--minium-ink);
}

/* Служебная строка: рубрика, дата, подписи, кнопки. */
.cat-links,
.entry-date,
.entry-length,
.widget-title,
.menu-toggle,
.onflot-daymark,
.onflot-topbar__note,
.bam-date,
.page-numbers,
.onflot-share__label,
.onflot-years__item,
.crp-subtitle,
.onflot-catlist__meta,
.bam-breadcrumb-wrap {
	font-family: var(--font-display);
	letter-spacing: .2em;
	text-transform: uppercase;
	font-size: 13px;
	line-height: 1.2;
}

/* ------------------------------------------------------------------ 3. Сетка страницы */

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--step-5);
}

.site-content {
	padding: var(--step-7) 0 var(--step-10);
}

.site-content > .container {
	display: flex;
	align-items: flex-start;
	gap: var(--gutter);
}

.content-area {
	flex: 1 1 auto;
	min-width: 0;
}

.widget-area {
	flex: 0 0 var(--sidebar);
	width: var(--sidebar);
	position: sticky;
	top: var(--step-5);
}

.no-sidebar .site-content > .container,
.center-content .site-content > .container {
	display: block;
}

/* ------------------------------------------------------------------ 4. Служебная полоса, шапка, меню */

.bam-topbar {
	background: var(--shadow);
	color: #A8A395;
	padding: 7px 0;
}

.bam-topbar .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--step-4);
}

.bam-topbar .bam-date,
.bam-topbar .onflot-topbar__note {
	font-size: 12px;
	color: inherit;
}

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

#site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--step-7);
	padding: var(--step-6) var(--step-5) var(--step-5);
	max-width: var(--container);
	margin: 0 auto;
}

.site-branding-inner {
	display: flex;
	align-items: center;
	gap: var(--step-4);
}

.site-title {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 42px;
	line-height: .92;
	letter-spacing: -.01em;
}

.site-title a {
	color: var(--shadow);
}

.site-description {
	margin: 6px 0 0;
	font-family: var(--font-display);
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--salt);
}

body:not(.home) .site-title {
	font-size: 32px;
}

/* Меню */

.main-navigation {
	border-top: 1px solid var(--rule);
}

#site-navigation-inner {
	display: flex;
	align-items: center;
	gap: var(--step-6);
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--step-5);
	position: relative;
}

#primary-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--step-6);
	margin: 0;
	padding: 0;
	list-style: none;
	flex: 1 1 auto;
}

#primary-menu > li {
	position: relative;
}

#primary-menu a {
	display: block;
	padding: 15px 0;
	font-family: var(--font-display);
	font-size: 15px;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--shadow);
	white-space: nowrap;
}

#primary-menu > li > a:hover,
#primary-menu > li > a:focus {
	color: var(--minium-ink);
}

#primary-menu > li.current-menu-item > a,
#primary-menu > li.current-menu-ancestor > a,
#primary-menu > li.current-menu-parent > a {
	color: var(--minium-ink);
	box-shadow: inset 0 -2px 0 var(--minium-ink);
}

#primary-menu .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-left: 7px;
	border-right: 1.5px solid var(--salt);
	border-bottom: 1.5px solid var(--salt);
	transform: translateY(-2px) rotate(45deg);
}

#primary-menu .sub-menu {
	position: absolute;
	left: -14px;
	top: 100%;
	z-index: 30;
	min-width: 240px;
	margin: 0;
	padding: var(--step-2) 0;
	list-style: none;
	background: var(--shadow);
	visibility: hidden;
	opacity: 0;
	transition: opacity .12s ease;
}

#primary-menu li:hover > .sub-menu,
#primary-menu li.focus > .sub-menu {
	visibility: visible;
	opacity: 1;
}

#primary-menu .sub-menu a {
	padding: 9px 18px;
	color: var(--paper);
	font-size: 14px;
	letter-spacing: .1em;
	white-space: normal;
}

#primary-menu .sub-menu a:hover,
#primary-menu .sub-menu a:focus {
	color: #D9A075;
}

#primary-menu .sub-menu .sub-menu {
	position: static;
	visibility: visible;
	opacity: 1;
	padding: 0 0 0 var(--step-4);
	border-left: 1px solid #3E4232;
	margin-left: 18px;
}

/* Поиск в шапке */

.bam-search-button-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--salt);
	cursor: pointer;
	flex: none;
}

.bam-search-button-icon:hover {
	color: var(--minium-ink);
}

.bam-search-button-icon i {
	display: none;
}

.bam-search-box-container {
	position: absolute;
	right: var(--step-5);
	top: calc(100% + 6px);
	z-index: 40;
	width: min(420px, calc(100vw - 40px));
	display: none;
}

.bam-search-box-container.active {
	display: block;
}

.bam-search-box {
	background: var(--shadow);
	padding: var(--step-3);
}

.search-form {
	display: flex;
	gap: var(--step-2);
	align-items: center;
}

.search-form label {
	flex: 1 1 auto;
	margin: 0;
}

.search-field {
	width: 100%;
	height: 44px;
	padding: 0 13px;
	border: 1px solid var(--rule);
	background: var(--paper);
	color: var(--pepper);
	font-family: var(--font-text);
	font-size: 16px;
}

.search-field::placeholder {
	color: var(--salt);
}

.search-submit {
	height: 44px;
	padding: 0 14px;
	border: 0;
	background: var(--minium-ink);
	color: var(--paper);
	display: flex;
	align-items: center;
}

.search-submit:hover {
	background: var(--minium-hover);
}

.menu-toggle {
	display: none;
	align-items: center;
	gap: var(--step-2);
	padding: 13px 0;
	border: 0;
	background: none;
	color: var(--shadow);
	font-family: var(--font-display);
	font-size: 15px;
	letter-spacing: .13em;
	text-transform: uppercase;
}

.menu-toggle i {
	display: none;
}

/* ------------------------------------------------------------------ 5. Мобильное меню */

.mobile-dropdown {
	display: none;
	background: var(--paper);
	border-bottom: 1px solid var(--rule);
}

.mobile-dropdown:has(> .mobile-navigation.toggled-on) {
	display: block;
}

.mobile-dropdown__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--step-4) var(--step-5);
	background: var(--shadow);
	color: var(--paper);
}

.mobile-dropdown__brand {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 24px;
}

.mobile-dropdown__close {
	display: flex;
	align-items: center;
	gap: 6px;
	border: 0;
	background: none;
	color: var(--paper);
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.mobile-dropdown__search {
	padding: var(--step-4) var(--step-5) 0;
}

.mobile-navigation ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mobile-navigation li {
	border-bottom: 1px solid var(--rule);
	position: relative;
}

.mobile-navigation a {
	display: block;
	padding: 15px var(--step-5);
	min-height: 48px;
	font-family: var(--font-display);
	font-size: 20px;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--shadow);
}

.mobile-navigation .sub-menu {
	display: none;
	background: var(--paper-2);
}

.mobile-navigation .sub-menu.toggled-on {
	display: block;
}

.mobile-navigation .sub-menu a {
	font-size: 17px;
	text-transform: none;
	letter-spacing: .02em;
	padding-left: var(--step-8);
}

.mobile-navigation .sub-menu .sub-menu a {
	padding-left: 60px;
}

.dropdown-toggle {
	position: absolute;
	right: 0;
	top: 0;
	width: 56px;
	height: 52px;
	border: 0;
	background: none;
	color: var(--salt);
}

.dropdown-toggle::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 8px;
	height: 8px;
	margin: -6px 0 0 -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.dropdown-toggle.toggled-on::after {
	transform: rotate(-135deg);
	margin-top: -2px;
}

/* ------------------------------------------------------------------ 6. Вводный блок главной */

.onflot-intro {
	margin: 0 0 var(--step-8);
	padding: var(--step-6);
	background: var(--paper-2);
	border: 0;
	border-top: 3px solid var(--minium);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--step-7);
}

.onflot-intro__lead {
	margin: 0;
	color: var(--khaki);
	line-height: 1.6;
	font-size: 17px;
}

.onflot-intro__links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.onflot-intro__links li {
	position: relative;
	margin: 0 0 var(--step-3);
	padding-left: 26px;
	line-height: 1.5;
	font-size: 16px;
	color: var(--khaki);
}

.onflot-intro__links li::before {
	content: "";
	position: absolute;
	left: 0;
	top: calc((1.5em - 15px) / 2);
	width: 15px;
	height: 15px;
	background-color: var(--minium-ink);
	-webkit-mask: var(--anchor-mask) center / contain no-repeat;
	mask: var(--anchor-mask) center / contain no-repeat;
}

.onflot-intro__links a {
	font-weight: 600;
}

.onflot-intro__count {
	display: inline-block;
	margin-left: 4px;
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--salt);
	white-space: nowrap;
}

:root {
	--anchor-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='4.5' r='2'/%3E%3Cpath d='M12 6.5V21'/%3E%3Cpath d='M7.5 9.5h9'/%3E%3Cpath d='M4 14c0 4.4 3.6 7 8 7s8-2.6 8-7'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------------ 7. Лента и карточки */

.onflot-feed {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 36px;
	align-items: start;
}

/* Полосы дня, ведущая и свежие карточки занимают обе колонки. */
.onflot-daymark,
.onflot-entry.is-lead,
.onflot-entry.group-today,
.onflot-entry.group-yesterday,
.onflot-feed > .navigation,
.onflot-feed > .page-header {
	grid-column: 1 / -1;
}

/* Полоса дня */

.onflot-daymark {
	display: flex;
	align-items: center;
	gap: var(--step-3);
	margin: var(--step-7) 0 var(--step-3);
	color: var(--khaki);
}

.onflot-daymark:first-child {
	margin-top: 0;
}

.onflot-daymark__label {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.onflot-daymark.is-today .onflot-daymark__label {
	background: var(--minium-ink);
	color: var(--paper);
	padding: 5px 10px;
}

.onflot-daymark.is-archive .onflot-daymark__label,
.onflot-daymark__note {
	color: var(--salt);
	font-weight: 400;
}

.onflot-daymark__note {
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.onflot-daymark__rule {
	flex: 1 1 auto;
	height: 1px;
	background: var(--rule);
}

/* Карточка */

.onflot-entry {
	padding: var(--step-4) 0;
	border-bottom: 1px solid var(--rule);
}

.onflot-entry.is-lead {
	padding: 0 0 var(--step-7);
}

.onflot-entry:last-child {
	border-bottom: 0;
}

.onflot-entry__inner {
	display: grid;
	gap: var(--step-5);
	align-items: start;
}

/* Превью сбоку — только у карточек во всю ширину колонки. */
.onflot-entry.layout-side .onflot-entry__inner {
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: var(--step-6);
}

/* В двухколоночной сетке обложка встаёт над заголовком. */
.onflot-entry.layout-top .onflot-entry__inner,
.onflot-entry.layout-lead .onflot-entry__inner,
.onflot-entry.no-cover .onflot-entry__inner {
	grid-template-columns: minmax(0, 1fr);
}

.onflot-entry.layout-top .onflot-cover,
.onflot-entry.layout-lead .onflot-cover {
	grid-column: 1;
	grid-row: 1;
}

.onflot-entry__body {
	min-width: 0;
}

.onflot-cover {
	grid-column: 2;
	grid-row: 1;
	overflow: hidden;
	background: var(--paper-2);
}

.onflot-cover img {
	width: 100%;
	height: auto;
}

.category-list {
	margin-bottom: var(--step-2);
}

.cat-links {
	color: var(--minium-ink);
	font-size: 12px;
}

.cat-links a {
	color: inherit;
}

.cat-links a:hover {
	color: var(--minium-hover);
}

.cat-sep {
	margin: 0 5px;
	color: var(--salt);
}

.entry-title {
	font-size: 28px;
	line-height: 1.1;
	margin: 0 0 var(--step-3);
}

.entry-title a {
	color: var(--shadow);
}

.entry-title a:visited {
	color: var(--khaki);
}

.entry-title a:hover,
.entry-title a:focus {
	color: var(--minium-ink);
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--step-3);
	margin-bottom: var(--step-4);
	color: var(--salt);
}

.entry-date {
	color: var(--salt);
	font-size: 12px;
}

.entry-date.is-fresh {
	color: var(--minium-ink);
}

.entry-summary {
	color: var(--khaki);
	font-size: 16px;
	line-height: 1.55;
}

.entry-summary p {
	margin: 0;
}

/* Ведущая карточка: обложка во всю ширину, заголовок крупнее */

.onflot-entry.is-lead .onflot-entry__inner {
	grid-template-columns: minmax(0, 1fr);
	gap: var(--step-5);
}

.onflot-entry.is-lead .onflot-cover {
	grid-column: 1;
	aspect-ratio: 2.8;
}

.onflot-entry.is-lead .onflot-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Обложка карточки в сетке — 2,3:1. */
.onflot-entry.layout-top .onflot-cover {
	aspect-ratio: 2.3;
}

.onflot-entry.layout-top .onflot-cover img,
.onflot-entry.layout-side .onflot-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.onflot-entry.layout-side .onflot-cover {
	aspect-ratio: 1.6;
}

.onflot-entry.is-lead .entry-title {
	font-size: 46px;
	line-height: 1.05;
}

.onflot-entry.is-lead .entry-summary {
	font-size: 17px;
	max-width: 62ch;
}

/* Карточка без обложки — плашка, а не пустое место */

.onflot-entry.no-cover .onflot-entry__body {
	background: var(--paper-2);
	padding: var(--step-6);
}

.onflot-entry.is-lead.no-cover .onflot-entry__body {
	background: none;
	padding: 0;
}

/* Архивная карточка: год слева, приглушённый тон */

.onflot-entry.is-archive .onflot-entry__inner {
	grid-template-columns: 72px minmax(0, 1fr);
	gap: var(--step-5);
	border-left: 3px solid var(--rule);
	padding-left: var(--step-5);
}

.onflot-entry.is-archive .onflot-cover {
	display: none;
}

.onflot-entry.is-archive .onflot-entry__body {
	grid-column: 2;
	background: none;
	padding: 0;
}

.onflot-entry.layout-top .entry-title {
	font-size: 24px;
	line-height: 1.12;
}

.onflot-entry.is-archive .entry-title {
	font-size: 24px;
	color: var(--khaki);
}

.onflot-entry.is-archive .entry-title a {
	color: var(--khaki);
}

.onflot-entry.is-archive .entry-summary {
	color: var(--salt);
	font-size: 15px;
}

.onflot-entry.is-archive .entry-meta::before {
	content: attr(data-year);
}

/* ------------------------------------------------------------------ 8. Пагинация */

.navigation.pagination {
	margin-top: var(--step-8);
	padding-top: var(--step-5);
	border-top: 2px solid var(--shadow);
}

.pagination .nav-links {
	display: flex;
	align-items: center;
	gap: var(--step-2);
	flex-wrap: wrap;
}

.pagination .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 var(--step-3);
	color: var(--shadow);
	font-size: 14px;
	letter-spacing: .16em;
}

.pagination .page-numbers:hover {
	background: var(--paper-2);
}

.pagination .page-numbers.current {
	background: var(--shadow);
	color: var(--paper);
}

.pagination .page-numbers.dots {
	min-width: auto;
	color: var(--salt);
}

.pagination .next,
.pagination .prev {
	background: var(--minium-ink);
	color: var(--paper);
}

.pagination .next {
	margin-left: auto;
}

.pagination .next:hover,
.pagination .prev:hover {
	background: var(--minium-hover);
	color: var(--paper);
}

/* ------------------------------------------------------------------ 9. Сайдбар */

.widget-area .widget {
	margin-bottom: var(--step-7);
}

.widget-title {
	margin: 0 0 var(--step-3);
	padding-bottom: var(--step-2);
	border-bottom: 2px solid var(--shadow);
	font-size: 15px;
	font-weight: 700;
	color: var(--shadow);
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget p:last-child {
	margin-bottom: 0;
}

/* Все рубрики */

.onflot-catlist__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--step-3);
	padding: 9px 0;
	border-bottom: 1px solid #E0D9C8;
}

.onflot-catlist__item a {
	color: var(--shadow);
	font-size: 16px;
}

.onflot-catlist__item a:hover {
	color: var(--minium-ink);
}

.onflot-catlist__item.level-1 {
	padding-left: var(--step-4);
}

.onflot-catlist__item.level-2 {
	padding-left: var(--step-7);
}

.onflot-catlist__item.level-1 a,
.onflot-catlist__item.level-2 a {
	font-size: 15px;
	color: var(--khaki);
}

.onflot-catlist__meta {
	flex: none;
	font-size: 11px;
	color: var(--salt);
}

/* Справочник */

.onflot-handbook li {
	padding: 8px 0;
}

.onflot-handbook a {
	font-size: 16px;
	font-weight: 600;
}

/* Архив по годам */

.onflot-years {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.onflot-years__item {
	padding: 7px 11px;
	background: var(--paper-2);
	color: var(--khaki);
	font-family: var(--font-display);
	font-size: 14px;
	letter-spacing: .08em;
}

.onflot-years__item:hover,
.onflot-years__item.is-current {
	background: var(--shadow);
	color: var(--paper);
}

/* Блок ручных связей */

.crp-list-container {
	margin-bottom: var(--step-7);
}

.crp-list-container .widget {
	margin: 0;
	background: var(--shadow);
	padding: var(--step-6);
}

.crp-list-container .widget-title {
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--paper);
	font-size: 22px;
	letter-spacing: 0;
	text-transform: none;
}

.crp-subtitle {
	margin: 6px 0 var(--step-4);
	color: #B98F6C;
	font-size: 11px;
	letter-spacing: .18em;
	text-transform: uppercase;
	line-height: 1.4;
}

.crp-list-item {
	padding: 11px 0;
	border-bottom: 1px solid var(--khaki);
}

.crp-list-item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.crp-list-item-title a {
	color: var(--paper);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 17px;
	line-height: 1.2;
	display: block;
}

.crp-list-item-title a:hover {
	color: #D9A075;
}

.crp-year {
	display: inline-block;
	margin-top: 3px;
	color: #A8A395;
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .2em;
}

/* Слайдер и прочие виджеты */

.widget_text,
.widget_block {
	color: var(--khaki);
	font-size: 16px;
}

.widget img {
	max-width: 100%;
}

/* ------------------------------------------------------------------ 10. Страница материала */

.single .site-content > .container {
	--sidebar: var(--sidebar-article);
	--gutter: var(--gutter-article);
}

.bam-breadcrumb-wrap {
	margin: 0 0 var(--step-5);
	font-size: 12px;
	color: var(--salt);
	letter-spacing: .16em;
}

.bam-breadcrumb-wrap p {
	margin: 0;
}

.bam-breadcrumb-wrap a {
	color: var(--salt);
}

.bam-breadcrumb-wrap a:hover {
	color: var(--minium-ink);
}

.bam-breadcrumb-wrap .separator {
	margin: 0 6px;
	color: var(--rule);
}

.bam-breadcrumb-wrap .last {
	color: var(--shadow);
}

.onflot-single {
	max-width: 840px;
}

.onflot-single .entry-title {
	font-size: 56px;
	line-height: 1.02;
	margin-bottom: var(--step-4);
}

.onflot-single .entry-header {
	padding-bottom: var(--step-4);
	border-bottom: 1px solid var(--rule);
	margin-bottom: var(--step-7);
}

.onflot-single .entry-meta {
	margin: 0;
	gap: var(--step-4);
}

.entry-length {
	color: var(--salt);
	font-size: 12px;
}

.entry-content {
	font-size: 18px;
	line-height: 1.65;
	max-width: 66ch;
}

/* Лид: первый абзац материала редакция набирает полужирным целиком.
   Он же размечается как врезка, поэтому фон плашки с него снимаем. */
.entry-content > p:first-child > strong:only-child {
	font-size: 20px;
	line-height: 1.55;
	font-weight: 600;
}

.entry-content > p.is-callout:first-child {
	padding: 0;
	background: none;
	font-size: 20px;
}

.entry-content h2 {
	font-size: 32px;
	margin: var(--step-8) 0 var(--step-4);
}

.entry-content h3 {
	font-size: 24px;
	margin: var(--step-7) 0 var(--step-3);
}

.entry-content a:visited {
	color: var(--minium-hover);
}

.entry-content a:hover,
.entry-content a:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}

.entry-content img {
	margin: var(--step-7) 0 var(--step-3);
	width: 100%;
}

.entry-content .wp-caption,
.entry-content figure {
	margin: var(--step-7) 0;
	max-width: 100%;
}

.entry-content figcaption,
.entry-content .wp-caption-text {
	margin-top: var(--step-3);
	padding-left: 14px;
	border-left: 2px solid var(--minium);
	color: var(--salt);
	font-size: 15px;
	line-height: 1.5;
}

/* Прямая речь: абзац с тире в начале. */
.entry-content p.is-quote,
.entry-content blockquote {
	margin-left: 0;
	padding-left: var(--step-4);
	border-left: 2px solid var(--rule);
	color: var(--khaki);
}

/* Врезка: абзац целиком полужирным. */
.entry-content p.is-callout {
	padding: var(--step-5) var(--step-6);
	background: var(--paper-2);
	font-size: 19px;
	line-height: 1.6;
}

.entry-content p.is-callout strong {
	font-weight: 600;
}

.entry-content blockquote {
	margin: var(--step-6) 0;
	font-style: normal;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 var(--step-6);
	padding-left: var(--step-6);
}

.entry-content ul {
	list-style: none;
	padding-left: 0;
}

.entry-content ul li {
	position: relative;
	padding-left: 26px;
	margin-bottom: var(--step-3);
}

.entry-content ul li::before {
	content: "";
	position: absolute;
	left: 0;
	/* Центр маркера совпадает с серединой первой строки: половина
	   межстрочного интервала минус половина самого маркера. В em, чтобы
	   выравнивание держалось и на мобильном кегле. */
	top: calc((1.65em - 15px) / 2);
	width: 15px;
	height: 15px;
	background-color: var(--minium-ink);
	-webkit-mask: var(--anchor-mask) center / contain no-repeat;
	mask: var(--anchor-mask) center / contain no-repeat;
}

.entry-content ol li {
	margin-bottom: var(--step-3);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--step-6) 0;
	font-size: 16px;
}

.entry-content th,
.entry-content td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--rule);
	text-align: left;
}

.entry-content th {
	font-family: var(--font-display);
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: 13px;
	color: var(--salt);
}

/* Знак конца статьи */

.onflot-endmark {
	display: flex;
	align-items: center;
	gap: var(--step-4);
	margin: var(--step-7) 0 var(--step-6);
	max-width: 66ch;
}

.onflot-endmark::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: var(--rule);
}

/* Шеринг */

.onflot-share {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--step-3);
	margin-bottom: var(--step-8);
}

.onflot-share__label {
	color: var(--salt);
	font-size: 12px;
}

.onflot-share__link {
	padding: 10px var(--step-4);
	border: 1px solid var(--rule);
	color: var(--khaki);
	font-family: var(--font-display);
	font-size: 14px;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.onflot-share__link:hover {
	border-color: var(--minium-ink);
	color: var(--minium-ink);
}

/* Похожие материалы */

.onflot-related {
	max-width: 840px;
	margin-bottom: var(--step-8);
	padding-top: var(--step-6);
	border-top: 2px solid var(--shadow);
}

.related-section-title {
	font-size: 15px;
	letter-spacing: .2em;
	text-transform: uppercase;
	margin-bottom: var(--step-5);
}

.related-posts-wrap {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--step-4);
}

.related-post {
	background: var(--paper-2);
	padding: var(--step-5);
}

.related-post-thumbnail {
	margin: calc(var(--step-5) * -1) calc(var(--step-5) * -1) var(--step-4);
}

.related-post-title {
	font-size: 19px;
	line-height: 1.15;
	margin-bottom: var(--step-2);
}

.related-post-title a {
	color: var(--shadow);
}

.related-post-title a:hover {
	color: var(--minium-ink);
}

.related-post-meta .entry-date {
	font-size: 11px;
}

/* ------------------------------------------------------------------ 11. Рубрика и поиск */

.page-header {
	margin-bottom: var(--step-6);
}

.archive .page-title,
.search .page-title {
	font-size: 44px;
	margin-bottom: var(--step-4);
}

.archive-description {
	position: relative;
	margin: 0 0 var(--step-7);
	padding: var(--step-5) var(--step-6);
	background: var(--paper-2);
	border-left: 3px solid var(--minium);
	color: var(--khaki);
	max-width: 74ch;
}

.archive-description p {
	margin: 0 0 var(--step-3);
	font-size: 17px;
	line-height: 1.6;
}

.archive-description p:last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ 12. Комментарии и формы */

.comments-area {
	max-width: 840px;
	margin-top: var(--step-8);
	padding-top: var(--step-6);
	border-top: 1px solid var(--rule);
}

.comments-title,
.comment-reply-title {
	font-size: 15px;
	letter-spacing: .2em;
	text-transform: uppercase;
	margin-bottom: var(--step-5);
}

.comment-list {
	margin: 0 0 var(--step-8);
	padding: 0;
	list-style: none;
}

.comment-body {
	padding: var(--step-5) 0;
	border-bottom: 1px solid var(--rule);
}

.comment-meta {
	margin-bottom: var(--step-3);
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: .12em;
	color: var(--salt);
}

.comment-author .fn {
	color: var(--shadow);
	font-style: normal;
	font-weight: 700;
}

.comment-form label,
.wpcf7 p {
	display: block;
	color: var(--khaki);
	font-size: 15px;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	width: 100%;
	padding: 13px;
	border: 1px solid var(--rule);
	background: var(--paper);
	color: var(--pepper);
	font-family: var(--font-text);
	font-size: 17px;
}

textarea {
	min-height: 140px;
	resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus {
	border-color: var(--minium-ink);
}

::placeholder {
	color: var(--salt);
}

input[type="submit"],
.wpcf7-submit,
.comment-form .submit {
	width: auto;
	height: 48px;
	padding: 0 22px;
	border: 0;
	background: var(--minium-ink);
	color: var(--paper);
	font-family: var(--font-display);
	font-size: 15px;
	letter-spacing: .16em;
	text-transform: uppercase;
	cursor: pointer;
}

input[type="submit"]:hover,
.wpcf7-submit:hover {
	background: var(--minium-hover);
}

input[type="submit"]:active,
.wpcf7-submit:active {
	transform: translateY(1px);
}

input[type="submit"][disabled],
.wpcf7-submit[disabled] {
	background: var(--rule);
	color: var(--salt);
}

/* ------------------------------------------------------------------ 13. Подвал */

.site-footer {
	margin-top: var(--step-9);
	background: var(--shadow);
	color: #C9C3B2;
}

.footer-widget-area {
	padding: var(--step-9) 0 var(--step-8);
}

.footer-widget-area-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
	gap: var(--step-9);
	align-items: start;
}

.footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: var(--step-7);
}

.site-footer .widget-title {
	color: var(--paper);
	border-bottom-color: var(--khaki);
}

.site-footer a {
	color: #D9A075;
}

.site-footer input[type="text"],
.site-footer input[type="email"],
.site-footer textarea {
	background: #353928;
	border-color: #6F7460;
	color: var(--paper);
}

.site-footer ::placeholder {
	color: #9A9482;
}

.footer-brand__head {
	display: flex;
	align-items: center;
	gap: var(--step-3);
	margin-bottom: var(--step-3);
}

.footer-brand__name {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 26px;
	color: var(--paper);
}

.footer-brand__note {
	margin: 0;
	font-size: 16px;
	line-height: 1.55;
}

.site-info {
	padding: var(--step-5) 0 var(--step-7);
}

.copyright-container {
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #9A9482;
}

.site-info a {
	color: #9A9482;
}

/* ------------------------------------------------------------------ 14. Адаптив */

@media (max-width: 1439px) {
	.container,
	#site-header-inner,
	#site-navigation-inner {
		padding-left: 24px;
		padding-right: 24px;
	}

	:root {
		--gutter: 48px;
		--gutter-article: 52px;
	}

	#primary-menu {
		gap: 22px;
	}

	#primary-menu a {
		letter-spacing: .11em;
	}
}

@media (max-width: 1279px) {
	:root {
		--sidebar: 280px;
		--sidebar-article: 280px;
		--gutter: 36px;
		--gutter-article: 36px;
	}

	.onflot-entry.is-lead .entry-title {
		font-size: 38px;
	}

	.onflot-single .entry-title {
		font-size: 44px;
	}

	.onflot-entry__inner {
		grid-template-columns: minmax(0, 1fr) 240px;
	}
}

@media (max-width: 1023px) {
	.site-content > .container {
		display: block;
	}

	/* Одна колонка чтения. */
	.onflot-feed {
		grid-template-columns: minmax(0, 1fr);
	}

	.widget-area {
		width: auto;
		max-width: none;
		position: static;
		margin-top: var(--step-9);
		padding-top: var(--step-6);
		border-top: 2px solid var(--shadow);
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--step-7);
		align-items: start;
	}

	/* Ручные связи на статье — не «ещё один виджет», а полноценный блок. */
	.single .widget-area {
		display: block;
	}

	.crp-list-container {
		margin-bottom: var(--step-8);
	}

	.footer-widget-area-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--step-8);
	}
}

@media (max-width: 767px) {
	:root {
		--step-9: 40px;
		--step-10: 56px;
	}

	body {
		font-size: 17px;
	}

	.container,
	#site-header-inner,
	#site-navigation-inner {
		padding-left: var(--step-4);
		padding-right: var(--step-4);
	}

	.bam-topbar .onflot-topbar__note {
		display: none;
	}

	#site-header-inner {
		padding-top: var(--step-4);
		padding-bottom: var(--step-4);
	}

	.site-title {
		font-size: 30px;
	}

	body:not(.home) .site-title {
		font-size: 26px;
	}

	.site-description {
		font-size: 10px;
	}

	/* Меню уезжает в бургер */
	#primary-menu,
	.bam-search-box-container {
		display: none;
	}

	.menu-toggle {
		display: flex;
	}

	#site-navigation-inner {
		justify-content: space-between;
		border-top: 1px solid var(--rule);
	}

	.bam-search-button-icon {
		margin-left: auto;
	}

	.onflot-intro {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--step-5);
		padding: var(--step-5) var(--step-4);
	}

	.onflot-entry {
		padding: var(--step-6) 0;
	}

	/* Превью уходит в квадрат сбоку — заголовку нужна ширина. */
	.onflot-entry.layout-top .onflot-entry__inner,
	.onflot-entry.layout-side .onflot-entry__inner {
		grid-template-columns: minmax(0, 1fr) 96px;
		gap: var(--step-4);
	}

	.onflot-entry.is-archive .onflot-entry__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.onflot-entry.layout-top .onflot-cover,
	.onflot-entry.layout-side .onflot-cover {
		grid-column: 2;
		grid-row: 1;
		align-self: start;
		aspect-ratio: 1;
	}

	.onflot-cover img {
		aspect-ratio: 1;
		object-fit: cover;
	}

	/* У ведущей карточки обложка остаётся во всю ширину. */
	.onflot-entry.is-lead .onflot-entry__inner,
	.onflot-entry.layout-lead .onflot-entry__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.onflot-entry.is-lead .onflot-cover,
	.onflot-entry.layout-lead .onflot-cover {
		grid-column: 1;
		aspect-ratio: 2.2;
	}

	.onflot-entry.is-lead .onflot-cover img {
		aspect-ratio: auto;
	}

	.onflot-entry__body {
		grid-column: 1;
	}

	.entry-title {
		font-size: 24px;
	}

	.onflot-entry.is-lead .entry-title {
		font-size: 32px;
	}

	.onflot-entry.no-cover .onflot-entry__body {
		padding: var(--step-5) var(--step-4);
	}

	.onflot-entry.is-archive .onflot-entry__inner {
		padding-left: var(--step-4);
	}

	.onflot-single .entry-title {
		font-size: 36px;
	}

	.entry-content {
		font-size: 17px;
	}

	/* Иллюстрация в статье выходит на поля. */
	.entry-content img {
		width: calc(100% + var(--step-8));
		max-width: calc(100% + var(--step-8));
		margin-left: calc(var(--step-4) * -1);
	}

	.widget-area {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--step-5);
	}

	.widget-area .widget {
		margin-bottom: var(--step-5);
	}

	.related-posts-wrap {
		grid-template-columns: minmax(0, 1fr);
	}

	.related-post-thumbnail {
		margin-bottom: var(--step-3);
	}

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

	.pagination .page-numbers {
		min-width: 44px;
	}

	.crp-list-container .widget {
		padding: var(--step-5) var(--step-4);
	}
}

/* ------------------------------------------------------------------ Печать и предпочтения */

@media (prefers-reduced-motion: reduce) {
	* {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}

/* Иконка поиска: крестик появляется, когда бокс раскрыт. */
.bam-search-button-icon .onflot-icon--close {
	display: none;
}

.bam-search-button-icon.is-open .onflot-icon--search {
	display: none;
}

.bam-search-button-icon.is-open .onflot-icon--close {
	display: block;
}

/* ------------------------------------------------------------------ Ручные связи на узком экране */

@media (max-width: 1023px) {
	/* Список длинный: показываем первые восемь, остальное — по кнопке. */
	.crp-list.is-clamped .crp-list-item:nth-child(n + 9) {
		display: none;
	}

	.crp-more {
		display: block;
		width: 100%;
		margin-top: var(--step-4);
		padding: 12px;
		border: 1px solid var(--khaki);
		background: none;
		color: var(--paper);
		font-family: var(--font-display);
		font-size: 14px;
		letter-spacing: .16em;
		text-transform: uppercase;
	}

	.crp-more:hover {
		border-color: #D9A075;
		color: #D9A075;
	}
}

.crp-more {
	display: none;
}

/* Объём рубрики под её заголовком. */
.onflot-archive-meta {
	margin: calc(var(--step-5) * -1) 0 var(--step-6);
	color: var(--salt);
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.onflot-archive-meta strong {
	font-size: 18px;
	color: var(--shadow);
}

/* ------------------------------------------------------------------ 15. Страница «не найдено» */

.onflot-404 {
	max-width: 840px;
}

.onflot-404__head {
	display: grid;
	grid-template-columns: 132px minmax(0, 1fr);
	gap: var(--step-7);
	align-items: start;
	padding-bottom: var(--step-7);
	border-bottom: 1px solid var(--rule);
}

/* Номер набран как отметка осадки на форштевне: трафаретная цифра
   на суриковой подводной части, отчёркнутая ватерлинией. */
.onflot-404__scale {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	height: 132px;
	padding-bottom: var(--step-3);
	background: linear-gradient(180deg, var(--shadow) 0 46%, var(--minium) 46%);
	color: var(--paper);
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 44px;
	letter-spacing: .06em;
	line-height: 1;
}

.onflot-404 .entry-title {
	font-size: 44px;
	line-height: 1.04;
	margin-bottom: var(--step-4);
}

.onflot-404__lead {
	margin: 0;
	color: var(--khaki);
	font-size: 18px;
	line-height: 1.6;
	max-width: 62ch;
}

.onflot-404__lead code {
	padding: 2px 6px;
	background: var(--paper-2);
	font-family: var(--font-text);
	font-size: 16px;
	color: var(--shadow);
}

.onflot-404__search {
	margin: var(--step-7) 0;
}

.onflot-404__label {
	margin: 0 0 var(--step-3);
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--salt);
}

.onflot-404__search .search-form {
	max-width: 560px;
}

.onflot-404__search .search-field {
	height: 48px;
}

.onflot-404__search .search-submit {
	height: 48px;
}

.onflot-404__block {
	margin-bottom: var(--step-8);
}

.onflot-404__cats {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	/* Фон подложки виден только в промежутках; при нечётном числе рубрик
	   пустая ячейка остаётся цветом бумаги, а не серым провалом. */
	background: var(--paper);
	box-shadow: 0 0 0 1px var(--rule);
}

.onflot-404__cat {
	box-shadow: 0 0 0 1px var(--rule);
}

.onflot-404__cat {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--step-3);
	padding: 14px var(--step-4);
	background: var(--paper);
	color: var(--shadow);
}

.onflot-404__cat:hover {
	background: var(--paper-2);
	color: var(--minium-ink);
}

.onflot-404__cat-name {
	font-family: var(--font-display);
	font-size: 17px;
	letter-spacing: .04em;
}

.onflot-404__cat-count {
	flex: none;
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .18em;
	color: var(--salt);
}

.onflot-404__latest {
	margin: 0;
	padding: 0;
	list-style: none;
}

.onflot-404__latest li {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--step-4);
	padding: 12px 0;
	border-bottom: 1px solid var(--rule);
}

.onflot-404__latest a {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 19px;
	line-height: 1.15;
	color: var(--shadow);
}

.onflot-404__latest a:hover {
	color: var(--minium-ink);
}

.onflot-404__date {
	flex: none;
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .2em;
	color: var(--salt);
}

@media (max-width: 767px) {
	.onflot-404__head {
		grid-template-columns: 88px minmax(0, 1fr);
		gap: var(--step-5);
	}

	.onflot-404__scale {
		height: 88px;
		font-size: 30px;
	}

	.onflot-404 .entry-title {
		font-size: 30px;
	}

	.onflot-404__cats {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ------------------------------------------------------------------ 16. Счётчики в подвале */

.footer-counters {
	margin-top: var(--step-5);
	padding-top: var(--step-4);
	border-top: 1px solid var(--khaki);
}

.footer-counters .widget {
	margin: 0 0 var(--step-3);
}

.footer-counters .widget:last-child {
	margin-bottom: 0;
}

/* Счётчик LiveInternet — картинка 88×31, её нельзя ни растягивать,
   ни прятать: это основной дашборд трафика у владельца. */
.footer-counters img {
	display: inline-block;
	width: auto;
	max-width: 100%;
	height: auto;
}

.footer-counters a {
	display: inline-block;
	line-height: 0;
}

/* ------------------------------------------------------------------ 17. Формы: комментарии и обратная связь */

/* Служебные строки формы комментариев набирались браузерным шрифтом. */
.comment-notes,
.logged-in-as,
.comment-form-cookies-consent label,
.wpcf7-response-output {
	font-size: 15px;
	line-height: 1.5;
	color: var(--salt);
}

.logged-in-as {
	margin-bottom: var(--step-4);
}

.comment-notes .required-field-message,
.comment-notes #email-notes {
	display: inline;
}

.comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: var(--step-2);
}

.comment-form-cookies-consent input {
	margin-top: 4px;
}

.wpcf7-response-output {
	margin: var(--step-4) 0 0;
	padding: var(--step-3) var(--step-4);
	border: 1px solid var(--rule);
}

.wpcf7-not-valid-tip {
	display: block;
	margin-top: 6px;
	color: var(--minium-ink);
	font-size: 14px;
}

.wpcf7-form .wpcf7-not-valid {
	border-color: var(--minium-ink);
}

/* Форма обратной связи: имя и почта в строку, тема и сообщение во всю ширину.
   Contact Form 7 выводит подпись и поле разными абзацами, поэтому сетка
   опирается на порядок — при правке формы порядок надо сохранить. */
.wpcf7-form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 var(--step-4);
}

.wpcf7-form > p {
	margin: 0 0 var(--step-2);
	grid-column: 1 / -1;
}

/* 1–2 — имя, 3–4 — почта. */
.wpcf7-form > p:nth-of-type(1),
.wpcf7-form > p:nth-of-type(2) {
	grid-column: 1;
}

.wpcf7-form > p:nth-of-type(3),
.wpcf7-form > p:nth-of-type(4) {
	grid-column: 2;
	grid-row: 1 / 3;
}

.wpcf7-form > p:nth-of-type(4) {
	grid-row: 2;
}

.wpcf7-form > p:nth-of-type(2),
.wpcf7-form > p:nth-of-type(4),
.wpcf7-form > p:nth-of-type(6),
.wpcf7-form > p:nth-of-type(8) {
	margin-bottom: var(--step-4);
}

.wpcf7-form label,
.wpcf7-form > p:not(:has(input)):not(:has(textarea)) {
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #A8A395;
}

.site-footer .wpcf7-form textarea {
	min-height: 120px;
}

.wpcf7-spinner {
	display: none;
}

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

	.wpcf7-form > p:nth-of-type(1),
	.wpcf7-form > p:nth-of-type(2),
	.wpcf7-form > p:nth-of-type(3),
	.wpcf7-form > p:nth-of-type(4) {
		grid-column: 1;
		grid-row: auto;
	}
}

/* ------------------------------------------------------------------ 18. Рекламные блоки */

.onflot-promo {
	margin-bottom: var(--step-7);
}

/* Блоки едут лентой вбок, как в прежнем слайдере. Высота ленты — по самому
   высокому блоку, но не ниже макетных 250 px: жёсткие 340×250 резали кнопку,
   когда текст на реальной ширине занимал лишнюю строку. */
.onflot-promo__stage {
	position: relative;
	width: 100%;
	min-height: 250px;
	overflow: hidden;
}

.onflot-promo__track {
	display: flex;
	min-height: 250px;
	transition: transform .5s cubic-bezier(.4, 0, .2, 1);
	will-change: transform;
}

.onflot-promo__slide {
	flex: 0 0 100%;
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 24px 26px;
}

/* Системное «уменьшить движение» глушит переходы во всей теме (см. раздел
   «Печать и предпочтения»). Для карусели движение оставляем: сдвиг блока
   в 340 px — не тот масштаб, от которого укачивает, а без него читатель
   не замечает, что блоков два. Просто делаем его короче. */
@media (prefers-reduced-motion: reduce) {
	.onflot-promo__track {
		transition: transform .25s ease !important;
	}
}

/* Телеграм: тёмный борт с суриковой отбивкой слева. */
.onflot-promo__slide--telegram {
	background: var(--shadow);
}

.onflot-promo__slide--telegram::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 5px;
	background: var(--minium);
}

.onflot-promo__head {
	display: flex;
	align-items: center;
	gap: var(--step-3);
}

.onflot-promo__kicker {
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #A8A395;
	position: relative;
}

.onflot-promo__body {
	margin-top: var(--step-4);
	display: flex;
	flex-direction: column;
	gap: 10px;
	position: relative;
}

.onflot-promo__title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 34px;
	line-height: .98;
	color: var(--paper);
}

.onflot-promo__text {
	font-size: 14px;
	line-height: 1.45;
	color: #C9C3B2;
	max-width: 24ch;
	text-wrap: pretty;
}

.onflot-promo__foot {
	margin-top: auto;
	padding-top: var(--step-4);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--step-3);
	position: relative;
}

.onflot-promo__action {
	font-family: var(--font-display);
	font-size: 14px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--shadow);
	background: var(--minium);
	padding: 10px 18px;
}

.onflot-promo__slide:hover .onflot-promo__action {
	background: #C9663A;
}

.onflot-promo__note {
	font-family: ui-monospace, "SF Mono", Menlo, monospace;
	font-size: 12px;
	color: #A8A395;
}

/* Документы: кремовый блок, свет из-за правого верхнего угла. */
.onflot-promo__slide--documents {
	background: #EDE4D4;
}

.onflot-promo__slide--documents .onflot-promo__title {
	font-size: 32px;
	line-height: .98;
	color: var(--shadow);
	max-width: 200px;
}

.onflot-promo__slide--documents .onflot-promo__text {
	color: #4A4636;
	max-width: 200px;
}

.onflot-promo__slide--documents .onflot-promo__kicker {
	color: #8A6A4A;
}

.onflot-promo__slide--documents .onflot-promo__action {
	background: var(--minium-ink);
	color: var(--paper);
}

.onflot-promo__slide--documents:hover .onflot-promo__action {
	background: var(--minium-hover);
}

.onflot-promo__glow {
	position: absolute;
	right: -40px;
	top: -70px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: radial-gradient(circle at 40% 45%, rgba(255, 236, 196, .95) 0%, rgba(240, 214, 168, .55) 45%, rgba(237, 228, 212, 0) 72%);
}

.onflot-promo__paper {
	position: absolute;
	right: 24px;
	top: 22px;
	width: 92px;
	height: 124px;
	padding: 12px 11px;
	background: #F7F2E7;
	box-shadow: 0 10px 22px rgba(35, 38, 29, .22);
	transform: rotate(6deg);
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.onflot-promo__stamp {
	height: 5px;
	width: 70%;
	background: var(--minium);
}

.onflot-promo__row {
	display: flex;
	gap: var(--step-2);
	align-items: flex-start;
}

.onflot-promo__photo {
	width: 26px;
	height: 32px;
	background: var(--rule);
	flex: none;
}

.onflot-promo__lines {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.onflot-promo__lines i {
	display: block;
	height: 3px;
	background: #CFC7B4;
}

.onflot-promo__lines i:nth-child(2) { width: 80%; }
.onflot-promo__lines i:nth-child(3) { width: 60%; }

.onflot-promo__lines--body i {
	background: #DAD2BF;
}

.onflot-promo__lines--body i:nth-child(2) { width: 85%; }
.onflot-promo__lines--body i:nth-child(3) { width: 92%; }
.onflot-promo__lines--body i:nth-child(4) { width: 70%; }

.onflot-promo__seal {
	margin-top: auto;
	width: 34px;
	height: 34px;
	border: 2px solid rgba(184, 90, 50, .5);
	border-radius: 50%;
	transform: rotate(-14deg);
}

/* Подпись и точки — те же, что были у прежнего слайдера. */
.onflot-promo__bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: var(--step-3);
	margin-top: 10px;
}

.onflot-promo__caption {
	font-size: 14px;
	color: var(--salt);
}

.onflot-promo__dots {
	display: flex;
	gap: 6px;
	flex: none;
}

.onflot-promo__dot {
	width: 7px;
	height: 7px;
	padding: 0;
	border: 0;
	background: var(--rule);
	cursor: pointer;
}

.onflot-promo__dot.is-current {
	background: var(--minium-ink);
}

@media (max-width: 1023px) {
	.onflot-promo__stage {
		max-width: 340px;
	}

	.onflot-promo__bar {
		max-width: 340px;
	}
}

/* Длинный перечень (девять пунктов и больше) получает скромный маркер:
   якорь задуман подписью, а не обоями — двадцать якорей подряд его обесценивают. */
.entry-content ul:has(li:nth-child(9)) li::before {
	top: calc((1.65em - 7px) / 2);
	width: 7px;
	height: 7px;
	-webkit-mask: none;
	mask: none;
	background-color: var(--minium);
}

.entry-content ul:has(li:nth-child(9)) li {
	padding-left: 20px;
	margin-bottom: var(--step-2);
}

/* Подзаголовок третьего уровня внутри статьи — служебная строка, не заголовок
   раздела: он делит длинный перечень, а не текст. */
.entry-content h3 {
	font-size: 15px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--salt);
	margin: var(--step-7) 0 var(--step-4);
}

/* ------------------------------------------------------------------ 19. Блоки страницы «Контакты» */

/* Три цифры об издании: возраст, объём архива, число разделов. */
.onflot-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	margin: var(--step-7) 0;
	background: var(--paper);
	box-shadow: 0 0 0 1px var(--rule);
}

.onflot-facts__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: var(--step-5) var(--step-4);
	background: var(--paper);
	box-shadow: 0 0 0 1px var(--rule);
}

.onflot-facts__num {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 34px;
	line-height: 1;
	color: var(--shadow);
}

.onflot-facts__label {
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--salt);
}

/* Свидетельство о регистрации — карточка судового документа: суриковая
   отбивка сверху, номер моноширинным, отметка о прекращении внизу. */
.onflot-cert {
	display: flex;
	flex-direction: column;
	gap: var(--step-3);
	margin: var(--step-7) 0;
	padding: var(--step-6);
	background: var(--paper-2);
	border-top: 4px solid var(--minium);
}

.onflot-cert__label {
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--salt);
}

.onflot-cert__num {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 26px;
	line-height: 1;
	color: var(--shadow);
	letter-spacing: .04em;
}

.onflot-cert__body {
	font-size: 16px;
	line-height: 1.55;
	color: var(--khaki);
	max-width: 62ch;
}

.onflot-cert__note {
	margin-top: var(--step-2);
	padding-top: var(--step-3);
	border-top: 1px solid var(--rule);
	font-family: var(--font-display);
	font-size: 13px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--minium-ink);
}

/* Контакты: две крупные кликабельные плашки вместо строк «Email: …». */
.onflot-contacts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--step-4);
	margin: var(--step-6) 0 var(--step-7);
}

.onflot-contacts__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: var(--step-5);
	background: var(--shadow);
	color: var(--paper);
	transition: background .15s ease;
}

.onflot-contacts__item:hover {
	background: var(--khaki);
	color: var(--paper);
}

.onflot-contacts__label {
	font-family: var(--font-display);
	font-size: 12px;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #A8A395;
}

.onflot-contacts__value {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 24px;
	line-height: 1.1;
}

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

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

	.onflot-cert {
		padding: var(--step-5) var(--step-4);
	}

	.onflot-cert__num {
		font-size: 22px;
	}
}

/* Заголовок отдельной страницы — как у рубрики: он единственный h1 и должен
   держать вес, а не выглядеть подзаголовком карточки. */
.page .entry-title {
	font-size: 44px;
	line-height: 1.04;
	margin-bottom: var(--step-5);
}

@media (max-width: 767px) {
	.page .entry-title {
		font-size: 30px;
	}
}

/* ------------------------------------------------------------------ 20. Обработка превью */

/* Обложки в лентах приглушены: архив собран из разнородных фотографий —
   скриншоты, пресс-релизы, кадры с телефона, — и в полном цвете они спорят
   друг с другом и с палитрой. Обесцвечиваем почти полностью, добавляем
   суриковый подмес и мягкую виньетку; под курсором картинка оживает.
   Сама фотография не трогается — только показ. */
.onflot-cover {
	position: relative;
	isolation: isolate;
}

.onflot-cover img {
	/* Полпути между оригиналом и полным обесцвечиванием: цвет читается,
	   но не спорит с палитрой. */
	filter: grayscale(.5) sepia(.14) saturate(1.12) contrast(1.02);
	transition: filter .28s ease;
}

/* Виньетка и подмес — отдельным слоем поверх, чтобы не мешать переходу фильтра. */
.onflot-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	/* Радиус чуть меньше самой картинки: иначе тень приходится за её край
	   и углы не темнеют вовсе. */
	background:
		radial-gradient(72% 78% at 50% 45%, rgba(35, 38, 29, 0) 35%, rgba(35, 38, 29, .42) 100%),
		linear-gradient(0deg, rgba(184, 90, 50, .14), rgba(184, 90, 50, .14));
	transition: opacity .28s ease;
	z-index: 1;
}

/* Оживает от наведения на всю карточку, а не только на саму картинку:
   читатель ведёт курсор к заголовку, и обложка должна отзываться вместе с ним. */
.onflot-entry:hover .onflot-cover img,
.related-post:hover .onflot-cover img,
.onflot-cover:hover img {
	filter: none;
}

.onflot-entry:hover .onflot-cover::after,
.related-post:hover .onflot-cover::after,
.onflot-cover:hover::after {
	opacity: 0;
}

/* На тач-экранах наведения нет — там показываем фотографии как есть,
   иначе половина аудитории увидит только приглушённый вариант. */
@media (hover: none) {
	.onflot-cover img {
		filter: none;
	}

	.onflot-cover::after {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.onflot-cover img,
	.onflot-cover::after {
		transition-duration: .12s;
	}
}
