/* 教程 / 案例详情 — 左中右布局 */
.yw-learn-single {
	padding-bottom: 48px;
	background: linear-gradient(180deg, #f8faff 0%, var(--yw-bg) 220px);
}

.yw-learn-single__grid {
	align-items: start;
}

.yw-learn-single__nav,
.yw-learn-single__aside {
	max-height: calc(100vh - 100px);
	overflow: auto;
}

.yw-learn-single__main {
	min-width: 0;
}

.yw-learn-single__main .yw-breadcrumbs {
	margin-bottom: 16px;
}

.yw-learn-single__article {
	background: var(--yw-surface);
	border: 1px solid var(--yw-border);
	border-radius: 20px;
	box-shadow: var(--yw-shadow);
	overflow: hidden;
}

.yw-learn-single__hero {
	padding: 24px 24px 20px;
	border-bottom: 1px solid var(--yw-border);
}

.yw-learn-single__crumb {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--yw-muted);
}

.yw-learn-single__crumb a {
	color: var(--yw-primary-dark);
	text-decoration: none;
}

.yw-learn-single__crumb a:hover {
	text-decoration: underline;
}

.yw-learn-single__crumb-sep {
	margin: 0 6px;
	opacity: 0.5;
}

.yw-learn-single__title-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 10px 12px;
	margin-bottom: 8px;
}

.yw-learn-single__brand {
	flex: 0 0 auto;
	font-size: 28px;
	line-height: 1;
}

.yw-learn-single__title {
	margin: 0;
	flex: 1;
	min-width: 200px;
	font-size: clamp(24px, 3vw, 32px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -0.03em;
}

.yw-learn-single__badge {
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
}

.yw-learn-single__badge--hot {
	background: #fef3c7;
	color: #b45309;
}

.yw-learn-single__excerpt {
	margin: 0 0 14px;
	font-size: 15px;
	line-height: 1.65;
	color: #475569;
}

.yw-learn-single__metric-banner {
	margin: 0 0 12px;
	padding: 12px 16px;
	border-radius: 12px;
	background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
	color: #047857;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.yw-learn-single__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 24px;
	margin: 0;
	padding: 0;
}

.yw-learn-single__stat {
	margin: 0;
}

.yw-learn-single__stat dt {
	margin: 0 0 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #94a3b8;
}

.yw-learn-single__stat dd {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--yw-text);
}

.yw-learn-single__cover {
	padding: 0 24px 20px;
}

.yw-learn-single__cover img {
	width: 100%;
	height: auto;
	border-radius: 14px;
	display: block;
}

.yw-learn-single__chapters,
.yw-learn-single__highlights-section,
.yw-learn-single__content {
	padding: 24px;
	border-top: 1px solid var(--yw-border);
}

.yw-learn-single__section-title {
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.yw-learn-single__chapter-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.yw-learn-single__chapter {
	display: grid;
	grid-template-columns: 32px 1fr auto auto;
	gap: 10px;
	align-items: center;
	padding: 12px 14px;
	border-radius: 12px;
	background: #f8fafc;
	border: 1px solid #f1f5f9;
}

.yw-learn-single__chapter-num {
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: #eef2ff;
	color: var(--yw-primary-dark);
	font-size: 13px;
	font-weight: 800;
}

.yw-learn-single__chapter-title {
	font-size: 14px;
	font-weight: 700;
}

.yw-learn-single__chapter-duration {
	font-size: 12px;
	color: var(--yw-muted);
}

.yw-learn-single__chapter-free {
	padding: 3px 8px;
	border-radius: 6px;
	background: #dcfce7;
	color: #15803d;
	font-size: 11px;
	font-weight: 700;
}

.yw-learn-single__highlights-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px;
}

.yw-learn-single__highlight-card {
	padding: 14px 16px;
	border-radius: 14px;
	background: linear-gradient(135deg, #f8fafc, #fff);
	border: 1px solid var(--yw-border);
}

.yw-learn-single__highlight-card-label {
	display: block;
	margin-bottom: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--yw-muted);
}

.yw-learn-single__highlight-card-value {
	font-size: 15px;
	font-weight: 800;
	color: var(--yw-text);
	line-height: 1.35;
}

.yw-learn-single__author {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 20px 24px;
	border-top: 1px solid var(--yw-border);
}

.yw-learn-single__avatar {
	border-radius: 50%;
}

.yw-learn-single__author-name {
	margin: 0 0 4px;
	font-weight: 700;
}

.yw-learn-single__author-meta {
	margin: 0;
	font-size: 13px;
	color: var(--yw-muted);
}

