.single-post-page {
	--single-accent: var(--color-brand);
	--single-accent-dark: var(--color-brand-dark);
	--single-sticky-top: calc(var(--header-height) + 18px);
	padding: 24px 0 70px;
	background: #ffffff;
}

.single-post-page__inner {
	max-width: 1320px;
}

.single-post-breadcrumb {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	margin-bottom: 18px;
	color: var(--color-text);
	font-size: 14px;
	line-height: 1.4;
}

.single-post-breadcrumb a,
.single-post-breadcrumb strong {
	color: inherit;
	font-weight: 500;
	text-decoration: none;
}

.single-post-breadcrumb strong:last-child {
	color: var(--color-heading);
	font-weight: 700;
}

.single-post-title {
	max-width: 940px;
	margin: 0 0 8px;
	color: var(--single-accent);
	font-size: clamp(25px, 2.45vw, 34px);
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.2;
}

.single-post-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 13px;
	margin-bottom: 22px;
	color: var(--color-muted);
	font-size: 14px;
	font-weight: 400;
}

.single-post-meta span {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.single-post-meta span::before {
	display: inline-block;
	width: 15px;
	height: 15px;
	background: var(--single-accent);
	content: "";
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
}

.single-post-meta__date::before {
	mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 5v5.2l3.6 2.1-1 1.7-4.6-2.7V7h2Z'/%3E%3C/svg%3E");
}

.single-post-meta__author::before {
	mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0 2c-4.4 0-8 2.4-8 5.4V22h16v-2.6c0-3-3.6-5.4-8-5.4Z'/%3E%3C/svg%3E");
}

.single-post-layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr) 260px;
	align-items: start;
	gap: 20px;
}

.single-post-toc {
	position: sticky;
	top: var(--single-sticky-top);
	max-height: calc(100vh - var(--single-sticky-top) - 16px);
	overflow: auto;
	scrollbar-width: thin;
}

.single-consult {
	position: sticky;
	top: var(--single-sticky-top);
	align-self: start;
}

.single-post-sidebar {
	align-self: stretch;
	min-width: 0;
}

.single-post-toc {
	border-radius: 4px;
	background: var(--color-soft);
	box-shadow: 0 7px 16px rgba(18, 35, 58, 0.08);
}

.single-post-toc__title {
	display: flex;
	align-items: center;
	gap: 7px;
	min-height: 42px;
	padding: 0 9px;
	color: var(--color-text);
	font-size: 16px;
	font-weight: 700;
}

.single-post-toc__title span {
	position: relative;
	width: 18px;
	height: 16px;
	border-top: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
}

.single-post-toc__title span::before,
.single-post-toc__title span::after {
	position: absolute;
	left: 0;
	width: 18px;
	height: 2px;
	background: currentColor;
	content: "";
}

.single-post-toc__title span::before {
	top: 5px;
}

.single-post-toc__title span::after {
	top: -2px;
	left: -5px;
	width: 2px;
	height: 2px;
	border-radius: 999px;
	box-shadow: 0 7px 0 currentColor, 0 14px 0 currentColor;
}

.single-post-toc__list {
	margin: 0;
	padding: 0 7px 20px;
	list-style: none;
	counter-reset: toc;
}

.single-post-toc__item {
	counter-increment: toc;
}

.single-post-toc__item a {
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr);
	gap: 6px;
	padding: 6px 7px;
	border-radius: 2px;
	color: var(--color-text);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	text-decoration: none;
	transition: background 180ms ease, color 180ms ease;
}

.single-post-toc__item--level-3 a {
	padding-left: 16px;
	font-size: 13px;
	font-weight: 500;
}

.single-post-toc__item a:hover,
.single-post-toc__item a:focus,
.single-post-toc__item a.is-active {
	background: var(--color-brand-light);
	color: var(--single-accent-dark);
	text-decoration: none;
}

.single-post-toc__item span {
	color: var(--color-text);
	font-weight: 700;
}

.single-post-toc__close {
	display: none;
}

.single-post-main {
	min-width: 0;
}

.single-post-content {
	color: var(--color-text);
	font-size: 18px;
	line-height: 1.72;
	counter-reset: content-heading;
}

.single-post-content > *:first-child {
	margin-top: 0;
}

.single-post-content p {
	margin: 0 0 20px;
}

.single-post-content p:first-of-type {
	padding: 13px 16px;
	border: 1px solid #123f91;
	border-radius: 8px;
	line-height: 1.62;
}

