/* Single blog post: table of contents, share links, recent posts. */
.blog-single-page {
	padding: 14px 12px 72px;
	background: #fff;
}
.blog-single-shell {
	max-width: 1320px;
	margin: 0 auto;
}
.blog-single-article {
	display: block;
}
.blog-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	color: var(--hf-muted);
	font-size: 0.95rem;
	line-height: 1.4;
}
.blog-breadcrumbs a {
	color: #5f7f9f;
	text-decoration: none;
}
.blog-breadcrumbs a:hover {
	color: var(--color-primary-text);
}
.blog-layout {
	display: grid;
	grid-template-columns: 372px minmax(0, 1fr);
	gap: 0 36px;
	align-items: start;
}
/* Desktop: the title block and the text sit in the right column; the table of
   contents is a sticky sidebar spanning both. In the HTML it comes after the
   featured image, which is where phones show it. */
.blog-layout > .blog-hero {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
}
.blog-layout > .blog-content {
	grid-column: 2;
	grid-row: 2;
	min-width: 0;
}
.blog-layout__sidebar {
	grid-column: 1;
	grid-row: 1 / span 2;
	position: sticky;
	top: 28px;
}
.blog-toc {
	position: relative;
	border: 1px solid var(--hf-line);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 31, 51, 0.04);
	overflow: hidden;
}
.blog-toc__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 18px 12px 20px;
	border-bottom: 1px solid var(--hf-line);
}
.blog-toc__title {
	margin: 0;
	color: var(--blue);
	font-family: var(--font-sans);
	font-size: 1.12rem;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -0.02em;
}
.blog-toc__toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 10px;
	border: 0;
	background: none;
	color: var(--hf-muted);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
}
.blog-toc__toggle i {
	font-size: 0.8rem;
	transition: transform 0.2s ease;
}
.blog-toc__list {
	margin: 0;
	padding: 8px 16px 16px 42px;
	color: var(--hf-text);
	font-size: 0.98rem;
	line-height: 1.7;
	max-height: 72vh;
	overflow: auto;
	overscroll-behavior: contain;
	/* A slim, quiet scroll bar: no track, a soft grey thumb that darkens on hover. */
	scrollbar-width: thin;
	scrollbar-color: var(--hf-line-strong) transparent;
}
.blog-toc__list::-webkit-scrollbar {
	width: 4px;
}
.blog-toc__list::-webkit-scrollbar-track {
	background: transparent;
}
.blog-toc__list::-webkit-scrollbar-thumb {
	background: var(--hf-line-strong);
	border-radius: 999px;
}
.blog-toc__list::-webkit-scrollbar-thumb:hover {
	background: var(--hf-muted);
}
.blog-toc__list li {
	margin-bottom: 12px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--hf-line);
}
.blog-toc__list li:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}
.blog-toc__list a {
	display: inline-block;
	color: var(--hf-text);
	text-decoration: none;
	font-family: var(--font-sans);
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.45;
}
.blog-toc__list a:hover {
	color: var(--blue);
}
.blog-toc__list .toc-level-3 {
	margin-left: 18px;
	padding-bottom: 8px;
	border-bottom: 0;
	list-style: disc;
	color: rgba(var(--hf-blue-rgb), 0.85);
}
.blog-toc__list .toc-level-3 a {
	font-size: 0.95rem;
	font-weight: 500;
}
.blog-toc.is-collapsed .blog-toc__list {
	display: none;
}
.blog-toc.is-collapsed .blog-toc__toggle i {
	transform: rotate(0deg);
}
.blog-toc:not(.is-collapsed) .blog-toc__toggle i {
	transform: rotate(180deg);
}
.blog-hero {
	padding: 2px 0 24px;
}
.blog-hero__title {
	margin: 0 0 18px;
	color: var(--hf-ink);
	font-family: var(--font-sans);
	font-size: clamp(2.6rem, 4.6vw, 4.15rem);
	line-height: 1.05;
	font-weight: 900;
	letter-spacing: -0.05em;
	max-width: 980px;
}
.blog-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 18px;
	margin-bottom: 26px;
	color: var(--hf-text);
	font-size: 0.95rem;
	line-height: 1.4;
}
.blog-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 500;
	white-space: nowrap;
}
.blog-meta-item i {
	color: var(--blue);
	font-size: 0.9rem;
}
.blog-meta-label {
	color: #334155;
	font-weight: 700;
}
.blog-meta-item--share {
	flex-wrap: wrap;
	gap: 8px;
}
.blog-share-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: #fff;
	color: var(--blue);
	border: 1px solid rgba(var(--hf-blue-rgb), 0.2);
	text-decoration: none;
	box-shadow: 0 4px 10px rgba(var(--hf-blue-rgb), 0.08);
	transition:
		transform 0.2s ease,
		background-color 0.2s ease,
		border-color 0.2s ease;
}
.blog-share-link:hover {
	transform: translateY(-1px);
}
.blog-share-link--copy.is-copied,
.blog-share-link:hover {
	background: #eff6ff;
	border-color: rgba(var(--hf-blue-rgb), 0.3);
}
.blog-hero__media {
	margin: 0 0 18px;
}
.blog-hero__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	aspect-ratio: 16/9;
	object-fit: cover;
}
.blog-content--single {
	color: var(--hf-text);
	font-family: var(--font-sans);
	font-size: 1.05rem;
	line-height: 1.78;
}
.blog-content--single > :first-child {
	margin-top: 0;
}
.blog-content--single > :last-child {
	margin-bottom: 0;
}
.blog-content--single h2,
.blog-content--single h3,
.blog-content--single h4 {
	color: var(--hf-ink);
	font-family: var(--font-sans);
	line-height: 1.2;
	letter-spacing: -0.03em;
	margin: 1.55em 0 0.65em;
	font-weight: 800;
}
.blog-content--single h2 {
	font-size: clamp(1.55rem, 2.3vw, 2.2rem);
}
.blog-content--single h3 {
	font-size: clamp(1.25rem, 1.9vw, 1.7rem);
}
.blog-content--single h4 {
	font-size: clamp(1.08rem, 1.4vw, 1.28rem);
}
.blog-content--single p {
	margin: 0 0 1.15em;
}
.blog-content--single a {
	color: var(--color-primary-text);
	text-decoration: none;
}
.blog-content--single a:hover,
.blog-related-post-card__link:hover {
	text-decoration: underline;
}
.blog-content--single ol,
.blog-content--single ul {
	margin: 0 0 1.15em;
	padding-left: 1.6em;
	list-style-position: outside;
}
.blog-content--single ul {
	list-style-type: disc;
}
.blog-content--single ol {
	list-style-type: decimal;
}
.blog-content--single ul ul,
.blog-content--single ol ul {
	list-style-type: circle;
}
.blog-content--single ul ol,
.blog-content--single ol ol {
	list-style-type: lower-alpha;
}
.blog-content--single li ul,
.blog-content--single li ol {
	margin: 0.5em 0 0;
}
.blog-content--single li {
	margin-bottom: 0.5em;
	padding-left: 0.25em;
}
.blog-content--single li::marker {
	color: var(--hf-blue-500);
	font-weight: 700;
}
.blog-content--single blockquote {
	margin: 1.6em 0;
	padding: 18px 22px;
	border-left: 4px solid var(--hf-blue-500);
	background: #f6faff;
	border-radius: 12px;
	color: #334155;
}
.blog-content--single img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 12px;
	margin: 1.6em 0;
}
.blog-content--single figure {
	margin: 1.6em 0;
}
.blog-content--single figcaption {
	margin-top: 10px;
	color: var(--hf-muted);
	font-size: 0.88rem;
	text-align: center;
}
.blog-content--single table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.6em 0;
	font-size: 0.96rem;
}
.blog-content--single td,
.blog-content--single th {
	padding: 13px 14px;
	border: 1px solid #dbe5ee;
}
.blog-content--single th {
	background: #eef6fc;
	color: var(--hf-text);
	font-weight: 800;
	text-align: left;
}
.blog-content--single pre {
	margin: 1.6em 0;
	padding: 18px 20px;
	background: #111827;
	color: #e5e7eb;
	border-radius: 12px;
	overflow-x: auto;
}
.blog-content--single code {
	padding: 2px 6px;
	border-radius: 6px;
	background: #eef2f7;
	font-size: 0.94em;
}
.blog-content--single pre code {
	padding: 0;
	background: none;
}
.blog-related-posts {
	margin-top: 44px;
	padding-top: 28px;
	border-top: 1px solid rgba(31, 65, 110, 0.12);
}
.blog-related-posts__header {
	margin-bottom: 18px;
}
.blog-related-posts__title {
	margin: 0;
	color: var(--hf-ink);
	font-family: var(--font-sans);
	font-size: clamp(1.3rem, 2vw, 1.8rem);
	font-weight: 800;
	letter-spacing: -0.03em;
}
.blog-related-posts__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}
.blog-related-post-card {
	overflow: hidden;
	border: 1px solid rgba(var(--hf-blue-rgb), 0.12);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}