.yw-learn-single__author-sep {
	margin: 0 6px;
}

.yw-learn-single__comments {
	padding: 0 24px 24px;
	border-top: 1px solid var(--yw-border);
}

.yw-learn-single__back {
	margin: 16px 0 0;
}

/* 左侧导航 */
.yw-learn-single__siblings .yw-aside-list__link {
	align-items: flex-start;
}

.yw-learn-single__sibling-label {
	flex: 1;
	min-width: 0;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* 右侧栏 */
.yw-learn-single__aside.yw-aside {
	padding: 0;
	overflow: hidden;
}

.yw-learn-single__aside-card {
	padding: 16px 18px;
	border-bottom: 1px solid var(--yw-border);
}

.yw-learn-single__aside-card:last-of-type {
	border-bottom: 0;
}

.yw-learn-single__aside-title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 800;
}

.yw-learn-single__aside-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.yw-learn-single__aside-head .yw-learn-single__aside-title {
	margin: 0;
}

.yw-learn-single__aside-kv {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 10px;
}

.yw-learn-single__aside-kv li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 13px;
}

.yw-learn-single__aside-kv span {
	color: var(--yw-muted);
}

.yw-learn-single__aside-kv strong {
	font-weight: 700;
	color: var(--yw-text);
}

.yw-learn-single__metric {
	color: #047857;
}

.yw-learn-single__aside-tags {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--yw-border);
}

.yw-learn-single__aside-tags-label {
	display: block;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--yw-muted);
}

.yw-learn-single__tag-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.yw-learn-single__tag {
	display: inline-flex;
	padding: 4px 10px;
	border-radius: 999px;
	background: #eef2ff;
	color: var(--yw-primary-dark);
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
}

.yw-learn-single__tag:hover {
	background: #e0e7ff;
	text-decoration: none;
}

.yw-learn-single__highlights {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.yw-learn-single__highlights li {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	font-size: 13px;
	padding: 8px 10px;
	border-radius: 10px;
	background: #f8fafc;
}

.yw-learn-single__highlight-label {
	color: var(--yw-muted);
}

.yw-learn-single__highlight-value {
	font-weight: 700;
	text-align: right;
}

.yw-learn-single__tool-list,
.yw-learn-single__related {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.yw-learn-single__tool,
.yw-learn-single__related-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 12px;
	color: inherit;
	text-decoration: none;
}

.yw-learn-single__tool:hover,
.yw-learn-single__related-link:hover {
	background: #f8fafc;
	text-decoration: none;
}

.yw-learn-single__tool-logo {
	flex: 0 0 40px;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	overflow: hidden;
	background: #f1f5f9;
}

.yw-learn-single__tool-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.yw-learn-single__tool-ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 14px;
	font-weight: 800;
	color: #94a3b8;
}

.yw-learn-single__tool-body {
	min-width: 0;
}

.yw-learn-single__tool-name,
.yw-learn-single__related-title {
	display: block;
	font-size: 14px;
	font-weight: 700;
}

.yw-learn-single__tool-meta,
.yw-learn-single__related-meta {
	display: block;
	margin-top: 2px;
	font-size: 12px;
	color: var(--yw-muted);
}

.yw-learn-single__related-ico {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	background: #f8fafc;
	font-size: 16px;
}

.yw-learn-single__aside > .yw-aside__cta {
	margin: 0;
	border-top: 1px solid var(--yw-border);
	border-radius: 0;
}

@media (max-width: 1080px) {
	.yw-learn-single__grid {
		grid-template-columns: 1fr;
	}

	.yw-learn-single__nav,
	.yw-learn-single__aside {
		max-height: none;
		overflow: visible;
	}

	.yw-learn-single__main {
		order: 1;
	}

	.yw-learn-single__nav {
		order: 2;
	}

	.yw-learn-single__aside {
		order: 3;
	}
}

@media (max-width: 720px) {
	.yw-learn-single__hero,
	.yw-learn-single__chapters,
	.yw-learn-single__highlights-section,
	.yw-learn-single__content,
	.yw-learn-single__author,
	.yw-learn-single__comments {
		padding-left: 16px;
		padding-right: 16px;
	}

	.yw-learn-single__cover {
		padding-left: 16px;
		padding-right: 16px;
	}

	.yw-learn-single__chapter {
		grid-template-columns: 28px 1fr;
	}

	.yw-learn-single__chapter-duration,
	.yw-learn-single__chapter-free {
		grid-column: 2;
	}
}