.single-post-content a {
	color: var(--single-accent);
	font-weight: 600;
	text-decoration: none;
}

.single-post-content a:hover,
.single-post-content a:focus {
	text-decoration: underline;
}

.single-post-content h2 {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	margin: 28px 0 10px;
	border-bottom: 2px solid var(--single-accent);
	color: var(--single-accent-dark);
	font-size: clamp(20px, 1.8vw, 25px);
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.2;
	scroll-margin-top: calc(var(--single-sticky-top) + 10px);
	counter-increment: content-heading;
}

.single-post-content h2::before {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 34px;
	width: 34px;
	height: 31px;
	background: var(--single-accent-dark);
	color: #ffffff;
	font-size: 21px;
	font-weight: 700;
	line-height: 1;
	content: counter(content-heading);
}

.single-post-content h3 {
	margin: 24px 0 9px;
	color: var(--color-heading);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.28;
	scroll-margin-top: calc(var(--single-sticky-top) + 10px);
}

.single-post-content ul,
.single-post-content ol {
	margin: 0 0 22px 24px;
	padding: 0;
}

.single-post-content li {
	margin-bottom: 8px;
}

.single-post-content img {
	width: 100%;
	max-width: 100%;
	margin: 18px auto 10px;
	border-radius: 0;
	object-fit: contain;
}

.single-post-content figure {
	max-width: 100%;
	margin: 26px 0 24px;
}

.single-post-content .wp-caption {
	max-width: 100%;
}

.single-post-content figcaption,
.single-post-content .wp-caption-text {
	margin-top: 9px;
	color: var(--color-muted);
	font-size: 15px;
	font-style: italic;
	line-height: 1.45;
	text-align: center;
}

.single-post-content blockquote {
	margin: 24px 0;
	padding: 14px 18px;
	border-left: 4px solid var(--single-accent);
	background: var(--color-soft);
}

.single-post-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
	font-size: 16px;
}

.single-post-content iframe,
.single-post-content video,
.single-post-content embed,
.single-post-content object {
	max-width: 100%;
}

.single-post-content th,
.single-post-content td {
	padding: 10px 12px;
	border: 1px solid var(--color-border);
	text-align: left;
}

.single-blog-related {
	margin-bottom: 22px;
	padding: 16px 14px 18px;
	border: 1px solid var(--color-heading);
	border-radius: 8px;
	background: #ffffff;
}

.single-blog-related h2 {
	margin: 0 0 15px;
	color: var(--color-heading);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
}

.single-blog-related__item {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	gap: 10px;
	margin-bottom: 14px;
	padding-bottom: 0;
}

.single-blog-related__item:last-child {
	margin-bottom: 0;
}

.single-blog-related__thumb {
	display: block;
	overflow: hidden;
	border-radius: 4px;
	background: var(--color-brand-light);
}

.single-blog-related__thumb img {
	width: 100%;
	aspect-ratio: 1.33;
	object-fit: cover;
}

.single-blog-related h3 {
	margin: 0 0 5px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.42;
}

