.rules-page {
	width: 100%;
	max-width: 1920px;
	margin: 0 auto;
	padding: 24px 40px 64px;
	box-sizing: border-box;
}

body.blog-embed .rules-page {
	max-width: none;
	padding: 8px 0 32px;
}

@media screen and (max-width: 1439px) {
	body:not(.blog-embed) .rules-page {
		padding-left: 26px;
		padding-right: 26px;
	}
}

@media screen and (max-width: 1023px) {
	body:not(.blog-embed) .rules-page {
		padding-left: 20px;
		padding-right: 20px;
	}
}

@media screen and (max-width: 767px) {
	body:not(.blog-embed) .rules-page {
		padding-left: 16px;
		padding-right: 16px;
	}
}

.rules-layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.rules-nav__toggle {
	display: none;
}

.rules-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rules-nav__item + .rules-nav__item {
	margin-top: 4px;
}

.rules-nav__link {
	display: block;
	padding: 10px 14px;
	font-family: Roboto, sans-serif;
	font-weight: 400;
	font-size: 18px;
	line-height: 1.25;
	letter-spacing: normal;
	text-decoration: none;
	color: #000;
	border-radius: 10px;
}

.rules-nav__link.is-active,
.rules-nav__link:hover {
	background: #F5F5F5;
}

.rules-nav__link--depth-2 {
	padding: 7px 14px;
	font-size: 16px;
	color: #444;
}

.rules-nav__link--depth-3 {
	padding: 6px 14px;
	font-size: 15px;
	color: #666;
}

.rules-nav__item:has(.rules-nav__sub) > .rules-nav__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.rules-nav__item:has(.rules-nav__sub) > .rules-nav__link::after {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .2s ease;
}

.rules-nav__item.is-open > .rules-nav__link::after {
	transform: rotate(45deg);
}

.rules-nav__sub {
	display: none;
	list-style: none;
	margin: 4px 0 8px;
	padding: 0 0 0 16px;
}

.rules-nav__item.is-open > .rules-nav__sub {
	display: block;
}

.rules-nav__sublink {
	display: block;
	padding: 6px 14px;
	font-family: Roboto, sans-serif;
	font-weight: 200;
	font-size: 16px;
	line-height: 1.3;
	letter-spacing: normal;
	text-decoration: none;
	color: #000;
	border-radius: 8px;
}

.rules-nav__sublink.is-active,
.rules-nav__sublink:hover {
	background: #F5F5F5;
}

.rules-content.is-switching {
	animation: rules-panel-in .22s ease;
}

.rules-node {
	display: none;
}

.rules-node.is-visible {
	display: block;
}

.rules-content.is-element .rules-node {
	display: none;
}

.rules-content.is-element .rules-piece.is-solo {
	display: block;
}

.rules-piece__title {
	margin: 28px 0 16px;
	font-family: "Oswald", sans-serif;
	font-weight: 400;
	font-size: 27px;
	line-height: 1.25;
	letter-spacing: 0.02em;
}

/* Заголовки внутри текста пункта (Editor.js) не должны спорить с заголовком
   самого пункта — приглушаем их размер только в контексте страницы правил. */
.rules-piece .article-heading--2,
.rules-single .article-heading--2 {
	font-size: 22px;
}

.rules-piece .article-heading--3,
.rules-single .article-heading--3 {
	font-size: 18px;
}

.rules-page .blog-article__body,
.rules-page .article-paragraph,
.rules-page .article-list,
.rules-page .article-quote__text,
.rules-page .article-image__caption,
.rules-page .article-multi-image__caption,
.rules-page .article-gallery__caption,
.rules-page .article-video__caption {
	font-family: Roboto, sans-serif;
	font-weight: 200;
}

.rules-page .blog-article__body strong,
.rules-page .blog-article__body b {
	font-family: Roboto, sans-serif !important;
	font-weight: 400 !important;
	letter-spacing: normal;
}

.rules-piece--untitled .rules-piece__title {
	display: none;
}

.rules-content.is-element .rules-piece.is-solo .rules-piece__title {
	display: block;
	margin-top: 0;
	scroll-margin-top: calc(var(--header-height, 120px) + 24px);
}

.rules-node__heading {
	margin: 36px 0 16px;
	font-family: "Oswald", sans-serif;
	font-weight: 400;
	font-size: 28px;
	line-height: 1.2;
	letter-spacing: 0.02em;
}

@keyframes rules-panel-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.rules-lead {
	margin: 0 0 28px;
	font-family: "Oswald", sans-serif;
	font-weight: 400;
	font-size: 22px;
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: #000;
}

.rules-item {
	border-bottom: 1px solid #e6e6e6;
}

.rules-item__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 18px 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: left;
	font-family: "Oswald", sans-serif;
	font-weight: 400;
	font-size: 22px;
	line-height: 1.3;
	letter-spacing: 0.02em;
	color: #000;
}

.rules-item__title::after {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s ease;
}

.rules-item.is-open .rules-item__title::after {
	transform: rotate(225deg);
}

.rules-item__body {
	display: none;
	padding: 0 0 22px;
}

.rules-item.is-open .rules-item__body,
.rules-item:target .rules-item__body {
	display: block;
}

@media (max-width: 768px) {
	.rules-page .blog-article__body,
	.rules-page .article-paragraph,
	.rules-page .article-list,
	.rules-page .article-quote__text,
	.rules-page .article-image__caption,
	.rules-page .article-multi-image__caption,
	.rules-page .article-gallery__caption,
	.rules-page .article-video__caption {
		font-size: 16px;
	}

	.rules-layout {
		display: block;
	}

	.rules-nav {
		margin: 0 0 28px;
		border-bottom: 1px solid #e6e6e6;
	}

	.rules-nav__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		margin: 0;
		padding: 14px 0;
		border: 0;
		background: transparent;
		cursor: pointer;
		appearance: none;
		-webkit-appearance: none;
		font-family: Roboto, sans-serif;
		font-weight: 400;
		font-size: 20px;
		letter-spacing: normal;
		text-align: left;
		color: #000;
	}

	.rules-nav__toggle::after {
		content: "";
		width: 10px;
		height: 10px;
		border-right: 1.5px solid currentColor;
		border-bottom: 1.5px solid currentColor;
		transform: rotate(45deg);
	}

	.rules-nav.is-open .rules-nav__toggle::after {
		transform: rotate(225deg);
	}

	.rules-nav__list {
		display: none;
		padding-bottom: 12px;
	}

	.rules-nav.is-open .rules-nav__list {
		display: block;
	}
}