.blog-related-post-card__media {
	display: block;
	aspect-ratio: 16/10;
	overflow: hidden;
	background: #eef4fb;
}
.blog-related-post-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}
.blog-related-post-card:hover .blog-related-post-card__image {
	transform: scale(1.03);
}
.blog-related-post-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px 18px 20px;
}
.blog-related-post-card__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--hf-muted);
	font-size: 0.9rem;
}
.blog-related-post-card__date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.blog-related-post-card__title {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 1.08rem;
	line-height: 1.35;
	letter-spacing: -0.02em;
}
.blog-related-post-card__title a {
	color: var(--hf-ink);
	text-decoration: none;
}
.blog-related-post-card__title a:hover {
	color: var(--color-primary-text);
}
.blog-related-post-card__excerpt {
	color: #475569;
	font-size: 0.96rem;
	line-height: 1.7;
}
.blog-related-post-card__link {
	align-self: flex-start;
	color: var(--color-primary-text);
	text-decoration: none;
	font-weight: 700;
}
@media (max-width: 1120px) {
	.blog-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
	.blog-layout > .blog-hero,
	.blog-layout > .blog-content,
	.blog-layout__sidebar {
		grid-column: 1;
		grid-row: auto;
	}
	.blog-layout__sidebar {
		position: static;
	}
	.blog-hero {
		padding-bottom: 0;
	}
}
@media (max-width: 768px) {
	.blog-single-page {
		padding: 10px 10px 54px;
	}
	.blog-breadcrumbs {
		margin-bottom: 0;
		font-size: 0.88rem;
	}
	.blog-layout {
		gap: 18px;
	}
	.blog-hero__title {
		font-size: clamp(2.1rem, 8vw, 2.9rem);
		margin-bottom: 14px;
	}
	.blog-hero__meta {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px 14px;
		margin-bottom: 18px;
		font-size: 0.88rem;
		align-items: stretch;
	}
	.blog-meta-item {
		white-space: normal;
		align-items: flex-start;
	}
	.blog-meta-item--share {
		width: 100%;
		flex-wrap: wrap;
		gap: 7px;
	}
	.blog-toc__header {
		padding: 16px 16px 10px 18px;
	}
	.blog-toc__title {
		font-size: 1.02rem;
	}
	.blog-toc__list {
		padding: 8px 14px 14px 36px;
		max-height: none;
	}
	.blog-content--single {
		font-size: 1rem;
		line-height: 1.74;
	}
	.blog-content--single table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	.blog-content--single td,
	.blog-content--single th {
		white-space: nowrap;
	}
	.blog-related-posts__grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}
@media (max-width: 480px) {
	.blog-hero__meta {
		gap: 9px 10px;
		margin-bottom: 16px;
	}
	.blog-content--single h2 {
		font-size: 1.42rem;
	}
	.blog-content--single h3 {
		font-size: 1.18rem;
	}
	.blog-related-posts {
		margin-top: 34px;
		padding-top: 22px;
	}
	.blog-related-post-card__body {
		padding: 16px 16px 18px;
	}
}

/* Design-system alignment: breadcrumbs and in-text links. */
.blog-breadcrumbs {
	color: var(--hf-muted);
}

.blog-breadcrumbs a {
	color: var(--color-primary-text);
}

.blog-breadcrumbs [aria-current] {
	color: var(--hf-ink);
}

.blog-content a {
	color: var(--color-link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.blog-content a:hover {
	text-decoration-thickness: 2px;
}