.single-blog-related h3 a {
	display: -webkit-box;
	overflow: hidden;
	color: var(--color-text);
	text-decoration: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.single-blog-related__more {
	color: var(--single-accent);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.single-consult {
	overflow: hidden;
	padding: 12px 15px 34px;
	border-radius: 8px;
	background:
		radial-gradient(circle at 78% 48%, rgba(255, 255, 255, 0.9) 0 8%, transparent 9% 15%, rgba(255, 255, 255, 0.45) 16% 18%, transparent 19%),
		linear-gradient(135deg, #dff0ff 0%, #eaf6ff 54%, #cfe6ff 100%);
	box-shadow: 0 10px 24px rgba(18, 76, 140, 0.18);
	color: var(--color-brand);
}

.single-consult__brand {
	display: grid;
	justify-items: center;
	gap: 4px;
	margin-bottom: 20px;
	color: var(--color-brand);
	font-size: 14px;
	text-align: center;
}

.single-consult__brand::before,
.single-consult__brand::after {
	display: block;
	width: 100%;
	height: 1px;
	background: var(--color-brand);
	content: "";
}

.single-consult__brand img {
	width: 150px;
	margin-top: 3px;
}

.single-consult__brand small {
	font-size: 13px;
}

.single-consult h2 {
	margin: 0 0 22px;
	color: var(--single-accent);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
}

.single-consult form {
	display: grid;
	gap: 15px;
}

.single-consult label {
	display: grid;
	gap: 7px;
	color: var(--color-brand);
	font-size: 15px;
	font-weight: 400;
}

.single-consult input {
	width: 100%;
	height: 35px;
	padding: 0 12px;
	border: 1px solid var(--color-brand);
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.28);
	color: var(--color-text);
	font: inherit;
}

.single-consult input::placeholder {
	color: #8baed0;
}

.single-consult button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: calc(100% - 32px);
	min-height: 40px;
	margin: 6px auto 0;
	border: 0;
	border-radius: 5px;
	background: var(--single-accent);
	color: #ffffff;
	cursor: pointer;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
}

.single-consult button span {
	width: 22px;
	height: 22px;
	background: currentColor;
	mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4l21 8-21 8 5-8-5-8Zm5 8h16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	transform: rotate(-10deg);
}

.single-related {
	margin-top: 42px;
}

.single-related h2 {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 18px;
	color: var(--single-accent);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
	text-transform: uppercase;
}

.single-related h2::before,
.single-related h2::after {
	flex: 1 1 auto;
	height: 1px;
	background: var(--single-accent);
	content: "";
}

.single-related h2 span {
	flex: 0 0 auto;
	padding: 5px 12px;
	background: #ffffff;
}

.single-related__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.single-related-card {
	display: grid;
	grid-template-columns: 145px minmax(0, 1fr);
	gap: 10px;
	min-height: 114px;
	padding: 7px;
	border: 1px solid rgba(6, 74, 167, 0.28);
	border-radius: 5px;
	box-shadow: 2px 3px 0 rgba(6, 74, 167, 0.12);
}

.single-related-card__thumb {
	overflow: hidden;
	border-radius: 5px;
	background: var(--color-brand-light);
}

.single-related-card__thumb img {
	width: 100%;
	aspect-ratio: 1.45;
	object-fit: cover;
}

.single-related-card h3 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.38;
}

.single-related-card h3 a {
	display: -webkit-box;
	overflow: hidden;
	color: var(--color-text);
	text-decoration: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.single-related-card p {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	color: var(--color-text);
	font-size: 15px;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.single-post-comments {
	margin-top: 34px;
}

@media (max-width: 1180px) {
	.single-post-layout {
		grid-template-columns: 200px minmax(0, 1fr) 250px;
		gap: 18px;
	}

	.single-post-content {
		font-size: 17px;
	}
}

@media (max-width: 1024px) {
	.single-post-layout {
		grid-template-columns: 1fr;
	}

	.single-post-toc {
		position: static;
		max-height: none;
		overflow: visible;
	}

	.single-consult {
		position: static;
		max-height: none;
		overflow: visible;
	}

	.single-post-toc__list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2px 8px;
	}

	.single-post-sidebar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
		align-items: start;
		gap: 18px;
		position: static;
	}
}

