/* article-read-2026-11-27: чтение статьи — мера строки, ритм, факты, прогресс. */

/* 1. Мера строки и ритм */
.td512 .td-prose { max-width: 704px; }
.td512 .td-prose > .entry-content { gap: 20px; }
.td512 .td-prose .entry-content > * { margin-block: 0; }
.td512 .td-prose :is(p, li) {
	font-size: 18.5px;
	line-height: 1.72;
	color: var(--td-ink);
}
.td512 .td-prose p { text-wrap: pretty; }
.td512 .td-prose :is(h2, h3) { text-wrap: balance; }
.td512 .td-prose p.article-lead {
	font-size: 21px;
	line-height: 1.6;
	color: var(--td-deep);
	letter-spacing: -0.005em;
}

/* 2. Заголовки разделов: линия-разделитель, чтобы глаз цеплялся */
.td512 .td-prose .entry-content > h2 {
	margin-top: 12px;
	padding-top: 24px;
	border-top: 1px solid var(--td-border-soft);
	letter-spacing: -0.02em;
}
.td512 .td-prose .entry-content > h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.td512 .td-prose .entry-content > h3 { margin-top: 8px; }

/* 3. Ссылки, выделения, списки */
.td512 .td-prose :is(p, li) a {
	color: var(--td-link, #0a5f55);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.16em;
}
.td512 .td-prose :is(p, li) a:hover { text-decoration-thickness: 2px; }
.td512 .td-prose strong { color: var(--td-deep); font-weight: 600; }
.td512 .td-prose ul { list-style: none; padding-left: 0; gap: 10px; }
.td512 .td-prose ol { gap: 10px; }
.td512 .td-prose li { margin-block: 0; }
.td512 .td-prose ul > li { position: relative; padding-left: 26px; }
.td512 .td-prose ul > li::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.65em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--td-primary, #12a08c);
}
.td512 .td-prose ol { padding-left: 24px; }
.td512 .td-prose li::marker { color: var(--td-primary, #12a08c); font-weight: 600; }

/* 4. Содержание: компактная карточка с нумерацией */
.td512 .td-prose .article-toc {
	background: var(--td-paper, #fff);
	box-shadow: inset 0 0 0 1px var(--td-border-soft);
	padding: 22px 26px;
}
.td512 .td-prose .article-toc ol {
	display: grid;
	grid-template-columns: 1fr 1fr;
	grid-template-rows: repeat(var(--toc-rows, 10), auto);
	grid-auto-flow: column;
	column-gap: 36px;
	row-gap: 8px;
	counter-reset: toc;
	padding-left: 0;
	list-style: none;
}
.td512 .td-prose .article-toc li {
	counter-increment: toc;
	position: relative;
	padding-left: 26px;
	margin-bottom: 8px;
	font-size: 15.5px;
	line-height: 1.45;
	break-inside: avoid;
}
.td512 .td-prose .article-toc li::before {
	content: counter(toc);
	position: absolute;
	left: 0;
	top: 0;
	font-family: var(--td-ui);
	font-size: 12px;
	line-height: 20px;
	font-weight: 600;
	color: var(--td-ink-3, #6b7c79);
	font-variant-numeric: tabular-nums;
}
.td512 .td-prose .article-toc a {
	color: var(--td-ink);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}
.td512 .td-prose .article-toc a:hover {
	color: var(--td-link, #0a5f55);
	border-bottom-color: currentColor;
}

/* 5. Интересные факты */
.td-facts {
	margin: 6px 0 4px;
	padding: 26px 28px 24px;
	border-radius: var(--td-r-panel, 20px);
	background: var(--td-tint, #eef5f4);
	box-shadow: inset 0 0 0 1px var(--td-border-soft, #dbe9e6);
}
.td512 .td-prose .td-facts__title {
	margin: 0 0 4px;
	padding-top: 0;
	border-top: 0;
	font-family: var(--td-ui);
	font-size: 13px;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--td-ink-3, #6b7c79);
}
.td512 .td-prose .td-facts__lead {
	margin: 0 0 18px;
	font-size: 17px;
	line-height: 1.5;
	color: var(--td-ink);
}
.td-facts__list {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.td512 .td-prose .td-facts__list > li {
	position: relative;
	padding-left: 46px;
	margin: 0;
	font-size: 17px;
	line-height: 1.58;
	color: var(--td-ink);
}
.td512 .td-prose ul.td-facts__list > li::before {
	content: attr(data-n);
	position: absolute;
	left: 0;
	top: 1px;
	width: 30px;
	height: 30px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--td-white, #fff);
	box-shadow: inset 0 0 0 1px var(--td-border-soft, #dbe9e6);
	font-family: var(--td-ui);
	font-size: 13px;
	font-weight: 700;
	color: var(--td-primary, #12a08c);
}

/* 6. Подпись: дата и время чтения — отдельной строкой, без «рваных» переносов */
.td512 .td-pagehead .td-byline__dates {
	display: block;
	margin-top: 6px;
	font-size: 14.5px;
	line-height: 1.5;
	opacity: 0.82;
}
.td-byline__read { white-space: nowrap; color: inherit; }

/* 7. Полоса прогресса чтения */
.td-readbar {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100000;
	width: 100%;
	height: 3px;
	background: transparent;
	pointer-events: none;
}
.td-readbar__fill {
	height: 100%;
	width: 0;
	background: var(--td-primary, #12a08c);
	transition: width 80ms linear;
}
@media (prefers-reduced-motion: reduce) {
	.td-readbar__fill { transition: none; }
}

/* 8. Мобильная версия */
@media (max-width: 760px) {
	.td512 .td-prose :is(p, li) { font-size: 17.5px; line-height: 1.7; }
	.td512 .td-prose p.article-lead { font-size: 19px; }
	.td512 .td-prose .entry-content > h2 { margin-top: 8px; padding-top: 18px; }
	.td512 .td-prose .article-toc ol {
		grid-template-columns: 1fr;
		grid-template-rows: none;
		grid-auto-flow: row;
	}
	.td512 .td-prose .article-toc { padding: 18px 20px; }
	.td-facts { padding: 20px 20px 18px; }
	.td-facts__list > li { font-size: 16px; }
}
