/* Пациентам: карточки маршрутов внутри .information-body.
   Шаблон information-* задаёт свои правила для ol/li и .td-prose — здесь
   возвращаем компоненту хаба его собственный вид. */

/* Вводный абзац дублирует лид в hero: на хабе убираем пустую полосу. */
.page-id-25 .information-body > .wp-block-group.td-section:first-child {
	display: none;
}

/* Шаблон information-* подключает свои правила позже — поднимаем специфичность. */
body.topdent-patient-section .information-body .td-section {
	padding-block: 28px;
	border-top: 0;
}

body.topdent-patient-section .information-body #situacii {
	padding-top: 0;
}

body.topdent-patient-section .information-body #situacii .td-head {
	margin-bottom: 20px;
}

body.topdent-patient-section .information-body #situacii .td-head h2 {
	margin-top: 0;
}

body.topdent-patient-section .information-body .td-head h2 {
	margin-top: 0;
}

body.topdent-patient-section .information-toc {
	padding: 14px 18px;
	margin-bottom: 28px;
	border-radius: 14px;
}

body.topdent-patient-section .information-toc summary {
	font-size: 15px;
	font-weight: 600;
}

/* Дочерние страницы: текст не «плавает» по центру, а выровнен по hero. */
body.topdent-patient-section .information-body .td-prose {
	margin-inline: 0;
}

body.topdent-patient-section .information-body .td-shell.td-prose > * {
	margin-inline: 0;
}

body.topdent-patient-section .information-body .td-shell.td-prose {
	align-items: stretch;
}

/* Дочерние страницы на шаблоне записи: заголовок не должен раздуваться на весь экран. */
body.topdent-patient-section .td-pagehead .wp-block-post-title {
	font-size: clamp(30px, 3.4vw, 48px);
	line-height: 1.1;
	letter-spacing: -.02em;
	max-width: 24ch;
}

/* Поля формы: у текстового «Имя» не было рамки — у tel её задаёт отдельное
   правило, у text его нет. Возвращаем одинаковую рамку всем полям. */
body.topdent-patient-section .td-field input:not([type="checkbox"]):not([type="radio"]) {
	border: 1px solid var(--line-strong, #859290);
	background: var(--bg, #fff);
	padding: 16px;
}

/* Блок «Запись»: компактная двухколоночная карточка на десктопе. */
body.topdent-patient-section .information-body > #zapis.td-section--pine {
	padding: 28px;
	border-radius: var(--r-m, 20px);
}

@media (min-width: 901px) {
	body.topdent-patient-section #zapis .td-form-grid {
		grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
		gap: 24px;
		align-items: start;
	}
}

@media (max-width: 900px) {
	body.topdent-patient-section #zapis .td-form-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}
}

body.topdent-patient-section #zapis .td-form-intro {
	gap: 10px;
}

body.topdent-patient-section #zapis .td-form-intro h2 {
	font-size: clamp(22px, 2.2vw, 28px);
	line-height: 1.18;
	margin: 0;
}

body.topdent-patient-section #zapis .td-form-intro p {
	font-size: 14px;
	line-height: 1.45;
	margin: 0;
}

body.topdent-patient-section #zapis .td-form-intro__list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 6px;
	margin: 6px 0 0;
	padding: 0;
}

body.topdent-patient-section #zapis .td-form-intro__list li {
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
}

body.topdent-patient-section #zapis .td-form-intro__trust {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
	font-size: 12px;
}

body.topdent-patient-section #zapis .td-form-intro__trust li {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding-left: 0;
	font-size: 12px;
	line-height: 1.3;
}

body.topdent-patient-section #zapis .td-form-intro__trust li::before {
	content: none;
}

body.topdent-patient-section #zapis .td-form-intro__trust-i {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
}

body.topdent-patient-section #zapis .td-form-intro__phone {
	font-size: 20px;
	font-weight: 600;
	margin-top: auto;
	padding-top: 12px;
}

body.topdent-patient-section #zapis .td-form-intro {
	align-self: stretch;
}