@media (max-width: 820px) {
	.single-post-page {
		padding: 18px 0 48px;
	}

	.single-post-page::before {
		position: fixed;
		z-index: 44;
		inset: 0;
		background: rgba(7, 29, 62, 0.18);
		backdrop-filter: blur(4px);
		content: "";
		opacity: 0;
		pointer-events: none;
		transition: opacity 180ms ease;
	}

	.single-post-page.is-toc-open::before {
		opacity: 1;
	}

	.single-post-layout {
		grid-template-columns: 1fr;
	}

	.single-post-toc {
		position: fixed;
		z-index: 45;
		top: 50%;
		left: 12px;
		width: 38px;
		height: 38px;
		max-height: none;
		overflow: hidden;
		border: 1px solid var(--color-heading);
		border-radius: 6px;
		background: #ffffff;
		box-shadow: 0 8px 18px rgba(18, 35, 58, 0.18);
		opacity: 0;
		pointer-events: none;
		transform: translateY(-50%) translateX(-10px);
		transition: opacity 180ms ease, transform 180ms ease, width 180ms ease, height 180ms ease, background 180ms ease;
	}

	.single-post-toc.is-mobile-visible,
	.single-post-toc.is-open {
		opacity: 1;
		pointer-events: auto;
		transform: translateY(-50%) translateX(0);
	}

	.single-post-toc:not(.is-open) .single-post-toc__title {
		width: 100%;
		height: 100%;
		min-height: 0;
		padding: 0;
		justify-content: center;
		font-size: 0;
	}

	.single-post-toc:not(.is-open) .single-post-toc__list {
		display: none;
	}

	.single-post-toc.is-open {
		top: calc(var(--single-sticky-top) + 12px);
		left: 50%;
		width: min(330px, calc(100vw - 30px));
		height: min(340px, calc(100svh - var(--single-sticky-top) - 28px));
		border: 0;
		border-radius: 6px;
		background: var(--color-brand);
		box-shadow: 0 8px 0 var(--color-brand-dark), 0 16px 30px rgba(7, 29, 62, 0.22);
		color: #ffffff;
		transform: translateX(-50%);
	}

	.single-post-toc.is-open .single-post-toc__title {
		min-height: 50px;
		padding: 0 44px 0 12px;
		background: var(--color-brand-dark);
		color: #ffffff;
		font-size: 21px;
		font-weight: 700;
	}

	.single-post-toc.is-open .single-post-toc__title span,
	.single-post-toc.is-open .single-post-toc__title span::before,
	.single-post-toc.is-open .single-post-toc__title span::after {
		color: #ffffff;
	}

	.single-post-toc__close {
		position: absolute;
		top: 9px;
		right: 10px;
		display: none;
		width: 30px;
		height: 30px;
		padding: 0;
		border: 0;
		background: transparent;
		color: #ffffff;
		cursor: pointer;
		font: inherit;
		font-size: 25px;
		font-weight: 700;
		line-height: 1;
	}

	.single-post-toc.is-open .single-post-toc__close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.single-post-toc.is-open .single-post-toc__list {
		display: grid;
		grid-template-columns: 1fr;
		gap: 2px;
		max-height: calc(100% - 54px);
		overflow-y: auto;
		padding: 6px 12px 18px;
	}

	.single-post-toc.is-open .single-post-toc__item a {
		display: grid;
		grid-template-columns: 18px minmax(0, 1fr);
		gap: 6px;
		padding: 4px 0;
		background: transparent;
		color: #ffffff;
		font-size: 15px;
		font-weight: 700;
		line-height: 1.25;
	}

	.single-post-toc.is-open .single-post-toc__item a.is-active,
	.single-post-toc.is-open .single-post-toc__item a:hover,
	.single-post-toc.is-open .single-post-toc__item a:focus {
		background: transparent;
		color: #ffffff;
		text-decoration: underline;
		text-underline-offset: 4px;
	}

	.single-post-toc.is-open .single-post-toc__item span {
		color: #ffffff;
		font-weight: 700;
	}

	.single-post-toc.is-open .single-post-toc__item--level-3 a {
		padding-left: 14px;
	}

	.single-post-sidebar {
		display: block;
	}

	.single-blog-related {
		order: 2;
	}

	.single-consult {
		max-width: 390px;
		margin-inline: auto;
	}

	.single-related__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.single-post-page__inner {
		width: min(var(--container), calc(100% - 28px));
	}

	.single-post-breadcrumb {
		font-size: 13px;
	}

	.single-post-title {
		font-size: 27px;
	}

	.single-post-meta {
		gap: 8px 12px;
		font-size: 13px;
	}

	.single-post-toc__list {
		grid-template-columns: 1fr;
		padding-bottom: 12px;
	}

	.single-post-content {
		font-size: 16px;
		line-height: 1.68;
	}

	.single-post-content p:first-of-type {
		padding: 11px 12px;
	}

	.single-post-content h2 {
		align-items: flex-start;
		font-size: 22px;
	}

	.single-post-content h2::before {
		flex-basis: 30px;
		width: 30px;
		height: 29px;
		font-size: 21px;
	}

	.single-post-content h3 {
		font-size: 20px;
	}

	.single-blog-related__item,
	.single-related-card {
		grid-template-columns: 112px minmax(0, 1fr);
	}

	.single-related h2 {
		gap: 8px;
		font-size: 22px;
	}

	.single-related h2 span {
		padding-inline: 8px;
	}

	.single-related-card h3 {
		font-size: 14px;
	}

	.single-related-card p {
		font-size: 14px;
	}
}

@media (max-width: 380px) {
	.single-post-title {
		font-size: 24px;
	}

	.single-blog-related__item,
	.single-related-card {
		grid-template-columns: 96px minmax(0, 1fr);
	}

	.single-consult {
		padding-inline: 12px;
	}

	.single-consult h2 {
		font-size: 23px;
	}
}
