/* Long-article reading chrome: progress, TOC, continue */

.esteem-read-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1200;
	height: 3px;
	background: transparent;
	pointer-events: none;
}

.esteem-read-progress__bar {
	display: block;
	height: 100%;
	width: 0;
	background: var(--esteem-accent, #0e76bb);
	transform-origin: left center;
	transition: width .12s linear;
}

.esteem-read-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin: 0 0 20px;
	font-size: 13px;
	font-weight: 500;
	color: var(--esteem-text-muted, #5b6570);
}

.esteem-read-meta time {
	color: inherit;
}

body.esteem-has-toc h2,
body.esteem-has-toc h3 {
	scroll-margin-top: calc(var(--esteem-header-top-h, 32px) + var(--esteem-header-nav-h, 72px) + 18px);
}

.esteem-toc-chips {
	display: none;
	gap: 8px;
	margin: 0 0 22px;
	padding: 10px 0 12px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.esteem-toc-chips a {
	flex: 0 0 auto;
	padding: 7px 12px;
	border: 1px solid var(--esteem-border, #e8ecf0);
	border-radius: 999px;
	background: var(--esteem-bg-elevated, #fff);
	color: var(--esteem-heading, #111827);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.esteem-toc-chips a.is-active,
.esteem-toc-chips a:hover,
.esteem-toc-chips a:focus {
	border-color: var(--esteem-accent, #0e76bb);
	color: var(--esteem-accent, #0e76bb);
	text-decoration: none;
}

.esteem-toc {
	display: none;
}

.esteem-toc__title {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--esteem-text-muted, #5b6570);
}

.esteem-toc nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.esteem-toc a {
	padding: 5px 0 5px 10px;
	border-left: 2px solid var(--esteem-border, #e8ecf0);
	color: var(--esteem-text, #374151);
	font-size: 13px;
	line-height: 1.35;
	text-decoration: none;
}

.esteem-toc a.is-h3 {
	padding-left: 18px;
	font-size: 12px;
	font-weight: 500;
}

.esteem-toc a.is-active {
	border-left-color: var(--esteem-accent, #0e76bb);
	color: var(--esteem-accent, #0e76bb);
	font-weight: 600;
}

.esteem-toc a:hover,
.esteem-toc a:focus {
	color: var(--esteem-accent, #0e76bb);
	text-decoration: none;
}

.esteem-continue {
	position: fixed;
	left: 16px;
	bottom: 20px;
	z-index: 1084;
	width: min(360px, calc(100vw - 96px));
	padding: 16px 18px;
	background: var(--esteem-bg-elevated, #fff);
	color: var(--esteem-text, #212529);
	border: 1px solid var(--esteem-border, #e8ecf0);
	border-top: 3px solid var(--esteem-accent, #0e76bb);
	border-radius: 10px;
	box-shadow: 0 12px 32px var(--esteem-shadow, rgba(16, 24, 40, .16));
	font-family: 'Montserrat', sans-serif;
}

.esteem-continue[hidden] {
	display: none;
}

.esteem-continue__kicker {
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--esteem-accent, #0e76bb);
}

.esteem-continue h2 {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 600;
	text-transform: none;
}

.esteem-continue h2:after {
	display: none !important;
	content: none !important;
}

.esteem-continue__nav {
	display: grid;
	gap: 8px;
	margin: 0 0 12px;
}

.esteem-continue__nav a,
.esteem-continue__hubs a {
	display: block;
	color: var(--esteem-link, #0e76bb);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.esteem-continue__nav span {
	display: block;
	font-size: 11px;
	font-weight: 500;
	color: var(--esteem-text-muted, #5b6570);
}

.esteem-continue__hubs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	margin: 0 0 10px;
}

.esteem-continue__close {
	border: 0;
	background: transparent;
	color: var(--esteem-link, #0e76bb);
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	padding: 0;
}

@media (min-width: 1200px) {
	.esteem-toc-chips {
		display: none !important;
	}

	body.esteem-has-toc .esteem-toc {
		display: block;
		position: fixed;
		left: 16px;
		top: calc(var(--esteem-header-top-h, 32px) + var(--esteem-header-nav-h, 72px) + 16px);
		width: 228px;
		max-height: calc(100vh - 160px);
		overflow-x: hidden;
		overflow-y: auto;
		padding: 14px 12px 16px;
		z-index: 60;
		background: var(--esteem-bg-elevated, #fff);
		color: var(--esteem-text, #374151);
		border: 1px solid var(--esteem-border, #e8ecf0);
		border-radius: 10px;
		box-shadow: 0 10px 28px var(--esteem-shadow, rgba(16, 24, 40, .12));
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity .2s ease, visibility .2s ease;
		scrollbar-width: thin;
		scrollbar-color: var(--esteem-border, #c5d0da) transparent;
	}

	body.esteem-has-toc .esteem-toc.is-docked {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	body.esteem-has-toc .esteem-toc::-webkit-scrollbar {
		width: 6px;
	}

	body.esteem-has-toc .esteem-toc::-webkit-scrollbar-thumb {
		background: var(--esteem-border, #c5d0da);
		border-radius: 8px;
	}

	body.esteem-has-toc .app-page .container,
	body.esteem-has-toc #article-body > .container,
	body.esteem-has-toc #page-body > .container,
	body.esteem-has-toc #comparison > .container,
	body.esteem-has-toc .app-related > .container,
	body.esteem-has-toc .faq-modern-section > .container,
	body.esteem-has-toc .esteem-formulator-cta > .container,
	body.esteem-has-toc .related-technical-guides > .container {
		padding-left: 252px;
	}
}

@media (max-width: 1199.98px) {
	.esteem-toc-chips {
		display: flex;
		position: sticky;
		top: calc(var(--esteem-header-top-h, 32px) + var(--esteem-header-nav-h, 72px));
		z-index: 40;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		box-sizing: border-box;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		background: var(--esteem-bg, #fff);
		margin-left: 0;
		margin-right: 0;
		padding-left: 0;
		padding-right: 0;
		border-bottom: 1px solid var(--esteem-border, #e8ecf0);
	}

	.esteem-toc-chips a {
		max-width: min(240px, 78vw);
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.esteem-continue {
		left: 12px;
		right: 72px;
		width: auto;
		bottom: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.esteem-read-progress__bar,
	body.esteem-has-toc .esteem-toc {
		transition: none;
	}
}

html[data-theme="dark"] .esteem-toc-chips {
	background: var(--esteem-bg, #10161d);
}

html[data-theme="dark"] .esteem-toc {
	background: var(--esteem-bg-elevated, #1a232e);
	border-color: var(--esteem-border, #2a3542);
}

html[data-theme="dark"] .esteem-toc a,
html[data-theme="dark"] .esteem-toc__title,
html[data-theme="dark"] .esteem-read-meta {
	color: var(--esteem-text, #d7e0e8);
}

html[data-theme="dark"] .esteem-toc-chips a {
	background: var(--esteem-bg-elevated, #1a232e);
	border-color: var(--esteem-border, #2a3542);
	color: var(--esteem-heading, #f3f6f9);
}