body.topdent-patient-section #zapis .td-form {
	background: #fff;
	color: var(--ink, #142724);
	padding: 20px;
	border-radius: 16px;
}

body.topdent-patient-section #zapis .td-form h3 {
	margin: 0 0 4px;
	font-size: 17px;
}

body.topdent-patient-section #zapis .td-form__desc {
	margin: 0 0 8px;
	font-size: 13px;
	line-height: 1.4;
}

body.topdent-patient-section #zapis .td-field {
	margin-block: 10px;
	gap: 6px;
}

body.topdent-patient-section #zapis .td-field input:not([type="checkbox"]):not([type="radio"]) {
	padding: 12px 14px;
	min-height: 44px;
}

body.topdent-patient-section #zapis .td-form__note {
	margin-top: 8px;
	font-size: 11px;
	line-height: 1.4;
	color: var(--muted, #4a5a57);
}

@media (max-width: 640px) {
	body.topdent-patient-section .information-body > #zapis.td-section--pine {
		padding: 18px;
	}

	body.topdent-patient-section #zapis .td-form {
		padding: 16px;
	}
}

/* Форма записи: скруглённый блок вместо квадратной полосы. */
body.topdent-patient-section .information-body > .td-section--pine {
	border-radius: var(--r-m, 20px);
	overflow: hidden;
	margin-top: 40px;
}

/* Форма записи после FAQ: отделяем от аккордеона. */
body.topdent-patient-section .information-body > .td-section:last-child {
	margin-top: 40px;
}

/* Карточки v512 на хабе: ссылка-заголовок без «синей» подчёркнутой ссылки. */
body.topdent-patient-section .information-body .g-card {
	transition: border-color .18s ease, box-shadow .18s ease;
}

body.topdent-patient-section .information-body .g-card:hover {
	border-color: var(--line-strong, #859290);
	box-shadow: 0 10px 26px rgba(0, 46, 40, .06);
}

body.topdent-patient-section .information-body .g-card__term a {
	color: inherit;
	text-decoration: none;
}

body.topdent-patient-section .information-body .g-card__term a:hover {
	color: var(--brand, #0a5f55);
}

/* Блок врача на хабе: без старого фото, в одну колонку. */
body.topdent-patient-section .information-body #vrach .td-eyebrow {
	margin: 0 0 10px;
}

body.topdent-patient-section .information-body #vrach .td-steps {
	margin-top: 4px;
}

body.topdent-patient-section .information-body #vrach .td-step h3 {
	margin-block: 0 6px;
	font-size: 19px;
	line-height: 1.3;
}

body.topdent-patient-section .information-body #vrach .td-step p {
	margin-block: 0;
}

body.topdent-patient-section .information-body #vrach .td-step__body {
	min-width: 0;
}

body.topdent-patient-section .information-body #vrach .td-step__num {
	font-size: 14px;
	line-height: 26px;
	letter-spacing: .06em;
}

body.topdent-patient-section .information-body #vrach .td-note {
	margin: 24px 0 0;
}

body.topdent-patient-section .information-body #vrach .td-actions {
	margin-top: 20px;
}

@media (max-width: 640px) {
	body.topdent-patient-section .information-body #vrach .td-head h2 {
		font-size: 30px;
	}

	body.topdent-patient-section .information-body #vrach .td-step {
		grid-template-columns: 1fr;
		gap: 6px;
		padding: 18px;
	}

	body.topdent-patient-section .information-body #vrach .td-step__num {
		line-height: 1;
	}
}

/* Полоса фактов: компонент .td-trust живёт в legacy topdent.css, который
   на этом шаблоне не подключён. Возвращаем его вид локально. */
body.topdent-patient-section .information-body .td-trust__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
	background: var(--td-paper, #eef6f4);
	border-radius: var(--td-r-hero, 24px);
	box-shadow: 0 1px 2px rgba(12, 52, 46, .04), 0 10px 24px rgba(12, 52, 46, .05);
	overflow: hidden;
}

