/* «Что делать?» /need-help/chto-delat/. Префикс chd-.
   style.css задаёт font-size звёздочкой, поэтому кегль стоит на каждом текстовом
   теге, а вложенные теги получают font-size: inherit. */

.chd {
	--chd-radius: 1.88rem;
	padding-bottom: 5rem;
}

.chd :where(h1, h2, p, ol) {
	margin: 0;
}

.chd :where(*, *::before, *::after) {
	box-sizing: border-box;
}

/* --- Список шагов --- */

.chd-intro {
	max-width: 52rem;
	margin: 2.5rem 0 3.13rem;
}

.chd-intro__title {
	font-size: 5.75rem;
	line-height: 1;
	margin-bottom: 1.88rem;
}

.chd-intro__lead {
	font-size: 1rem;
	line-height: 1.45;
	margin-bottom: 0.75rem;
}

.chd-steps {
	list-style: none;
	padding: 0;
	border-top: 1px solid var(--black);
	margin-bottom: 3.13rem;
}

.chd-step {
	display: grid;
	grid-template-columns: 4rem minmax(0, 1fr) 4rem;
	gap: 1.88rem;
	align-items: start;
	padding: 1.88rem 0;
	border-bottom: 1px solid #d6d6d4;
}

.chd-step__num {
	font-size: 2.67rem;
	line-height: 1;
	color: var(--red);
}

.chd-step__title {
	font-size: 1.62rem;
	line-height: 1.25;
	margin-bottom: 0.6rem;
}

.chd-step__link {
	font-size: inherit;
	color: var(--black);
	text-decoration: none;
}

.chd-step__link:hover {
	color: var(--red);
}

.chd-step__text,
.chd-step__text * {
	font-size: 0.88rem;
	line-height: 1.5;
}

.chd-step__text p {
	margin: 0 0 0.5rem;
}

.chd-step__icon {
	width: 4rem;
	height: auto;
}

.chd-help {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem 2.5rem;
	background: var(--light-grey);
	border-radius: var(--chd-radius);
	padding: 2.5rem 3.13rem;
}

.chd-help__text {
	font-size: 1rem;
	line-height: 1.45;
	max-width: 40rem;
}

.chd-help__button {
	display: inline-flex;
	padding: 0 2rem;
}

/* --- Шаг --- */

.chd-detail {
	max-width: 56rem;
	margin: 0 auto;
	padding-top: 2.5rem;
}

.chd-detail__back {
	display: inline-block;
	font-size: 0.88rem;
	color: var(--black);
	margin-bottom: 1.88rem;
}

.chd-detail__back:hover {
	color: var(--red);
}

.chd-detail__num {
	font-size: 0.88rem;
	text-transform: uppercase;
	color: var(--red);
	margin-bottom: 0.75rem;
}

.chd-detail__title {
	font-size: 4rem;
	line-height: 1.05;
	text-transform: none;
	margin-bottom: 1.88rem;
}

.chd-detail__lead,
.chd-detail__lead * {
	font-size: 1.14rem;
	line-height: 1.45;
}

.chd-detail__lead {
	margin-bottom: 2.5rem;
}

.chd-detail__content {
	margin-bottom: 3.13rem;
}

.chd-detail__nav {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 1rem;
}

.chd-detail__nav-link {
	display: block;
	background: var(--light-grey);
	border-radius: var(--chd-radius);
	padding: 1.25rem 1.88rem;
	font-size: 1rem;
	line-height: 1.3;
	color: var(--black);
	text-decoration: none;
	transition: background 0.2s, color 0.2s;
}

.chd-detail__nav-link span {
	display: block;
	font-size: 0.76rem;
	text-transform: uppercase;
	color: #6b6b69;
	margin-bottom: 0.4rem;
}

.chd-detail__nav-link:hover {
	background: var(--black);
	color: var(--white);
}

.chd-detail__nav-link:hover span {
	color: rgba(255, 255, 255, 0.7);
}

.chd-detail__nav-link_next {
	grid-column: 2;
	text-align: right;
}

@media (max-width: 990px) {
	.chd-intro__title {
		font-size: 3.5rem;
	}

	.chd-detail__title {
		font-size: 2.67rem;
	}
}

@media (max-width: 600px) {
	.chd-step {
		grid-template-columns: 2.5rem minmax(0, 1fr);
		gap: 1rem;
	}

	.chd-step__num {
		font-size: 2rem;
	}

	.chd-step__icon {
		display: none;
	}

	.chd-help {
		padding: 1.88rem 1.25rem;
	}

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

	.chd-detail__nav-link_next {
		grid-column: 1;
	}
}
