/*
	Capital+ — свой файл стилей.

	Полная копия invest-life.css на момент 24.09.2026 с перенумерованными шагами:
	у Invest Life страхователь и застрахованный на одном шаге, у Capital+ они
	разведены, выгодоприобретатели и условия тоже разные шаги. Поэтому блоки
	&[data-step] переехали по своим номерам, а часть продублирована на два шага —
	правила внутри привязаны к конкретным полям и на чужом шаге просто не находят
	элементов.

	invest-life.css для Capital+ больше не подключается (modules/so/h.inc): два
	файла с одинаковыми селекторами перебивали друг друга.
*/

:root {
	--hdr: 15px;
	--lmgray:#D3D3D3;
	--dmgray:#141414;
	--nomad:#E74013;
	--nomad-dark:#C43209;
	--dmlgray:#3A3A3A;
	--white:#fff;
	--lgray:#E5E7EA;
	--ldgray:#7A7A7A;
	--ulgray:#f5f6f7;
	--gray:#666;
	--lmdgray:#555;
	--dgray:#000;
	--mlgray:#afb1b8;
}

div.productForm {
	.form {
		div {
			&.line {
				&>label {
					&:first-child {
						margin:0;
					}
				}

				&:has(#property) {
					.block {
						&:has(option[value="n"]:checked) {
							&+.block {
								display:none;
							}
						}
					}
				}

				&:has(#financialIncome) {
					.block {
						&:nth-child(2) {
							&:not(:has(a)) {
								display:none;
							}
						}
					}
				}

				div {
					&.block {
						&.r {
							padding:0;

							.cb {
								&+label {
									line-height: 40px;

									&:before,
									&:after {
										top:50%;
										transform:translateY(-50%);
									}
								}
							}
						}

						&#financialDocument {
							a {
								margin:0;
							}
						}

						a {
							display:inline-block;
							font-size:14px;
							text-decoration:underline;
							margin-top:10px;

							&:hover {
								text-decoration:none;
							}

							&.btn {
								text-decoration:none;
							}
						}

						&.action {
							a {
								margin:0;
							}
						}
					}

					&.t {
						width:100%;

						&.family {
							&:has(option[value="FATHER"]:checked) {
								option[value="FATHER"] {
									display:none;

									&:checked {
										display:block;
									}
								}
							}

							&:not(:has(.r:nth-child(2))) {
								display:none;
							}

							&:has(option[value="MOTHER"]:checked) {
								option[value="MOTHER"] {
									display:none;

									&:checked {
										display:block;
									}
								}
							}
						}

						&.obligations {
							&:not(:has(.r:nth-child(2))) {
								display:none;
							}
						}

						.r {
							& + .r {
								.c {
									padding-top:10px;
								}
							}

							.c {
								padding:0;
								font-size:14px;

								& + .c {
									padding-left:20px;
								}

								&.h {
									font-weight:500;
								}

								&:not(:has(select[name*="death_diagnosis"] option[value="DISEASE"]:checked)) {
									.select:has(select[name*="death_diagnosis_disease"]) {
										display:none;
									}
								}

								.select {
									&+.select {
										margin-top:10px;
									}
								}
							}
						}

						&.financial {
							.r {
								&.h {
									.c {
										font-size:16px;
										font-weight:500;
									}
								}
							}
						}
					}
				}
			}
		}
	}

	#orderForm {
		/* Пока форма занята, все её кнопки блокируются, и «Далее» по одному только
		   disabled показывает полосатую анимацию ожидания. Но если нажали другую
		   кнопку — например, «Загрузить детей», — крутиться должно у неё одной,
		   а «Далее» просто заблокирована */
		&:has(.btn.loading) {
			.line {
				&.actions {
					input.btn:disabled {
						background:var(--NomadColor);
						color:var(--White);
						animation:none;
					}
				}
			}
		}

		/*	шаг 1 Invest Life: страхователь и застрахованный на одном шаге — у Capital+ это шаги 1 и 2 */
		&[data-step="1"] {
			.line {
				&:has(#notificationEMail) {
					&:not(:has(#notificationEMail:checked)) {
						.block {
							&:has(#email) {
								display:none;
							}

							&.r {
								& > label {
									&:first-child {
										display:none;
									}
								}

								.cb {
									& + label {
										line-height:20px;
									}
								}
							}
						}
					}
				}

				&:has(#notificationInsuredEMail) {
					&:not(:has(#notificationInsuredEMail:checked)) {
						.block {
							&:has(#insuredEmail) {
								display:none;
							}

							&.r {
								& > label {
									&:first-child {
										display:none;
									}
								}

								.cb {
									& + label {
										line-height:20px;
									}
								}
							}
						}
					}
				}

				&:has(#profession) {
					&:not(:has(#profession option[data-other="1"]:checked)) {
						.block {
							&:has(#otherProfession) {
								display:none;
							}
						}
					}

					&:has(#profession option[data-other="1"]:checked) {
						.block {
							flex:0 0 calc((100% - var(--Gap))/2);
						}
					}
				}

				&[id*="employmentTypeLine"] {
					.block {
						&>label {
							&:first-child {
								white-space:nowrap;
							}
						}

						&:has([id*="employmentType"] option[value="UNEMPLOYED"]:checked),
						&:has([id*="employmentType"] option[value="STUDENT"]:checked),
						&:has([id*="employmentType"] option[value="UNEMPLOYED_HOUSEWIFE"]:checked) {
							&~.block {
								display:none;
							}
						}

						&:has([id*="employmentType"] option[value="OTHER"]:not(:checked)) {
							&~.block {
								&:has([id*="employmentTypeOther"]) {
									display:none;
								}
							}
						}

						&:has([id*="employmentType"] option[value="OTHER"]:checked) {
							&~.block {
								&:not(:has([id*="employmentTypeOther"])) {
									display:none;
								}
							}
						}
					}
				}

				.block {
					&:has(#ipdlN:checked) {
						&~.block {
							display:none;
						}
					}
				}

				&#profitLine {
					.block {
						&:not(:has(option[data-other="y"]:checked)) {
							&+.block {
								display:none;
							}
						}
					}
				}
			}

			&:not(:has(#insuredType [value="INSURER"]:checked)) {
				.insured {
					&:has([name^="insuredType"] [value="INSURER"]:checked) {
						.line {
							&[id^="employmentTypeLine"] {
								display:flex !important;
								pointer-events:auto !important;
							}

							&:has([id^="height"]) {
								display:flex !important;
								pointer-events:auto !important;
							}
						}
					}
				}
			}

			&:not(:has(#insuredType option[value="OTHER"]:checked,#insuredType option[value="OTHER_CHILD"]:checked)) {
				.line {
					&:has(#insuredIin),
					&:has(#insuredEmail) {
						display:none;
					}
				}
			}

			/* полный список «кем приходится» — только у взрослого иного лица: у ребёнка
			   иного лица свой короткий список, а у ребёнка страхователя родство
			   выводится из пола */
			&:not(:has(#insuredType option[value="OTHER"]:checked)) {
				.line {
					&:has(#relationshipWithInsurer) {
						display:none;
					}
				}
			}

			/* Поля основного застрахованного адресуем по идентификаторам, а не по
			   классам: правила этого блока действуют на всю форму шага, и по классу
			   они задели бы такие же поля внутри дополнительного застрахованного —
			   у того свои идентификаторы с номером */

			/* список детей и кнопка его загрузки нужны только детским типам. Пока
			   агент не отправил форму, разметка остаётся от прежнего типа, поэтому
			   прячем их и здесь. Адресуем по своим идентификаторам: у дополнительного
			   застрахованного такие же строки, но со своими номерами */
			&:not(:has(#insuredType option[value="CHILD"]:checked,#insuredType option[value="OTHER_CHILD"]:checked)) {
				.line {
					&:has(#children),
					&:has(.parentChild) {
						display:none;
					}
				}
			}

			/* короткий список «кем приходится» стоит рядом со списком детей и нужен
			   только ребёнку иного лица: ребёнку страхователя родство даёт пол */
			&:not(:has(#insuredType option[value="OTHER_CHILD"]:checked)) {
				.line {
					&:has(#childRelationship) {
						display:none;
					}
				}
			}

			/* пол спрашиваем только у ребёнка: взрослому он приходит из getPerson3 */
			&:not(:has(#insuredType option[value="CHILD"]:checked,#insuredType option[value="OTHER_CHILD"]:checked)) {
				.line {
					.block {
						&:has(#insuredGender) {
							display:none;
						}
					}
				}
			}

			/* расшифровку родства вводят только при «Иное» */
			.line {
				&:has(#childRelationship) {
					&:not(:has(#childRelationship option[value="OTHER"]:checked)) {
						.block {
							&.other {
								display:none;
							}
						}
					}
				}
			}

			&:has(#insuredType option[value="OTHER"]:checked) {
				.line {
					&:has(#insuredIin),
					&:has(#insuredEmail) {
						.block {
							&>label {
								&:first-child {
									&:after {
										content:attr(data-other);
									}
								}
							}
						}
					}
				}
			}

			&:has(#insuredType option[value="OTHER_CHILD"]:checked) {
				.line {
					&:has(#insuredIin),
					&:has(#insuredEmail) {
						.block {
							&>label {
								&:first-child {
									&:after {
										content:attr(data-other-child);
									}
								}
							}
						}
					}
				}
			}

			&:not(:has(#hasExtraInsured:checked)) {
				.line {
					&.insured {
						display:none;
					}
				}
			}

			#actionLine {
				&:not(:has(#cond:checked)),
				&:not(:has(#cond1:checked)) {
					.btn {
						pointer-events:none;
						opacity:.5;
						cursor:not-allowed;
					}
				}
			}
		}

		/*	шаг 1 Invest Life: страхователь и застрахованный на одном шаге — у Capital+ это шаги 1 и 2 */
		&[data-step="2"] {
			.line {
				&:has(#notificationEMail) {
					&:not(:has(#notificationEMail:checked)) {
						.block {
							&:has(#email) {
								display:none;
							}

							&.r {
								& > label {
									&:first-child {
										display:none;
									}
								}

								.cb {
									& + label {
										line-height:20px;
									}
								}
							}
						}
					}
				}

				&:has(#notificationInsuredEMail) {
					&:not(:has(#notificationInsuredEMail:checked)) {
						.block {
							&:has(#insuredEmail) {
								display:none;
							}

							&.r {
								& > label {
									&:first-child {
										display:none;
									}
								}

								.cb {
									& + label {
										line-height:20px;
									}
								}
							}
						}
					}
				}

				&:has(#profession) {
					&:not(:has(#profession option[data-other="1"]:checked)) {
						.block {
							&:has(#otherProfession) {
								display:none;
							}
						}
					}

					&:has(#profession option[data-other="1"]:checked) {
						.block {
							flex:0 0 calc((100% - var(--Gap))/2);
						}
					}
				}

				&[id*="employmentTypeLine"] {
					.block {
						&>label {
							&:first-child {
								white-space:nowrap;
							}
						}

						&:has([id*="employmentType"] option[value="UNEMPLOYED"]:checked),
						&:has([id*="employmentType"] option[value="STUDENT"]:checked),
						&:has([id*="employmentType"] option[value="UNEMPLOYED_HOUSEWIFE"]:checked) {
							&~.block {
								display:none;
							}
						}

						&:has([id*="employmentType"] option[value="OTHER"]:not(:checked)) {
							&~.block {
								&:has([id*="employmentTypeOther"]) {
									display:none;
								}
							}
						}

						&:has([id*="employmentType"] option[value="OTHER"]:checked) {
							&~.block {
								&:not(:has([id*="employmentTypeOther"])) {
									display:none;
								}
							}
						}
					}
				}

				.block {
					&:has(#ipdlN:checked) {
						&~.block {
							display:none;
						}
					}
				}

				&#profitLine {
					.block {
						&:not(:has(option[data-other="y"]:checked)) {
							&+.block {
								display:none;
							}
						}
					}
				}
			}

			&:not(:has(#insuredType [value="INSURER"]:checked)) {
				.insured {
					&:has([name^="insuredType"] [value="INSURER"]:checked) {
						.line {
							&[id^="employmentTypeLine"] {
								display:flex !important;
								pointer-events:auto !important;
							}

							&:has([id^="height"]) {
								display:flex !important;
								pointer-events:auto !important;
							}
						}
					}
				}
			}

			&:not(:has(#insuredType option[value="OTHER"]:checked,#insuredType option[value="OTHER_CHILD"]:checked)) {
				.line {
					&:has(#insuredIin),
					&:has(#insuredEmail) {
						display:none;
					}
				}
			}

			/* полный список «кем приходится» — только у взрослого иного лица: у ребёнка
			   иного лица свой короткий список, а у ребёнка страхователя родство
			   выводится из пола */
			&:not(:has(#insuredType option[value="OTHER"]:checked)) {
				.line {
					&:has(#relationshipWithInsurer) {
						display:none;
					}
				}
			}

			/* Поля основного застрахованного адресуем по идентификаторам, а не по
			   классам: правила этого блока действуют на всю форму шага, и по классу
			   они задели бы такие же поля внутри дополнительного застрахованного —
			   у того свои идентификаторы с номером */

			/* список детей и кнопка его загрузки нужны только детским типам. Пока
			   агент не отправил форму, разметка остаётся от прежнего типа, поэтому
			   прячем их и здесь. Адресуем по своим идентификаторам: у дополнительного
			   застрахованного такие же строки, но со своими номерами */
			&:not(:has(#insuredType option[value="CHILD"]:checked,#insuredType option[value="OTHER_CHILD"]:checked)) {
				.line {
					&:has(#children),
					&:has(.parentChild) {
						display:none;
					}
				}
			}

			/* короткий список «кем приходится» стоит рядом со списком детей и нужен
			   только ребёнку иного лица: ребёнку страхователя родство даёт пол */
			&:not(:has(#insuredType option[value="OTHER_CHILD"]:checked)) {
				.line {
					&:has(#childRelationship) {
						display:none;
					}
				}
			}

			/* пол спрашиваем только у ребёнка: взрослому он приходит из getPerson3 */
			&:not(:has(#insuredType option[value="CHILD"]:checked,#insuredType option[value="OTHER_CHILD"]:checked)) {
				.line {
					.block {
						&:has(#insuredGender) {
							display:none;
						}
					}
				}
			}

			/* расшифровку родства вводят только при «Иное» */
			.line {
				&:has(#childRelationship) {
					&:not(:has(#childRelationship option[value="OTHER"]:checked)) {
						.block {
							&.other {
								display:none;
							}
						}
					}
				}
			}

			&:has(#insuredType option[value="OTHER"]:checked) {
				.line {
					&:has(#insuredIin),
					&:has(#insuredEmail) {
						.block {
							&>label {
								&:first-child {
									&:after {
										content:attr(data-other);
									}
								}
							}
						}
					}
				}
			}

			&:has(#insuredType option[value="OTHER_CHILD"]:checked) {
				.line {
					&:has(#insuredIin),
					&:has(#insuredEmail) {
						.block {
							&>label {
								&:first-child {
									&:after {
										content:attr(data-other-child);
									}
								}
							}
						}
					}
				}
			}

			&:not(:has(#hasExtraInsured:checked)) {
				.line {
					&.insured {
						display:none;
					}
				}
			}

			#actionLine {
				&:not(:has(#cond:checked)),
				&:not(:has(#cond1:checked)) {
					.btn {
						pointer-events:none;
						opacity:.5;
						cursor:not-allowed;
					}
				}
			}
		}

		/*	шаг 2 Invest Life: выгодоприобретатели и условия — у Capital+ это шаги 3 и 4 */
		&[data-step="3"] {
			.line {
				&:has(#paymentOrder option[value="OT"]:checked) {
					.block {
						&:has(#paymentPeriod) {
							display:none;
						}
					}
				}
			}

			.beneficiaries-section {
				&+.beneficiaries-section {
					margin-top:30px;
				}

				&[data-type="DEATH"]:not(:has(#beneficiaryTypeDEATH option[value="OTHER"]:checked)),
				&[data-type="SURVIVAL"]:not(:has(#beneficiaryTypeSURVIVAL option[value="OTHER"]:checked)) {
					.line {
						&.beneficiaries {
							display:none;
						}
					}

					#actionLine {
						.ben {
							display:none;
						}
					}

					.block.action {
						display:none;
					}
				}

				.beneficiaries {
					display:flex;
					flex-direction:column;
					gap:20px;

					.beneficiary {
						.line {
							row-gap:20px;
						}

						&:first-child {
							.block {
								&.delete {
									display:none;
								}
							}
						}

						.type {
							&:has(option[value="CHILD"]:checked) {
								~.block {
									&.t-label {
										label {
											&:before {
												content:attr(data-child);
											}
										}
									}
								}
							}

							&:has(option[value="ADULT"]:checked) {
								~.block {
									&.child {
										display:none;
									}
								}
							}
						}

						.t-label {
							label {
								&:before {
									content:attr(data-adult);
								}
							}
						}

						.child {
							&:has(.btn) {
								display:flex;
								align-items:flex-end;
								justify-content:flex-end;
							}
						}
					}
				}

				.block {
					&.delete {
						flex:1;
						align-items:flex-end;
						justify-content:flex-end;
						height:100%;
						align-self:center;
						display:flex;

						.delete {
							display:inline-block;
							padding:0 10px;
							margin:0;
							text-decoration:none;
							font-size:18px;
							color:var(--NomadColor);

							&:hover {
								text-decoration:underline;
							}
						}
					}
				}
			}

			#actionLine {
				.ben {
					.btn {
						padding:0 10px;
						margin:0;
						text-decoration:none;
						font-size:18px;
					}
				}
			}
		}

		/*	шаг 2 Invest Life: выгодоприобретатели и условия — у Capital+ это шаги 3 и 4 */
		&[data-step="4"] {
			.line {
				&:has(#paymentOrder option[value="OT"]:checked) {
					.block {
						&:has(#paymentPeriod) {
							display:none;
						}
					}
				}
			}

			.beneficiaries-section {
				&+.beneficiaries-section {
					margin-top:30px;
				}

				&[data-type="DEATH"]:not(:has(#beneficiaryTypeDEATH option[value="OTHER"]:checked)),
				&[data-type="SURVIVAL"]:not(:has(#beneficiaryTypeSURVIVAL option[value="OTHER"]:checked)) {
					.line {
						&.beneficiaries {
							display:none;
						}
					}

					#actionLine {
						.ben {
							display:none;
						}
					}

					.block.action {
						display:none;
					}
				}

				.beneficiaries {
					display:flex;
					flex-direction:column;
					gap:20px;

					.beneficiary {
						.line {
							row-gap:20px;
						}

						&:first-child {
							.block {
								&.delete {
									display:none;
								}
							}
						}

						.type {
							&:has(option[value="CHILD"]:checked) {
								~.block {
									&.t-label {
										label {
											&:before {
												content:attr(data-child);
											}
										}
									}
								}
							}

							&:has(option[value="ADULT"]:checked) {
								~.block {
									&.child {
										display:none;
									}
								}
							}
						}

						.t-label {
							label {
								&:before {
									content:attr(data-adult);
								}
							}
						}

						.child {
							&:has(.btn) {
								display:flex;
								align-items:flex-end;
								justify-content:flex-end;
							}
						}
					}
				}

				.block {
					&.delete {
						flex:1;
						align-items:flex-end;
						justify-content:flex-end;
						height:100%;
						align-self:center;
						display:flex;

						.delete {
							display:inline-block;
							padding:0 10px;
							margin:0;
							text-decoration:none;
							font-size:18px;
							color:var(--NomadColor);

							&:hover {
								text-decoration:underline;
							}
						}
					}
				}
			}

			#actionLine {
				.ben {
					.btn {
						padding:0 10px;
						margin:0;
						text-decoration:none;
						font-size:18px;
					}
				}
			}
		}

		/*	шаг 3 Invest Life: покрытия — у Capital+ это шаг 5 */
		&[data-step="5"] {
			/* &:not(:has(#healthDeclaration:checked)) {
				&:not(:has([name*="question"][value="y"]:checked)) {
					#actionLine {
						input {
							&.btn {
								pointer-events:none;
								opacity:0.5;
								background: rgba(244,115,22,.3);
								cursor:default;
								color:var(--NomadColor);
							}
						}
					}
				}
			} */

			.block {
				&:has(#criticalDiseases option[value="0"]:checked) {
					&~.block {
						&:has(#criticalDiseaseAmount) {
							display:none;
						}
					}
				}
			}

			h2 {
				&.title {
					&:not(:has(~.line.fw .block)){
						display:none;

						&+.fw {
							display:none;
						}
					}
				}
			}
		}

		/*	шаг 4 Invest Life: финансовый опросник — у Capital+ он внутри шага 6 */
		&[data-step="6"] {
			&:has(#financialIncome){
				&:not(:has(#financialDocument a)) {
					#actionLine {
						input {
							&.btn {
								pointer-events:none;
								opacity:0.5;
								background: rgba(244,115,22,.3);
								cursor:default;
								color:var(--NomadColor);
							}
						}
					}
				}
			}
		}

		/*	шаг 5 Invest Life: бланк-опросник — у Capital+ это шаг 6 */
		&[data-step="6"] {
			.line {
				&.step {
					display:flex;
					flex-direction:column;
					gap:15px;

					.actions {
						margin:0;

						display:flex;
						flex-wrap:wrap;
						gap:10px;
						column-gap:30px;

						input.cb+label+input.cb+label {
							margin:0;
						}
					}

					.line {
						gap:10px;
					}

					&[data-step] {
						.actions {
							&:has([id^="question"][id$="N"]:not([id*="_"]):checked) {
								&~.line,
								&~.actions {
									display:none;
								}
							}
						}
					}

					/* &[data-step="5"] {
						&:not(:has(#question6_8N:checked)) {
							.line {
								display:none;
							}
						}
					} */
				}
			}
		}

		/*	шаг 6 Invest Life: подписание — у Capital+ это шаг 7 */
		&[data-step="7"] {
			&:has(.line.sign .btn) {
				.line {
					&.actions {
						input {
							&.btn {
								display:none;
							}
						}
					}
				}
			}

			.line {
				&.sign {
					display:flex;
					flex-direction:row;
					gap:15px;
					align-items:center;

					.title {
						font-size:18px;
						font-weight:500;
						margin:0;
						flex:1;
					}

					&.Insurer,
					&.Insured,
					&.ExtraInsured {
						&.success {
							.action {
								.signed {
									&::before {
										content:attr(data-s);
										color:var(--Success);
									}
								}
							}
						}

						.action {
							.signed {
								&::before {
									content:attr(data-w);
								}
							}
						}
					}

					.action {
						display:flex;
						align-items:center;
						gap:15px;
						position:relative;

						.signed {
							font-size:14px;
							font-weight:500;
							color:var(--NomadColor);
							white-space:nowrap;

							&.success {
								color:var(--Success);
							}
						}

						.message {
							&.error {
								position:absolute;
								top:100%;
								right:0;
								margin-top:10px;
								color:var(--NomadColor);
								font-weight:500;
								white-space:nowrap;
								text-align:right;
								pointer-events:none;
								z-index:2;
							}
						}
					}
				}
			}
		}

		&:has(#healthDeclaration) {
			&:has(#healthDeclaration:checked) {
				.line {
					&.questions {
						display:none;
					}
				}
			}
		}

		.line {
			&:has(.t.family,.t.obligations) {
				flex-direction:column;
			}

			&#actionLine {
				.block {
					&.conditions {
						display:flex;
						flex-direction:column;
						gap:10px;
					}

					.cb {
						&+label {
							&+.cb {
								&+label {
									margin:0;
								}
							}
						}
					}

					a {
						margin:0;
					}
				}
			}

			&.fw {
				flex-wrap:wrap;

				.block {
					&>label {
						&:first-child {
							white-space:nowrap;
						}
					}
				}
			}

			&.description {
				p {
					width:100%;
				}
			}

			&.sticky {
				position:sticky;
				top:0;
				z-index:10;
				background:#fff;
				padding:20px 0;
				margin-bottom:-20px;
			}

			&.insured {
				h2 {
					&.title {
						margin:0;
					}
				}

				/* список детей и кнопка его загрузки — только у детских типов: класс
				   child выводит эту строку из-под общего правила, прячущего у детей
				   всё лишнее, поэтому у остальных типов прячем её отдельно */
				&:not(:has([id*="insuredType"] option[value="CHILD"]:checked,[id*="insuredType"] option[value="OTHER_CHILD"]:checked)) {
					.line {
						&.child {
							display:none;
						}
					}
				}

				/* короткий список «кем приходится» стоит рядом со списком детей и нужен
				   только ребёнку иного лица: ребёнку страхователя родство даёт пол */
				&:not(:has([id*="insuredType"] option[value="OTHER_CHILD"]:checked)) {
					.line {
						&.child-relation {
							display:none;
						}
					}
				}

				/* пол спрашиваем только у ребёнка: взрослому он приходит из getPerson3 */
				&:not(:has([id*="insuredType"] option[value="CHILD"]:checked,[id*="insuredType"] option[value="OTHER_CHILD"]:checked)) {
					.line {
						.block {
							&.child-gender {
								display:none;
							}
						}
					}
				}

				/* расшифровку родства вводят только при «Иное» */
				.line {
					&.child-relation {
						&:not(:has([id^="childRelationship"] option[value="OTHER"]:checked)) {
							.block {
								&.other {
									display:none;
								}
							}
						}
					}
				}

				.line {
					&+.line {
						margin-top:0;
					}

					&:has(option[value="INSURER"]:checked) {
						&~.line {
							display:none;
							pointer-events:none;
						}
					}

					&:has(option[value="CHILD"]:checked),
					&:has(option[value="OTHER_CHILD"]:checked) {
						&~.line:not(.child) {
							display:none;
						}

						&~.line {
							&:has([id^="height"]),
							&:has([id^="weight"]) {
								display:flex;
							}
						}
					}

					&:not(:has([id*="insuredType"] option[value="OTHER"]:checked,[id*="insuredType"] option[value="OTHER_CHILD"]:checked)) {
						.line {
							&:has([id^="iin"]),
							&:has([id^="email"]),
							&:has([id^="relationship"]) {
								display:none;
							}
						}
					}

					&:has(option[value="OTHER_CHILD"]:checked) {
						&~.line {
							&:has([id^="iin"]),
							&:has([id^="email"]) {
								display:flex;
							}
						}
					}

					&:has([id^="profession"]) {
						&:not(:has([id^="profession"] option[data-other="1"]:checked)) {
							.block {
								&:has([id^="otherProfession"]) {
									display:none;
								}
							}
						}

						&:has([id^="profession"] option[data-other="1"]:checked) {
							.block {
								flex:0 0 calc((100% - var(--Gap))/2);
							}
						}
					}
				}


				&:has([id*="insuredType"] option[value="OTHER"]:checked) {
					.line {
						&:has([id^="iin"]),
						&:has([id^="phone"]) {
							.block {
								&>label {
									&:first-child {
										&:after {
											content:attr(data-other);
										}
									}
								}
							}
						}
					}
				}

				&:has([id*="insuredType"] option[value="OTHER_CHILD"]:checked) {
					.line {
						&:has([id^="iin"]),
						&:has([id^="phone"]) {
							.block {
								&>label {
									&:first-child {
										&:after {
											content:attr(data-other-child);
										}
									}
								}
							}
						}
					}
				}
			}

			&:has(#financialObligations) {
				&:has(option[value="n"]:checked) {
					&+.line {
						display:none;
					}
				}
			}

			.t {
				&.family {
					&+.actions {
						width:100%;
						display:flex;
						flex-direction:column;
						gap:20px;
						align-items:flex-start;
					}

					&:has(.btn) {
						&+.actions {
							#noFamily {
								&:scope,
								&+label {
									display:none;
								}
							}
						}
					}

					.r {
						.c {
							vertical-align:middle;

							.cb {
								&+label {
									min-height:20px;
								}
							}
						}

						&:not(.h) {
							.c {
								&:nth-child(2) {
									~ .c {
										opacity:0.1;
										pointer-events:none;
									}
								}

								&:last-child {
									opacity:1 !important;
									pointer-events:auto !important;
								}

								&:has([id*="age"]) {
									width:125px;
									max-width:125px;
									min-width:125px;
								}

								&:has([id*="health"]),
								&:has([id*="death_diagnosis"]) {
									width:200px;
									max-width:200px;
									min-width:200px;
								}
							}
						}

						&:has(option[value="FATHER"]:checked),
						&:has(option[value="BROTHER"]:checked) {
							.c {
								&:has([id*="alive"]) {
									&>label {
										span {
											line-height: 20px;
											font-size: 16px;

											&:before {
												content:attr(data-alive);
											}
										}
									}
								}
							}
						}

						&:has(option[value="MOTHER"]:checked),
						&:has(option[value="SISTER"]:checked) {
							.c {
								&:has([id*="alive"]) {
									&>label {
										span {
											line-height: 20px;
											font-size: 16px;

											&:before {
												content:attr(data-alive-w);
											}
										}
									}
								}
							}
						}

						&:has([id*="alive"]:checked) {
							.c {
								&:nth-child(3),
								&:nth-child(4) {
									opacity:1 !important;
									pointer-events:auto !important;
								}
							}
						}

						&:not(:has([id*="alive"]:checked)) {
							.c {
								&:nth-child(5),
								&:nth-child(6) {
									opacity:1 !important;
									pointer-events:auto !important;
								}
							}
						}
					}
				}
			}

			&:has(#noFamily:checked) {
				.t {
					&.family {
						display:none;
					}
				}

				.actions {
					.btn {
						display:none;
					}
				}
			}
		}
	}

	dl {
		&.line {
			display:flex;
			flex-direction:column;
			gap:30px;
			margin-top:20px;

			dt {
				font-size: 18px;
				font-weight: 500;
			}

			dd {
				padding:0;
				margin:0;
				display:flex;
				flex-direction:column;
				gap:20px;

				.line {
					&+.line {
						margin:0;
					}

					.actions {
						display:flex;
						gap:30px;
						row-gap:10px;
						flex-wrap:wrap;
						align-items:center;

						input {
							&.cb {
								&~* {
									margin:0;
								}
							}
						}
					}
				}
			}
		}
	}
}

div.ni2-wrap {
	max-width:1080px;
	margin:0 auto;
	padding:0 28px;
	font-size:15px;

	.ni2-top{position:relative;background:var(--lmgray);overflow:hidden;min-height:190px;display:flex;align-items:flex-start}
	.ni2-top-in{position:relative;z-index:1;max-width:1080px;margin:0 auto;padding:34px 28px 28px;width:100%;box-sizing:border-box;text-align:center}
	.ni2-top h1{margin:0 0 16px;font-size:38px;line-height:1.1;letter-spacing:0.04em;text-transform:uppercase;font-weight:600;color:var(--nomad)}
	.ni2-crumbs{display:flex;justify-content:center;align-items:center;gap:12px;font-size:14px}
	.ni2-crumbs a{color:var(--dmgray)}
	.ni2-crumbs a:hover{color:var(--nomad);text-decoration:none}
	.ni2-crumb-dot{width:6px;height:6px;border-radius:50%;background:var(--nomad);flex:none}
	.ni2-top-img{position:absolute;right:max(28px,calc(50% - 33.75rem + 28px));bottom:0;height:11.25rem;width:auto;display:block}

	/* лид: текст слева, персонаж справа, без воздуха */
	.ni2-lead{display:grid;grid-template-columns:1fr 15.625rem;gap:24px;align-items:end;padding:24px 0 0}
	.ni2-lead-title{margin:0 0 12px;font-size:var(1.8125rem);line-height:1.2;font-weight:800;letter-spacing:-0.01em;max-width:40rem}
	.ni2-lead-text{margin:0 0 16px;max-width:600px;color:var(--dmlgray)}
	.ni2-lead img{width:100%;max-height:270px;height:auto;object-fit:contain;object-position:bottom;display:block;align-self:end}
	.ni2-cta{display:flex;gap:10px;flex-wrap:wrap}
	a.ni2-btn{background:var(--nomad);color:var(--white);font-size:13px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;padding:0.8125rem 24px;display:inline-block}
	a.ni2-btn:hover{background:var(--nomad-dark);text-decoration:none}
	a.ni2-btn--ghost{background:none;color:var(--dmgray);border:1px solid var(--dmgray)}
	a.ni2-btn--ghost:hover{background:var(--dmgray);color:var(--white)}

	.ni2-facts{display:grid;grid-template-columns:repeat(3,1fr);border-top:1px solid var(--lgray);border-bottom:1px solid var(--lgray);margin-top:20px}
	.ni2-fact{padding:14px 0}
	.ni2-fact+.ni2-fact{border-left:1px solid var(--lgray);padding-left:24px}
	.ni2-fact b,.ni2-fact strong{display:block;font-size:19px;color:var(--nomad)}
	.ni2-fact span{font-size:12px;color:var(--ldgray)}

	/* строка раздела: номер+название слева, содержимое справа */
	.ni2-row{display:grid;grid-template-columns:190px 1fr;gap:28px;padding:26px 0;border-bottom:1px solid var(--ulgray);align-items:start}
	.ni2-row:last-of-type{border-bottom:0}
	.ni2-rail{position:sticky;top: calc(var(--hdr) + 16px);}
	.ni2-row[id] { scroll-margin-top: calc(var(--hdr) + 16px); }
	.ni2-num{font-size:12px;font-weight:800;color:var(--nomad);letter-spacing:0.14em}
	.ni2-rail h2{margin:4px 0 0;font-size:17px;line-height:1.25;font-weight:800;text-transform:uppercase;letter-spacing:0.02em}
	.ni2-rail p{margin:8px 0 0;font-size:12px;color:var(--ldgray);line-height:1.5}
	.ni2-body>*:first-child{margin-top:0}
	.ni2-body p{margin:0 0 12px}
	.ni2-body p:last-child{margin-bottom:0}

	/* двухколоночный контент внутри строки */
	.ni2-two{display:grid;grid-template-columns:1fr 1fr;gap:20px 32px}
	.ni2-two--img{grid-template-columns:1fr 12.5rem;align-items:end}
	.ni2-two--img img{width:100%;max-height:18.125rem;height:auto;object-fit:contain;object-position:bottom;display:block}

	/* маркеры */
	.ni2-ul{display:grid;gap:8px;margin:0}
	.ni2-li{display:grid;grid-template-columns:14px 1fr;gap:10px;align-items:start}
	.ni2-li::before{content:"";width:7px;height:7px;background:var(--nomad);margin-top:8px}
	.ni2-ul--onred .ni2-li::before{background:var(--white)}

	/* плашки */
	.ni2-note{background:var(--ulgray);padding:16px 18px}
	.ni2-red{background:var(--nomad);color:var(--white);padding:16px 18px}
	.ni2-red * {color:var(--white);}
	.ni2-red h3,.ni2-note h3{margin:0 0 10px;font-size:12px;letter-spacing:0.12em;text-transform:uppercase}

	/* сценарии / шаги — компактные строки с номером */
	.ni2-steps{display:grid;gap:0}
	.ni2-step{display:grid;grid-template-columns:34px 1fr;gap:14px;padding:11px 0;border-top:1px solid var(--ulgray);align-items:baseline}
	.ni2-step:first-child{border-top:0;padding-top:0}
	.ni2-step b,.ni2-step strong{color:var(--nomad);font-size:15px;font-weight:800}
	.ni2-step-t{font-weight:700}
	.ni2-step-d{color:var(--gray);font-size:14px}

	/* аккордеон */
	.ni2-acc{border-top:1px solid var(--lgray)}
	.ni2-acc-item{border-bottom:1px solid var(--lgray)}
	.ni2-acc-head{display:flex;justify-content:space-between;gap:14px;align-items:center;cursor:pointer;padding:11px 0;font-weight:600}
	.ni2-acc-head::after{content:"+";color:var(--nomad);font-size:18px;line-height:1}
	.ni2-acc-item.open .ni2-acc-head::after{content:"−"
	}
	.ni2-acc-body{display:none;padding:0 0 12px;color:var(--lmdgray);font-size:14px}
	.ni2-acc-item.open .ni2-acc-body{display:block}

	/* таблица */
	.ni2-tbl{width:100%;border-collapse:collapse;font-size:14px}
	.ni2-tbl th{background:var(--ulgray);color:var(--dgray);text-align:left;font-size:11px;letter-spacing:0.08em;text-transform:uppercase;padding:9px 12px;font-weight:700}
	.ni2-tbl td{border-bottom:1px solid var(--ulgray);padding:9px 12px;vertical-align:top;color:var(--dmlgray)}
	.ni2-tbl td:first-child{color:var(--dmgray);font-weight:600;width:34%}
	.ni2-tbl .ni2-tgroup td{background:var(--ulgray);color:var(--nomad);font-weight:800;font-size:12px;letter-spacing:0.08em;text-transform:uppercase;padding:7px 12px}

	/* примеры расчёта */
	.ni2-calc{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--lgray)}
	.ni2-calc-col{padding:14px}
	.ni2-calc-col+.ni2-calc-col{border-left:1px solid var(--lgray)}
	.ni2-calc-col b,.ni2-calc-col strong{display:block;font-size:15px;margin-bottom:10px}
	.ni2-calc-row{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--ldgray);padding:0.1875rem 0}
	.ni2-calc-row span:last-child{color:var(--dmgray);font-weight:600}
	.ni2-calc-total{margin-top:8px;padding-top:8px;border-top:1px solid var(--ulgray);font-size:18px;font-weight:800;color:var(--nomad)}
	.ni2-calc-total small{display:block;font-size:11px;font-weight:600;color:var(--ldgray);text-transform:uppercase;letter-spacing:0.06em}

	/* документы */
	.ni2-docs{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
	.ni2-doc{display:flex;gap:10px;align-items:flex-start;color:var(--dmgray);border:1px solid var(--lgray);padding:12px 14px}
	a.ni2-doc:hover{text-decoration:none;border-color:var(--nomad)}
	.ni2-doc b,.ni2-doc strong{display:block;font-size:14px}
	.ni2-doc span{font-size:12px;color:var(--ldgray)}

	/* финал */
	.ni2-final{background:var(--dmgray);color:var(--white);margin-top:8px}
	.ni2-final-in{max-width:1080px;margin:0 auto;padding:22px 28px;display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}
	.ni2-final b,.ni2-final strong{font-size:17px;text-transform:uppercase;letter-spacing:0.04em}
	.ni2-final p{margin:4px 0 0;font-size:13px;color:var(--mlgray)}

	.files {
		display:flex;
		flex-wrap:wrap;
		gap:30px;
		row-gap:20px;

		.file {
			flex:0 0 calc((100% - 30px * 1) / 2);
			display:flex;
			flex-direction:column;
			justify-content:center;
			padding-left:50px;
			position:relative;

			&:before {
				content:"";
				display:block;
				background:url("/imgs/document.svg") center center/contain no-repeat;
				width:40px;
				height:40px;
				position:absolute;
				left:0;
				top:0;
			}

			a, span.lastUpdate {
				font-size:18px;
				font-weight:700;
				line-height:27px;
				margin:0;

				&.lastUpdate {
					font-weight:normal;
				}
			}
		}
	}
}

@media(max-width:900px){
	div.ni2-wrap {
		.ni2-row {
			grid-template-columns:1fr;
			gap:14px;
			padding:22px 0
		}
		.ni2-rail {
			position:static
		}
		.ni2-lead {
			grid-template-columns:1fr 11.25rem
		}
		.ni2-calc {
			grid-template-columns:repeat(2, 1fr)
		}
		.ni2-calc-col:nth-child(3) {
			border-left:0;
			border-top:1px solid var(--lgray)
		}
		.ni2-calc-col:nth-child(4) {
			border-top:1px solid var(--lgray)
		}
		.ni2-docs {
			grid-template-columns:1fr
		}
	}
}

@media(max-width:640px){
	div.ni2-wrap {
		.ni2-top {
			min-height:0;
			display:block
		}
		.ni2-top-in {
			padding:26px 20px 0
		}
		.ni2-top h1 {
			font-size:28px;
		}
		.ni2-top-img {
			position:static;
			height:8.75rem;
			margin:14px auto 0
		}
		.ni2-lead {
			grid-template-columns:1fr
		}
		.ni2-lead img {
			max-width:12.5rem;
			margin:0 auto
		}
		.ni2-two, .ni2-two--img {
			grid-template-columns:1fr
		}
		.ni2-facts {
			grid-template-columns:1fr
		}
		.ni2-fact + .ni2-fact {
			border-left:0;
			border-top:1px solid var(--lgray);
			padding-left:0
		}
		.ni2-calc {
			grid-template-columns:1fr
		}
		.ni2-calc-col + .ni2-calc-col {
			border-left:0;
			border-top:1px solid var(--lgray)
		}
		.ni2-tbl td:first-child {
			width:auto
		}
	}
}
/*
	Своё, чего нет у Invest Life: скрытые блоки должны быть скрыты. Сервер и
	скрипты ставят атрибут hidden, но у .line и .block свой display, и он
	перебивает display:none из стилей браузера
*/
div.productForm {
	#orderForm {
		[hidden] {
			display:none !important;
		}

		/*
			У сайта на body стоит font-size:0, размер задается каждому элементу
			отдельно. Наши собственные блоки - показ суммы, премии и взноса
			текстом - иначе просто не видно
		*/
		.block {
			.value {
				font-size:18px;
				line-height:24px;
				color:var(--DarkColor);
			}
		}

		/*
			Условия страхования: у сумм подписи длиннее инвестовых («Первый
			страховой взнос полиса»), и в 210 пикселей блока они переносились на
			вторую строку, сбивая ряд. Отдаем строке равные трети
		*/
		/*
			Блок первого взноса: подпись «Первый страховой взнос полиса» длиннее
			инвестовых и в общие 210 пикселей блока не влезает
		*/
		.block {
			&.given {
				&.payment {
					flex:0 0 300px;
				}
			}
		}

		/*
			Доп. покрытия. У Invest Life это выпадающие списки, у Capital+ по ТЗ -
			таблица «страховая сумма / премия / ежедневная выплата» с выбором
			одной строки, поэтому оформление свое
		*/
		&[data-step="5"] {
			.line {
				&.coverage {
					flex-direction:column;
					gap:8px;
					padding:0;

					/* между покрытиями хватает разделителя: общий отступ строк
					   формы (38px) здесь только раздувает экран */
					&+.coverage {
						margin-top:24px;
						padding-top:24px;
						border-top:1px solid var(--lgray);
					}

					.description {
						margin:0;
					}

					.block {
						flex:1 1 100%;
					}

					.label {
						font-weight:500;
						line-height:1.35;
					}

					/* покрытие уже есть по другому полису: остается только пояснение */
					&.blocked {
						.label {
							color:var(--ldgray);
						}
					}
				}
			}

			table {
				&.coverages {
					width:100%;
					max-width:760px;
					margin:12px 0 0;
					border-collapse:collapse;

					th {
						padding:6px 12px;
						text-align:left;
						font-weight:500;
						white-space:nowrap;
						font-size:15px;
						line-height:20px;
						color:var(--NomadColor);
					}

					td {
						padding:10px 12px;
						vertical-align:middle;
						white-space:nowrap;
						font-size:16px;
						line-height:22px;
						color:var(--DarkColor);

						/*
							Клик по премии и по ежедневной выплате выбирает ту же
							сумму. Подпись самого радио не трогаем: у нее свои
							размеры и кружок в :before
						*/
						&.premium,
						&.daily {
							label {
								display:block;
								cursor:pointer;
								/* общий стиль подписи блока добавляет отступ снизу */
								margin:0;
								font-size:16px;
								line-height:20px;
								color:var(--DarkColor);
							}
						}
					}

					tbody {
						tr {
							&:nth-child(even) {
								td {
									background:var(--ulgray);
								}
							}

							/* выбранная сумма подсвечивается целиком строкой */
							&:has(input:checked) {
								td {
									background:rgba(231,64,19,.08);
								}
							}
						}
					}
				}
			}
		}
	}
}