body.topdent-patient-section .information-body .td-trust__item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	margin: 0;
	padding: 24px 22px;
	background: var(--td-paper, #eef6f4);
	border-right: 1px solid var(--td-border-soft, #dfe7e4);
}

body.topdent-patient-section .information-body .td-trust__item:last-child {
	border-right: 0;
}

body.topdent-patient-section .information-body .td-trust__item a {
	display: flex;
	flex-direction: column;
	gap: 8px;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

body.topdent-patient-section .information-body .td-trust__item b {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--td-ink, #142724);
}

body.topdent-patient-section .information-body .td-trust__item span {
	font-size: 14px;
	line-height: 1.45;
	color: var(--td-ink-2, #4a5f5b);
}

body.topdent-patient-section .information-body .td-trust__value {
	display: block;
	font-weight: 700;
	font-size: clamp(30px, 3vw, 40px);
	line-height: 1;
	letter-spacing: -.02em;
	color: var(--td-deep, #0a5f55);
}

@media (max-width: 1024px) {
	body.topdent-patient-section .information-body .td-trust__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body.topdent-patient-section .information-body .td-trust__item:nth-child(2n) {
		border-right: 0;
	}

	body.topdent-patient-section .information-body .td-trust__item:nth-child(-n + 2) {
		border-bottom: 1px solid var(--td-border-soft, #dfe7e4);
	}
}

@media (max-width: 640px) {
	body.topdent-patient-section .information-body .td-trust__list {
		grid-template-columns: 1fr;
	}

	body.topdent-patient-section .information-body .td-trust__item {
		border-right: 0;
		border-bottom: 1px solid var(--td-border-soft, #dfe7e4);
		padding: 18px;
	}

	body.topdent-patient-section .information-body .td-trust__item:last-child {
		border-bottom: 0;
	}
}

/* Шесть вопросов — одной колонкой на всю ширину, без пустой второй. */
body.topdent-patient-section .information-body #faq .td-faq {
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
}

body.topdent-patient-section .information-body #faq .td-faq__item {
	border-top: 1px solid var(--td-border, #dfe7e4);
}

body.topdent-patient-section .information-body #faq .td-faq__item:first-child {
	border-top: 0;
}

/* Сброс наследия .information-body ol/li: иначе двойная нумерация и отступ. */
.topdent-patient-section .information-body .td-rows {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0;
	padding-left: 0;
	list-style: none;
}

.topdent-patient-section .information-body .td-rows > .td-row {
	margin-block: 0;
}

.topdent-patient-section .information-body .td-row {
	grid-template-columns: 44px minmax(0, 1fr) 24px;
	gap: 14px;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--td-border, #dfe7e4);
	border-radius: var(--td-r-panel, 20px);
	box-shadow: 0 1px 2px rgba(12, 52, 46, .04), 0 10px 24px rgba(12, 52, 46, .05);
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.topdent-patient-section .information-body .td-row:hover {
	background: #fff;
	border-color: var(--td-deep, #0a5f55);
	box-shadow: 0 2px 4px rgba(12, 52, 46, .05), 0 16px 32px rgba(12, 52, 46, .10);
	transform: translateY(-1px);
}

.topdent-patient-section .information-body .td-row__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 14px;
	background: var(--td-tint, #e8f2ef);
	color: var(--td-deep, #0a5f55);
	font-size: 13px;
	line-height: 1;
	letter-spacing: .06em;
}

.topdent-patient-section .information-body .td-row__body {
	gap: 6px;
}

.topdent-patient-section .information-body .td-row__body h3 {
	font-size: 21px;
	line-height: 1.22;
	letter-spacing: -.01em;
}

.topdent-patient-section .information-body .td-row__body p {
	font-size: 15px;
	line-height: 1.5;
}

.topdent-patient-section .information-body .td-row__arrow {
	font-size: 18px;
	line-height: 44px;
	text-align: right;
}

.topdent-patient-section .information-body .td-row--exit {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
	padding: 20px 22px;
	background: var(--td-soft, #eef6f4);
	border-color: transparent;
	box-shadow: none;
}

.topdent-patient-section .information-body .td-row--exit:hover {
	border-color: transparent;
	box-shadow: none;
	transform: none;
}

.topdent-patient-section .information-body .td-row--exit .td-row__num {
	width: auto;
	height: auto;
	padding: 6px 10px;
	border-radius: 10px;
	background: #fff;
}

.topdent-patient-section .information-body .td-row--exit .td-row__body {
	flex: 1 1 34ch;
	min-width: min(100%, 34ch);
}

.topdent-patient-section .information-body .td-row--exit .td-btn {
	margin-left: auto;
}

/* Карточки в одну колонку на узких экранах — как в исходном компоненте. */
@media (max-width: 1024px) {
	.topdent-patient-section .information-body .td-rows {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	body.topdent-patient-section .information-body .td-head h2 {
		font-size: 32px;
	}

	.topdent-patient-section .information-body .td-section {
		padding-block: 20px;
	}

	.topdent-patient-section .information-body .td-row {
		grid-template-columns: 40px minmax(0, 1fr);
		gap: 12px;
		padding: 16px;
	}

	.topdent-patient-section .information-body .td-row__arrow {
		display: none;
	}

	.topdent-patient-section .information-body .td-row__num {
		width: 40px;
		height: 40px;
		border-radius: 12px;
	}

	.topdent-patient-section .information-body .td-row__body h3 {
		font-size: 19px;
	}

	.topdent-patient-section .information-body .td-row__arrow {
		line-height: 40px;
	}

	.topdent-patient-section .information-body .td-row--exit {
		padding: 18px;
	}

	.topdent-patient-section .information-body .td-row--exit .td-btn {
		margin-left: 0;
		width: 100%;
		justify-content: center;
	}
}

/* Юридические документы на странице «Пациентам»: карточки вместо строки ссылок. */
.td-legal {
	margin: 8px 0 40px;
	padding: 28px;
	border: 1px solid var(--line);
	border-radius: 24px;
	background: linear-gradient(180deg, var(--mist), var(--bg));
}

.td-legal__head {
	max-width: 62ch;
	margin-bottom: 22px;
}

.td-legal__eyebrow {
	margin: 0 0 8px;
	font-size: 12px;
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--brand);
}

.td-legal h2 {
	margin: 0 0 10px;
	font-size: 28px;
	line-height: 1.15;
	letter-spacing: -.02em;
	color: var(--ink);
}

.td-legal__lead {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: var(--muted);
}

.td-legal__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.td-legal__card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-height: 82px;
	padding: 15px 16px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: var(--bg);
	color: var(--ink);
	text-decoration: none;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.td-legal__card:hover {
	border-color: var(--deep);
	box-shadow: 0 10px 24px -18px rgba(0, 46, 40, .45);
	transform: translateY(-1px);
}

.td-legal__ico {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	flex: 0 0 auto;
	border-radius: 11px;
	background: var(--mist);
	color: var(--deep);
}

.td-legal__ico svg {
	width: 21px;
	height: 21px;
	display: block;
}

.td-legal__body {
	display: grid;
	gap: 3px;
	min-width: 0;
}

.td-legal__body strong {
	font-size: 15px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--ink);
}

.td-legal__body small {
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--muted);
}

.td-legal__arr {
	align-self: center;
	margin-left: auto;
	padding-top: 1px;
	color: var(--brand);
	font-size: 18px;
	line-height: 1.2;
}

@media (max-width: 760px) {
	.td-legal {
		padding: 20px;
		border-radius: 18px;
	}

	.td-legal__grid {
		grid-template-columns: 1fr;
	}

	.td-legal h2 {
		font-size: 24px;
	}

	.td-legal__card {
		min-height: 0;
		padding: 13px 14px;
	}
}
/* На хабе «Пациентам» вводная статья скрыта; её заголовки не должны
   попадать в «На этой странице». */
.page-id-25 .information-toc li:nth-child(-n + 8) {
	display: none;
}
