/* Dedicated reading layer for long-form technical posts. */
.single-post {
	--article-ink: #18212f;
	--article-muted: #5e6878;
	--article-line: #dce3ec;
	--article-surface: #f6f8fb;
	--article-code: #101722;
	--article-accent: #503aa8;
}

.single-post .wp-block-post-title {
	max-width: 980px;
	margin: 0 auto;
	font-family: "PingFang SC", "Microsoft YaHei", Manrope, sans-serif;
	font-size: clamp(2.1rem, 4.2vw, 3.55rem);
	font-weight: 700;
	letter-spacing: -0.045em;
	line-height: 1.16;
	text-wrap: balance;
}

.single-post .wp-block-post-featured-image {
	max-width: 1120px;
	margin: clamp(1.75rem, 4vw, 3.25rem) auto 0;
	overflow: hidden;
	border: 1px solid var(--article-line);
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(20, 33, 50, 0.11);
}

.single-post .wp-block-post-featured-image img {
	display: block;
	aspect-ratio: 16 / 9 !important;
	object-fit: cover;
}

.single-post .entry-content {
	margin-top: 0 !important;
	color: var(--article-ink);
	font-family: "PingFang SC", "Microsoft YaHei", Manrope, sans-serif;
	font-size: clamp(1rem, 0.97rem + 0.18vw, 1.125rem);
	font-weight: 400;
	letter-spacing: 0.01em;
	line-height: 1.9;
}

.single-post .entry-content > :not(.alignfull) {
	max-width: min(760px, 100%) !important;
}

.single-post .entry-content p,
.single-post .entry-content li {
	text-wrap: pretty;
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
	margin-top: clamp(3rem, 7vw, 5.5rem) !important;
	padding-top: 0.4rem;
	font-family: "PingFang SC", "Microsoft YaHei", Manrope, sans-serif;
	font-weight: 700;
	letter-spacing: -0.025em;
	scroll-margin-top: 2rem;
}

.single-post .entry-content h2 {
	padding-bottom: 0.65rem;
	border-bottom: 1px solid var(--article-line);
	font-size: clamp(1.55rem, 2.5vw, 2.1rem);
	line-height: 1.35;
}

.single-post .entry-content h3 {
	font-size: clamp(1.2rem, 2vw, 1.45rem);
	line-height: 1.45;
}

.single-post .article-hero-summary {
	margin-top: clamp(1.5rem, 4vw, 2.5rem) !important;
	padding: 1.1rem 1.25rem;
	border: 1px solid #ded7f1;
	border-radius: 12px;
	background: #f8f6ff;
	color: #39305e;
	font-size: 0.98em;
	line-height: 1.75;
}

.single-post .entry-content blockquote {
	padding: 1.35rem 1.5rem;
	border: 0;
	border-left: 4px solid var(--article-accent);
	border-radius: 0 12px 12px 0;
	background: var(--article-surface);
	color: #344054;
}

.single-post .entry-content blockquote p + p {
	margin-top: 0.8rem;
}

.single-post .article-toc {
	max-width: min(760px, 100%);
	margin: 1.5rem auto 0;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--article-line);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(20, 33, 50, 0.06);
	font-size: 0.94rem;
	line-height: 1.6;
}

.single-post .article-toc p {
	margin: 0 0 0.6rem;
	color: var(--article-muted);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.single-post .article-toc ol {
	margin: 0;
	padding-left: 1.25rem;
}

.single-post .article-toc li + li {
	margin-top: 0.3rem;
}

.single-post .article-toc .toc-level-3 {
	margin-left: 1rem;
	font-size: 0.92em;
}

.single-post .article-toc a {
	color: #374151;
	text-decoration: none;
}

.single-post .article-toc a:hover {
	color: var(--article-accent);
	text-decoration: underline;
}

.single-post .entry-content :not(pre) > code {
	padding: 0.14em 0.4em;
	border: 1px solid #dfe4ea;
	border-radius: 5px;
	background: #f3f5f7;
	color: #a04422;
	font-family: "Fira Code", Consolas, monospace;
	font-size: 0.86em;
	word-break: break-word;
}

.single-post .entry-content pre {
	max-width: min(860px, 100%) !important;
	margin-top: 1.6rem !important;
	margin-bottom: 1.6rem !important;
	padding: 1.15rem 1.25rem;
	overflow-x: auto;
	border: 1px solid #263448;
	border-radius: 12px;
	background: var(--article-code);
	box-shadow: 0 10px 24px rgba(15, 23, 34, 0.14);
	color: #e6edf3;
	font-family: "Fira Code", Consolas, monospace;
	font-size: 0.83em;
	line-height: 1.72;
	white-space: pre;
}

.single-post .entry-content pre code {
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
}

.single-post .entry-content table {
	width: 100%;
	margin: 1.75rem 0;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--article-line);
	border-radius: 10px;
	overflow: hidden;
	font-size: 0.9em;
	line-height: 1.55;
}

.single-post .entry-content th,
.single-post .entry-content td {
	padding: 0.85rem 1rem;
	border-right: 1px solid var(--article-line);
	border-bottom: 1px solid var(--article-line);
	text-align: left;
	vertical-align: top;
}

.single-post .entry-content th {
	background: #eef2f7;
	font-weight: 700;
}

.single-post .entry-content tr:last-child td {
	border-bottom: 0;
}

.single-post .entry-content th:last-child,
.single-post .entry-content td:last-child {
	border-right: 0;
}

.single-post .entry-content a {
	color: #3d2a96;
	text-decoration-color: #b7afe1;
	text-underline-offset: 0.16em;
}

@media (max-width: 700px) {
	.single-post .wp-block-post-title {
		font-size: clamp(1.85rem, 8vw, 2.35rem);
	}

	.single-post .wp-block-post-featured-image {
		border-radius: 12px;
	}

	.single-post .entry-content h2,
	.single-post .entry-content h3 {
		margin-top: 3rem !important;
	}

	.single-post .entry-content pre {
		margin-right: 0 !important;
		margin-left: 0 !important;
		padding: 1rem;
		border-radius: 9px;
		font-size: 0.78em;
	}

	.single-post .entry-content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}

	.single-post .entry-content th,
	.single-post .entry-content td {
		padding: 0.7rem 0.85rem;
	}
}
